@public-ui/components 3.0.0-rc.8 → 3.0.0-rc.9

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 (429) hide show
  1. package/custom-elements.json +9 -3
  2. package/dist/cjs/{Alert-e2ac9865.js → Alert-3e809a67.js} +1 -1
  3. package/dist/cjs/{Alert-e2ac9865.js.map → Alert-3e809a67.js.map} +1 -1
  4. package/dist/cjs/{Collapsible-0bb6e7ee.js → Collapsible-fc51e4bb.js} +1 -1
  5. package/dist/cjs/{Collapsible-0bb6e7ee.js.map → Collapsible-fc51e4bb.js.map} +1 -1
  6. package/dist/cjs/{CustomSuggestionsOptionsGroup-d3e792bb.js → CustomSuggestionsOptionsGroup-db93fdd3.js} +1 -1
  7. package/dist/cjs/{CustomSuggestionsOptionsGroup-d3e792bb.js.map → CustomSuggestionsOptionsGroup-db93fdd3.js.map} +1 -1
  8. package/dist/cjs/{FieldControlStateWrapper-f4b1a95b.js → FieldControlStateWrapper-4b230f37.js} +1 -1
  9. package/dist/cjs/{FieldControlStateWrapper-f4b1a95b.js.map → FieldControlStateWrapper-4b230f37.js.map} +1 -1
  10. package/dist/cjs/{Heading-e55498a4.js → Heading-6d2109d7.js} +1 -1
  11. package/dist/cjs/{Heading-e55498a4.js.map → Heading-6d2109d7.js.map} +1 -1
  12. package/dist/cjs/{Icon-8867e73b.js → Icon-38c56199.js} +1 -1
  13. package/dist/cjs/{Icon-8867e73b.js.map → Icon-38c56199.js.map} +1 -1
  14. package/dist/cjs/{Input-5a0ca439.js → Input-51863b02.js} +1 -1
  15. package/dist/cjs/{Input-5a0ca439.js.map → Input-51863b02.js.map} +1 -1
  16. package/dist/cjs/{InputStateWrapper-b9e53e5f.js → InputStateWrapper-6963256a.js} +1 -1
  17. package/dist/cjs/{InputStateWrapper-b9e53e5f.js.map → InputStateWrapper-6963256a.js.map} +1 -1
  18. package/dist/cjs/{InternalUnderlinedBadgeText-389620e7.js → InternalUnderlinedBadgeText-2648871b.js} +1 -1
  19. package/dist/cjs/{InternalUnderlinedBadgeText-389620e7.js.map → InternalUnderlinedBadgeText-2648871b.js.map} +1 -1
  20. package/dist/cjs/{Span-e5bd6e07.js → Span-e2a21342.js} +1 -1
  21. package/dist/cjs/{Span-e5bd6e07.js.map → Span-e2a21342.js.map} +1 -1
  22. package/dist/cjs/{app-globals-7d7712b7.js → app-globals-8d0434fd.js} +1 -1
  23. package/dist/cjs/{app-globals-7d7712b7.js.map → app-globals-8d0434fd.js.map} +1 -1
  24. package/dist/cjs/{controller-2b2bad95.js → controller-1d5da75b.js} +1 -1
  25. package/dist/cjs/{controller-2b2bad95.js.map → controller-1d5da75b.js.map} +1 -1
  26. package/dist/cjs/{controller-8fd8da59.js → controller-d721c730.js} +1 -1
  27. package/dist/cjs/{controller-8fd8da59.js.map → controller-d721c730.js.map} +1 -1
  28. package/dist/cjs/{controller-3c91be90.js → controller-ffdb4fff.js} +1 -1
  29. package/dist/cjs/{controller-3c91be90.js.map → controller-ffdb4fff.js.map} +1 -1
  30. package/dist/cjs/controller-icon-1db54c2b.js +4 -0
  31. package/dist/cjs/controller-icon-1db54c2b.js.map +1 -0
  32. package/dist/cjs/{dev.utils-cf3e30cd.js → dev.utils-11fdd95b.js} +1 -1
  33. package/dist/cjs/{dev.utils-cf3e30cd.js.map → dev.utils-11fdd95b.js.map} +1 -1
  34. package/dist/cjs/{devtools-fd4ade5c.js → devtools-a2f814c2.js} +1 -1
  35. package/dist/cjs/{devtools-fd4ade5c.js.map → devtools-a2f814c2.js.map} +1 -1
  36. package/dist/cjs/{getRenderStates-ccd7c1d9.js → getRenderStates-71b02d93.js} +1 -1
  37. package/dist/cjs/{getRenderStates-ccd7c1d9.js.map → getRenderStates-71b02d93.js.map} +1 -1
  38. package/dist/cjs/{icons-c0c89cbb.js → icons-cfdc392f.js} +1 -1
  39. package/dist/cjs/icons-cfdc392f.js.map +1 -0
  40. package/dist/cjs/{index-f59a950a.js → index-796b030d.js} +1 -1
  41. package/dist/cjs/{index-f59a950a.js.map → index-796b030d.js.map} +1 -1
  42. package/dist/cjs/kol-abbr.cjs.entry.js +1 -1
  43. package/dist/cjs/kol-accordion.cjs.entry.js +1 -1
  44. package/dist/cjs/kol-alert-wc.cjs.entry.js +1 -1
  45. package/dist/cjs/kol-alert.cjs.entry.js +1 -1
  46. package/dist/cjs/kol-avatar-wc.cjs.entry.js +1 -1
  47. package/dist/cjs/kol-avatar.cjs.entry.js +1 -1
  48. package/dist/cjs/kol-badge.cjs.entry.js +1 -1
  49. package/dist/cjs/kol-breadcrumb.cjs.entry.js +1 -1
  50. package/dist/cjs/kol-button-link.cjs.entry.js +1 -1
  51. package/dist/cjs/kol-button-wc.cjs.entry.js +1 -1
  52. package/dist/cjs/kol-button.cjs.entry.js +1 -1
  53. package/dist/cjs/kol-card.cjs.entry.js +1 -1
  54. package/dist/cjs/kol-combobox.cjs.entry.js +1 -1
  55. package/dist/cjs/kol-combobox.cjs.entry.js.map +1 -1
  56. package/dist/cjs/kol-details.cjs.entry.js +1 -1
  57. package/dist/cjs/kol-drawer.cjs.entry.js +1 -1
  58. package/dist/cjs/kol-form.cjs.entry.js +1 -1
  59. package/dist/cjs/kol-heading.cjs.entry.js +1 -1
  60. package/dist/cjs/kol-icon.cjs.entry.js +1 -1
  61. package/dist/cjs/kol-image.cjs.entry.js +1 -1
  62. package/dist/cjs/kol-input-checkbox.cjs.entry.js +1 -1
  63. package/dist/cjs/kol-input-color.cjs.entry.js +1 -1
  64. package/dist/cjs/kol-input-color.cjs.entry.js.map +1 -1
  65. package/dist/cjs/kol-input-date.cjs.entry.js +1 -1
  66. package/dist/cjs/kol-input-date.cjs.entry.js.map +1 -1
  67. package/dist/cjs/kol-input-email.cjs.entry.js +1 -1
  68. package/dist/cjs/kol-input-email.cjs.entry.js.map +1 -1
  69. package/dist/cjs/kol-input-file.cjs.entry.js +1 -1
  70. package/dist/cjs/kol-input-file.cjs.entry.js.map +1 -1
  71. package/dist/cjs/kol-input-number.cjs.entry.js +1 -1
  72. package/dist/cjs/kol-input-number.cjs.entry.js.map +1 -1
  73. package/dist/cjs/kol-input-password.cjs.entry.js +1 -1
  74. package/dist/cjs/kol-input-password.cjs.entry.js.map +1 -1
  75. package/dist/cjs/kol-input-radio.cjs.entry.js +1 -1
  76. package/dist/cjs/kol-input-range.cjs.entry.js +1 -1
  77. package/dist/cjs/kol-input-range.cjs.entry.js.map +1 -1
  78. package/dist/cjs/kol-input-text.cjs.entry.js +1 -1
  79. package/dist/cjs/kol-input-text.cjs.entry.js.map +1 -1
  80. package/dist/cjs/kol-kolibri.cjs.entry.js +1 -1
  81. package/dist/cjs/kol-link-button.cjs.entry.js +1 -1
  82. package/dist/cjs/kol-link-wc.cjs.entry.js +1 -1
  83. package/dist/cjs/kol-link.cjs.entry.js +1 -1
  84. package/dist/cjs/kol-modal.cjs.entry.js +1 -1
  85. package/dist/cjs/kol-nav.cjs.entry.js +1 -1
  86. package/dist/cjs/kol-nav.cjs.entry.js.map +1 -1
  87. package/dist/cjs/kol-pagination.cjs.entry.js +1 -1
  88. package/dist/cjs/kol-popover-button-wc.cjs.entry.js +1 -1
  89. package/dist/cjs/kol-popover-button.cjs.entry.js +1 -1
  90. package/dist/cjs/kol-popover-wc.cjs.entry.js +1 -1
  91. package/dist/cjs/kol-progress.cjs.entry.js +1 -1
  92. package/dist/cjs/kol-quote.cjs.entry.js +1 -1
  93. package/dist/cjs/kol-select.cjs.entry.js +1 -1
  94. package/dist/cjs/kol-select.cjs.entry.js.map +1 -1
  95. package/dist/cjs/kol-single-select.cjs.entry.js +1 -1
  96. package/dist/cjs/kol-single-select.cjs.entry.js.map +1 -1
  97. package/dist/cjs/kol-skip-nav.cjs.entry.js +1 -1
  98. package/dist/cjs/kol-spin.cjs.entry.js +1 -1
  99. package/dist/cjs/kol-split-button.cjs.entry.js +1 -1
  100. package/dist/cjs/kol-table-settings-wc.cjs.entry.js +1 -1
  101. package/dist/cjs/kol-table-stateful.cjs.entry.js +1 -1
  102. package/dist/cjs/kol-table-stateless-wc.cjs.entry.js +1 -1
  103. package/dist/cjs/kol-table-stateless.cjs.entry.js +1 -1
  104. package/dist/cjs/kol-tabs.cjs.entry.js +1 -1
  105. package/dist/cjs/kol-textarea.cjs.entry.js +1 -1
  106. package/dist/cjs/kol-textarea.cjs.entry.js.map +1 -1
  107. package/dist/cjs/kol-toast-container.cjs.entry.js +1 -1
  108. package/dist/cjs/kol-toolbar.cjs.entry.js +1 -1
  109. package/dist/cjs/kol-tooltip-wc.cjs.entry.js +1 -1
  110. package/dist/cjs/kol-tree-item-wc.cjs.entry.js +1 -1
  111. package/dist/cjs/kol-tree-item.cjs.entry.js +1 -1
  112. package/dist/cjs/kol-tree-wc.cjs.entry.js +1 -1
  113. package/dist/cjs/kol-tree.cjs.entry.js +1 -1
  114. package/dist/cjs/kol-version.cjs.entry.js +1 -1
  115. package/dist/cjs/kolibri.cjs.js +1 -1
  116. package/dist/cjs/loader.cjs.js +1 -1
  117. package/dist/cjs/test-component.cjs.entry.js +1 -1
  118. package/dist/components/InputContainerStateWrapper.js +1 -1
  119. package/dist/components/InputContainerStateWrapper.js.map +1 -1
  120. package/dist/components/icons.js +1 -1
  121. package/dist/components/icons.js.map +1 -1
  122. package/dist/components/kol-combobox.js +1 -1
  123. package/dist/components/kol-combobox.js.map +1 -1
  124. package/dist/components/kol-input-color.js +1 -1
  125. package/dist/components/kol-input-color.js.map +1 -1
  126. package/dist/components/kol-input-date.js +1 -1
  127. package/dist/components/kol-input-date.js.map +1 -1
  128. package/dist/components/kol-input-email.js +1 -1
  129. package/dist/components/kol-input-email.js.map +1 -1
  130. package/dist/components/kol-input-file.js +1 -1
  131. package/dist/components/kol-input-file.js.map +1 -1
  132. package/dist/components/kol-input-number.js +1 -1
  133. package/dist/components/kol-input-number.js.map +1 -1
  134. package/dist/components/kol-input-password.js +1 -1
  135. package/dist/components/kol-input-password.js.map +1 -1
  136. package/dist/components/kol-input-range.js +1 -1
  137. package/dist/components/kol-input-range.js.map +1 -1
  138. package/dist/components/kol-input-text.js +1 -1
  139. package/dist/components/kol-input-text.js.map +1 -1
  140. package/dist/components/kol-nav.js +1 -1
  141. package/dist/components/kol-nav.js.map +1 -1
  142. package/dist/components/kol-select.js +1 -1
  143. package/dist/components/kol-select.js.map +1 -1
  144. package/dist/components/kol-single-select.js +1 -1
  145. package/dist/components/kol-single-select.js.map +1 -1
  146. package/dist/components/kol-textarea.js +1 -1
  147. package/dist/components/kol-textarea.js.map +1 -1
  148. package/dist/esm/{Alert-bebb173b.js → Alert-a3a98cf0.js} +1 -1
  149. package/dist/esm/{Alert-bebb173b.js.map → Alert-a3a98cf0.js.map} +1 -1
  150. package/dist/esm/{Collapsible-c54aff9a.js → Collapsible-c78ff3d9.js} +1 -1
  151. package/dist/esm/{Collapsible-c54aff9a.js.map → Collapsible-c78ff3d9.js.map} +1 -1
  152. package/dist/esm/{CustomSuggestionsOptionsGroup-ec71e53e.js → CustomSuggestionsOptionsGroup-f8aab3c9.js} +1 -1
  153. package/dist/esm/{CustomSuggestionsOptionsGroup-ec71e53e.js.map → CustomSuggestionsOptionsGroup-f8aab3c9.js.map} +1 -1
  154. package/dist/esm/{FieldControlStateWrapper-4d0b5645.js → FieldControlStateWrapper-047375c6.js} +1 -1
  155. package/dist/esm/{FieldControlStateWrapper-4d0b5645.js.map → FieldControlStateWrapper-047375c6.js.map} +1 -1
  156. package/dist/esm/{Heading-d8bc176d.js → Heading-db8212fd.js} +1 -1
  157. package/dist/esm/{Heading-d8bc176d.js.map → Heading-db8212fd.js.map} +1 -1
  158. package/dist/esm/{Icon-29c7a575.js → Icon-94d94af0.js} +1 -1
  159. package/dist/esm/{Icon-29c7a575.js.map → Icon-94d94af0.js.map} +1 -1
  160. package/dist/esm/{Input-1f6b1e32.js → Input-e7f28c3e.js} +1 -1
  161. package/dist/esm/{Input-1f6b1e32.js.map → Input-e7f28c3e.js.map} +1 -1
  162. package/dist/esm/{InputStateWrapper-be686f5c.js → InputStateWrapper-47927ccc.js} +1 -1
  163. package/dist/esm/{InputStateWrapper-be686f5c.js.map → InputStateWrapper-47927ccc.js.map} +1 -1
  164. package/dist/esm/{InternalUnderlinedBadgeText-4e102a41.js → InternalUnderlinedBadgeText-bd14a865.js} +1 -1
  165. package/dist/esm/{InternalUnderlinedBadgeText-4e102a41.js.map → InternalUnderlinedBadgeText-bd14a865.js.map} +1 -1
  166. package/dist/esm/{Span-25a2d8b1.js → Span-40890aef.js} +1 -1
  167. package/dist/esm/{Span-25a2d8b1.js.map → Span-40890aef.js.map} +1 -1
  168. package/dist/esm/{app-globals-bfa38239.js → app-globals-345b5bdc.js} +1 -1
  169. package/dist/esm/{app-globals-bfa38239.js.map → app-globals-345b5bdc.js.map} +1 -1
  170. package/dist/esm/{controller-39c6b21d.js → controller-1ca7ca52.js} +1 -1
  171. package/dist/esm/{controller-39c6b21d.js.map → controller-1ca7ca52.js.map} +1 -1
  172. package/dist/esm/{controller-8e7f4d3c.js → controller-87c98eff.js} +1 -1
  173. package/dist/esm/{controller-8e7f4d3c.js.map → controller-87c98eff.js.map} +1 -1
  174. package/dist/esm/{controller-a86d277d.js → controller-9840a130.js} +1 -1
  175. package/dist/esm/{controller-a86d277d.js.map → controller-9840a130.js.map} +1 -1
  176. package/dist/esm/controller-icon-9a71123f.js +4 -0
  177. package/dist/esm/controller-icon-9a71123f.js.map +1 -0
  178. package/dist/esm/{dev.utils-5ecfad25.js → dev.utils-139c37ee.js} +1 -1
  179. package/dist/esm/{dev.utils-5ecfad25.js.map → dev.utils-139c37ee.js.map} +1 -1
  180. package/dist/esm/{devtools-ec77e067.js → devtools-000c669d.js} +1 -1
  181. package/dist/esm/{devtools-ec77e067.js.map → devtools-000c669d.js.map} +1 -1
  182. package/dist/esm/{getRenderStates-0597d9aa.js → getRenderStates-7b981d3d.js} +1 -1
  183. package/dist/esm/{getRenderStates-0597d9aa.js.map → getRenderStates-7b981d3d.js.map} +1 -1
  184. package/dist/esm/{icons-d00eff5e.js → icons-6ec03aa3.js} +1 -1
  185. package/dist/esm/icons-6ec03aa3.js.map +1 -0
  186. package/dist/esm/{index-ed1aff4f.js → index-6b4e51a8.js} +1 -1
  187. package/dist/esm/{index-ed1aff4f.js.map → index-6b4e51a8.js.map} +1 -1
  188. package/dist/esm/kol-abbr.entry.js +1 -1
  189. package/dist/esm/kol-accordion.entry.js +1 -1
  190. package/dist/esm/kol-alert-wc.entry.js +1 -1
  191. package/dist/esm/kol-alert.entry.js +1 -1
  192. package/dist/esm/kol-avatar-wc.entry.js +1 -1
  193. package/dist/esm/kol-avatar.entry.js +1 -1
  194. package/dist/esm/kol-badge.entry.js +1 -1
  195. package/dist/esm/kol-breadcrumb.entry.js +1 -1
  196. package/dist/esm/kol-button-link.entry.js +1 -1
  197. package/dist/esm/kol-button-wc.entry.js +1 -1
  198. package/dist/esm/kol-button.entry.js +1 -1
  199. package/dist/esm/kol-card.entry.js +1 -1
  200. package/dist/esm/kol-combobox.entry.js +1 -1
  201. package/dist/esm/kol-combobox.entry.js.map +1 -1
  202. package/dist/esm/kol-details.entry.js +1 -1
  203. package/dist/esm/kol-drawer.entry.js +1 -1
  204. package/dist/esm/kol-form.entry.js +1 -1
  205. package/dist/esm/kol-heading.entry.js +1 -1
  206. package/dist/esm/kol-icon.entry.js +1 -1
  207. package/dist/esm/kol-image.entry.js +1 -1
  208. package/dist/esm/kol-input-checkbox.entry.js +1 -1
  209. package/dist/esm/kol-input-color.entry.js +1 -1
  210. package/dist/esm/kol-input-color.entry.js.map +1 -1
  211. package/dist/esm/kol-input-date.entry.js +1 -1
  212. package/dist/esm/kol-input-date.entry.js.map +1 -1
  213. package/dist/esm/kol-input-email.entry.js +1 -1
  214. package/dist/esm/kol-input-email.entry.js.map +1 -1
  215. package/dist/esm/kol-input-file.entry.js +1 -1
  216. package/dist/esm/kol-input-file.entry.js.map +1 -1
  217. package/dist/esm/kol-input-number.entry.js +1 -1
  218. package/dist/esm/kol-input-number.entry.js.map +1 -1
  219. package/dist/esm/kol-input-password.entry.js +1 -1
  220. package/dist/esm/kol-input-password.entry.js.map +1 -1
  221. package/dist/esm/kol-input-radio.entry.js +1 -1
  222. package/dist/esm/kol-input-range.entry.js +1 -1
  223. package/dist/esm/kol-input-range.entry.js.map +1 -1
  224. package/dist/esm/kol-input-text.entry.js +1 -1
  225. package/dist/esm/kol-input-text.entry.js.map +1 -1
  226. package/dist/esm/kol-kolibri.entry.js +1 -1
  227. package/dist/esm/kol-link-button.entry.js +1 -1
  228. package/dist/esm/kol-link-wc.entry.js +1 -1
  229. package/dist/esm/kol-link.entry.js +1 -1
  230. package/dist/esm/kol-modal.entry.js +1 -1
  231. package/dist/esm/kol-nav.entry.js +1 -1
  232. package/dist/esm/kol-nav.entry.js.map +1 -1
  233. package/dist/esm/kol-pagination.entry.js +1 -1
  234. package/dist/esm/kol-popover-button-wc.entry.js +1 -1
  235. package/dist/esm/kol-popover-button.entry.js +1 -1
  236. package/dist/esm/kol-popover-wc.entry.js +1 -1
  237. package/dist/esm/kol-progress.entry.js +1 -1
  238. package/dist/esm/kol-quote.entry.js +1 -1
  239. package/dist/esm/kol-select.entry.js +1 -1
  240. package/dist/esm/kol-select.entry.js.map +1 -1
  241. package/dist/esm/kol-single-select.entry.js +1 -1
  242. package/dist/esm/kol-single-select.entry.js.map +1 -1
  243. package/dist/esm/kol-skip-nav.entry.js +1 -1
  244. package/dist/esm/kol-spin.entry.js +1 -1
  245. package/dist/esm/kol-split-button.entry.js +1 -1
  246. package/dist/esm/kol-table-settings-wc.entry.js +1 -1
  247. package/dist/esm/kol-table-stateful.entry.js +1 -1
  248. package/dist/esm/kol-table-stateless-wc.entry.js +1 -1
  249. package/dist/esm/kol-table-stateless.entry.js +1 -1
  250. package/dist/esm/kol-tabs.entry.js +1 -1
  251. package/dist/esm/kol-textarea.entry.js +1 -1
  252. package/dist/esm/kol-textarea.entry.js.map +1 -1
  253. package/dist/esm/kol-toast-container.entry.js +1 -1
  254. package/dist/esm/kol-toolbar.entry.js +1 -1
  255. package/dist/esm/kol-tooltip-wc.entry.js +1 -1
  256. package/dist/esm/kol-tree-item-wc.entry.js +1 -1
  257. package/dist/esm/kol-tree-item.entry.js +1 -1
  258. package/dist/esm/kol-tree-wc.entry.js +1 -1
  259. package/dist/esm/kol-tree.entry.js +1 -1
  260. package/dist/esm/kol-version.entry.js +1 -1
  261. package/dist/esm/kolibri.js +1 -1
  262. package/dist/esm/loader.js +1 -1
  263. package/dist/esm/test-component.entry.js +1 -1
  264. package/dist/kolibri/{Alert-bebb173b.js → Alert-a3a98cf0.js} +1 -1
  265. package/dist/kolibri/{Collapsible-c54aff9a.js → Collapsible-c78ff3d9.js} +1 -1
  266. package/dist/kolibri/{CustomSuggestionsOptionsGroup-ec71e53e.js → CustomSuggestionsOptionsGroup-f8aab3c9.js} +1 -1
  267. package/dist/kolibri/{FieldControlStateWrapper-4d0b5645.js → FieldControlStateWrapper-047375c6.js} +1 -1
  268. package/dist/kolibri/{Heading-d8bc176d.js → Heading-db8212fd.js} +1 -1
  269. package/dist/kolibri/{Icon-29c7a575.js → Icon-94d94af0.js} +1 -1
  270. package/dist/kolibri/Input-e7f28c3e.js +4 -0
  271. package/dist/kolibri/{InputStateWrapper-be686f5c.js → InputStateWrapper-47927ccc.js} +1 -1
  272. package/dist/kolibri/{InternalUnderlinedBadgeText-4e102a41.js → InternalUnderlinedBadgeText-bd14a865.js} +1 -1
  273. package/dist/kolibri/{Span-25a2d8b1.js → Span-40890aef.js} +1 -1
  274. package/dist/kolibri/app-globals-345b5bdc.js +4 -0
  275. package/dist/kolibri/{controller-39c6b21d.js → controller-1ca7ca52.js} +1 -1
  276. package/dist/kolibri/{controller-8e7f4d3c.js → controller-87c98eff.js} +1 -1
  277. package/dist/kolibri/{controller-a86d277d.js → controller-9840a130.js} +1 -1
  278. package/dist/kolibri/controller-icon-9a71123f.js +4 -0
  279. package/dist/kolibri/controller-icon-9a71123f.js.map +1 -0
  280. package/dist/kolibri/{dev.utils-5ecfad25.js → dev.utils-139c37ee.js} +1 -1
  281. package/dist/kolibri/devtools-000c669d.js +4 -0
  282. package/dist/kolibri/{devtools-ec77e067.js.map → devtools-000c669d.js.map} +1 -1
  283. package/dist/kolibri/{getRenderStates-0597d9aa.js → getRenderStates-7b981d3d.js} +1 -1
  284. package/dist/kolibri/icons-6ec03aa3.js +4 -0
  285. package/dist/kolibri/icons-6ec03aa3.js.map +1 -0
  286. package/dist/kolibri/{index-ed1aff4f.js → index-6b4e51a8.js} +1 -1
  287. package/dist/kolibri/{index-ed1aff4f.js.map → index-6b4e51a8.js.map} +1 -1
  288. package/dist/kolibri/kol-abbr.entry.js +1 -1
  289. package/dist/kolibri/kol-accordion.entry.js +1 -1
  290. package/dist/kolibri/kol-alert-wc.entry.js +1 -1
  291. package/dist/kolibri/kol-alert.entry.js +1 -1
  292. package/dist/kolibri/kol-avatar-wc.entry.js +1 -1
  293. package/dist/kolibri/kol-avatar.entry.js +1 -1
  294. package/dist/kolibri/kol-badge.entry.js +1 -1
  295. package/dist/kolibri/kol-breadcrumb.entry.js +1 -1
  296. package/dist/kolibri/kol-button-link.entry.js +1 -1
  297. package/dist/kolibri/kol-button-wc.entry.js +1 -1
  298. package/dist/kolibri/kol-button.entry.js +1 -1
  299. package/dist/kolibri/kol-card.entry.js +1 -1
  300. package/dist/kolibri/kol-combobox.entry.js +1 -1
  301. package/dist/kolibri/kol-combobox.entry.js.map +1 -1
  302. package/dist/kolibri/kol-details.entry.js +1 -1
  303. package/dist/kolibri/kol-drawer.entry.js +1 -1
  304. package/dist/kolibri/kol-form.entry.js +1 -1
  305. package/dist/kolibri/kol-heading.entry.js +1 -1
  306. package/dist/kolibri/kol-icon.entry.js +1 -1
  307. package/dist/kolibri/kol-image.entry.js +1 -1
  308. package/dist/kolibri/kol-input-checkbox.entry.js +1 -1
  309. package/dist/kolibri/kol-input-color.entry.js +1 -1
  310. package/dist/kolibri/kol-input-color.entry.js.map +1 -1
  311. package/dist/kolibri/kol-input-date.entry.js +1 -1
  312. package/dist/kolibri/kol-input-date.entry.js.map +1 -1
  313. package/dist/kolibri/kol-input-email.entry.js +1 -1
  314. package/dist/kolibri/kol-input-email.entry.js.map +1 -1
  315. package/dist/kolibri/kol-input-file.entry.js +1 -1
  316. package/dist/kolibri/kol-input-file.entry.js.map +1 -1
  317. package/dist/kolibri/kol-input-number.entry.js +1 -1
  318. package/dist/kolibri/kol-input-number.entry.js.map +1 -1
  319. package/dist/kolibri/kol-input-password.entry.js +1 -1
  320. package/dist/kolibri/kol-input-password.entry.js.map +1 -1
  321. package/dist/kolibri/kol-input-radio.entry.js +1 -1
  322. package/dist/kolibri/kol-input-range.entry.js +1 -1
  323. package/dist/kolibri/kol-input-range.entry.js.map +1 -1
  324. package/dist/kolibri/kol-input-text.entry.js +1 -1
  325. package/dist/kolibri/kol-input-text.entry.js.map +1 -1
  326. package/dist/kolibri/kol-kolibri.entry.js +1 -1
  327. package/dist/kolibri/kol-link-button.entry.js +1 -1
  328. package/dist/kolibri/kol-link-wc.entry.js +1 -1
  329. package/dist/kolibri/kol-link-wc.entry.js.map +1 -1
  330. package/dist/kolibri/kol-link.entry.js +1 -1
  331. package/dist/kolibri/kol-modal.entry.js +1 -1
  332. package/dist/kolibri/kol-nav.entry.js +1 -1
  333. package/dist/kolibri/kol-nav.entry.js.map +1 -1
  334. package/dist/kolibri/kol-pagination.entry.js +1 -1
  335. package/dist/kolibri/kol-popover-button-wc.entry.js +1 -1
  336. package/dist/kolibri/kol-popover-button.entry.js +1 -1
  337. package/dist/kolibri/kol-popover-wc.entry.js +1 -1
  338. package/dist/kolibri/kol-progress.entry.js +1 -1
  339. package/dist/kolibri/kol-quote.entry.js +1 -1
  340. package/dist/kolibri/kol-select.entry.js +1 -1
  341. package/dist/kolibri/kol-select.entry.js.map +1 -1
  342. package/dist/kolibri/kol-single-select.entry.js +1 -1
  343. package/dist/kolibri/kol-single-select.entry.js.map +1 -1
  344. package/dist/kolibri/kol-skip-nav.entry.js +1 -1
  345. package/dist/kolibri/kol-spin.entry.js +1 -1
  346. package/dist/kolibri/kol-split-button.entry.js +1 -1
  347. package/dist/kolibri/kol-table-settings-wc.entry.js +1 -1
  348. package/dist/kolibri/kol-table-stateful.entry.js +1 -1
  349. package/dist/kolibri/kol-table-stateless-wc.entry.js +1 -1
  350. package/dist/kolibri/kol-table-stateless.entry.js +1 -1
  351. package/dist/kolibri/kol-tabs.entry.js +1 -1
  352. package/dist/kolibri/kol-textarea.entry.js +1 -1
  353. package/dist/kolibri/kol-textarea.entry.js.map +1 -1
  354. package/dist/kolibri/kol-toast-container.entry.js +1 -1
  355. package/dist/kolibri/kol-toolbar.entry.js +1 -1
  356. package/dist/kolibri/kol-tooltip-wc.entry.js +1 -1
  357. package/dist/kolibri/kol-tree-item-wc.entry.js +1 -1
  358. package/dist/kolibri/kol-tree-item.entry.js +1 -1
  359. package/dist/kolibri/kol-tree-wc.entry.js +1 -1
  360. package/dist/kolibri/kol-tree.entry.js +1 -1
  361. package/dist/kolibri/kol-version.entry.js +1 -1
  362. package/dist/kolibri/kolibri.esm.js +1 -1
  363. package/dist/kolibri/kolibri.esm.js.map +1 -1
  364. package/dist/kolibri/test-component.entry.js +1 -1
  365. package/dist/types/components/@deprecated/input/controller-icon.d.ts +2 -2
  366. package/dist/types/components/@deprecated/input/types-icon.d.ts +2 -4
  367. package/dist/types/components/combobox/shadow.d.ts +3 -3
  368. package/dist/types/components/input/types.d.ts +2 -3
  369. package/dist/types/components/input-color/shadow.d.ts +3 -3
  370. package/dist/types/components/input-date/shadow.d.ts +3 -3
  371. package/dist/types/components/input-email/shadow.d.ts +3 -3
  372. package/dist/types/components/input-file/shadow.d.ts +3 -3
  373. package/dist/types/components/input-number/shadow.d.ts +3 -3
  374. package/dist/types/components/input-password/shadow.d.ts +3 -3
  375. package/dist/types/components/input-range/shadow.d.ts +3 -3
  376. package/dist/types/components/input-text/shadow.d.ts +3 -3
  377. package/dist/types/components/select/shadow.d.ts +4 -4
  378. package/dist/types/components/single-select/shadow.d.ts +3 -3
  379. package/dist/types/components/textarea/shadow.d.ts +3 -3
  380. package/dist/types/components.d.ts +28 -28
  381. package/dist/types/schema/components/combobox.d.ts +4 -6
  382. package/dist/types/schema/components/input-color.d.ts +4 -6
  383. package/dist/types/schema/components/input-date.d.ts +3 -4
  384. package/dist/types/schema/components/input-email.d.ts +4 -6
  385. package/dist/types/schema/components/input-file.d.ts +4 -6
  386. package/dist/types/schema/components/input-number.d.ts +3 -4
  387. package/dist/types/schema/components/input-password.d.ts +5 -7
  388. package/dist/types/schema/components/input-range.d.ts +4 -6
  389. package/dist/types/schema/components/input-text.d.ts +4 -6
  390. package/dist/types/schema/components/input.d.ts +2 -3
  391. package/dist/types/schema/components/select.d.ts +5 -7
  392. package/dist/types/schema/components/single-select.d.ts +4 -6
  393. package/dist/types/schema/components/textarea.d.ts +4 -6
  394. package/dist/types/schema/props/icons.d.ts +5 -1
  395. package/dist/types/schema/types/icons.d.ts +4 -0
  396. package/dist/types/schema/types/input/control/number.d.ts +2 -3
  397. package/doc/select.md +22 -22
  398. package/doc/textarea.md +1 -1
  399. package/package.json +1 -1
  400. package/vscode-custom-data.json +4 -0
  401. package/dist/cjs/controller-icon-f083fb87.js +0 -4
  402. package/dist/cjs/controller-icon-f083fb87.js.map +0 -1
  403. package/dist/cjs/icons-c0c89cbb.js.map +0 -1
  404. package/dist/esm/controller-icon-14449b07.js +0 -4
  405. package/dist/esm/controller-icon-14449b07.js.map +0 -1
  406. package/dist/esm/icons-d00eff5e.js.map +0 -1
  407. package/dist/kolibri/Input-1f6b1e32.js +0 -4
  408. package/dist/kolibri/app-globals-bfa38239.js +0 -4
  409. package/dist/kolibri/controller-icon-14449b07.js +0 -4
  410. package/dist/kolibri/controller-icon-14449b07.js.map +0 -1
  411. package/dist/kolibri/devtools-ec77e067.js +0 -4
  412. package/dist/kolibri/icons-d00eff5e.js +0 -4
  413. package/dist/kolibri/icons-d00eff5e.js.map +0 -1
  414. /package/dist/kolibri/{Alert-bebb173b.js.map → Alert-a3a98cf0.js.map} +0 -0
  415. /package/dist/kolibri/{Collapsible-c54aff9a.js.map → Collapsible-c78ff3d9.js.map} +0 -0
  416. /package/dist/kolibri/{CustomSuggestionsOptionsGroup-ec71e53e.js.map → CustomSuggestionsOptionsGroup-f8aab3c9.js.map} +0 -0
  417. /package/dist/kolibri/{FieldControlStateWrapper-4d0b5645.js.map → FieldControlStateWrapper-047375c6.js.map} +0 -0
  418. /package/dist/kolibri/{Heading-d8bc176d.js.map → Heading-db8212fd.js.map} +0 -0
  419. /package/dist/kolibri/{Icon-29c7a575.js.map → Icon-94d94af0.js.map} +0 -0
  420. /package/dist/kolibri/{Input-1f6b1e32.js.map → Input-e7f28c3e.js.map} +0 -0
  421. /package/dist/kolibri/{InputStateWrapper-be686f5c.js.map → InputStateWrapper-47927ccc.js.map} +0 -0
  422. /package/dist/kolibri/{InternalUnderlinedBadgeText-4e102a41.js.map → InternalUnderlinedBadgeText-bd14a865.js.map} +0 -0
  423. /package/dist/kolibri/{Span-25a2d8b1.js.map → Span-40890aef.js.map} +0 -0
  424. /package/dist/kolibri/{app-globals-bfa38239.js.map → app-globals-345b5bdc.js.map} +0 -0
  425. /package/dist/kolibri/{controller-39c6b21d.js.map → controller-1ca7ca52.js.map} +0 -0
  426. /package/dist/kolibri/{controller-8e7f4d3c.js.map → controller-87c98eff.js.map} +0 -0
  427. /package/dist/kolibri/{controller-a86d277d.js.map → controller-9840a130.js.map} +0 -0
  428. /package/dist/kolibri/{dev.utils-5ecfad25.js.map → dev.utils-139c37ee.js.map} +0 -0
  429. /package/dist/kolibri/{getRenderStates-0597d9aa.js.map → getRenderStates-7b981d3d.js.map} +0 -0
