@postenbring/hedwig-react 0.0.0-bugfix-example-darkmode-20260303124449 → 0.0.0-bump-nodejs-24-20260909105147

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 (381) hide show
  1. package/dist/accordion/accordion-content.js.map +1 -1
  2. package/dist/accordion/accordion-content.mjs +3 -3
  3. package/dist/accordion/accordion.js.map +1 -1
  4. package/dist/accordion/accordion.mjs +4 -4
  5. package/dist/accordion/index.js.map +1 -1
  6. package/dist/accordion/index.mjs +4 -4
  7. package/dist/blockquote/blockquote.d.ts +4 -11
  8. package/dist/blockquote/blockquote.d.ts.map +1 -1
  9. package/dist/blockquote/blockquote.js.map +1 -1
  10. package/dist/blockquote/blockquote.mjs +1 -1
  11. package/dist/blockquote/index.js.map +1 -1
  12. package/dist/blockquote/index.mjs +1 -1
  13. package/dist/button/button.d.ts +5 -2
  14. package/dist/button/button.d.ts.map +1 -1
  15. package/dist/button/button.js.map +1 -1
  16. package/dist/button/button.mjs +1 -1
  17. package/dist/button/index.js.map +1 -1
  18. package/dist/button/index.mjs +1 -1
  19. package/dist/card/card.d.ts +1 -1
  20. package/dist/card/card.js +1 -1
  21. package/dist/card/card.js.map +1 -1
  22. package/dist/card/card.mjs +1 -1
  23. package/dist/card/index.js +1 -1
  24. package/dist/card/index.js.map +1 -1
  25. package/dist/card/index.mjs +1 -1
  26. package/dist/{chunk-77M2ZTP7.mjs → chunk-3V4GFS46.mjs} +11 -1
  27. package/dist/chunk-3V4GFS46.mjs.map +1 -0
  28. package/dist/{chunk-TYCGAA35.mjs → chunk-45Q2TCH6.mjs} +1 -1
  29. package/dist/chunk-45Q2TCH6.mjs.map +1 -0
  30. package/dist/chunk-5J5LYE6Z.mjs +1 -0
  31. package/dist/chunk-5M6MEYM7.mjs +1 -0
  32. package/dist/chunk-62VLFCXX.mjs +64 -0
  33. package/dist/chunk-62VLFCXX.mjs.map +1 -0
  34. package/dist/chunk-6D5VE3DW.mjs +44 -0
  35. package/dist/chunk-6D5VE3DW.mjs.map +1 -0
  36. package/dist/chunk-CAIGPMDS.mjs +1 -0
  37. package/dist/chunk-CAIGPMDS.mjs.map +1 -0
  38. package/dist/chunk-CD4LCDK3.mjs +27 -0
  39. package/dist/chunk-CD4LCDK3.mjs.map +1 -0
  40. package/dist/chunk-CSIXGT7P.mjs +1 -0
  41. package/dist/chunk-CSIXGT7P.mjs.map +1 -0
  42. package/dist/chunk-D2XZT2RA.mjs +17 -0
  43. package/dist/chunk-D2XZT2RA.mjs.map +1 -0
  44. package/dist/{chunk-6OJINZ37.mjs → chunk-DMRQEQQK.mjs} +28 -10
  45. package/dist/chunk-DMRQEQQK.mjs.map +1 -0
  46. package/dist/{chunk-HEDGKRGC.mjs → chunk-DOW6EHBI.mjs} +6 -32
  47. package/dist/chunk-DOW6EHBI.mjs.map +1 -0
  48. package/dist/chunk-F23MNQCK.mjs +28 -0
  49. package/dist/chunk-F23MNQCK.mjs.map +1 -0
  50. package/dist/{chunk-5RXT5GLF.mjs → chunk-F6QJWZJX.mjs} +2 -2
  51. package/dist/chunk-FTVKPZCX.mjs +37 -0
  52. package/dist/chunk-FTVKPZCX.mjs.map +1 -0
  53. package/dist/{chunk-NUP7ZBVE.mjs → chunk-GICUX46A.mjs} +2 -2
  54. package/dist/chunk-HA3LRSDK.mjs +21 -0
  55. package/dist/chunk-HA3LRSDK.mjs.map +1 -0
  56. package/dist/{chunk-W6CFPK2C.mjs → chunk-HOLFVKXQ.mjs} +3 -2
  57. package/dist/chunk-HOLFVKXQ.mjs.map +1 -0
  58. package/dist/chunk-JGQTAIEP.mjs +67 -0
  59. package/dist/chunk-JGQTAIEP.mjs.map +1 -0
  60. package/dist/chunk-JGYPZ7ET.mjs +103 -0
  61. package/dist/chunk-JGYPZ7ET.mjs.map +1 -0
  62. package/dist/{chunk-GYI4NCUY.mjs → chunk-KPNAC2WN.mjs} +2 -2
  63. package/dist/{chunk-F7MLQ6JI.mjs → chunk-NAXSP4VU.mjs} +12 -3
  64. package/dist/{chunk-F7MLQ6JI.mjs.map → chunk-NAXSP4VU.mjs.map} +1 -1
  65. package/dist/{chunk-JYN2QSN2.mjs → chunk-NZB6BBFT.mjs} +1 -1
  66. package/dist/chunk-NZB6BBFT.mjs.map +1 -0
  67. package/dist/{chunk-R6MQFVHE.mjs → chunk-O55OTMJ5.mjs} +2 -2
  68. package/dist/chunk-OQD4GKOS.mjs +65 -0
  69. package/dist/chunk-OQD4GKOS.mjs.map +1 -0
  70. package/dist/{chunk-YNGU3V4J.mjs → chunk-QDG2QLFV.mjs} +3 -3
  71. package/dist/{chunk-E6OOFTRQ.mjs → chunk-QER35NXN.mjs} +14 -8
  72. package/dist/chunk-QER35NXN.mjs.map +1 -0
  73. package/dist/chunk-QOIBRXYT.mjs +113 -0
  74. package/dist/chunk-QOIBRXYT.mjs.map +1 -0
  75. package/dist/{chunk-B6T36QDV.mjs → chunk-QTC4ATZD.mjs} +2 -2
  76. package/dist/{chunk-J35DWEJX.mjs → chunk-RGZSYJFL.mjs} +14 -5
  77. package/dist/chunk-RGZSYJFL.mjs.map +1 -0
  78. package/dist/chunk-RJ763KDH.mjs +21 -0
  79. package/dist/chunk-RJ763KDH.mjs.map +1 -0
  80. package/dist/{chunk-AGIY7SFP.mjs → chunk-SO7TS4TS.mjs} +2 -2
  81. package/dist/{chunk-BFM6UZGI.mjs → chunk-TTDR3NZL.mjs} +2 -2
  82. package/dist/chunk-TTDR3NZL.mjs.map +1 -0
  83. package/dist/{chunk-LHIG6RW7.mjs → chunk-VNH7CZJ4.mjs} +5 -13
  84. package/dist/chunk-VNH7CZJ4.mjs.map +1 -0
  85. package/dist/{chunk-HBGFFKP3.mjs → chunk-WVCJV74B.mjs} +2 -2
  86. package/dist/chunk-XSID7YR7.mjs +1 -0
  87. package/dist/chunk-XSID7YR7.mjs.map +1 -0
  88. package/dist/{chunk-EDPWJWQO.mjs → chunk-YQT2TN3U.mjs} +2 -2
  89. package/dist/footer/footer.js.map +1 -1
  90. package/dist/footer/footer.mjs +6 -6
  91. package/dist/footer/index.js.map +1 -1
  92. package/dist/footer/index.mjs +6 -6
  93. package/dist/form/checkbox/checkbox.d.ts +10 -1
  94. package/dist/form/checkbox/checkbox.d.ts.map +1 -1
  95. package/dist/form/checkbox/checkbox.js +170 -71
  96. package/dist/form/checkbox/checkbox.js.map +1 -1
  97. package/dist/form/checkbox/checkbox.mjs +11 -4
  98. package/dist/form/checkbox/index.js +170 -71
  99. package/dist/form/checkbox/index.js.map +1 -1
  100. package/dist/form/checkbox/index.mjs +11 -4
  101. package/dist/form/date-picker/date-picker.d.ts.map +1 -1
  102. package/dist/form/date-picker/date-picker.js +76 -46
  103. package/dist/form/date-picker/date-picker.js.map +1 -1
  104. package/dist/form/date-picker/date-picker.mjs +8 -4
  105. package/dist/form/date-picker/index.js +76 -46
  106. package/dist/form/date-picker/index.js.map +1 -1
  107. package/dist/form/date-picker/index.mjs +8 -4
  108. package/dist/form/error-message/error-message.d.ts +2 -0
  109. package/dist/form/error-message/error-message.d.ts.map +1 -1
  110. package/dist/form/error-message/error-message.js +18 -8
  111. package/dist/form/error-message/error-message.js.map +1 -1
  112. package/dist/form/error-message/error-message.mjs +3 -1
  113. package/dist/form/error-message/index.js +18 -8
  114. package/dist/form/error-message/index.js.map +1 -1
  115. package/dist/form/error-message/index.mjs +3 -1
  116. package/dist/form/error-summary/error-summary.d.ts.map +1 -1
  117. package/dist/form/error-summary/error-summary.js +10 -1
  118. package/dist/form/error-summary/error-summary.js.map +1 -1
  119. package/dist/form/error-summary/error-summary.mjs +3 -3
  120. package/dist/form/error-summary/index.js +10 -1
  121. package/dist/form/error-summary/index.js.map +1 -1
  122. package/dist/form/error-summary/index.mjs +3 -3
  123. package/dist/form/fieldset/fieldset-description.d.ts +12 -0
  124. package/dist/form/fieldset/fieldset-description.d.ts.map +1 -0
  125. package/dist/form/fieldset/fieldset-description.js +51 -0
  126. package/dist/form/fieldset/fieldset-description.js.map +1 -0
  127. package/dist/form/fieldset/fieldset-description.mjs +8 -0
  128. package/dist/form/fieldset/fieldset-description.mjs.map +1 -0
  129. package/dist/form/fieldset/fieldset-legend.d.ts +9 -0
  130. package/dist/form/fieldset/fieldset-legend.d.ts.map +1 -0
  131. package/dist/form/fieldset/fieldset-legend.js +72 -0
  132. package/dist/form/fieldset/fieldset-legend.js.map +1 -0
  133. package/dist/form/fieldset/fieldset-legend.mjs +8 -0
  134. package/dist/form/fieldset/fieldset-legend.mjs.map +1 -0
  135. package/dist/form/fieldset/fieldset.d.ts +30 -6
  136. package/dist/form/fieldset/fieldset.d.ts.map +1 -1
  137. package/dist/form/fieldset/fieldset.js +110 -35
  138. package/dist/form/fieldset/fieldset.js.map +1 -1
  139. package/dist/form/fieldset/fieldset.mjs +9 -2
  140. package/dist/form/fieldset/index.d.ts +2 -0
  141. package/dist/form/fieldset/index.d.ts.map +1 -1
  142. package/dist/form/fieldset/index.js +114 -35
  143. package/dist/form/fieldset/index.js.map +1 -1
  144. package/dist/form/fieldset/index.mjs +16 -3
  145. package/dist/form/index.d.ts +3 -0
  146. package/dist/form/index.d.ts.map +1 -1
  147. package/dist/form/index.js +550 -260
  148. package/dist/form/index.js.map +1 -1
  149. package/dist/form/index.mjs +57 -24
  150. package/dist/form/input/index.js +103 -39
  151. package/dist/form/input/index.js.map +1 -1
  152. package/dist/form/input/index.mjs +8 -3
  153. package/dist/form/input/input.d.ts.map +1 -1
  154. package/dist/form/input/input.js +103 -39
  155. package/dist/form/input/input.js.map +1 -1
  156. package/dist/form/input/input.mjs +8 -3
  157. package/dist/form/input-group/index.js +59 -23
  158. package/dist/form/input-group/index.js.map +1 -1
  159. package/dist/form/input-group/index.mjs +7 -2
  160. package/dist/form/input-group/input-group.d.ts +9 -1
  161. package/dist/form/input-group/input-group.d.ts.map +1 -1
  162. package/dist/form/input-group/input-group.js +59 -23
  163. package/dist/form/input-group/input-group.js.map +1 -1
  164. package/dist/form/input-group/input-group.mjs +7 -2
  165. package/dist/form/radio-button/index.js +139 -86
  166. package/dist/form/radio-button/index.js.map +1 -1
  167. package/dist/form/radio-button/index.mjs +12 -5
  168. package/dist/form/radio-button/radio-button.d.ts +2 -10
  169. package/dist/form/radio-button/radio-button.d.ts.map +1 -1
  170. package/dist/form/radio-button/radio-button.js +139 -86
  171. package/dist/form/radio-button/radio-button.js.map +1 -1
  172. package/dist/form/radio-button/radio-button.mjs +12 -5
  173. package/dist/form/radio-button/radio-group.d.ts +11 -13
  174. package/dist/form/radio-button/radio-group.d.ts.map +1 -1
  175. package/dist/form/radio-button/radio-group.js +123 -48
  176. package/dist/form/radio-button/radio-group.js.map +1 -1
  177. package/dist/form/radio-button/radio-group.mjs +11 -4
  178. package/dist/form/search-wrapper/index.d.ts +3 -0
  179. package/dist/form/search-wrapper/index.d.ts.map +1 -0
  180. package/dist/form/search-wrapper/index.js +68 -0
  181. package/dist/form/search-wrapper/index.js.map +1 -0
  182. package/dist/form/search-wrapper/index.mjs +9 -0
  183. package/dist/form/search-wrapper/index.mjs.map +1 -0
  184. package/dist/form/search-wrapper/search-wrapper.d.ts +6 -0
  185. package/dist/form/search-wrapper/search-wrapper.d.ts.map +1 -0
  186. package/dist/form/search-wrapper/search-wrapper.js +66 -0
  187. package/dist/form/search-wrapper/search-wrapper.js.map +1 -0
  188. package/dist/form/search-wrapper/search-wrapper.mjs +8 -0
  189. package/dist/form/search-wrapper/search-wrapper.mjs.map +1 -0
  190. package/dist/form/select/index.js +105 -38
  191. package/dist/form/select/index.js.map +1 -1
  192. package/dist/form/select/index.mjs +8 -3
  193. package/dist/form/select/select.d.ts.map +1 -1
  194. package/dist/form/select/select.js +105 -38
  195. package/dist/form/select/select.js.map +1 -1
  196. package/dist/form/select/select.mjs +8 -3
  197. package/dist/form/suggestions/index.d.ts +7 -0
  198. package/dist/form/suggestions/index.d.ts.map +1 -0
  199. package/dist/form/suggestions/index.js +131 -0
  200. package/dist/form/suggestions/index.js.map +1 -0
  201. package/dist/form/suggestions/index.mjs +19 -0
  202. package/dist/form/suggestions/index.mjs.map +1 -0
  203. package/dist/form/suggestions/suggestions-item.d.ts +45 -0
  204. package/dist/form/suggestions/suggestions-item.d.ts.map +1 -0
  205. package/dist/form/suggestions/suggestions-item.js +83 -0
  206. package/dist/form/suggestions/suggestions-item.js.map +1 -0
  207. package/dist/form/suggestions/suggestions-item.mjs +10 -0
  208. package/dist/form/suggestions/suggestions-item.mjs.map +1 -0
  209. package/dist/form/suggestions/suggestions-wrapper.d.ts +41 -0
  210. package/dist/form/suggestions/suggestions-wrapper.d.ts.map +1 -0
  211. package/dist/form/suggestions/suggestions-wrapper.js +66 -0
  212. package/dist/form/suggestions/suggestions-wrapper.js.map +1 -0
  213. package/dist/form/suggestions/suggestions-wrapper.mjs +8 -0
  214. package/dist/form/suggestions/suggestions-wrapper.mjs.map +1 -0
  215. package/dist/form/suggestions/suggestions.d.ts +57 -0
  216. package/dist/form/suggestions/suggestions.d.ts.map +1 -0
  217. package/dist/form/suggestions/suggestions.js +123 -0
  218. package/dist/form/suggestions/suggestions.js.map +1 -0
  219. package/dist/form/suggestions/suggestions.mjs +10 -0
  220. package/dist/form/suggestions/suggestions.mjs.map +1 -0
  221. package/dist/form/textarea/index.js +92 -27
  222. package/dist/form/textarea/index.js.map +1 -1
  223. package/dist/form/textarea/index.mjs +8 -3
  224. package/dist/form/textarea/textarea.d.ts.map +1 -1
  225. package/dist/form/textarea/textarea.js +92 -27
  226. package/dist/form/textarea/textarea.js.map +1 -1
  227. package/dist/form/textarea/textarea.mjs +8 -3
  228. package/dist/form/validation-message/index.d.ts +3 -0
  229. package/dist/form/validation-message/index.d.ts.map +1 -0
  230. package/dist/form/validation-message/index.js +75 -0
  231. package/dist/form/validation-message/index.js.map +1 -0
  232. package/dist/form/validation-message/index.mjs +9 -0
  233. package/dist/form/validation-message/index.mjs.map +1 -0
  234. package/dist/form/validation-message/validation-message.d.ts +6 -0
  235. package/dist/form/validation-message/validation-message.d.ts.map +1 -0
  236. package/dist/form/validation-message/validation-message.js +73 -0
  237. package/dist/form/validation-message/validation-message.js.map +1 -0
  238. package/dist/form/validation-message/validation-message.mjs +8 -0
  239. package/dist/form/validation-message/validation-message.mjs.map +1 -0
  240. package/dist/index.js +798 -505
  241. package/dist/index.js.map +1 -1
  242. package/dist/index.mjs +90 -55
  243. package/dist/layout/index.mjs +7 -7
  244. package/dist/modal/index.js.map +1 -1
  245. package/dist/modal/index.mjs +2 -2
  246. package/dist/modal/modal.js.map +1 -1
  247. package/dist/modal/modal.mjs +2 -2
  248. package/dist/navbar/index.js +1 -0
  249. package/dist/navbar/index.js.map +1 -1
  250. package/dist/navbar/index.mjs +3 -3
  251. package/dist/navbar/navbar-expandable-menu.d.ts.map +1 -1
  252. package/dist/navbar/navbar-expandable-menu.js +1 -0
  253. package/dist/navbar/navbar-expandable-menu.js.map +1 -1
  254. package/dist/navbar/navbar-expandable-menu.mjs +2 -2
  255. package/dist/navbar/navbar.js +1 -0
  256. package/dist/navbar/navbar.js.map +1 -1
  257. package/dist/navbar/navbar.mjs +3 -3
  258. package/dist/skeleton/index.js.map +1 -1
  259. package/dist/skeleton/index.mjs +3 -3
  260. package/dist/skeleton/skeleton.js.map +1 -1
  261. package/dist/skeleton/skeleton.mjs +3 -3
  262. package/dist/tabs/index.js.map +1 -1
  263. package/dist/tabs/index.mjs +3 -3
  264. package/dist/tabs/tabs-list.js.map +1 -1
  265. package/dist/tabs/tabs-list.mjs +2 -2
  266. package/dist/tabs/tabs.js.map +1 -1
  267. package/dist/tabs/tabs.mjs +3 -3
  268. package/dist/utils/auto-animate-height.js.map +1 -1
  269. package/dist/utils/auto-animate-height.mjs +2 -2
  270. package/dist/utils/index.js +11 -0
  271. package/dist/utils/index.js.map +1 -1
  272. package/dist/utils/index.mjs +4 -2
  273. package/dist/utils/utils.d.ts +4 -0
  274. package/dist/utils/utils.d.ts.map +1 -1
  275. package/dist/utils/utils.js +11 -0
  276. package/dist/utils/utils.js.map +1 -1
  277. package/dist/utils/utils.mjs +3 -1
  278. package/package.json +5 -5
  279. package/src/accordion/accordion.stories.tsx +13 -20
  280. package/src/alert/alert.stories.tsx +1 -1
  281. package/src/badge/badge.stories.tsx +1 -1
  282. package/src/blockquote/blockquote.stories.tsx +1 -1
  283. package/src/blockquote/blockquote.tsx +4 -12
  284. package/src/box/box.stories.tsx +1 -1
  285. package/src/breadcrumbs/breadcrumbs.stories.tsx +1 -1
  286. package/src/button/button.stories.tsx +1 -1
  287. package/src/button/button.tsx +6 -2
  288. package/src/button-list/button-list.stories.tsx +1 -1
  289. package/src/card/card.stories.tsx +10 -9
  290. package/src/card/card.tsx +2 -2
  291. package/src/description-list/description-list.stories.tsx +1 -1
  292. package/src/figure/figure.stories.tsx +1 -1
  293. package/src/form/checkbox/checkbox.stories.tsx +1 -1
  294. package/src/form/checkbox/checkbox.tsx +32 -11
  295. package/src/form/date-picker/date-picker.stories.tsx +1 -1
  296. package/src/form/date-picker/date-picker.tsx +7 -1
  297. package/src/form/error-message/error-message.tsx +8 -14
  298. package/src/form/error-summary/error-summary.stories.tsx +1 -1
  299. package/src/form/error-summary/error-summary.tsx +6 -1
  300. package/src/form/fieldset/fieldset-description.tsx +17 -0
  301. package/src/form/fieldset/fieldset-legend.tsx +22 -0
  302. package/src/form/fieldset/fieldset.stories.tsx +3 -2
  303. package/src/form/fieldset/fieldset.tsx +95 -26
  304. package/src/form/fieldset/index.tsx +2 -0
  305. package/src/form/index.tsx +3 -0
  306. package/src/form/input/input.stories.tsx +1 -1
  307. package/src/form/input/input.tsx +23 -8
  308. package/src/form/input-group/input-group.tsx +32 -15
  309. package/src/form/radio-button/radio-button.stories.tsx +1 -2
  310. package/src/form/radio-button/radio-button.tsx +8 -34
  311. package/src/form/radio-button/radio-group.stories.tsx +1 -1
  312. package/src/form/radio-button/radio-group.tsx +20 -19
  313. package/src/form/search-wrapper/index.tsx +2 -0
  314. package/src/form/search-wrapper/search-wrapper.stories.tsx +34 -0
  315. package/src/form/search-wrapper/search-wrapper.tsx +14 -0
  316. package/src/form/select/select.stories.tsx +1 -1
  317. package/src/form/select/select.tsx +25 -8
  318. package/src/form/suggestions/index.tsx +6 -0
  319. package/src/form/suggestions/suggestions-item.tsx +70 -0
  320. package/src/form/suggestions/suggestions-wrapper.tsx +50 -0
  321. package/src/form/suggestions/suggestions.tsx +89 -0
  322. package/src/form/textarea/textarea.stories.tsx +1 -1
  323. package/src/form/textarea/textarea.tsx +19 -2
  324. package/src/form/validation-message/index.tsx +2 -0
  325. package/src/form/validation-message/validation-message.stories.tsx +20 -0
  326. package/src/form/validation-message/validation-message.tsx +18 -0
  327. package/src/help-text/help-text.stories.tsx +1 -1
  328. package/src/layout/container/container.stories.tsx +1 -1
  329. package/src/layout/grid/grid.stories.tsx +1 -1
  330. package/src/layout/stack/stack.stories.tsx +1 -1
  331. package/src/link/link.stories.tsx +1 -1
  332. package/src/list/link-list.stories.tsx +1 -1
  333. package/src/list/list.stories.tsx +1 -1
  334. package/src/message/message.stories.tsx +1 -1
  335. package/src/modal/modal.stories.tsx +5 -9
  336. package/src/navbar/navbar-expandable-menu.tsx +1 -0
  337. package/src/navbar/navbar.stories.tsx +1 -1
  338. package/src/show-more/show-more.stories.tsx +1 -1
  339. package/src/skeleton/skeleton.stories.tsx +1 -1
  340. package/src/spinner/spinner.stories.tsx +1 -1
  341. package/src/step-indicator/step-indicator.stories.tsx +1 -1
  342. package/src/styled-html/styled-html.stories.tsx +1 -1
  343. package/src/table/table.stories.tsx +1 -1
  344. package/src/tabs/tabs.stories.tsx +1 -1
  345. package/src/text/text.stories.tsx +1 -1
  346. package/src/utils/utils.ts +16 -0
  347. package/src/warning-banner/warning-banner.stories.tsx +1 -1
  348. package/dist/chunk-3VKESN3T.mjs +0 -37
  349. package/dist/chunk-3VKESN3T.mjs.map +0 -1
  350. package/dist/chunk-6OJINZ37.mjs.map +0 -1
  351. package/dist/chunk-77M2ZTP7.mjs.map +0 -1
  352. package/dist/chunk-BFM6UZGI.mjs.map +0 -1
  353. package/dist/chunk-BO3EWZGA.mjs +0 -78
  354. package/dist/chunk-BO3EWZGA.mjs.map +0 -1
  355. package/dist/chunk-E6OOFTRQ.mjs.map +0 -1
  356. package/dist/chunk-HEDGKRGC.mjs.map +0 -1
  357. package/dist/chunk-IJSEJZ3W.mjs +0 -1
  358. package/dist/chunk-J35DWEJX.mjs.map +0 -1
  359. package/dist/chunk-JYN2QSN2.mjs.map +0 -1
  360. package/dist/chunk-LHIG6RW7.mjs.map +0 -1
  361. package/dist/chunk-LMF3QGSF.mjs +0 -1
  362. package/dist/chunk-N4W3OMA2.mjs +0 -37
  363. package/dist/chunk-N4W3OMA2.mjs.map +0 -1
  364. package/dist/chunk-NBEGX26X.mjs +0 -36
  365. package/dist/chunk-NBEGX26X.mjs.map +0 -1
  366. package/dist/chunk-TYCGAA35.mjs.map +0 -1
  367. package/dist/chunk-W6CFPK2C.mjs.map +0 -1
  368. package/dist/chunk-Z2ZPTZ6F.mjs +0 -69
  369. package/dist/chunk-Z2ZPTZ6F.mjs.map +0 -1
  370. package/src/form/error-message/error-message.stories.tsx +0 -20
  371. /package/dist/{chunk-IJSEJZ3W.mjs.map → chunk-5J5LYE6Z.mjs.map} +0 -0
  372. /package/dist/{chunk-LMF3QGSF.mjs.map → chunk-5M6MEYM7.mjs.map} +0 -0
  373. /package/dist/{chunk-5RXT5GLF.mjs.map → chunk-F6QJWZJX.mjs.map} +0 -0
  374. /package/dist/{chunk-NUP7ZBVE.mjs.map → chunk-GICUX46A.mjs.map} +0 -0
  375. /package/dist/{chunk-GYI4NCUY.mjs.map → chunk-KPNAC2WN.mjs.map} +0 -0
  376. /package/dist/{chunk-R6MQFVHE.mjs.map → chunk-O55OTMJ5.mjs.map} +0 -0
  377. /package/dist/{chunk-YNGU3V4J.mjs.map → chunk-QDG2QLFV.mjs.map} +0 -0
  378. /package/dist/{chunk-B6T36QDV.mjs.map → chunk-QTC4ATZD.mjs.map} +0 -0
  379. /package/dist/{chunk-AGIY7SFP.mjs.map → chunk-SO7TS4TS.mjs.map} +0 -0
  380. /package/dist/{chunk-HBGFFKP3.mjs.map → chunk-WVCJV74B.mjs.map} +0 -0
  381. /package/dist/{chunk-EDPWJWQO.mjs.map → chunk-YQT2TN3U.mjs.map} +0 -0
