@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
@@ -0,0 +1,70 @@
1
+ import { forwardRef } from "react";
2
+ import type { AnchorHTMLAttributes, HTMLAttributes, Ref } from "react";
3
+ import { clsx } from "@postenbring/hedwig-css/typed-classname";
4
+ import { Slot } from "@radix-ui/react-slot";
5
+
6
+ export type SuggestionsItemProps = HTMLAttributes<HTMLLIElement>;
7
+
8
+ export interface SuggestionsItemActionProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
9
+ /**
10
+ * Use the element passed as a child, merging its props and behavior.
11
+ *
12
+ * @default false
13
+ */
14
+ asChild?: boolean;
15
+ }
16
+
17
+ /**
18
+ * A single structural item in a suggestions list.
19
+ *
20
+ * Use `Suggestions.ItemAction` as the interactive child of each item.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <Suggestions.Item>
25
+ * <Suggestions.ItemAction href="/results">
26
+ * View results
27
+ * </Suggestions.ItemAction>
28
+ * </Suggestions.Item>
29
+ * ```
30
+ */
31
+ export const SuggestionsItem = forwardRef<HTMLLIElement, SuggestionsItemProps>(
32
+ ({ className, ...rest }, ref) => (
33
+ <li className={clsx("hds-suggestions-item", className as undefined)} ref={ref} {...rest} />
34
+ ),
35
+ );
36
+
37
+ SuggestionsItem.displayName = "Suggestions.Item";
38
+
39
+ /**
40
+ * The interactive action within a suggestions item.
41
+ *
42
+ * Renders an anchor by default and applies the `hds-suggestions-item__action`
43
+ * class. Use `asChild` to render another interactive element, such as a button
44
+ * or router link, while preserving the action styling.
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * <Suggestions.ItemAction href="/results">
49
+ * View results
50
+ * </Suggestions.ItemAction>
51
+ *
52
+ * <Suggestions.ItemAction asChild>
53
+ * <button type="button">Select result</button>
54
+ * </Suggestions.ItemAction>
55
+ * ```
56
+ */
57
+ export const SuggestionsItemAction = forwardRef<HTMLAnchorElement, SuggestionsItemActionProps>(
58
+ ({ asChild, className, ...rest }, ref) => {
59
+ const Component = asChild ? Slot : "a";
60
+ return (
61
+ <Component
62
+ className={clsx("hds-suggestions-item__action", className as undefined)}
63
+ ref={ref as Ref<HTMLAnchorElement>}
64
+ {...rest}
65
+ />
66
+ );
67
+ },
68
+ );
69
+
70
+ SuggestionsItemAction.displayName = "Suggestions.ItemAction";
@@ -0,0 +1,50 @@
1
+ import { forwardRef } from "react";
2
+ import type { HTMLAttributes } from "react";
3
+ import { clsx } from "@postenbring/hedwig-css/typed-classname";
4
+
5
+ export interface SuggestionsWrapperProps extends HTMLAttributes<HTMLDivElement> {
6
+ /**
7
+ * Change the rendered element for the suggestions wrapper.
8
+ *
9
+ * @default "div"
10
+ */
11
+ as?: "section" | "div";
12
+ }
13
+
14
+ /**
15
+ * A wrapper for search suggestions.
16
+ * Intended to contain a SearchWrapper and Suggestions.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Suggestions.Wrapper>
21
+ * <SearchWrapper>
22
+ * <Input type="search" aria-label="Search content" />
23
+ * <Button>Search</Button>
24
+ * <Button icon aria-label="Clear search">
25
+ * <XmarkIcon />
26
+ * </Button>
27
+ * </SearchWrapper>
28
+ * <Suggestions>
29
+ * <Suggestions.Item>
30
+ * <Suggestions.ItemAction href="/">Albania</Suggestions.ItemAction>
31
+ * </Suggestions.Item>
32
+ * </Suggestions>
33
+ * </Suggestions.Wrapper>
34
+ * ```
35
+ *
36
+ * Use `as` when the wrapper needs a different semantic element:
37
+ * ```tsx
38
+ * <Suggestions.Wrapper as="section">
39
+ * <SearchWrapper>...</SearchWrapper>
40
+ * <Suggestions>...</Suggestions>
41
+ * </Suggestions.Wrapper>
42
+ * ```
43
+ */
44
+ export const SuggestionsWrapper = forwardRef<HTMLDivElement, SuggestionsWrapperProps>(
45
+ ({ as: Tag = "div", className, ...rest }, ref) => (
46
+ <Tag className={clsx("hds-suggestions-wrapper", className as undefined)} ref={ref} {...rest} />
47
+ ),
48
+ );
49
+
50
+ SuggestionsWrapper.displayName = "Suggestions.Wrapper";
@@ -0,0 +1,89 @@
1
+ import { forwardRef } from "react";
2
+ import type { HTMLAttributes, Ref } from "react";
3
+ import { clsx } from "@postenbring/hedwig-css/typed-classname";
4
+ import { SuggestionsWrapper } from "./suggestions-wrapper";
5
+ import { SuggestionsItem, SuggestionsItemAction } from "./suggestions-item";
6
+
7
+ export type { SuggestionsItemActionProps, SuggestionsItemProps } from "./suggestions-item";
8
+
9
+ export interface SuggestionsProps extends HTMLAttributes<HTMLUListElement | HTMLOListElement> {
10
+ /**
11
+ * Change the rendered list element.
12
+ *
13
+ * @default "ul"
14
+ */
15
+ as?: "ul" | "ol";
16
+ /**
17
+ * Sets the size of the items
18
+ *
19
+ * @default "default"
20
+ */
21
+ size?: "default" | "small";
22
+ }
23
+
24
+ export type SuggestionProps = SuggestionsProps;
25
+
26
+ /**
27
+ * A list of suggestions for the user while searching
28
+ *
29
+ * @example
30
+ * ```tsx
31
+ * <Suggestions>
32
+ * <Suggestions.Item>
33
+ * <Suggestions.ItemAction href="/">
34
+ * Albania
35
+ * </Suggestions.ItemAction>
36
+ * </Suggestions.Item>
37
+ * <Suggestions.Item>
38
+ * <Suggestions.ItemAction asChild>
39
+ * <button type="button">Select Albania</button>
40
+ * </Suggestions.ItemAction>
41
+ * </Suggestions.Item>
42
+ * </Suggestions>
43
+ * ```
44
+ *
45
+ * Use `as="ol"` for ordered suggestions:
46
+ * ```tsx
47
+ * <Suggestions as="ol">
48
+ * <Suggestions.Item>
49
+ * <Suggestions.ItemAction href="/">
50
+ * First result
51
+ * </Suggestions.ItemAction>
52
+ * </Suggestions.Item>
53
+ * </Suggestions>
54
+ * ```
55
+ */
56
+ export const Suggestions = forwardRef<HTMLUListElement | HTMLOListElement, SuggestionProps>(
57
+ ({ as = "ul", size = "default", className, ...rest }, ref) => {
58
+ const classes = clsx(
59
+ "hds-suggestions",
60
+ size !== "default" && `hds-suggestions--${size}`,
61
+ className as undefined,
62
+ );
63
+
64
+ return as === "ol" ? (
65
+ <ol
66
+ className={classes}
67
+ ref={ref as Ref<HTMLOListElement>}
68
+ {...(rest as HTMLAttributes<HTMLOListElement>)}
69
+ />
70
+ ) : (
71
+ <ul className={classes} ref={ref as Ref<HTMLUListElement>} {...rest} />
72
+ );
73
+ },
74
+ ) as SuggestionsType;
75
+
76
+ type SuggestionsType = ReturnType<
77
+ typeof forwardRef<HTMLUListElement | HTMLOListElement, SuggestionProps>
78
+ > & {
79
+ Item: typeof SuggestionsItem;
80
+ ItemAction: typeof SuggestionsItemAction;
81
+ Wrapper: typeof SuggestionsWrapper;
82
+ };
83
+
84
+ Suggestions.displayName = "Suggestions";
85
+ SuggestionsItem.displayName = "Suggestions.Item";
86
+ SuggestionsItemAction.displayName = "Suggestions.ItemAction";
87
+ Suggestions.Item = SuggestionsItem;
88
+ Suggestions.ItemAction = SuggestionsItemAction;
89
+ Suggestions.Wrapper = SuggestionsWrapper;
@@ -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 { Textarea } from ".";
4
4
 