@@ -1,15 +1,14 @@
1
1
  import type { Generic } from 'adopted-style-sheets';
2
- import type { MsgPropType, PropAccessKey, PropDisabled, PropHideMsg, PropHideLabel, PropId, PropLabelWithExpertSlot, PropMsg, PropMultiple, PropName, PropOptionsWithOptgroup, PropRequired, PropRows, PropShortKey, PropSyncValueBySelector, PropTouched } from '../props';
3
- import type { InputTypeOnDefault, KoliBriHorizontalIcons, SelectOption, Stringified, W3CInputValue } from '../types';
4
- type RequiredProps = PropLabelWithExpertSlot;
2
+ import type { MsgPropType, PropAccessKey, PropDisabled, PropHideLabel, PropHideMsg, PropHorizontalIcons, PropId, PropLabelWithExpertSlot, PropMsg, PropMultiple, PropName, PropOptionsWithOptgroup, PropRequired, PropRows, PropShortKey, PropSyncValueBySelector, PropTouched } from '../props';
3
+ import type { InputTypeOnDefault, KoliBriHIcons, SelectOption, Stringified, W3CInputValue } from '../types';
4
+ type RequiredProps = PropLabelWithExpertSlot & PropOptionsWithOptgroup;
5
5
  type OptionalProps = {
6
6
  hint: string;
7
- icons: Stringified<KoliBriHorizontalIcons>;
8
7
  msg: Stringified<MsgPropType>;
9
8
  on: InputTypeOnDefault;
10
9
  tabIndex: number;
11
10
  value: Stringified<W3CInputValue[]>;
12
- } & PropAccessKey & PropDisabled & PropHideMsg & PropHideLabel & PropMultiple & PropName & PropOptionsWithOptgroup & PropRequired & PropRows & PropShortKey & PropSyncValueBySelector & PropTouched;
11
+ } & PropAccessKey & PropDisabled & PropHideMsg & PropHideLabel & PropHorizontalIcons & PropMultiple & PropName & PropRequired & PropRows & PropShortKey & PropSyncValueBySelector & PropTouched;
13
12
  type RequiredStates = {
14
13
  hasValue: boolean;
15
14
  options: SelectOption<W3CInputValue>[];
@@ -17,10 +16,9 @@ type RequiredStates = {
17
16
  } & PropId & PropHideMsg & PropMultiple & PropLabelWithExpertSlot;
18
17
  type OptionalStates = {
19
18
  hint: string;
20
- icons: KoliBriHorizontalIcons;
21
19
  on: InputTypeOnDefault;
22
20
  tabIndex: number;
23
- } & PropAccessKey & PropDisabled & PropHideLabel & PropId & PropName & PropRequired & PropRows & PropMsg & PropShortKey & PropTouched;
21
+ } & PropAccessKey & PropDisabled & PropHideLabel & KoliBriHIcons & PropId & PropName & PropRequired & PropRows & PropMsg & PropShortKey & PropTouched;
24
22
  export type SelectProps = Generic.Element.Members<RequiredProps, OptionalProps>;