@@ -1,68 +1,137 @@
1
- import { useId, forwardRef, createContext, useContext } from "react";
2
- import type { FieldsetHTMLAttributes, HTMLAttributes, ReactNode, CSSProperties } from "react";
1
+ import {
2
+ Children,
3
+ cloneElement,
4
+ isValidElement,
5
+ useId,
6
+ forwardRef,
7
+ createContext,
8
+ useContext,
9
+ } from "react";
10
+ import type {
11
+ FieldsetHTMLAttributes,
12
+ ReactElement,
13
+ ReactNode,
14
+ CSSProperties,
15
+ ComponentProps,
16
+ } from "react";
3
17
  import { clsx } from "@postenbring/hedwig-css/typed-classname";
4
- import { ErrorMessage, type ErrorMessageProps } from "../error-message";
18
+ import { ValidationMessage, type ValidationMessageProps } from "../validation-message";
19
+ import { type ErrorMessageProps } from "../error-message";
20
+ import { getValidationMessageValue } from "../../utils";
21
+ import { FieldsetDescription } from "./fieldset-description";
22
+ import { FieldsetLegend } from "./fieldset-legend";
23
+
24
+ type FieldsetLegendProps = ComponentProps<typeof FieldsetLegend>;
5
25
 
6
26
  export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {
7
27
  className?: string;
8
28
  style?: CSSProperties;
29
+ "data-color"?: "info" | "success" | "warning" | "error";
30
+ validationMessage?: ReactNode | { value: ReactNode };
31
+ validationMessageProps?: Partial<ValidationMessageProps>;
9
32
  /**
10
33
  * Providing an errorMessage will also give contained Checkboxes or Radio buttons
11
34
  * error styling and aria to indicate invalid state.
12
35
  *
13
36
  * For Radio buttons you are even better off using RadioGroup.
14
37
  */
38
+
39
+ /** @deprecated Use `validationMessage` instead */
15
40
  errorMessage?: ReactNode;
16
- legendProps?: HTMLAttributes<HTMLElement> & { size: "default" | "large" };
17
- legend: ReactNode;
41
+ /**
42
+ * @deprecated Pass props directly to <Fieldset.Legend> instead.
43
+ */
44
+ legendProps?: FieldsetLegendProps;
45
+ /**
46
+ * @deprecated Use <Fieldset.Legend>...</Fieldset.Legend> instead.
47
+ */
48
+ legend?: ReactNode;
49
+ size?: "small" | "";
18
50
  children: ReactNode;
51
+ /** @deprecated Use `validationMessageProps` instead */
19
52
  errorMessageProps?: Partial<ErrorMessageProps>;
20
53
  }
