@public-ui/components 3.0.4-ed0f3af88ca201e0c6c949626c9aeee66f80f44e.0 → 3.0.4-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 (346) hide show
  1. package/custom-elements.json +1 -1
  2. package/dist/cjs/{Alert-CwuuXtSY.js → Alert-Dbez0OWE.js} +1 -1
  3. package/dist/cjs/{Alert-CwuuXtSY.js.map → Alert-Dbez0OWE.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-BUK_Xmkd.js → Collapsible-hyUDyq1p.js} +1 -1
  5. package/dist/cjs/{Collapsible-BUK_Xmkd.js.map → Collapsible-hyUDyq1p.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsToggle-BT8xOvEp.js → CustomSuggestionsToggle-Behvymij.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsToggle-BT8xOvEp.js.map → CustomSuggestionsToggle-Behvymij.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-BNSG4aXe.js → FieldControlStateWrapper-Dyc0LGCc.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-BNSG4aXe.js.map → FieldControlStateWrapper-Dyc0LGCc.js.map} +1 -1
  10. package/dist/cjs/{FormFieldStateWrapper-BEGBlx4c.js → FormFieldStateWrapper-Cwv6XCb_.js} +1 -1
  11. package/dist/cjs/{FormFieldStateWrapper-BEGBlx4c.js.map → FormFieldStateWrapper-Cwv6XCb_.js.map} +1 -1
  12. package/dist/cjs/{Heading-DlbiB1eP.js → Heading-B_FNjVhY.js} +1 -1
  13. package/dist/cjs/{Heading-DlbiB1eP.js.map → Heading-B_FNjVhY.js.map} +1 -1
  14. package/dist/cjs/Icon-Cm3lAgHU.js +4 -0
  15. package/dist/cjs/{Icon-BXx6hmOf.js.map → Icon-Cm3lAgHU.js.map} +1 -1
  16. package/dist/cjs/{Input-D76rkMwb.js → Input-VN0FQkZJ.js} +1 -1
  17. package/dist/cjs/{Input-D76rkMwb.js.map → Input-VN0FQkZJ.js.map} +1 -1
  18. package/dist/cjs/{InputStateWrapper-GSsOojZH.js → InputStateWrapper-CnRGVxks.js} +1 -1
  19. package/dist/cjs/{InputStateWrapper-GSsOojZH.js.map → InputStateWrapper-CnRGVxks.js.map} +1 -1
  20. package/dist/cjs/{InternalUnderlinedBadgeText-BktIt7Dv.js → InternalUnderlinedBadgeText-opHTXEbX.js} +1 -1
  21. package/dist/cjs/{InternalUnderlinedBadgeText-BktIt7Dv.js.map → InternalUnderlinedBadgeText-opHTXEbX.js.map} +1 -1
  22. package/dist/cjs/{Span-R1KVY7GP.js → Span-ElP1RFQ9.js} +1 -1
  23. package/dist/cjs/{Span-R1KVY7GP.js.map → Span-ElP1RFQ9.js.map} +1 -1
  24. package/dist/cjs/{app-globals-D2El5i3Z.js → app-globals-D5OHlvGx.js} +1 -1
  25. package/dist/cjs/{app-globals-D2El5i3Z.js.map → app-globals-D5OHlvGx.js.map} +1 -1
  26. package/dist/cjs/{controller-DBt3tIW4.js → controller-BTkATp4C.js} +1 -1
  27. package/dist/cjs/{controller-DBt3tIW4.js.map → controller-BTkATp4C.js.map} +1 -1
  28. package/dist/cjs/{controller-Dwu6WB8X.js → controller-CjgWW9-a.js} +1 -1
  29. package/dist/cjs/{controller-Dwu6WB8X.js.map → controller-CjgWW9-a.js.map} +1 -1
  30. package/dist/cjs/{controller-LUPyLjfe.js → controller-D0qd9yWT.js} +1 -1
  31. package/dist/cjs/{controller-LUPyLjfe.js.map → controller-D0qd9yWT.js.map} +1 -1
  32. package/dist/cjs/{controller-icon-BoPE_IMC.js → controller-icon-BFVf_6RR.js} +1 -1
  33. package/dist/cjs/{controller-icon-BoPE_IMC.js.map → controller-icon-BFVf_6RR.js.map} +1 -1
  34. package/dist/cjs/{dev.utils-qFfdScN_.js → dev.utils-6X4JLbGB.js} +1 -1
  35. package/dist/cjs/{dev.utils-qFfdScN_.js.map → dev.utils-6X4JLbGB.js.map} +1 -1
  36. package/dist/cjs/{devtools-C4AfIMLp.js → devtools-C5EusrLu.js} +1 -1
  37. package/dist/cjs/{devtools-C4AfIMLp.js.map → devtools-C5EusrLu.js.map} +1 -1
  38. package/dist/cjs/index-CIQC-OQ4.js +4 -0
  39. package/dist/cjs/index-CIQC-OQ4.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-wc.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  56. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  65. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  67. package/dist/cjs/kol-input-radio.cjs.entry.js +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-wc.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  78. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  80. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  87. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-table-stateful.cjs.entry.js.map +1 -1
  91. package/dist/cjs/kol-table-stateful.entry.cjs.js.map +1 -1
  92. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js.map +1 -1
  94. package/dist/cjs/kol-table-stateless-wc.entry.cjs.js.map +1 -1
  95. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-table-stateless.cjs.entry.js.map +1 -1
  97. package/dist/cjs/kol-table-stateless.entry.cjs.js.map +1 -1
  98. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  107. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  108. package/dist/cjs/kolibri.cjs.js +1 -1
  109. package/dist/cjs/loader.cjs.js +1 -1
  110. package/dist/cjs/test-component.cjs.entry.js +1 -1
  111. package/dist/components/kol-table-settings-wc.js +1 -1
  112. package/dist/components/kol-table-stateful.js +1 -1
  113. package/dist/components/kol-table-stateful.js.map +1 -1
  114. package/dist/components/kol-table-stateless-wc.js +1 -1
  115. package/dist/components/kol-table-stateless-wc.js.map +1 -1
  116. package/dist/components/kol-table-stateless.js +1 -1
  117. package/dist/components/kol-table-stateless.js.map +1 -1
  118. package/dist/esm/{Alert-CTk_PNsB.js → Alert-BDx1u40I.js} +1 -1
  119. package/dist/{kolibri/Alert-CTk_PNsB.js.map → esm/Alert-BDx1u40I.js.map} +1 -1
  120. package/dist/esm/{Collapsible-C17ZrcR4.js → Collapsible-BVHowVxs.js} +1 -1
  121. package/dist/esm/{Collapsible-C17ZrcR4.js.map → Collapsible-BVHowVxs.js.map} +1 -1
  122. package/dist/esm/{CustomSuggestionsToggle-DlW7BYA_.js → CustomSuggestionsToggle-B3tvLP2v.js} +1 -1
  123. package/dist/{kolibri/CustomSuggestionsToggle-DlW7BYA_.js.map → esm/CustomSuggestionsToggle-B3tvLP2v.js.map} +1 -1
  124. package/dist/esm/{FieldControlStateWrapper-Bvn5yK_i.js → FieldControlStateWrapper-BpSEIOuI.js} +1 -1
  125. package/dist/{kolibri/FieldControlStateWrapper-Bvn5yK_i.js.map → esm/FieldControlStateWrapper-BpSEIOuI.js.map} +1 -1
  126. package/dist/esm/{FormFieldStateWrapper-j7e0a3Oe.js → FormFieldStateWrapper-BaUJkKkj.js} +1 -1
  127. package/dist/esm/{FormFieldStateWrapper-j7e0a3Oe.js.map → FormFieldStateWrapper-BaUJkKkj.js.map} +1 -1
  128. package/dist/esm/{Heading-CdL171uD.js → Heading-DjO0rS4X.js} +1 -1
  129. package/dist/{kolibri/Heading-CdL171uD.js.map → esm/Heading-DjO0rS4X.js.map} +1 -1
  130. package/dist/esm/{Icon-BFZ6Qv6o.js → Icon-BI4MKvDM.js} +1 -1
  131. package/dist/esm/{Icon-BFZ6Qv6o.js.map → Icon-BI4MKvDM.js.map} +1 -1
  132. package/dist/esm/{Input-DnQOLdqt.js → Input-DgMgOuZb.js} +1 -1
  133. package/dist/{kolibri/Input-DnQOLdqt.js.map → esm/Input-DgMgOuZb.js.map} +1 -1
  134. package/dist/esm/{InputStateWrapper-uyLppe6O.js → InputStateWrapper-BSuXDLge.js} +1 -1
  135. package/dist/{kolibri/InputStateWrapper-uyLppe6O.js.map → esm/InputStateWrapper-BSuXDLge.js.map} +1 -1
  136. package/dist/esm/{InternalUnderlinedBadgeText-BTlxPf6n.js → InternalUnderlinedBadgeText-DlNNod38.js} +1 -1
  137. package/dist/esm/{InternalUnderlinedBadgeText-BTlxPf6n.js.map → InternalUnderlinedBadgeText-DlNNod38.js.map} +1 -1
  138. package/dist/esm/{Span-CLrfUTlO.js → Span-BX5FGBRq.js} +1 -1
  139. package/dist/{kolibri/Span-CLrfUTlO.js.map → esm/Span-BX5FGBRq.js.map} +1 -1
  140. package/dist/esm/{app-globals-Bb7SxAXn.js → app-globals-CUNGBuzr.js} +1 -1
  141. package/dist/esm/{app-globals-Bb7SxAXn.js.map → app-globals-CUNGBuzr.js.map} +1 -1
  142. package/dist/esm/{controller-DiV1ch6R.js → controller-BdbCRmeK.js} +1 -1
  143. package/dist/esm/{controller-DiV1ch6R.js.map → controller-BdbCRmeK.js.map} +1 -1
  144. package/dist/esm/{controller-DwYQijEB.js → controller-CSzEePpT.js} +1 -1
  145. package/dist/{kolibri/controller-DwYQijEB.js.map → esm/controller-CSzEePpT.js.map} +1 -1
  146. package/dist/esm/{controller-Cz0hl43b.js → controller-DPjDdojl.js} +1 -1
  147. package/dist/esm/{controller-Cz0hl43b.js.map → controller-DPjDdojl.js.map} +1 -1
  148. package/dist/esm/{controller-icon-D8NyK7bc.js → controller-icon-BunGMkek.js} +1 -1
  149. package/dist/esm/{controller-icon-D8NyK7bc.js.map → controller-icon-BunGMkek.js.map} +1 -1
  150. package/dist/esm/{dev.utils-B25txGhq.js → dev.utils-DkpEPqJb.js} +1 -1
  151. package/dist/{kolibri/dev.utils-B25txGhq.js.map → esm/dev.utils-DkpEPqJb.js.map} +1 -1
  152. package/dist/esm/{devtools-DiehHGXn.js → devtools-CXclGffW.js} +1 -1
  153. package/dist/{kolibri/devtools-DiehHGXn.js.map → esm/devtools-CXclGffW.js.map} +1 -1
  154. package/dist/esm/index-CuRbHMox.js +4 -0
  155. package/dist/esm/index-CuRbHMox.js.map +1 -0
  156. package/dist/esm/kol-abbr.entry.js +1 -1
  157. package/dist/esm/kol-accordion.entry.js +1 -1
  158. package/dist/esm/kol-alert-wc.entry.js +1 -1
  159. package/dist/esm/kol-alert.entry.js +1 -1
  160. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  161. package/dist/esm/kol-avatar.entry.js +1 -1
  162. package/dist/esm/kol-badge.entry.js +1 -1
  163. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  164. package/dist/esm/kol-button-link.entry.js +1 -1
  165. package/dist/esm/kol-button-wc.entry.js +1 -1
  166. package/dist/esm/kol-button.entry.js +1 -1
  167. package/dist/esm/kol-card-wc.entry.js +1 -1
  168. package/dist/esm/kol-card.entry.js +1 -1
  169. package/dist/esm/kol-combobox.entry.js +1 -1
  170. package/dist/esm/kol-details.entry.js +1 -1
  171. package/dist/esm/kol-drawer.entry.js +1 -1
  172. package/dist/esm/kol-form.entry.js +1 -1
  173. package/dist/esm/kol-heading.entry.js +1 -1
  174. package/dist/esm/kol-icon.entry.js +1 -1
  175. package/dist/esm/kol-image.entry.js +1 -1
  176. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  177. package/dist/esm/kol-input-color.entry.js +1 -1
  178. package/dist/esm/kol-input-date.entry.js +1 -1
  179. package/dist/esm/kol-input-email.entry.js +1 -1
  180. package/dist/esm/kol-input-file.entry.js +1 -1
  181. package/dist/esm/kol-input-number.entry.js +1 -1
  182. package/dist/esm/kol-input-password.entry.js +1 -1
  183. package/dist/esm/kol-input-radio.entry.js +1 -1
  184. package/dist/esm/kol-input-range.entry.js +1 -1
  185. package/dist/esm/kol-input-text.entry.js +1 -1
  186. package/dist/esm/kol-kolibri.entry.js +1 -1
  187. package/dist/esm/kol-link-button.entry.js +1 -1
  188. package/dist/esm/kol-link-wc.entry.js +1 -1
  189. package/dist/esm/kol-link.entry.js +1 -1
  190. package/dist/esm/kol-modal.entry.js +1 -1
  191. package/dist/esm/kol-nav.entry.js +1 -1
  192. package/dist/esm/kol-pagination-wc.entry.js +1 -1
  193. package/dist/esm/kol-pagination.entry.js +1 -1
  194. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  195. package/dist/esm/kol-popover-button.entry.js +1 -1
  196. package/dist/esm/kol-popover-wc.entry.js +1 -1
  197. package/dist/esm/kol-progress.entry.js +1 -1
  198. package/dist/esm/kol-quote.entry.js +1 -1
  199. package/dist/esm/kol-select.entry.js +1 -1
  200. package/dist/esm/kol-single-select.entry.js +1 -1
  201. package/dist/esm/kol-skip-nav.entry.js +1 -1
  202. package/dist/esm/kol-spin.entry.js +1 -1
  203. package/dist/esm/kol-split-button.entry.js +1 -1
  204. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  205. package/dist/esm/kol-table-stateful.entry.js +1 -1
  206. package/dist/esm/kol-table-stateful.entry.js.map +1 -1
  207. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  208. package/dist/esm/kol-table-stateless-wc.entry.js.map +1 -1
  209. package/dist/esm/kol-table-stateless.entry.js +1 -1
  210. package/dist/esm/kol-table-stateless.entry.js.map +1 -1
  211. package/dist/esm/kol-tabs.entry.js +1 -1
  212. package/dist/esm/kol-textarea.entry.js +1 -1
  213. package/dist/esm/kol-toast-container.entry.js +1 -1
  214. package/dist/esm/kol-toolbar.entry.js +1 -1
  215. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  216. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  217. package/dist/esm/kol-tree-item.entry.js +1 -1
  218. package/dist/esm/kol-tree-wc.entry.js +1 -1
  219. package/dist/esm/kol-tree.entry.js +1 -1
  220. package/dist/esm/kol-version.entry.js +1 -1
  221. package/dist/esm/kolibri.js +1 -1
  222. package/dist/esm/loader.js +1 -1
  223. package/dist/esm/test-component.entry.js +1 -1
  224. package/dist/kolibri/{Alert-CTk_PNsB.js → Alert-BDx1u40I.js} +1 -1
  225. package/dist/{esm/Alert-CTk_PNsB.js.map → kolibri/Alert-BDx1u40I.js.map} +1 -1
  226. package/dist/kolibri/Collapsible-BVHowVxs.js +4 -0
  227. package/dist/kolibri/{Collapsible-C17ZrcR4.js.map → Collapsible-BVHowVxs.js.map} +1 -1
  228. package/dist/kolibri/{CustomSuggestionsToggle-DlW7BYA_.js → CustomSuggestionsToggle-B3tvLP2v.js} +1 -1
  229. package/dist/{esm/CustomSuggestionsToggle-DlW7BYA_.js.map → kolibri/CustomSuggestionsToggle-B3tvLP2v.js.map} +1 -1
  230. package/dist/kolibri/{FieldControlStateWrapper-Bvn5yK_i.js → FieldControlStateWrapper-BpSEIOuI.js} +1 -1
  231. package/dist/{esm/FieldControlStateWrapper-Bvn5yK_i.js.map → kolibri/FieldControlStateWrapper-BpSEIOuI.js.map} +1 -1
  232. package/dist/kolibri/{FormFieldStateWrapper-j7e0a3Oe.js → FormFieldStateWrapper-BaUJkKkj.js} +1 -1
  233. package/dist/kolibri/{FormFieldStateWrapper-j7e0a3Oe.js.map → FormFieldStateWrapper-BaUJkKkj.js.map} +1 -1
  234. package/dist/kolibri/{Heading-CdL171uD.js → Heading-DjO0rS4X.js} +1 -1
  235. package/dist/{esm/Heading-CdL171uD.js.map → kolibri/Heading-DjO0rS4X.js.map} +1 -1
  236. package/dist/kolibri/Icon-BI4MKvDM.js +4 -0
  237. package/dist/kolibri/{Icon-BFZ6Qv6o.js.map → Icon-BI4MKvDM.js.map} +1 -1
  238. package/dist/kolibri/Input-DgMgOuZb.js +4 -0
  239. package/dist/{esm/Input-DnQOLdqt.js.map → kolibri/Input-DgMgOuZb.js.map} +1 -1
  240. package/dist/kolibri/{InputStateWrapper-uyLppe6O.js → InputStateWrapper-BSuXDLge.js} +1 -1
  241. package/dist/{esm/InputStateWrapper-uyLppe6O.js.map → kolibri/InputStateWrapper-BSuXDLge.js.map} +1 -1
  242. package/dist/kolibri/InternalUnderlinedBadgeText-DlNNod38.js +4 -0
  243. package/dist/kolibri/{InternalUnderlinedBadgeText-BTlxPf6n.js.map → InternalUnderlinedBadgeText-DlNNod38.js.map} +1 -1
  244. package/dist/kolibri/{Span-CLrfUTlO.js → Span-BX5FGBRq.js} +1 -1
  245. package/dist/{esm/Span-CLrfUTlO.js.map → kolibri/Span-BX5FGBRq.js.map} +1 -1
  246. package/dist/kolibri/app-globals-CUNGBuzr.js +4 -0
  247. package/dist/kolibri/{app-globals-Bb7SxAXn.js.map → app-globals-CUNGBuzr.js.map} +1 -1
  248. package/dist/kolibri/assets/codicons/LICENSE +394 -394
  249. package/dist/kolibri/assets/codicons/LICENSE-CODE +21 -21
  250. package/dist/kolibri/{controller-DiV1ch6R.js → controller-BdbCRmeK.js} +1 -1
  251. package/dist/kolibri/{controller-DiV1ch6R.js.map → controller-BdbCRmeK.js.map} +1 -1
  252. package/dist/kolibri/{controller-DwYQijEB.js → controller-CSzEePpT.js} +1 -1
  253. package/dist/{esm/controller-DwYQijEB.js.map → kolibri/controller-CSzEePpT.js.map} +1 -1
  254. package/dist/kolibri/{controller-Cz0hl43b.js → controller-DPjDdojl.js} +1 -1
  255. package/dist/kolibri/{controller-Cz0hl43b.js.map → controller-DPjDdojl.js.map} +1 -1
  256. package/dist/kolibri/{controller-icon-D8NyK7bc.js → controller-icon-BunGMkek.js} +1 -1
  257. package/dist/kolibri/{controller-icon-D8NyK7bc.js.map → controller-icon-BunGMkek.js.map} +1 -1
  258. package/dist/kolibri/{dev.utils-B25txGhq.js → dev.utils-DkpEPqJb.js} +1 -1
  259. package/dist/{esm/dev.utils-B25txGhq.js.map → kolibri/dev.utils-DkpEPqJb.js.map} +1 -1
  260. package/dist/kolibri/{devtools-DiehHGXn.js → devtools-CXclGffW.js} +1 -1
  261. package/dist/{esm/devtools-DiehHGXn.js.map → kolibri/devtools-CXclGffW.js.map} +1 -1
  262. package/dist/kolibri/{index-BwHVuv1c.js → index-CuRbHMox.js} +1 -1
  263. package/dist/kolibri/index-CuRbHMox.js.map +1 -0
  264. package/dist/kolibri/kol-abbr.entry.js +1 -1
  265. package/dist/kolibri/kol-accordion.entry.js +1 -1
  266. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  267. package/dist/kolibri/kol-alert.entry.js +1 -1
  268. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  269. package/dist/kolibri/kol-avatar.entry.js +1 -1
  270. package/dist/kolibri/kol-badge.entry.js +1 -1
  271. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  272. package/dist/kolibri/kol-button-link.entry.js +1 -1
  273. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  274. package/dist/kolibri/kol-button.entry.js +1 -1
  275. package/dist/kolibri/kol-card-wc.entry.js +1 -1
  276. package/dist/kolibri/kol-card.entry.js +1 -1
  277. package/dist/kolibri/kol-combobox.entry.js +1 -1
  278. package/dist/kolibri/kol-details.entry.js +1 -1
  279. package/dist/kolibri/kol-drawer.entry.js +1 -1
  280. package/dist/kolibri/kol-form.entry.js +1 -1
  281. package/dist/kolibri/kol-heading.entry.js +1 -1
  282. package/dist/kolibri/kol-icon.entry.js +1 -1
  283. package/dist/kolibri/kol-image.entry.js +1 -1
  284. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  285. package/dist/kolibri/kol-input-color.entry.js +1 -1
  286. package/dist/kolibri/kol-input-date.entry.js +1 -1
  287. package/dist/kolibri/kol-input-email.entry.js +1 -1
  288. package/dist/kolibri/kol-input-file.entry.js +1 -1
  289. package/dist/kolibri/kol-input-number.entry.js +1 -1
  290. package/dist/kolibri/kol-input-password.entry.js +1 -1
  291. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  292. package/dist/kolibri/kol-input-range.entry.js +1 -1
  293. package/dist/kolibri/kol-input-text.entry.js +1 -1
  294. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  295. package/dist/kolibri/kol-link-button.entry.js +1 -1
  296. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  297. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  298. package/dist/kolibri/kol-link.entry.js +1 -1
  299. package/dist/kolibri/kol-modal.entry.js +1 -1
  300. package/dist/kolibri/kol-nav.entry.js +1 -1
  301. package/dist/kolibri/kol-pagination-wc.entry.js +1 -1
  302. package/dist/kolibri/kol-pagination.entry.js +1 -1
  303. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  304. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  305. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  306. package/dist/kolibri/kol-progress.entry.js +1 -1
  307. package/dist/kolibri/kol-quote.entry.js +1 -1
  308. package/dist/kolibri/kol-select.entry.js +1 -1
  309. package/dist/kolibri/kol-single-select.entry.js +1 -1
  310. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  311. package/dist/kolibri/kol-spin.entry.js +1 -1
  312. package/dist/kolibri/kol-split-button.entry.js +1 -1
  313. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  314. package/dist/kolibri/kol-table-stateful.entry.esm.js.map +1 -1
  315. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  316. package/dist/kolibri/kol-table-stateful.entry.js.map +1 -1
  317. package/dist/kolibri/kol-table-stateless-wc.entry.esm.js.map +1 -1
  318. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  319. package/dist/kolibri/kol-table-stateless-wc.entry.js.map +1 -1
  320. package/dist/kolibri/kol-table-stateless.entry.esm.js.map +1 -1
  321. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  322. package/dist/kolibri/kol-table-stateless.entry.js.map +1 -1
  323. package/dist/kolibri/kol-tabs.entry.js +1 -1
  324. package/dist/kolibri/kol-textarea.entry.js +1 -1
  325. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  326. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  327. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  328. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  329. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  330. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  331. package/dist/kolibri/kol-tree.entry.js +1 -1
  332. package/dist/kolibri/kol-version.entry.js +1 -1
  333. package/dist/kolibri/kolibri.esm.js +1 -1
  334. package/dist/kolibri/test-component.entry.js +1 -1
  335. package/package.json +1 -1
  336. package/dist/cjs/Icon-BXx6hmOf.js +0 -4
  337. package/dist/cjs/index-BHqiFoBU.js +0 -4
  338. package/dist/cjs/index-BHqiFoBU.js.map +0 -1
  339. package/dist/esm/index-BwHVuv1c.js +0 -4
  340. package/dist/esm/index-BwHVuv1c.js.map +0 -1
  341. package/dist/kolibri/Collapsible-C17ZrcR4.js +0 -4
  342. package/dist/kolibri/Icon-BFZ6Qv6o.js +0 -4
  343. package/dist/kolibri/Input-DnQOLdqt.js +0 -4
  344. package/dist/kolibri/InternalUnderlinedBadgeText-BTlxPf6n.js +0 -4
  345. package/dist/kolibri/app-globals-Bb7SxAXn.js +0 -4
  346. package/dist/kolibri/index-BwHVuv1c.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"InputStateWrapper-GSsOojZH.js","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 other\n * @param customSuggestions - Set to true when a custom implementation for _suggestions is provided. Omits the native datalist.\n */\nfunction getInputProps(state: InputState, other: Partial<InputProps>, customSuggestions?: boolean): InputProps {\n\tconst renderStates = getRenderStates(state);\n\tconst ariaDescribedBy = [...renderStates.ariaDescribedBy, ...(other.ariaDescribedBy ?? [])];\n\n\tconst props: InputProps = {\n\t\tid: state._id,\n\t\thideLabel: state._hideLabel,\n\t\tlabel: state._label,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\t};\n\n\tif ('_accessKey' in state) props.accessKey = state._accessKey;\n\tif ('_type' in state) props.type = state._type;\n\tif ('_value' in state) props.value = state._value as string | number | string[];\n\tif ('_required' in state) props.required = state._required;\n\tif ('_maxLength' in state && '_maxLengthBehavior' in state && state._maxLengthBehavior === 'hard') 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 {\n\t\t...props,\n\t\t...other,\n\t\tariaDescribedBy,\n\t};\n}\n\nconst InputStateWrapper: FC<InputStateWrapperProps> = ({ state, customSuggestions, ...other }) => {\n\treturn <KolInputFc {...getInputProps(state, other, customSuggestions)} />;\n};\n\nexport default InputStateWrapper;\n"],"names":["__rest","h","getRenderStates","convertMsgToInternMsg","KolInputFc"],"mappings":";;;;;;;;;;;AASA,MAAM,aAAa,GAAyB,CAAC,EAA6B,KAAI;QAAjC,EAAE,EAAE,EAAE,WAAW,EAAA,GAAA,EAAY,EAAP,KAAK,GAAAA,cAAA,CAAA,EAAA,EAA3B,qBAA6B,CAAF;IACvE,IAAI,CAAC,WAAW,EAAE;AACjB,QAAA,OAAO,IAAI;;AAGZ,IAAA,QACCC,OAAA,CAAA,UAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EAAU,EAAE,EAAE,CAAG,EAAA,EAAE,CAAO,KAAA,CAAA,EAAA,EAAM,KAAK,CAAA,EACnC,WAAW,CAAC,GAAG,CAAC,CAAC,MAAqB,MACtCA,OAAQ,CAAA,QAAA,EAAA,EAAA,KAAK,EAAE,MAAM,EAAI,CAAA,CACzB,CAAC,CACQ;AAEb;;ACmBA,SAAS,aAAa,CAAC,KAAiB,EAAE,KAA0B,EAAE,iBAA2B,EAAA;;AAChG,IAAA,MAAM,YAAY,GAAGC,qCAAe,CAAC,KAAK,CAAC;AAC3C,IAAA,MAAM,eAAe,GAAG,CAAC,GAAG,YAAY,CAAC,eAAe,EAAE,IAAI,CAAA,EAAA,GAAA,KAAK,CAAC,eAAe,mCAAI,EAAE,CAAC,CAAC;AAE3F,IAAA,MAAM,KAAK,GAAe;QACzB,EAAE,EAAE,KAAK,CAAC,GAAG;QACb,SAAS,EAAE,KAAK,CAAC,UAAU;QAC3B,KAAK,EAAE,KAAK,CAAC,MAAM;QACnB,QAAQ,EAAE,KAAK,CAAC,SAAS;QACzB,IAAI,EAAE,KAAK,CAAC,KAAK;KACjB;IAED,IAAI,YAAY,IAAI,KAAK;AAAE,QAAA,KAAK,CAAC,SAAS,G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ions.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 other\n * @param customSuggestions - Set to true when a custom implementation for _suggestions is provided. Omits the native datalist.\n */\nfunction getInputProps(state: InputState, other: Partial<InputProps>, customSuggestions?: boolean): InputProps {\n\tconst renderStates = getRenderStates(state);\n\tconst ariaDescribedBy = [...renderStates.ariaDescribedBy, ...(other.ariaDescribedBy ?? [])];\n\n\tconst props: InputProps = {\n\t\tid: state._id,\n\t\thideLabel: state._hideLabel,\n\t\tlabel: state._label,\n\t\tdisabled: state._disabled,\n\t\tname: state._name,\n\t};\n\n\tif ('_accessKey' in state) props.accessKey = state._accessKey;\n\tif ('_type' in state) props.type = state._type;\n\tif ('_value' in state) props.value = state._value as string | number | string[];\n\tif ('_required' in state) props.required = state._required;\n\tif ('_maxLength' in state && '_maxLengthBehavior' in state && state._maxLengthBehavior === 'hard') 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 {\n\t\t...props,\n\t\t...other,\n\t\tariaDescribedBy,\n\t};\n}\n\nconst InputStateWrapper: FC<InputStateWrapperProps> = ({ state, customSuggestions, ...other }) => {\n\treturn <KolInputFc {...getInputProps(state, other, customSuggestions)} />;\n};\n\nexport default InputStateWrapper;\n"],"names":["__rest","h","getRenderStates","convertMsgToInternMsg","KolInputFc"],"mappings":";;;;;;;;;;;AASA,MAAM,aAAa,GAAyB,CAA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IACvD,IAAI,MAAM,IAAI,KAAK;QAAE,KAAK,CAAC,GAAG,GAAGC,2CAAqB,CAAC,KAAK,CAAC,IAAI,CAAC;AAElE,IAAA,IAAI,cAAc,IAAI,KAAK,IAAI,CAAC,iBAAiB,EAAE;AAClD,QAAA,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC;QACzF,IAAI,cAAc,EAAE;YACnB,KAAK,CAAC,WAAW,IAAIF,QAAC,aAAa,EAAA,EAAC,EAAE,EAAE,KAAK,CAAC,GAAG,EAAE,WAAW,EAAE,KAAK,CAAC,YAAY,EAAA,CAAI,CAAU;;;AAIlG,IAAA,OAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACI,KAAK,CAAA,EACL,KAAK,CAAA,EAAA,EACR,eAAe,EACd,CAAA;AACH;AAEA,MAAM,iBAAiB,GAA+B,CAAC,EAAsC,KAAI;QAA1C,EAAE,KAAK,EAAE,iBAAiB,EAAA,GAAA,EAAY,EAAP,KAAK,GAAAD,cAAA,CAAA,EAAA,EAApC,8BAAsC,CAAF;AAC1F,IAAA,OAAOC,OAAC,CAAAG,aAAU,EAAK,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAA,CAAI;AAC1E;;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var isObject=require("./isObject-DMA85Fq4.js"),index=require("./index-BHqiFoBU.js"),stringTag="[object String]";function isString(e){return"string"==typeof e||!isObject.isArray(e)&&isObject.isObjectLike(e)&&isObject.baseGetTag(e)==stringTag}const KolInternalUnderlinedBadgeTextFc=({badgeText:e,label:t})=>{const n=e;let[i,...r]=t.split(n);return 0===r.length&&(e=n.toUpperCase(),[i,...r]=t.split(n)),0===r.length&&(e=n.toLowerCase(),[i,...r]=t.split(n)),index.h(index.Fragment,null,i,r.length?index.h(index.Fragment,null,index.h("u",null,e),r.join(n)):null)};exports.KolInternalUnderlinedBadgeTextFc=KolInternalUnderlinedBadgeTextFc,exports.isString=isString;