25
23
  export type SelectStates = Generic.Element.Members<RequiredStates, OptionalStates>;
26
24
  export type SelectWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;
@@ -1,26 +1,24 @@
1
1
  import type { Generic } from 'adopted-style-sheets';
2
- import type { MsgPropType, PropDisabled, PropHideMsg, PropHideLabel, PropId, PropLabelWithExpertSlot, PropMsg, PropName, PropRequired, PropSyncValueBySelector, PropTouched, PropOptions, PropShortKey, PropAccessKey } from '../props';
3
- import type { InputTypeOnDefault, KoliBriHorizontalIcons, Option, StencilUnknown, Stringified } from '../types';
2
+ import type { MsgPropType, PropAccessKey, PropDisabled, PropHideLabel, PropHideMsg, PropHorizontalIcons, PropId, PropLabelWithExpertSlot, PropMsg, PropName, PropOptions, PropRequired, PropShortKey, PropSyncValueBySelector, PropTouched } from '../props';
3
+ import type { InputTypeOnDefault, KoliBriHIcons, Option, StencilUnknown, Stringified } from '../types';
4
4
  type RequiredProps = PropLabelWithExpertSlot & PropOptions;
5
5
  type OptionalProps = {
6
6
  hint: string;
7
- icons: Stringified<KoliBriHorizontalIcons>;
8
7
  msg: Stringified<MsgPropType>;
9
8
  on: InputTypeOnDefault;
10
9
  placeholder: string;
11
10
  value: StencilUnknown;
12
11
  hideClearButton: boolean;
13
- } & PropAccessKey & PropDisabled & PropHideMsg & PropHideLabel & PropName & PropRequired & PropSyncValueBySelector & PropShortKey & PropTouched;
12
+ } & PropAccessKey & PropDisabled & PropHideMsg & PropHideLabel & PropHorizontalIcons & PropName & PropRequired & PropSyncValueBySelector & PropShortKey & PropTouched;
14
13
  type RequiredStates = {
15
14
  options: Option<StencilUnknown>[];
16
15
  } & PropId & PropHideMsg & PropLabelWithExpertSlot;