5
5
  const meta: Meta<typeof Textarea> = {
@@ -10,13 +10,29 @@ export type TextareaProps = Omit<
10
10
  >;
11
11
 
12
12
  export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function Textarea(
13
- { className, size, errorMessage, labelProps, label, id, style, disabled, readOnly, ...rest },
13
+ {
14
+ className,
15
+ size,
16
+ validationMessage,
17
+ validationMessageProps,
18
+ errorMessage,
19
+ labelProps,
20
+ label,
21
+ id,
22
+ style,
23
+ disabled,
24
+ readOnly,
25
+ "data-color": dataColor,
26
+ ...rest
27
+ },
14
28
  ref,
15
29
  ) {
16
30
  return (
17
31
  <InputGroup
18
32
  className={clsx("hds-textarea", className as undefined)}
19
33
  disabled={disabled}
34
+ validationMessage={validationMessage}
35
+ validationMessageProps={validationMessageProps}
20
36
  errorMessage={errorMessage}
21
37
  id={id}
22
38
  label={label}
@@ -24,8 +40,9 @@ export const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(function
24
40
  readOnly={readOnly}
25
41
  style={style}
26
42
  size={size}
43
+ data-color={dataColor}
27
44
  >
28
- <textarea {...rest} disabled={disabled} readOnly={readOnly} ref={ref} />
45
+ <textarea disabled={disabled} readOnly={readOnly} ref={ref} {...rest} />
29
46
  </InputGroup>
30
47
  );
31
48
  });
@@ -0,0 +1,2 @@
1
+ export { ValidationMessage } from "./validation-message";
2
+ export type * from "./validation-message";
@@ -0,0 +1,20 @@
1
+ /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ import { ValidationMessage } from ".";
4
+
5
+ const meta: Meta<typeof ValidationMessage> = {
6
+ title: "Form/Validation Message",
7
+ component: ValidationMessage,
8
+ };
9
+
10
+ export default meta;
11
+
12
+ type Story = StoryObj<typeof ValidationMessage>;
13
+
14
+ export const Preview: Story = {
15
+ tags: ["!dev"],
16
+ args: {
17
+ id: "id",
18
+ children: "This is a validation message for use with form input components",
19
+ },
20
+ };
@@ -0,0 +1,18 @@
1
+ import { clsx } from "@postenbring/hedwig-css/typed-classname";
2
+ import { forwardRef, type HTMLAttributes } from "react";
3
+
4
+ export interface ValidationMessageProps extends HTMLAttributes<HTMLDivElement> {
5
+ className?: string;
6
+ }
7
+
8
+ export const ValidationMessage = forwardRef<HTMLDivElement, ValidationMessageProps>(
9
+ ({ className, ...rest }, ref) => (
10
+ <div
11
+ aria-live="polite"
12
+ className={clsx("hds-validation-message", className as undefined)}
13
+ ref={ref}
14
+ {...rest}
15
+ />
16
+ ),
17
+ );
18
+ ValidationMessage.displayName = "ValidationMessage";
@@ -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 { HelpText } from ".";
4
4
 
5
5
  type Story = StoryObj<typeof HelpText>;
@@ -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 { useState, useEffect, useRef, useId } from "react";
4
4
  import { Container, Grid } 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 { Box } from "../../box";
4
4
  import { Grid } 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 { Box } from "../../box";
4
4
  import { Stack } 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 { Link } from ".";
4
4
 
5
5
  const meta: Meta<typeof Link> = {
@@ -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 { LinkList } from "./link-list";
5
5
 
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
- import type { StoryObj, Meta } from "@storybook/react";
2
+ import type { StoryObj, Meta } from "@storybook/react-vite";
3
3
  import { HStack } from "../layout";
4
4
  import { UnorderedList } 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 { Message } from ".";
4
4
 
5
5
  const meta: Meta<typeof 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 { useRef } from "react";
4
4
  import { Button } from "../button";
5
5
  import { HStack } from "../layout";
@@ -17,26 +17,22 @@ export const Preview: Story = {
17
17
  tags: ["!dev"],
18
18
  render: function Render(args) {
19
19
  const modalRef = useRef<HTMLDialogElement>(null);
20
- const onClose = () => modalRef.current?.close();
21
20
  const onMainAction = () => modalRef.current?.close();
22
21
 
23
22
  return (
24
23
  <>
25
24
  <Button onClick={() => modalRef.current?.showModal()}>Open Modal</Button>
26
25
  <Modal ref={modalRef} {...args}>
27
- <Modal.Header>Dialog header</Modal.Header>
26
+ <Modal.Header>Case registered</Modal.Header>
28
27
  <Modal.Content>
29
28
  <p>
30
- Dialog header Dialog description - a description of what is about to happen and maybe
31
- something about the consequences.
29
+ Your case has been registered. Reference number: #123456 something about the
30
+ consequences.
32
31
  </p>
33
32
  </Modal.Content>
34
33
  <Modal.Footer>
35
34
  <HStack gap="16" wrap>
36
- <Button onClick={onMainAction}>Main action</Button>
37
- <Button variant="secondary" onClick={onClose}>
38
- Cancel
39
- </Button>
35
+ <Button onClick={onMainAction}>OK</Button>
40
36
  </HStack>
41
37
  </Modal.Footer>
42
38
  </Modal>
@@ -97,6 +97,7 @@ export const NavbarExpandableMenuTrigger = forwardRef<
97
97
  <button
98
98
  aria-expanded={open}
99
99
  aria-controls={contentId}
100
+ aria-label={open ? whenOpenHelperTitle : whenClosedHelperTitle}
100
101
  className={clsx(
101
102
  "hds-navbar__item",
102
103
  className as undefined,
@@ -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 { Navbar } from ".";
4
4
 
5
5
  const meta: Meta<typeof Navbar> = {
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
2
 
3
- import type { Meta, StoryObj } from "@storybook/react";
3
+ import type { Meta, StoryObj } from "@storybook/react-vite";
4
4
  import { ShowMoreButton } from ".";
5
5
 
6
6
  const meta: Meta<typeof ShowMoreButton> = {
@@ -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 { VStack } from "../layout";
4
4
  import { Skeleton } 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 { Spinner } from ".";
4
4
 
5
5
  const meta: Meta<typeof Spinner> = {
@@ -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 { StepIndicator } from ".";
4
4
 
5
5
  const meta: Meta<typeof StepIndicator> = {
@@ -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 { StyledHtml } from ".";
4
4
 
5
5
  const meta: Meta<typeof StyledHtml> = {
@@ -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 { Table } from ".";
4
4
 
5
5
  type Story = StoryObj<typeof Table>;
@@ -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 { Tabs } from ".";
4
4
 
5
5
  type Story = StoryObj<typeof Tabs>;
@@ -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 { VStack } from "../layout";
4
4
  import { Text } from ".";
5
5
 
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { useCallback, useEffect, useState, version } from "react";
3
+ import type { ReactNode } from "react";
3
4
 
4
5
  /**
5
6
  * Merges an array of refs into a single memoized callback ref or `null`.
@@ -65,6 +66,21 @@ export function useHydrated() {
65
66
  );
66
67
  }
67
68
 
69
+ export function getValidationMessageValue(
70
+ validationMessage?: ReactNode | { value: ReactNode },
71
+ errorMessage?: ReactNode,
72
+ ): ReactNode {
73
+ if (validationMessage) {
74
+ if (typeof validationMessage === "object" && "value" in validationMessage) {
75
+ return validationMessage.value;
76
+ }
77
+
78
+ return validationMessage;
79
+ }
80
+
81
+ return errorMessage;
82
+ }
83
+
68
84
  /**
69
85
  * Trap focus inside an element using the `inert` attribute.
70
86
  *
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
2
 
3
- import type { Meta, StoryObj } from "@storybook/react";
3
+ import type { Meta, StoryObj } from "@storybook/react-vite";
4
4
  import { WarningBanner } from ".";
5
5
 
6
6
  const meta: Meta<typeof WarningBanner> = {
@@ -1,37 +0,0 @@
1
- import {
2
- InputGroup
3
- } from "./chunk-6OJINZ37.mjs";
4
- import {
5
- __objRest,
6
- __spreadProps,
7
- __spreadValues
8
- } from "./chunk-YOSPWY5K.mjs";
9
-
10
- // src/form/input/input.tsx
11
- import { forwardRef } from "react";
12
- import { clsx } from "@postenbring/hedwig-css/typed-classname";
13
- import { jsx } from "react/jsx-runtime";
14
- var Input = forwardRef(function Input2(_a, ref) {
15
- var _b = _a, { className, size, errorMessage, labelProps, label, id, style, disabled, readOnly } = _b, rest = __objRest(_b, ["className", "size", "errorMessage", "labelProps", "label", "id", "style", "disabled", "readOnly"]);
16
- return /* @__PURE__ */ jsx(
17
- InputGroup,
18
- {
19
- className: clsx("hds-input", className),
20
- disabled,
21
- errorMessage,
22
- id,
23
- label,
24
- labelProps,
25
- readOnly,
26
- style,
27
- size,
28
- children: /* @__PURE__ */ jsx("input", __spreadProps(__spreadValues({}, rest), { disabled, readOnly, ref }))
29
- }
30
- );
31
- });
32
- Input.displayName = "Input";
33
-
34
- export {
35
- Input
36
- };
37
- //# sourceMappingURL=chunk-3VKESN3T.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/form/input/input.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { InputHTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { InputGroup } from \"../input-group\";\nimport type { InputGroupProps } from \"../input-group\";\n\n/**\n * Omitting:\n * - `size` from InputHTMLAttributes\n * - `children` from InputGroupProps\n * The original `size` prop that input elements have is not in use in HDS.\n * It is overridden by styling.\n */\nexport type InputProps = Omit<\n InputGroupProps & Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n \"children\"\n>;\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(function Input(\n { className, size, errorMessage, labelProps, label, id, style, disabled, readOnly, ...rest },\n ref,\n) {\n return (\n <InputGroup\n className={clsx(\"hds-input\", className as undefined)}\n disabled={disabled}\n errorMessage={errorMessage}\n id={id}\n label={label}\n labelProps={labelProps}\n readOnly={readOnly}\n style={style}\n size={size}\n >\n <input {...rest} disabled={disabled} readOnly={readOnly} ref={ref} />\n </InputGroup>\n );\n});\n\nInput.displayName = \"Input\";\n"],"mappings":";;;;;;;;;;AAAA,SAAS,kBAAkB;AAE3B,SAAS,YAAY;AAgCf;AAhBC,IAAM,QAAQ,WAAyC,SAASA,OACrE,IACA,KACA;AAFA,eAAE,aAAW,MAAM,cAAc,YAAY,OAAO,IAAI,OAAO,UAAU,SAnB3E,IAmBE,IAAsF,iBAAtF,IAAsF,CAApF,aAAW,QAAM,gBAAc,cAAY,SAAO,MAAI,SAAO,YAAU;AAGzE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,KAAK,aAAa,SAAsB;AAAA,MACnD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA,8BAAC,0CAAU,OAAV,EAAgB,UAAoB,UAAoB,MAAU;AAAA;AAAA,EACrE;AAEJ,CAAC;AAED,MAAM,cAAc;","names":["Input"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/form/input-group/input-group.tsx"],"sourcesContent":["import { useId, forwardRef, Children, isValidElement, cloneElement } from \"react\";\nimport type { LabelHTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage, type ErrorMessageProps } from \"../error-message\";\n\ninterface InputProps {\n \"aria-describedby\"?: string;\n \"aria-invalid\"?: boolean;\n id?: string;\n className?: string;\n}\n\nexport interface InputGroupProps {\n id?: string;\n className?: string;\n style?: CSSProperties;\n size?: \"large\" | \"small\";\n errorMessage?: ReactNode;\n errorMessageProps?: Partial<ErrorMessageProps>;\n labelProps?: LabelHTMLAttributes<HTMLLabelElement>;\n label: ReactNode;\n disabled?: boolean;\n readOnly?: boolean;\n /**\n * `children` must be either a single input element or a render function.\n *\n * If you use a render function, make sure you spread the input props to the appropriate element.\n */\n children: Exclude<ReactNode, Iterable<ReactNode>> | ((inputProps: InputProps) => ReactNode);\n}\n\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n id,\n className,\n style,\n size = \"large\",\n errorMessage,\n errorMessageProps,\n labelProps: { className: labelClassName, ...labelProps } = {},\n label,\n disabled,\n readOnly,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n const inputId = useId();\n\n const renderInput = () => {\n const inputProps: InputProps = {\n \"aria-describedby\": errorMessage ? errorMessageId : undefined,\n \"aria-invalid\": errorMessage ? true : undefined,\n id: id ?? inputId,\n className: clsx(\"hds-input-group__input\"),\n };\n\n if (typeof children === \"function\") {\n return children(inputProps);\n }\n\n const input: ReactNode = Children.toArray(children)[0];\n\n if (!isValidElement<InputProps>(input)) {\n return;\n }\n\n return cloneElement<InputProps>(input, {\n ...inputProps,\n ...input.props,\n className: `${inputProps.className} ${input.props.className ?? \"\"}`,\n });\n };\n\n return (\n <div\n className={clsx(\n \"hds-input-group\",\n {\n [`hds-input-group--${size}`]: size,\n \"hds-input-group--error\": errorMessage,\n },\n className as undefined,\n )}\n ref={ref}\n style={style}\n {...rest}\n >\n <label\n className={clsx(\"hds-input-group__label\", labelClassName as undefined)}\n {...labelProps}\n htmlFor={id ?? inputId}\n >\n {label}\n </label>\n <div\n className={clsx(\"hds-input-group__input-wrapper\")}\n data-disabled={disabled}\n data-readonly={readOnly}\n >\n {renderInput()}\n </div>\n <ErrorMessage id={errorMessageId} {...errorMessageProps}>\n {errorMessage}\n </ErrorMessage>\n </div>\n );\n});\n"],"mappings":";;;;;;;;;;AAAA,SAAS,OAAO,YAAY,UAAU,gBAAgB,oBAAoB;AAE1E,SAAS,YAAY;AA2EjB,SAaE,KAbF;AA9CG,IAAM,aAAa,WAA4C,SAASA,YAC7E,IAcA,KACA;AAfA,eAOc;AAAA,IANZ;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,YAAY,KAA+C,CAAC;AAAA,EAvChE,IAgCE,IAOc,SAAE,aAAW,eAvC7B,IAuCgB,IAAgC,uBAAhC,IAAgC,CAA9B,eAPhB,SAQE;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EA3CJ,IAgCE,IAYK,iBAZL,IAYK;AAAA,IAXH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAKF,QAAM,iBAAiB,MAAM;AAC7B,QAAM,UAAU,MAAM;AAEtB,QAAM,cAAc,MAAM;AAnD5B,QAAAC;AAoDI,UAAM,aAAyB;AAAA,MAC7B,oBAAoB,eAAe,iBAAiB;AAAA,MACpD,gBAAgB,eAAe,OAAO;AAAA,MACtC,IAAI,kBAAM;AAAA,MACV,WAAW,KAAK,wBAAwB;AAAA,IAC1C;AAEA,QAAI,OAAO,aAAa,YAAY;AAClC,aAAO,SAAS,UAAU;AAAA,IAC5B;AAEA,UAAM,QAAmB,SAAS,QAAQ,QAAQ,EAAE,CAAC;AAErD,QAAI,CAAC,eAA2B,KAAK,GAAG;AACtC;AAAA,IACF;AAEA,WAAO,aAAyB,OAAO,gDAClC,aACA,MAAM,QAF4B;AAAA,MAGrC,WAAW,GAAG,WAAW,SAAS,KAAIA,MAAA,MAAM,MAAM,cAAZ,OAAAA,MAAyB,EAAE;AAAA,IACnE,EAAC;AAAA,EACH;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,UACE,CAAC,oBAAoB,IAAI,EAAE,GAAG;AAAA,UAC9B,0BAA0B;AAAA,QAC5B;AAAA,QACA;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,OACI,OAXL;AAAA,MAaC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,KAAK,0BAA0B,cAA2B;AAAA,aACjE,aAFL;AAAA,YAGC,SAAS,kBAAM;AAAA,YAEd;AAAA;AAAA,QACH;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,KAAK,gCAAgC;AAAA,YAChD,iBAAe;AAAA,YACf,iBAAe;AAAA,YAEd,sBAAY;AAAA;AAAA,QACf;AAAA,QACA,oBAAC,6CAAa,IAAI,kBAAoB,oBAArC,EACE,yBACH;AAAA;AAAA;AAAA,EACF;AAEJ,CAAC;","names":["InputGroup","_a"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/utils/utils.ts"],"sourcesContent":["import * as React from \"react\";\nimport { useCallback, useEffect, useState, version } from \"react\";\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/useMergeRefs\n */\nexport function useMergeRefs<Instance>(\n refs: (React.Ref<Instance> | undefined)[],\n): React.RefCallback<Instance> | null {\n return React.useMemo(() => {\n if (refs.every((ref) => ref === null)) {\n return null;\n }\n\n return (value) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref !== null) {\n (ref as React.MutableRefObject<Instance | null>).current = value;\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, refs);\n}\n\nexport function useResize<Instance extends HTMLElement>(\n ref: React.RefObject<Instance> | undefined | null,\n): { width: number; height: number } {\n const [width, setWidth] = useState<number>(0);\n const [height, setHeight] = useState<number>(0);\n const handleResize = useCallback(() => {\n if (ref?.current !== null) {\n setWidth(ref?.current?.offsetWidth ?? 0);\n setHeight(ref?.current?.offsetHeight ?? 0);\n }\n }, [ref]);\n useEffect(() => {\n window.addEventListener(\"load\", handleResize);\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"load\", handleResize);\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [ref, handleResize]);\n useEffect(() => {\n handleResize();\n // eslint-disable-next-line react-hooks/exhaustive-deps -- It's ok\n }, []);\n return { width, height };\n}\n\nfunction subscribe() {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- It's ok\n return () => {};\n}\n\nexport function useHydrated() {\n return React.useSyncExternalStore(\n subscribe,\n () => true,\n () => false,\n );\n}\n\n/**\n * Trap focus inside an element using the `inert` attribute.\n *\n * Adds `inert` to all siblings of the given element, and all their ancestors up to the body.\n * Returns a cleanup function which removes the `inert` property from the elements, effectively giving focus back to rest of the document.\n *\n * NOTE: Does not support portals, i.e. elements outside the DOM hierarchy of the given element.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert\n * @see https://web.dev/articles/inert\n */\nexport function focusTrap(element: HTMLElement) {\n // eslint-disable-next-line @typescript-eslint/no-empty-function -- NOP on focus trapping the body element\n if (element === document.body) return () => {};\n\n let inertElements: HTMLElement[] = [];\n for (let el: HTMLElement | null = element; el; el = el.parentElement) {\n if (el === document.body) break;\n\n for (const sibling of el.parentElement?.children ?? []) {\n if (sibling === el) continue;\n if (!(sibling instanceof HTMLElement)) continue;\n if (sibling.hasAttribute(\"inert\")) continue;\n\n sibling.setAttribute(\"inert\", \"true\");\n inertElements.push(sibling);\n }\n }\n\n return () => {\n releaseFocusTrap(inertElements);\n inertElements = [];\n };\n}\n\n/**\n * Unset the `inert` attribute on all elements given\n */\nfunction releaseFocusTrap(inertElements: Iterable<HTMLElement>) {\n for (const el of inertElements) {\n el.removeAttribute(\"inert\");\n }\n}\n\n/**\n * React 19 supports inert prop\n * React 18 needs inert to be a string\n */\nconst inertBooleanSupported: boolean = Number(version.split(\".\")[0]) >= 19;\n\n/**\n * Returns the inert prop value based on the React version.\n */\nexport const inertPropValue: (x: boolean) => boolean | \"\" | undefined = inertBooleanSupported\n ? (x: boolean): boolean => x\n : (x: boolean): \"\" | undefined => (x ? \"\" : undefined);\n"],"mappings":";AAAA,YAAY,WAAW;AACvB,SAAS,aAAa,WAAW,UAAU,eAAe;AAMnD,SAAS,aACd,MACoC;AACpC,SAAa,cAAQ,MAAM;AACzB,QAAI,KAAK,MAAM,CAAC,QAAQ,QAAQ,IAAI,GAAG;AACrC,aAAO;AAAA,IACT;AAEA,WAAO,CAAC,UAAU;AAChB,WAAK,QAAQ,CAAC,QAAQ;AACpB,YAAI,OAAO,QAAQ,YAAY;AAC7B,cAAI,KAAK;AAAA,QACX,WAAW,QAAQ,MAAM;AACvB,UAAC,IAAgD,UAAU;AAAA,QAC7D;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EAEF,GAAG,IAAI;AACT;AAEO,SAAS,UACd,KACmC;AACnC,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAiB,CAAC;AAC5C,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAiB,CAAC;AAC9C,QAAM,eAAe,YAAY,MAAM;AAjCzC;AAkCI,SAAI,2BAAK,aAAY,MAAM;AACzB,gBAAS,sCAAK,YAAL,mBAAc,gBAAd,YAA6B,CAAC;AACvC,iBAAU,sCAAK,YAAL,mBAAc,iBAAd,YAA8B,CAAC;AAAA,IAC3C;AAAA,EACF,GAAG,CAAC,GAAG,CAAC;AACR,YAAU,MAAM;AACd,WAAO,iBAAiB,QAAQ,YAAY;AAC5C,WAAO,iBAAiB,UAAU,YAAY;AAC9C,WAAO,MAAM;AACX,aAAO,oBAAoB,QAAQ,YAAY;AAC/C,aAAO,oBAAoB,UAAU,YAAY;AAAA,IACnD;AAAA,EACF,GAAG,CAAC,KAAK,YAAY,CAAC;AACtB,YAAU,MAAM;AACd,iBAAa;AAAA,EAEf,GAAG,CAAC,CAAC;AACL,SAAO,EAAE,OAAO,OAAO;AACzB;AAEA,SAAS,YAAY;AAEnB,SAAO,MAAM;AAAA,EAAC;AAChB;AAEO,SAAS,cAAc;AAC5B,SAAa;AAAA,IACX;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AACF;AAaO,SAAS,UAAU,SAAsB;AA9EhD;AAgFE,MAAI,YAAY,SAAS,KAAM,QAAO,MAAM;AAAA,EAAC;AAE7C,MAAI,gBAA+B,CAAC;AACpC,WAAS,KAAyB,SAAS,IAAI,KAAK,GAAG,eAAe;AACpE,QAAI,OAAO,SAAS,KAAM;AAE1B,eAAW,YAAW,cAAG,kBAAH,mBAAkB,aAAlB,YAA8B,CAAC,GAAG;AACtD,UAAI,YAAY,GAAI;AACpB,UAAI,EAAE,mBAAmB,aAAc;AACvC,UAAI,QAAQ,aAAa,OAAO,EAAG;AAEnC,cAAQ,aAAa,SAAS,MAAM;AACpC,oBAAc,KAAK,OAAO;AAAA,IAC5B;AAAA,EACF;AAEA,SAAO,MAAM;AACX,qBAAiB,aAAa;AAC9B,oBAAgB,CAAC;AAAA,EACnB;AACF;AAKA,SAAS,iBAAiB,eAAsC;AAC9D,aAAW,MAAM,eAAe;AAC9B,OAAG,gBAAgB,OAAO;AAAA,EAC5B;AACF;AAMA,IAAM,wBAAiC,OAAO,QAAQ,MAAM,GAAG,EAAE,CAAC,CAAC,KAAK;AAKjE,IAAM,iBAA2D,wBACpE,CAAC,MAAwB,IACzB,CAAC,MAAgC,IAAI,KAAK;","names":[]}