21
54
 
22
- const FieldsetContext = createContext<{ hasError: boolean }>({ hasError: false });
55
+ /** @deprecated Will no longer be needed */
56
+ const FieldsetContext = createContext<{ hasError: boolean; size: "small" | "" }>({
57
+ hasError: false,
58
+ size: "",
59
+ });
23
60
 
61
+ /** @deprecated Will no longer be needed */
24
62
  export const useFieldsetContext = () => useContext(FieldsetContext);
25
63
 
26
64
  export const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(
27
65
  {
28
66
  className,
29
67
  style,
68
+ "data-color": dataColor = undefined,
69
+ validationMessage,
70
+ validationMessageProps,
30
71
  errorMessage,
31
72
  errorMessageProps,
32
- legendProps: { size: legendSize = "default", className: legendClassName, ...legendProps } = {},
73
+ legendProps,
33
74
  legend,
75
+ size = "",
34
76
  children,
35
77
  ...rest
36
78
  },
37
79
  ref,
38
80
  ) {
39
- const errorMessageId = useId();
81
+ const validationMessageId = useId();
82
+ const validationColor = errorMessage ? "error" : dataColor;
83
+ const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);
84
+ const childArray = Children.toArray(children);
85
+ const legendChild = childArray.find(
86
+ (child): child is ReactElement<FieldsetLegendProps> =>
87
+ isValidElement<FieldsetLegendProps>(child) && child.type === FieldsetLegend,
88
+ );
89
+ const contentChildren = legendChild
90
+ ? childArray.filter((child) => child !== legendChild)
91
+ : childArray;
92
+ let renderedLegend = null;
93
+
94
+ if (legendChild) {
95
+ renderedLegend = cloneElement(legendChild, {
96
+ ...legendProps,
97
+ ...legendChild.props,
98
+ className: clsx(
99
+ legendProps?.className as undefined,
100
+ legendChild.props.className as undefined,
101
+ ),
102
+ });
103
+ } else if (legend !== undefined) {
104
+ renderedLegend = <FieldsetLegend {...legendProps}>{legend}</FieldsetLegend>;
105
+ }
40
106
 
