@public-ui/components 3.0.1-7c24654fbf351e04b5635c30d957697951f63331.0 → 3.0.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{Alert-232eddce.js → Alert-9c319ea5.js} +1 -1
  3. package/dist/cjs/{Alert-232eddce.js.map → Alert-9c319ea5.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-edb6f116.js → Collapsible-58d459ac.js} +1 -1
  5. package/dist/cjs/{Collapsible-edb6f116.js.map → Collapsible-58d459ac.js.map} +1 -1
  6. package/dist/cjs/CustomSuggestionsOptionsGroup-28f9f94d.js +4 -0
  7. package/dist/cjs/{CustomSuggestionsOptionsGroup-58ff15d8.js.map → CustomSuggestionsOptionsGroup-28f9f94d.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-c8c06d23.js → FieldControlStateWrapper-edeed91c.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-c8c06d23.js.map → FieldControlStateWrapper-edeed91c.js.map} +1 -1
  10. package/dist/cjs/{Heading-6bd422b8.js → Heading-ed23ff09.js} +1 -1
  11. package/dist/cjs/{Heading-6bd422b8.js.map → Heading-ed23ff09.js.map} +1 -1
  12. package/dist/cjs/Icon-1ab759d0.js +4 -0
  13. package/dist/cjs/{Icon-55410375.js.map → Icon-1ab759d0.js.map} +1 -1
  14. package/dist/cjs/{Input-03525feb.js → Input-49eb6dae.js} +1 -1
  15. package/dist/cjs/{Input-03525feb.js.map → Input-49eb6dae.js.map} +1 -1
  16. package/dist/cjs/{InputStateWrapper-c8dec8cf.js → InputStateWrapper-636f1717.js} +1 -1
  17. package/dist/cjs/{InputStateWrapper-c8dec8cf.js.map → InputStateWrapper-636f1717.js.map} +1 -1
  18. package/dist/cjs/{InternalUnderlinedBadgeText-078e9c0a.js → InternalUnderlinedBadgeText-793a01ae.js} +1 -1
  19. package/dist/cjs/{InternalUnderlinedBadgeText-078e9c0a.js.map → InternalUnderlinedBadgeText-793a01ae.js.map} +1 -1
  20. package/dist/cjs/{Span-9ec2e9e0.js → Span-d9a9102a.js} +1 -1
  21. package/dist/cjs/{Span-9ec2e9e0.js.map → Span-d9a9102a.js.map} +1 -1
  22. package/dist/cjs/{app-globals-e11dbda2.js → app-globals-2d81cc92.js} +1 -1
  23. package/dist/cjs/{app-globals-e11dbda2.js.map → app-globals-2d81cc92.js.map} +1 -1
  24. package/dist/cjs/{controller-76eff51b.js → controller-7b2b6afc.js} +1 -1
  25. package/dist/cjs/{controller-76eff51b.js.map → controller-7b2b6afc.js.map} +1 -1
  26. package/dist/cjs/{controller-c51dbde9.js → controller-9169085a.js} +1 -1
  27. package/dist/cjs/{controller-c51dbde9.js.map → controller-9169085a.js.map} +1 -1
  28. package/dist/cjs/{controller-0cff981a.js → controller-9934d221.js} +1 -1
  29. package/dist/cjs/{controller-0cff981a.js.map → controller-9934d221.js.map} +1 -1
  30. package/dist/cjs/{controller-icon-d5163111.js → controller-icon-6be4bb30.js} +1 -1
  31. package/dist/cjs/{controller-icon-d5163111.js.map → controller-icon-6be4bb30.js.map} +1 -1
  32. package/dist/cjs/{dev.utils-258a9943.js → dev.utils-178da62b.js} +1 -1
  33. package/dist/cjs/{dev.utils-258a9943.js.map → dev.utils-178da62b.js.map} +1 -1
  34. package/dist/cjs/{devtools-78060880.js → devtools-9dcc4aee.js} +1 -1
  35. package/dist/cjs/{devtools-78060880.js.map → devtools-9dcc4aee.js.map} +1 -1
  36. package/dist/cjs/{getRenderStates-4f3dbd3b.js → getRenderStates-bdec93a5.js} +1 -1
  37. package/dist/cjs/{getRenderStates-4f3dbd3b.js.map → getRenderStates-bdec93a5.js.map} +1 -1
  38. package/dist/cjs/index-1b2a8369.js +4 -0
  39. package/dist/cjs/index-1b2a8369.js.map +1 -0
  40. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  41. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  42. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-radio.cjs.entry.js.map +1 -1
  68. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  69. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  71. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  73. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  75. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  95. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  97. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  101. package/dist/cjs/kolibri.cjs.js +1 -1
  102. package/dist/cjs/loader.cjs.js +1 -1
  103. package/dist/cjs/test-component.cjs.entry.js +1 -1
  104. package/dist/components/kol-input-radio.js +1 -1
  105. package/dist/components/kol-input-radio.js.map +1 -1
  106. package/dist/esm/{Alert-bb061e95.js → Alert-363bad74.js} +1 -1
  107. package/dist/esm/{Alert-bb061e95.js.map → Alert-363bad74.js.map} +1 -1
  108. package/dist/esm/{Collapsible-25ebba0d.js → Collapsible-957956e1.js} +1 -1
  109. package/dist/esm/{Collapsible-25ebba0d.js.map → Collapsible-957956e1.js.map} +1 -1
  110. package/dist/esm/CustomSuggestionsOptionsGroup-0e2df8f9.js +4 -0
  111. package/dist/esm/{CustomSuggestionsOptionsGroup-11c15a86.js.map → CustomSuggestionsOptionsGroup-0e2df8f9.js.map} +1 -1
  112. package/dist/esm/{FieldControlStateWrapper-bbbfa4b1.js → FieldControlStateWrapper-ee200880.js} +1 -1
  113. package/dist/esm/{FieldControlStateWrapper-bbbfa4b1.js.map → FieldControlStateWrapper-ee200880.js.map} +1 -1
  114. package/dist/esm/{Heading-598a07b9.js → Heading-9bb68e2c.js} +1 -1
  115. package/dist/esm/{Heading-598a07b9.js.map → Heading-9bb68e2c.js.map} +1 -1
  116. package/dist/esm/{Icon-0b8e0b26.js → Icon-23e91462.js} +1 -1
  117. package/dist/esm/{Icon-0b8e0b26.js.map → Icon-23e91462.js.map} +1 -1
  118. package/dist/esm/Input-83880d09.js +4 -0
  119. package/dist/esm/{Input-56e72e4d.js.map → Input-83880d09.js.map} +1 -1
  120. package/dist/esm/{InputStateWrapper-9982ec35.js → InputStateWrapper-ebbf5565.js} +1 -1
  121. package/dist/esm/{InputStateWrapper-9982ec35.js.map → InputStateWrapper-ebbf5565.js.map} +1 -1
  122. package/dist/esm/InternalUnderlinedBadgeText-d345205c.js +4 -0
  123. package/dist/esm/{InternalUnderlinedBadgeText-2c119ff7.js.map → InternalUnderlinedBadgeText-d345205c.js.map} +1 -1
  124. package/dist/esm/{Span-d4dcdab5.js → Span-c9064f6e.js} +1 -1
  125. package/dist/esm/{Span-d4dcdab5.js.map → Span-c9064f6e.js.map} +1 -1
  126. package/dist/esm/{app-globals-b26c5e94.js → app-globals-ce014dbd.js} +1 -1
  127. package/dist/esm/{app-globals-b26c5e94.js.map → app-globals-ce014dbd.js.map} +1 -1
  128. package/dist/esm/{controller-43afa174.js → controller-17a9fc10.js} +1 -1
  129. package/dist/esm/{controller-43afa174.js.map → controller-17a9fc10.js.map} +1 -1
  130. package/dist/esm/{controller-faa5fff2.js → controller-78a365ff.js} +1 -1
  131. package/dist/esm/{controller-faa5fff2.js.map → controller-78a365ff.js.map} +1 -1
  132. package/dist/esm/{controller-e8cb3cac.js → controller-93a592b9.js} +1 -1
  133. package/dist/esm/{controller-e8cb3cac.js.map → controller-93a592b9.js.map} +1 -1
  134. package/dist/esm/{controller-icon-75bb95e9.js → controller-icon-ddd0267b.js} +1 -1
  135. package/dist/esm/{controller-icon-75bb95e9.js.map → controller-icon-ddd0267b.js.map} +1 -1
  136. package/dist/esm/{dev.utils-9e6009ff.js → dev.utils-f7f473b7.js} +1 -1
  137. package/dist/esm/{dev.utils-9e6009ff.js.map → dev.utils-f7f473b7.js.map} +1 -1
  138. package/dist/esm/{devtools-5cb32cb1.js → devtools-8cc4da6d.js} +1 -1
  139. package/dist/esm/{devtools-5cb32cb1.js.map → devtools-8cc4da6d.js.map} +1 -1
  140. package/dist/esm/{getRenderStates-c9074761.js → getRenderStates-e405825a.js} +1 -1
  141. package/dist/esm/{getRenderStates-c9074761.js.map → getRenderStates-e405825a.js.map} +1 -1
  142. package/dist/esm/index-831675d2.js +4 -0
  143. package/dist/esm/index-831675d2.js.map +1 -0
  144. package/dist/esm/kol-abbr.entry.js +1 -1
  145. package/dist/esm/kol-accordion.entry.js +1 -1
  146. package/dist/esm/kol-alert-wc.entry.js +1 -1
  147. package/dist/esm/kol-alert.entry.js +1 -1
  148. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  149. package/dist/esm/kol-avatar.entry.js +1 -1
  150. package/dist/esm/kol-badge.entry.js +1 -1
  151. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  152. package/dist/esm/kol-button-link.entry.js +1 -1
  153. package/dist/esm/kol-button-wc.entry.js +1 -1
  154. package/dist/esm/kol-button.entry.js +1 -1
  155. package/dist/esm/kol-card.entry.js +1 -1
  156. package/dist/esm/kol-combobox.entry.js +1 -1
  157. package/dist/esm/kol-details.entry.js +1 -1
  158. package/dist/esm/kol-drawer.entry.js +1 -1
  159. package/dist/esm/kol-form.entry.js +1 -1
  160. package/dist/esm/kol-heading.entry.js +1 -1
  161. package/dist/esm/kol-icon.entry.js +1 -1
  162. package/dist/esm/kol-image.entry.js +1 -1
  163. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  164. package/dist/esm/kol-input-color.entry.js +1 -1
  165. package/dist/esm/kol-input-date.entry.js +1 -1
  166. package/dist/esm/kol-input-email.entry.js +1 -1
  167. package/dist/esm/kol-input-file.entry.js +1 -1
  168. package/dist/esm/kol-input-number.entry.js +1 -1
  169. package/dist/esm/kol-input-password.entry.js +1 -1
  170. package/dist/esm/kol-input-radio.entry.js +1 -1
  171. package/dist/esm/kol-input-radio.entry.js.map +1 -1
  172. package/dist/esm/kol-input-range.entry.js +1 -1
  173. package/dist/esm/kol-input-text.entry.js +1 -1
  174. package/dist/esm/kol-kolibri.entry.js +1 -1
  175. package/dist/esm/kol-link-button.entry.js +1 -1
  176. package/dist/esm/kol-link-wc.entry.js +1 -1
  177. package/dist/esm/kol-link.entry.js +1 -1
  178. package/dist/esm/kol-modal.entry.js +1 -1
  179. package/dist/esm/kol-nav.entry.js +1 -1
  180. package/dist/esm/kol-pagination.entry.js +1 -1
  181. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  182. package/dist/esm/kol-popover-button.entry.js +1 -1
  183. package/dist/esm/kol-popover-wc.entry.js +1 -1
  184. package/dist/esm/kol-progress.entry.js +1 -1
  185. package/dist/esm/kol-quote.entry.js +1 -1
  186. package/dist/esm/kol-select.entry.js +1 -1
  187. package/dist/esm/kol-single-select.entry.js +1 -1
  188. package/dist/esm/kol-skip-nav.entry.js +1 -1
  189. package/dist/esm/kol-spin.entry.js +1 -1
  190. package/dist/esm/kol-split-button.entry.js +1 -1
  191. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  192. package/dist/esm/kol-table-stateful.entry.js +1 -1
  193. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  194. package/dist/esm/kol-table-stateless.entry.js +1 -1
  195. package/dist/esm/kol-tabs.entry.js +1 -1
  196. package/dist/esm/kol-textarea.entry.js +1 -1
  197. package/dist/esm/kol-toast-container.entry.js +1 -1
  198. package/dist/esm/kol-toolbar.entry.js +1 -1
  199. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  200. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  201. package/dist/esm/kol-tree-item.entry.js +1 -1
  202. package/dist/esm/kol-tree-wc.entry.js +1 -1
  203. package/dist/esm/kol-tree.entry.js +1 -1
  204. package/dist/esm/kol-version.entry.js +1 -1
  205. package/dist/esm/kolibri.js +1 -1
  206. package/dist/esm/loader.js +1 -1
  207. package/dist/esm/test-component.entry.js +1 -1
  208. package/dist/kolibri/{Alert-bb061e95.js → Alert-363bad74.js} +1 -1
  209. package/dist/kolibri/{Collapsible-25ebba0d.js → Collapsible-957956e1.js} +1 -1
  210. package/dist/kolibri/{CustomSuggestionsOptionsGroup-11c15a86.js → CustomSuggestionsOptionsGroup-0e2df8f9.js} +1 -1
  211. package/dist/kolibri/{FieldControlStateWrapper-bbbfa4b1.js → FieldControlStateWrapper-ee200880.js} +1 -1
  212. package/dist/kolibri/{Heading-598a07b9.js → Heading-9bb68e2c.js} +1 -1
  213. package/dist/kolibri/Icon-23e91462.js +4 -0
  214. package/dist/kolibri/{Input-56e72e4d.js → Input-83880d09.js} +1 -1
  215. package/dist/kolibri/{InputStateWrapper-9982ec35.js → InputStateWrapper-ebbf5565.js} +1 -1
  216. package/dist/kolibri/InternalUnderlinedBadgeText-d345205c.js +4 -0
  217. package/dist/kolibri/Span-c9064f6e.js +4 -0
  218. package/dist/kolibri/{Span-d4dcdab5.js.map → Span-c9064f6e.js.map} +1 -1
  219. package/dist/kolibri/app-globals-ce014dbd.js +4 -0
  220. package/dist/kolibri/{app-globals-b26c5e94.js.map → app-globals-ce014dbd.js.map} +1 -1
  221. package/dist/kolibri/{controller-43afa174.js → controller-17a9fc10.js} +1 -1
  222. package/dist/kolibri/{controller-faa5fff2.js → controller-78a365ff.js} +1 -1
  223. package/dist/kolibri/{controller-e8cb3cac.js → controller-93a592b9.js} +1 -1
  224. package/dist/kolibri/{controller-icon-75bb95e9.js → controller-icon-ddd0267b.js} +1 -1
  225. package/dist/kolibri/{dev.utils-9e6009ff.js → dev.utils-f7f473b7.js} +1 -1
  226. package/dist/kolibri/{devtools-5cb32cb1.js → devtools-8cc4da6d.js} +1 -1
  227. package/dist/kolibri/{getRenderStates-c9074761.js → getRenderStates-e405825a.js} +1 -1
  228. package/dist/kolibri/{index-aceb5633.js → index-831675d2.js} +1 -1
  229. package/dist/kolibri/index-831675d2.js.map +1 -0
  230. package/dist/kolibri/kol-abbr.entry.js +1 -1
  231. package/dist/kolibri/kol-accordion.entry.js +1 -1
  232. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  233. package/dist/kolibri/kol-alert.entry.js +1 -1
  234. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  235. package/dist/kolibri/kol-avatar.entry.js +1 -1
  236. package/dist/kolibri/kol-badge.entry.js +1 -1
  237. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  238. package/dist/kolibri/kol-button-link.entry.js +1 -1
  239. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  240. package/dist/kolibri/kol-button.entry.js +1 -1
  241. package/dist/kolibri/kol-card.entry.js +1 -1
  242. package/dist/kolibri/kol-combobox.entry.js +1 -1
  243. package/dist/kolibri/kol-details.entry.js +1 -1
  244. package/dist/kolibri/kol-drawer.entry.js +1 -1
  245. package/dist/kolibri/kol-form.entry.js +1 -1
  246. package/dist/kolibri/kol-heading.entry.js +1 -1
  247. package/dist/kolibri/kol-icon.entry.js +1 -1
  248. package/dist/kolibri/kol-image.entry.js +1 -1
  249. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  250. package/dist/kolibri/kol-input-color.entry.js +1 -1
  251. package/dist/kolibri/kol-input-date.entry.js +1 -1
  252. package/dist/kolibri/kol-input-email.entry.js +1 -1
  253. package/dist/kolibri/kol-input-file.entry.js +1 -1
  254. package/dist/kolibri/kol-input-number.entry.js +1 -1
  255. package/dist/kolibri/kol-input-password.entry.js +1 -1
  256. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  257. package/dist/kolibri/kol-input-radio.entry.js.map +1 -1
  258. package/dist/kolibri/kol-input-range.entry.js +1 -1
  259. package/dist/kolibri/kol-input-text.entry.js +1 -1
  260. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  261. package/dist/kolibri/kol-link-button.entry.js +1 -1
  262. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  263. package/dist/kolibri/kol-link.entry.js +1 -1
  264. package/dist/kolibri/kol-modal.entry.js +1 -1
  265. package/dist/kolibri/kol-nav.entry.js +1 -1
  266. package/dist/kolibri/kol-pagination.entry.js +1 -1
  267. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  268. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  269. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  270. package/dist/kolibri/kol-progress.entry.js +1 -1
  271. package/dist/kolibri/kol-quote.entry.js +1 -1
  272. package/dist/kolibri/kol-select.entry.js +1 -1
  273. package/dist/kolibri/kol-single-select.entry.js +1 -1
  274. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  275. package/dist/kolibri/kol-spin.entry.js +1 -1
  276. package/dist/kolibri/kol-split-button.entry.js +1 -1
  277. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  278. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  279. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  280. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  281. package/dist/kolibri/kol-tabs.entry.js +1 -1
  282. package/dist/kolibri/kol-textarea.entry.js +1 -1
  283. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  284. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  285. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  286. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  287. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  288. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  289. package/dist/kolibri/kol-tree.entry.js +1 -1
  290. package/dist/kolibri/kol-version.entry.js +1 -1
  291. package/dist/kolibri/kolibri.esm.js +1 -1
  292. package/dist/kolibri/test-component.entry.js +1 -1
  293. package/dist/types/functional-component-wrappers/RadioStateWrapper/RadioStateWrapper.d.ts +10 -0
  294. package/dist/types/functional-component-wrappers/RadioStateWrapper/index.d.ts +1 -0
  295. package/dist/types/functional-components/inputs/Radio/Radio.d.ts +8 -0
  296. package/dist/types/functional-components/inputs/Radio/index.d.ts +1 -0
  297. package/package.json +1 -1
  298. package/dist/cjs/CustomSuggestionsOptionsGroup-58ff15d8.js +0 -4
  299. package/dist/cjs/Icon-55410375.js +0 -4
  300. package/dist/cjs/index-87e5e3ad.js +0 -4
  301. package/dist/cjs/index-87e5e3ad.js.map +0 -1
  302. package/dist/esm/CustomSuggestionsOptionsGroup-11c15a86.js +0 -4
  303. package/dist/esm/Input-56e72e4d.js +0 -4
  304. package/dist/esm/InternalUnderlinedBadgeText-2c119ff7.js +0 -4
  305. package/dist/esm/index-aceb5633.js +0 -4
  306. package/dist/esm/index-aceb5633.js.map +0 -1
  307. package/dist/kolibri/Icon-0b8e0b26.js +0 -4
  308. package/dist/kolibri/InternalUnderlinedBadgeText-2c119ff7.js +0 -4
  309. package/dist/kolibri/Span-d4dcdab5.js +0 -4
  310. package/dist/kolibri/app-globals-b26c5e94.js +0 -4
  311. package/dist/kolibri/index-aceb5633.js.map +0 -1
  312. /package/dist/kolibri/{Alert-bb061e95.js.map → Alert-363bad74.js.map} +0 -0
  313. /package/dist/kolibri/{Collapsible-25ebba0d.js.map → Collapsible-957956e1.js.map} +0 -0
  314. /package/dist/kolibri/{CustomSuggestionsOptionsGroup-11c15a86.js.map → CustomSuggestionsOptionsGroup-0e2df8f9.js.map} +0 -0
  315. /package/dist/kolibri/{FieldControlStateWrapper-bbbfa4b1.js.map → FieldControlStateWrapper-ee200880.js.map} +0 -0
  316. /package/dist/kolibri/{Heading-598a07b9.js.map → Heading-9bb68e2c.js.map} +0 -0
  317. /package/dist/kolibri/{Icon-0b8e0b26.js.map → Icon-23e91462.js.map} +0 -0
  318. /package/dist/kolibri/{Input-56e72e4d.js.map → Input-83880d09.js.map} +0 -0
  319. /package/dist/kolibri/{InputStateWrapper-9982ec35.js.map → InputStateWrapper-ebbf5565.js.map} +0 -0
  320. /package/dist/kolibri/{InternalUnderlinedBadgeText-2c119ff7.js.map → InternalUnderlinedBadgeText-d345205c.js.map} +0 -0
  321. /package/dist/kolibri/{controller-43afa174.js.map → controller-17a9fc10.js.map} +0 -0
  322. /package/dist/kolibri/{controller-faa5fff2.js.map → controller-78a365ff.js.map} +0 -0
  323. /package/dist/kolibri/{controller-e8cb3cac.js.map → controller-93a592b9.js.map} +0 -0
  324. /package/dist/kolibri/{controller-icon-75bb95e9.js.map → controller-icon-ddd0267b.js.map} +0 -0
  325. /package/dist/kolibri/{dev.utils-9e6009ff.js.map → dev.utils-f7f473b7.js.map} +0 -0
  326. /package/dist/kolibri/{devtools-5cb32cb1.js.map → devtools-8cc4da6d.js.map} +0 -0
  327. /package/dist/kolibri/{getRenderStates-c9074761.js.map → getRenderStates-e405825a.js.map} +0 -0
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{n as nonce}from"./dev.utils.js";import{a as InputRadioController}from"./controller2.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{F as FormFieldStateWrapper}from"./getRenderStates.js";import{F as FieldControlStateWrapper}from"./FieldControlStateWrapper.js";import{I as InputStateWrapper}from"./InputStateWrapper.js";const defaultStyleCss='/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-field-control {\n min-height: var(--a11y-min-size);\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label";\n grid-template-rows: auto;\n align-items: center;\n justify-content: left;\n }\n .kol-field-control:has(.kol-field-control__hint) {\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label) {\n grid-template-columns: 1fr auto;\n grid-template-areas: "label input";\n grid-template-rows: auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label):has(.kol-field-control__hint) {\n grid-template-columns: 1fr auto;\n grid-template-areas: "label input" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control__input {\n grid-area: input;\n display: flex;\n min-height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-field-control__label {\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-grow: 1;\n grid-area: label;\n min-height: var(--a11y-min-size);\n }\n .kol-field-control__label--visually-hidden {\n height: 0;\n margin: 0;\n padding: 0;\n visibility: hidden;\n }\n .kol-field-control__label-text::after {\n content: "";\n }\n .kol-field-control__tooltip .span-label::after {\n content: "";\n }\n .kol-field-control__hint {\n grid-area: hint;\n }\n .kol-field-control--disabled .kol-field-control__label {\n cursor: not-allowed;\n opacity: 0.5;\n }\n .kol-field-control--required .kol-field-control__label-text::after {\n content: "*";\n }\n .kol-field-control--required .kol-field-control__tooltip .span-label::after {\n content: "*";\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-form-field {\n --border-width: 2px;\n --input-size: 1.5em;\n }\n .kol-form-field__label {\n display: contents;\n }\n .kol-form-field__input {\n display: flex;\n flex-direction: column;\n }\n .kol-form-field__input--orientation-horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n }\n .kol-form-field--disabled {\n opacity: unset;\n }\n .kol-input-radio {\n appearance: none;\n border-width: var(--border-width);\n border-style: solid;\n border-radius: 100%;\n cursor: pointer;\n display: flex;\n height: var(--input-size);\n margin: 0;\n min-height: var(--input-size);\n min-width: var(--input-size);\n padding: 0;\n width: var(--input-size);\n }\n .kol-input-radio:before {\n border-radius: 100%;\n content: "";\n margin: auto;\n height: calc(var(--input-size) / 2);\n width: calc(var(--input-size) / 2);\n }\n .kol-input-radio:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-input-radio:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n .kol-input-radio:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n}',KolInputRadioDefaultStyle0=defaultStyleCss,KolInputRadio$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this._value}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,component:"fieldset",class:clsx("kol-form-field--radio"),formFieldLabelProps:{component:"legend",class:"kol-form-field__label--legend"},formFieldInputProps:{class:`kol-form-field__input--orientation-${this.state._orientation}`},tooltipAlign:this._tooltipAlign,alert:this.showAsAlert(),hideLabel:!1}}render(){return h(FormFieldStateWrapper,Object.assign({key:"9ee49be5ca3f551182b68ede4b97ec19086f2a2e"},this.getFormFieldProps()),this.state._options.map(((e,n)=>this.renderOption(e,n))))}getOptionProps(e,n){const t={state:this.state,id:n,hint:e.hint,label:e.label,required:!1,fieldControlLabelProps:{showBadge:!1}};return e.disabled&&(t.disabled=!0),t}getInputProps(e,n,t,i){const o=Object.assign(Object.assign({state:this.state,id:n,ref:this.state._value===e.value?this.catchRef:void 0,class:clsx("kol-input-radio",{"kol-input-radio--disabled":Boolean(this.state._disabled||e.disabled)}),"aria-label":this.state._hideLabel&&"string"==typeof e.label?e.label:void 0,type:"radio",name:this.state._name||this.state._id,value:`-${t}`,checked:i},this.controller.onFacade),{onChange:this.onChange,onClick:void 0,onInput:this.onInput,onKeyDown:this.onKeyDown.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}});return e.disabled&&(o.disabled=!0),o}renderOption(e,n){const t=`${this.state._id}-${n}`,i=this.state._value===e.value;return h(FieldControlStateWrapper,Object.assign({key:t},this.getOptionProps(e,t)),h(InputStateWrapper,Object.assign({},this.getInputProps(e,t,n,i))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{if(e.target instanceof HTMLInputElement){const n=this.controller.getOptionByKey(e.target.value);void 0!==n&&this.controller.onFacade.onInput(e,!0,n.value)}},this.onChange=e=>{if(e.target instanceof HTMLInputElement){const n=this.controller.getOptionByKey(e.target.value);void 0!==n&&(this.controller.onFacade.onChange(e,n.value),this._value=n.value)}},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._options=void 0,this._orientation="vertical",this._required=!1,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=null,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_options:[],_orientation:"vertical"},this.inputHasFocus=!1,this.controller=new InputRadioController(this,"radio",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateTooltipAlign(e){this.controller.validateTooltipAlign(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHint(e){this.controller.validateHint(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateOrientation(e){this.controller.validateOrientation(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_tooltipAlign:["validateTooltipAlign"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_hideMsg:["validateHideMsg"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_orientation:["validateOrientation"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:KolInputRadioDefaultStyle0}}},[49,"kol-input-radio",{_accessKey:[1,"_access-key"],_disabled:[4],_hideMsg:[1540,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_id:[1],_label:[1],_msg:[1],_name:[1],_on:[16],_options:[1],_orientation:[1],_required:[4],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1544],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_tooltipAlign:["validateTooltipAlign"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_hideMsg:["validateHideMsg"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_orientation:["validateOrientation"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-radio"].forEach((e=>{if("kol-input-radio"===e)customElements.get(e)||customElements.define(e,KolInputRadio$1)}))}const KolInputRadio=KolInputRadio$1,defineCustomElement=defineCustomElement$1;export{KolInputRadio,defineCustomElement};
4
+ import{h,proxyCustomElement,HTMLElement}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import{n as nonce}from"./dev.utils.js";import{a as InputRadioController}from"./controller2.js";import{p as propagateSubmitEventToForm}from"./controller.js";import{a as checkHasMsg,g as getRenderStates,c as convertMsgToInternMsg,F as FormFieldStateWrapper}from"./getRenderStates.js";import{F as FieldControlStateWrapper}from"./FieldControlStateWrapper.js";import{_ as __rest}from"./tslib.es6.js";import{I as InputFc}from"./Input.js";import"./index2.js";const InputWrapperFc=e=>{var{class:n}=e,t=__rest(e,["class"]);return h(InputFc,Object.assign({class:clsx("kol-input-radio__input",n)},t,{type:"radio"}))},RadioFc=e=>{var n,{class:t,inputProps:i}=e,o=__rest(e,["class","inputProps"]);const a=checkHasMsg(null==i?void 0:i.msg,null==i?void 0:i.touched),l={"kol-input-radio--checked":null==i?void 0:i.checked,"kol-input-radio--disabled":Boolean(null==i?void 0:i.disabled),"kol-input-radio--required":Boolean(null==i?void 0:i.required),"kol-input-radio--touched":Boolean(null==i?void 0:i.touched),[`kol-input-radio--${(null===(n=null==i?void 0:i.msg)||void 0===n?void 0:n.type)||"error"}`]:Boolean(a)};return h("label",Object.assign({class:clsx("kol-input-radio",l,t)},o),h(InputWrapperFc,Object.assign({},i)))};function getRadioProps(e,n={}){const{ariaDescribedBy:t}=getRenderStates(e),i={id:e._id,hideLabel:e._hideLabel,label:e._label,value:e._value,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:t};return"_required"in e&&(i.required=e._required),"_touched"in e&&(i.touched=e._touched),"_msg"in e&&(i.msg=convertMsgToInternMsg(e._msg)),Object.assign(Object.assign({},i),n)}const RadioStateWrapper=e=>{var{state:n,inputProps:t}=e,i=__rest(e,["state","inputProps"]);return h(RadioFc,Object.assign({inputProps:getRadioProps(n,t)},i))},defaultStyleCss='/*\n * This file contains all rules for accessibility.\n */\n@layer kol-global {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without a background and font color whose contrast ratio has\n * not been checked. By initially setting the background color to white and the font color\n * to black, the contrast ratio is ensured and explicit adjustment is forced.\n */\n background-color: white;\n color: black;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /*\n * All interactive elements should have a minimum size of rem(44).\n */\n /* input:not([type=\'checkbox\'], [type=\'radio\'], [type=\'range\']), */\n /* option, */\n /* select, */\n /* textarea, */\n [role=button],\n button:not([role=link]) {\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n }\n}\n/**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don\'t want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n.visually-hidden {\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: calc(1rem / var(--kolibri-root-font-size, 16));\n overflow: hidden;\n position: absolute;\n white-space: nowrap;\n width: calc(1rem / var(--kolibri-root-font-size, 16));\n}\n\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n border: none;\n margin: 0;\n padding: 0;\n width: 100%;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n background-color: lightgray;\n color: black;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: grid;\n place-items: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n place-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n cursor: not-allowed;\n opacity: 0.5;\n outline: none;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n :host {\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n animation-duration: 0.25s;\n animation-iteration-count: 1;\n animation-name: fadeInOpacity;\n animation-timing-function: ease-in;\n box-sizing: border-box;\n display: none;\n position: fixed;\n visibility: hidden;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n max-width: 90vw;\n max-height: 90vh;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width);\n }\n .kol-tooltip__arrow {\n background-color: #fff;\n color: #000;\n height: calc(10rem / var(--kolibri-root-font-size, 16));\n position: absolute;\n transform: rotate(45deg);\n width: calc(10rem / var(--kolibri-root-font-size, 16));\n z-index: 999;\n }\n .kol-tooltip__content {\n background-color: #fff;\n color: #000;\n position: relative;\n z-index: 1000;\n }\n @keyframes fadeInOpacity {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n place-items: center;\n display: flex;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1rem / var(--kolibri-root-font-size, 16));\n }\n}\n@layer kol-component {\n .kol-field-control {\n min-height: var(--a11y-min-size);\n display: grid;\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label";\n grid-template-rows: auto;\n align-items: center;\n justify-content: left;\n }\n .kol-field-control:has(.kol-field-control__hint) {\n grid-template-columns: auto 1fr;\n grid-template-areas: "input label" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label) {\n grid-template-columns: 1fr auto;\n grid-template-areas: "label input";\n grid-template-rows: auto;\n }\n .kol-field-control--label-align-left:not(.kol-field-control--hide-label):has(.kol-field-control__hint) {\n grid-template-columns: 1fr auto;\n grid-template-areas: "label input" "hint hint";\n grid-template-rows: auto auto;\n }\n .kol-field-control__input {\n grid-area: input;\n display: flex;\n min-height: var(--a11y-min-size);\n align-items: center;\n }\n .kol-field-control__label {\n align-items: center;\n cursor: pointer;\n display: flex;\n flex-grow: 1;\n grid-area: label;\n min-height: var(--a11y-min-size);\n }\n .kol-field-control__label--visually-hidden {\n height: 0;\n margin: 0;\n padding: 0;\n visibility: hidden;\n }\n .kol-field-control__label-text::after {\n content: "";\n }\n .kol-field-control__tooltip .span-label::after {\n content: "";\n }\n .kol-field-control__hint {\n grid-area: hint;\n }\n .kol-field-control--disabled .kol-field-control__label {\n cursor: not-allowed;\n opacity: 0.5;\n }\n .kol-field-control--required .kol-field-control__label-text::after {\n content: "*";\n }\n .kol-field-control--required .kol-field-control__tooltip .span-label::after {\n content: "*";\n }\n}\n@layer kol-component {\n .kol-form-field {\n display: grid;\n font-size: calc(16rem / var(--kolibri-root-font-size, 16));\n }\n .kol-form-field:not(.kol-form-field--disabled) .kol-form-field__label {\n cursor: pointer;\n }\n .kol-form-field--disabled .kol-form-field__label {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__label-text::after {\n content: "*";\n }\n .kol-form-field--disabled .kol-form-field__hint {\n opacity: 0.5;\n }\n .kol-form-field--required .kol-form-field__tooltip .span-label::after {\n content: "*";\n }\n}\n@layer kol-component {\n .kol-input-container {\n align-items: center;\n background-color: white;\n display: grid;\n grid-template-columns: 1fr;\n min-height: var(--a11y-min-size);\n min-width: var(--a11y-min-size);\n width: 100%;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start) {\n grid-template-columns: auto 1fr;\n }\n .kol-input-container:has(> .kol-input-container__adornment--end) {\n grid-template-columns: 1fr auto;\n }\n .kol-input-container:has(> .kol-input-container__adornment--start):has(> .kol-input-container__adornment--end) {\n grid-template-columns: auto 1fr auto;\n }\n .kol-input-container__container {\n position: relative;\n }\n .kol-input-container__adornment {\n display: flex;\n align-items: center;\n }\n .kol-input-container__adornment .kol-icon {\n display: grid;\n height: var(--a11y-min-size);\n place-items: center;\n }\n}\n@layer kol-component {\n .kol-form-field {\n --border-width: 2px;\n --input-size: 1.5em;\n }\n .kol-form-field__label {\n display: contents;\n }\n .kol-form-field__input {\n display: flex;\n flex-direction: column;\n }\n .kol-form-field__input--orientation-horizontal {\n flex-direction: row;\n flex-wrap: wrap;\n align-items: flex-start;\n }\n .kol-form-field--disabled {\n opacity: unset;\n }\n .kol-input-radio {\n display: flex;\n position: relative;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n width: var(--a11y-min-size);\n height: var(--a11y-min-size);\n }\n .kol-input-radio__input {\n appearance: none;\n border-width: var(--border-width);\n border-style: solid;\n border-radius: 100%;\n cursor: pointer;\n display: flex;\n height: var(--input-size);\n margin: 0;\n min-height: var(--input-size);\n min-width: var(--input-size);\n padding: 0;\n width: var(--input-size);\n }\n .kol-input-radio__input:before {\n border-radius: 100%;\n content: "";\n margin: auto;\n height: calc(var(--input-size) / 2);\n width: calc(var(--input-size) / 2);\n }\n .kol-input-radio__input:checked:before {\n background-color: #000;\n }\n @media (forced-colors: active) {\n .kol-input-radio__input:checked:before {\n /* Give it a visible background in forced colors mode */\n background-color: selectedItem !important;\n }\n }\n .kol-input-radio__input:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n .kol-input-radio--disabled {\n cursor: not-allowed;\n }\n}',KolInputRadioDefaultStyle0=defaultStyleCss,KolInputRadio$1=proxyCustomElement(class extends HTMLElement{async getValue(){return this._value}async kolFocus(){var e;null===(e=this.inputRef)||void 0===e||e.focus()}getFormFieldProps(){return{state:this.state,component:"fieldset",class:clsx("kol-form-field--radio"),formFieldLabelProps:{component:"legend",class:"kol-form-field__label--legend"},formFieldInputProps:{class:`kol-form-field__input--orientation-${this.state._orientation}`},tooltipAlign:this._tooltipAlign,alert:this.showAsAlert(),hideLabel:!1}}render(){return h(FormFieldStateWrapper,Object.assign({key:"9ee49be5ca3f551182b68ede4b97ec19086f2a2e"},this.getFormFieldProps()),this.state._options.map(((e,n)=>this.renderOption(e,n))))}getOptionProps(e,n){const t={state:this.state,id:n,hint:e.hint,label:e.label,required:!1,fieldControlLabelProps:{showBadge:!1}};return e.disabled&&(t.disabled=!0),t}getInputProps(e,n,t,i){return{state:this.state,inputProps:Object.assign(Object.assign({id:n,ref:this.state._value===e.value?this.catchRef:void 0,"aria-label":this.state._hideLabel&&"string"==typeof e.label?e.label:void 0,type:"radio",name:this.state._name||this.state._id,value:`-${t}`,checked:i,disabled:e.disabled},this.controller.onFacade),{onChange:this.onChange,onClick:void 0,onInput:this.onInput,onKeyDown:this.onKeyDown.bind(this),onFocus:e=>{this.controller.onFacade.onFocus(e),this.inputHasFocus=!0},onBlur:e=>{this.controller.onFacade.onBlur(e),this.inputHasFocus=!1}})}}renderOption(e,n){const t=`${this.state._id}-${n}`,i=this.state._value===e.value;return h(FieldControlStateWrapper,Object.assign({key:t},this.getOptionProps(e,t)),h(RadioStateWrapper,Object.assign({},this.getInputProps(e,t,n,i))))}constructor(){super(),this.__registerHost(),this.__attachShadow(),this.catchRef=e=>{this.inputRef=e},this.onInput=e=>{if(e.target instanceof HTMLInputElement){const n=this.controller.getOptionByKey(e.target.value);void 0!==n&&this.controller.onFacade.onInput(e,!0,n.value)}},this.onChange=e=>{if(e.target instanceof HTMLInputElement){const n=this.controller.getOptionByKey(e.target.value);void 0!==n&&(this.controller.onFacade.onChange(e,n.value),this._value=n.value)}},this.onKeyDown=e=>{"Enter"!==e.code&&"NumpadEnter"!==e.code||propagateSubmitEventToForm({form:this.host,ref:this.inputRef})},this._accessKey=void 0,this._disabled=!1,this._hideMsg=!1,this._hideLabel=!1,this._hint="",this._id=void 0,this._label=void 0,this._msg=void 0,this._name=void 0,this._on=void 0,this._options=void 0,this._orientation="vertical",this._required=!1,this._shortKey=void 0,this._syncValueBySelector=void 0,this._tooltipAlign="top",this._touched=!1,this._value=null,this.state={_hideMsg:!1,_id:`id-${nonce()}`,_label:"",_options:[],_orientation:"vertical"},this.inputHasFocus=!1,this.controller=new InputRadioController(this,"radio",this.host)}showAsAlert(){return Boolean(this.state._touched)&&!this.inputHasFocus}validateAccessKey(e){this.controller.validateAccessKey(e)}validateTooltipAlign(e){this.controller.validateTooltipAlign(e)}validateDisabled(e){this.controller.validateDisabled(e)}validateHideLabel(e){this.controller.validateHideLabel(e)}validateHideMsg(e){this.controller.validateHideMsg(e)}validateHint(e){this.controller.validateHint(e)}validateId(e){this.controller.validateId(e)}validateLabel(e){this.controller.validateLabel(e)}validateMsg(e){this.controller.validateMsg(e)}validateName(e){this.controller.validateName(e)}validateOn(e){this.controller.validateOn(e)}validateOptions(e){this.controller.validateOptions(e)}validateOrientation(e){this.controller.validateOrientation(e)}validateRequired(e){this.controller.validateRequired(e)}validateShortKey(e){this.controller.validateShortKey(e)}validateSyncValueBySelector(e){this.controller.validateSyncValueBySelector(e)}validateTouched(e){this.controller.validateTouched(e)}validateValue(e){this.controller.validateValue(e)}componentWillLoad(){this._touched=!0===this._touched,this.controller.componentWillLoad()}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{_accessKey:["validateAccessKey"],_tooltipAlign:["validateTooltipAlign"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_hideMsg:["validateHideMsg"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_orientation:["validateOrientation"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}}static get style(){return{default:KolInputRadioDefaultStyle0}}},[49,"kol-input-radio",{_accessKey:[1,"_access-key"],_disabled:[4],_hideMsg:[1540,"_hide-msg"],_hideLabel:[4,"_hide-label"],_hint:[1],_id:[1],_label:[1],_msg:[1],_name:[1],_on:[16],_options:[1],_orientation:[1],_required:[4],_shortKey:[1,"_short-key"],_syncValueBySelector:[1,"_sync-value-by-selector"],_tooltipAlign:[1,"_tooltip-align"],_touched:[1540],_value:[1544],state:[32],inputHasFocus:[32],getValue:[64],kolFocus:[64]},void 0,{_accessKey:["validateAccessKey"],_tooltipAlign:["validateTooltipAlign"],_disabled:["validateDisabled"],_hideLabel:["validateHideLabel"],_hideMsg:["validateHideMsg"],_hint:["validateHint"],_id:["validateId"],_label:["validateLabel"],_msg:["validateMsg"],_name:["validateName"],_on:["validateOn"],_options:["validateOptions"],_orientation:["validateOrientation"],_required:["validateRequired"],_shortKey:["validateShortKey"],_syncValueBySelector:["validateSyncValueBySelector"],_touched:["validateTouched"],_value:["validateValue"]}]);function defineCustomElement$1(){if("undefined"==typeof customElements)return;["kol-input-radio"].forEach((e=>{if("kol-input-radio"===e)customElements.get(e)||customElements.define(e,KolInputRadio$1)}))}const KolInputRadio=KolInputRadio$1,defineCustomElement=defineCustomElement$1;export{KolInputRadio,defineCustomElement};
@@ -1 +1 @@
1
- {"file":"kol-input-radio.js","mappings":";;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,k3UAAk3U,CAAC;AAC34U,mCAAe,eAAe;;MC2CjBA,eAAa;IAUlB,MAAM,QAAQ;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC;KACnB;IAIM,MAAM,QAAQ;;QACpB,MAAA,IAAI,CAAC,QAAQ,0CAAE,KAAK,EAAE,CAAC;KACvB;IAEO,iBAAiB;QACxB,OAAO;YACN,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS,EAAE,UAAU;YACrB,KAAK,EAAE,IAAI,CAAC,uBAAuB,CAAC;YACpC,mBAAmB,EAAE;gBACpB,SAAS,EAAE,QAAQ;gBACnB,KAAK,EAAE,+BAA+B;aACtC;YACD,mBAAmB,EAAE;gBACpB,KAAK,EAAE,sCAAsC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE;aACtE;YACD,YAAY,EAAE,IAAI,CAAC,aAAa;YAChC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;YACzB,SAAS,EAAE,KAAK;SAChB,CAAC;KACF;IAEM,MAAM;QACZ,QACC,EAACC,qBAA0B,qEAAK,IAAI,CAAC,iBAAiB,EAAE,GACtD,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CACjD,EAC5B;KACF;IAEO,cAAc,CAAC,MAAmC,EAAE,EAAU;QACrE,MAAM,GAAG,GAAkC;YAC1C,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,EAAE,EAAE,EAAE;YACN,IAAI,EAAE,MAAM,CAAC,IAAI;Y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AAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KACxC;IAGM,gBAAgB,CAAC,KAAwB;QAC/C,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KACxC;IAGM,2BAA2B,CAAC,KAAmC;QACrE,IAAI,CAAC,UAAU,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC;KACnD;IAGM,eAAe,CAAC,KAAe;QACrC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KACvC;IAGM,aAAa,CAAC,KAAqB;QACzC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KACrC;IAEM,iBAAiB;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;QACvC,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;KACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolInputRadio","KolFormFieldStateWrapperFc","KolFieldControlStateWrapperFc","KolInputStateWrapperFc"],"sources":["src/components/input-radio/style.scss?tag=kol-input-radio&mode=default&encapsulation=shadow","src/components/input-radio/shadow.tsx"],"sourcesContent":["@use '../@shared/mixins' as *;\n@use '../../styles/global' as *;\n@use '../host-display-block' as *;\n@use '../../styles/kol-alert-mixin' as *;\n@use '../../styles/kol-field-control-mixin' as *;\n@use '../../styles/kol-form-field-mixin' as *;\n@use '../../styles/kol-input-container-mixin' as *;\n\n@include kol-alert;\n@include kol-field-control;\n@include kol-form-field;\n@include kol-input-container;\n\n@layer kol-component {\n\t.kol-form-field {\n\t\t--border-width: 2px;\n\t\t--input-size: 1.5em;\n\n\t\t&__label {\n\t\t\tdisplay: contents;\n\t\t}\n\n\t\t&__input {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\n\t\t\t&--orientation-horizontal {\n\t\t\t\tflex-direction: row;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\talign-items: flex-start;\n\t\t\t}\n\t\t}\n\n\t\t&--disabled {\n\t\t\topacity: unset;\n\t\t}\n\t}\n\n\t.kol-input-radio {\n\t\tappearance: none;\n\t\tborder-width: var(--border-width);\n\t\tborder-style: solid;\n\t\tborder-radius: 100%;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\theight: var(--input-size);\n\t\tmargin: 0;\n\t\tmin-height: var(--input-size);\n\t\tmin-width: var(--input-size);\n\t\tpadding: 0;\n\t\twidth: var(--input-size);\n\n\t\t&:before {\n\t\t\tborder-radius: 100%;\n\t\t\tcontent: '';\n\t\t\tmargin: auto;\n\t\t\theight: calc(var(--input-size) / 2);\n\t\t\twidth: calc(var(--input-size) / 2);\n\t\t}\n\n\t\t&:checked {\n\t\t\t&:before {\n\t\t\t\tbackground-color: #000;\n\n\t\t\t\t@media (forced-colors: active) {\n\t\t\t\t\t/* Give it a visible background in forced colors mode */\n\t\t\t\t\tbackground-color: selectedItem !important;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&:disabled {\n\t\t\topacity: 0.5;\n\t\t\tcursor: not-allowed;\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, Element, h, Method, Prop, State, Watch } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type {\n\tFocusableElement,\n\tHideMsgPropType,\n\tIdPropType,\n\tInputRadioAPI,\n\tInputRadioStates,\n\tInputTypeOnDefault,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tNamePropType,\n\tOrientation,\n\tRadioOption,\n\tRadioOptionsPropType,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\n\nimport { nonce } from '../../utils/dev.utils';\nimport { InputRadioController } from './controller';\nimport { propagateSubmitEventToForm } from '../form/controller';\n\nimport KolFormFieldStateWrapperFc, { type FormFieldStateWrapperProps } from '../../functional-component-wrappers/FormFieldStateWrapper';\nimport KolFieldControlStateWrapperFc, { type FieldControlStateWrapperProps } from '../../functional-component-wrappers/FieldControlStateWrapper';\nimport KolInputStateWrapperFc, { type InputStateWrapperProps } from '../../functional-component-wrappers/InputStateWrapper';\n\n/**\n * @slot - Die Legende/Überschrift der Radiobuttons.\n */\n@Component({\n\ttag: 'kol-input-radio',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: {\n\t\tdelegatesFocus: true,\n\t},\n})\nexport class KolInputRadio implements InputRadioAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolInputRadioElement;\n\tprivate inputRef?: HTMLInputElement;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.inputRef = ref;\n\t};\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<StencilUnknown> {\n\t\treturn this._value;\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async kolFocus() {\n\t\tthis.inputRef?.focus();\n\t}\n\n\tprivate getFormFieldProps(): FormFieldStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\tcomponent: 'fieldset',\n\t\t\tclass: clsx('kol-form-field--radio'),\n\t\t\tformFieldLabelProps: {\n\t\t\t\tcomponent: 'legend',\n\t\t\t\tclass: 'kol-form-field__label--legend',\n\t\t\t},\n\t\t\tformFieldInputProps: {\n\t\t\t\tclass: `kol-form-field__input--orientation-${this.state._orientation}`,\n\t\t\t},\n\t\t\ttooltipAlign: this._tooltipAlign,\n\t\t\talert: this.showAsAlert(),\n\t\t\thideLabel: false,\n\t\t};\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolFormFieldStateWrapperFc {...this.getFormFieldProps()}>\n\t\t\t\t{this.state._options.map((option, index) => this.renderOption(option, index))}\n\t\t\t</KolFormFieldStateWrapperFc>\n\t\t);\n\t}\n\n\tprivate getOptionProps(option: RadioOption<StencilUnknown>, id: string): FieldControlStateWrapperProps {\n\t\tconst obj: FieldControlStateWrapperProps = {\n\t\t\tstate: this.state,\n\t\t\tid: id,\n\t\t\thint: option.hint,\n\t\t\tlabel: option.label as string,\n\t\t\trequired: false,\n\t\t\tfieldControlLabelProps: {\n\t\t\t\tshowBadge: false,\n\t\t\t},\n\t\t};\n\n\t\tif (option.disabled) {\n\t\t\tobj.disabled = true;\n\t\t}\n\n\t\treturn obj;\n\t}\n\n\tprivate getInputProps(option: RadioOption<StencilUnknown>, id: string, index: number, selected: boolean): InputStateWrapperProps {\n\t\tconst obj: InputStateWrapperProps = {\n\t\t\tstate: this.state,\n\t\t\tid: id,\n\t\t\tref: this.state._value === option.value ? this.catchRef : undefined,\n\t\t\tclass: clsx('kol-input-radio', {\n\t\t\t\t['kol-input-radio--disabled']: Boolean(this.state._disabled || option.disabled),\n\t\t\t}),\n\t\t\t'aria-label': this.state._hideLabel && typeof option.label === 'string' ? option.label : undefined,\n\t\t\ttype: 'radio',\n\t\t\tname: this.state._name || this.state._id,\n\t\t\tvalue: `-${index}`,\n\t\t\tchecked: selected,\n\n\t\t\t...this.controller.onFacade,\n\t\t\tonChange: this.onChange,\n\t\t\tonClick: undefined, // onClick is not needed since onChange already triggers the correct event\n\t\t\tonInput: this.onInput,\n\t\t\tonKeyDown: this.onKeyDown.bind(this),\n\t\t\tonFocus: (event: Event) => {\n\t\t\t\tthis.controller.onFacade.onFocus(event);\n\t\t\t\tthis.inputHasFocus = true;\n\t\t\t},\n\t\t\tonBlur: (event: Event) => {\n\t\t\t\tthis.controller.onFacade.onBlur(event);\n\t\t\t\tthis.inputHasFocus = false;\n\t\t\t},\n\t\t};\n\n\t\tif (option.disabled) {\n\t\t\tobj.disabled = true;\n\t\t}\n\n\t\treturn obj;\n\t}\n\n\tprivate renderOption(option: RadioOption<StencilUnknown>, index: number): JSX.Element {\n\t\tconst customId = `${this.state._id}-${index}`;\n\t\tconst selected = this.state._value === option.value;\n\n\t\treturn (\n\t\t\t<KolFieldControlStateWrapperFc key={customId} {...this.getOptionProps(option, customId)}>\n\t\t\t\t<KolInputStateWrapperFc {...this.getInputProps(option, customId, index, selected)} />\n\t\t\t</KolFieldControlStateWrapperFc>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputRadioController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideMsgPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideMsg?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: Stringified<MsgPropType>;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Options the user can choose from.\n\t */\n\t@Prop() public _options?: RadioOptionsPropType;\n\n\t/**\n\t * Defines whether the orientation of the component is horizontal or vertical.\n\t */\n\t@Prop() public _orientation?: Orientation = 'vertical';\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Adds a visual short key hint to the component.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t * @see Known bug: https://github.com/ionic-team/stencil/issues/3902\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _value: StencilUnknown = null;\n\n\t@State() public state: InputRadioStates = {\n\t\t_hideMsg: false,\n\t\t_id: `id-${nonce()}`,\n\t\t_label: '', // ⚠ required\n\t\t_options: [],\n\t\t_orientation: 'vertical',\n\t};\n\n\t@State() private inputHasFocus = false;\n\n\tpublic constructor() {\n\t\tthis.controller = new InputRadioController(this, 'radio', this.host);\n\t}\n\n\tprivate showAsAlert(): boolean {\n\t\treturn Boolean(this.state._touched) && !this.inputHasFocus;\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_tooltipAlign')\n\tpublic validateTooltipAlign(value?: TooltipAlignPropType): void {\n\t\tthis.controller.validateTooltipAlign(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hideMsg')\n\tpublic validateHideMsg(value?: HideMsgPropType): void {\n\t\tthis.controller.validateHideMsg(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_options')\n\tpublic validateOptions(value?: RadioOptionsPropType): void {\n\t\tthis.controller.validateOptions(value);\n\t}\n\n\t@Watch('_orientation')\n\tpublic validateOrientation(value?: Orientation): void {\n\t\tthis.controller.validateOrientation(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_shortKey')\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tthis.controller.validateShortKey(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value: StencilUnknown): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t}\n\n\tprivate onInput = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tconst option = this.controller.getOptionByKey(event.target.value);\n\t\t\tif (option !== undefined) {\n\t\t\t\tthis.controller.onFacade.onInput(event, true, option.value);\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate onChange = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tconst option = this.controller.getOptionByKey(event.target.value);\n\t\t\tif (option !== undefined) {\n\t\t\t\tthis.controller.onFacade.onChange(event, option.value);\n\n\t\t\t\tthis._value = option.value;\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate readonly onKeyDown = (event: KeyboardEvent) => {\n\t\tif (event.code === 'Enter' || event.code === 'NumpadEnter') {\n\t\t\tpropagateSubmitEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.inputRef,\n\t\t\t});\n\t\t}\n\t};\n}\n"],"version":3}
1
+ {"file":"kol-input-radio.js","mappings":";;;;;;;;;;;;;;AAUA,MAAM,cAAc,GAAmB,CAAC,EAA+B;QAA/B,EAAE,KAAK,EAAE,UAAU,OAAY,EAAP,KAAK,cAA7B,SAA+B,CAAF;IACpE,OAAO,EAACA,OAAU,kBAAC,KAAK,EAAE,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,IAAM,KAAK,IAAE,IAAI,EAAC,OAAO,IAAG,CAAC;AAClG,CAAC,CAAC;AAEF,MAAM,OAAO,GAAmB,CAAC,EAA2C;;QAA3C,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,OAAY,EAAP,KAAK,cAAzC,uBAA2C,CAAF;IACzE,MAAM,OAAO,GAAG,WAAW,CAAC,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC,CAAC;IAElE,MAAM,WAAW,GAAG;QACnB,CAAC,0BAA0B,GAAG,U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gBAAgB,CAAC,KAAwB;QAC/C,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;KACxC;IAGM,2BAA2B,CAAC,KAAmC;QACrE,IAAI,CAAC,UAAU,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC;KACnD;IAGM,eAAe,CAAC,KAAe;QACrC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KACvC;IAGM,aAAa,CAAC,KAAqB;QACzC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;KACrC;IAEM,iBAAiB;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;QACvC,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;KACpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["KolInputFc","KolRadioFc","KolInputRadio","KolFormFieldStateWrapperFc","KolFieldControlStateWrapperFc","KolRadioStateWrapperFc"],"sources":["src/functional-components/inputs/Radio/Radio.tsx","src/functional-component-wrappers/RadioStateWrapper/RadioStateWrapper.tsx","src/components/input-radio/style.scss?tag=kol-input-radio&mode=default&encapsulation=shadow","src/components/input-radio/shadow.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport KolInputFc, { type InputProps } from '../Input';\nimport { checkHasMsg } from '../../../schema';\n\nexport type RadioProps = JSXBase.HTMLAttributes<HTMLLabelElement> & {\n\tinputProps: InputProps;\n};\n\nconst InputWrapperFc: FC<InputProps> = ({ class: classNames, ...other }) => {\n\treturn <KolInputFc class={clsx('kol-input-radio__input', classNames)} {...other} type=\"radio\" />;\n};\n\nconst RadioFc: FC<RadioProps> = ({ class: classNames, inputProps, ...other }) => {\n\tconst showMsg = checkHasMsg(inputProps?.msg, inputProps?.touched);\n\n\tconst cssVariants = {\n\t\t['kol-input-radio--checked']: inputProps?.checked,\n\t\t['kol-input-radio--disabled']: Boolean(inputProps?.disabled),\n\t\t['kol-input-radio--required']: Boolean(inputProps?.required),\n\t\t['kol-input-radio--touched']: Boolean(inputProps?.touched),\n\t\t[`kol-input-radio--${inputProps?.msg?.type || 'error'}`]: Boolean(showMsg),\n\t};\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/label-has-associated-control\n\t\t<label class={clsx('kol-input-radio', cssVariants, classNames)} {...other}>\n\t\t\t<InputWrapperFc {...inputProps} />\n\t\t</label>\n\t);\n};\n\nexport default RadioFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolRadioFc, { type RadioProps } from '../../functional-components/inputs/Radio';\nimport { type InputProps } from '../../functional-components/inputs/Input';\n\nimport { type InputRadioStates, convertMsgToInternMsg } from '../../schema';\nimport { getRenderStates } from '../_helpers/getRenderStates';\n\nexport type RadioStateWrapperProps = Omit<RadioProps, 'inputProps'> & {\n\tstate: InputRadioStates;\n\tinputProps?: Partial<InputProps>;\n};\n\nfunction getRadioProps(state: InputRadioStates, inputProps: Partial<InputProps> = {}): 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\tvalue: state._value as string | number | string[] | undefined,\n\t\taccessKey: state._accessKey,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\t\tariaDescribedBy,\n\t};\n\n\tif ('_required' in state) props.required = state._required;\n\tif ('_touched' in state) props.touched = state._touched;\n\tif ('_msg' in state) props.msg = convertMsgToInternMsg(state._msg);\n\n\treturn { ...props, ...inputProps };\n}\n\nconst RadioStateWrapper: FC<RadioStateWrapperProps> = ({ state, inputProps, ...other }) => {\n\treturn <KolRadioFc inputProps={getRadioProps(state, inputProps)} {...other} />;\n};\n\nexport default RadioStateWrapper;\n","@use '../@shared/mixins' as *;\n@use '../../styles/global' as *;\n@use '../host-display-block' as *;\n@use '../../styles/kol-alert-mixin' as *;\n@use '../../styles/kol-field-control-mixin' as *;\n@use '../../styles/kol-form-field-mixin' as *;\n@use '../../styles/kol-input-container-mixin' as *;\n\n@include kol-alert;\n@include kol-field-control;\n@include kol-form-field;\n@include kol-input-container;\n\n@layer kol-component {\n\t.kol-form-field {\n\t\t--border-width: 2px;\n\t\t--input-size: 1.5em;\n\n\t\t&__label {\n\t\t\tdisplay: contents;\n\t\t}\n\n\t\t&__input {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\n\t\t\t&--orientation-horizontal {\n\t\t\t\tflex-direction: row;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\talign-items: flex-start;\n\t\t\t}\n\t\t}\n\n\t\t&--disabled {\n\t\t\topacity: unset;\n\t\t}\n\t}\n\n\t.kol-input-radio {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t\tcursor: pointer;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\twidth: var(--a11y-min-size);\n\t\theight: var(--a11y-min-size);\n\n\t\t&__input {\n\t\t\tappearance: none;\n\t\t\tborder-width: var(--border-width);\n\t\t\tborder-style: solid;\n\t\t\tborder-radius: 100%;\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\theight: var(--input-size);\n\t\t\tmargin: 0;\n\t\t\tmin-height: var(--input-size);\n\t\t\tmin-width: var(--input-size);\n\t\t\tpadding: 0;\n\t\t\twidth: var(--input-size);\n\n\t\t\t&:before {\n\t\t\t\tborder-radius: 100%;\n\t\t\t\tcontent: '';\n\t\t\t\tmargin: auto;\n\t\t\t\theight: calc(var(--input-size) / 2);\n\t\t\t\twidth: calc(var(--input-size) / 2);\n\t\t\t}\n\n\t\t\t&:checked {\n\t\t\t\t&:before {\n\t\t\t\t\tbackground-color: #000;\n\n\t\t\t\t\t@media (forced-colors: active) {\n\t\t\t\t\t\t/* Give it a visible background in forced colors mode */\n\t\t\t\t\t\tbackground-color: selectedItem !important;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:disabled {\n\t\t\t\topacity: 0.5;\n\t\t\t\tcursor: not-allowed;\n\t\t\t}\n\t\t}\n\n\t\t&--disabled {\n\t\t\tcursor: not-allowed;\n\t\t}\n\t}\n}\n","import type { JSX } from '@stencil/core';\nimport { Component, Element, h, Method, Prop, State, Watch } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type {\n\tFocusableElement,\n\tHideMsgPropType,\n\tIdPropType,\n\tInputRadioAPI,\n\tInputRadioStates,\n\tInputTypeOnDefault,\n\tLabelWithExpertSlotPropType,\n\tMsgPropType,\n\tNamePropType,\n\tOrientation,\n\tRadioOption,\n\tRadioOptionsPropType,\n\tShortKeyPropType,\n\tStencilUnknown,\n\tStringified,\n\tSyncValueBySelectorPropType,\n\tTooltipAlignPropType,\n} from '../../schema';\n\nimport { nonce } from '../../utils/dev.utils';\nimport { InputRadioController } from './controller';\nimport { propagateSubmitEventToForm } from '../form/controller';\n\nimport KolFormFieldStateWrapperFc, { type FormFieldStateWrapperProps } from '../../functional-component-wrappers/FormFieldStateWrapper';\nimport KolFieldControlStateWrapperFc, { type FieldControlStateWrapperProps } from '../../functional-component-wrappers/FieldControlStateWrapper';\nimport KolRadioStateWrapperFc, { type RadioStateWrapperProps } from '../../functional-component-wrappers/RadioStateWrapper';\n\n/**\n * @slot - Die Legende/Überschrift der Radiobuttons.\n */\n@Component({\n\ttag: 'kol-input-radio',\n\tstyleUrls: {\n\t\tdefault: './style.scss',\n\t},\n\tshadow: {\n\t\tdelegatesFocus: true,\n\t},\n})\nexport class KolInputRadio implements InputRadioAPI, FocusableElement {\n\t@Element() private readonly host?: HTMLKolInputRadioElement;\n\tprivate inputRef?: HTMLInputElement;\n\n\tprivate readonly catchRef = (ref?: HTMLInputElement) => {\n\t\tthis.inputRef = ref;\n\t};\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async getValue(): Promise<StencilUnknown> {\n\t\treturn this._value;\n\t}\n\n\t@Method()\n\t// eslint-disable-next-line @typescript-eslint/require-await\n\tpublic async kolFocus() {\n\t\tthis.inputRef?.focus();\n\t}\n\n\tprivate getFormFieldProps(): FormFieldStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\tcomponent: 'fieldset',\n\t\t\tclass: clsx('kol-form-field--radio'),\n\t\t\tformFieldLabelProps: {\n\t\t\t\tcomponent: 'legend',\n\t\t\t\tclass: 'kol-form-field__label--legend',\n\t\t\t},\n\t\t\tformFieldInputProps: {\n\t\t\t\tclass: `kol-form-field__input--orientation-${this.state._orientation}`,\n\t\t\t},\n\t\t\ttooltipAlign: this._tooltipAlign,\n\t\t\talert: this.showAsAlert(),\n\t\t\thideLabel: false,\n\t\t};\n\t}\n\n\tpublic render(): JSX.Element {\n\t\treturn (\n\t\t\t<KolFormFieldStateWrapperFc {...this.getFormFieldProps()}>\n\t\t\t\t{this.state._options.map((option, index) => this.renderOption(option, index))}\n\t\t\t</KolFormFieldStateWrapperFc>\n\t\t);\n\t}\n\n\tprivate getOptionProps(option: RadioOption<StencilUnknown>, id: string): FieldControlStateWrapperProps {\n\t\tconst obj: FieldControlStateWrapperProps = {\n\t\t\tstate: this.state,\n\t\t\tid: id,\n\t\t\thint: option.hint,\n\t\t\tlabel: option.label as string,\n\t\t\trequired: false,\n\t\t\tfieldControlLabelProps: {\n\t\t\t\tshowBadge: false,\n\t\t\t},\n\t\t};\n\n\t\tif (option.disabled) {\n\t\t\tobj.disabled = true;\n\t\t}\n\n\t\treturn obj;\n\t}\n\n\tprivate getInputProps(option: RadioOption<StencilUnknown>, id: string, index: number, selected: boolean): RadioStateWrapperProps {\n\t\treturn {\n\t\t\tstate: this.state,\n\t\t\tinputProps: {\n\t\t\t\tid: id,\n\t\t\t\tref: this.state._value === option.value ? this.catchRef : undefined,\n\t\t\t\t'aria-label': this.state._hideLabel && typeof option.label === 'string' ? option.label : undefined,\n\t\t\t\ttype: 'radio',\n\t\t\t\tname: this.state._name || this.state._id,\n\t\t\t\tvalue: `-${index}`,\n\t\t\t\tchecked: selected,\n\t\t\t\tdisabled: option.disabled,\n\n\t\t\t\t...this.controller.onFacade,\n\t\t\t\tonChange: this.onChange,\n\t\t\t\tonClick: undefined, // onClick is not needed since onChange already triggers the correct event\n\t\t\t\tonInput: this.onInput,\n\t\t\t\tonKeyDown: this.onKeyDown.bind(this),\n\t\t\t\tonFocus: (event: Event) => {\n\t\t\t\t\tthis.controller.onFacade.onFocus(event);\n\t\t\t\t\tthis.inputHasFocus = true;\n\t\t\t\t},\n\t\t\t\tonBlur: (event: Event) => {\n\t\t\t\t\tthis.controller.onFacade.onBlur(event);\n\t\t\t\t\tthis.inputHasFocus = false;\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tprivate renderOption(option: RadioOption<StencilUnknown>, index: number): JSX.Element {\n\t\tconst customId = `${this.state._id}-${index}`;\n\t\tconst selected = this.state._value === option.value;\n\n\t\treturn (\n\t\t\t<KolFieldControlStateWrapperFc key={customId} {...this.getOptionProps(option, customId)}>\n\t\t\t\t<KolRadioStateWrapperFc {...this.getInputProps(option, customId, index, selected)} />\n\t\t\t</KolFieldControlStateWrapperFc>\n\t\t);\n\t}\n\n\tprivate readonly controller: InputRadioController;\n\n\t/**\n\t * Defines which key combination can be used to trigger or focus the interactive element of the component.\n\t */\n\t@Prop() public _accessKey?: string;\n\n\t/**\n\t * Makes the element not focusable and ignore all events.\n\t * @TODO: Change type back to `DisabledPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _disabled?: boolean = false;\n\n\t/**\n\t * Hides the error message but leaves it in the DOM for the input's aria-describedby.\n\t * @TODO: Change type back to `HideMsgPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _hideMsg?: boolean = false;\n\n\t/**\n\t * Hides the caption by default and displays the caption text with a tooltip when the\n\t * interactive element is focused or the mouse is over it.\n\t * @TODO: Change type back to `HideLabelPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _hideLabel?: boolean = false;\n\n\t/**\n\t * Defines the hint text.\n\t */\n\t@Prop() public _hint?: string = '';\n\n\t/**\n\t * Defines the internal ID of the primary component element.\n\t */\n\t@Prop() public _id?: IdPropType;\n\n\t/**\n\t * Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot.\n\t */\n\t@Prop() public _label!: LabelWithExpertSlotPropType;\n\n\t/**\n\t * Defines the properties for a message rendered as Alert component.\n\t */\n\t@Prop() public _msg?: Stringified<MsgPropType>;\n\n\t/**\n\t * Defines the technical name of an input field.\n\t */\n\t@Prop() public _name?: NamePropType;\n\n\t/**\n\t * Gibt die EventCallback-Funktionen für das Input-Event an.\n\t */\n\t@Prop() public _on?: InputTypeOnDefault;\n\n\t/**\n\t * Options the user can choose from.\n\t */\n\t@Prop() public _options?: RadioOptionsPropType;\n\n\t/**\n\t * Defines whether the orientation of the component is horizontal or vertical.\n\t */\n\t@Prop() public _orientation?: Orientation = 'vertical';\n\n\t/**\n\t * Makes the input element required.\n\t * @TODO: Change type back to `RequiredPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop() public _required?: boolean = false;\n\n\t/**\n\t * Adds a visual short key hint to the component.\n\t */\n\t@Prop() public _shortKey?: ShortKeyPropType;\n\n\t/**\n\t * Selector for synchronizing the value with another input element.\n\t * @internal\n\t */\n\t@Prop() public _syncValueBySelector?: SyncValueBySelectorPropType;\n\n\t/**\n\t * Defines where to show the Tooltip preferably: top, right, bottom or left.\n\t */\n\t@Prop() public _tooltipAlign?: TooltipAlignPropType = 'top';\n\n\t/**\n\t * Shows if the input was touched by a user.\n\t * @TODO: Change type back to `TouchedPropType` after Stencil#4663 has been resolved.\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _touched?: boolean = false;\n\n\t/**\n\t * Defines the value of the input.\n\t * @see Known bug: https://github.com/ionic-team/stencil/issues/3902\n\t */\n\t@Prop({ mutable: true, reflect: true }) public _value: StencilUnknown = null;\n\n\t@State() public state: InputRadioStates = {\n\t\t_hideMsg: false,\n\t\t_id: `id-${nonce()}`,\n\t\t_label: '', // ⚠ required\n\t\t_options: [],\n\t\t_orientation: 'vertical',\n\t};\n\n\t@State() private inputHasFocus = false;\n\n\tpublic constructor() {\n\t\tthis.controller = new InputRadioController(this, 'radio', this.host);\n\t}\n\n\tprivate showAsAlert(): boolean {\n\t\treturn Boolean(this.state._touched) && !this.inputHasFocus;\n\t}\n\n\t@Watch('_accessKey')\n\tpublic validateAccessKey(value?: string): void {\n\t\tthis.controller.validateAccessKey(value);\n\t}\n\n\t@Watch('_tooltipAlign')\n\tpublic validateTooltipAlign(value?: TooltipAlignPropType): void {\n\t\tthis.controller.validateTooltipAlign(value);\n\t}\n\n\t@Watch('_disabled')\n\tpublic validateDisabled(value?: boolean): void {\n\t\tthis.controller.validateDisabled(value);\n\t}\n\n\t@Watch('_hideLabel')\n\tpublic validateHideLabel(value?: boolean): void {\n\t\tthis.controller.validateHideLabel(value);\n\t}\n\n\t@Watch('_hideMsg')\n\tpublic validateHideMsg(value?: HideMsgPropType): void {\n\t\tthis.controller.validateHideMsg(value);\n\t}\n\n\t@Watch('_hint')\n\tpublic validateHint(value?: string): void {\n\t\tthis.controller.validateHint(value);\n\t}\n\n\t@Watch('_id')\n\tpublic validateId(value?: string): void {\n\t\tthis.controller.validateId(value);\n\t}\n\n\t@Watch('_label')\n\tpublic validateLabel(value?: LabelWithExpertSlotPropType): void {\n\t\tthis.controller.validateLabel(value);\n\t}\n\n\t@Watch('_msg')\n\tpublic validateMsg(value?: Stringified<MsgPropType>): void {\n\t\tthis.controller.validateMsg(value);\n\t}\n\n\t@Watch('_name')\n\tpublic validateName(value?: string): void {\n\t\tthis.controller.validateName(value);\n\t}\n\n\t@Watch('_on')\n\tpublic validateOn(value?: InputTypeOnDefault): void {\n\t\tthis.controller.validateOn(value);\n\t}\n\n\t@Watch('_options')\n\tpublic validateOptions(value?: RadioOptionsPropType): void {\n\t\tthis.controller.validateOptions(value);\n\t}\n\n\t@Watch('_orientation')\n\tpublic validateOrientation(value?: Orientation): void {\n\t\tthis.controller.validateOrientation(value);\n\t}\n\n\t@Watch('_required')\n\tpublic validateRequired(value?: boolean): void {\n\t\tthis.controller.validateRequired(value);\n\t}\n\n\t@Watch('_shortKey')\n\tpublic validateShortKey(value?: ShortKeyPropType): void {\n\t\tthis.controller.validateShortKey(value);\n\t}\n\n\t@Watch('_syncValueBySelector')\n\tpublic validateSyncValueBySelector(value?: SyncValueBySelectorPropType): void {\n\t\tthis.controller.validateSyncValueBySelector(value);\n\t}\n\n\t@Watch('_touched')\n\tpublic validateTouched(value?: boolean): void {\n\t\tthis.controller.validateTouched(value);\n\t}\n\n\t@Watch('_value')\n\tpublic validateValue(value: StencilUnknown): void {\n\t\tthis.controller.validateValue(value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tthis._touched = this._touched === true;\n\t\tthis.controller.componentWillLoad();\n\t}\n\n\tprivate onInput = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tconst option = this.controller.getOptionByKey(event.target.value);\n\t\t\tif (option !== undefined) {\n\t\t\t\tthis.controller.onFacade.onInput(event, true, option.value);\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate onChange = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tconst option = this.controller.getOptionByKey(event.target.value);\n\t\t\tif (option !== undefined) {\n\t\t\t\tthis.controller.onFacade.onChange(event, option.value);\n\n\t\t\t\tthis._value = option.value;\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate readonly onKeyDown = (event: KeyboardEvent) => {\n\t\tif (event.code === 'Enter' || event.code === 'NumpadEnter') {\n\t\t\tpropagateSubmitEventToForm({\n\t\t\t\tform: this.host,\n\t\t\t\tref: this.inputRef,\n\t\t\t});\n\t\t}\n\t};\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-aceb5633.js";import{c as clsx}from"./clsx-09a06a12.js";import{d as KolIconTag,a as KolButtonWcTag}from"./component-names-799e91e2.js";import{t as translate}from"./i18n-01abf777.js";import{a as BEM_CLASS_ALERT__ICON,b as bem,c as BEM_CLASS_ALERT__CONTENT,d as BEM_CLASS_ALERT__CLOSER}from"./bem-e4c3a2e6.js";import{K as KolHeadingFc}from"./Heading-598a07b9.js";const Icon=({ariaLabel:a,icon:e})=>h(Fragment,null,h("span",{class:"visually-hidden"},a),h(KolIconTag,{class:BEM_CLASS_ALERT__ICON,_label:"",_icons:e})),AlertIcon=({type:a,label:e})=>{switch(a){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:e});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:e});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:e});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:e});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:e})}},KolAlertFc=(a,e)=>{var o,l;const{class:n={},alert:s=!1,hasCloser:i=!1,label:r,level:t=0,type:c="default",variant:d="msg",onAlertTimeout:_,onCloserClick:b}=a,m=__rest(a,["class","alert","hasCloser","label","level","type","variant","onAlertTimeout","onCloserClick"]);s&&((null===(o=navigator.userActivation)||void 0===o?void 0:o.hasBeenActive)&&(null===(l=null===navigator||void 0===navigator?void 0:navigator.vibrate)||void 0===l||l.call(navigator,[100,75,100,75,100])),setTimeout((()=>{null==_||_()}),1e4));const v=bem("kol-alert",{hasCloser:!!i,[`type-${c}`]:!0,[`variant-${d}`]:!0}),g=bem("kol-alert","heading",{[`h${t}`]:!0}),u=Object.assign({class:clsx(n,v),role:s?"error"===c?"alert":"status":void 0},m);return h("div",Object.assign({},u),h("div",{class:"kol-alert__container"},h(AlertIcon,{label:r,type:c}),h("div",{class:"kol-alert__container-content"},r&&h(KolHeadingFc,{class:g,level:t,id:"heading"},r),"msg"===d&&h("span",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":r?"heading":void 0},e)),i&&h(KolButtonWcTag,{class:BEM_CLASS_ALERT__CLOSER,"data-testid":"alert-close-button",_ariaDescription:(null==r?void 0:r.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close-alert"),_on:{onClick:b},_tooltipAlign:"left"})),"card"===d&&h("div",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":r?"heading":void 0},e))};export{KolAlertFc as K};
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-831675d2.js";import{c as clsx}from"./clsx-09a06a12.js";import{d as KolIconTag,a as KolButtonWcTag}from"./component-names-799e91e2.js";import{t as translate}from"./i18n-01abf777.js";import{a as BEM_CLASS_ALERT__ICON,b as bem,c as BEM_CLASS_ALERT__CONTENT,d as BEM_CLASS_ALERT__CLOSER}from"./bem-e4c3a2e6.js";import{K as KolHeadingFc}from"./Heading-9bb68e2c.js";const Icon=({ariaLabel:a,icon:e})=>h(Fragment,null,h("span",{class:"visually-hidden"},a),h(KolIconTag,{class:BEM_CLASS_ALERT__ICON,_label:"",_icons:e})),AlertIcon=({type:a,label:e})=>{switch(a){case"error":return h(Icon,{ariaLabel:translate("kol-error"),icon:"codicon codicon-error",label:e});case"info":return h(Icon,{ariaLabel:translate("kol-info"),icon:"codicon codicon-info",label:e});case"warning":return h(Icon,{ariaLabel:translate("kol-warning"),icon:"codicon codicon-warning",label:e});case"success":return h(Icon,{ariaLabel:translate("kol-success"),icon:"codicon codicon-pass",label:e});default:return h(Icon,{ariaLabel:translate("kol-message"),icon:"codicon codicon-comment",label:e})}},KolAlertFc=(a,e)=>{var o,l;const{class:n={},alert:s=!1,hasCloser:i=!1,label:r,level:t=0,type:c="default",variant:d="msg",onAlertTimeout:_,onCloserClick:b}=a,m=__rest(a,["class","alert","hasCloser","label","level","type","variant","onAlertTimeout","onCloserClick"]);s&&((null===(o=navigator.userActivation)||void 0===o?void 0:o.hasBeenActive)&&(null===(l=null===navigator||void 0===navigator?void 0:navigator.vibrate)||void 0===l||l.call(navigator,[100,75,100,75,100])),setTimeout((()=>{null==_||_()}),1e4));const v=bem("kol-alert",{hasCloser:!!i,[`type-${c}`]:!0,[`variant-${d}`]:!0}),g=bem("kol-alert","heading",{[`h${t}`]:!0}),u=Object.assign({class:clsx(n,v),role:s?"error"===c?"alert":"status":void 0},m);return h("div",Object.assign({},u),h("div",{class:"kol-alert__container"},h(AlertIcon,{label:r,type:c}),h("div",{class:"kol-alert__container-content"},r&&h(KolHeadingFc,{class:g,level:t,id:"heading"},r),"msg"===d&&h("span",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":r?"heading":void 0},e)),i&&h(KolButtonWcTag,{class:BEM_CLASS_ALERT__CLOSER,"data-testid":"alert-close-button",_ariaDescription:(null==r?void 0:r.trim())||"",_hideLabel:!0,_icons:{left:{icon:"codicon codicon-close"}},_label:translate("kol-close-alert"),_on:{onClick:b},_tooltipAlign:"left"})),"card"===d&&h("div",{class:BEM_CLASS_ALERT__CONTENT,"aria-describedby":r?"heading":void 0},e))};export{KolAlertFc as K};
@@ -1 +1 @@
1
- {"file":"Alert-bb061e95.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,KAA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AU,QACV,MAAM,EAAE;oBACP,IAAI,EAAE;wBACL,IAAI,EAAE,uBAAuB;qBAC7B;iBACD,EACD,MAAM,EAAE,SAAS,CAAC,iBAAiB,CAAC,EACpC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,GACnB,CACF,CACI;QACL,OAAO,KAAK,MAAM,KAClB,WAAK,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACnF,QAAQ,CACJ,CACN,CACI,EACL;AACH;;;;","names":[],"sources":["src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { Fragment, type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { AlertType } from '../../schema';\nimport { translate } from '../../i18n';\nimport { BEM_CLASS_ALERT__ICON } from '../Alert/bem';\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class={BEM_CLASS_ALERT__ICON} _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translate('kol-error')} icon=\"codicon codicon-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translate('kol-info')} icon=\"codicon codicon-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translate('kol-warning')} icon=\"codicon codicon-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translate('kol-success')} icon=\"codicon codicon-pass\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translate('kol-message')} icon=\"codicon codicon-comment\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport { type InternalAlertProps } from '../../schema';\nimport AlertIcon from '../AlertIcon';\nimport KolHeadingFc from '../Heading';\nimport { genBemAlert as bem, BEM_CLASS_ALERT__CLOSER, BEM_CLASS_ALERT__CONTENT } from './bem';\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames = {},\n\t\talert = false,\n\t\thasCloser = false,\n\t\tlabel,\n\t\tlevel = 0,\n\t\ttype = 'default',\n\t\tvariant = 'msg',\n\t\tonAlertTimeout,\n\t\tonCloserClick,\n\t\t...other\n\t} = props;\n\n\tif (alert) {\n\t\t/**\n\t\t * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n\t\t * - https://googlechrome.github.io/samples/vibration/\n\t\t * - Ongoing discussion: https://github.com/public-ui/kolibri/issues/7191\n\t\t * @todo Move side-effect out of render-function to avoid multiple incarnations.\n\t\t */\n\t\tif (navigator.userActivation?.hasBeenActive) {\n\t\t\tnavigator?.vibrate?.([100, 75, 100, 75, 100]);\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\t/**\n\t * Define the dynamic BEM class names for the alert component.\n\t */\n\tconst BEM_CLASS_ROOT = bem('kol-alert', {\n\t\thasCloser: !!hasCloser,\n\t\t[`type-${type}`]: true,\n\t\t[`variant-${variant}`]: true,\n\t});\n\tconst BEM_CLASS__HEADING = bem('kol-alert', 'heading', {\n\t\t[`h${level}`]: true,\n\t});\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx(classNames, BEM_CLASS_ROOT),\n\t\trole: alert ? (type === 'error' ? 'alert' : 'status') : undefined,\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div {...rootProps}>\n\t\t\t<div class=\"kol-alert__container\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"kol-alert__container-content\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<KolHeadingFc class={BEM_CLASS__HEADING} level={level} id=\"heading\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</KolHeadingFc>\n\t\t\t\t\t)}\n\t\t\t\t\t{variant === 'msg' && (\n\t\t\t\t\t\t<span class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={BEM_CLASS_ALERT__CLOSER}\n\t\t\t\t\t\tdata-testid=\"alert-close-button\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'codicon codicon-close',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translate('kol-close-alert')}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && (\n\t\t\t\t<div class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"version":3}
1
+ {"file":"Alert-363bad74.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,EAAE,IAAI,EAAC,yBAAyB,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC;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E,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI;YACvC,WAAK,KAAK,EAAC,8BAA8B;gBACvC,KAAK,KACL,EAAC,YAAY,IAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAC,SAAS,IACjE,KAAK,CACQ,CACf;gBACA,OAAO,KAAK,KAAK,KACjB,YAAM,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACpF,QAAQ,CACH,CACP,CACI;YACL,SAAS,KACT,EAAC,cAAc,IACd,KAAK,EAAE,uBAAuB,iBAClB,oBAAoB,EAChC,gBAAgB,EAAE,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAE,KAAI,EAAE,EACrC,UAAU,QACV,MAAM,EAAE;oBACP,IAAI,EAAE;wBACL,IAAI,EAAE,uBAAuB;qBAC7B;iBACD,EACD,MAAM,EAAE,SAAS,CAAC,iBAAiB,CAAC,EACpC,GAAG,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,EAC/B,aAAa,EAAC,MAAM,GACnB,CACF,CACI;QACL,OAAO,KAAK,MAAM,KAClB,WAAK,KAAK,EAAE,wBAAwB,sBAAoB,KAAK,GAAG,SAAS,GAAG,SAAS,IACnF,QAAQ,CACJ,CACN,CACI,EACL;AACH;;;;","names":[],"sources":["src/functional-components/AlertIcon/AlertIcon.tsx","src/functional-components/Alert/Alert.tsx"],"sourcesContent":["import { Fragment, type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport type { AlertType } from '../../schema';\nimport { translate } from '../../i18n';\nimport { BEM_CLASS_ALERT__ICON } from '../Alert/bem';\n\n/**\n * The icon uses a visually-hidden span instead of an aria-label because the Alert might be referenced as content for aria-describedby.\n * In this scenario, Firefox with NVDA does not properly read the aria-label, so the visually-hidden span ensures correct screen reader behavior.\n * @see https://github.com/public-ui/kolibri/issues/7119\n */\nconst Icon: FC<{ ariaLabel: string; icon: string; label?: string }> = ({ ariaLabel, icon }) => {\n\treturn (\n\t\t<>\n\t\t\t<span class=\"visually-hidden\">{ariaLabel}</span>\n\t\t\t<KolIconTag class={BEM_CLASS_ALERT__ICON} _label=\"\" _icons={icon} />\n\t\t</>\n\t);\n};\n\nconst AlertIcon: FC<{ label?: string; type?: AlertType }> = ({ type, label }) => {\n\tswitch (type) {\n\t\tcase 'error':\n\t\t\treturn <Icon ariaLabel={translate('kol-error')} icon=\"codicon codicon-error\" label={label} />;\n\t\tcase 'info':\n\t\t\treturn <Icon ariaLabel={translate('kol-info')} icon=\"codicon codicon-info\" label={label} />;\n\t\tcase 'warning':\n\t\t\treturn <Icon ariaLabel={translate('kol-warning')} icon=\"codicon codicon-warning\" label={label} />;\n\t\tcase 'success':\n\t\t\treturn <Icon ariaLabel={translate('kol-success')} icon=\"codicon codicon-pass\" label={label} />;\n\t\tdefault:\n\t\t\treturn <Icon ariaLabel={translate('kol-message')} icon=\"codicon codicon-comment\" label={label} />;\n\t}\n};\n\nexport default AlertIcon;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { type JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nimport { KolButtonWcTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport { type InternalAlertProps } from '../../schema';\nimport AlertIcon from '../AlertIcon';\nimport KolHeadingFc from '../Heading';\nimport { genBemAlert as bem, BEM_CLASS_ALERT__CLOSER, BEM_CLASS_ALERT__CONTENT } from './bem';\n\nexport type KolAlertFcProps = JSXBase.HTMLAttributes<HTMLDivElement> &\n\tPartial<Omit<InternalAlertProps, 'on'>> & {\n\t\tonCloserClick?: () => void;\n\t\tonAlertTimeout?: () => void;\n\t};\n\nconst KolAlertFc: FC<KolAlertFcProps> = (props, children) => {\n\tconst {\n\t\tclass: classNames = {},\n\t\talert = false,\n\t\thasCloser = false,\n\t\tlabel,\n\t\tlevel = 0,\n\t\ttype = 'default',\n\t\tvariant = 'msg',\n\t\tonAlertTimeout,\n\t\tonCloserClick,\n\t\t...other\n\t} = props;\n\n\tif (alert) {\n\t\t/**\n\t\t * - https://developer.mozilla.org/de/docs/Web/API/Navigator/vibrate\n\t\t * - https://googlechrome.github.io/samples/vibration/\n\t\t * - Ongoing discussion: https://github.com/public-ui/kolibri/issues/7191\n\t\t * @todo Move side-effect out of render-function to avoid multiple incarnations.\n\t\t */\n\t\tif (navigator.userActivation?.hasBeenActive) {\n\t\t\tnavigator?.vibrate?.([100, 75, 100, 75, 100]);\n\t\t}\n\n\t\tsetTimeout(() => {\n\t\t\tonAlertTimeout?.();\n\t\t}, 10000);\n\t}\n\n\t/**\n\t * Define the dynamic BEM class names for the alert component.\n\t */\n\tconst BEM_CLASS_ROOT = bem('kol-alert', {\n\t\thasCloser: !!hasCloser,\n\t\t[`type-${type}`]: true,\n\t\t[`variant-${variant}`]: true,\n\t});\n\tconst BEM_CLASS__HEADING = bem('kol-alert', 'heading', {\n\t\t[`h${level}`]: true,\n\t});\n\n\tconst rootProps: Partial<JSXBase.HTMLAttributes<HTMLDivElement>> = {\n\t\tclass: clsx(classNames, BEM_CLASS_ROOT),\n\t\trole: alert ? (type === 'error' ? 'alert' : 'status') : undefined,\n\t\t...other,\n\t};\n\n\treturn (\n\t\t<div {...rootProps}>\n\t\t\t<div class=\"kol-alert__container\">\n\t\t\t\t<AlertIcon label={label} type={type} />\n\t\t\t\t<div class=\"kol-alert__container-content\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<KolHeadingFc class={BEM_CLASS__HEADING} level={level} id=\"heading\">\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t</KolHeadingFc>\n\t\t\t\t\t)}\n\t\t\t\t\t{variant === 'msg' && (\n\t\t\t\t\t\t<span class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{hasCloser && (\n\t\t\t\t\t<KolButtonWcTag\n\t\t\t\t\t\tclass={BEM_CLASS_ALERT__CLOSER}\n\t\t\t\t\t\tdata-testid=\"alert-close-button\"\n\t\t\t\t\t\t_ariaDescription={label?.trim() || ''}\n\t\t\t\t\t\t_hideLabel\n\t\t\t\t\t\t_icons={{\n\t\t\t\t\t\t\tleft: {\n\t\t\t\t\t\t\t\ticon: 'codicon codicon-close',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t_label={translate('kol-close-alert')}\n\t\t\t\t\t\t_on={{ onClick: onCloserClick }}\n\t\t\t\t\t\t_tooltipAlign=\"left\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{variant === 'card' && (\n\t\t\t\t<div class={BEM_CLASS_ALERT__CONTENT} aria-describedby={label ? 'heading' : undefined}>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default KolAlertFc;\n"],"version":3}
@@ -1,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-aceb5633.js";import{c as clsx}from"./clsx-09a06a12.js";import{a as KolButtonWcTag}from"./component-names-799e91e2.js";import{K as KolHeadingFc}from"./Heading-598a07b9.js";const KolCollapsibleFc=(l,o)=>{const{id:s,class:a,label:e,level:i=1,disabled:n,open:c,onClick:d,HeadingProps:r={},HeadingButtonProps:t={},ContentProps:p={}}=l,b=__rest(l,["id","class","label","level","disabled","open","onClick","HeadingProps","HeadingButtonProps","ContentProps"]),_=c?"remove":"add";return h("div",Object.assign({id:s,class:clsx("collapsible",{"collapsible--disabled":!0===n,"collapsible--open":!0===c},a)},b),h(KolHeadingFc,{ref:null==r?void 0:r.ref,level:i,class:clsx("collapsible__heading",null==r?void 0:r.class)},h(KolButtonWcTag,{class:clsx("collapsible__heading-button",null==t?void 0:t.class),ref:null==t?void 0:t.ref,slot:"expert",_ariaControls:`${s}-control`,_ariaExpanded:c,_disabled:n,_icons:(null==t?void 0:t._icons)||`codicon codicon-${_}`,_label:e,_on:{onClick:d}})),h("div",{class:clsx("collapsible__wrapper",null==p?void 0:p.wrapperClass)},h("div",{class:clsx("collapsible__wrapper-animation",null==p?void 0:p.animationClass)},h("div",{"aria-hidden":!1===c?"true":void 0,class:clsx("collapsible__content",null==p?void 0:p.class),id:`${s}-control`},o))))};export{KolCollapsibleFc as K};
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-831675d2.js";import{c as clsx}from"./clsx-09a06a12.js";import{a as KolButtonWcTag}from"./component-names-799e91e2.js";import{K as KolHeadingFc}from"./Heading-9bb68e2c.js";const KolCollapsibleFc=(l,o)=>{const{id:s,class:a,label:e,level:i=1,disabled:n,open:c,onClick:d,HeadingProps:r={},HeadingButtonProps:t={},ContentProps:p={}}=l,b=__rest(l,["id","class","label","level","disabled","open","onClick","HeadingProps","HeadingButtonProps","ContentProps"]),_=c?"remove":"add";return h("div",Object.assign({id:s,class:clsx("collapsible",{"collapsible--disabled":!0===n,"collapsible--open":!0===c},a)},b),h(KolHeadingFc,{ref:null==r?void 0:r.ref,level:i,class:clsx("collapsible__heading",null==r?void 0:r.class)},h(KolButtonWcTag,{class:clsx("collapsible__heading-button",null==t?void 0:t.class),ref:null==t?void 0:t.ref,slot:"expert",_ariaControls:`${s}-control`,_ariaExpanded:c,_disabled:n,_icons:(null==t?void 0:t._icons)||`codicon codicon-${_}`,_label:e,_on:{onClick:d}})),h("div",{class:clsx("collapsible__wrapper",null==p?void 0:p.wrapperClass)},h("div",{class:clsx("collapsible__wrapper-animation",null==p?void 0:p.animationClass)},h("div",{"aria-hidden":!1===c?"true":void 0,class:clsx("collapsible__content",null==p?void 0:p.class),id:`${s}-control`},o))))};export{KolCollapsibleFc as K};
@@ -1 +1 @@
1
- {"file":"Collapsible-25ebba0d.js","mappings":";;;;;;;;;MAuCM,gBAA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AK,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-957956e1.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,EA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,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-831675d2.js";import{d as KolIconTag}from"./component-names-799e91e2.js";import{t as translate}from"./i18n-01abf777.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 C,CustomSuggestionsOptionsGroupFc as a,CustomSuggestionsOptionFc as b,getRenderStates as g};
@@ -1 +1 @@
1
- {"file":"CustomSuggestionsOptionsGroup-11c15a86.js","mappings":";;;;;;;;MASa,eAAe,GAAG,CAAC,KAK/B;;IAKA,MAAM,cAAc,GAAG,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,MAAK,OAAO,CAAC;IACrD,MAAM,MAAM,GAAG,cAAc,IAAI,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC;IACzD,MAAM,OAAO,GAAG,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAE1E,MAAM,eAAe,GAAa,EAAE,CAAC;IACrC,IAAI,MAAM,KAAK,IAAI,EAAE;QACpB,eAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,QAAQ,CAAC,CAAC;KAC3C;IACD,IAAI,OAAO,KAAK,IAAI,EAAE;QACrB,eAAe,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC;KAC1C;IACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;AAC7C;;MCxBM,yBAAyB,GAAqC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE;IACzF,QACC,cAAQ,QAAQ,EAAC,IAAI,EAAC,KAAK,EAAC,+BAA+B,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ;QAC/F,EAAC,UAAU,IAAC,MAAM,EAAC,+BAA+B,EAAC,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC,GAAI,CAChF,EACR;AACH;;MCFM,yBAAyB,GAA+B,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE;IACxI,QACC,UACC,EAAE,EAAE,UAAU,KAAK,EAAE,EACrB,GAAG,EAAE,IAAI,KAAK,EAAE,EAChB,GAAG,EAAE,GAAG,gBACI,KAAK,EACjB,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAC,QAAQ,mBACE,QAAQ,GAAG,MAAM,GAAG,SAAS,EAC5C,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAC,+BAA+B,EACrC,SAAS,EAAE,SAAS,IAEnB,MAAM,CACH,EACJ;AACH;;MCtBM,+BAA+B,GAA2C,CAAC,EAAE,wBAAwB,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,QAAQ;IACxI,QACC,UACC,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,IAAI,CAAC,sCAAsC,EAAE;YACnD,qDAAqD,EAAE,wBAAwB;SAC/E,CAAC,EACF,SAAS,EAAE,SAAS,IAEnB,QAAQ,CACL,EACJ;AACH;;;;","names":[],"sources":["src/components/input/controller.ts","src/functional-components/CustomSuggestionsToggle/CustomSuggestionsToggle.tsx","src/functional-components/CustomSuggestionsOption/CustomSuggestionsOption.tsx","src/functional-components/CustomSuggestionsOptionsGroup/CustomSuggestionsOptionsGroup.tsx"],"sourcesContent":["import type { MsgPropType, TouchedPropType } from '../../schema';\n\n/**\n * Berechnet in Abhängigkeit des Component-State, wie die\n * aria-describedby-Attributs gesetzt werden sollen.\n *\n * @param state State der Component\n * @returns Render-States\n */\nexport const getRenderStates = (state: {\n\t_msg?: MsgPropType;\n\t_hint?: string;\n\t_id: string;\n\t_touched?: TouchedPropType;\n}): {\n\thasMsg: boolean;\n\thasHint: boolean;\n\tariaDescribedBy: string[];\n} => {\n\tconst isMessageValid = state._msg?._type === 'error';\n\tconst hasMsg = isMessageValid && state._touched === true;\n\tconst hasHint = typeof state._hint === 'string' && state._hint.length > 0;\n\n\tconst ariaDescribedBy: string[] = [];\n\tif (hasMsg === true) {\n\t\tariaDescribedBy.push(`${state._id}-error`);\n\t}\n\tif (hasHint === true) {\n\t\tariaDescribedBy.push(`${state._id}-hint`);\n\t}\n\treturn { hasMsg, hasHint, ariaDescribedBy };\n};\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport { KolIconTag } from '../../core/component-names';\nimport { translate } from '../../i18n';\nimport type { JSXBase } from '@stencil/core/internal';\n\nexport type CustomSuggestionsToggleProps = JSXBase.HTMLAttributes<HTMLButtonElement> & { disabled?: boolean };\n\nconst CustomSuggestionsToggleFc: FC<CustomSuggestionsToggleProps> = ({ onClick, disabled }) => {\n\treturn (\n\t\t<button tabindex=\"-1\" class=\"kol-custom-suggestions-toggle\" onClick={onClick} disabled={disabled}>\n\t\t\t<KolIconTag _icons=\"codicon codicon-triangle-down\" _label={translate('kol-dropdown')} />\n\t\t</button>\n\t);\n};\nexport default CustomSuggestionsToggleFc;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { W3CInputValue } from '../../schema';\n\nexport type CustomSuggestionsProps = JSXBase.HTMLAttributes<HTMLLIElement> & {\n\tindex: number;\n\toption: W3CInputValue;\n\tselected: boolean;\n\tref?: ((elm?: HTMLLIElement | undefined) => void) | undefined;\n};\n\nconst CustomSuggestionsOptionFc: FC<CustomSuggestionsProps> = ({ index, ref, selected, onClick, onMouseOver, onFocus, onKeyDown, option }) => {\n\treturn (\n\t\t<li\n\t\t\tid={`option-${index}`}\n\t\t\tkey={`-${index}`}\n\t\t\tref={ref}\n\t\t\tdata-index={index}\n\t\t\ttabIndex={-1}\n\t\t\trole=\"option\"\n\t\t\taria-selected={selected ? 'true' : undefined}\n\t\t\tonClick={onClick}\n\t\t\tonMouseOver={onMouseOver}\n\t\t\tonFocus={onFocus}\n\t\t\tclass=\"kol-custom-suggestions-option\"\n\t\t\tonKeyDown={onKeyDown}\n\t\t>\n\t\t\t{option}\n\t\t</li>\n\t);\n};\nexport default CustomSuggestionsOptionFc;\n","import { type FunctionalComponent as FC, h } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nexport type CustomSuggestionsOptionsGroupProps = JSXBase.HTMLAttributes<HTMLUListElement> & {\n\tblockSuggestionMouseOver: boolean;\n};\n\nconst CustomSuggestionsOptionsGroupFc: FC<CustomSuggestionsOptionsGroupProps> = ({ blockSuggestionMouseOver, onKeyDown, style }, children) => {\n\treturn (\n\t\t<ul\n\t\t\trole=\"listbox\"\n\t\t\tstyle={style}\n\t\t\tclass={clsx('kol-custom-suggestions-options-group', {\n\t\t\t\t'kol-custom-suggestions-options-group--cursor-hidden': blockSuggestionMouseOver,\n\t\t\t})}\n\t\t\tonKeyDown={onKeyDown}\n\t\t>\n\t\t\t{children}\n\t\t</ul>\n\t);\n};\nexport default CustomSuggestionsOptionsGroupFc;\n"],"version":3}
1
+ {"file":"CustomSuggestionsOptionsGroup-0e2df8f9.js","mappings":";;;;;;;;MASa,eAAe,GAAG,CAAC,KAK/B;;IAKA,MAAM,cAAc,GAAG,CAAA,MAAA,KAAK,CAAC,IAAI,0CAAE,KAAK,MAAK,OAAO,CA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ChB,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-aceb5633.js";import{c as clsx}from"./clsx-09a06a12.js";import{l as showExpertSlot,B as buildBadgeTextString}from"./index-88dea7b1.js";import{b as FormFieldTooltipFc,K as KolFormFieldLabelFc,d as KolFormFieldHintFc,c as checkHasMsg,a as convertMsgToInternMsg}from"./getRenderStates-c9074761.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,B=checkHasMsg(F,_),T=showExpertSlot(s),v=j&&!T&&i,P=buildBadgeTextString(p,g),L=[h(Fragment,null,h(InputContainer,Object.assign({},m),l),v&&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:T,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(B),[`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={accessKey:e._accessKey,shortKey:e._shortKey,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),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-831675d2.js";import{c as clsx}from"./clsx-09a06a12.js";import{l as showExpertSlot,B as buildBadgeTextString}from"./index-88dea7b1.js";import{b as FormFieldTooltipFc,K as KolFormFieldLabelFc,d as KolFormFieldHintFc,c as checkHasMsg,a as convertMsgToInternMsg}from"./getRenderStates-e405825a.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,B=checkHasMsg(F,_),T=showExpertSlot(s),v=j&&!T&&i,P=buildBadgeTextString(p,g),L=[h(Fragment,null,h(InputContainer,Object.assign({},m),l),v&&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:T,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(B),[`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={accessKey:e._accessKey,shortKey:e._shortKey,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),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 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IAAI,CAC7H,EACL;AACH,CAAC;;AC7FD,SAAS,oBAAoB,CAAC,KAAiB;IAC9C,MAAM,KAAK,GAAsB;QAChC,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS;QACzB,EAAE,EAAE,KAAK,CAAC,GAAG;QACb,QAAQ,EAAE,KAAK,CAAC,SAAS;QACzB,GAAG,EAAE,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC;QACtC,IAAI,EAAE,KAAK,CAAC,KAAK;QACjB,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3B,OAAO,EAAE,KAAK,CAAC,QAAQ;KACvB,CAAC;IAEF,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,IAAI,aAAa,IAAI,KAAK,EAAE;QAC3B,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC;KACrC;IAED,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\taccessKey: state._accessKey,\n\t\tshortKey: state._shortKey,\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\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-ee200880.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,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,GAAG,EACH,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,KAElB,KAAK,EADL,KAAK,UACL,KAAK,EAtBH,sSAsBL,CAAQ,CAAC;IAEV,MAAM,WAAW,GAAG,CAAC,YAAY,CAAC;IAClC,MAAM,cAAc,GAAG,CAAC,eAAe,CAAC;IACxC,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,aAAa,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,wBAAwB,GAAG,cAAc,IAAI,CAAC,aAAa,IAAI,SAAS,CAAC;IAC/E,MAAM,SAAS,GAAG,oBAAoB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAE5D,MAAM,UAAU,GAAG;QAClB;YACC,EAAC,cAAc,oBAAK,sBAAsB,GAAG,QAAQ,CAAkB;YACtE,wBAAw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BAAqB,qBAAM,qBAAqB,IAAI,EAAE,KAAG,aAAa,EAAC,mBAAmB,EAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,IAAI,CAC7H,EACL;AACH,CAAC;;AC7FD,SAAS,oBAAoB,CAAC,KAAiB;IAC9C,MAAM,KAAK,GAAsB;QAChC,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS;QACzB,EAAE,EAAE,KAAK,CAAC,GAAG;QACb,QAAQ,EAAE,KAAK,CAAC,SAAS;QACzB,GAAG,EAAE,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC;QACtC,IAAI,EAAE,KAAK,CAAC,KAAK;QACjB,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3B,OAAO,EAAE,KAAK,CAAC,QAAQ;KACvB,CAAC;IAEF,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,IAAI,WAAW,IAAI,KAAK,EAAE;QACzB,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC;KACjC;IAED,IAAI,aAAa,IAAI,KAAK,EAAE;QAC3B,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,WAAW,CAAC;KACrC;IAED,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\taccessKey: state._accessKey,\n\t\tshortKey: state._shortKey,\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\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-aceb5633.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,variant:n}=e,i=__rest(e,["class","level","variant"]);const c=getHeadlineTag(a),r=n||c;return h(c,Object.assign({class:clsx("kol-headline",`kol-headline--${r}`,s)},i),l)},KolSecondaryHeadlineFc=(e,l)=>{var{class:s,level:a=MIN_HEADING_LEVEL}=e,n=__rest(e,["class","level"]);const i=getSubHeadlineTag(a+1);return h(i,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:i={},SecondaryHeadlineProps:c={}}=e,r=__rest(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const o=Object.assign({level:a},r);if(!s)return h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--single")},o),l);const{class:t}=i,d=__rest(i,["class"]),g=Object.assign({class:clsx("kol-heading-group",t)},d);return h("hgroup",Object.assign({},g),h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--group","kol-headline--primary")},o),l),h(KolSecondaryHeadlineFc,Object.assign({level:a},c),s))};export{KolHeadingFc as K};
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h}from"./index-831675d2.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,variant:n}=e,i=__rest(e,["class","level","variant"]);const c=getHeadlineTag(a),r=n||c;return h(c,Object.assign({class:clsx("kol-headline",`kol-headline--${r}`,s)},i),l)},KolSecondaryHeadlineFc=(e,l)=>{var{class:s,level:a=MIN_HEADING_LEVEL}=e,n=__rest(e,["class","level"]);const i=getSubHeadlineTag(a+1);return h(i,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:i={},SecondaryHeadlineProps:c={}}=e,r=__rest(e,["secondaryHeadline","level","class","HeadingGroupProps","SecondaryHeadlineProps"]);const o=Object.assign({level:a},r);if(!s)return h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--single")},o),l);const{class:t}=i,d=__rest(i,["class"]),g=Object.assign({class:clsx("kol-heading-group",t)},d);return h("hgroup",Object.assign({},g),h(KolHeadlineFc,Object.assign({class:clsx(n,"kol-headline--group","kol-headline--primary")},o),l),h(KolSecondaryHeadlineFc,Object.assign({level:a},c),s))};export{KolHeadingFc as K};
@@ -1 +1 @@
1
- {"file":"Heading-598a07b9.js","mappings":";;;;;;;AA2BA,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAW5B,SAAS,mBAAmB,CAAC,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GAAG,EAAE,EAAE,sBAAsB,GAAG,EAAE,OAAY,EAAP,KAAK,cAAhI,sFAAkI,CAAF;IAGhI,MAAM,aAAa,mBAClB,KAAK,IACF,KAAK,CACR,CAAC;IAEF,IAAI,CAAC,iBAAiB,EAAE;QACvB,QACC,EAAC,aAAa,kBAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,sBAAsB,CAAC,IAAM,aAAa,GAC/E,QAAQ,CACM,EACf;KACF;IAED,MAAM,EAAE,KAAK,EAAE,eAAe,KAAqB,iBAAiB,EAAjC,WAAW,UAAK,iBAAiB,EAA9D,SAA0C,CAAoB,CAAC;IACrE,MAAM,kBAAkB,mBACvB,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,IAC9C,WAAW,CACd,CAAC;IAEF,QACC,8BAAY,kBAAkB;QAC7B,EAAC,aAAa,kBAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,qBAAqB,EAAE,uBAAuB,CAAC,IAAM,aAAa,GACvG,QAAQ,CACM;QAChB,EAAC,sBAAsB,kBAAC,KAAK,EAAE,KAAK,IAAM,sBAAsB,GAC9D,iBAAiB,CACM,CACjB,EACR;AACH;;;;","names":[],"sources":["src/functional-components/Heading/Heading.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { HeadingLevel, HeadingVariantPropType } 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\tvariant?: HeadingVariantPropType;\n};\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, variant, ...other }, children) => {\n\tconst HeadlineTag = getHeadlineTag(level);\n\tconst finalVariant = variant || HeadlineTag;\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline', `kol-headline--${finalVariant}`, 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-9bb68e2c.js","mappings":";;;;;;;AA2BA,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAW5B,SA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AU,EAAE,iBAAiB,GAAG,EAAE,EAAE,sBAAsB,GAAG,EAAE,OAAY,EAAP,KAAK,cAAhI,sFAAkI,CAAF;IAGhI,MAAM,aAAa,mBAClB,KAAK,IACF,KAAK,CACR,CAAC;IAEF,IAAI,CAAC,iBAAiB,EAAE;QACvB,QACC,EAAC,aAAa,kBAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,sBAAsB,CAAC,IAAM,aAAa,GAC/E,QAAQ,CACM,EACf;KACF;IAED,MAAM,EAAE,KAAK,EAAE,eAAe,KAAqB,iBAAiB,EAAjC,WAAW,UAAK,iBAAiB,EAA9D,SAA0C,CAAoB,CAAC;IACrE,MAAM,kBAAkB,mBACvB,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,eAAe,CAAC,IAC9C,WAAW,CACd,CAAC;IAEF,QACC,8BAAY,kBAAkB;QAC7B,EAAC,aAAa,kBAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,qBAAqB,EAAE,uBAAuB,CAAC,IAAM,aAAa,GACvG,QAAQ,CACM;QAChB,EAAC,sBAAsB,kBAAC,KAAK,EAAE,KAAK,IAAM,sBAAsB,GAC9D,iBAAiB,CACM,CACjB,EACR;AACH;;;;","names":[],"sources":["src/functional-components/Heading/Heading.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport type { JSXBase } from '@stencil/core/internal';\nimport type { HeadingLevel, HeadingVariantPropType } 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\tvariant?: HeadingVariantPropType;\n};\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, variant, ...other }, children) => {\n\tconst HeadlineTag = getHeadlineTag(level);\n\tconst finalVariant = variant || HeadlineTag;\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline', `kol-headline--${finalVariant}`, classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a secondary headline.\n * @param props - The properties for the secondary headline component.\n * @param children - The children to render inside the secondary headline.\n * @returns A VNode representing the secondary headline.\n */\nconst KolSecondaryHeadlineFc: FC<SecondaryHeadlineProps> = ({ class: classNames, level = MIN_HEADING_LEVEL, ...other }, children) => {\n\tconst HeadlineTag = getSubHeadlineTag(level + 1);\n\n\treturn (\n\t\t<HeadlineTag class={clsx('kol-headline kol-headline--group kol-headline--secondary', classNames)} {...other}>\n\t\t\t{children}\n\t\t</HeadlineTag>\n\t);\n};\n\n/**\n * Functional component for rendering a heading with an optional secondary headline.\n * @param props - The properties for the heading component.\n * @param children - The children to render inside the heading.\n * @returns A VNode representing the heading.\n */\nconst KolHeadingFc: FC<HeadingProps> = (\n\t{ secondaryHeadline, level = MIN_HEADING_LEVEL, class: classNames, HeadingGroupProps = {}, SecondaryHeadlineProps = {}, ...other },\n\tchildren,\n) => {\n\tconst headlineProps: HeadlineProps = {\n\t\tlevel,\n\t\t...other,\n\t};\n\n\tif (!secondaryHeadline) {\n\t\treturn (\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--single')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t);\n\t}\n\n\tconst { class: groupClassNames, ...groupOthers } = HeadingGroupProps;\n\tconst headlineGroupProps: HGroupProps = {\n\t\tclass: clsx('kol-heading-group', groupClassNames),\n\t\t...groupOthers,\n\t};\n\n\treturn (\n\t\t<hgroup {...headlineGroupProps}>\n\t\t\t<KolHeadlineFc class={clsx(classNames, 'kol-headline--group', 'kol-headline--primary')} {...headlineProps}>\n\t\t\t\t{children}\n\t\t\t</KolHeadlineFc>\n\t\t\t<KolSecondaryHeadlineFc level={level} {...SecondaryHeadlineProps}>\n\t\t\t\t{secondaryHeadline}\n\t\t\t</KolSecondaryHeadlineFc>\n\t\t</hgroup>\n\t);\n};\n\nexport default KolHeadingFc;\n"],"version":3}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- import{h}from"./index-aceb5633.js";import{d as KolIconTag}from"./component-names-799e91e2.js";const KolIconFc=o=>{const{class:c,style:n,icons:s,label:l,onClick:e}=o;return h(KolIconTag,{class:c,style:n,onClick:e,_icons:s,_label:l})};export{KolIconFc as K};
4
+ import{h}from"./index-831675d2.js";import{d as KolIconTag}from"./component-names-799e91e2.js";const KolIconFc=o=>{const{class:c,style:n,icons:s,label:l,onClick:e}=o;return h(KolIconTag,{class:c,style:n,onClick:e,_icons:s,_label:l})};export{KolIconFc as K};
@@ -1 +1 @@
1
- {"file":"Icon-0b8e0b26.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-23e91462.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}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{_ as __rest}from"./tslib.es6-1173d062.js";import{h,F as Fragment}from"./index-831675d2.js";import{c as clsx}from"./clsx-09a06a12.js";import"./index-88dea7b1.js";import{e as getDefaultProps,c as checkHasMsg}from"./getRenderStates-e405825a.js";const InputFc=e=>{const{class:s,msg:a,required:l,disabled:t,touched:i,readonly:o,ariaDescribedBy:r,hideLabel:d,label:n,suggestions:u,value:c}=e,p=__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),b=checkHasMsg(a,i),g={"kol-input--disabled":Boolean(t),"kol-input--required":Boolean(l),"kol-input--touched":Boolean(i),"kol-input--readonly":Boolean(o),[`kol-input--${(null==a?void 0:a.type)||"error"}`]:b},m=Object.assign(Object.assign({class:clsx("kol-input",g,s),required:l,disabled:t,readonly:o,type:"text",list:u?`${p.id}-list`:void 0},getDefaultProps({ariaDescribedBy:r,hideLabel:d,label:n})),p);return h(Fragment,null,h("input",Object.assign({},m,{value:c})),u)};export{InputFc as I};
@@ -1 +1 @@
1
- {"file":"Input-56e72e4d.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
+ {"file":"Input-83880d09.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-aceb5633.js";import{I as InputFc}from"./Input-56e72e4d.js";import"./index-88dea7b1.js";import{g as getRenderStates,a as convertMsgToInternMsg}from"./getRenderStates-c9074761.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,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:s};if("_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-831675d2.js";import{I as InputFc}from"./Input-83880d09.js";import"./index-88dea7b1.js";import{g as getRenderStates,a as convertMsgToInternMsg}from"./getRenderStates-e405825a.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,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:s};if("_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-9982ec35.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,CAAC,GAAG;QACb,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3B,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,SAAS,EAAE,KA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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\taccessKey: state._accessKey,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\n\t\tariaDescribedBy: ariaDescribedBy,\n\t};\n\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-ebbf5565.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,e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/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\taccessKey: state._accessKey,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\n\t\tariaDescribedBy: ariaDescribedBy,\n\t};\n\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}
@@ -0,0 +1,4 @@
1
+ /*!
2
+ * KoliBri - The accessible HTML-Standard
3
+ */
4
+ import{i as isArray,a as isObjectLike,b as baseGetTag}from"./isArray-7a60fa7f.js";import{h,F as Fragment}from"./index-831675d2.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};