4
+ "use strict";var isObject=require("./isObject-DMA85Fq4.js"),index=require("./index-CIQC-OQ4.js"),stringTag="[object String]";function isString(e){return"string"==typeof e||!isObject.isArray(e)&&isObject.isObjectLike(e)&&isObject.baseGetTag(e)==stringTag}const KolInternalUnderlinedBadgeTextFc=({badgeText:e,label:t})=>{const n=e;let[i,...r]=t.split(n);return 0===r.length&&(e=n.toUpperCase(),[i,...r]=t.split(n)),0===r.length&&(e=n.toLowerCase(),[i,...r]=t.split(n)),index.h(index.Fragment,null,i,r.length?index.h(index.Fragment,null,index.h("u",null,e),r.join(n)):null)};exports.KolInternalUnderlinedBadgeTextFc=KolInternalUnderlinedBadgeTextFc,exports.isString=isString;
@@ -1 +1 @@
1
- {"version":3,"file":"InternalUnderlinedBadgeText-BktIt7Dv.js","sources":["../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js","src/functional-components/InternalUnderlinedBadgeText/InternalUnderlinedBadgeText.tsx"],"sourcesContent":["import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { BadgeTextPropType } from '../../schema';\n\ntype InternalUnderlinedBadgeTextProps = {\n\tbadgeText: BadgeTextPropType;\n\tlabel: string;\n};\n\nconst KolInternalUnderlinedBadgeTextFc: FC<InternalUnderlinedBadgeTextProps> = ({ badgeText, label }) => {\n\t/* Prefer capitalization as defined in the badge Text, try uppercase/lowercase when there's no match. */\n\tconst badgeTextAsString: string = badgeText;\n\tlet [first, ...rest] = label.split(badgeTextAsString);\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toUpperCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toLowerCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\treturn (\n\t\t<>\n\t\t\t{first}\n\t\t\t{rest.length ? (\n\t\t\t\t<>\n\t\t\t\t\t<u>{badgeText}</u>\n\t\t\t\t\t{rest.join(badgeTextAsString)}\n\t\t\t\t</>\n\t\t\t) : null}\n\t\t</>\n\t);\n};\n\nexport default KolInternalUnderlinedBadgeTextFc;\n"],"names":["isArray","isObjectLike","baseGetTag","h","Fragment"],"mappings":";;;;;;;;AAIA;AACA,IAAI,SAAS,GAAG,iBAAiB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,OAAO,OAAO,KAAK,IAAI,QAAQ;AACjC,KAAK,CAACA,gBAAO,CAAC,KAAK,CAAC,IAAIC,qBAAY,CAAC,KAAK,CAAC,IAAIC,mBAAU,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;AAC9E;;ACnBM,MAAA,gCAAgC,GAAyC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAI;IAEvG,MAAM,iBAAiB,GAAW,SAAS;AAC3C,IAAA,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;AACrD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,QAAA,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE;AAC3C,QAAA,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;;AAElD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,QAAA,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE;AAC3C,QAAA,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;;AAElD,IAAA,QACCC,OAAA,CAAAC,cAAA,EAAA,IAAA;QACE,KAAK;AACL,QAAA,IAAI,CAAC,MAAM,IACXD,OAAA,CAAAC,cAAA,EAAA,IAAA;AACC,YAAAD,OAAA,CAAA,GAAA,EAAA,IAAA,EAAI,SAAS,CAAK;AACjB,YAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAC3B,IACA,IAAI,CACN;AAEL;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"InternalUnderlinedBadgeText-opHTXEbX.js","sources":["../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js","src/functional-components/InternalUnderlinedBadgeText/InternalUnderlinedBadgeText.tsx"],"sourcesContent":["import baseGetTag from './_baseGetTag.js';\nimport isArray from './isArray.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nexport default isString;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { BadgeTextPropType } from '../../schema';\n\ntype InternalUnderlinedBadgeTextProps = {\n\tbadgeText: BadgeTextPropType;\n\tlabel: string;\n};\n\nconst KolInternalUnderlinedBadgeTextFc: FC<InternalUnderlinedBadgeTextProps> = ({ badgeText, label }) => {\n\t/* Prefer capitalization as defined in the badge Text, try uppercase/lowercase when there's no match. */\n\tconst badgeTextAsString: string = badgeText;\n\tlet [first, ...rest] = label.split(badgeTextAsString);\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toUpperCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\tif (rest.length === 0) {\n\t\tbadgeText = badgeTextAsString.toLowerCase();\n\t\t[first, ...rest] = label.split(badgeTextAsString);\n\t}\n\treturn (\n\t\t<>\n\t\t\t{first}\n\t\t\t{rest.length ? (\n\t\t\t\t<>\n\t\t\t\t\t<u>{badgeText}</u>\n\t\t\t\t\t{rest.join(badgeTextAsString)}\n\t\t\t\t</>\n\t\t\t) : null}\n\t\t</>\n\t);\n};\n\nexport default KolInternalUnderlinedBadgeTextFc;\n"],"names":["isArray","isObjectLike","baseGetTag","h","Fragment"],"mappings":";;;;;;;;AAIA;AACA,IAAI,SAAS,GAAG,iBAAiB;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,QAAQ,CAAC,KAAK,EAAE;AACzB,EAAE,OAAO,OAAO,KAAK,IAAI,QAAQ;AACjC,KAAK,CAACA,gBAAO,CAAC,KAAK,CAAC,IAAIC,qBAAY,CAAC,KAAK,CAAC,IAAIC,mBAAU,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;AAC9E;;ACnBM,MAAA,gCAAgC,GAAyC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,KAAI;IAEvG,MAAM,iBAAiB,GAAW,SAAS;AAC3C,IAAA,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;AACrD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,QAAA,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE;AAC3C,QAAA,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;;AAElD,IAAA,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,QAAA,SAAS,GAAG,iBAAiB,CAAC,WAAW,EAAE;AAC3C,QAAA,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC;;AAElD,IAAA,QACCC,OAAA,CAAAC,cAAA,EAAA,IAAA;QACE,KAAK;AACL,QAAA,IAAI,CAAC,MAAM,IACXD,OAAA,CAAAC,cAAA,EAAA,IAAA;AACC,YAAAD,OAAA,CAAA,GAAA,EAAA,IAAA,EAAI,SAAS,CAAK;AACjB,YAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAC3B,IACA,IAAI,CACN;AAEL;;;;;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var Heading=require("./Heading-DlbiB1eP.js"),index=require("./index-BHqiFoBU.js"),clsx=require("./clsx-CkZlkaek.js"),Icon=require("./Icon-BXx6hmOf.js"),common=require("./common-BHv-S8J5.js"),markdown=require("./markdown-CQWmbUr2.js"),InternalUnderlinedBadgeText=require("./InternalUnderlinedBadgeText-BktIt7Dv.js"),isObject=require("./isObject-DMA85Fq4.js");const IconHelper=e=>{const{class:l,style:n,label:a,icon:s}=e;return index.h(Icon.KolIconFc,{class:clsx.clsx("icon",l),style:n,label:a||"",icons:s})},LabelHelper=({label:e,hideLabel:l,allowMarkdown:n,badgeText:a})=>{if(l||!InternalUnderlinedBadgeText.isString(e))return null;const s="kol-span__label";return n?index.h("span",{class:clsx.clsx(s,"md"),innerHTML:markdown.md(e)}):a?index.h("span",{class:clsx.clsx(s)},index.h(InternalUnderlinedBadgeText.KolInternalUnderlinedBadgeTextFc,{label:e,badgeText:a})):index.h("span",{class:clsx.clsx(s)},e)},KolSpanCoreHelperFc=({hideLabel:e,label:l,badgeText:n,allowMarkdown:a},s)=>{const i=!common.showExpertSlot(l);return index.h(index.Fragment,null,i&&index.h(LabelHelper,{label:l,hideLabel:e,badgeText:n,allowMarkdown:a}),index.h("span",{"aria-hidden":i?"true":void 0,class:"kol-span__label",hidden:i},s),InternalUnderlinedBadgeText.isString(n)&&n.length>0&&index.h("kbd",{class:"badge-text-hint","aria-hidden":"true"},n))},KolSpanFc=(e,l)=>{const{class:n,label:a,hideLabel:s=!1,badgeText:i,allowMarkdown:t,icons:r}=e,d=Heading.__rest(e,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let c=null,o=null,b=null,x=null;return isObject.isObject(r)?(c=r.top,o=r.left,b=r.right,x=r.bottom):InternalUnderlinedBadgeText.isString(r)&&(o={icon:r}),index.h("span",Object.assign({class:clsx.clsx("kol-span",{"kol-span--hide-label":s},n)},d),isObject.isObject(c)&&index.h(IconHelper,Object.assign({class:"top"},c)),index.h("span",{class:"kol-span__container"},isObject.isObject(o)&&index.h(IconHelper,Object.assign({class:"left"},o)),index.h(KolSpanCoreHelperFc,{label:a,hideLabel:s,allowMarkdown:t,badgeText:i},l),isObject.isObject(b)&&index.h(IconHelper,Object.assign({class:"right"},b))),isObject.isObject(x)&&index.h(IconHelper,Object.assign({class:"bottom"},x)))};exports.KolSpanFc=KolSpanFc;
4
+ "use strict";var Heading=require("./Heading-B_FNjVhY.js"),index=require("./index-CIQC-OQ4.js"),clsx=require("./clsx-CkZlkaek.js"),Icon=require("./Icon-Cm3lAgHU.js"),common=require("./common-BHv-S8J5.js"),markdown=require("./markdown-CQWmbUr2.js"),InternalUnderlinedBadgeText=require("./InternalUnderlinedBadgeText-opHTXEbX.js"),isObject=require("./isObject-DMA85Fq4.js");const IconHelper=e=>{const{class:l,style:n,label:a,icon:s}=e;return index.h(Icon.KolIconFc,{class:clsx.clsx("icon",l),style:n,label:a||"",icons:s})},LabelHelper=({label:e,hideLabel:l,allowMarkdown:n,badgeText:a})=>{if(l||!InternalUnderlinedBadgeText.isString(e))return null;const s="kol-span__label";return n?index.h("span",{class:clsx.clsx(s,"md"),innerHTML:markdown.md(e)}):a?index.h("span",{class:clsx.clsx(s)},index.h(InternalUnderlinedBadgeText.KolInternalUnderlinedBadgeTextFc,{label:e,badgeText:a})):index.h("span",{class:clsx.clsx(s)},e)},KolSpanCoreHelperFc=({hideLabel:e,label:l,badgeText:n,allowMarkdown:a},s)=>{const i=!common.showExpertSlot(l);return index.h(index.Fragment,null,i&&index.h(LabelHelper,{label:l,hideLabel:e,badgeText:n,allowMarkdown:a}),index.h("span",{"aria-hidden":i?"true":void 0,class:"kol-span__label",hidden:i},s),InternalUnderlinedBadgeText.isString(n)&&n.length>0&&index.h("kbd",{class:"badge-text-hint","aria-hidden":"true"},n))},KolSpanFc=(e,l)=>{const{class:n,label:a,hideLabel:s=!1,badgeText:i,allowMarkdown:r,icons:t}=e,d=Heading.__rest(e,["class","label","hideLabel","badgeText","allowMarkdown","icons"]);let c=null,o=null,b=null,x=null;return isObject.isObject(t)?(c=t.top,o=t.left,b=t.right,x=t.bottom):InternalUnderlinedBadgeText.isString(t)&&(o={icon:t}),index.h("span",Object.assign({class:clsx.clsx("kol-span",{"kol-span--hide-label":s},n)},d),isObject.isObject(c)&&index.h(IconHelper,Object.assign({class:"top"},c)),index.h("span",{class:"kol-span__container"},isObject.isObject(o)&&index.h(IconHelper,Object.assign({class:"left"},o)),index.h(KolSpanCoreHelperFc,{label:a,hideLabel:s,allowMarkdown:r,badgeText:i},l),isObject.isObject(b)&&index.h(IconHelper,Object.assign({class:"right"},b))),isObject.isObject(x)&&index.h(IconHelper,Object.assign({class:"bottom"},x)))};exports.KolSpanFc=KolSpanFc;
@@ -1 +1 @@
1
- {"version":3,"file":"Span-R1KVY7GP.js","sources":["src/functional-components/Span/IconHelper.tsx","src/functional-components/Span/LabelHelper.tsx","src/functional-components/Span/SpanCoreHelper.tsx","src/functional-components/Span/Span.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type { KoliBriCustomIcon } from '../../schema';\nimport KolIconFc from '../Icon';\n\nconst IconHelper: FC<KoliBriCustomIcon & { class?: string }> = (props) => {\n\tconst { class: classNames, style, label, icon } = props;\n\n\treturn <KolIconFc class={clsx('icon', classNames)} style={style} label={label || ''} icons={icon} />;\n};\n\nexport default IconHelper;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport { isString } from 'lodash-es';\n\nimport { md } from '../../utils/markdown';\nimport KolInternalUnderlinedBadgeTextFc from '../InternalUnderlinedBadgeText';\n\nconst LabelHelper: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = ({\n\tlabel,\n\thideLabel,\n\tallowMarkdown,\n\tbadgeText,\n}) => {\n\tif (hideLabel || !isString(label)) {\n\t\treturn null;\n\t}\n\n\tconst defaultClasses = 'kol-span__label';\n\n\tif (allowMarkdown) {\n\t\treturn <span class={clsx(defaultClasses, 'md')} innerHTML={md(label)} />;\n\t}\n\n\tif (badgeText) {\n\t\treturn (\n\t\t\t<span class={clsx(defaultClasses)}>\n\t\t\t\t<KolInternalUnderlinedBadgeTextFc label={label} badgeText={badgeText} />\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn <span class={clsx(defaultClasses)}>{label}</span>;\n};\n\nexport default LabelHelper;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport { isString } from 'lodash-es';\n\nimport { showExpertSlot } from '../../schema';\nimport LabelHelper from './LabelHelper';\n\nconst KolSpanCoreHelperFc: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = (\n\t{ hideLabel, label, badgeText, allowMarkdown },\n\tchildren,\n) => {\n\tconst hideExpertSlot = !showExpertSlot(label);\n\n\treturn (\n\t\t<>\n\t\t\t{hideExpertSlot && <LabelHelper label={label} hideLabel={hideLabel} badgeText={badgeText} allowMarkdown={allowMarkdown} />}\n\t\t\t<span aria-hidden={hideExpertSlot ? 'true' : undefined} class=\"kol-span__label\" hidden={hideExpertSlot}>\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t{isString(badgeText) && badgeText.length > 0 && (\n\t\t\t\t<kbd class=\"badge-text-hint\" aria-hidden=\"true\">\n\t\t\t\t\t{badgeText}\n\t\t\t\t</kbd>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport default KolSpanCoreHelperFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { isString, isObject } from 'lodash-es';\n\nimport { type BadgeTextPropType, type HideLabelPropType, type IconOrIconClass, type KoliBriIconsProp, type LabelWithExpertSlotPropType } from '../../schema';\n\nimport IconHelper from './IconHelper';\nimport SpanCoreHelper from './SpanCoreHelper';\n\ntype IconType = IconOrIconClass | undefined | null;\n\nexport type SpanProps = JSXBase.HTMLAttributes<HTMLSpanElement> & {\n\tlabel: LabelWithExpertSlotPropType;\n\tbadgeText?: BadgeTextPropType;\n\tallowMarkdown?: boolean;\n\ticons?: KoliBriIconsProp;\n\thideLabel?: HideLabelPropType;\n};\n\nconst KolSpanFc: FC<SpanProps> = (props, children) => {\n\tconst { class: classNames, label, hideLabel = false, badgeText, allowMarkdown, icons, ...other } = props;\n\tlet topIconProps: IconType = null;\n\tlet leftIconProps: IconType = null;\n\tlet rightIconProps: IconType = null;\n\tlet bottomIconProps: IconType = null;\n\n\tif (isObject(icons)) {\n\t\ttopIconProps = icons.top;\n\t\tleftIconProps = icons.left;\n\t\trightIconProps = icons.right;\n\t\tbottomIconProps = icons.bottom;\n\t} else if (isString(icons)) {\n\t\tleftIconProps = {\n\t\t\ticon: icons,\n\t\t};\n\t}\n\n\treturn (\n\t\t<span class={clsx('kol-span', { 'kol-span--hide-label': hideLabel }, classNames)} {...other}>\n\t\t\t{isObject(topIconProps) && <IconHelper class=\"top\" {...topIconProps} />}\n\t\t\t<span class=\"kol-span__container\">\n\t\t\t\t{isObject(leftIconProps) && <IconHelper class=\"left\" {...leftIconProps} />}\n\t\t\t\t<SpanCoreHelper label={label} hideLabel={hideLabel} allowMarkdown={allowMarkdown} badgeText={badgeText}>\n\t\t\t\t\t{children}\n\t\t\t\t</SpanCoreHelper>\n\t\t\t\t{isObject(rightIconProps) && <IconHelper class=\"right\" {...rightIconProps} />}\n\t\t\t</span>\n\t\t\t{isObject(bottomIconProps) && <IconHelper class=\"bottom\" {...bottomIconProps} />}\n\t\t</span>\n\t);\n};\n\nexport default KolSpanFc;\n"],"names":["h","KolIconFc","clsx","isString","md","KolInternalUnderlinedBadgeTextFc","showExpertSlot","Fragment","__rest","isObject","SpanCoreHelper"],"mappings":";;;;;;;;;;;;;;AAMA,MAAM,UAAU,GAA+C,CAAC,KAAK,KAAI;AACxE,IAAA,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK;IAEvD,OAAOA,OAAA,CAACC,cAAS,EAAA,EAAC,KAAK,EAAEC,SAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAA,CAAI;AACrG,CAAC;;ACHD,MAAM,WAAW,GAAsH,CAAC,EACvI,KAAK,EACL,SAAS,EACT,aAAa,EACb,SAAS,GACT,KAAI;IACJ,IAAI,SAAS,IAAI,CAACC,oCAAQ,CAAC,KAAK,CAA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Aa,CAAC,IAAIT,OAAC,CAAA,UAAU,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAC,MAAM,EAAK,EAAA,aAAa,CAAI,CAAA;AAC1E,YAAAA,OAAA,CAACU,mBAAc,EAAC,EAAA,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAA,EACpG,QAAQ,CACO;AAChB,YAAAD,iBAAQ,CAAC,cAAc,CAAC,IAAIT,OAAC,CAAA,UAAU,EAAC,MAAA,CAAA,MAAA,CAAA,EAAA,KAAK,EAAC,OAAO,EAAK,EAAA,cAAc,EAAI,CACvE;AACN,QAAAS,iBAAQ,CAAC,eAAe,CAAC,IAAIT,QAAC,UAAU,EAAA,MAAA,CAAA,MAAA,CAAA,EAAC,KAAK,EAAC,QAAQ,EAAK,EAAA,eAAe,CAAI,CAAA,CAC1E;AAET;;;;"}
1
+ {"version":3,"file":"Span-ElP1RFQ9.js","sources":["src/functional-components/Span/IconHelper.tsx","src/functional-components/Span/LabelHelper.tsx","src/functional-components/Span/SpanCoreHelper.tsx","src/functional-components/Span/Span.tsx"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\n\nimport type { KoliBriCustomIcon } from '../../schema';\nimport KolIconFc from '../Icon';\n\nconst IconHelper: FC<KoliBriCustomIcon & { class?: string }> = (props) => {\n\tconst { class: classNames, style, label, icon } = props;\n\n\treturn <KolIconFc class={clsx('icon', classNames)} style={style} label={label || ''} icons={icon} />;\n};\n\nexport default IconHelper;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport { isString } from 'lodash-es';\n\nimport { md } from '../../utils/markdown';\nimport KolInternalUnderlinedBadgeTextFc from '../InternalUnderlinedBadgeText';\n\nconst LabelHelper: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = ({\n\tlabel,\n\thideLabel,\n\tallowMarkdown,\n\tbadgeText,\n}) => {\n\tif (hideLabel || !isString(label)) {\n\t\treturn null;\n\t}\n\n\tconst defaultClasses = 'kol-span__label';\n\n\tif (allowMarkdown) {\n\t\treturn <span class={clsx(defaultClasses, 'md')} innerHTML={md(label)} />;\n\t}\n\n\tif (badgeText) {\n\t\treturn (\n\t\t\t<span class={clsx(defaultClasses)}>\n\t\t\t\t<KolInternalUnderlinedBadgeTextFc label={label} badgeText={badgeText} />\n\t\t\t</span>\n\t\t);\n\t}\n\n\treturn <span class={clsx(defaultClasses)}>{label}</span>;\n};\n\nexport default LabelHelper;\n","import { Fragment, h, type FunctionalComponent as FC } from '@stencil/core';\nimport { isString } from 'lodash-es';\n\nimport { showExpertSlot } from '../../schema';\nimport LabelHelper from './LabelHelper';\n\nconst KolSpanCoreHelperFc: FC<{ label: string; hideLabel?: boolean; badgeText?: string; hideExpertSlot?: boolean; allowMarkdown?: boolean }> = (\n\t{ hideLabel, label, badgeText, allowMarkdown },\n\tchildren,\n) => {\n\tconst hideExpertSlot = !showExpertSlot(label);\n\n\treturn (\n\t\t<>\n\t\t\t{hideExpertSlot && <LabelHelper label={label} hideLabel={hideLabel} badgeText={badgeText} allowMarkdown={allowMarkdown} />}\n\t\t\t<span aria-hidden={hideExpertSlot ? 'true' : undefined} class=\"kol-span__label\" hidden={hideExpertSlot}>\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t{isString(badgeText) && badgeText.length > 0 && (\n\t\t\t\t<kbd class=\"badge-text-hint\" aria-hidden=\"true\">\n\t\t\t\t\t{badgeText}\n\t\t\t\t</kbd>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport default KolSpanCoreHelperFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\nimport { isString, isObject } from 'lodash-es';\n\nimport { type BadgeTextPropType, type HideLabelPropType, type IconOrIconClass, type KoliBriIconsProp, type LabelWithExpertSlotPropType } from '../../schema';\n\nimport IconHelper from './IconHelper';\nimport SpanCoreHelper from './SpanCoreHelper';\n\ntype IconType = IconOrIconClass | undefined | null;\n\nexport type SpanProps = JSXBase.HTMLAttributes<HTMLSpanElement> & {\n\tlabel: LabelWithExpertSlotPropType;\n\tbadgeText?: BadgeTextPropType;\n\tallowMarkdown?: boolean;\n\ticons?: KoliBriIconsProp;\n\thideLabel?: HideLabelPropType;\n};\n\nconst KolSpanFc: FC<SpanProps> = (props, children) => {\n\tconst { class: classNames, label, hideLabel = false, badgeText, allowMarkdown, icons, ...other } = props;\n\tlet topIconProps: IconType = null;\n\tlet leftIconProps: IconType = null;\n\tlet rightIconProps: IconType = null;\n\tlet bottomIconProps: IconType = null;\n\n\tif (isObject(icons)) {\n\t\ttopIconProps = icons.top;\n\t\tleftIconProps = icons.left;\n\t\trightIconProps = icons.right;\n\t\tbottomIconProps = icons.bottom;\n\t} else if (isString(icons)) {\n\t\tleftIconProps = {\n\t\t\ticon: icons,\n\t\t};\n\t}\n\n\treturn (\n\t\t<span class={clsx('kol-span', { 'kol-span--hide-label': hideLabel }, classNames)} {...other}>\n\t\t\t{isObject(topIconProps) && <IconHelper class=\"top\" {...topIconProps} />}\n\t\t\t<span class=\"kol-span__container\">\n\t\t\t\t{isObject(leftIconProps) && <IconHelper class=\"left\" {...leftIconProps} />}\n\t\t\t\t<SpanCoreHelper label={label} hideLabel={hideLabel} allowMarkdown={allowMarkdown} badgeText={badgeText}>\n\t\t\t\t\t{children}\n\t\t\t\t</SpanCoreHelper>\n\t\t\t\t{isObject(rightIconProps) && <IconHelper class=\"right\" {...rightIconProps} />}\n\t\t\t</span>\n\t\t\t{isObject(bottomIconProps) && <IconHelper class=\"bottom\" {...bottomIconProps} />}\n\t\t</span>\n\t);\n};\n\nexport default KolSpanFc;\n"],"names":["h","KolIconFc","clsx","isString","md","KolInternalUnderlinedBadgeTextFc","showExpertSlot","Fragment","__rest","isObject","SpanCoreHelper"],"mappings":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setMode((o=>{try{o.shadowRoot instanceof ShadowRoot&&common.ne(o,common.b(o))}catch(o){}return"default"})),Promise.resolve().then((function(){return require("./devtools-C4AfIMLp.js")})).then((o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()})).catch((o=>{common.Log.error(o)}))};const globalScripts=appGlobalScript;exports.globalScripts=globalScripts;
4
+ "use strict";var common=require("./common-BHv-S8J5.js"),index=require("./index-CIQC-OQ4.js"),appGlobalScript=()=>{index.setMode((o=>{try{o.shadowRoot instanceof ShadowRoot&&common.ne(o,common.b(o))}catch(o){}return"default"})),Promise.resolve().then((function(){return require("./devtools-C5EusrLu.js")})).then((o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()})).catch((o=>{common.Log.error(o)}))};const globalScripts=appGlobalScript;exports.globalScripts=globalScripts;
@@ -1 +1 @@
1
- {"version":3,"file":"app-globals-D2El5i3Z.js","sources":["src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from 'adopted-style-sheets';\n\nimport { Log } from '../schema';\nimport { setMode } from '@stencil/core';\n\nexport default () => {\n\tsetMode((elm) => {\n\t\ttry {\n\t\t\tif (elm.shadowRoot instanceof ShadowRoot) {\n\t\t\t\tsetThemeStyle(elm, getThemeDetails(elm));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t/**\n\t\t\t * Try is needed for SSR.\n\t\t\t * - no HTMLElement is available\n\t\t\t * - no ShadowRoot is available\n\t\t\t */\n\t\t}\n\t\treturn 'default';\n\t});\n\n\timport('./devtools')\n\t\t.then((devTools) => {\n\t\t\tif (typeof devTools === 'object' && devTools !== null && typeof devTools.initialize === 'function') {\n\t\t\t\tdevTools.initialize();\n\t\t\t}\n\t\t})\n\t\t.catch((error) => {\n\t\t\tLog.error(error);\n\t\t});\n};\n","import appGlobalScript from '/home/runner/work/kolibri/kolibri/packages/components/src/global/script.ts';\nexport const globalScripts = appGlobalScript;\nexport const globalStyles = \"\";\n"],"names":["setMode","setThemeStyle","getThemeDetails","Log"],"mappings":";;;;;;;;AAKA,sBAAe,MAAK;AACnB,IAAAA,aAAO,CAAC,CAAC,GAAG,KAAI;AACf,QAAA,IAAI;AACH,YAAA,IAAI,GAAG,CAAC,UAAU,YAAY,UAAU,EAAE;gBACzCC,SAAa,CAAC,GAAG,EAAEC,QAAe,CAAC,GAAG,CAAC,CAAC;;;QAExC,OAAO,KAAK,EAAE;;AAOhB,QAAA,OAAO,SAAS;AACjB,KAAC,CAAC;IAEF,oDAAO,wBAAY;AACjB,SAAA,IAAI,CAAC,CAAC,QAAQ,KAAI;AAClB,QAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE;YACnG,QAAQ,CAAC,UAAU,EAAE;;AAEvB,KAAC;AACA,SAAA,KAAK,CAAC,CAAC,KAAK,KAAI;AAChB,QAAAC,UAAG,CAAC,KAAK,CAAC,KAAK,CAAC;AACjB,KAAC,CAAC;AACJ,CAAC;;AC7BW,MAAC,aAAa,GAAG;;;;"}
1
+ {"version":3,"file":"app-globals-D5OHlvGx.js","sources":["src/global/script.ts","@stencil/core/internal/app-globals"],"sourcesContent":["import { getThemeDetails, setThemeStyle } from 'adopted-style-sheets';\n\nimport { Log } from '../schema';\nimport { setMode } from '@stencil/core';\n\nexport default () => {\n\tsetMode((elm) => {\n\t\ttry {\n\t\t\tif (elm.shadowRoot instanceof ShadowRoot) {\n\t\t\t\tsetThemeStyle(elm, getThemeDetails(elm));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\t/**\n\t\t\t * Try is needed for SSR.\n\t\t\t * - no HTMLElement is available\n\t\t\t * - no ShadowRoot is available\n\t\t\t */\n\t\t}\n\t\treturn 'default';\n\t});\n\n\timport('./devtools')\n\t\t.then((devTools) => {\n\t\t\tif (typeof devTools === 'object' && devTools !== null && typeof devTools.initialize === 'function') {\n\t\t\t\tdevTools.initialize();\n\t\t\t}\n\t\t})\n\t\t.catch((error) => {\n\t\t\tLog.error(error);\n\t\t});\n};\n","import appGlobalScript from '/home/runner/work/kolibri/kolibri/packages/components/src/global/script.ts';\nexport const globalScripts = appGlobalScript;\nexport const globalStyles = \"\";\n"],"names":["setMode","setThemeStyle","getThemeDetails","Log"],"mappings":";;;;;;;;AAKA,sBAAe,MAAK;AACnB,IAAAA,aAAO,CAAC,CAAC,GAAG,KAAI;AACf,QAAA,IAAI;AACH,YAAA,IAAI,GAAG,CAAC,UAAU,YAAY,UAAU,EAAE;gBACzCC,SAAa,CAAC,GAAG,EAAEC,QAAe,CAAC,GAAG,CAAC,CAAC;;;QAExC,OAAO,KAAK,EAAE;;AAOhB,QAAA,OAAO,SAAS;AACjB,KAAC,CAAC;IAEF,oDAAO,wBAAY;AACjB,SAAA,IAAI,CAAC,CAAC,QAAQ,KAAI;AAClB,QAAA,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,IAAI,IAAI,OAAO,QAAQ,CAAC,UAAU,KAAK,UAAU,EAAE;YACnG,QAAQ,CAAC,UAAU,EAAE;;AAEvB,KAAC;AACA,SAAA,KAAK,CAAC,CAAC,KAAK,KAAI;AAChB,QAAAC,UAAG,CAAC,KAAK,CAAC,KAAK,CAAC;AACjB,KAAC,CAAC;AACJ,CAAC;;AC7BW,MAAC,aAAa,GAAG;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var common=require("./common-BHv-S8J5.js"),spellCheck=require("./spell-check-l1PX5cgd.js"),suggestions=require("./suggestions-DIVQQ7ex.js"),controller=require("./controller-Dwu6WB8X.js");const inputTextTypeOptions=["text","search","url","tel"],isInputTextTypePropType=e=>"string"==typeof e&&inputTextTypeOptions.includes(e),validateTypeInputText=(e,t)=>{common.watchValidator(e,"_type",isInputTextTypePropType,new Set(inputTextTypeOptions),t)};class InputTextEmailController extends controller.InputPasswordController{constructor(e,t,o){super(e,t,o),this.component=e}validateSuggestions(e){suggestions.validateSuggestions(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions)}}class InputTextController extends InputTextEmailController{constructor(e,t,o){super(e,t,o),this.hasError=!1,this.component=e}validateSpellCheck(e){spellCheck.validateSpellCheck(this.component,e)}validateType(e){validateTypeInputText(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateSpellCheck(this.component._spellCheck),this.validateType(this.component._type)}}exports.InputTextController=InputTextController,exports.InputTextEmailController=InputTextEmailController;
4
+ "use strict";var common=require("./common-BHv-S8J5.js"),spellCheck=require("./spell-check-l1PX5cgd.js"),suggestions=require("./suggestions-DIVQQ7ex.js"),controller=require("./controller-CjgWW9-a.js");const inputTextTypeOptions=["text","search","url","tel"],isInputTextTypePropType=e=>"string"==typeof e&&inputTextTypeOptions.includes(e),validateTypeInputText=(e,t)=>{common.watchValidator(e,"_type",isInputTextTypePropType,new Set(inputTextTypeOptions),t)};class InputTextEmailController extends controller.InputPasswordController{constructor(e,t,o){super(e,t,o),this.component=e}validateSuggestions(e){suggestions.validateSuggestions(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions)}}class InputTextController extends InputTextEmailController{constructor(e,t,o){super(e,t,o),this.hasError=!1,this.component=e}validateSpellCheck(e){spellCheck.validateSpellCheck(this.component,e)}validateType(e){validateTypeInputText(this.component,e)}componentWillLoad(){super.componentWillLoad(),this.validateSpellCheck(this.component._spellCheck),this.validateType(this.component._type)}}exports.InputTextController=InputTextController,exports.InputTextEmailController=InputTextEmailController;
@@ -1 +1 @@
1
- {"version":3,"file":"controller-DBt3tIW4.js","sources":["src/schema/props/type-input-text.ts","src/components/input-text/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../utils';\n\nexport const inputTextTypeOptions = ['text', 'search', 'url', 'tel'] as const;\nexport type InputTextTypePropType = (typeof inputTextTypeOptions)[number];\n\n/**\n * Defines the type of the input-text component.\n */\nexport type PropTypeInputText = {\n\ttype: InputTextTypePropType;\n};\n\nconst isInputTextTypePropType = (value: unknown): value is InputTextTypePropType => {\n\treturn typeof value === 'string' && inputTextTypeOptions.includes(value as InputTextTypePropType);\n};\n\nexport const validateTypeInputText = (component: Generic.Element.Component, value?: InputTextTypePropType): void => {\n\twatchValidator(component, '_type', isInputTextTypePropType, new Set(inputTextTypeOptions), value);\n};\n","import type {\n\tInputTextProps,\n\tInputTextTypePropType,\n\tInputTextWatches,\n\tPropLabelWithExpertSlot,\n\tPropSuggestions,\n\tSpellCheckPropType,\n\tSuggestionsPropType,\n} from '../../schema';\nimport { validateSpellCheck, validateSuggestions, validateTypeInputText } from '../../schema';\n\nimport { InputPasswordController } from '../input-password/controller';\n\nimport type { Generic } from 'adopted-style-sheets';\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\tid: string;\n} & PropSuggestions;\ntype InputTextEmailProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputTextEmailWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputTextEmailController extends InputPasswordController implements InputTextEmailWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextEmailProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextEmailProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tvalidateSuggestions(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSuggestions(this.component._suggestions);\n\t}\n}\n\nexport class InputTextController extends InputTextEmailController implements InputTextWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextProps;\n\n\tpublic hasError = false;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateSpellCheck(value?: SpellCheckPropType): void {\n\t\tvalidateSpellCheck(this.component, value);\n\t}\n\n\tpublic validateType(value?: InputTextTypePropType): void {\n\t\tvalidateTypeInputText(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSpellCheck(this.component._spellCheck);\n\t\tthis.validateType(this.component._type);\n\t}\n}\n"],"names":["watchValidator","InputPasswordController","validateSuggestions","validateSpellCheck"],"mappings":";;;;;;;;;;AAIO,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAU;AAU7E,MAAM,uBAAuB,GAAG,CAAC,KAAc,KAAoC;IAClF,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,oBAAoB,CAAC,QAAQ,CAAC,KAA8B,CAAC;AAClG,CAAC;AAEM,MAAM,qBAAqB,GAAG,CAAC,SAAoC,EAAE,KAA6B,KAAU;AAClH,IAAAA,qBAAc,CAAC,SAAS,EAAE,OAAO,EAAE,uBAAuB,EAAE,IAAI,GAAG,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC;AAClG,CAAC;;ACEK,MAAO,wBAAyB,SAAQC,kCAAuB,CAAA;AAGpE,IAAA,WAAA,CAAmB,SAA0D,EAAE,IAAY,EAAE,IAAkB,EAAA;AAC9G,QAAA,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;AAC5B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;AAGpB,IAAA,mBAAmB,CAAC,KAA2B,EAAA;AACrD,QAAAC,+BAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;IAGpC,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;;AAEtD;AAEK,MAAO,mBAAoB,SAAQ,wBAAwB,CAAA;AAKhE,IAAA,WAAA,CAAmB,SAAqD,EAAE,IAAY,EAAE,IAAkB,EAAA;AACzG,QAAA,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;QAHtB,IAAQ,CAAA,QAAA,GAAG,KAAK;AAItB,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;AAGpB,IAAA,kBAAkB,CAAC,KAA0B,EAAA;AACnD,QAAAC,6BAAkB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;AAGnC,IAAA,YAAY,CAAC,KAA6B,EAAA;AAChD,QAAA,qBAAqB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC;;IAGtC,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QACnD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;;AAExC;;;;;"}
1
+ {"version":3,"file":"controller-BTkATp4C.js","sources":["src/schema/props/type-input-text.ts","src/components/input-text/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../utils';\n\nexport const inputTextTypeOptions = ['text', 'search', 'url', 'tel'] as const;\nexport type InputTextTypePropType = (typeof inputTextTypeOptions)[number];\n\n/**\n * Defines the type of the input-text component.\n */\nexport type PropTypeInputText = {\n\ttype: InputTextTypePropType;\n};\n\nconst isInputTextTypePropType = (value: unknown): value is InputTextTypePropType => {\n\treturn typeof value === 'string' && inputTextTypeOptions.includes(value as InputTextTypePropType);\n};\n\nexport const validateTypeInputText = (component: Generic.Element.Component, value?: InputTextTypePropType): void => {\n\twatchValidator(component, '_type', isInputTextTypePropType, new Set(inputTextTypeOptions), value);\n};\n","import type {\n\tInputTextProps,\n\tInputTextTypePropType,\n\tInputTextWatches,\n\tPropLabelWithExpertSlot,\n\tPropSuggestions,\n\tSpellCheckPropType,\n\tSuggestionsPropType,\n} from '../../schema';\nimport { validateSpellCheck, validateSuggestions, validateTypeInputText } from '../../schema';\n\nimport { InputPasswordController } from '../input-password/controller';\n\nimport type { Generic } from 'adopted-style-sheets';\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\tid: string;\n} & PropSuggestions;\ntype InputTextEmailProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputTextEmailWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputTextEmailController extends InputPasswordController implements InputTextEmailWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextEmailProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextEmailProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateSuggestions(value?: SuggestionsPropType): void {\n\t\tvalidateSuggestions(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSuggestions(this.component._suggestions);\n\t}\n}\n\nexport class InputTextController extends InputTextEmailController implements InputTextWatches {\n\tprotected readonly component: Generic.Element.Component & InputTextProps;\n\n\tpublic hasError = false;\n\n\tpublic constructor(component: Generic.Element.Component & InputTextProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateSpellCheck(value?: SpellCheckPropType): void {\n\t\tvalidateSpellCheck(this.component, value);\n\t}\n\n\tpublic validateType(value?: InputTextTypePropType): void {\n\t\tvalidateTypeInputText(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateSpellCheck(this.component._spellCheck);\n\t\tthis.validateType(this.component._type);\n\t}\n}\n"],"names":["watchValidator","InputPasswordController","validateSuggestions","validateSpellCheck"],"mappings":";;;;;;;;;;AAIO,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAU;AAU7E,MAAM,uBAAuB,GA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AA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;QACnD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;;AAExC;;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var common=require("./common-BHv-S8J5.js"),autoComplete=require("./auto-complete-DoGExRu3.js"),maxLengthBehavior=require("./max-length-behavior-u3iOrNaO.js"),placeholder=require("./placeholder-Dr79GC1y.js"),readOnly=require("./read-only-DgZf8Y3g.js"),required=require("./required-CLk7h34x.js"),controllerIcon=require("./controller-icon-BoPE_IMC.js");const validatePattern=(t,e,a={})=>{common.watchString(t,"_pattern",e,a)},PasswordVariantPropTypeOptions=["default","visibility-toggle"],validatePasswordVariant=(t,e)=>{common.watchValidator(t,"_variant",(t=>"string"==typeof t&&PasswordVariantPropTypeOptions.includes(t)),new Set(PasswordVariantPropTypeOptions),e)};class InputPasswordController extends controllerIcon.InputIconController{constructor(t,e,a){super(t,e,a),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&(this.component.state._currentLength=this.component._value.length,this.updateCurrentLengthDebounced(this.component._value.length))},this.component=t}validateAutoComplete(t){autoComplete.validateAutoComplete(this.component,t)}validateHasCounter(t){maxLengthBehavior.validateHasCounter(this.component,t)}validateMaxLengthBehavior(t){maxLengthBehavior.validateMaxLengthBehavior(this.component,t)}validateVariant(t){validatePasswordVariant(this.component,t)}validateMaxLength(t){maxLengthBehavior.validateMaxLength(this.component,t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePattern(t){validatePattern(this.component,t)}validatePlaceholder(t){placeholder.validatePlaceholder(this.component,t)}validateReadOnly(t){readOnly.validateReadOnly(this.component,t)}validateRequired(t){required.validateRequired(this.component,t)}validateValue(t){common.watchString(this.component,"_value",t,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validateVariant(this.component._variant)}}exports.InputPasswordController=InputPasswordController;
4
+ "use strict";var common=require("./common-BHv-S8J5.js"),autoComplete=require("./auto-complete-DoGExRu3.js"),maxLengthBehavior=require("./max-length-behavior-u3iOrNaO.js"),placeholder=require("./placeholder-Dr79GC1y.js"),readOnly=require("./read-only-DgZf8Y3g.js"),required=require("./required-CLk7h34x.js"),controllerIcon=require("./controller-icon-BFVf_6RR.js");const validatePattern=(t,e,a={})=>{common.watchString(t,"_pattern",e,a)},PasswordVariantPropTypeOptions=["default","visibility-toggle"],validatePasswordVariant=(t,e)=>{common.watchValidator(t,"_variant",(t=>"string"==typeof t&&PasswordVariantPropTypeOptions.includes(t)),new Set(PasswordVariantPropTypeOptions),e)};class InputPasswordController extends controllerIcon.InputIconController{constructor(t,e,a){super(t,e,a),this.afterSyncCharCounter=()=>{"string"==typeof this.component._value&&(this.component.state._currentLength=this.component._value.length,this.updateCurrentLengthDebounced(this.component._value.length))},this.component=t}validateAutoComplete(t){autoComplete.validateAutoComplete(this.component,t)}validateHasCounter(t){maxLengthBehavior.validateHasCounter(this.component,t)}validateMaxLengthBehavior(t){maxLengthBehavior.validateMaxLengthBehavior(this.component,t)}validateVariant(t){validatePasswordVariant(this.component,t)}validateMaxLength(t){maxLengthBehavior.validateMaxLength(this.component,t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePattern(t){validatePattern(this.component,t)}validatePlaceholder(t){placeholder.validatePlaceholder(this.component,t)}validateReadOnly(t){readOnly.validateReadOnly(this.component,t)}validateRequired(t){required.validateRequired(this.component,t)}validateValue(t){common.watchString(this.component,"_value",t,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validateVariant(this.component._variant)}}exports.InputPasswordController=InputPasswordController;
@@ -1 +1 @@
1
- {"version":3,"file":"controller-Dwu6WB8X.js","sources":["src/schema/props/pattern.ts","src/schema/props/variant/password-variant.ts","src/components/input-password/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\nexport type PatternPropType = string;\n\n/**\n * Defines a validation pattern for the input field.\n */\nexport type PropPattern = {\n\tpattern: PatternPropType;\n};\n\nexport const validatePattern = (component: Generic.Element.Component, value?: PatternPropType, options: WatchStringOptions = {}): void => {\n\twatchString(component, '_pattern', value, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../../utils/prop.validators';\n\nconst PasswordVariantPropTypeOptions = ['default', 'visibility-toggle'] as const;\nexport type PasswordVariantPropType = (typeof PasswordVariantPropTypeOptions)[number];\n\n/**\n * Defines the different variants for displaying the password input.\n */\nexport type PropPasswordVariant = {\n\tvariant: PasswordVariantPropType;\n};\n\n/* validator */\nexport const validatePasswordVariant = (component: Generic.Element.Component, value?: PasswordVariantPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t'_variant',\n\t\t(value) => typeof value === 'string' && PasswordVariantPropTypeOptions.includes(value),\n\t\tnew Set(PasswordVariantPropTypeOptions),\n\t\tvalue,\n\t);\n};\n","import type {\n\tAutoCompletePropType,\n\tHasCounterPropType,\n\tInputPasswordProps,\n\tInputPasswordWatches,\n\tMaxLengthBehaviorPropType,\n\tPlaceholderPropType,\n\tReadOnlyPropType,\n\tRequiredPropType,\n} from '../../schema';\nimport { validateHasCounter, validateMaxLength, validatePlaceholder, validateReadOnly, validateRequired, validatePattern, watchString } from '../../schema';\nimport { validateAutoComplete } from '../../schema/props/auto-complete';\nimport { validateMaxLengthBehavior } from '../../schema/props/max-length-behavior';\nimport type { PasswordVariantPropType } from '../../schema/props/variant/password-variant';\nimport { validatePasswordVariant } from '../../schema/props/variant/password-variant';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\n\nexport class InputPasswordController extends InputIconController implements InputPasswordWatches {\n\tprotected readonly component: Generic.Element.Component & InputPasswordProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputPasswordProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprotected afterSyncCharCounter = () => {\n\t\tif (typeof this.component._value === 'string') {\n\t\t\tthis.component.state._currentLength = this.component._value.length;\n\t\t\tthis.updateCurrentLengthDebounced(this.component._value.length);\n\t\t}\n\t};\n\n\tpublic validateAutoComplete(value?: AutoCompletePropType): void {\n\t\tvalidateAutoComplete(this.component, value);\n\t}\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tvalidateHasCounter(this.component, value);\n\t}\n\n\tpublic validateMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tvalidateMaxLengthBehavior(this.component, value);\n\t}\n\n\tpublic validateVariant(value?: PasswordVariantPropType): void {\n\t\tvalidatePasswordVariant(this.component, value);\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\tvalidateMaxLength(this.component, value, {\n\t\t\thooks: { afterPatch: this.afterSyncCharCounter },\n\t\t});\n\t}\n\n\tpublic validatePattern(value?: string): void {\n\t\tvalidatePattern(this.component, value);\n\t}\n\n\tpublic validatePlaceholder(value?: PlaceholderPropType): void {\n\t\tvalidatePlaceholder(this.component, value);\n\t}\n\n\tpublic validateReadOnly(value?: ReadOnlyPropType): void {\n\t\tvalidateReadOnly(this.component, value);\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\n\t\tthis.setFormAssociatedValue(this.component.state._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateMaxLengthBehavior(this.component._maxLengthBehavior);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePattern(this.component._pattern);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateValue(this.component._value);\n\t\tthis.validateVariant(this.component._variant);\n\t}\n}\n"],"names":["watchString","watchValidator","InputIconController","validateAutoComplete","validateHasCounter","validateMaxLengthBehavior","validateMaxLength","validatePlaceholder","validateReadOnly","validateRequired"],"mappings":";;;;;;;;;;;;;AAaO,MAAM,eAAe,GAAG,CAAC,SAAoC,EAAE,KAAuB,EAAE,OAAA,GAA8B,EAAE,KAAU;IACxIA,kBAAW,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC;AACnD,CAAC;;ACXD,MAAM,8BAA8B,GAAG,CAAC,SAAS,EAAE,mBAAmB,CAAU;AAWzE,MAAM,uBAAuB,GAAG,CAAC,SAAoC,EAAE,KAA+B,KAAU;AACtH,IAAAC,qBAAc,CACb,SAAS,EACT,UAAU,EACV,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,8BAA8B,CAAC,QAAQ,CAAC,KAAK,CAAC,EACtF,IAAI,G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,SAAS,CAAC,SAAS,CAAC;QAC/C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;QACzC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;;AAE9C;;;;"}
1
+ {"version":3,"file":"controller-CjgWW9-a.js","sources":["src/schema/props/pattern.ts","src/schema/props/variant/password-variant.ts","src/components/input-password/controller.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\nimport type { WatchStringOptions } from '../utils';\nimport { watchString } from '../utils';\n\nexport type PatternPropType = string;\n\n/**\n * Defines a validation pattern for the input field.\n */\nexport type PropPattern = {\n\tpattern: PatternPropType;\n};\n\nexport const validatePattern = (component: Generic.Element.Component, value?: PatternPropType, options: WatchStringOptions = {}): void => {\n\twatchString(component, '_pattern', value, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport { watchValidator } from '../../utils/prop.validators';\n\nconst PasswordVariantPropTypeOptions = ['default', 'visibility-toggle'] as const;\nexport type PasswordVariantPropType = (typeof PasswordVariantPropTypeOptions)[number];\n\n/**\n * Defines the different variants for displaying the password input.\n */\nexport type PropPasswordVariant = {\n\tvariant: PasswordVariantPropType;\n};\n\n/* validator */\nexport const validatePasswordVariant = (component: Generic.Element.Component, value?: PasswordVariantPropType): void => {\n\twatchValidator(\n\t\tcomponent,\n\t\t'_variant',\n\t\t(value) => typeof value === 'string' && PasswordVariantPropTypeOptions.includes(value),\n\t\tnew Set(PasswordVariantPropTypeOptions),\n\t\tvalue,\n\t);\n};\n","import type {\n\tAutoCompletePropType,\n\tHasCounterPropType,\n\tInputPasswordProps,\n\tInputPasswordWatches,\n\tMaxLengthBehaviorPropType,\n\tPlaceholderPropType,\n\tReadOnlyPropType,\n\tRequiredPropType,\n} from '../../schema';\nimport { validateHasCounter, validateMaxLength, validatePlaceholder, validateReadOnly, validateRequired, validatePattern, watchString } from '../../schema';\nimport { validateAutoComplete } from '../../schema/props/auto-complete';\nimport { validateMaxLengthBehavior } from '../../schema/props/max-length-behavior';\nimport type { PasswordVariantPropType } from '../../schema/props/variant/password-variant';\nimport { validatePasswordVariant } from '../../schema/props/variant/password-variant';\n\nimport { InputIconController } from '../@deprecated/input/controller-icon';\n\nimport type { Generic } from 'adopted-style-sheets';\n\nexport class InputPasswordController extends InputIconController implements InputPasswordWatches {\n\tprotected readonly component: Generic.Element.Component & InputPasswordProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputPasswordProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tprotected afterSyncCharCounter = () => {\n\t\tif (typeof this.component._value === 'string') {\n\t\t\tthis.component.state._currentLength = this.component._value.length;\n\t\t\tthis.updateCurrentLengthDebounced(this.component._value.length);\n\t\t}\n\t};\n\n\tpublic validateAutoComplete(value?: AutoCompletePropType): void {\n\t\tvalidateAutoComplete(this.component, value);\n\t}\n\n\tpublic validateHasCounter(value?: HasCounterPropType): void {\n\t\tvalidateHasCounter(this.component, value);\n\t}\n\n\tpublic validateMaxLengthBehavior(value?: MaxLengthBehaviorPropType): void {\n\t\tvalidateMaxLengthBehavior(this.component, value);\n\t}\n\n\tpublic validateVariant(value?: PasswordVariantPropType): void {\n\t\tvalidatePasswordVariant(this.component, value);\n\t}\n\n\tpublic validateMaxLength(value?: number): void {\n\t\tvalidateMaxLength(this.component, value, {\n\t\t\thooks: { afterPatch: this.afterSyncCharCounter },\n\t\t});\n\t}\n\n\tpublic validatePattern(value?: string): void {\n\t\tvalidatePattern(this.component, value);\n\t}\n\n\tpublic validatePlaceholder(value?: PlaceholderPropType): void {\n\t\tvalidatePlaceholder(this.component, value);\n\t}\n\n\tpublic validateReadOnly(value?: ReadOnlyPropType): void {\n\t\tvalidateReadOnly(this.component, value);\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic validateValue(value?: string): void {\n\t\twatchString(this.component, '_value', value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterSyncCharCounter,\n\t\t\t},\n\t\t});\n\n\t\tthis.setFormAssociatedValue(this.component.state._value as string);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateAutoComplete(this.component._autoComplete);\n\t\tthis.validateHasCounter(this.component._hasCounter);\n\t\tthis.validateMaxLengthBehavior(this.component._maxLengthBehavior);\n\t\tthis.validateMaxLength(this.component._maxLength);\n\t\tthis.validatePattern(this.component._pattern);\n\t\tthis.validatePlaceholder(this.component._placeholder);\n\t\tthis.validateReadOnly(this.component._readOnly);\n\t\tthis.validateRequired(this.component._required);\n\t\tthis.validateValue(this.component._value);\n\t\tthis.validateVariant(this.component._variant);\n\t}\n}\n"],"names":["watchString","watchValidator","InputIconController","validateAutoComplete","validateHasCounter","validateMaxLengthBehavior","validateMaxLength","validatePlaceholder","validateReadOnly","validateRequired"],"mappings":";;;;;;;;;;;;;AAaO,MAAM,eAAe,GAAG,CAAC,SAAoC,EAAE,KAAuB,EAAE,OAAA,GAA8B,EAAE,KAAU;IACxIA,kBAAW,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC;AACnD,CAAC;;ACXD,MAAM,8BAA8B,GAAG,CAAC,SAAS,EAAE,mBAAmB,CAAU;AAWzE,MAAM,uBAAuB,GAAG,CAAC,SAAoC,EAAE,KAA+B,KAAU;AACtH,IAAAC,qBAAc,CACb,SAAS,EACT,UAAU,EACV,CAAC,KAAK,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,8BAA8B,CAAC,QAAQ,CAAC,KAAK,CAAC,EACtF,IAAI,GAAG,CAAC,8BAA8B,CAAC,EACvC,KAAK,CACL;AACF,CAAC;;ACHK,MAAO,uBAAwB,SAAQC,kCAAmB,CAAA;AAG/D,IAAA,WAAA,CAAmB,SAAyD,EAAE,IAAY,EAAE,IAAkB,EAAA;AAC7G,QAAA,KAAK,CAAC,SAAS,EAAE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1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var common=require("./common-BHv-S8J5.js"),label=require("./label-DLgz6vof.js"),required=require("./required-CLk7h34x.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-BEGBlx4c.js"),orientation=require("./orientation-Bs8Ti6Qp.js");const validateInputSelectOptions=t=>{if("object"==typeof t&&null!==t){if("string"==typeof t.label&&t.label.length>0)return t.disabled=!0===t.disabled,t.label=`${t.label}`.trim(),!1===label.hasEnoughReadableChars(t.label,3)&&!1===label.containsOnlyNumbers(t.label)&&common.a11yHint(`A differing Aria-Label (${t.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`),!Array.isArray(t.options)||void 0===t.options.find((t=>!1===validateInputSelectOptions(t)));if("number"==typeof t.label)return!0}return!1},validateOptions=(t,e,o={})=>{common.watchJsonArrayString(t,"_options",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),e,void 0,o)},validateOptionsWithOptgroup=(t,e,o={})=>{common.watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,o)},fillKeyOptionMap=(t,e,o="")=>{e.forEach(((e,i)=>{const a=`${o}-${i}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,a):t.set(a,e))}))};class InputCheckboxRadioController extends FormFieldStateWrapper.InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateRequired(t){required.validateRequired(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.afterPatchOptions=(t,e,o,i)=>{"_value"===i&&this.setFormAssociatedValue(t)},this.beforePatchOptions=(t,e)=>{const o=e.has("_options")?e.get("_options"):this.component.state._options;Array.isArray(o)&&o.length>0&&(this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,o))},this.component=t}validateOrientation(t){orientation.validateOrientation(this.component,t,"vertical")}validateOptions(t){validateOptions(this.component,t,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateValue(t){t=Array.isArray(t)?t[0]:t,common.setState(this.component,"_value",t,{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions})}componentWillLoad(){super.componentWillLoad(),this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options),this.validateValue(this.component._value)}}exports.InputCheckboxRadioController=InputCheckboxRadioController,exports.InputRadioController=InputRadioController,exports.fillKeyOptionMap=fillKeyOptionMap,exports.validateOptions=validateOptions,exports.validateOptionsWithOptgroup=validateOptionsWithOptgroup;
4
+ "use strict";var common=require("./common-BHv-S8J5.js"),label=require("./label-DLgz6vof.js"),required=require("./required-CLk7h34x.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-Cwv6XCb_.js"),orientation=require("./orientation-Bs8Ti6Qp.js");const validateInputSelectOptions=t=>{if("object"==typeof t&&null!==t){if("string"==typeof t.label&&t.label.length>0)return t.disabled=!0===t.disabled,t.label=`${t.label}`.trim(),!1===label.hasEnoughReadableChars(t.label,3)&&!1===label.containsOnlyNumbers(t.label)&&common.a11yHint(`A differing Aria-Label (${t.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`),!Array.isArray(t.options)||void 0===t.options.find((t=>!1===validateInputSelectOptions(t)));if("number"==typeof t.label)return!0}return!1},validateOptions=(t,e,o={})=>{common.watchJsonArrayString(t,"_options",(t=>"object"==typeof t&&null!==t&&"string"==typeof t.label&&t.label.length>0),e,void 0,o)},validateOptionsWithOptgroup=(t,e,o={})=>{common.watchJsonArrayString(t,"_options",validateInputSelectOptions,e,void 0,o)},fillKeyOptionMap=(t,e,o="")=>{e.forEach(((e,i)=>{const a=`${o}-${i}`;"object"==typeof e&&null!==e&&"string"==typeof e.label&&e.label.length>0&&(Array.isArray(e.options)?fillKeyOptionMap(t,e.options,a):t.set(a,e))}))};class InputCheckboxRadioController extends FormFieldStateWrapper.InputController{constructor(t,e,o){super(t,e,o),this.component=t}validateRequired(t){required.validateRequired(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateRequired(this.component._required)}}class InputRadioController extends InputCheckboxRadioController{constructor(t,e,o){super(t,e,o),this.keyOptionMap=new Map,this.getOptionByKey=t=>this.keyOptionMap.get(t),this.afterPatchOptions=(t,e,o,i)=>{"_value"===i&&this.setFormAssociatedValue(t)},this.beforePatchOptions=(t,e)=>{const o=e.has("_options")?e.get("_options"):this.component.state._options;Array.isArray(o)&&o.length>0&&(this.keyOptionMap.clear(),fillKeyOptionMap(this.keyOptionMap,o))},this.component=t}validateOrientation(t){orientation.validateOrientation(this.component,t,"vertical")}validateOptions(t){validateOptions(this.component,t,{hooks:{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions}})}validateValue(t){t=Array.isArray(t)?t[0]:t,common.setState(this.component,"_value",t,{afterPatch:this.afterPatchOptions,beforePatch:this.beforePatchOptions})}componentWillLoad(){super.componentWillLoad(),this.validateOrientation(this.component._orientation),this.validateOptions(this.component._options),this.validateValue(this.component._value)}}exports.InputCheckboxRadioController=InputCheckboxRadioController,exports.InputRadioController=InputRadioController,exports.fillKeyOptionMap=fillKeyOptionMap,exports.validateOptions=validateOptions,exports.validateOptionsWithOptgroup=validateOptionsWithOptgroup;
@@ -1 +1 @@
1
- {"version":3,"file":"controller-LUPyLjfe.js","sources":["src/schema/validators/options.ts","src/schema/props/options.ts","src/components/input-radio/controller.ts"],"sourcesContent":["import { containsOnlyNumbers, hasEnoughReadableChars } from '../props';\nimport { a11yHint } from '../utils';\n\nimport type { Optgroup, SelectOption } from '../types';\nexport const validateInputSelectOptions = <T>(option: SelectOption<T>): boolean => {\n\tif (typeof option === 'object' && option !== null) {\n\t\tif (typeof option.label === 'string' && option.label.length > 0) {\n\t\t\toption.disabled = option.disabled === true;\n\t\t\toption.label = `${option.label}`.trim();\n\t\t\tif (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n\t\t\t\ta11yHint(`A differing Aria-Label (${option.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`);\n\t\t\t}\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\treturn (\n\t\t\t\t\t(option as Optgroup<T>).options.find((item) => {\n\t\t\t\t\t\treturn validateInputSelectOptions(item) === false;\n\t\t\t\t\t}) === undefined\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (typeof option.label === 'number') {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { RadioOption, Optgroup, Option, StencilUnknown } from '../types';\nimport type { Stringified } from '../types/common';\nimport type { WatchOptions } from '../utils';\nimport { watchJsonArrayString } from '../utils';\nimport { validateInputSelectOptions } from '../validators';\n\n/* types */\n\nexport type OptionsPropType = Stringified<Option<StencilUnknown>[]>;\nexport type OptionsWithOptgroupPropType = Stringified<(Option<StencilUnknown> | Optgroup<StencilUnknown>)[]>;\nexport type RadioOptionsPropType = Stringified<RadioOption<StencilUnknown>[]>;\n\n/**\n * Options the user can choose from.\n */\nexport type PropOptions = {\n\toptions: OptionsPropType;\n};\n\nexport type PropRadioOptions = {\n\toptions: RadioOptionsPropType;\n};\n\n/**\n * Options the user can choose from, also supporting Optgroup.\n */\nexport type PropOptionsWithOptgroup = {\n\toptions: OptionsWithOptgroupPropType;\n};\n\n/* validators */\n\nexport const validateOptions = (component: Generic.Element.Component, value: OptionsPropType | undefined, options: WatchOptions = {}): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_options',\n\t\t(item: Option<StencilUnknown>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\tvalue,\n\t\tundefined,\n\t\toptions,\n\t);\n};\n\nexport const validateOptionsWithOptgroup = (\n\tcomponent: Generic.Element.Component,\n\tvalue: OptionsWithOptgroupPropType | undefined,\n\toptions: WatchOptions = {},\n) => {\n\twatchJsonArrayString(component, '_options', validateInputSelectOptions, value, undefined, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tInputRadioProps,\n\tInputRadioWatches,\n\tOptgroup,\n\tOptionsPropType,\n\tPropLabelWithExpertSlot,\n\tRadioOption,\n\tRequiredPropType,\n\tSelectOption,\n\tStencilUnknown,\n} from '../../schema';\nimport { setState, validateOptions, validateRequired } from '../../schema';\n\nimport { InputController } from '../@deprecated/input/controller';\nimport type { OrientationPropType } from '../../schema/props/orientation';\nimport { validateOrientation } from '../../schema/props/orientation';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, RadioOption<T>>, options: SelectOption<T>[], preKey = ''): void => {\n\toptions.forEach((option, index) => {\n\t\tconst key = `${preKey}-${index}`;\n\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string' && option.label.length > 0) {\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\tfillKeyOptionMap(keyOptionMap, (option as Optgroup<T>).options, key);\n\t\t\t} else {\n\t\t\t\tkeyOptionMap.set(key, option as RadioOption<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\trequired: boolean;\n};\ntype InputCheckboxRadioProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputCheckboxRadioWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputCheckboxRadioController extends InputController implements InputCheckboxRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxRadioProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateRequired(this.component._required);\n\t}\n}\n\nexport class InputRadioController extends InputCheckboxRadioController implements InputRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputRadioProps;\n\tprivate readonly keyOptionMap = new Map<string, RadioOption<StencilUnknown>>();\n\n\tpublic constructor(component: Generic.Element.Component & InputRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): RadioOption<StencilUnknown> | undefined => this.keyOptionMap.get(key);\n\n\tprotected readonly afterPatchOptions = (value: unknown, _state: Record<string, unknown>, _component: Generic.Element.Component, key: string): void => {\n\t\tif (key === '_value') {\n\t\t\tthis.setFormAssociatedValue(value as string);\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: OrientationPropType): void {\n\t\tvalidateOrientation(this.component, value, 'vertical');\n\t}\n\n\tprotected readonly beforePatchOptions = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst options = nextState.has('_options') ? nextState.get('_options') : this.component.state._options;\n\t\tif (Array.isArray(options) && options.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\t\t\tfillKeyOptionMap(this.keyOptionMap, options as SelectOption<StencilUnknown>[]);\n\t\t}\n\t};\n\n\tpublic validateOptions(value?: OptionsPropType): void {\n\t\tvalidateOptions(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateValue(value?: StencilUnknown): void {\n\t\tvalue = Array.isArray(value) ? (value[0] as StencilUnknown) : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateOptions(this.component._options);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"names":["hasEnoughReadableChars","containsOnlyNumbers","a11yHint","watchJsonArrayString","InputController","validateRequired","validateOrientation","setState"],"mappings":";;;;;;;;;;;AAIO,MAAM,0BAA0B,GAAG,CAAI,MAAuB,KAAa;IACjF,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE;AAClD,QAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAChE,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,IAAI;YAC1C,MAAM,CAAC,KAAK,GAAG,CAAG,EAAA,MAAM,CAAC,KAAK,CAAE,CAAA,CAAC,IAAI,EAAE;YACvC,IAAIA,4BAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,KAAK,IAAIC,yBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE;AACrG,gBAAAC,eAAQ,CAAC,CAA2B,wBAAA,EAAA,MAAM,CAAC,KAAK,CAAA,+FAAA,CAAiG,CAAC;;YAEnJ,IAAI,KAAK,CAAC,OAAO,CAAE,MAAsB,CAAC,OAAO,CAAC,EAAE;gBACnD,QACE,MAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,KAAI;AAC7C,oBAAA,OAAO,0BAA0B,CAAC,IAAI,CAAC,KAAK,KAAK;AAClD,iBAAC,CAAC,KAAK,SAAS;;AAGlB,YAAA,OAAO,IAAI;;AACL,aAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE;AAC5C,YAAA,OAAO,IAAI;;;AAGb,IAAA,OAAO,KAAK;AACb,CAAC;;ACSM,MAAM,eAAe,GAAG,CAAC,SAAoC,EAAE,KAAkC,EAAE,OAAA,GAAwB,EAAE,KAAU;AAC7I,IAAAC,2BAAoB,CACnB,SAAS,EACT,UAAU,EACV,CAAC,IAA4B,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AAS;;AAWpB,IAAA,mBAAmB,CAAC,KAA2B,EAAA;QACrDC,+BAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC;;AAWhD,IAAA,eAAe,CAAC,KAAuB,EAAA;AAC7C,QAAA,eAAe,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE;AACtC,YAAA,KAAK,EAAE;gBACN,UAAU,EAAE,IAAI,CAAC,iBAAiB;gBAClC,WAAW,EAAE,IAAI,CAAC,kBAAkB;AACpC,aAAA;AACD,SAAA,CAAC;;AAGI,IAAA,aAAa,CAAC,KAAsB,EAAA;AAC1C,QAAA,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,CAAC,CAAoB,GAAG,KAAK;QACnEC,eAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;YACzC,UAAU,EAAE,IAAI,CAAC,iBAAiB;YAClC,WAAW,EAAE,IAAI,CAAC,kBAAkB;AACpC,SAAA,CAAC;;IAGI,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;QACrD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;AAE1C;;;;;;;;"}
1
+ {"version":3,"file":"controller-D0qd9yWT.js","sources":["src/schema/validators/options.ts","src/schema/props/options.ts","src/components/input-radio/controller.ts"],"sourcesContent":["import { containsOnlyNumbers, hasEnoughReadableChars } from '../props';\nimport { a11yHint } from '../utils';\n\nimport type { Optgroup, SelectOption } from '../types';\nexport const validateInputSelectOptions = <T>(option: SelectOption<T>): boolean => {\n\tif (typeof option === 'object' && option !== null) {\n\t\tif (typeof option.label === 'string' && option.label.length > 0) {\n\t\t\toption.disabled = option.disabled === true;\n\t\t\toption.label = `${option.label}`.trim();\n\t\t\tif (hasEnoughReadableChars(option.label, 3) === false && containsOnlyNumbers(option.label) === false) {\n\t\t\t\ta11yHint(`A differing Aria-Label (${option.label}) is inaccessible. A differing Aria-Label should consist of at least three readable characters.`);\n\t\t\t}\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\treturn (\n\t\t\t\t\t(option as Optgroup<T>).options.find((item) => {\n\t\t\t\t\t\treturn validateInputSelectOptions(item) === false;\n\t\t\t\t\t}) === undefined\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (typeof option.label === 'number') {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { RadioOption, Optgroup, Option, StencilUnknown } from '../types';\nimport type { Stringified } from '../types/common';\nimport type { WatchOptions } from '../utils';\nimport { watchJsonArrayString } from '../utils';\nimport { validateInputSelectOptions } from '../validators';\n\n/* types */\n\nexport type OptionsPropType = Stringified<Option<StencilUnknown>[]>;\nexport type OptionsWithOptgroupPropType = Stringified<(Option<StencilUnknown> | Optgroup<StencilUnknown>)[]>;\nexport type RadioOptionsPropType = Stringified<RadioOption<StencilUnknown>[]>;\n\n/**\n * Options the user can choose from.\n */\nexport type PropOptions = {\n\toptions: OptionsPropType;\n};\n\nexport type PropRadioOptions = {\n\toptions: RadioOptionsPropType;\n};\n\n/**\n * Options the user can choose from, also supporting Optgroup.\n */\nexport type PropOptionsWithOptgroup = {\n\toptions: OptionsWithOptgroupPropType;\n};\n\n/* validators */\n\nexport const validateOptions = (component: Generic.Element.Component, value: OptionsPropType | undefined, options: WatchOptions = {}): void => {\n\twatchJsonArrayString(\n\t\tcomponent,\n\t\t'_options',\n\t\t(item: Option<StencilUnknown>) => typeof item === 'object' && item !== null && typeof item.label === 'string' && item.label.length > 0,\n\t\tvalue,\n\t\tundefined,\n\t\toptions,\n\t);\n};\n\nexport const validateOptionsWithOptgroup = (\n\tcomponent: Generic.Element.Component,\n\tvalue: OptionsWithOptgroupPropType | undefined,\n\toptions: WatchOptions = {},\n) => {\n\twatchJsonArrayString(component, '_options', validateInputSelectOptions, value, undefined, options);\n};\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type {\n\tInputRadioProps,\n\tInputRadioWatches,\n\tOptgroup,\n\tOptionsPropType,\n\tPropLabelWithExpertSlot,\n\tRadioOption,\n\tRequiredPropType,\n\tSelectOption,\n\tStencilUnknown,\n} from '../../schema';\nimport { setState, validateOptions, validateRequired } from '../../schema';\n\nimport { InputController } from '../@deprecated/input/controller';\nimport type { OrientationPropType } from '../../schema/props/orientation';\nimport { validateOrientation } from '../../schema/props/orientation';\n\nexport const fillKeyOptionMap = <T>(keyOptionMap: Map<string, RadioOption<T>>, options: SelectOption<T>[], preKey = ''): void => {\n\toptions.forEach((option, index) => {\n\t\tconst key = `${preKey}-${index}`;\n\t\tif (typeof option === 'object' && option !== null && typeof option.label === 'string' && option.label.length > 0) {\n\t\t\tif (Array.isArray((option as Optgroup<T>).options)) {\n\t\t\t\tfillKeyOptionMap(keyOptionMap, (option as Optgroup<T>).options, key);\n\t\t\t} else {\n\t\t\t\tkeyOptionMap.set(key, option as RadioOption<T>);\n\t\t\t}\n\t\t}\n\t});\n};\n\ntype RequiredProps = PropLabelWithExpertSlot;\ntype OptionalProps = {\n\trequired: boolean;\n};\ntype InputCheckboxRadioProps = Generic.Element.Members<RequiredProps, OptionalProps>;\ntype InputCheckboxRadioWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;\n\nexport class InputCheckboxRadioController extends InputController implements InputCheckboxRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputCheckboxRadioProps;\n\n\tpublic constructor(component: Generic.Element.Component & InputCheckboxRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateRequired(value?: RequiredPropType): void {\n\t\tvalidateRequired(this.component, value);\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateRequired(this.component._required);\n\t}\n}\n\nexport class InputRadioController extends InputCheckboxRadioController implements InputRadioWatches {\n\tprotected readonly component: Generic.Element.Component & InputRadioProps;\n\tprivate readonly keyOptionMap = new Map<string, RadioOption<StencilUnknown>>();\n\n\tpublic constructor(component: Generic.Element.Component & InputRadioProps, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic readonly getOptionByKey = (key: string): RadioOption<StencilUnknown> | undefined => this.keyOptionMap.get(key);\n\n\tprotected readonly afterPatchOptions = (value: unknown, _state: Record<string, unknown>, _component: Generic.Element.Component, key: string): void => {\n\t\tif (key === '_value') {\n\t\t\tthis.setFormAssociatedValue(value as string);\n\t\t}\n\t};\n\n\tpublic validateOrientation(value?: OrientationPropType): void {\n\t\tvalidateOrientation(this.component, value, 'vertical');\n\t}\n\n\tprotected readonly beforePatchOptions = (_value: unknown, nextState: Map<string, unknown>): void => {\n\t\tconst options = nextState.has('_options') ? nextState.get('_options') : this.component.state._options;\n\t\tif (Array.isArray(options) && options.length > 0) {\n\t\t\tthis.keyOptionMap.clear();\n\t\t\tfillKeyOptionMap(this.keyOptionMap, options as SelectOption<StencilUnknown>[]);\n\t\t}\n\t};\n\n\tpublic validateOptions(value?: OptionsPropType): void {\n\t\tvalidateOptions(this.component, value, {\n\t\t\thooks: {\n\t\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t\t},\n\t\t});\n\t}\n\n\tpublic validateValue(value?: StencilUnknown): void {\n\t\tvalue = Array.isArray(value) ? (value[0] as StencilUnknown) : value;\n\t\tsetState(this.component, '_value', value, {\n\t\t\tafterPatch: this.afterPatchOptions,\n\t\t\tbeforePatch: this.beforePatchOptions,\n\t\t});\n\t}\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateOrientation(this.component._orientation);\n\t\tthis.validateOptions(this.component._options);\n\t\tthis.validateValue(this.component._value);\n\t}\n}\n"],"names":["hasEnoughReadableChars","containsOnlyNumbers","a11yHint","watchJsonArrayString","InputController","validateRequired","validateOrientation","setState"],"mappings":";;;;;;;;;;;AAIO,MAAM,0BAA0B,GAAG,CAAI,MAAuB,KAAa;IACjF,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE;AAClD,QAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YAChE,MAAM,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,IAAI;YAC1C,MAAM,CAAC,KAAK,GAAG,CAAG,EAAA,MAAM,CAAC,KAAK,CAAE,CAAA,CAAC,IAAI,EAAE;YACvC,IAAIA,4BAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,KAAK,IAAIC,yBAAmB,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,EAAE;AACrG,gBAAAC,eAAQ,CAAC,CAA2B,wBAAA,EAAA,MAAM,CAAC,KAAK,CAAA,+FAAA,CAAiG,CAAC;;YAEnJ,IAAI,KAAK,CAAC,OAAO,CAAE,MAAsB,CAAC,OAAO,CAAC,EAAE;gBACnD,QACE,MAAsB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,KAAI;AAC7C,oBAAA,OAAO,0BAA0B,CAAC,IAAI,CAAC,KAAK,KAAK;AAClD,iBAAC,CAAC,KAAK,SAAS;;AAGlB,YAAA,OAAO,IAAI;;AACL,aAAA,IAAI,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE;AAC5C,YAAA,OAAO,IAAI;;;AAGb,IAAA,OAAO,KAAK;AACb,CAAC;;ACSM,MAAM,eAAe,GAAG,CAAC,SAAoC,EAAE,KAAkC,EAAE,OAAA,GAAwB,E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AY,EAAE,OAAyC,CAAC;;AAEhF,SAAC;AArBA,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;;AAWpB,IAAA,mBAAmB,CAAC,KAA2B,EAAA;QACrDC,+BAAmB,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC;;AAWhD,IAAA,eAAe,CAAC,KAAuB,EAAA;AAC7C,QAAA,eAAe,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE;AACtC,YAAA,KAAK,EAAE;gBACN,UAAU,EAAE,IAAI,CAAC,iBAAiB;gBAClC,WAAW,EAAE,IAAI,CAAC,kBAAkB;AACpC,aAAA;AACD,SAAA,CAAC;;AAGI,IAAA,aAAa,CAAC,KAAsB,EAAA;AAC1C,QAAA,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAI,KAAK,CAAC,CAAC,CAAoB,GAAG,KAAK;QACnEC,eAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE;YACzC,UAAU,EAAE,IAAI,CAAC,iBAAiB;YAClC,WAAW,EAAE,IAAI,CAAC,kBAAkB;AACpC,SAAA,CAAC;;IAGI,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;QACrD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC7C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;AAE1C;;;;;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var index=require("./index-BHqiFoBU.js"),common=require("./common-BHv-S8J5.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-BEGBlx4c.js"),Heading=require("./Heading-DlbiB1eP.js"),clsx=require("./clsx-CkZlkaek.js"),componentNames=require("./component-names-D7MwtuB7.js"),Icon=require("./Icon-BXx6hmOf.js"),InternalUnderlinedBadgeText=require("./InternalUnderlinedBadgeText-BktIt7Dv.js"),isObject=require("./isObject-DMA85Fq4.js"),icons=require("./icons-_d_CGN11.js");const InputAdornment=(n,e)=>{var{position:t="start",class:o}=n,s=Heading.__rest(n,["position","class"]);const i="kol-input-container__adornment",r=`${i}--${t}`;return index.h("div",Object.assign({class:clsx.clsx(i,r,o)},s),e)};function hasItems(n){return!!n&&(Array.isArray(n)?n.length>0:Boolean(n))}const Container=(n,e)=>{var{class:t}=n,o=Heading.__rest(n,["class"]);return index.h("div",Object.assign({class:clsx.clsx("kol-input-container__container",t)},o),e)},KolInputContainerFc=(n,e)=>{const{class:t,startAdornment:o,endAdornment:s,disabled:i,msg:r,touched:c,containerProps:a,startAdornmentProps:l,endAdornmentProps:d}=n,u=Heading.__rest(n,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),p=FormFieldStateWrapper.checkHasMsg(r,c),m={"kol-input-container--disabled":i,[`kol-input-container--${(null==r?void 0:r.type)||"error"}`]:p},b=Object.assign({class:clsx.clsx("kol-input-container",m,t)},u);return hasItems(o)||hasItems(s)?index.h("div",Object.assign({},b),index.h(InputAdornment,Object.assign({},l,{position:"start"}),o),index.h(Container,Object.assign({},a),e),index.h(InputAdornment,Object.assign({},d,{position:"end"}),s)):index.h("div",Object.assign({},b),index.h(Container,Object.assign({},a),e))},KolButtonFc=n=>{const{label:e,icons:t,hideLabel:o,disabled:s,onClick:i}=n,r=Heading.__rest(n,["label","icons","hideLabel","disabled","onClick"]);return index.h(componentNames.KolButtonWcTag,Object.assign({_label:e,_disabled:s,_icons:t,_hideLabel:o,_on:{onClick:i}},r))},KolIconButtonFc=n=>{const{componentName:e="button",label:t,icon:o,onClick:s}=n,i=Heading.__rest(n,["componentName","label","icon","onClick"]),r="button"===e?KolButtonFc:Icon.KolIconFc;return index.h(r,Object.assign({label:t||"",hideLabel:!0,icons:`codicon codicon-${o}`,onClick:s},i))};function getInputContainerProps(n){let e,t;return"_icons"in n&&(e=n._icons),"_smartButton"in n&&(t=n._smartButton),{icons:e,smartButton:t,disabled:n._disabled,msg:FormFieldStateWrapper.convertMsgToInternMsg(n._msg),touched:n._touched}}const InputContainerStateWrapperFc=({state:n,endAdornment:e},t)=>{const{icons:o,smartButton:s,disabled:i,msg:r,touched:c}=getInputContainerProps(n);let a=null==o?void 0:o.left;InternalUnderlinedBadgeText.isString(a)&&(a={icon:a});let l=null==o?void 0:o.right;InternalUnderlinedBadgeText.isString(l)&&(l={icon:l});const d=[],u=[];return e&&(Array.isArray(e)?u.push(...e):u.push(e)),a&&d.push(index.h(KolIconButtonFc,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject.isObject(a)?a:{}))),isObject.isObject(s)&&u.push(index.h(KolIconButtonFc,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},s,{hideLabel:!0,disabled:i}))),l&&u.push(index.h(KolIconButtonFc,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject.isObject(l)?l:{}))),index.h(KolInputContainerFc,{disabled:i,msg:r,touched:c,startAdornment:d,endAdornment:u},t)};class InputIconController extends FormFieldStateWrapper.InputController{constructor(n,e,t){super(n,e,t),this.numberStringRegex=/^\d+(\.\d+)?$/,this.parseToNumber=n=>"number"==typeof n?isNaN(n)?null:n:this.isNumberString(n)?parseFloat(n):null,this.validateNumber=(n,e)=>common.watchValidator(this.component,n,(n=>null==n||"number"==typeof n||"string"==typeof n&&this.numberStringRegex.test(n)),new Set(["number","NumberString"]),e,{hooks:{beforePatch:(e,t)=>{(null==t?void 0:t.has(n))&&(null==t||t.set(n,this.parseToNumber(e)))}}}),this.component=n}validateIcons(n){icons.validateIcons(this.component,n)}isNumberString(n){return"string"==typeof n&&this.numberStringRegex.test(n)}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}exports.InputContainerStateWrapperFc=InputContainerStateWrapperFc,exports.InputIconController=InputIconController,exports.KolIconButtonFc=KolIconButtonFc;
4
+ "use strict";var index=require("./index-CIQC-OQ4.js"),common=require("./common-BHv-S8J5.js"),FormFieldStateWrapper=require("./FormFieldStateWrapper-Cwv6XCb_.js"),Heading=require("./Heading-B_FNjVhY.js"),clsx=require("./clsx-CkZlkaek.js"),componentNames=require("./component-names-D7MwtuB7.js"),Icon=require("./Icon-Cm3lAgHU.js"),InternalUnderlinedBadgeText=require("./InternalUnderlinedBadgeText-opHTXEbX.js"),isObject=require("./isObject-DMA85Fq4.js"),icons=require("./icons-_d_CGN11.js");const InputAdornment=(n,e)=>{var{position:t="start",class:o}=n,s=Heading.__rest(n,["position","class"]);const i="kol-input-container__adornment",r=`${i}--${t}`;return index.h("div",Object.assign({class:clsx.clsx(i,r,o)},s),e)};function hasItems(n){return!!n&&(Array.isArray(n)?n.length>0:Boolean(n))}const Container=(n,e)=>{var{class:t}=n,o=Heading.__rest(n,["class"]);return index.h("div",Object.assign({class:clsx.clsx("kol-input-container__container",t)},o),e)},KolInputContainerFc=(n,e)=>{const{class:t,startAdornment:o,endAdornment:s,disabled:i,msg:r,touched:a,containerProps:c,startAdornmentProps:l,endAdornmentProps:d}=n,u=Heading.__rest(n,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),p=FormFieldStateWrapper.checkHasMsg(r,a),m={"kol-input-container--disabled":i,[`kol-input-container--${(null==r?void 0:r.type)||"error"}`]:p},b=Object.assign({class:clsx.clsx("kol-input-container",m,t)},u);return hasItems(o)||hasItems(s)?index.h("div",Object.assign({},b),index.h(InputAdornment,Object.assign({},l,{position:"start"}),o),index.h(Container,Object.assign({},c),e),index.h(InputAdornment,Object.assign({},d,{position:"end"}),s)):index.h("div",Object.assign({},b),index.h(Container,Object.assign({},c),e))},KolButtonFc=n=>{const{label:e,icons:t,hideLabel:o,disabled:s,onClick:i}=n,r=Heading.__rest(n,["label","icons","hideLabel","disabled","onClick"]);return index.h(componentNames.KolButtonWcTag,Object.assign({_label:e,_disabled:s,_icons:t,_hideLabel:o,_on:{onClick:i}},r))},KolIconButtonFc=n=>{const{componentName:e="button",label:t,icon:o,onClick:s}=n,i=Heading.__rest(n,["componentName","label","icon","onClick"]),r="button"===e?KolButtonFc:Icon.KolIconFc;return index.h(r,Object.assign({label:t||"",hideLabel:!0,icons:`codicon codicon-${o}`,onClick:s},i))};function getInputContainerProps(n){let e,t;return"_icons"in n&&(e=n._icons),"_smartButton"in n&&(t=n._smartButton),{icons:e,smartButton:t,disabled:n._disabled,msg:FormFieldStateWrapper.convertMsgToInternMsg(n._msg),touched:n._touched}}const InputContainerStateWrapperFc=({state:n,endAdornment:e},t)=>{const{icons:o,smartButton:s,disabled:i,msg:r,touched:a}=getInputContainerProps(n);let c=null==o?void 0:o.left;InternalUnderlinedBadgeText.isString(c)&&(c={icon:c});let l=null==o?void 0:o.right;InternalUnderlinedBadgeText.isString(l)&&(l={icon:l});const d=[],u=[];return e&&(Array.isArray(e)?u.push(...e):u.push(e)),c&&d.push(index.h(KolIconButtonFc,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject.isObject(c)?c:{}))),isObject.isObject(s)&&u.push(index.h(KolIconButtonFc,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},s,{hideLabel:!0,disabled:i}))),l&&u.push(index.h(KolIconButtonFc,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject.isObject(l)?l:{}))),index.h(KolInputContainerFc,{disabled:i,msg:r,touched:a,startAdornment:d,endAdornment:u},t)};class InputIconController extends FormFieldStateWrapper.InputController{constructor(n,e,t){super(n,e,t),this.numberStringRegex=/^\d+(\.\d+)?$/,this.parseToNumber=n=>"number"==typeof n?isNaN(n)?null:n:this.isNumberString(n)?parseFloat(n):null,this.validateNumber=(n,e)=>common.watchValidator(this.component,n,(n=>null==n||"number"==typeof n||"string"==typeof n&&this.numberStringRegex.test(n)),new Set(["number","NumberString"]),e,{hooks:{beforePatch:(e,t)=>{(null==t?void 0:t.has(n))&&(null==t||t.set(n,this.parseToNumber(e)))}}}),this.component=n}validateIcons(n){icons.validateIcons(this.component,n)}isNumberString(n){return"string"==typeof n&&this.numberStringRegex.test(n)}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}exports.InputContainerStateWrapperFc=InputContainerStateWrapperFc,exports.InputIconController=InputIconController,exports.KolIconButtonFc=KolIconButtonFc;
@@ -1 +1 @@
1
- {"version":3,"file":"controller-icon-BoPE_IMC.js","sources":["src/functional-components/InputAdornment/InputAdornment.tsx","src/functional-components/InputContainer/InputContainer.tsx","src/functional-components/Button/Button.tsx","src/functional-components/IconButton/IconButton.tsx","src/functional-component-wrappers/InputContainerStateWrapper/InputContainerStateWrapper.tsx","src/components/@deprecated/input/controller-icon.ts"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nexport type InputAdornmentProps = JSXBase.HTMLAttributes<HTMLDivElement> & {\n\tposition?: 'start' | 'end';\n};\n\nconst InputAdornment: FC<InputAdornmentProps> = ({ position = 'start', class: className, ...other }, children) => {\n\tconst rootClassName = `kol-input-container__adornment`;\n\tconst positionClassName = `${rootClassName}--${position}`;\n\n\treturn (\n\t\t<div class={clsx(rootClassName, positionClassName, className)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nexport default InputAdornment;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport type { JSXBase, VNode } from '@stencil/core/internal';\nimport InputAdornment from '../InputAdornment';\nimport { checkHasMsg, type InternMsgPropType } from '../../schema';\n\ntype InputAdornmentType = VNode | VNode[] | null;\n\nexport type InputContainerProps = JSXBase.HTMLAttributes & {\n\tstartAdornment?: InputAdornmentType;\n\tendAdornment?: InputAdornmentType;\n\tdisabled?: boolean;\n\tmsg?: InternMsgPropType;\n\ttouched?: boolean;\n\n\tcontainerProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tstartAdornmentProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tendAdornmentProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n};\n\nfunction hasItems(items?: InputAdornmentType): boolean {\n\tif (!items) {\n\t\treturn false;\n\t}\n\n\treturn Array.isArray(items) ? items.length > 0 : Boolean(items);\n}\n\nconst Container: FC<JSXBase.HTMLAttributes<HTMLDivElement>> = ({ class: className, ...other }, children) => {\n\treturn (\n\t\t<div class={clsx('kol-input-container__container', className)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nconst KolInputContainerFc: FC<InputContainerProps> = (props, children) => {\n\tconst { class: classNames, startAdornment, endAdornment, disabled, msg, touched, containerProps, startAdornmentProps, endAdornmentProps, ...other } = props;\n\tconst showMsg = checkHasMsg(msg, touched);\n\n\tconst stateCssClasses = {\n\t\t['kol-input-container--disabled']: disabled,\n\t\t[`kol-input-container--${msg?.type || 'error'}`]: showMsg,\n\t};\n\n\tconst baseProps: JSXBase.HTMLAttributes<HTMLDivElement> = {\n\t\tclass: clsx('kol-input-container', stateCssClasses, classNames),\n\t\t...other,\n\t};\n\n\tif (!hasItems(startAdornment) && !hasItems(endAdornment)) {\n\t\treturn (\n\t\t\t<div {...baseProps}>\n\t\t\t\t<Container {...containerProps}>{children}</Container>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div {...baseProps}>\n\t\t\t<InputAdornment {...startAdornmentProps} position=\"start\">\n\t\t\t\t{startAdornment}\n\t\t\t</InputAdornment>\n\t\t\t<Container {...containerProps}>{children}</Container>\n\t\t\t<InputAdornment {...endAdornmentProps} position=\"end\">\n\t\t\t\t{endAdornment}\n\t\t\t</InputAdornment>\n\t\t</div>\n\t);\n};\n\nexport default KolInputContainerFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport type { InternalButtonProps } from '../../schema';\n\nexport type ButtonProps = Partial<InternalButtonProps> & {\n\tlabel: string;\n\tclass?: string;\n\tonClick?: (event: MouseEvent) => void;\n};\n\nconst KolButtonFc: FC<ButtonProps> = (props) => {\n\tconst { label, icons, hideLabel, disabled, onClick, ...other } = props;\n\n\treturn <KolButtonWcTag _label={label} _disabled={disabled} _icons={icons} _hideLabel={hideLabel} _on={{ onClick }} {...other} />;\n};\n\nexport default KolButtonFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolButtonFc, { type ButtonProps } from '../Button';\nimport KolIconFc, { type IconProps } from '../Icon';\nimport type { ButtonVariantPropType } from '../../schema';\n\ntype IconType = Partial<Omit<IconProps, 'icons'>> & {\n\tcomponentName: 'icon';\n\ticon?: string;\n\tclass?: string;\n\n\tonClick?: (event: MouseEvent) => void;\n};\n\ntype ButtonType = Partial<Omit<ButtonProps, 'icons'>> & {\n\tcomponentName: 'button';\n\ticon?: string;\n\tlabel?: string;\n\tclass?: string;\n\tbuttonVariant?: ButtonVariantPropType;\n\n\tonClick?: (event: MouseEvent) => void;\n};\n\nexport type IconButtonProps = IconType | ButtonType;\n\n/**\n * `KolIconButtonFc` is a functional component that renders either a Button or an Icon based on the provided props.\n *\n * Depending on the value of the `componentName` prop, either a Button (`KolButtonFc`) or an Icon (`KolIconFc`) is rendered.\n * Both components support optional `icon` props for displaying an icon and an optional `onClick` handler for user interactions.\n *\n * This component combines the flexibility of rendering either a button with an optional label or a simple icon, while ensuring that unnecessary props for the selected element are not passed.\n *\n * Supported props:\n * - `componentName`: Specifies whether a 'button' or 'icon' should be rendered. Default is 'button'.\n * - `label`: An optional label, which is only shown for Buttons.\n * - `icon`: The name of the icon (e.g., \"home\", \"edit\") or the Codicon class used for the icon display.\n * - `class`: Optional CSS class for additional styling customization.\n * - `buttonVariant`: Variant for the button component.\n * - `onClick`: Optional click handler for user interactions.\n *\n * Example usage:\n * ```tsx\n * <KolIconButtonFc componentName=\"button\" label=\"Submit\" icon=\"check\" onClick={handleClick} />\n * <KolIconButtonFc componentName=\"icon\" icon=\"alert\" onClick={handleClick} />\n * ```\n *\n * @param {IconButtonProps} props - The properties that customize the component, including the selection of the component type (Button or Icon) and other specific attributes.\n * @returns {JSX.Element} - The rendered JSX element (Button or Icon).\n */\nconst KolIconButtonFc: FC<IconButtonProps> = (props) => {\n\tconst { componentName = 'button', label, icon, onClick, ...other } = props;\n\tconst Component = componentName === 'button' ? KolButtonFc : KolIconFc;\n\n\treturn <Component label={label || ''} hideLabel icons={`codicon codicon-${icon}`} onClick={onClick} {...other} />;\n};\n\nexport default KolIconButtonFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { InternMsgPropType } from '../../schema';\nimport {\n\ttype ButtonProps,\n\ttype IconOrIconClass,\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype KoliBriHorizontalIcons,\n\ttype TextareaStates,\n\ttype SelectStates,\n\tconvertMsgToInternMsg,\n} from '../../schema';\n\nimport KolInputContainerFc, { type InputContainerProps } from '../../functional-components/InputContainer';\nimport KolIconButtonFc from '../../functional-components/IconButton';\nimport { isObject, isString } from 'lodash-es';\n\ntype InputState =\n\t| TextareaStates\n\t| SelectStates\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates;\n\nexport type InputContainerStateWrapperProps = Partial<InputContainerProps> & {\n\tstate: InputState;\n};\n\nfunction getInputContainerProps(state: InputState): {\n\ticons?: KoliBriHorizontalIcons;\n\tsmartButton?: ButtonProps;\n\tdisabled?: boolean;\n\tmsg?: InternMsgPropType;\n\ttouched?: boolean;\n} {\n\tlet icons: KoliBriHorizontalIcons | undefined = undefined;\n\tlet smartButton: ButtonProps | undefined;\n\n\tif ('_icons' in state) {\n\t\ticons = state._icons;\n\t}\n\n\tif ('_smartButton' in state) {\n\t\tsmartButton = state._smartButton;\n\t}\n\n\treturn {\n\t\ticons,\n\t\tsmartButton,\n\t\tdisabled: state._disabled,\n\t\tmsg: convertMsgToInternMsg(state._msg),\n\t\ttouched: state._touched,\n\t};\n}\n\nconst InputContainerStateWrapperFc: FC<InputContainerStateWrapperProps> = ({ state, endAdornment: defaultEndAdornment }, children) => {\n\tconst { icons, smartButton, disabled, msg, touched } = getInputContainerProps(state);\n\n\tlet leftIconProps: IconOrIconClass | undefined = icons?.left;\n\tif (isString(leftIconProps)) {\n\t\tleftIconProps = { icon: leftIconProps };\n\t}\n\n\tlet rightIconProps: IconOrIconClass | undefined = icons?.right;\n\tif (isString(rightIconProps)) {\n\t\trightIconProps = { icon: rightIconProps };\n\t}\n\n\tconst startAdornment = [];\n\tconst endAdornment = [];\n\n\tif (defaultEndAdornment) {\n\t\tif (Array.isArray(defaultEndAdornment)) {\n\t\t\tendAdornment.push(...defaultEndAdornment);\n\t\t} else {\n\t\t\tendAdornment.push(defaultEndAdornment);\n\t\t}\n\t}\n\n\tif (leftIconProps) {\n\t\tstartAdornment.push(<KolIconButtonFc componentName=\"icon\" class=\"kol-input-container__icon\" {...(isObject(leftIconProps) ? leftIconProps : {})} />);\n\t}\n\n\tif (isObject(smartButton)) {\n\t\tendAdornment.push(\n\t\t\t<KolIconButtonFc componentName=\"button\" class=\"kol-input-container__smart-button\" {...smartButton} hideLabel={true} disabled={disabled} />,\n\t\t);\n\t}\n\n\tif (rightIconProps) {\n\t\tendAdornment.push(<KolIconButtonFc componentName=\"icon\" class=\"kol-input-container__icon\" {...(isObject(rightIconProps) ? rightIconProps : {})} />);\n\t}\n\n\treturn (\n\t\t<KolInputContainerFc disabled={disabled} msg={msg} touched={touched} startAdornment={startAdornment} endAdornment={endAdornment}>\n\t\t\t{children}\n\t\t</KolInputContainerFc>\n\t);\n};\n\nexport default InputContainerStateWrapperFc;\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { IconsHorizontalPropType, NumberString } from '../../../schema';\nimport { watchValidator } from '../../../schema';\nimport { validateIcons } from '../../../schema';\n\nimport { InputController } from './controller';\n\nimport type { Props, Watches } from './types-icon';\n\nexport class InputIconController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate readonly numberStringRegex = /^\\d+(\\.\\d+)?$/; // https://regex101.com/r/mET6Tx/1\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateIcons(value?: IconsHorizontalPropType): void {\n\t\tvalidateIcons(this.component, value);\n\t}\n\n\tpublic isNumberString(value: unknown): value is NumberString {\n\t\treturn typeof value === 'string' && this.numberStringRegex.test(value);\n\t}\n\n\tprotected readonly parseToNumber = (value?: number | NumberString | null): number | null => {\n\t\tif (typeof value === 'number') {\n\t\t\treturn isNaN(value) ? null : value;\n\t\t}\n\t\tif (this.isNumberString(value)) {\n\t\t\treturn parseFloat(value);\n\t\t}\n\t\treturn null;\n\t};\n\n\tprotected readonly validateNumber = (propName: string, value?: number | NumberString | null) => {\n\t\treturn watchValidator(\n\t\t\tthis.component,\n\t\t\tpropName,\n\t\t\t(value): boolean =>\n\t\t\t\tvalue === undefined || value === null || typeof value === 'number' || (typeof value === 'string' && this.numberStringRegex.test(value)),\n\t\t\tnew Set(['number', 'NumberString']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: (value: unknown, nextState) => {\n\t\t\t\t\t\tif (nextState?.has(propName)) {\n\t\t\t\t\t\t\tnextState?.set(propName, this.parseToNumber(value as number | NumberString | null));\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateIcons(this.component._icons);\n\t}\n}\n"],"names":["__rest","h","clsx","checkHasMsg","KolButtonWcTag","KolIconFc","convertMsgToInternMsg","isString","isObject","InputController","watchValid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,cAAc,CAAC,KAAc,EAAA;AACnC,QAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC;;IAiChE,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;AAE1C;;;;;;"}
1
+ {"version":3,"file":"controller-icon-BFVf_6RR.js","sources":["src/functional-components/InputAdornment/InputAdornment.tsx","src/functional-components/InputContainer/InputContainer.tsx","src/functional-components/Button/Button.tsx","src/functional-components/IconButton/IconButton.tsx","src/functional-component-wrappers/InputContainerStateWrapper/InputContainerStateWrapper.tsx","src/components/@deprecated/input/controller-icon.ts"],"sourcesContent":["import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { JSXBase } from '@stencil/core/internal';\nimport clsx from 'clsx';\n\nexport type InputAdornmentProps = JSXBase.HTMLAttributes<HTMLDivElement> & {\n\tposition?: 'start' | 'end';\n};\n\nconst InputAdornment: FC<InputAdornmentProps> = ({ position = 'start', class: className, ...other }, children) => {\n\tconst rootClassName = `kol-input-container__adornment`;\n\tconst positionClassName = `${rootClassName}--${position}`;\n\n\treturn (\n\t\t<div class={clsx(rootClassName, positionClassName, className)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nexport default InputAdornment;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport clsx from 'clsx';\nimport type { JSXBase, VNode } from '@stencil/core/internal';\nimport InputAdornment from '../InputAdornment';\nimport { checkHasMsg, type InternMsgPropType } from '../../schema';\n\ntype InputAdornmentType = VNode | VNode[] | null;\n\nexport type InputContainerProps = JSXBase.HTMLAttributes & {\n\tstartAdornment?: InputAdornmentType;\n\tendAdornment?: InputAdornmentType;\n\tdisabled?: boolean;\n\tmsg?: InternMsgPropType;\n\ttouched?: boolean;\n\n\tcontainerProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tstartAdornmentProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n\tendAdornmentProps?: JSXBase.HTMLAttributes<HTMLDivElement>;\n};\n\nfunction hasItems(items?: InputAdornmentType): boolean {\n\tif (!items) {\n\t\treturn false;\n\t}\n\n\treturn Array.isArray(items) ? items.length > 0 : Boolean(items);\n}\n\nconst Container: FC<JSXBase.HTMLAttributes<HTMLDivElement>> = ({ class: className, ...other }, children) => {\n\treturn (\n\t\t<div class={clsx('kol-input-container__container', className)} {...other}>\n\t\t\t{children}\n\t\t</div>\n\t);\n};\n\nconst KolInputContainerFc: FC<InputContainerProps> = (props, children) => {\n\tconst { class: classNames, startAdornment, endAdornment, disabled, msg, touched, containerProps, startAdornmentProps, endAdornmentProps, ...other } = props;\n\tconst showMsg = checkHasMsg(msg, touched);\n\n\tconst stateCssClasses = {\n\t\t['kol-input-container--disabled']: disabled,\n\t\t[`kol-input-container--${msg?.type || 'error'}`]: showMsg,\n\t};\n\n\tconst baseProps: JSXBase.HTMLAttributes<HTMLDivElement> = {\n\t\tclass: clsx('kol-input-container', stateCssClasses, classNames),\n\t\t...other,\n\t};\n\n\tif (!hasItems(startAdornment) && !hasItems(endAdornment)) {\n\t\treturn (\n\t\t\t<div {...baseProps}>\n\t\t\t\t<Container {...containerProps}>{children}</Container>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div {...baseProps}>\n\t\t\t<InputAdornment {...startAdornmentProps} position=\"start\">\n\t\t\t\t{startAdornment}\n\t\t\t</InputAdornment>\n\t\t\t<Container {...containerProps}>{children}</Container>\n\t\t\t<InputAdornment {...endAdornmentProps} position=\"end\">\n\t\t\t\t{endAdornment}\n\t\t\t</InputAdornment>\n\t\t</div>\n\t);\n};\n\nexport default KolInputContainerFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport { KolButtonWcTag } from '../../core/component-names';\nimport type { InternalButtonProps } from '../../schema';\n\nexport type ButtonProps = Partial<InternalButtonProps> & {\n\tlabel: string;\n\tclass?: string;\n\tonClick?: (event: MouseEvent) => void;\n};\n\nconst KolButtonFc: FC<ButtonProps> = (props) => {\n\tconst { label, icons, hideLabel, disabled, onClick, ...other } = props;\n\n\treturn <KolButtonWcTag _label={label} _disabled={disabled} _icons={icons} _hideLabel={hideLabel} _on={{ onClick }} {...other} />;\n};\n\nexport default KolButtonFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport KolButtonFc, { type ButtonProps } from '../Button';\nimport KolIconFc, { type IconProps } from '../Icon';\nimport type { ButtonVariantPropType } from '../../schema';\n\ntype IconType = Partial<Omit<IconProps, 'icons'>> & {\n\tcomponentName: 'icon';\n\ticon?: string;\n\tclass?: string;\n\n\tonClick?: (event: MouseEvent) => void;\n};\n\ntype ButtonType = Partial<Omit<ButtonProps, 'icons'>> & {\n\tcomponentName: 'button';\n\ticon?: string;\n\tlabel?: string;\n\tclass?: string;\n\tbuttonVariant?: ButtonVariantPropType;\n\n\tonClick?: (event: MouseEvent) => void;\n};\n\nexport type IconButtonProps = IconType | ButtonType;\n\n/**\n * `KolIconButtonFc` is a functional component that renders either a Button or an Icon based on the provided props.\n *\n * Depending on the value of the `componentName` prop, either a Button (`KolButtonFc`) or an Icon (`KolIconFc`) is rendered.\n * Both components support optional `icon` props for displaying an icon and an optional `onClick` handler for user interactions.\n *\n * This component combines the flexibility of rendering either a button with an optional label or a simple icon, while ensuring that unnecessary props for the selected element are not passed.\n *\n * Supported props:\n * - `componentName`: Specifies whether a 'button' or 'icon' should be rendered. Default is 'button'.\n * - `label`: An optional label, which is only shown for Buttons.\n * - `icon`: The name of the icon (e.g., \"home\", \"edit\") or the Codicon class used for the icon display.\n * - `class`: Optional CSS class for additional styling customization.\n * - `buttonVariant`: Variant for the button component.\n * - `onClick`: Optional click handler for user interactions.\n *\n * Example usage:\n * ```tsx\n * <KolIconButtonFc componentName=\"button\" label=\"Submit\" icon=\"check\" onClick={handleClick} />\n * <KolIconButtonFc componentName=\"icon\" icon=\"alert\" onClick={handleClick} />\n * ```\n *\n * @param {IconButtonProps} props - The properties that customize the component, including the selection of the component type (Button or Icon) and other specific attributes.\n * @returns {JSX.Element} - The rendered JSX element (Button or Icon).\n */\nconst KolIconButtonFc: FC<IconButtonProps> = (props) => {\n\tconst { componentName = 'button', label, icon, onClick, ...other } = props;\n\tconst Component = componentName === 'button' ? KolButtonFc : KolIconFc;\n\n\treturn <Component label={label || ''} hideLabel icons={`codicon codicon-${icon}`} onClick={onClick} {...other} />;\n};\n\nexport default KolIconButtonFc;\n","import { h, type FunctionalComponent as FC } from '@stencil/core';\nimport type { InternMsgPropType } from '../../schema';\nimport {\n\ttype ButtonProps,\n\ttype IconOrIconClass,\n\ttype InputColorStates,\n\ttype InputEmailStates,\n\ttype InputFileStates,\n\ttype InputNumberStates,\n\ttype InputPasswordStates,\n\ttype InputRangeStates,\n\ttype InputTextStates,\n\ttype KoliBriHorizontalIcons,\n\ttype TextareaStates,\n\ttype SelectStates,\n\tconvertMsgToInternMsg,\n} from '../../schema';\n\nimport KolInputContainerFc, { type InputContainerProps } from '../../functional-components/InputContainer';\nimport KolIconButtonFc from '../../functional-components/IconButton';\nimport { isObject, isString } from 'lodash-es';\n\ntype InputState =\n\t| TextareaStates\n\t| SelectStates\n\t| InputTextStates\n\t| InputEmailStates\n\t| InputPasswordStates\n\t| InputNumberStates\n\t| InputColorStates\n\t| InputFileStates\n\t| InputRangeStates;\n\nexport type InputContainerStateWrapperProps = Partial<InputContainerProps> & {\n\tstate: InputState;\n};\n\nfunction getInputContainerProps(state: InputState): {\n\ticons?: KoliBriHorizontalIcons;\n\tsmartButton?: ButtonProps;\n\tdisabled?: boolean;\n\tmsg?: InternMsgPropType;\n\ttouched?: boolean;\n} {\n\tlet icons: KoliBriHorizontalIcons | undefined = undefined;\n\tlet smartButton: ButtonProps | undefined;\n\n\tif ('_icons' in state) {\n\t\ticons = state._icons;\n\t}\n\n\tif ('_smartButton' in state) {\n\t\tsmartButton = state._smartButton;\n\t}\n\n\treturn {\n\t\ticons,\n\t\tsmartButton,\n\t\tdisabled: state._disabled,\n\t\tmsg: convertMsgToInternMsg(state._msg),\n\t\ttouched: state._touched,\n\t};\n}\n\nconst InputContainerStateWrapperFc: FC<InputContainerStateWrapperProps> = ({ state, endAdornment: defaultEndAdornment }, children) => {\n\tconst { icons, smartButton, disabled, msg, touched } = getInputContainerProps(state);\n\n\tlet leftIconProps: IconOrIconClass | undefined = icons?.left;\n\tif (isString(leftIconProps)) {\n\t\tleftIconProps = { icon: leftIconProps };\n\t}\n\n\tlet rightIconProps: IconOrIconClass | undefined = icons?.right;\n\tif (isString(rightIconProps)) {\n\t\trightIconProps = { icon: rightIconProps };\n\t}\n\n\tconst startAdornment = [];\n\tconst endAdornment = [];\n\n\tif (defaultEndAdornment) {\n\t\tif (Array.isArray(defaultEndAdornment)) {\n\t\t\tendAdornment.push(...defaultEndAdornment);\n\t\t} else {\n\t\t\tendAdornment.push(defaultEndAdornment);\n\t\t}\n\t}\n\n\tif (leftIconProps) {\n\t\tstartAdornment.push(<KolIconButtonFc componentName=\"icon\" class=\"kol-input-container__icon\" {...(isObject(leftIconProps) ? leftIconProps : {})} />);\n\t}\n\n\tif (isObject(smartButton)) {\n\t\tendAdornment.push(\n\t\t\t<KolIconButtonFc componentName=\"button\" class=\"kol-input-container__smart-button\" {...smartButton} hideLabel={true} disabled={disabled} />,\n\t\t);\n\t}\n\n\tif (rightIconProps) {\n\t\tendAdornment.push(<KolIconButtonFc componentName=\"icon\" class=\"kol-input-container__icon\" {...(isObject(rightIconProps) ? rightIconProps : {})} />);\n\t}\n\n\treturn (\n\t\t<KolInputContainerFc disabled={disabled} msg={msg} touched={touched} startAdornment={startAdornment} endAdornment={endAdornment}>\n\t\t\t{children}\n\t\t</KolInputContainerFc>\n\t);\n};\n\nexport default InputContainerStateWrapperFc;\n","import type { Generic } from 'adopted-style-sheets';\n\nimport type { IconsHorizontalPropType, NumberString } from '../../../schema';\nimport { watchValidator } from '../../../schema';\nimport { validateIcons } from '../../../schema';\n\nimport { InputController } from './controller';\n\nimport type { Props, Watches } from './types-icon';\n\nexport class InputIconController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\n\tprivate readonly numberStringRegex = /^\\d+(\\.\\d+)?$/; // https://regex101.com/r/mET6Tx/1\n\n\tpublic constructor(component: Generic.Element.Component & Props, name: string, host?: HTMLElement) {\n\t\tsuper(component, name, host);\n\t\tthis.component = component;\n\t}\n\n\tpublic validateIcons(value?: IconsHorizontalPropType): void {\n\t\tvalidateIcons(this.component, value);\n\t}\n\n\tpublic isNumberString(value: unknown): value is NumberString {\n\t\treturn typeof value === 'string' && this.numberStringRegex.test(value);\n\t}\n\n\tprotected readonly parseToNumber = (value?: number | NumberString | null): number | null => {\n\t\tif (typeof value === 'number') {\n\t\t\treturn isNaN(value) ? null : value;\n\t\t}\n\t\tif (this.isNumberString(value)) {\n\t\t\treturn parseFloat(value);\n\t\t}\n\t\treturn null;\n\t};\n\n\tprotected readonly validateNumber = (propName: string, value?: number | NumberString | null) => {\n\t\treturn watchValidator(\n\t\t\tthis.component,\n\t\t\tpropName,\n\t\t\t(value): boolean =>\n\t\t\t\tvalue === undefined || value === null || typeof value === 'number' || (typeof value === 'string' && this.numberStringRegex.test(value)),\n\t\t\tnew Set(['number', 'NumberString']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\thooks: {\n\t\t\t\t\tbeforePatch: (value: unknown, nextState) => {\n\t\t\t\t\t\tif (nextState?.has(propName)) {\n\t\t\t\t\t\t\tnextState?.set(propName, this.parseToNumber(value as number | NumberString | null));\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t};\n\n\tpublic componentWillLoad(): void {\n\t\tsuper.componentWillLoad();\n\t\tthis.validateIcons(this.component._icons);\n\t}\n}\n"],"names":["__rest","h","clsx","checkHasMsg","KolButtonWcTag","KolIconFc","convertMsgToInternMsg","isString","isObject","InputController","watchValidator","validateIcons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AAC,KAAc,EAAA;AACnC,QAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC;;IAiChE,iBAAiB,GAAA;QACvB,KAAK,CAAC,iBAAiB,EAAE;QACzB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC;;AAE1C;;;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var common=require("./common-BHv-S8J5.js"),index=require("./index-BHqiFoBU.js");const initMeta=()=>{const e=common.getDocument().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const o=e.getAttribute("content");"string"==typeof o&&(common.setDevMode(o.includes("dev-mode=true")),common.setExperimentalMode(o.includes("experimental-mode=true")),common.setColorContrastAnalysis(o.includes("color-contrast-analysis=true")))}},getKoliBri=()=>{let e=common.getWindow().KoliBri;return void 0===e&&(e={},Object.defineProperty(common.getWindow(),"KoliBri",{value:e,writable:!1})),e},initKoliBri=()=>{initMeta(),common.Log.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${index.Env.kolibriVersion}\n\t`,{forceLog:!0})},renderDevAdvice=()=>{!0!==getKoliBri().adviceShown&&(Object.defineProperty(getKoliBri(),"adviceShown",{get:function(){return!0}}),common.Log.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};exports.nonce=()=>Math.floor(16777215*Math.random()).toString(16),"test"===common.processEnv&&(exports.nonce=()=>"nonce"),exports.initKoliBri=initKoliBri,exports.renderDevAdvice=renderDevAdvice;
4
+ "use strict";var common=require("./common-BHv-S8J5.js"),index=require("./index-CIQC-OQ4.js");const initMeta=()=>{const e=common.getDocument().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const o=e.getAttribute("content");"string"==typeof o&&(common.setDevMode(o.includes("dev-mode=true")),common.setExperimentalMode(o.includes("experimental-mode=true")),common.setColorContrastAnalysis(o.includes("color-contrast-analysis=true")))}},getKoliBri=()=>{let e=common.getWindow().KoliBri;return void 0===e&&(e={},Object.defineProperty(common.getWindow(),"KoliBri",{value:e,writable:!1})),e},initKoliBri=()=>{initMeta(),common.Log.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${index.Env.kolibriVersion}\n\t`,{forceLog:!0})},renderDevAdvice=()=>{!0!==getKoliBri().adviceShown&&(Object.defineProperty(getKoliBri(),"adviceShown",{get:function(){return!0}}),common.Log.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};exports.nonce=()=>Math.floor(16777215*Math.random()).toString(16),"test"===common.processEnv&&(exports.nonce=()=>"nonce"),exports.initKoliBri=initKoliBri,exports.renderDevAdvice=renderDevAdvice;
@@ -1 +1 @@
1
- {"version":3,"file":"dev.utils-qFfdScN_.js","sources":["src/utils/dev.utils.ts"],"sourcesContent":["import { Log, getDocument, processEnv, setColorContrastAnalysis, setDevMode, setExperimentalMode } from '../schema';\n\nimport { getWindow } from '../schema';\nimport { Env } from '@stencil/core';\n\nconst initMeta = (): void => {\n\tconst meta = getDocument().querySelector('meta[name=\"kolibri\"]');\n\tif (meta && meta.hasAttribute('content')) {\n\t\tconst content = meta.getAttribute('content');\n\t\tif (typeof content === 'string') {\n\t\t\tsetDevMode(content.includes('dev-mode=true'));\n\t\t\tsetExperimentalMode(content.includes('experimental-mode=true'));\n\t\t\tsetColorContrastAnalysis(content.includes('color-contrast-analysis=true'));\n\t\t}\n\t}\n};\n\nconst getKoliBri = (): Record<string, unknown> => {\n\tlet kolibri = getWindow().KoliBri;\n\tif (kolibri === undefined) {\n\t\tkolibri = {};\n\t\tObject.defineProperty(getWindow(), 'KoliBri', {\n\t\t\tvalue: kolibri,\n\t\t\twritable: false,\n\t\t});\n\t}\n\treturn kolibri;\n};\n\nexport { getKoliBri };\n\nexport const initKoliBri = (): void => {\n\tinitMeta();\n\tLog.debug(\n\t\t`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \\`--' | |) /_ ,--.--. \\`--'\n| . ' | .-. | | | ,--. | .-. \\\\ | .--' ,--.\n| |\\\\ \\\\ | '-' | | | | | | '--' / | | | |\n\\`--' \\`--´ \\`---´ \\`--' \\`--' \\`------´ \\`--' \\`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${Env.kolibriVersion}\n\t`,\n\t\t{\n\t\t\tforceLog: true,\n\t\t},\n\t);\n};\n\nexport const renderDevAdvice = (): void => {\n\tif (getKoliBri().adviceShown !== true) {\n\t\tObject.defineProperty(getKoliBri(), 'adviceShown', {\n\t\t\tget: function () {\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t\tLog.debug(\n\t\t\t`\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n`,\n\t\t);\n\t}\n};\n\nlet nonce = (): string => Math.floor(Math.random() * 16777215).toString(16);\n\nif (processEnv === 'test') {\n\tnonce = (): string => 'nonce';\n}\n\nexport { nonce };\n"],"names":["getDocument","setDevMode","setExperimentalMode","setColorContrastAnalysis","getWindow","Log","Env","nonce","processEnv"],"mappings":";;;;;;;;AAKA,MAAM,QAAQ,GAAG,MAAW;IAC3B,MAAM,IAAI,GAAGA,kBAAW,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC;IAChE,IAAI,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC;AAC5C,QAAA,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAChCC,iBAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;YAC7CC,0BAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;YAC/DC,+BAAwB,CAAC,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC;;;AAG7E,CAAC;AAED,MAAM,UAAU,GAAG,MAA8B;AAChD,IAAA,IAAI,OAAO,GAAGC,gBAAS,EAAE,CAAC,OAAO;AACjC,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;QAC1B,OAAO,GAAG,EAAE;AACZ,QAAA,MAAM,CAAC,cAAc,CAACA,gBAAS,EAAE,EAAE,SAAS,EAAE;AAC7C,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,QAAQ,EAAE,KAAK;AACf,SAAA,CAAC;;AAEH,IAAA,OAAO,OAAO;AACf,CAAC;AAIM,MAAM,WAAW,GAAG,MAAW;AACrC,IAAA,QAAQ,EAAE;IACVC,UAAG,CAAC,KAAK,CACR;;;;;;AAMmE,mEAAA,EAAAC,SAAG,CAAC,cAAc;EACrF,EACA;AACC,QAAA,QAAQ,EAAE,IAAI;AACd,KAAA,CACD;AACF;AAEO,MAAM,eAAe,GAAG,MAAW;AACzC,IAAA,IAAI,UAAU,EAAE,CAAC,WAAW,KAAK,IAAI,EAAE;AACtC,QAAA,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE;AAClD,YAAA,GAAG,EAAE,YAAA;AACJ,gBAAA,OAAO,IAAI;aACX;AACD,SAAA,CAAC;QACFD,UAAG,CAAC,KAAK,CACR;;;;;AAKF,CAAA,CACE;;AAEH;AAEIE,aAAK,GAAG,MAAc,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE;AAE1E,IAAIC,iBAAU,KAAK,MAAM,EAAE;AAC1B,IAAAD,aAAK,GAAG,MAAc,OAAO;AAC9B;;;;;"}
1
+ {"version":3,"file":"dev.utils-6X4JLbGB.js","sources":["src/utils/dev.utils.ts"],"sourcesContent":["import { Log, getDocument, processEnv, setColorContrastAnalysis, setDevMode, setExperimentalMode } from '../schema';\n\nimport { getWindow } from '../schema';\nimport { Env } from '@stencil/core';\n\nconst initMeta = (): void => {\n\tconst meta = getDocument().querySelector('meta[name=\"kolibri\"]');\n\tif (meta && meta.hasAttribute('content')) {\n\t\tconst content = meta.getAttribute('content');\n\t\tif (typeof content === 'string') {\n\t\t\tsetDevMode(content.includes('dev-mode=true'));\n\t\t\tsetExperimentalMode(content.includes('experimental-mode=true'));\n\t\t\tsetColorContrastAnalysis(content.includes('color-contrast-analysis=true'));\n\t\t}\n\t}\n};\n\nconst getKoliBri = (): Record<string, unknown> => {\n\tlet kolibri = getWindow().KoliBri;\n\tif (kolibri === undefined) {\n\t\tkolibri = {};\n\t\tObject.defineProperty(getWindow(), 'KoliBri', {\n\t\t\tvalue: kolibri,\n\t\t\twritable: false,\n\t\t});\n\t}\n\treturn kolibri;\n};\n\nexport { getKoliBri };\n\nexport const initKoliBri = (): void => {\n\tinitMeta();\n\tLog.debug(\n\t\t`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \\`--' | |) /_ ,--.--. \\`--'\n| . ' | .-. | | | ,--. | .-. \\\\ | .--' ,--.\n| |\\\\ \\\\ | '-' | | | | | | '--' / | | | |\n\\`--' \\`--´ \\`---´ \\`--' \\`--' \\`------´ \\`--' \\`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${Env.kolibriVersion}\n\t`,\n\t\t{\n\t\t\tforceLog: true,\n\t\t},\n\t);\n};\n\nexport const renderDevAdvice = (): void => {\n\tif (getKoliBri().adviceShown !== true) {\n\t\tObject.defineProperty(getKoliBri(), 'adviceShown', {\n\t\t\tget: function () {\n\t\t\t\treturn true;\n\t\t\t},\n\t\t});\n\t\tLog.debug(\n\t\t\t`\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n`,\n\t\t);\n\t}\n};\n\nlet nonce = (): string => Math.floor(Math.random() * 16777215).toString(16);\n\nif (processEnv === 'test') {\n\tnonce = (): string => 'nonce';\n}\n\nexport { nonce };\n"],"names":["getDocument","setDevMode","setExperimentalMode","setColorContrastAnalysis","getWindow","Log","Env","nonce","processEnv"],"mappings":";;;;;;;;AAKA,MAAM,QAAQ,GAAG,MAAW;IAC3B,MAAM,IAAI,GAAGA,kBAAW,EAAE,CAAC,aAAa,CAAC,sBAAsB,CAAC;IAChE,IAAI,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC;AAC5C,QAAA,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAChCC,iBAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;YAC7CC,0BAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;YAC/DC,+BAAwB,CAAC,OAAO,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC;;;AAG7E,CAAC;AAED,MAAM,UAAU,GAAG,MAA8B;AAChD,IAAA,IAAI,OAAO,GAAGC,gBAAS,EAAE,CAAC,OAAO;AACjC,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;QAC1B,OAAO,GAAG,EAAE;AACZ,QAAA,MAAM,CAAC,cAAc,CAACA,gBAAS,EAAE,EAAE,SAAS,EAAE;AAC7C,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,QAAQ,EAAE,KAAK;AACf,SAAA,CAAC;;AAEH,IAAA,OAAO,OAAO;AACf,CAAC;AAIM,MAAM,WAAW,GAAG,MAAW;AACrC,IAAA,QAAQ,EAAE;IACVC,UAAG,CAAC,KAAK,CACR;;;;;;AAMmE,mEAAA,EAAAC,SAAG,CAAC,cAAc;EACrF,EACA;AACC,QAAA,QAAQ,EAAE,IAAI;AACd,KAAA,CACD;AACF;AAEO,MAAM,eAAe,GAAG,MAAW;AACzC,IAAA,IAAI,UAAU,EAAE,CAAC,WAAW,KAAK,IAAI,EAAE;AACtC,QAAA,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE;AAClD,YAAA,GAAG,EAAE,YAAA;AACJ,gBAAA,OAAO,IAAI;aACX;AACD,SAAA,CAAC;QACFD,UAAG,CAAC,KAAK,CACR;;;;;AAKF,CAAA,CACE;;AAEH;AAEIE,aAAK,GAAG,MAAc,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAE;AAE1E,IAAIC,iBAAU,KAAK,MAAM,EAAE;AAC1B,IAAAD,aAAK,GAAG,MAAc,OAAO;AAC9B;;;;;"}
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - The accessible HTML-Standard
3
3
  */
4
- "use strict";var common=require("./common-BHv-S8J5.js"),dev_utils=require("./dev.utils-qFfdScN_.js");require("./index-BHqiFoBU.js");const getKoliBri=()=>{let o=common.getWindow().KoliBri;return void 0===o&&(o={},Object.defineProperty(common.getWindow(),"KoliBri",{value:o,writable:!1})),o};function prototypeKoliBri(o,e){try{Object.defineProperty(getKoliBri(),o,{get:function(){return e}})}catch(e){common.Log.debug(`KoliBri property ${o} is already bind.`)}}const metaModeLog=(o,e)=>common.Log.debug(`${o} ${e?"":"not "}activated`),initialize=()=>{if(dev_utils.initKoliBri(),common.getDevMode()){dev_utils.renderDevAdvice(),prototypeKoliBri("a11yColorContrast",common.koliBriA11yColorContrast),prototypeKoliBri("querySelector",common.koliBriQuerySelector),prototypeKoliBri("querySelectorAll",common.koliBriQuerySelectorAll),prototypeKoliBri("querySelectorColors",common.koliBriQuerySelectorColors),prototypeKoliBri("utils",(function(){return common.KoliBriUtils})),prototypeKoliBri("parseJson",common.parseJson),prototypeKoliBri("stringifyJson",common.stringifyJson);const o=common.getDocument().body,e=common.getDocument().createElement("svg");if(e.setAttribute("aria-label","KoliBri-DevTools"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("role","toolbar"),e.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),e.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',common.getDocument().body.appendChild(e),metaModeLog("Development mode",common.getDevMode()),metaModeLog("Experimental mode",common.getExperimentalMode()),metaModeLog("Color contrast analysis",common.getColorContrastAnalysis()),common.getColorContrastAnalysis()){const e=setTimeout((()=>{clearTimeout(e),setInterval((()=>{common.KoliBriUtils.queryHtmlElementColors(common.getDocument().createElement("div"),common.koliBriA11yColorContrast(o),!1,!1)}),1e4)}),2500)}}};exports.initialize=initialize;
4
+ "use strict";var common=require("./common-BHv-S8J5.js"),dev_utils=require("./dev.utils-6X4JLbGB.js");require("./index-CIQC-OQ4.js");const getKoliBri=()=>{let o=common.getWindow().KoliBri;return void 0===o&&(o={},Object.defineProperty(common.getWindow(),"KoliBri",{value:o,writable:!1})),o};function prototypeKoliBri(o,e){try{Object.defineProperty(getKoliBri(),o,{get:function(){return e}})}catch(e){common.Log.debug(`KoliBri property ${o} is already bind.`)}}const metaModeLog=(o,e)=>common.Log.debug(`${o} ${e?"":"not "}activated`),initialize=()=>{if(dev_utils.initKoliBri(),common.getDevMode()){dev_utils.renderDevAdvice(),prototypeKoliBri("a11yColorContrast",common.koliBriA11yColorContrast),prototypeKoliBri("querySelector",common.koliBriQuerySelector),prototypeKoliBri("querySelectorAll",common.koliBriQuerySelectorAll),prototypeKoliBri("querySelectorColors",common.koliBriQuerySelectorColors),prototypeKoliBri("utils",(function(){return common.KoliBriUtils})),prototypeKoliBri("parseJson",common.parseJson),prototypeKoliBri("stringifyJson",common.stringifyJson);const o=common.getDocument().body,e=common.getDocument().createElement("svg");if(e.setAttribute("aria-label","KoliBri-DevTools"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("role","toolbar"),e.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),e.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',common.getDocument().body.appendChild(e),metaModeLog("Development mode",common.getDevMode()),metaModeLog("Experimental mode",common.getExperimentalMode()),metaModeLog("Color contrast analysis",common.getColorContrastAnalysis()),common.getColorContrastAnalysis()){const e=setTimeout((()=>{clearTimeout(e),setInterval((()=>{common.KoliBriUtils.queryHtmlElementColors(common.getDocument().createElement("div"),common.koliBriA11yColorContrast(o),!1,!1)}),1e4)}),2500)}}};exports.initialize=initialize;
@@ -1 +1 @@
1
- {"version":3,"file":"devtools-C4AfIMLp.js","sources":["src/global/devtools.ts"],"sourcesContent":["import {\n\tgetColorContrastAnalysis,\n\tgetDevMode,\n\tgetDocument,\n\tgetExperimentalMode,\n\tgetWindow,\n\tkoliBriA11yColorContrast,\n\tkoliBriQuerySelector,\n\tkoliBriQuerySelectorAll,\n\tkoliBriQuerySelectorColors,\n\tKoliBriUtils,\n\tLog,\n\tparseJson,\n\tstringifyJson,\n} from '../schema';\nimport { initKoliBri, renderDevAdvice } from '../utils/dev.utils';\n\nconst getKoliBri = (): Record<string, unknown> => {\n\tlet kolibri = getWindow().KoliBri;\n\tif (kolibri === undefined) {\n\t\tkolibri = {};\n\t\tObject.defineProperty(getWindow(), 'KoliBri', {\n\t\t\tvalue: kolibri,\n\t\t\twritable: false,\n\t\t});\n\t}\n\treturn kolibri;\n};\n\nfunction prototypeKoliBri<T>(name: string, cb: T) {\n\ttry {\n\t\tObject.defineProperty(getKoliBri(), name, {\n\t\t\tget: function () {\n\t\t\t\treturn cb;\n\t\t\t},\n\t\t});\n\t} catch (e) {\n\t\tLog.debug(`KoliBri property ${name} is already bind.`);\n\t}\n}\n\nconst metaModeLog = (name: string, active: boolean) => Log.debug(`${name} ${active ? '' : 'not '}activated`);\n\nexport const initialize = (): void => {\n\tinitKoliBri();\n\tif (getDevMode()) {\n\t\trenderDevAdvice();\n\n\t\tprototypeKoliBri('a11yColorContrast', koliBriA11yColorContrast);\n\t\tprototypeKoliBri('querySelector', koliBriQuerySelector);\n\t\tprototypeKoliBri('querySelectorAll', koliBriQuerySelectorAll);\n\t\tprototypeKoliBri('querySelectorColors', koliBriQuerySelectorColors);\n\t\tprototypeKoliBri('utils', function () {\n\t\t\treturn KoliBriUtils;\n\t\t});\n\t\tprototypeKoliBri('parseJson', parseJson);\n\t\tprototypeKoliBri('stringifyJson', stringifyJson);\n\n\t\tconst body = getDocument().body;\n\n\t\tconst div = getDocument().createElement('svg');\n\t\tdiv.setAttribute('aria-label', 'KoliBri-DevTools');\n\t\tdiv.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\t\tdiv.setAttribute('role', 'toolbar');\n\t\tdiv.setAttribute('style', 'position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;');\n\t\tdiv.innerHTML = `<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"50\"\n height=\"50\"\n viewBox=\"0 0 600 600\"\n>\n <path d=\"M353 322L213 304V434L353 322Z\" fill=\"#047\" />\n <path d=\"M209 564V304L149 434L209 564Z\" fill=\"#047\" />\n <path d=\"M357 316L417 250L361 210L275 244L357 316Z\" fill=\"#047\" />\n <path d=\"M353 318L35 36L213 300L353 318Z\" fill=\"#047\" />\n <path d=\"M329 218L237 92L250 222L272 241L329 218Z\" fill=\"#047\" />\n <path d=\"M391 286L565 272L421 252L391 286Z\" fill=\"#047\" />\n</svg>`;\n\n\t\tgetDocument().body.appendChild(div);\n\n\t\tmetaModeLog('Development mode', getDevMode());\n\t\tmetaModeLog('Experimental mode', getExperimentalMode());\n\t\tmetaModeLog('Color contrast analysis', getColorContrastAnalysis());\n\n\t\tif (getColorContrastAnalysis()) {\n\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\tsetInterval(() => {\n\t\t\t\t\tKoliBriUtils.queryHtmlElementColors(getDocument().createElement('div'), koliBriA11yColorContrast(body), false, false);\n\t\t\t\t}, 10000);\n\t\t\t}, 2500);\n\t\t}\n\n\t\t// setTimeout(() => {\n\t\t// const kolButton = koliBriQuerySelector<HTMLButtonElement>(document, '[_label=\"Aktion ausführen\"]');\n\t\t// if (kolButton) {\n\t\t// const button = koliBriQuerySelector<HTMLButtonElement>(kolButton?.shadowRoot as ShadowRoot, 'button');\n\t\t// if (button) {\n\t\t// kolButton.style.backgroundColor = '#988';\n\t\t// button.style.backgroundColor = 'inherit';\n\t\t// button.style.color = '#988';\n\t\t// const kolButtonColors = koliBriQuerySelectorColors('[_label=\"Aktion ausführen\"]');\n\t\t// console.log(\n\t\t// koliBriQuerySelectorColors('button', {\n\t\t// ...kolButtonColors,\n\t\t// })\n\t\t// );\n\t\t// }\n\t\t// }\n\t\t// }, 2500);\n\t}\n};\n"],"names":["getWindow","Log","initKoliBri","getDevMode","renderDevAdvice","koliBriA11yColorContrast","koliBriQuerySelector","koliBriQuerySelectorAll","koliBriQuerySelectorColors","KoliBriUtils","parseJson","stringifyJson","getDocument","getExperimentalMode","getColorContrastAnalysis"],"mappings":";;;;;;;;;AAiBA,MAAM,UAAU,GAAG,MAA8B;AAChD,IAAA,IAAI,OAAO,GAAGA,gBAAS,EAAE,CAAC,OAAO;AACjC,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;QAC1B,OAAO,GAAG,EAAE;AACZ,QAAA,MAAM,CAAC,cAAc,CAACA,gBAAS,EAAE,EAAE,SAAS,EAAE;AAC7C,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,QAAQ,EAAE,KAAK;AACf,SAAA,CAAC;;AAEH,IAAA,OAAO,OAAO;AACf,CAAC;AAED,SAAS,gBAAgB,CAAI,IAAY,EAAE,EAAK,EAAA;AAC/C,IAAA,IAAI;AACH,QAAA,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE;AACzC,YAAA,GAAG,EAAE,YAAA;AACJ,gBAAA,OAAO,EAAE;aACT;AACD,SAAA,CAAC;;IACD,OAAO,CAAC,EAAE;AACX,QAAAC,UAAG,CAAC,KAAK,CAAC,oBAAoB,IAAI,CAAA,iBAAA,CAAmB,CAAC;;AAExD;AAEA,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,MAAe,KAAKA,UAAG,CAAC,KAAK,CA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AAC;AACvD,QAAA,WAAW,CAAC,yBAAyB,EAAEC,+BAAwB,EAAE,CAAC;QAElE,IAAIA,+BAAwB,EAAE,EAAE;AAC/B,YAAA,MAAM,OAAO,GAAG,UAAU,CAAC,MAAK;gBAC/B,YAAY,CAAC,OAAO,CAAC;gBACrB,WAAW,CAAC,MAAK;oBAChBL,mBAAY,CAAC,sBAAsB,CAACG,kBAAW,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAEP,+BAAwB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC;iBACrH,EAAE,KAAK,CAAC;aACT,EAAE,IAAI,CAAC;;;AAqBX;;;;"}
1
+ {"version":3,"file":"devtools-C5EusrLu.js","sources":["src/global/devtools.ts"],"sourcesContent":["import {\n\tgetColorContrastAnalysis,\n\tgetDevMode,\n\tgetDocument,\n\tgetExperimentalMode,\n\tgetWindow,\n\tkoliBriA11yColorContrast,\n\tkoliBriQuerySelector,\n\tkoliBriQuerySelectorAll,\n\tkoliBriQuerySelectorColors,\n\tKoliBriUtils,\n\tLog,\n\tparseJson,\n\tstringifyJson,\n} from '../schema';\nimport { initKoliBri, renderDevAdvice } from '../utils/dev.utils';\n\nconst getKoliBri = (): Record<string, unknown> => {\n\tlet kolibri = getWindow().KoliBri;\n\tif (kolibri === undefined) {\n\t\tkolibri = {};\n\t\tObject.defineProperty(getWindow(), 'KoliBri', {\n\t\t\tvalue: kolibri,\n\t\t\twritable: false,\n\t\t});\n\t}\n\treturn kolibri;\n};\n\nfunction prototypeKoliBri<T>(name: string, cb: T) {\n\ttry {\n\t\tObject.defineProperty(getKoliBri(), name, {\n\t\t\tget: function () {\n\t\t\t\treturn cb;\n\t\t\t},\n\t\t});\n\t} catch (e) {\n\t\tLog.debug(`KoliBri property ${name} is already bind.`);\n\t}\n}\n\nconst metaModeLog = (name: string, active: boolean) => Log.debug(`${name} ${active ? '' : 'not '}activated`);\n\nexport const initialize = (): void => {\n\tinitKoliBri();\n\tif (getDevMode()) {\n\t\trenderDevAdvice();\n\n\t\tprototypeKoliBri('a11yColorContrast', koliBriA11yColorContrast);\n\t\tprototypeKoliBri('querySelector', koliBriQuerySelector);\n\t\tprototypeKoliBri('querySelectorAll', koliBriQuerySelectorAll);\n\t\tprototypeKoliBri('querySelectorColors', koliBriQuerySelectorColors);\n\t\tprototypeKoliBri('utils', function () {\n\t\t\treturn KoliBriUtils;\n\t\t});\n\t\tprototypeKoliBri('parseJson', parseJson);\n\t\tprototypeKoliBri('stringifyJson', stringifyJson);\n\n\t\tconst body = getDocument().body;\n\n\t\tconst div = getDocument().createElement('svg');\n\t\tdiv.setAttribute('aria-label', 'KoliBri-DevTools');\n\t\tdiv.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\t\tdiv.setAttribute('role', 'toolbar');\n\t\tdiv.setAttribute('style', 'position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;');\n\t\tdiv.innerHTML = `<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"50\"\n height=\"50\"\n viewBox=\"0 0 600 600\"\n>\n <path d=\"M353 322L213 304V434L353 322Z\" fill=\"#047\" />\n <path d=\"M209 564V304L149 434L209 564Z\" fill=\"#047\" />\n <path d=\"M357 316L417 250L361 210L275 244L357 316Z\" fill=\"#047\" />\n <path d=\"M353 318L35 36L213 300L353 318Z\" fill=\"#047\" />\n <path d=\"M329 218L237 92L250 222L272 241L329 218Z\" fill=\"#047\" />\n <path d=\"M391 286L565 272L421 252L391 286Z\" fill=\"#047\" />\n</svg>`;\n\n\t\tgetDocument().body.appendChild(div);\n\n\t\tmetaModeLog('Development mode', getDevMode());\n\t\tmetaModeLog('Experimental mode', getExperimentalMode());\n\t\tmetaModeLog('Color contrast analysis', getColorContrastAnalysis());\n\n\t\tif (getColorContrastAnalysis()) {\n\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\tclearTimeout(timeout);\n\t\t\t\tsetInterval(() => {\n\t\t\t\t\tKoliBriUtils.queryHtmlElementColors(getDocument().createElement('div'), koliBriA11yColorContrast(body), false, false);\n\t\t\t\t}, 10000);\n\t\t\t}, 2500);\n\t\t}\n\n\t\t// setTimeout(() => {\n\t\t// const kolButton = koliBriQuerySelector<HTMLButtonElement>(document, '[_label=\"Aktion ausführen\"]');\n\t\t// if (kolButton) {\n\t\t// const button = koliBriQuerySelector<HTMLButtonElement>(kolButton?.shadowRoot as ShadowRoot, 'button');\n\t\t// if (button) {\n\t\t// kolButton.style.backgroundColor = '#988';\n\t\t// button.style.backgroundColor = 'inherit';\n\t\t// button.style.color = '#988';\n\t\t// const kolButtonColors = koliBriQuerySelectorColors('[_label=\"Aktion ausführen\"]');\n\t\t// console.log(\n\t\t// koliBriQuerySelectorColors('button', {\n\t\t// ...kolButtonColors,\n\t\t// })\n\t\t// );\n\t\t// }\n\t\t// }\n\t\t// }, 2500);\n\t}\n};\n"],"names":["getWindow","Log","initKoliBri","getDevMode","renderDevAdvice","koliBriA11yColorContrast","koliBriQuerySelector","koliBriQuerySelectorAll","koliBriQuerySelectorColors","KoliBriUtils","parseJson","stringifyJson","getDocument","getExperimentalMode","getColorContrastAnalysis"],"mappings":";;;;;;;;;AAiBA,MAAM,UAAU,GAAG,MAA8B;AAChD,IAAA,IAAI,OAAO,GAAGA,gBAAS,EAAE,CAAC,OAAO;AACjC,IAAA,IAAI,OAAO,KAAK,SAAS,EAAE;QAC1B,OAAO,GAAG,EAAE;AACZ,QAAA,MAAM,CAAC,cAAc,CAACA,gBAAS,EAAE,EAAE,SAAS,EAAE;AAC7C,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,QAAQ,EAAE,KAAK;AACf,SAAA,CAAC;;AAEH,IAAA,OAAO,OAAO;AACf,CAAC;AAED,SAAS,gBAAgB,CAAI,IAAY,EAAE,EAAK,EAAA;AAC/C,IAAA,IAAI;AACH,QAAA,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE;AACzC,YAAA,GAAG,EAAE,YAAA;AACJ,g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