17
16
  type OptionalStates = {
18
17
  hint: string;
19
- icons: KoliBriHorizontalIcons;
20
18
  on: InputTypeOnDefault;
21
19
  placeholder: string;
22
20
  hideClearButton: boolean;
23
- } & PropAccessKey & PropDisabled & PropHideLabel & PropId & PropName & PropRequired & PropMsg & PropShortKey & PropTouched;
21
+ } & PropAccessKey & PropDisabled & PropHideLabel & KoliBriHIcons & PropId & PropName & PropRequired & PropMsg & PropShortKey & PropTouched;
24
22
  export type SingleSelectProps = Generic.Element.Members<RequiredProps, OptionalProps>;
25
23
  export type SingleSelectStates = Generic.Element.Members<RequiredStates, OptionalStates>;
26
24
  export type SingleSelectWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;
@@ -1,19 +1,18 @@
1
1
  import type { Generic } from 'adopted-style-sheets';
2
- import type { MsgPropType, PropAccessKey, PropAdjustHeight, PropDisabled, PropHasCounter, PropHideMsg, PropHideLabel, PropId, PropLabelWithExpertSlot, PropMsg, PropName, PropReadOnly, PropRequired, PropRows, PropShortKey, PropSpellCheck, PropSyncValueBySelector, PropTouched } from '../props';
3
- import type { InputTypeOnDefault, KoliBriHorizontalIcons, Stringified } from '../types';
2
+ import type { MsgPropType, PropAccessKey, PropAdjustHeight, PropDisabled, PropHasCounter, PropHideLabel, PropHideMsg, PropHorizontalIcons, PropId, PropLabelWithExpertSlot, PropMsg, PropName, PropReadOnly, PropRequired, PropRows, PropShortKey, PropSpellCheck, PropSyncValueBySelector, PropTouched } from '../props';
3
+ import type { InputTypeOnDefault, KoliBriHIcons, Stringified } from '../types';
4
4
  export declare const cssResizeOptions: readonly ["vertical", "none"];
5
5
  export type CSSResize = (typeof cssResizeOptions)[number];
6
6
  type RequiredProps = PropLabelWithExpertSlot;
7
7
  type OptionalProps = {
8
8
  hint: string;
9
- icons: KoliBriHorizontalIcons;
10
9
  maxLength: number;
11
10
  msg: Stringified<MsgPropType>;
12
11
  on: InputTypeOnDefault;
13
12
  placeholder: string;
14
13
  resize: CSSResize;
15
14
  value: string;
16
- } & PropAccessKey & PropAdjustHeight & PropDisabled & PropHasCounter & PropHideMsg & PropHideLabel & PropId & PropName & PropReadOnly & PropRequired & PropRows & PropShortKey & PropSpellCheck & PropSyncValueBySelector & PropTouched;
15
+ } & PropAccessKey & PropAdjustHeight & PropDisabled & PropHasCounter & PropHideMsg & PropHideLabel & PropHorizontalIcons & PropId & PropName & PropReadOnly & PropRequired & PropRows & PropShortKey & PropSpellCheck & PropSyncValueBySelector & PropTouched;
17
16
  type RequiredStates = {
18
17
  adjustHeight: boolean;
19
18
  currentLength: number;
@@ -22,12 +21,11 @@ type RequiredStates = {
22
21
  } & PropAdjustHeight & PropHideMsg & PropId & PropLabelWithExpertSlot;
23
22
  type OptionalStates = {
24
23
  hint: string;
25
- icons: KoliBriHorizontalIcons;
26
24
  maxLength: number;
27
25
  on: InputTypeOnDefault;
28
26
  placeholder: string;
29
27
  value: string;
30
- } & PropAccessKey & PropDisabled & PropHasCounter & PropHideLabel & PropMsg & PropName & PropReadOnly & PropRequired & PropRows & PropShortKey & PropSpellCheck & PropTouched;
28
+ } & PropAccessKey & PropDisabled & PropHasCounter & PropHideLabel & KoliBriHIcons & PropMsg & PropName & PropReadOnly & PropRequired & PropRows & PropShortKey & PropSpellCheck & PropTouched;
31
29
  export type TextareaProps = Generic.Element.Members<RequiredProps, OptionalProps>;
32
30
  export type TextareaStates = Generic.Element.Members<RequiredStates, OptionalStates>;
33
31
  export type TextareaWatches = Generic.Element.Watchers<RequiredProps, OptionalProps>;
@@ -1,11 +1,15 @@
1
1
  import type { Generic } from 'adopted-style-sheets';
2
- import type { KoliBriIconsProp, KoliBriIconsState } from '../types';
2
+ import type { KoliBriHorizontalIconsProp, KoliBriIconsProp, KoliBriIconsState } from '../types';
3
3
  import type { Stringified } from '../types/common';
4
4
  import type { WatchOptions } from '../utils';
5
5
  export type IconsPropType = Stringified<KoliBriIconsProp>;
6
+ export type IconsHorizontalPropType = Stringified<KoliBriHorizontalIconsProp>;
6
7
  export type PropIcons = {
7
8
  icons: IconsPropType;
8
9
  };
10
+ export type PropHorizontalIcons = {
11
+ icons: IconsHorizontalPropType;
12
+ };
9
13
  export declare const mapIconProp2State: (icon: KoliBriIconsProp) => KoliBriIconsState;
10
14
  export declare const isIcon: (value?: unknown) => boolean;
11
15
  export declare const validateIcons: (component: Generic.Element.Component, value?: IconsPropType, options?: WatchOptions) => void;
@@ -13,7 +13,11 @@ type KoliBriVerticalIcons = {
13
13
  top?: IconOrIconClass;
14
14
  bottom?: IconOrIconClass;
15
15
  };
16
+ export type KoliBriHIcons = {
17
+ icons?: KoliBriHorizontalIcons;
18
+ };
16
19
  export type KoliBriAllIcons = KoliBriHorizontalIcons & KoliBriVerticalIcons;
17
20
  export type KoliBriIconsProp = AnyIconFontClass | KoliBriAllIcons;
21
+ export type KoliBriHorizontalIconsProp = AnyIconFontClass | KoliBriHorizontalIcons;
18
22
  export type KoliBriIconsState = KoliBriAllIcons;
19
23
  export {};
@@ -1,5 +1,5 @@
1
1
  import type { Stringified } from '../../common';
2
- import type { KoliBriHorizontalIcons } from '../../icons';
2
+ import type { PropHorizontalIcons } from '../../../props';
3
3
  import type { ButtonProps } from '../../../components';
4
4
  import type { InputTypeOnDefault, InputTypeOnOff } from '../types';
5
5
  export declare const inputDateTypeOptions: readonly ["date", "datetime-local", "month", "time", "week"];
@@ -10,7 +10,6 @@ export type OptionalInputProps<T> = {
10
10
  disabled: boolean;
11
11
  hideLabel: boolean;
12
12
  hint: string;
13
- icons: Stringified<KoliBriHorizontalIcons>;
14
13
  max: T;
15
14
  min: T;
16
15
  name: string;
@@ -21,4 +20,4 @@ export type OptionalInputProps<T> = {
21
20
  step: number;
22
21
  touched: boolean;
23
22
  value: T | null;
24
- };
23
+ } & PropHorizontalIcons;
package/doc/select.md CHANGED
@@ -5,28 +5,28 @@
5
5
 
6
6
  ## Properties
7
7
 
8
- | Property | Attribute | Description | Type | Default |
9
- | --------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
10
- | `_accessKey` | `_access-key` | Defines which key combination can be used to trigger or focus the interactive element of the component. | `string` \| `undefined` | `undefined` |
11
- | `_disabled` | `_disabled` | Makes the element not focusable and ignore all events. | `boolean` \| `undefined` | `false` |
12
- | `_hideLabel` | `_hide-label` | Hides the caption by default and displays the caption text with a tooltip when the interactive element is focused or the mouse is over it. | `boolean` \| `undefined` | `false` |
13
- | `_hideMsg` | `_hide-msg` | Hides the error message but leaves it in the DOM for the input's aria-describedby. | `boolean` \| `undefined` | `false` |
14
- | `_hint` | `_hint` | Defines the hint text. | `string` \| `undefined` | `''` |
15
- | `_icons` | `_icons` | Defines the icon classnames (e.g. `_icons="fa-solid fa-user"`). | `string` \| `undefined` \| `{ right?: IconOrIconClass` \| `undefined; left?: IconOrIconClass` \| `undefined; }` | `undefined` |
16
- | `_id` | `_id` | Defines the internal ID of the primary component element. | `string` \| `undefined` | `undefined` |
17
- | `_label` _(required)_ | `_label` | Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot. | `string` | `undefined` |
18
- | `_msg` | `_msg` | Defines the properties for a message rendered as Alert component. | `string` \| `undefined` \| `{} & { _level?: 0` \| `2` \| `1` \| `4` \| `3` \| `5` \| `6` \| `undefined; _on?: KoliBriAlertEventCallbacks` \| `undefined; _type?: "default"` \| `"info"` \| `"success"` \| `"warning"` \| `"error"` \| `undefined; _variant?: "card"` \| `"msg"` \| `undefined; _label?: string` \| `undefined; _alert?: boolean` \| `undefined; _hasCloser?: boolean` \| `undefined; } & { _description: string; }` | `undefined` |
19
- | `_multiple` | `_multiple` | Makes the input accept multiple inputs. | `boolean` \| `undefined` | `false` |
20
- | `_name` | `_name` | Defines the technical name of an input field. | `string` \| `undefined` | `undefined` |
21
- | `_on` | -- | Gibt die EventCallback-Funktionen für das Input-Event an. | `InputTypeOnBlur & InputTypeOnClick & InputTypeOnChange & InputTypeOnFocus & InputTypeOnInput` \| `undefined` | `undefined` |
22
- | `_options` | `_options` | Options the user can choose from, also supporting Optgroup. | `(Option<StencilUnknown>` \| `Optgroup<StencilUnknown>)[]` \| `string` \| `undefined` | `undefined` |
23
- | `_required` | `_required` | Makes the input element required. | `boolean` \| `undefined` | `false` |
24
- | `_rows` | `_rows` | Defines how many rows of options should be visible at the same time. | `number` \| `undefined` | `undefined` |
25
- | `_shortKey` | `_short-key` | Adds a visual short key hint to the component. | `string` \| `undefined` | `undefined` |
26
- | `_tabIndex` | `_tab-index` | Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) | `number` \| `undefined` | `undefined` |
27
- | `_tooltipAlign` | `_tooltip-align` | Defines where to show the Tooltip preferably: top, right, bottom or left. | `"bottom"` \| `"left"` \| `"right"` \| `"top"` \| `undefined` | `'top'` |
28
- | `_touched` | `_touched` | Shows if the input was touched by a user. | `boolean` \| `undefined` | `false` |
29
- | `_value` | `_value` | Defines the value of the input. | `W3CInputValue[]` \| `string` \| `undefined` | `undefined` |
8
+ | Property | Attribute | Description | Type | Default |
9
+ | ----------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
10
+ | `_accessKey` | `_access-key` | Defines which key combination can be used to trigger or focus the interactive element of the component. | `string` \| `undefined` | `undefined` |
11
+ | `_disabled` | `_disabled` | Makes the element not focusable and ignore all events. | `boolean` \| `undefined` | `false` |
12
+ | `_hideLabel` | `_hide-label` | Hides the caption by default and displays the caption text with a tooltip when the interactive element is focused or the mouse is over it. | `boolean` \| `undefined` | `false` |
13
+ | `_hideMsg` | `_hide-msg` | Hides the error message but leaves it in the DOM for the input's aria-describedby. | `boolean` \| `undefined` | `false` |
14
+ | `_hint` | `_hint` | Defines the hint text. | `string` \| `undefined` | `''` |
15
+ | `_icons` | `_icons` | Defines the icon classnames (e.g. `_icons="fa-solid fa-user"`). | `string` \| `undefined` \| `{ right?: IconOrIconClass` \| `undefined; left?: IconOrIconClass` \| `undefined; }` | `undefined` |
16
+ | `_id` | `_id` | Defines the internal ID of the primary component element. | `string` \| `undefined` | `undefined` |
17
+ | `_label` _(required)_ | `_label` | Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot. | `string` | `undefined` |
18
+ | `_msg` | `_msg` | Defines the properties for a message rendered as Alert component. | `string` \| `undefined` \| `{} & { _level?: 0` \| `2` \| `1` \| `4` \| `3` \| `5` \| `6` \| `undefined; _on?: KoliBriAlertEventCallbacks` \| `undefined; _type?: "default"` \| `"info"` \| `"success"` \| `"warning"` \| `"error"` \| `undefined; _variant?: "card"` \| `"msg"` \| `undefined; _label?: string` \| `undefined; _alert?: boolean` \| `undefined; _hasCloser?: boolean` \| `undefined; } & { _description: string; }` | `undefined` |
19
+ | `_multiple` | `_multiple` | Makes the input accept multiple inputs. | `boolean` \| `undefined` | `false` |
20
+ | `_name` | `_name` | Defines the technical name of an input field. | `string` \| `undefined` | `undefined` |
21
+ | `_on` | -- | Gibt die EventCallback-Funktionen für das Input-Event an. | `InputTypeOnBlur & InputTypeOnClick & InputTypeOnChange & InputTypeOnFocus & InputTypeOnInput` \| `undefined` | `undefined` |
22
+ | `_options` _(required)_ | `_options` | Options the user can choose from, also supporting Optgroup. | `(Option<StencilUnknown>` \| `Optgroup<StencilUnknown>)[]` \| `string` | `undefined` |
23
+ | `_required` | `_required` | Makes the input element required. | `boolean` \| `undefined` | `false` |
24
+ | `_rows` | `_rows` | Defines how many rows of options should be visible at the same time. | `number` \| `undefined` | `undefined` |
25
+ | `_shortKey` | `_short-key` | Adds a visual short key hint to the component. | `string` \| `undefined` | `undefined` |
26
+ | `_tabIndex` | `_tab-index` | Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) | `number` \| `undefined` | `undefined` |
27
+ | `_tooltipAlign` | `_tooltip-align` | Defines where to show the Tooltip preferably: top, right, bottom or left. | `"bottom"` \| `"left"` \| `"right"` \| `"top"` \| `undefined` | `'top'` |
28
+ | `_touched` | `_touched` | Shows if the input was touched by a user. | `boolean` \| `undefined` | `false` |
29
+ | `_value` | `_value` | Defines the value of the input. | `W3CInputValue[]` \| `string` \| `undefined` | `undefined` |
30
30
 