41
107
  return (
42
108
  <fieldset
43
- aria-describedby={errorMessage ? errorMessageId : undefined}
109
+ aria-describedby={validationMessageValue ? validationMessageId : undefined}
44
110
  aria-invalid={errorMessage ? true : undefined}
45
- className={clsx("hds-fieldset", className as undefined)}
111
+ className={clsx("hds-fieldset", { [`hds-fieldset--${size}`]: size }, className as undefined)}
112
+ data-color={validationColor}
46
113
  ref={ref}
47
114
  style={style}
48
115
  {...rest}
49
116
  >
50
- <legend
51
- className={clsx(
52
- "hds-fieldset__legend",
53
- { [`hds-fieldset__legend--${legendSize}`]: legendSize },
54
- legendClassName as undefined,
55
- )}
56
- {...legendProps}
57
- >
58
- {legend}
59
- </legend>
60
- <FieldsetContext.Provider value={{ hasError: Boolean(errorMessage) }}>
61
- {children}
117
+ {renderedLegend}
118
+ <FieldsetContext.Provider value={{ hasError: Boolean(errorMessage), size }}>
119
+ {contentChildren}
62
120
  </FieldsetContext.Provider>
63
- <ErrorMessage id={errorMessageId} {...errorMessageProps}>
64
- {errorMessage}
65
- </ErrorMessage>
121
+ <ValidationMessage
122
+ id={validationMessageId}
123
+ {...(validationMessageProps ?? errorMessageProps)}
124
+ >
125
+ {validationMessageValue}
126
+ </ValidationMessage>
66
127
  </fieldset>
67
128
  );
