@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postenbring/hedwig-react",
3
- "version": "0.0.0-bugfix-example-darkmode-20260303124449",
3
+ "version": "0.0.0-bump-nodejs-24-20260909105147",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -17,7 +17,7 @@
17
17
  "@types/react-dom": "^18.3.1",
18
18
  "react": "^18.3.1",
19
19
  "react-dom": "18.3.1",
20
- "tsup": "^8.5.0",
20
+ "tsup": "^8.5.1",
21
21
  "typescript": "^5.8.3",
22
22
  "eslint-config-custom": "0.0.1",
23
23
  "hedwig-tsconfig": "0.0.0"
@@ -29,9 +29,9 @@
29
29
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "@radix-ui/react-popover": "1.1.14",
33
- "@radix-ui/react-slot": "1.2.3",
34
- "@postenbring/hedwig-css": "0.0.0-bugfix-example-darkmode-20260303124449"
32
+ "@radix-ui/react-popover": "1.1.23",
33
+ "@radix-ui/react-slot": "1.3.3",
34
+ "@postenbring/hedwig-css": "0.0.0-bump-nodejs-24-20260909105147"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -1,7 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
- import type { Meta, StoryObj } from "@storybook/react";
3
- import { Link } from "../link";
4
- import { UnorderedList } from "../list";
2
+ import type { Meta, StoryObj } from "@storybook/react-vite";
5
3
  import { Accordion } from ".";
6
4
 