31
31
 
32
32
  ## Methods
package/doc/textarea.md CHANGED
@@ -14,7 +14,7 @@
14
14
  | `_hideLabel` | `_hide-label` | Hides the caption by default and displays the caption text with a tooltip when the interactive element is focused or the mouse is over it. | `boolean` \| `undefined` | `false` |
15
15
  | `_hideMsg` | `_hide-msg` | Hides the error message but leaves it in the DOM for the input's aria-describedby. | `boolean` \| `undefined` | `false` |
16
16
  | `_hint` | `_hint` | Defines the hint text. | `string` \| `undefined` | `''` |
17
- | `_icons` | -- | Defines the icon classnames (e.g. `_icons="fa-solid fa-user"`). | `undefined` \| `{ right?: IconOrIconClass` \| `undefined; left?: IconOrIconClass` \| `undefined; }` | `undefined` |
17
+ | `_icons` | `_icons` | Defines the icon classnames (e.g. `_icons="fa-solid fa-user"`). | `string` \| `undefined` \| `{ right?: IconOrIconClass` \| `undefined; left?: IconOrIconClass` \| `undefined; }` | `undefined` |
18
18
  | `_id` | `_id` | Defines the internal ID of the primary component element. | `string` \| `undefined` | `undefined` |
19
19
  | `_label` _(required)_ | `_label` | Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to `false` to enable the expert slot. | `string` | `undefined` |
20
20
  | `_maxLength` | `_max-length` | Defines the maximum number of input characters. | `number` \| `undefined` | `undefined` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/components",
3
- "version": "3.0.0-rc.8",
3
+ "version": "3.0.0-rc.9",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": {
@@ -3729,6 +3729,10 @@
3729
3729
  "name": "_hint",
3730
3730
  "description": "Defines the hint text."
3731
3731
  },