68
- });
129
+ }) as FieldsetType;
130
+
131
+ type FieldsetType = ReturnType<typeof forwardRef<HTMLFieldSetElement, FieldsetProps>> & {
132
+ Description: typeof FieldsetDescription;
133
+ Legend: typeof FieldsetLegend;
134
+ };
135
+
136
+ Fieldset.Description = FieldsetDescription;
137
+ Fieldset.Legend = FieldsetLegend;
@@ -1,2 +1,4 @@
1
1
  export { Fieldset, useFieldsetContext } from "./fieldset";
2
2
  export type * from "./fieldset";
3
+ export { FieldsetDescription } from "./fieldset-description";
4
+ export { FieldsetLegend } from "./fieldset-legend";
@@ -5,5 +5,8 @@ export * from "./error-summary";
5
5
  export * from "./fieldset";
6
6
  export * from "./input";
7
7
  export * from "./radio-button";
8
+ export * from "./search-wrapper";
8
9
  export * from "./select";
10
+ export * from "./suggestions";
9
11
  export * from "./textarea";
12
+ export * from "./validation-message";
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
- import type { Meta, StoryObj } from "@storybook/react";
2
+ import type { Meta, StoryObj } from "@storybook/react-vite";
3
3
  import { Input } from ".";
4
4
 