7
5
  const meta: Meta<typeof Accordion> = {
@@ -19,28 +17,23 @@ export const Preview: Story = {
19
17
  children: (
20
18
  <>
21
19
  <Accordion.Item>
22
- <Accordion.Header>Professional accordion title</Accordion.Header>
20
+ <Accordion.Header>Can the mail be forwarded abroad?</Accordion.Header>
23
21
  <Accordion.Content>
24
- This is the simplest form of accordion body. Can be extensive.
22
+ Yes, with some limitations. Shipments of items cannot be forwarded abroad due to customs
23
+ declaration.
24
+ </Accordion.Content>
25
+ </Accordion.Item>
26
+ <Accordion.Item defaultOpen>
27
+ <Accordion.Header>Will all mail be forwarded to new address?</Accordion.Header>
28
+ <Accordion.Content>
29
+ All types of addressed mail distributed through Posten will be forwarded. Within Norway,
30
+ it also applies to items sent in letters.
25
31
  </Accordion.Content>
26
32
  </Accordion.Item>
27
33
  <Accordion.Item>
28
- <Accordion.Header>Yet another POAT with &laquo;advanced&raquo; content</Accordion.Header>
34
+ <Accordion.Header>How do I change my order?</Accordion.Header>
29
35
  <Accordion.Content>
30
- <h4>Hello</h4>
31
- <div>
32
- <p>
33
- This is some really, really exciting stuff with{" "}
34
- <Link href="https://www.posten.no">a link</Link> and all sorts of things like a
35
- list, even!
36
- </p>
37
- <UnorderedList>
38
- <li>Unordered</li>
39
- <li>Like</li>
40
- <li>You have</li>
41
- <li>Never seen</li>
42
- </UnorderedList>
43
- </div>
36
+ Sign in to My address or call customer service at 22 03 00 00.
44
37
  </Accordion.Content>
45
38
  </Accordion.Item>
46
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 { Alert } from ".";
4
4
 
5
5
  const meta: Meta<typeof Alert> = {
@@ -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 { Badge } from ".";
4
4
 
5
5
  const meta: Meta<typeof Badge> = {
@@ -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 { Blockquote } from ".";
4
4
 
5
5
  const meta: Meta<typeof Blockquote> = {
@@ -2,6 +2,9 @@ import { clsx } from "@postenbring/hedwig-css/typed-classname";
2
2
  import { Slot } from "@radix-ui/react-slot";
3
3
  import { forwardRef } from "react";
4
4
 
5
+ /**
6
+ * @deprecated This interface is deprecated and will be removed in a future release.
7
+ */
5
8
  export interface BlockquoteProps extends React.HTMLAttributes<HTMLQuoteElement> {
6
9
  children?: React.ReactNode;
7
10
 
@@ -19,18 +22,7 @@ export interface BlockquoteProps extends React.HTMLAttributes<HTMLQuoteElement>
19
22
  */
20
23
  asChild?: boolean;
21
24
  }
22
-
23
- /**
24
- * @example
25
- *
26
- * ```tsx
27
- * <Blockquote>
28
- * <p>... but they&rsquo;ll never take our freedom!</p>
29
- * <footer>William Wallace</footer>
30
- * </Blockquote>
31
- * ```
32
- *
33
- */
25
+ /** @deprecated This component is deprecated and will be removed in a future release. */
34
26
  export const Blockquote = forwardRef<HTMLQuoteElement, BlockquoteProps>(
35
27
  ({ children, asChild, className, variant, ...rest }, ref) => {
36
28
  const Component = asChild ? Slot : "blockquote";
@@ -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 { Text } from "../text";
4
4
  import { Link } from "../link";
5
5
  import { Box } from ".";
@@ -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 { Link } from "../link";
4
4
  import { Breadcrumbs } from ".";
5
5
 
@@ -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 { Button } from ".";
4
4
 
5
5
  const meta: Meta<typeof Button> = {
@@ -2,6 +2,11 @@ import { forwardRef } from "react";
2
2
  import { clsx } from "@postenbring/hedwig-css/typed-classname";
3
3
  import { Slot } from "@radix-ui/react-slot";
4
4
 
5
+ /**
6
+ * @deprecated The "inverted" variant is deprecated. Use "primary", "secondary", or "tertiary" instead.
7
+ */
8
+ export type DeprecatedVariant = "inverted";
9
+
5
10
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
6
11
  /**
7
12
  * The height, font size and padding of the button
@@ -15,7 +20,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
15
20
  *
16
21
  * @default "primary"
17
22
  */
18
- variant?: "primary" | "secondary" | "tertiary" | "inverted";
23
+ variant?: "primary" | "secondary" | "tertiary" | DeprecatedVariant;
19
24
 
20
25
  /**
21
26
  * Make the button use 100% width available.
@@ -47,7 +52,6 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
47
52
  * @example
48
53
  * <Button variant="primary">Primary</Button>
49
54
  * <Button variant="secondary" size="large">Secondary</Button>
50
- * <Button variant="inverted">Inverted</Button>
51
55
  * <Button variant="tertiary" fullWidth="mobile">Tertiary</Button>
52
56
  * <Button icon="leading"><LeadingIcon />Leading icon</Button>
53
57
  *
@@ -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 { Button } from "../button";
4
4
  import { ButtonList } from ".";
5
5
 
@@ -1,5 +1,6 @@
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
+ import { Link } from "../link";
3
4
  import { Card } from ".";
4
5
 
5
6
  const meta: Meta<typeof Card> = {
@@ -25,17 +26,17 @@ export const Preview: Story = {
25
26
  <Card.Body>
26
27
  <Card.BodyHeader as="h2">
27
28
  <Card.BodyHeaderOverline>Theme</Card.BodyHeaderOverline>
28
- <Card.BodyHeaderTitle asChild>
29
- <a href="#article">Cool article</a>
30
- </Card.BodyHeaderTitle>
29
+ <Card.BodyHeaderTitle>Cool article</Card.BodyHeaderTitle>
31
30
  </Card.BodyHeader>
32
31
  <Card.BodyDescription>
33
- This is a card which acts as a giant link. You can also use the hedwig provided{" "}
34
- <code>Link</code> component, or a link component from your routing library. The link
35
- component of your choice should be set with the <code>as</code> property on the body
36
- header title. The card component provides a lot of flexibility.
32
+ This is a card The card component provides a lot of flexibility.
37
33
  </Card.BodyDescription>
38
- <Card.BodyActionArrow />
34
+ <Card.BodyAction asChild>
35
+ <Link href="#article-1" variant="solid">
36
+ <Card.BodyActionArrow />
37
+ Go to this article
38
+ </Link>
39
+ </Card.BodyAction>
39
40
  </Card.Body>
40
41
  </Card>
41
42
  ),
package/src/card/card.tsx CHANGED
@@ -29,7 +29,7 @@ export interface CardImageMediaProps extends React.ImgHTMLAttributes<HTMLImageEl
29
29
  * "scale": No cropping, image scales to the maximum size available and centers.
30
30
  * If the aspect ratio doesn't match, then the background will show on the top/bottom or left/right sides of the image.
31
31
  *
32
- * @default "crop"
32
+ * @default "scale"
33
33
  */
34
34
  variant?: "crop" | "scale";
35
35
  }
@@ -41,7 +41,7 @@ export const CardMediaImg = forwardRef<HTMLImageElement, CardImageMediaProps>(
41
41
  {...rest}
42
42
  className={clsx(
43
43
  "hds-card__media__img",
44
- { "hds-card__img__scale": variant === "scale" },
44
+ { "hds-card__img__crop": variant === "crop" },
45
45
  className as undefined,
46
46
  )}
47
47
  ref={ref}
@@ -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 { DescriptionList } from ".";
4
4
 
5
5
  type Story = StoryObj<typeof DescriptionList>;
@@ -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 { Figure } from ".";
4
4
 
5
5
  const meta: Meta<typeof Figure> = {
@@ -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 { Checkbox } from "./index";
4
4
 
5
5
  const meta: Meta<typeof Checkbox> = {
@@ -1,13 +1,19 @@
1
1
  import { forwardRef, useId, type InputHTMLAttributes, type ReactNode } from "react";
2
2
  import { clsx } from "@postenbring/hedwig-css/typed-classname";
3
- import { ErrorMessage, type ErrorMessageProps } from "../error-message";
3
+ import { ValidationMessage, type ValidationMessageProps } from "../validation-message";
4
+ import { type ErrorMessageProps } from "../error-message";
4
5
  import { useFieldsetContext } from "../fieldset";
6
+ import { getValidationMessageValue } from "../../utils";
5
7
 
6
- export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue"> & {
8
+ export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue" | "size"> & {
7
9
  children: ReactNode;
8
10
  variant?: "plain" | "bounding-box";
9
11
  title?: string;
12
+ validationMessage?: ReactNode | { value: ReactNode };
13
+ validationMessageProps?: Partial<ValidationMessageProps>;
14
+ /** @deprecated Use `validationMessageProps` instead */
10
15
  errorMessageProps?: Partial<ErrorMessageProps>;
16
+ size?: "small" | "";
11
17
  } & (
12
18
  | {
13
19
  /**
@@ -19,6 +25,8 @@ export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "default
19
25
  * You can use this when your checkbox is part of a non-HDS fieldset which shows an error message.
20
26
  */
21
27
  hasError?: boolean;
28
+ //validationMessage?: never;
29
+ /** @deprecated Use `validationMessage` instead */
22
30
  errorMessage?: never;
23
31
  }
24
32
  | {
@@ -29,6 +37,8 @@ export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "default
29
37
  *
30
38
  * Use this when your checkbox is standalone (not part of a fieldset).
31
39
  */
40
+ //validationMessage?: ReactNode;
41
+ /** @deprecated Use `validationMessage` instead */
32
42
  errorMessage?: ReactNode;
33
43
  }
34
44
  );
@@ -38,47 +48,58 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
38
48
  {
39
49
  variant = "plain",
40
50
  hasError: hasErrorProp,
51
+ validationMessage,
52
+ validationMessageProps,
41
53
  errorMessage,
42
54
  errorMessageProps,
43
55
  title,
44
56
  children,
45
57
  className,
58
+ size = "",
46
59
  ...rest
47
60
  },
48
61
  ref,
49
62
  ) => {
50
- const errorMessageId = useId();
51
- const { hasError: hasFieldsetError } = useFieldsetContext();
63
+ const validationMessageId = useId();
64
+ const { hasError: hasFieldsetError, size: fieldsetSize } = useFieldsetContext();
52
65
  const hasError = !!errorMessage || hasFieldsetError || hasErrorProp;
66
+ const effectiveSize = size || fieldsetSize;
67
+ const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);
53
68
 
54
69
  return (
55
- <div className={clsx("hds-checkbox-wrapper")}>
70
+ <div
71
+ className={clsx("hds-checkbox-wrapper", {
72
+ "hds-checkbox-wrapper--small": effectiveSize === "small",
73
+ })}
74
+ >
56
75
  <div
57
76
  className={clsx(
58
77
  "hds-checkbox",
59
78
  {
60
79
  [`hds-checkbox--${variant}`]: variant === "bounding-box",
61
- "hds-checkbox--error": hasError,
62
80
  },
63
81
  className as undefined,
64
82
  )}
65
83
  >
66
84
  <label>
67
85
  <input
68
- {...rest}
69
86
  aria-invalid={hasError ? true : undefined}
70
- aria-describedby={errorMessage ? errorMessageId : undefined}
87
+ aria-describedby={validationMessageValue ? validationMessageId : undefined}
71
88
  ref={ref}
72
89
  type="checkbox"
90
+ {...rest}
73
91
  />
74
92
  <span aria-hidden className="hds-checkbox__checkmark" />
75
93
  {title ? <p className="hds-checkbox__title">{title}</p> : children}
76
94
  </label>
77
95
  {title ? children : null}
78
96
  </div>
79
- <ErrorMessage id={errorMessageId} {...errorMessageProps}>
80
- {errorMessage}
81
- </ErrorMessage>
97
+ <ValidationMessage
98
+ id={validationMessageId}
99
+ {...(validationMessageProps ?? errorMessageProps)}
100
+ >
101
+ {validationMessageValue}
102
+ </ValidationMessage>
82
103
  </div>
83
104
  );
84
105
  },
@@ -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 { DatePicker } from ".";
4
4
 
5
5
  const meta: Meta<typeof DatePicker> = {
@@ -31,6 +31,8 @@ export const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function
31
31
  {
32
32
  className,
33
33
  size,
34
+ validationMessage,
35
+ validationMessageProps,
34
36
  errorMessage,
35
37
  labelProps,
36
38
  label,
@@ -38,6 +40,7 @@ export const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function
38
40
  style,
39
41
  disabled,
40
42
  readOnly,
43
+ "data-color": dataColor,
41
44
  calendarButtonTitle = "Åpne kalender",
42
45
  ...rest
43
46
  },
@@ -50,6 +53,8 @@ export const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function
50
53
  <InputGroup
51
54
  className={clsx("hds-date-picker", className as undefined)}
52
55
  disabled={disabled}
56
+ validationMessage={validationMessage}
57
+ validationMessageProps={validationMessageProps}
53
58
  errorMessage={errorMessage}
54
59
  id={id}
55
60
  label={label}
@@ -57,16 +62,17 @@ export const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function
57
62
  readOnly={readOnly}
58
63
  style={style}
59
64
  size={size}
65
+ data-color={dataColor}
60
66
  >
61
67
  {(inputProps) => (
62
68
  <>
63
69
  <input
64
- {...rest}
65
70
  {...inputProps}
66
71
  disabled={disabled}
67
72
  readOnly={readOnly}
68
73
  ref={mergedRef}
69
74
  type="date"
75
+ {...rest}
70
76
  />
71
77
  <button
72
78
  className={clsx("hds-date-picker__calendar-button")}
@@ -1,25 +1,19 @@
1
- import { clsx } from "@postenbring/hedwig-css/typed-classname";
2
1
  import { forwardRef, type ReactNode } from "react";
2
+ import { ValidationMessage } from "../validation-message";
3
3
 
4
+ /** @deprecated Use ValidationMessageProps instead */
4
5
  export interface ErrorMessageProps extends React.HTMLAttributes<HTMLDivElement> {
5
6
  children: ReactNode;
6
7
  id: string;
7
8
  className?: string;
8
9
  }
9
10
 
11
+ /** @deprecated Use ValidationMessage with data-color="error" instead */
10
12
  export const ErrorMessage = forwardRef<HTMLDivElement, ErrorMessageProps>(
11
- ({ children, id, className, ...rest }, ref) => {
12
- return (
13
- <div
14
- aria-live="polite"
15
- className={clsx("hds-error-message", className as undefined)}
16
- id={id}
17
- ref={ref}
18
- {...rest}
19
- >
20
- {children}
21
- </div>
22
- );
23
- },
13
+ ({ children, id, className, ...rest }, ref) => (
14
+ <ValidationMessage id={id} data-color="error" className={className} {...rest} ref={ref}>
15
+ {children}
16
+ </ValidationMessage>
17
+ ),
24
18
  );
25
19
  ErrorMessage.displayName = "ErrorMessage";
@@ -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 { ErrorSummary } from ".";
4
4
 
5
5
  const meta: Meta<typeof ErrorSummary> = {
@@ -129,7 +129,12 @@ export type ErrorSummaryProps = Omit<
129
129
 
130
130
  export const ErrorSummary = forwardRef<HTMLDivElement, ErrorSummaryProps>(
131
131
  ({ children, className, ...rest }, ref) => (
132
- <Box ref={ref} {...rest} className={clsx(`hds-error-summary`, className as undefined)}>
132
+ <Box
133
+ data-color="error"
134
+ ref={ref}
135
+ {...rest}
136
+ className={clsx(`hds-error-summary`, className as undefined)}
137
+ >
133
138
  {children}
134
139
  </Box>
135
140
  ),
@@ -0,0 +1,17 @@
1
+ import { forwardRef, type HTMLAttributes } from "react";
2
+
3
+ export type FieldsetDescriptionProps = HTMLAttributes<HTMLParagraphElement>;
4
+
5
+ /**
6
+ * FieldsetDescription component, used to display a description for a fieldset.
7
+ *
8
+ * @example
9
+ * <FieldsetDescription>
10
+ * Gi en kort beskrivelse i begge feltene
11
+ * </FieldsetDescription>
12
+ */
13
+ export const FieldsetDescription = forwardRef<HTMLParagraphElement, FieldsetDescriptionProps>(
14
+ function FieldsetDescription(rest, ref) {
15
+ return <p className="hds-fieldset__description" ref={ref} {...rest} />;
16
+ },
17
+ );
@@ -0,0 +1,22 @@
1
+ import { forwardRef, type HTMLAttributes } from "react";
2
+ import { clsx } from "@postenbring/hedwig-css/typed-classname";
3
+
4
+ /**
5
+ * FieldsetLegend component, used to display a legend for a fieldset.
6
+ *
7
+ * @example
8
+ * <FieldsetLegend>Skriv inn dine svar</FieldsetLegend>
9
+ */
10
+ export const FieldsetLegend = forwardRef<HTMLLegendElement, HTMLAttributes<HTMLLegendElement>>(
11
+ function FieldsetLegend({ className, ...rest }, ref) {
12
+ return (
13
+ <legend
14
+ className={clsx("hds-fieldset__legend", className as undefined)}
15
+ ref={ref}
16
+ {...rest}
17
+ />
18
+ );
19
+ },
20
+ );
21
+
22
+ FieldsetLegend.displayName = "Fieldset.Legend";
@@ -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 { Checkbox } from "../checkbox";
4
4
  import { Fieldset } from ".";
5
5
 
@@ -15,11 +15,12 @@ type Story = StoryObj<typeof Fieldset>;
15
15
  export const Preview: Story = {
16
16
  tags: ["!dev"],
17
17
  args: {
18
- legend: "Default fieldset",
19
18
  errorMessage: "",
20
19
  },
21
20
  render: (props) => (
22
21
  <Fieldset {...props}>
22
+ <Fieldset.Legend>Default fieldset</Fieldset.Legend>
23
+ <Fieldset.Description>This is a description</Fieldset.Description>
23
24
  <Checkbox defaultChecked value="Hello">
24
25
  Hello
25
26
  </Checkbox>