3732
+ {
3733
+ "name": "_icons",
3734
+ "description": "Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`)."
3735
+ },
3732
3736
  {
3733
3737
  "name": "_id",
3734
3738
  "description": "Defines the internal ID of the primary component element."
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- "use strict";const index=require("./index-f59a950a.js"),InternalUnderlinedBadgeText=require("./InternalUnderlinedBadgeText-389620e7.js"),isObject=require("./isObject-6090b636.js"),tslib_es6=require("./tslib.es6-5e301284.js"),componentNames=require("./component-names-82c4d68d.js"),Icon=require("./Icon-8867e73b.js"),clsx=require("./clsx-dd4d6dd1.js"),getRenderStates=require("./getRenderStates-ccd7c1d9.js"),icons=require("./icons-c0c89cbb.js"),prop_validators=require("./prop.validators-3c86f8eb.js"),common=require("./common-1ab929ac.js"),InputAdornment=(n,t)=>{var{position:e="start",class:o}=n,s=tslib_es6.__rest(n,["position","class"]);const i="kol-input-container__adornment",c=`${i}--${e}`;return index.h("div",Object.assign({class:clsx.clsx(i,c,o)},s),t)},InputAdornment$1=InputAdornment;function hasItems(n){return!!n&&(Array.isArray(n)?n.length>0:Boolean(n))}const Container=(n,t)=>{var{class:e}=n,o=tslib_es6.__rest(n,["class"]);return index.h("div",Object.assign({class:clsx.clsx("kol-input-container__container",e)},o),t)},KolInputContainerFc$1=(n,t)=>{const{class:e,startAdornment:o,endAdornment:s,disabled:i,msg:c,touched:r,containerProps:a,startAdornmentProps:l,endAdornmentProps:d}=n,u=tslib_es6.__rest(n,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),p=getRenderStates.checkHasMsg(c,r),b={"kol-input-container--disabled":i,[`kol-input-container--${(null==c?void 0:c.type)||"error"}`]:p},m=Object.assign({class:clsx.clsx("kol-input-container",b,e)},u);return hasItems(o)||hasItems(s)?index.h("div",Object.assign({},m),index.h(InputAdornment$1,Object.assign({},l,{position:"start"}),o),index.h(Container,Object.assign({},a),t),index.h(InputAdornment$1,Object.assign({},d,{position:"end"}),s)):index.h("div",Object.assign({},m),index.h(Container,Object.assign({},a),t))},KolInputContainerFc$2=KolInputContainerFc$1,KolButtonFc=n=>{const{label:t,icons:e,hideLabel:o,disabled:s,onClick:i}=n,c=tslib_es6.__rest(n,["label","icons","hideLabel","disabled","onClick"]);return index.h(componentNames.KolButtonWcTag,Object.assign({_label:t,_disabled:s,_icons:e,_hideLabel:o,_on:{onClick:i}},c))},KolButtonFc$1=KolButtonFc,KolIconButtonFc=n=>{const{componentName:t="button",label:e,icon:o,onClick:s}=n,i=tslib_es6.__rest(n,["componentName","label","icon","onClick"]),c="button"===t?KolButtonFc$1:Icon.KolIconFc;return index.h(c,Object.assign({label:e||"",hideLabel:!0,icons:`codicon codicon-${o}`,onClick:s},i))},KolIconButtonFc$1=KolIconButtonFc;function getInputContainerProps(n){let t,e;return"_icons"in n&&(t=n._icons),"_smartButton"in n&&(e=n._smartButton),{icons:t,smartButton:e,disabled:n._disabled,msg:getRenderStates.convertMsgToInternMsg(n._msg),touched:n._touched}}const InputContainerStateWrapperFc=({state:n,endAdornment:t},e)=>{const{icons:o,smartButton:s,disabled:i,msg:c,touched:r}=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 t&&(Array.isArray(t)?u.push(...t):u.push(t)),a&&d.push(index.h(KolIconButtonFc$1,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject.isObject(a)?a:{}))),isObject.isObject(s)&&u.push(index.h(KolIconButtonFc$1,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},s,{hideLabel:!0,disabled:i}))),l&&u.push(index.h(KolIconButtonFc$1,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject.isObject(l)?l:{}))),index.h(KolInputContainerFc$2,{disabled:i,msg:c,touched:r,startAdornment:d,endAdornment:u},e)},KolInputContainerFc=InputContainerStateWrapperFc,beforePatchIcons=(n,t)=>{const e=n;"object"==typeof e&&null!==e&&(common.isString(e.right,1)&&(e.right={icon:e.right}),common.isString(e.left,1)&&(e.left={icon:e.left}),t.set("_icons",e))};class InputIconController extends getRenderStates.InputController{constructor(n,t,e){super(n,t,e),this.component=n}validateIcons(n){prop_validators.objectObjectHandler(n,(()=>{try{n=prop_validators.parseJson(n)}catch(n){}prop_validators.watchValidator(this.component,"_icons",(n=>"object"==typeof n&&null!==n&&(common.isString(n.left,1)||icons.isIcon(n.left)||common.isString(n.right,1)||icons.isIcon(n.right))),new Set(["KoliBriHorizontalIcon"]),n,{hooks:{beforePatch:beforePatchIcons},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}exports.InputIconController=InputIconController,exports.KolIconButtonFc=KolIconButtonFc$1,exports.KolInputContainerFc=KolInputContainerFc;
@@ -1 +0,0 @@
1
- {"file":"controller-icon-f083fb87.js","mappings":";;;;;;;;;;;;;;;;;AAQA,MAAM,cAAc,GAA4B,CAAC,EAAkD,EAAE,QAAQ;QAA5D,EAAE,QAAQ,GAAG,OAAO,EAAE,KAAK,EAAE,SAAS,OAAY,EAAP,KAAK,wBAAhD,qBAAkD,CAAF;IAChG,MAAM,aAAa,GAAG,gCAAgC,CAAC;IACvD,MAAM,iBAAiB,GAAG,GAAG,aAAa,KAAK,QAAQ,EAAE,CAAC;IAE1D,QACCA,+BAAK,KAAK,EAAEC,SAAI,CAAC,aAAa,EAAE,iBAAiB,EAAE,SAAS,CAAC,IAAM,KAAK,GACtE,QAAQ,CACJ,EACL;AACH,CAAC,CAAC;AAEF,yBAAe,cAAc;;ACC7B,SAAS,QAAQ,CAAC,KAA0B;IAC3C,IAAI,CAAC,KAAK,EAAE;QACX,OAAO,KAAK,CAAC;KACb;IAED,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,SAAS,GAA+C,CAAC,EAA8B,EAA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,IAAkB;QAChG,KAAK,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC3B;IAEM,aAAa,CAAC,KAA2C;QAC/DC,mCAAmB,CAAC,KAAK,EAAE;YAC1B,IAAI;gBACH,KAAK,GAAGC,yBAAS,CAAyB,KAAe,CAAC,CAAC;aAE3D;YAAC,OAAO,CAAC,EAAE;aAEX;YACDC,8BAAc,CACb,IAAI,CAAC,SAAS,EACd,QAAQ,EACR,CAAC,KAAK;gBACL,QACC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,KAAKN,eAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,IAAIO,YAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAIP,eAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,IAAIO,YAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAChJ;aACF,EACD,IAAI,GAAG,CAAC,CAAC,uBAAuB,CAAC,CAAC,EAClC,KAAK,EACL;gBACC,KAAK,EAAE;oBACN,WAAW,EAAE,gBAAgB;iBAC7B;gBACD,QAAQ,EAAE,IAAI;aACd,CACD,CAAC;SACF,CAAC,CAAC;KACH;IAEM,iBAAiB;QACvB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;KAC1C;;;;;;;","names":["h","clsx","KolInputContainerFc","checkHasMsg","InputAdornment","KolButtonWcTag","KolButtonFc","KolIconFc","convertMsgToInternMsg","isString","KolIconButtonFc","isObject","InputController","objectObjectHandler","parseJson","watchValidator","isIcon"],"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';\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\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 * - `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 { KoliBriHorizontalIcons, Stringified } from '../../../schema';\nimport { isIcon, isString, objectObjectHandler, parseJson, watchValidator } from '../../../schema';\n\nimport { InputController } from './controller';\n\nimport type { Props, Watches } from './types-icon';\n\nconst beforePatchIcons = (value: unknown, nextState: Map<string, unknown>): void => {\n\tconst icons = value as KoliBriHorizontalIcons;\n\tif (typeof icons === 'object' && icons !== null) {\n\t\tif (isString(icons.right, 1)) {\n\t\t\ticons.right = { icon: icons.right as string };\n\t\t}\n\t\tif (isString(icons.left, 1)) {\n\t\t\ticons.left = { icon: icons.left as string };\n\t\t}\n\t\tnextState.set('_icons', icons);\n\t}\n};\n\nexport class InputIconController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\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?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<KoliBriHorizontalIcons>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\twatchValidator(\n\t\t\t\tthis.component,\n\t\t\t\t'_icons',\n\t\t\t\t(value): boolean => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\ttypeof value === 'object' && value !== null && (isString(value.left, 1) || isIcon(value.left) || isString(value.right, 1) || isIcon(value.right))\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tnew Set(['KoliBriHorizontalIcon']),\n\t\t\t\tvalue,\n\t\t\t\t{\n\t\t\t\t\thooks: {\n\t\t\t\t\t\tbeforePatch: beforePatchIcons,\n\t\t\t\t\t},\n\t\t\t\t\trequired: true,\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"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"icons-c0c89cbb.js","mappings":";;;;;;;;AAsBA,MAAM,aAAa,GAAG,CAAC,KAAwB,EAAE,SAAwB,EAAE,IAA2C;IACrH,IAAIA,eAAQ,CAAC,IAAI,CAAC,EAAE;QACnB,KAAK,CAAC,SAAS,CAAC,GAAG,IAAyB,CAAC;KAC7C;SAAM,IAAIC,eAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;QAC7B,KAAK,CAAC,SAAS,CAAC,GAAG;YAClB,IAAI,EAAE,IAAwB;SAC9B,CAAC;KACF;AACF,CAAC,CAAC;AAEK,MAAM,iBAAiB,GAAG,CAAC,IAAsB;IACvD,IAAI,KAAK,GAAsB,EAAE,CAAC;IAClC,IAAIA,eAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;QACtB,KAAK,GAAG;YACP,IAAI,EAAE;gBACL,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AS,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;qBACjE;oBACD,eAAe,CAAC,SAAS,CAAC,CAAC;iBAC3B;aACD,IAEF,CAAC;KACF,CAAC,CAAC;AACJ;;;;;","names":["isObject","isString","isStyle","objectObjectHandler","parseJson","watchValidator"],"sources":["src/schema/props/icons.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { AnyIconFontClass, KoliBriCustomIcon, KoliBriIconsProp, KoliBriIconsState } from '../types';\nimport type { Stringified } from '../types/common';\nimport type { WatchOptions } from '../utils';\nimport { objectObjectHandler, parseJson, watchValidator } from '../utils';\nimport { isObject, isString, isStyle } from '../validators';\n\nimport type { AlignPropType } from './align';\n\n/* types */\nexport type IconsPropType = Stringified<KoliBriIconsProp>;\n\n/**\n * Defines the icon classnames.\n */\nexport type PropIcons = {\n\ticons: IconsPropType;\n};\n\n/* validator */\n\nconst mapCustomIcon = (state: KoliBriIconsState, alignment: AlignPropType, icon?: AnyIconFontClass | KoliBriCustomIcon) => {\n\tif (isObject(icon)) {\n\t\tstate[alignment] = icon as KoliBriCustomIcon;\n\t} else if (isString(icon, 1)) {\n\t\tstate[alignment] = {\n\t\t\ticon: icon as AnyIconFontClass,\n\t\t};\n\t}\n};\n\nexport const mapIconProp2State = (icon: KoliBriIconsProp): KoliBriIconsState => {\n\tlet state: KoliBriIconsState = {};\n\tif (isString(icon, 1)) {\n\t\tstate = {\n\t\t\tleft: {\n\t\t\t\ticon: icon as AnyIconFontClass,\n\t\t\t},\n\t\t};\n\t} else if (typeof icon === 'object' && icon !== null) {\n\t\tmapCustomIcon(state, 'top', icon.top);\n\t\tmapCustomIcon(state, 'right', icon.right);\n\t\tmapCustomIcon(state, 'bottom', icon.bottom);\n\t\tmapCustomIcon(state, 'left', icon.left);\n\t}\n\treturn state;\n};\n\nconst beforePatchIcon = (component: Generic.Element.Component): void => {\n\tif (component.nextState?.has('_icons')) {\n\t\tconst icons = component.nextState?.get('_icons') as KoliBriIconsProp;\n\t\tcomponent.nextState?.set('_icons', mapIconProp2State(icons));\n\t}\n};\n\nexport const isIcon = (value?: unknown): boolean =>\n\ttypeof value === 'object' &&\n\tvalue !== null &&\n\t(typeof (value as KoliBriCustomIcon).style === 'undefined' || isStyle((value as KoliBriCustomIcon).style)) &&\n\t(typeof (value as KoliBriCustomIcon).label === 'undefined' || isString((value as KoliBriCustomIcon).label)) &&\n\tisString((value as KoliBriCustomIcon).icon, 1);\n\nexport const validateIcons = (component: Generic.Element.Component, value?: IconsPropType, options: WatchOptions = {}): void => {\n\tobjectObjectHandler(value, () => {\n\t\ttry {\n\t\t\tvalue = parseJson<KoliBriIconsProp>(value as string);\n\t\t} catch (e) {\n\t\t\t// value behält den ursprünglichen Wert\n\t\t}\n\t\twatchValidator(\n\t\t\tcomponent,\n\t\t\t'_icons',\n\t\t\t(value): boolean => {\n\t\t\t\tconst valueIsEmptyObject = typeof value === 'object' && value !== null && Object.keys(value).length === 0;\n\t\t\t\treturn (\n\t\t\t\t\tvalue === null ||\n\t\t\t\t\tvalueIsEmptyObject ||\n\t\t\t\t\tisString(value, 1) ||\n\t\t\t\t\t(typeof value === 'object' &&\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(isString(value.left, 1) ||\n\t\t\t\t\t\t\tisIcon(value.left) ||\n\t\t\t\t\t\t\tisString(value.right, 1) ||\n\t\t\t\t\t\t\tisIcon(value.right) ||\n\t\t\t\t\t\t\tisString(value.top, 1) ||\n\t\t\t\t\t\t\tisIcon(value.top) ||\n\t\t\t\t\t\t\tisString(value.bottom, 1) ||\n\t\t\t\t\t\t\tisIcon(value.bottom)))\n\t\t\t\t);\n\t\t\t},\n\t\t\tnew Set(['KoliBriIcon']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\t...options,\n\t\t\t\tdefaultValue: {},\n\t\t\t\thooks: {\n\t\t\t\t\tafterPatch: options.hooks?.afterPatch,\n\t\t\t\t\tbeforePatch: (nextValue, nextState, component, key) => {\n\t\t\t\t\t\tif (typeof options.hooks?.beforePatch === 'function') {\n\t\t\t\t\t\t\toptions.hooks?.beforePatch(nextValue, nextState, component, key);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbeforePatchIcon(component);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t});\n};\n"],"version":3}
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{h}from"./index-ed1aff4f.js";import{i as isString}from"./InternalUnderlinedBadgeText-4e102a41.js";import{i as isObject}from"./isObject-ffcbbb76.js";import{_ as __rest}from"./tslib.es6-1173d062.js";import{a as KolButtonWcTag}from"./component-names-60d77143.js";import{K as KolIconFc}from"./Icon-29c7a575.js";import{c as clsx}from"./clsx-09a06a12.js";import{c as checkHasMsg,a as convertMsgToInternMsg,I as InputController}from"./getRenderStates-0597d9aa.js";import{i as isIcon}from"./icons-d00eff5e.js";import{o as objectObjectHandler,p as parseJson,w as watchValidator}from"./prop.validators-17aec743.js";import{i as isString$1}from"./common-54bf85ba.js";const InputAdornment=(n,t)=>{var{position:o="start",class:s}=n,e=__rest(n,["position","class"]);const c="kol-input-container__adornment",i=`${c}--${o}`;return h("div",Object.assign({class:clsx(c,i,s)},e),t)},InputAdornment$1=InputAdornment;function hasItems(n){return!!n&&(Array.isArray(n)?n.length>0:Boolean(n))}const Container=(n,t)=>{var{class:o}=n,s=__rest(n,["class"]);return h("div",Object.assign({class:clsx("kol-input-container__container",o)},s),t)},KolInputContainerFc$1=(n,t)=>{const{class:o,startAdornment:s,endAdornment:e,disabled:c,msg:i,touched:r,containerProps:a,startAdornmentProps:l,endAdornmentProps:d}=n,p=__rest(n,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),u=checkHasMsg(i,r),m={"kol-input-container--disabled":c,[`kol-input-container--${(null==i?void 0:i.type)||"error"}`]:u},b=Object.assign({class:clsx("kol-input-container",m,o)},p);return hasItems(s)||hasItems(e)?h("div",Object.assign({},b),h(InputAdornment$1,Object.assign({},l,{position:"start"}),s),h(Container,Object.assign({},a),t),h(InputAdornment$1,Object.assign({},d,{position:"end"}),e)):h("div",Object.assign({},b),h(Container,Object.assign({},a),t))},KolInputContainerFc$2=KolInputContainerFc$1,KolButtonFc=n=>{const{label:t,icons:o,hideLabel:s,disabled:e,onClick:c}=n,i=__rest(n,["label","icons","hideLabel","disabled","onClick"]);return h(KolButtonWcTag,Object.assign({_label:t,_disabled:e,_icons:o,_hideLabel:s,_on:{onClick:c}},i))},KolButtonFc$1=KolButtonFc,KolIconButtonFc=n=>{const{componentName:t="button",label:o,icon:s,onClick:e}=n,c=__rest(n,["componentName","label","icon","onClick"]);return h("button"===t?KolButtonFc$1:KolIconFc,Object.assign({label:o||"",hideLabel:!0,icons:`codicon codicon-${s}`,onClick:e},c))},KolIconButtonFc$1=KolIconButtonFc;function getInputContainerProps(n){let t,o;return"_icons"in n&&(t=n._icons),"_smartButton"in n&&(o=n._smartButton),{icons:t,smartButton:o,disabled:n._disabled,msg:convertMsgToInternMsg(n._msg),touched:n._touched}}const InputContainerStateWrapperFc=({state:n,endAdornment:t},o)=>{const{icons:s,smartButton:e,disabled:c,msg:i,touched:r}=getInputContainerProps(n);let a=null==s?void 0:s.left;isString(a)&&(a={icon:a});let l=null==s?void 0:s.right;isString(l)&&(l={icon:l});const d=[],p=[];return t&&(Array.isArray(t)?p.push(...t):p.push(t)),a&&d.push(h(KolIconButtonFc$1,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject(a)?a:{}))),isObject(e)&&p.push(h(KolIconButtonFc$1,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},e,{hideLabel:!0,disabled:c}))),l&&p.push(h(KolIconButtonFc$1,Object.assign({componentName:"icon",class:"kol-input-container__icon"},isObject(l)?l:{}))),h(KolInputContainerFc$2,{disabled:c,msg:i,touched:r,startAdornment:d,endAdornment:p},o)},KolInputContainerFc=InputContainerStateWrapperFc,beforePatchIcons=(n,t)=>{const o=n;"object"==typeof o&&null!==o&&(isString$1(o.right,1)&&(o.right={icon:o.right}),isString$1(o.left,1)&&(o.left={icon:o.left}),t.set("_icons",o))};class InputIconController extends InputController{constructor(n,t,o){super(n,t,o),this.component=n}validateIcons(n){objectObjectHandler(n,(()=>{try{n=parseJson(n)}catch(n){}watchValidator(this.component,"_icons",(n=>"object"==typeof n&&null!==n&&(isString$1(n.left,1)||isIcon(n.left)||isString$1(n.right,1)||isIcon(n.right))),new Set(["KoliBriHorizontalIcon"]),n,{hooks:{beforePatch:beforePatchIcons},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}export{InputIconController as I,KolInputContainerFc as K,KolIconButtonFc$1 as a};
@@ -1 +0,0 @@
1
- {"file":"controller-icon-14449b07.js","mappings":";;;;;;;;;;;;;;;AAQA,MAAM,cAAc,GAA4B,CAAC,EAAkD,EAAE,QAAQ;QAA5D,EAAE,QAAQ,GAAG,OAAO,EAAE,KAAK,EAAE,SAAS,OAAY,EAAP,KAAK,cAAhD,qBAAkD,CAAF;IAChG,MAAM,aAAa,GAAG,gCAAgC,CAAC;IACvD,MAAM,iBAAiB,GAAG,GAAG,aAAa,KAAK,QAAQ,EAAE,CAAC;IAE1D,QACC,yBAAK,KAAK,EAAE,IAAI,CAAC,aAAa,EAAE,iBAAiB,EAAE,SAAS,CAAC,IAAM,KAAK,GACtE,QAAQ,CACJ,EACL;AACH,CAAC,CAAC;AAEF,yBAAe,cAAc;;ACC7B,SAAS,QAAQ,CAAC,KAA0B;IAC3C,IAAI,CAAC,KAAK,EAAE;QACX,OAAO,KAAK,CAAC;KACb;IAED,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,SAAS,GAA+C,CAAC,EAA8B,EAAE,QAAQ;QAAxC,EAAE,KAAK,EAAE,SAAS,O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C,SAAS,GAAG,SAAS,CAAC;KAC3B;IAEM,aAAa,CAAC,KAA2C;QAC/D,mBAAmB,CAAC,KAAK,EAAE;YAC1B,IAAI;gBACH,KAAK,GAAG,SAAS,CAAyB,KAAe,CAAC,CAAC;aAE3D;YAAC,OAAO,CAAC,EAAE;aAEX;YACD,cAAc,CACb,IAAI,CAAC,SAAS,EACd,QAAQ,EACR,CAAC,KAAK;gBACL,QACC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,KAAKA,UAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAIA,UAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAChJ;aACF,EACD,IAAI,GAAG,CAAC,CAAC,uBAAuB,CAAC,CAAC,EAClC,KAAK,EACL;gBACC,KAAK,EAAE;oBACN,WAAW,EAAE,gBAAgB;iBAC7B;gBACD,QAAQ,EAAE,IAAI;aACd,CACD,CAAC;SACF,CAAC,CAAC;KACH;IAEM,iBAAiB;QACvB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;KAC1C;;;;;","names":["KolInputContainerFc","InputAdornment","KolButtonFc","KolIconButtonFc","isString"],"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';\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\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 * - `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 { KoliBriHorizontalIcons, Stringified } from '../../../schema';\nimport { isIcon, isString, objectObjectHandler, parseJson, watchValidator } from '../../../schema';\n\nimport { InputController } from './controller';\n\nimport type { Props, Watches } from './types-icon';\n\nconst beforePatchIcons = (value: unknown, nextState: Map<string, unknown>): void => {\n\tconst icons = value as KoliBriHorizontalIcons;\n\tif (typeof icons === 'object' && icons !== null) {\n\t\tif (isString(icons.right, 1)) {\n\t\t\ticons.right = { icon: icons.right as string };\n\t\t}\n\t\tif (isString(icons.left, 1)) {\n\t\t\ticons.left = { icon: icons.left as string };\n\t\t}\n\t\tnextState.set('_icons', icons);\n\t}\n};\n\nexport class InputIconController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\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?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<KoliBriHorizontalIcons>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\twatchValidator(\n\t\t\t\tthis.component,\n\t\t\t\t'_icons',\n\t\t\t\t(value): boolean => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\ttypeof value === 'object' && value !== null && (isString(value.left, 1) || isIcon(value.left) || isString(value.right, 1) || isIcon(value.right))\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tnew Set(['KoliBriHorizontalIcon']),\n\t\t\t\tvalue,\n\t\t\t\t{\n\t\t\t\t\thooks: {\n\t\t\t\t\t\tbeforePatch: beforePatchIcons,\n\t\t\t\t\t},\n\t\t\t\t\trequired: true,\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"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"icons-d00eff5e.js","mappings":";;;;;;AAsBA,MAAM,aAAa,GAAG,CAAC,KAAwB,EAAE,SAAwB,EAAE,IAA2C;IACrH,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE;QACnB,KAAK,CAAC,SAAS,CAAC,GAAG,IAAyB,CAAC;KAC7C;SAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;QAC7B,KAAK,CAAC,SAAS,CAAC,GAAG;YAClB,IAAI,EAAE,IAAwB;SAC9B,CAAC;KACF;AACF,CAAC,CAAC;AAEK,MAAM,iBAAiB,GAAG,CAAC,IAAsB;IACvD,IAAI,KAAK,GAAsB,EAAE,CAAC;IAClC,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE;QACtB,KAAK,GAAG;YACP,IAAI,EAAE;gBACL,IAAI,EAAE,IAAwB;aAC9B;SACD,CAAC;KACF;SAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;QACrD,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,aAAa,C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IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;YAC1G,QACC,KAAK,KAAK,IAAI;gBACd,kBAAkB;gBAClB,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;iBACjB,OAAO,KAAK,KAAK,QAAQ;oBACzB,KAAK,KAAK,IAAI;qBACb,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;wBACvB,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;wBAClB,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;wBACxB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;wBACnB,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;wBACtB,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC;wBACjB,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;wBACzB,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EACvB;SACF,EACD,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,EACxB,KAAK,kCAED,OAAO,KACV,YAAY,EAAE,EAAE,EAChB,KAAK,EAAE;gBACN,UAAU,EAAE,MAAA,OAAO,CAAC,KAAK,0CAAE,UAAU;gBACrC,WAAW,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG;;oBACjD,IAAI,QAAO,MAAA,OAAO,CAAC,KAAK,0CAAE,WAAW,CAAA,KAAK,UAAU,EAAE;wBACrD,MAAA,OAAO,CAAC,KAAK,0CAAE,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;qBACjE;oBACD,eAAe,CAAC,SAAS,CAAC,CAAC;iBAC3B;aACD,IAEF,CAAC;KACF,CAAC,CAAC;AACJ;;;;","names":[],"sources":["src/schema/props/icons.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { AnyIconFontClass, KoliBriCustomIcon, KoliBriIconsProp, KoliBriIconsState } from '../types';\nimport type { Stringified } from '../types/common';\nimport type { WatchOptions } from '../utils';\nimport { objectObjectHandler, parseJson, watchValidator } from '../utils';\nimport { isObject, isString, isStyle } from '../validators';\n\nimport type { AlignPropType } from './align';\n\n/* types */\nexport type IconsPropType = Stringified<KoliBriIconsProp>;\n\n/**\n * Defines the icon classnames.\n */\nexport type PropIcons = {\n\ticons: IconsPropType;\n};\n\n/* validator */\n\nconst mapCustomIcon = (state: KoliBriIconsState, alignment: AlignPropType, icon?: AnyIconFontClass | KoliBriCustomIcon) => {\n\tif (isObject(icon)) {\n\t\tstate[alignment] = icon as KoliBriCustomIcon;\n\t} else if (isString(icon, 1)) {\n\t\tstate[alignment] = {\n\t\t\ticon: icon as AnyIconFontClass,\n\t\t};\n\t}\n};\n\nexport const mapIconProp2State = (icon: KoliBriIconsProp): KoliBriIconsState => {\n\tlet state: KoliBriIconsState = {};\n\tif (isString(icon, 1)) {\n\t\tstate = {\n\t\t\tleft: {\n\t\t\t\ticon: icon as AnyIconFontClass,\n\t\t\t},\n\t\t};\n\t} else if (typeof icon === 'object' && icon !== null) {\n\t\tmapCustomIcon(state, 'top', icon.top);\n\t\tmapCustomIcon(state, 'right', icon.right);\n\t\tmapCustomIcon(state, 'bottom', icon.bottom);\n\t\tmapCustomIcon(state, 'left', icon.left);\n\t}\n\treturn state;\n};\n\nconst beforePatchIcon = (component: Generic.Element.Component): void => {\n\tif (component.nextState?.has('_icons')) {\n\t\tconst icons = component.nextState?.get('_icons') as KoliBriIconsProp;\n\t\tcomponent.nextState?.set('_icons', mapIconProp2State(icons));\n\t}\n};\n\nexport const isIcon = (value?: unknown): boolean =>\n\ttypeof value === 'object' &&\n\tvalue !== null &&\n\t(typeof (value as KoliBriCustomIcon).style === 'undefined' || isStyle((value as KoliBriCustomIcon).style)) &&\n\t(typeof (value as KoliBriCustomIcon).label === 'undefined' || isString((value as KoliBriCustomIcon).label)) &&\n\tisString((value as KoliBriCustomIcon).icon, 1);\n\nexport const validateIcons = (component: Generic.Element.Component, value?: IconsPropType, options: WatchOptions = {}): void => {\n\tobjectObjectHandler(value, () => {\n\t\ttry {\n\t\t\tvalue = parseJson<KoliBriIconsProp>(value as string);\n\t\t} catch (e) {\n\t\t\t// value behält den ursprünglichen Wert\n\t\t}\n\t\twatchValidator(\n\t\t\tcomponent,\n\t\t\t'_icons',\n\t\t\t(value): boolean => {\n\t\t\t\tconst valueIsEmptyObject = typeof value === 'object' && value !== null && Object.keys(value).length === 0;\n\t\t\t\treturn (\n\t\t\t\t\tvalue === null ||\n\t\t\t\t\tvalueIsEmptyObject ||\n\t\t\t\t\tisString(value, 1) ||\n\t\t\t\t\t(typeof value === 'object' &&\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(isString(value.left, 1) ||\n\t\t\t\t\t\t\tisIcon(value.left) ||\n\t\t\t\t\t\t\tisString(value.right, 1) ||\n\t\t\t\t\t\t\tisIcon(value.right) ||\n\t\t\t\t\t\t\tisString(value.top, 1) ||\n\t\t\t\t\t\t\tisIcon(value.top) ||\n\t\t\t\t\t\t\tisString(value.bottom, 1) ||\n\t\t\t\t\t\t\tisIcon(value.bottom)))\n\t\t\t\t);\n\t\t\t},\n\t\t\tnew Set(['KoliBriIcon']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\t...options,\n\t\t\t\tdefaultValue: {},\n\t\t\t\thooks: {\n\t\t\t\t\tafterPatch: options.hooks?.afterPatch,\n\t\t\t\t\tbeforePatch: (nextValue, nextState, component, key) => {\n\t\t\t\t\t\tif (typeof options.hooks?.beforePatch === 'function') {\n\t\t\t\t\t\t\toptions.hooks?.beforePatch(nextValue, nextState, component, key);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbeforePatchIcon(component);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t});\n};\n"],"version":3}
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{_ as e}from"./tslib.es6-1173d062.js";import{h as s,F as a}from"./index-ed1aff4f.js";import{c as l}from"./clsx-09a06a12.js";import{f as o,c as i}from"./getRenderStates-0597d9aa.js";const t=d=>{const{class:t,msg:r,required:n,disabled:u,touched:b,readonly:c,ariaDescribedBy:p,hideLabel:g,label:m,suggestions:y,value:f}=d,h=e(d,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),j=i(r,b),B={"kol-input--disabled":Boolean(u),"kol-input--required":Boolean(n),"kol-input--touched":Boolean(b),"kol-input--readonly":Boolean(c),[`kol-input--${(null==r?void 0:r.type)||"error"}`]:j},k=Object.assign(Object.assign({class:l("kol-input",B,t),required:n,disabled:u,readonly:c,type:"text",list:y?`${h.id}-list`:void 0},o({ariaDescribedBy:p,hideLabel:g,label:m})),h);return s(a,null,s("input",Object.assign({},k,{value:f})),y)},d=t;export{d as K};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{o,S as t}from"./index-6d801dad.js";import{a as e}from"./index-ed1aff4f.js";import{L as f}from"./dev.utils-fab45cbc.js";e((e=>{try{e.shadowRoot instanceof ShadowRoot&&o(e,t(e))}catch(o){}return"default"})),import("./devtools-ec77e067.js").then((o=>{"object"==typeof o&&null!==o&&"function"==typeof o.initialize&&o.initialize()})).catch((o=>{f.error(o)}));const s=()=>{},a=s,c=a;export{c as g};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{h as o}from"./index-ed1aff4f.js";import{i as n}from"./InternalUnderlinedBadgeText-4e102a41.js";import{i as t}from"./isObject-ffcbbb76.js";import{_ as e}from"./tslib.es6-1173d062.js";import{a as s}from"./component-names-60d77143.js";import{K as i}from"./Icon-29c7a575.js";import{c}from"./clsx-09a06a12.js";import{c as a,a as r,I as l}from"./getRenderStates-0597d9aa.js";import{i as d}from"./icons-d00eff5e.js";import{o as m,p as b,w as u}from"./prop.validators-17aec743.js";import{i as p}from"./common-54bf85ba.js";const f=(n,t)=>{var{position:s="start",class:i}=n,a=e(n,["position","class"]);const r="kol-input-container__adornment",l=`${r}--${s}`;return o("div",Object.assign({class:c(r,l,i)},a),t)},j=f;function _(o){return!!o&&(Array.isArray(o)?o.length>0:Boolean(o))}const h=(n,t)=>{var{class:s}=n,i=e(n,["class"]);return o("div",Object.assign({class:c("kol-input-container__container",s)},i),t)},k=(n,t)=>{const{class:s,startAdornment:i,endAdornment:r,disabled:l,msg:d,touched:m,containerProps:p,startAdornmentProps:b,endAdornmentProps:u}=n,f=e(n,["class","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps"]),g=a(d,m),k={"kol-input-container--disabled":l,[`kol-input-container--${(null==d?void 0:d.type)||"error"}`]:g},A=Object.assign({class:c("kol-input-container",k,s)},f);return _(i)||_(r)?o("div",Object.assign({},A),o(j,Object.assign({},b,{position:"start"}),i),o(h,Object.assign({},p),t),o(j,Object.assign({},u,{position:"end"}),r)):o("div",Object.assign({},A),o(h,Object.assign({},p),t))},O=k,v=n=>{const{label:t,icons:i,hideLabel:a,disabled:c,onClick:r}=n,l=e(n,["label","icons","hideLabel","disabled","onClick"]);return o(s,Object.assign({_label:t,_disabled:c,_icons:i,_hideLabel:a,_on:{onClick:r}},l))},A=v,g=n=>{const{componentName:t="button",label:s,icon:a,onClick:c}=n,r=e(n,["componentName","label","icon","onClick"]);return o("button"===t?A:i,Object.assign({label:s||"",hideLabel:!0,icons:`codicon codicon-${a}`,onClick:c},r))},P=g;function B(o){let n,t;return"_icons"in o&&(n=o._icons),"_smartButton"in o&&(t=o._smartButton),{icons:n,smartButton:t,disabled:o._disabled,msg:r(o._msg),touched:o._touched}}const C=({state:s,endAdornment:e},i)=>{const{icons:a,smartButton:c,disabled:r,msg:l,touched:d}=B(s);let m=null==a?void 0:a.left;n(m)&&(m={icon:m});let p=null==a?void 0:a.right;n(p)&&(p={icon:p});const b=[],u=[];return e&&(Array.isArray(e)?u.push(...e):u.push(e)),m&&b.push(o(P,Object.assign({componentName:"icon",class:"kol-input-container__icon"},t(m)?m:{}))),t(c)&&u.push(o(P,Object.assign({componentName:"button",class:"kol-input-container__smart-button"},c,{hideLabel:!0,disabled:r}))),p&&u.push(o(P,Object.assign({componentName:"icon",class:"kol-input-container__icon"},t(p)?p:{}))),o(O,{disabled:r,msg:l,touched:d,startAdornment:b,endAdornment:u},i)},I=C,L=(o,n)=>{const t=o;"object"==typeof t&&null!==t&&(p(t.right,1)&&(t.right={icon:t.right}),p(t.left,1)&&(t.left={icon:t.left}),n.set("_icons",t))};class x extends l{constructor(o,n,t){super(o,n,t),this.component=o}validateIcons(o){m(o,(()=>{try{o=b(o)}catch(o){}u(this.component,"_icons",(o=>"object"==typeof o&&null!==o&&(p(o.left,1)||d(o.left)||p(o.right,1)||d(o.right))),new Set(["KoliBriHorizontalIcon"]),o,{hooks:{beforePatch:L},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons)}}export{x as I,I as K,P as a};
@@ -1 +0,0 @@
1
- {"version":3,"names":["InputAdornment","_a","children","position","class","className","other","__rest","rootClassName","positionClassName","h","Object","assign","clsx","InputAdornment$1","hasItems","items","Array","isArray","length","Boolean","Container","KolInputContainerFc","props","classNames","startAdornment","endAdornment","disabled","msg","touched","containerProps","startAdornmentProps","endAdornmentProps","showMsg","checkHasMsg","stateCssClasses","type","baseProps","KolInputContainerFc$2","KolButtonFc","label","icons","hideLabel","onClick","KolButtonWcTag","_label","_disabled","_icons","_hideLabel","_on","KolButtonFc$1","KolIconButtonFc","componentName","icon","Component","KolIconFc","KolIconButtonFc$1","getInputContainerProps","state","undefined","smartButton","_smartButton","convertMsgToInternMsg","_msg","_touched","InputContainerStateWrapperFc","defaultEndAdornment","leftIconProps","left","isString","rightIconProps","right","push","isObject","beforePatchIcons","value","nextState","set","InputIconController","InputController","constructor","component","name","host","super","this","validateIcons","objectObjectHandler","parseJson","e","watchValidator","isIcon","Set","hooks","beforePatch","required","componentWillLoad"],"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';\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\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 * - `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 { KoliBriHorizontalIcons, Stringified } from '../../../schema';\nimport { isIcon, isString, objectObjectHandler, parseJson, watchValidator } from '../../../schema';\n\nimport { InputController } from './controller';\n\nimport type { Props, Watches } from './types-icon';\n\nconst beforePatchIcons = (value: unknown, nextState: Map<string, unknown>): void => {\n\tconst icons = value as KoliBriHorizontalIcons;\n\tif (typeof icons === 'object' && icons !== null) {\n\t\tif (isString(icons.right, 1)) {\n\t\t\ticons.right = { icon: icons.right as string };\n\t\t}\n\t\tif (isString(icons.left, 1)) {\n\t\t\ticons.left = { icon: icons.left as string };\n\t\t}\n\t\tnextState.set('_icons', icons);\n\t}\n};\n\nexport class InputIconController extends InputController implements Watches {\n\tprotected readonly component: Generic.Element.Component & Props;\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?: Stringified<KoliBriHorizontalIcons>): void {\n\t\tobjectObjectHandler(value, () => {\n\t\t\ttry {\n\t\t\t\tvalue = parseJson<KoliBriHorizontalIcons>(value as string);\n\t\t\t\t// eslint-disable-next-line no-empty\n\t\t\t} catch (e) {\n\t\t\t\t// value behält den ursprünglichen Wert\n\t\t\t}\n\t\t\twatchValidator(\n\t\t\t\tthis.component,\n\t\t\t\t'_icons',\n\t\t\t\t(value): boolean => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\ttypeof value === 'object' && value !== null && (isString(value.left, 1) || isIcon(value.left) || isString(value.right, 1) || isIcon(value.right))\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tnew Set(['KoliBriHorizontalIcon']),\n\t\t\t\tvalue,\n\t\t\t\t{\n\t\t\t\t\thooks: {\n\t\t\t\t\t\tbeforePatch: beforePatchIcons,\n\t\t\t\t\t},\n\t\t\t\t\trequired: true,\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"],"mappings":";;;ygBAQA,MAAMA,EAA0C,CAACC,EAAoDC,K,IAApDC,SAAEA,EAAW,QAASC,MAAOC,GAASJ,EAAKK,EAAKC,EAAAN,EAAhD,sBAChD,MAAMO,EAAgB,iCACtB,MAAMC,EAAoB,GAAGD,MAAkBL,IAE/C,OACCO,EAAA,MAAAC,OAAAC,OAAA,CAAKR,MAAOS,EAAKL,EAAeC,EAAmBJ,IAAgBC,GACjEJ,EACI,EAIR,MAAAY,EAAed,ECCf,SAASe,EAASC,GACjB,IAAKA,EAAO,CACX,OAAO,K,CAGR,OAAOC,MAA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AU,UAAYA,IAAU,OAASN,EAASM,EAAMP,KAAM,IAAMuB,EAAOhB,EAAMP,OAASC,EAASM,EAAMJ,MAAO,IAAMoB,EAAOhB,EAAMJ,SAG5I,IAAIqB,IAAI,CAAC,0BACTjB,EACA,CACCkB,MAAO,CACNC,YAAapB,GAEdqB,SAAU,MAEX,G,CAII,iBAAAC,GACNZ,MAAMY,oBACNX,KAAKC,cAAcD,KAAKJ,UAAUlC,O","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{i as t,r as e}from"./dev.utils-5ecfad25.js";import{e as o,g as s,L as a,a as r,f as i,d as l}from"./dev.utils-fab45cbc.js";import{y as n,t as f,z as d,A as c,B as p,p as m,C as L}from"./prop.validators-17aec743.js";import"./index-ed1aff4f.js";import"./reuse-f46e7e35.js";import"./index-6d801dad.js";const u=()=>{let t=l().KoliBri;return void 0===t&&(t={},Object.defineProperty(l(),"KoliBri",{value:t,writable:!1})),t};function v(t,e){try{Object.defineProperty(u(),t,{get:function(){return e}})}catch(e){a.debug(`KoliBri property ${t} is already bind.`)}}const h=(t,e)=>a.debug(`${t} ${e?"":"not "}activated`),g=()=>{if(t(),o()){e(),v("a11yColorContrast",n),v("querySelector",f),v("querySelectorAll",d),v("querySelectorColors",c),v("utils",(function(){return p})),v("parseJson",m),v("stringifyJson",L);const t=s().body,a=s().createElement("svg");if(a.setAttribute("aria-label","KoliBri-DevTools"),a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("role","toolbar"),a.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),a.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>',s().body.appendChild(a),h("Development mode",o()),h("Experimental mode",r()),h("Color contrast analysis",i()),i()){const e=setTimeout((()=>{clearTimeout(e),setInterval((()=>{p.queryHtmlElementColors(s().createElement("div"),n(t),!1,!1)}),1e4)}),2500)}}};export{g as initialize};
@@ -1,4 +0,0 @@
1
- /*!
2
- * KoliBri - The accessible HTML-Standard
3
- */
4
- import{o,p as t,w as e}from"./prop.validators-17aec743.js";import{i,a as n,b as l}from"./common-54bf85ba.js";const c=(t,o,e)=>{l(e)?t[o]=e:i(e,1)&&(t[o]={icon:e})},s=t=>{let o={};return i(t,1)?o={left:{icon:t}}:"object"==typeof t&&null!==t&&(c(o,"top",t.top),c(o,"right",t.right),c(o,"bottom",t.bottom),c(o,"left",t.left)),o},f=t=>{var o,e,i;if(null===(o=t.nextState)||void 0===o?void 0:o.has("_icons")){const o=null===(e=t.nextState)||void 0===e?void 0:e.get("_icons");null===(i=t.nextState)||void 0===i||i.set("_icons",s(o))}},a=t=>"object"==typeof t&&null!==t&&(void 0===t.style||n(t.style))&&(void 0===t.label||i(t.label))&&i(t.icon,1),r=(l,n,c={})=>{o(n,(()=>{var o;try{n=t(n)}catch(o){}e(l,"_icons",(t=>{const o="object"==typeof t&&null!==t&&0===Object.keys(t).length;return null===t||o||i(t,1)||"object"==typeof t&&null!==t&&(i(t.left,1)||a(t.left)||i(t.right,1)||a(t.right)||i(t.top,1)||a(t.top)||i(t.bottom,1)||a(t.bottom))}),new Set(["KoliBriIcon"]),n,Object.assign(Object.assign({},c),{defaultValue:{},hooks:{afterPatch:null===(o=c.hooks)||void 0===o?void 0:o.afterPatch,beforePatch:(t,o,e,i)=>{var l,a;"function"==typeof(null===(l=c.hooks)||void 0===l?void 0:l.beforePatch)&&(null===(a=c.hooks)||void 0===a||a.beforePatch(t,o,e,i)),f(e)}}}))}))};export{a as i,r as v};
@@ -1 +0,0 @@
1
- {"version":3,"names":["mapCustomIcon","state","alignment","icon","isObject","isString","mapIconProp2State","left","top","right","bottom","beforePatchIcon","component","_a","nextState","has","icons","_b","get","_c","set","isIcon","value","style","isStyle","label","validateIcons","options","objectObjectHandler","parseJson","e","watchValidator","valueIsEmptyObject","Object","keys","length","Set","assign","defaultValue","hooks","afterPatch","beforePatch","nextValue","key"],"sources":["src/schema/props/icons.ts"],"sourcesContent":["import type { Generic } from 'adopted-style-sheets';\n\nimport type { AnyIconFontClass, KoliBriCustomIcon, KoliBriIconsProp, KoliBriIconsState } from '../types';\nimport type { Stringified } from '../types/common';\nimport type { WatchOptions } from '../utils';\nimport { objectObjectHandler, parseJson, watchValidator } from '../utils';\nimport { isObject, isString, isStyle } from '../validators';\n\nimport type { AlignPropType } from './align';\n\n/* types */\nexport type IconsPropType = Stringified<KoliBriIconsProp>;\n\n/**\n * Defines the icon classnames.\n */\nexport type PropIcons = {\n\ticons: IconsPropType;\n};\n\n/* validator */\n\nconst mapCustomIcon = (state: KoliBriIconsState, alignment: AlignPropType, icon?: AnyIconFontClass | KoliBriCustomIcon) => {\n\tif (isObject(icon)) {\n\t\tstate[alignment] = icon as KoliBriCustomIcon;\n\t} else if (isString(icon, 1)) {\n\t\tstate[alignment] = {\n\t\t\ticon: icon as AnyIconFontClass,\n\t\t};\n\t}\n};\n\nexport const mapIconProp2State = (icon: KoliBriIconsProp): KoliBriIconsState => {\n\tlet state: KoliBriIconsState = {};\n\tif (isString(icon, 1)) {\n\t\tstate = {\n\t\t\tleft: {\n\t\t\t\ticon: icon as AnyIconFontClass,\n\t\t\t},\n\t\t};\n\t} else if (typeof icon === 'object' && icon !== null) {\n\t\tmapCustomIcon(state, 'top', icon.top);\n\t\tmapCustomIcon(state, 'right', icon.right);\n\t\tmapCustomIcon(state, 'bottom', icon.bottom);\n\t\tmapCustomIcon(state, 'left', icon.left);\n\t}\n\treturn state;\n};\n\nconst beforePatchIcon = (component: Generic.Element.Component): void => {\n\tif (component.nextState?.has('_icons')) {\n\t\tconst icons = component.nextState?.get('_icons') as KoliBriIconsProp;\n\t\tcomponent.nextState?.set('_icons', mapIconProp2State(icons));\n\t}\n};\n\nexport const isIcon = (value?: unknown): boolean =>\n\ttypeof value === 'object' &&\n\tvalue !== null &&\n\t(typeof (value as KoliBriCustomIcon).style === 'undefined' || isStyle((value as KoliBriCustomIcon).style)) &&\n\t(typeof (value as KoliBriCustomIcon).label === 'undefined' || isString((value as KoliBriCustomIcon).label)) &&\n\tisString((value as KoliBriCustomIcon).icon, 1);\n\nexport const validateIcons = (component: Generic.Element.Component, value?: IconsPropType, options: WatchOptions = {}): void => {\n\tobjectObjectHandler(value, () => {\n\t\ttry {\n\t\t\tvalue = parseJson<KoliBriIconsProp>(value as string);\n\t\t} catch (e) {\n\t\t\t// value behält den ursprünglichen Wert\n\t\t}\n\t\twatchValidator(\n\t\t\tcomponent,\n\t\t\t'_icons',\n\t\t\t(value): boolean => {\n\t\t\t\tconst valueIsEmptyObject = typeof value === 'object' && value !== null && Object.keys(value).length === 0;\n\t\t\t\treturn (\n\t\t\t\t\tvalue === null ||\n\t\t\t\t\tvalueIsEmptyObject ||\n\t\t\t\t\tisString(value, 1) ||\n\t\t\t\t\t(typeof value === 'object' &&\n\t\t\t\t\t\tvalue !== null &&\n\t\t\t\t\t\t(isString(value.left, 1) ||\n\t\t\t\t\t\t\tisIcon(value.left) ||\n\t\t\t\t\t\t\tisString(value.right, 1) ||\n\t\t\t\t\t\t\tisIcon(value.right) ||\n\t\t\t\t\t\t\tisString(value.top, 1) ||\n\t\t\t\t\t\t\tisIcon(value.top) ||\n\t\t\t\t\t\t\tisString(value.bottom, 1) ||\n\t\t\t\t\t\t\tisIcon(value.bottom)))\n\t\t\t\t);\n\t\t\t},\n\t\t\tnew Set(['KoliBriIcon']),\n\t\t\tvalue,\n\t\t\t{\n\t\t\t\t...options,\n\t\t\t\tdefaultValue: {},\n\t\t\t\thooks: {\n\t\t\t\t\tafterPatch: options.hooks?.afterPatch,\n\t\t\t\t\tbeforePatch: (nextValue, nextState, component, key) => {\n\t\t\t\t\t\tif (typeof options.hooks?.beforePatch === 'function') {\n\t\t\t\t\t\t\toptions.hooks?.beforePatch(nextValue, nextState, component, key);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbeforePatchIcon(component);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t);\n\t});\n};\n"],"mappings":";;;6GAsBA,MAAMA,EAAgB,CAACC,EAA0BC,EAA0BC,KAC1E,GAAIC,EAASD,GAAO,CACnBF,EAAMC,GAAaC,C,MACb,GAAIE,EAASF,EAAM,GAAI,CAC7BF,EAAMC,GAAa,CAClBC,KAAMA,E,GAKF,MAAMG,EAAqBH,IACjC,IAAIF,EAA2B,GAC/B,GAAII,EAASF,EAAM,GAAI,CACtBF,EAAQ,CACPM,KAAM,CACLJ,KAAMA,G,MAGF,UAAWA,IAAS,UAAYA,IAAS,KAAM,CACrDH,EAAcC,EAAO,MAAOE,EAAKK,KACjCR,EAAcC,EAAO,QAASE,EAAKM,OACnCT,EAAcC,EAAO,SAAUE,EAAKO,QACpCV,EAAcC,EAAO,OAAQE,EAAKI,K,CAEnC,OAAON,CAAK,EAGb,MAAMU,EAAmBC,I,UACxB,IAAIC,EAAAD,EAAUE,aAAS,MAAAD,SAAA,SAAAA,EAAEE,IAAI,UAAW,CACvC,MAAMC,GAAQC,EAAAL,EAAUE,aAAS,MAAAG,SAAA,SAAAA,EAAEC,IAAI,WACvCC,EAAAP,EAAUE,aAAS,MAAAK,SAAA,SAAAA,EAAEC,IAAI,SAAUd,EAAkBU,G,SAI1CK,EAAUC,UACfA,IAAU,UACjBA,IAAU,cACDA,EAA4BC,QAAU,aAAeC,EAASF,EAA4BC,iBAC1FD,EAA4BG,QAAU,aAAepB,EAAUiB,EAA4BG,SACpGpB,EAAUiB,EAA4BnB,KAAM,G,MAEhCuB,EAAgB,CAACd,EAAsCU,EAAu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