5
5
  const meta: Meta<typeof Input> = {
@@ -16,14 +16,28 @@ export type InputProps = Omit<
16
16
  "children"
17
17
  >;
18
18
 
19
- export const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
20
- { className, size, errorMessage, labelProps, label, id, style, disabled, readOnly, ...rest },
21
- ref,
22
- ) {
23
- return (
19
+ export const Input = forwardRef<HTMLInputElement, InputProps>(
20
+ (
21
+ {
22
+ className,
23
+ size,
24
+ validationMessage,
25
+ errorMessage,
26
+ labelProps,
27
+ label,
28
+ id,
29
+ style,
30
+ disabled,
31
+ readOnly,
32
+ "data-color": dataColor,
33
+ ...rest
34
+ },
35
+ ref,
36
+ ) => (
24
37
  <InputGroup
25
38
  className={clsx("hds-input", className as undefined)}
26
39
  disabled={disabled}
40
+ validationMessage={validationMessage}
27
41
  errorMessage={errorMessage}
28
42
  id={id}
29
43
  label={label}
@@ -31,10 +45,11 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
31
45
  readOnly={readOnly}
32
46
  style={style}
33
47
  size={size}
48
+ data-color={dataColor}
34
49
  >
35
- <input {...rest} disabled={disabled} readOnly={readOnly} ref={ref} />
50
+ <input disabled={disabled} readOnly={readOnly} ref={ref} {...rest} />
36
51
  </InputGroup>
37
- );
38
- });
52
+ ),
53
+ );
39
54
 
40
55
  Input.displayName = "Input";
@@ -1,7 +1,9 @@
1
1
  import { useId, forwardRef, Children, isValidElement, cloneElement } from "react";
2
2
  import type { LabelHTMLAttributes, ReactNode, CSSProperties } from "react";
3
3
  import { clsx } from "@postenbring/hedwig-css/typed-classname";
4
- import { ErrorMessage, type ErrorMessageProps } from "../error-message";
4
+ import { ValidationMessage, type ValidationMessageProps } from "../validation-message";
5
+ import { type ErrorMessageProps } from "../error-message";
6
+ import { getValidationMessageValue } from "../../utils";
5
7
 
6
8
  interface InputProps {
7
9
  "aria-describedby"?: string;
@@ -14,11 +16,16 @@ export interface InputGroupProps {
14
16
  id?: string;
15
17
  className?: string;
16
18
  style?: CSSProperties;
19
+ "data-color"?: "info" | "success" | "warning" | "error";
17
20
  size?: "large" | "small";
21
+ validationMessage?: ReactNode | { value: ReactNode };
22
+ validationMessageProps?: Partial<ValidationMessageProps>;
23
+ /** @deprecated Use `validationMessage` instead */
18
24
  errorMessage?: ReactNode;
25
+ /** @deprecated Use `validationMessageProps` instead */
19
26
  errorMessageProps?: Partial<ErrorMessageProps>;
20
27
  labelProps?: LabelHTMLAttributes<HTMLLabelElement>;
21
- label: ReactNode;
28
+ label?: ReactNode;
22
29
  disabled?: boolean;
23
30
  readOnly?: boolean;
24
31
  /**
@@ -34,7 +41,10 @@ export const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function I
34
41
  id,
35
42
  className,
36
43
  style,
44
+ "data-color": dataColor = undefined,
37
45
  size = "large",
46
+ validationMessage,
47
+ validationMessageProps,
38
48
  errorMessage,
39
49
  errorMessageProps,
40
50
  labelProps: { className: labelClassName, ...labelProps } = {},
@@ -46,12 +56,14 @@ export const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function I
46
56
  },
47
57
  ref,
48
58
  ) {
49
- const errorMessageId = useId();
59
+ const validationMessageId = useId();
50
60
  const inputId = useId();
61
+ const validationColor = errorMessage ? "error" : dataColor;
62
+ const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);
51
63
 
52
64
  const renderInput = () => {
53
65
  const inputProps: InputProps = {
54
- "aria-describedby": errorMessage ? errorMessageId : undefined,
66
+ "aria-describedby": validationMessage ? validationMessageId : undefined,
55
67
  "aria-invalid": errorMessage ? true : undefined,
56
68
  id: id ?? inputId,
57
69
  className: clsx("hds-input-group__input"),
@@ -80,21 +92,23 @@ export const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function I
80
92
  "hds-input-group",
81
93
  {
82
94
  [`hds-input-group--${size}`]: size,
83
- "hds-input-group--error": errorMessage,
84
95
  },
85
96
  className as undefined,
86
97
  )}
87
98
  ref={ref}
88
99
  style={style}
100
+ data-color={validationColor}
89
101
  {...rest}
90
102
  >
91
- <label
92
- className={clsx("hds-input-group__label", labelClassName as undefined)}
93
- {...labelProps}
94
- htmlFor={id ?? inputId}
95
- >
96
- {label}
97
- </label>
103
+ {label !== null && label !== undefined && label !== false && (
104
+ <label
105
+ className={clsx("hds-input-group__label", labelClassName as undefined)}
106
+ {...labelProps}
107
+ htmlFor={id ?? inputId}
108
+ >
109
+ {label}
110
+ </label>
111
+ )}
98
112
  <div
99
113
  className={clsx("hds-input-group__input-wrapper")}
100
114
  data-disabled={disabled}
@@ -102,9 +116,12 @@ export const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function I
102
116
  >
103
117
  {renderInput()}
104
118
  </div>
105
- <ErrorMessage id={errorMessageId} {...errorMessageProps}>
106
- {errorMessage}
107
- </ErrorMessage>
119
+ <ValidationMessage
120
+ id={validationMessageId}
121
+ {...(validationMessageProps ?? errorMessageProps)}
122
+ >
123
+ {validationMessageValue}
124
+ </ValidationMessage>
108
125
  </div>
109
126
  );
110
127
  });
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
- import type { Meta, StoryObj } from "@storybook/react";
2
+ import type { Meta, StoryObj } from "@storybook/react-vite";
3
3
  import { RadioButton } from "./index";
4
4
 
5
5
  const meta: Meta<typeof RadioButton> = {
@@ -17,7 +17,6 @@ export const Preview: Story = {
17
17
  title: "",
18
18
  children: "Just a RadioButton",
19
19
  checked: true,
20
- hasError: false,
21
20
  variant: "plain",
22
21
  },
23
22
  argTypes: {
@@ -1,22 +1,13 @@
1
1
  import { forwardRef, type InputHTMLAttributes, type ReactNode } from "react";
2
2
  import { clsx } from "@postenbring/hedwig-css/typed-classname";
3
- import { useFieldsetContext } from "../fieldset";
4
- import { type RadioGroupProps, useRadioGroupContext } from "./radio-group";
3
+ import { useRadioGroupContext } from "./radio-group";
5
4
 
6
5
  export interface RadioButtonProps
7
- extends Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue"> {
6
+ extends Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "size"> {
8
7
  children: ReactNode;
9
8
  variant?: "plain" | "bounding-box";
10
- /**
11
- * Set to `true` to add error styling. The component will take care of aria to indicate invalid state.
12
- *
13
- * Normally you don't need this, as you should wrap your Radio buttons in the RadioGroup component.
14
- * When providing an errorMessage to RadioGroup, all contained Radio buttons will get correct hasError state.
15
- *
16
- * You can use this when your Radio button is part of a non-HDS fieldset which shows an error message.
17
- */
18
- hasError?: boolean;
19
9
  title?: string;
10
+ size?: "small" | "";
20
11
  }
21
12
 
22
13
  const isChecked = ({
@@ -24,7 +15,7 @@ const isChecked = ({
24
15
  selectedValue,
25
16
  value,
26
17
  }: Pick<RadioButtonProps, "checked" | "value"> & {
27
- selectedValue: RadioGroupProps["value"];
18
+ selectedValue: RadioButtonProps["value"];
28
19
  }) => {
29
20
  if (typeof checked !== "undefined") return checked;
30
21
  if (typeof selectedValue !== "undefined") return value === selectedValue;
@@ -32,26 +23,9 @@ const isChecked = ({
32
23
  };
33
24
 
34
25
  export const RadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(
35
- (
36
- {
37
- checked,
38
- value,
39
- variant = "plain",
40
- hasError: hasErrorProp,
41
- title,
42
- children,
43
- className,
44
- ...rest
45
- },
46
- ref,
47
- ) => {
48
- const {
49
- value: selectedValue,
50
- hasError: hasRadioGroupError,
51
- ...context
52
- } = useRadioGroupContext();
53
- const { hasError: hasFieldsetError } = useFieldsetContext();
54
- const hasError = hasFieldsetError || hasRadioGroupError || hasErrorProp;
26
+ ({ checked, value, variant = "plain", title, children, className, size = "", ...rest }, ref) => {
27
+ const { value: selectedValue, size: groupSize, ...context } = useRadioGroupContext();
28
+ const effectiveSize = size || groupSize;
55
29
 
56
30
  return (
57
31
  <div
@@ -59,7 +33,7 @@ export const RadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(
59
33
  "hds-radio-button",
60
34
  {
61
35
  [`hds-radio-button--${variant}`]: variant === "bounding-box",
62
- "hds-radio-button--error": hasError,
36
+ [`hds-radio-button--${effectiveSize}`]: effectiveSize === "small",
63
37
  },
64
38
  className as undefined,
65
39
  )}
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
- import type { Meta, StoryObj } from "@storybook/react";
2
+ import type { Meta, StoryObj } from "@storybook/react-vite";
3
3
  import { RadioGroup } from "./radio-group";
4
4
  import { RadioButton } from "./index";
5
5
 
@@ -2,52 +2,53 @@ import {
2
2
  type ChangeEventHandler,
3
3
  createContext,
4
4
  forwardRef,
5
+ type InputHTMLAttributes,
5
6
  type ReactNode,
6
7
  useContext,
7
8
  } from "react";
9
+ import { FieldsetDescription } from "../fieldset/fieldset-description";
8
10
  import { Fieldset, type FieldsetProps } from "../fieldset";
9
- import type { RadioButtonProps } from "./radio-button";
11
+ import { FieldsetLegend } from "../fieldset/fieldset-legend";
10
12
 
11
13
  export interface RadioGroupProps extends Omit<FieldsetProps, "onChange"> {
12
14
  children: ReactNode;
13
15
  /** Will be passed to all Radio buttons within the radio group */
14
- name?: RadioButtonProps["name"];
16
+ name?: InputHTMLAttributes<HTMLInputElement>["name"];
15
17
  /** If you want the group to be controlled, you can pass the selected value here */
16
- value?: RadioButtonProps["value"];
17
- /**
18
- * Error message is passed to the internal Fieldset, and will also give contained Radio buttons
19
- * error styling and aria to indicate invalid state.
20
- */
21
- errorMessage?: ReactNode;
18
+ value?: InputHTMLAttributes<HTMLInputElement>["value"];
22
19
  /** Will be passed to all Radio buttons within the radio group */
23
20
  onChange?: ChangeEventHandler<HTMLInputElement> | undefined;
24
21
  }
25
22
 
26
- type RadioGroupContextProps = {
27
- hasError: boolean;
28
- } & Pick<RadioGroupProps, "name" | "value" | "onChange">;
23
+ type RadioGroupContextProps = Pick<RadioGroupProps, "name" | "value" | "onChange" | "size">;
29
24
 
30
25
  const RadioGroupContext = createContext<RadioGroupContextProps>({
31
26
  name: undefined,
32
- hasError: false,
33
- onChange: () => {
34
- return undefined;
35
- },
27
+ onChange: () => undefined,
28
+ size: undefined,
36
29
  });
37
30
 
38
31
  export const useRadioGroupContext = () => useContext(RadioGroupContext);
39
32
 
40
33
  export const RadioGroup = forwardRef<HTMLFieldSetElement, RadioGroupProps>(function RadioGroup(
41
- { name, value, errorMessage, onChange, children, ...rest },
34
+ { name, value, onChange, children, size, ...rest },
42
35
  ref,
43
36
  ) {
44
37
  return (
45
- <RadioGroupContext.Provider value={{ name, value, hasError: Boolean(errorMessage), onChange }}>
46
- <Fieldset errorMessage={errorMessage} {...rest} ref={ref}>
38
+ <RadioGroupContext.Provider value={{ name, value, onChange, size }}>
39
+ <Fieldset size={size} {...rest} ref={ref}>
47
40
  {children}
48
41
  </Fieldset>
49
42
  </RadioGroupContext.Provider>
50
43
  );
51
- });
44
+ }) as RadioGroupType;
45
+
46
+ type RadioGroupType = ReturnType<typeof forwardRef<HTMLFieldSetElement, RadioGroupProps>> & {
47
+ Description: typeof FieldsetDescription;
48
+ Legend: typeof FieldsetLegend;
49
+ };
50
+
51
+ RadioGroup.Description = FieldsetDescription;
52
+ RadioGroup.Legend = FieldsetLegend;
52
53
 
53
54
  RadioGroup.displayName = "RadioGroup";
@@ -0,0 +1,2 @@
1
+ export { SearchWrapper } from "./search-wrapper";
2
+ export type * from "./search-wrapper";
@@ -0,0 +1,34 @@
1
+ /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
+ import type { Meta, StoryObj } from "@storybook/react-vite";
3
+ import { Input } from "../input";
4
+ import { Button } from "../../button";
5
+ import { SearchWrapper } from ".";
6
+
7
+ const meta: Meta<typeof SearchWrapper> = {
8
+ title: "Form/Search wrapper",
9
+ component: SearchWrapper,
10
+ };
11
+
12
+ export default meta;
13
+
14
+ function XmarkIcon() {
15
+ return (
16
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640">
17
+ <path d="M183.1 137.4C170.6 124.9 150.3 124.9 137.8 137.4C125.3 149.9 125.3 170.2 137.8 182.7L275.2 320L137.9 457.4C125.4 469.9 125.4 490.2 137.9 502.7C150.4 515.2 170.7 515.2 183.2 502.7L320.5 365.3L457.9 502.6C470.4 515.1 490.7 515.1 503.2 502.6C515.7 490.1 515.7 469.8 503.2 457.3L365.8 320L503.1 182.6C515.6 170.1 515.6 149.8 503.1 137.3C490.6 124.8 470.3 124.8 457.8 137.3L320.5 274.7L183.1 137.4z" />
18
+ </svg>
19
+ );
20
+ }
21
+ type Story = StoryObj<typeof SearchWrapper>;
22
+
23
+ export const Preview: Story = {
24
+ tags: ["!dev"],
25
+ render: () => (
26
+ <SearchWrapper>
27
+ <Input name="name" />
28
+ <Button>Search</Button>
29
+ <Button variant="tertiary" icon>
30
+ <XmarkIcon />
31
+ </Button>
32
+ </SearchWrapper>
33
+ ),
34
+ };
@@ -0,0 +1,14 @@
1
+ import { forwardRef, type HTMLAttributes } from "react";
2
+ import { clsx } from "@postenbring/hedwig-css/typed-classname";
3
+
4
+ export interface SearchWrapperProps extends HTMLAttributes<HTMLDivElement> {
5
+ className?: string;
6
+ }
7
+
8
+ export const SearchWrapper = forwardRef<HTMLDivElement, SearchWrapperProps>(
9
+ ({ className, ...rest }, ref) => (
10
+ <div className={clsx("hds-search-wrapper", className as undefined)} ref={ref} {...rest} />
11
+ ),
12
+ );
13
+
14
+ SearchWrapper.displayName = "SearchWrapper";
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
- import type { Meta, StoryObj } from "@storybook/react";
2
+ import type { Meta, StoryObj } from "@storybook/react-vite";
3
3
  import { Select } from ".";
4
4
 
5
5
  const meta: Meta<typeof Select> = {
@@ -8,26 +8,43 @@ export type SelectProps = Omit<
8
8
  "readOnly" | "children"
9
9
  > & { children: ReactNode };
10
10
 
11
- export const Select = forwardRef<HTMLSelectElement, SelectProps>(function Select(
12
- { className, size, errorMessage, labelProps, label, id, style, disabled, children, ...rest },
13
- ref,
14
- ) {
15
- return (
11
+ export const Select = forwardRef<HTMLSelectElement, SelectProps>(
12
+ (
13
+ {
14
+ className,
15
+ size,
16
+ validationMessage,
17
+ validationMessageProps,
18
+ errorMessage,
19
+ labelProps,
20
+ label,
21
+ id,
22
+ style,
23
+ disabled,
24
+ "data-color": dataColor,
25
+ children,
26
+ ...rest
27
+ },
28
+ ref,
29
+ ) => (
16
30
  <InputGroup
17
31
  className={clsx("hds-select", className as undefined)}
18
32
  disabled={disabled}
33
+ validationMessage={validationMessage}
34
+ validationMessageProps={validationMessageProps}
19
35
  errorMessage={errorMessage}
20
36
  id={id}
21
37
  label={label}
22
38
  labelProps={labelProps}
23
39
  style={style}
24
40
  size={size}
41
+ data-color={dataColor}
25
42
  >
26
- <select {...rest} disabled={disabled} ref={ref}>
43
+ <select disabled={disabled} ref={ref} {...rest}>
27
44
  {children}
28
45
  </select>
29
46
  </InputGroup>
30
- );
31
- });
47
+ ),
48
+ );
32
49
 
33
50
  Select.displayName = "Select";
@@ -0,0 +1,6 @@
1
+ export { Suggestions } from "./suggestions";
2
+ export type * from "./suggestions";
3
+ export { SuggestionsItem, SuggestionsItemAction } from "./suggestions-item";
4
+ export type * from "./suggestions-item";
5
+ export { SuggestionsWrapper } from "./suggestions-wrapper";
6
+ export type * from "./suggestions-wrapper";