@postenbring/hedwig-react 4.1.2 → 4.2.1

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 (260) 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/{chunk-77M2ZTP7.mjs → chunk-3V4GFS46.mjs} +11 -1
  8. package/dist/chunk-3V4GFS46.mjs.map +1 -0
  9. package/dist/chunk-5M6MEYM7.mjs +1 -0
  10. package/dist/chunk-62VLFCXX.mjs +64 -0
  11. package/dist/chunk-62VLFCXX.mjs.map +1 -0
  12. package/dist/chunk-CD4LCDK3.mjs +27 -0
  13. package/dist/chunk-CD4LCDK3.mjs.map +1 -0
  14. package/dist/chunk-CSIXGT7P.mjs +1 -0
  15. package/dist/chunk-CVE23PMJ.mjs +1 -0
  16. package/dist/chunk-CVE23PMJ.mjs.map +1 -0
  17. package/dist/chunk-D2XZT2RA.mjs +17 -0
  18. package/dist/chunk-D2XZT2RA.mjs.map +1 -0
  19. package/dist/{chunk-JFTUBOIF.mjs → chunk-DMRQEQQK.mjs} +27 -9
  20. package/dist/chunk-DMRQEQQK.mjs.map +1 -0
  21. package/dist/chunk-DNCWDWK2.mjs +113 -0
  22. package/dist/chunk-DNCWDWK2.mjs.map +1 -0
  23. package/dist/chunk-F23MNQCK.mjs +28 -0
  24. package/dist/chunk-F23MNQCK.mjs.map +1 -0
  25. package/dist/{chunk-5RXT5GLF.mjs → chunk-F6QJWZJX.mjs} +2 -2
  26. package/dist/{chunk-UYLKAPXD.mjs → chunk-GICUX46A.mjs} +2 -2
  27. package/dist/{chunk-SF6EDUHP.mjs → chunk-HOLFVKXQ.mjs} +2 -2
  28. package/dist/chunk-JGQTAIEP.mjs +67 -0
  29. package/dist/chunk-JGQTAIEP.mjs.map +1 -0
  30. package/dist/chunk-JKKH77UC.mjs +103 -0
  31. package/dist/chunk-JKKH77UC.mjs.map +1 -0
  32. package/dist/{chunk-GYI4NCUY.mjs → chunk-KPNAC2WN.mjs} +2 -2
  33. package/dist/{chunk-WNYCOHSD.mjs → chunk-NAXSP4VU.mjs} +2 -2
  34. package/dist/{chunk-R6MQFVHE.mjs → chunk-O55OTMJ5.mjs} +2 -2
  35. package/dist/chunk-OQD4GKOS.mjs +65 -0
  36. package/dist/chunk-OQD4GKOS.mjs.map +1 -0
  37. package/dist/{chunk-B4D2GO6E.mjs → chunk-QDG2QLFV.mjs} +2 -2
  38. package/dist/{chunk-B6T36QDV.mjs → chunk-QTC4ATZD.mjs} +2 -2
  39. package/dist/{chunk-Z56XN4AZ.mjs → chunk-RGZSYJFL.mjs} +14 -5
  40. package/dist/chunk-RGZSYJFL.mjs.map +1 -0
  41. package/dist/chunk-RJ763KDH.mjs +21 -0
  42. package/dist/chunk-RJ763KDH.mjs.map +1 -0
  43. package/dist/{chunk-AGIY7SFP.mjs → chunk-SO7TS4TS.mjs} +2 -2
  44. package/dist/{chunk-E6OOFTRQ.mjs → chunk-SQNGMF3D.mjs} +14 -8
  45. package/dist/chunk-SQNGMF3D.mjs.map +1 -0
  46. package/dist/{chunk-LHIG6RW7.mjs → chunk-VNH7CZJ4.mjs} +5 -13
  47. package/dist/chunk-VNH7CZJ4.mjs.map +1 -0
  48. package/dist/{chunk-HEDGKRGC.mjs → chunk-WMSOBRKN.mjs} +6 -32
  49. package/dist/chunk-WMSOBRKN.mjs.map +1 -0
  50. package/dist/{chunk-HBGFFKP3.mjs → chunk-WVCJV74B.mjs} +2 -2
  51. package/dist/{chunk-EDPWJWQO.mjs → chunk-YQT2TN3U.mjs} +2 -2
  52. package/dist/footer/footer.js.map +1 -1
  53. package/dist/footer/footer.mjs +5 -5
  54. package/dist/footer/index.js.map +1 -1
  55. package/dist/footer/index.mjs +5 -5
  56. package/dist/form/checkbox/checkbox.d.ts +10 -1
  57. package/dist/form/checkbox/checkbox.d.ts.map +1 -1
  58. package/dist/form/checkbox/checkbox.js +170 -71
  59. package/dist/form/checkbox/checkbox.js.map +1 -1
  60. package/dist/form/checkbox/checkbox.mjs +11 -4
  61. package/dist/form/checkbox/index.js +170 -71
  62. package/dist/form/checkbox/index.js.map +1 -1
  63. package/dist/form/checkbox/index.mjs +11 -4
  64. package/dist/form/date-picker/date-picker.d.ts.map +1 -1
  65. package/dist/form/date-picker/date-picker.js +75 -45
  66. package/dist/form/date-picker/date-picker.js.map +1 -1
  67. package/dist/form/date-picker/date-picker.mjs +8 -4
  68. package/dist/form/date-picker/index.js +75 -45
  69. package/dist/form/date-picker/index.js.map +1 -1
  70. package/dist/form/date-picker/index.mjs +8 -4
  71. package/dist/form/error-message/error-message.d.ts +2 -0
  72. package/dist/form/error-message/error-message.d.ts.map +1 -1
  73. package/dist/form/error-message/error-message.js +18 -8
  74. package/dist/form/error-message/error-message.js.map +1 -1
  75. package/dist/form/error-message/error-message.mjs +3 -1
  76. package/dist/form/error-message/index.js +18 -8
  77. package/dist/form/error-message/index.js.map +1 -1
  78. package/dist/form/error-message/index.mjs +3 -1
  79. package/dist/form/error-summary/error-summary.js.map +1 -1
  80. package/dist/form/error-summary/error-summary.mjs +3 -3
  81. package/dist/form/error-summary/index.js.map +1 -1
  82. package/dist/form/error-summary/index.mjs +3 -3
  83. package/dist/form/fieldset/fieldset-description.d.ts +12 -0
  84. package/dist/form/fieldset/fieldset-description.d.ts.map +1 -0
  85. package/dist/form/fieldset/fieldset-description.js +51 -0
  86. package/dist/form/fieldset/fieldset-description.js.map +1 -0
  87. package/dist/form/fieldset/fieldset-description.mjs +8 -0
  88. package/dist/form/fieldset/fieldset-description.mjs.map +1 -0
  89. package/dist/form/fieldset/fieldset-legend.d.ts +9 -0
  90. package/dist/form/fieldset/fieldset-legend.d.ts.map +1 -0
  91. package/dist/form/fieldset/fieldset-legend.js +72 -0
  92. package/dist/form/fieldset/fieldset-legend.js.map +1 -0
  93. package/dist/form/fieldset/fieldset-legend.mjs +8 -0
  94. package/dist/form/fieldset/fieldset-legend.mjs.map +1 -0
  95. package/dist/form/fieldset/fieldset.d.ts +30 -6
  96. package/dist/form/fieldset/fieldset.d.ts.map +1 -1
  97. package/dist/form/fieldset/fieldset.js +110 -35
  98. package/dist/form/fieldset/fieldset.js.map +1 -1
  99. package/dist/form/fieldset/fieldset.mjs +9 -2
  100. package/dist/form/fieldset/index.d.ts +2 -0
  101. package/dist/form/fieldset/index.d.ts.map +1 -1
  102. package/dist/form/fieldset/index.js +114 -35
  103. package/dist/form/fieldset/index.js.map +1 -1
  104. package/dist/form/fieldset/index.mjs +16 -3
  105. package/dist/form/index.d.ts +1 -0
  106. package/dist/form/index.d.ts.map +1 -1
  107. package/dist/form/index.js +460 -278
  108. package/dist/form/index.js.map +1 -1
  109. package/dist/form/index.mjs +41 -28
  110. package/dist/form/input/index.js +102 -38
  111. package/dist/form/input/index.js.map +1 -1
  112. package/dist/form/input/index.mjs +8 -3
  113. package/dist/form/input/input.d.ts.map +1 -1
  114. package/dist/form/input/input.js +102 -38
  115. package/dist/form/input/input.js.map +1 -1
  116. package/dist/form/input/input.mjs +8 -3
  117. package/dist/form/input-group/index.js +58 -22
  118. package/dist/form/input-group/index.js.map +1 -1
  119. package/dist/form/input-group/index.mjs +7 -2
  120. package/dist/form/input-group/input-group.d.ts +8 -0
  121. package/dist/form/input-group/input-group.d.ts.map +1 -1
  122. package/dist/form/input-group/input-group.js +58 -22
  123. package/dist/form/input-group/input-group.js.map +1 -1
  124. package/dist/form/input-group/input-group.mjs +7 -2
  125. package/dist/form/radio-button/index.js +139 -86
  126. package/dist/form/radio-button/index.js.map +1 -1
  127. package/dist/form/radio-button/index.mjs +12 -5
  128. package/dist/form/radio-button/radio-button.d.ts +2 -10
  129. package/dist/form/radio-button/radio-button.d.ts.map +1 -1
  130. package/dist/form/radio-button/radio-button.js +139 -86
  131. package/dist/form/radio-button/radio-button.js.map +1 -1
  132. package/dist/form/radio-button/radio-button.mjs +12 -5
  133. package/dist/form/radio-button/radio-group.d.ts +11 -13
  134. package/dist/form/radio-button/radio-group.d.ts.map +1 -1
  135. package/dist/form/radio-button/radio-group.js +123 -48
  136. package/dist/form/radio-button/radio-group.js.map +1 -1
  137. package/dist/form/radio-button/radio-group.mjs +11 -4
  138. package/dist/form/search-wrapper/index.js +6 -17
  139. package/dist/form/search-wrapper/index.js.map +1 -1
  140. package/dist/form/search-wrapper/index.mjs +1 -1
  141. package/dist/form/search-wrapper/search-wrapper.d.ts +2 -5
  142. package/dist/form/search-wrapper/search-wrapper.d.ts.map +1 -1
  143. package/dist/form/search-wrapper/search-wrapper.js +6 -17
  144. package/dist/form/search-wrapper/search-wrapper.js.map +1 -1
  145. package/dist/form/search-wrapper/search-wrapper.mjs +1 -1
  146. package/dist/form/select/index.js +104 -37
  147. package/dist/form/select/index.js.map +1 -1
  148. package/dist/form/select/index.mjs +8 -3
  149. package/dist/form/select/select.d.ts.map +1 -1
  150. package/dist/form/select/select.js +104 -37
  151. package/dist/form/select/select.js.map +1 -1
  152. package/dist/form/select/select.mjs +8 -3
  153. package/dist/form/textarea/index.js +91 -26
  154. package/dist/form/textarea/index.js.map +1 -1
  155. package/dist/form/textarea/index.mjs +8 -3
  156. package/dist/form/textarea/textarea.d.ts.map +1 -1
  157. package/dist/form/textarea/textarea.js +91 -26
  158. package/dist/form/textarea/textarea.js.map +1 -1
  159. package/dist/form/textarea/textarea.mjs +8 -3
  160. package/dist/form/validation-message/index.d.ts +3 -0
  161. package/dist/form/validation-message/index.d.ts.map +1 -0
  162. package/dist/form/validation-message/index.js +75 -0
  163. package/dist/form/validation-message/index.js.map +1 -0
  164. package/dist/form/validation-message/index.mjs +9 -0
  165. package/dist/form/validation-message/index.mjs.map +1 -0
  166. package/dist/form/validation-message/validation-message.d.ts +6 -0
  167. package/dist/form/validation-message/validation-message.d.ts.map +1 -0
  168. package/dist/form/validation-message/validation-message.js +73 -0
  169. package/dist/form/validation-message/validation-message.js.map +1 -0
  170. package/dist/form/validation-message/validation-message.mjs +8 -0
  171. package/dist/form/validation-message/validation-message.mjs.map +1 -0
  172. package/dist/index.js +669 -485
  173. package/dist/index.js.map +1 -1
  174. package/dist/index.mjs +61 -46
  175. package/dist/modal/index.js.map +1 -1
  176. package/dist/modal/index.mjs +2 -2
  177. package/dist/modal/modal.js.map +1 -1
  178. package/dist/modal/modal.mjs +2 -2
  179. package/dist/navbar/index.js.map +1 -1
  180. package/dist/navbar/index.mjs +3 -3
  181. package/dist/navbar/navbar-expandable-menu.js.map +1 -1
  182. package/dist/navbar/navbar-expandable-menu.mjs +2 -2
  183. package/dist/navbar/navbar.js.map +1 -1
  184. package/dist/navbar/navbar.mjs +3 -3
  185. package/dist/skeleton/index.js.map +1 -1
  186. package/dist/skeleton/index.mjs +3 -3
  187. package/dist/skeleton/skeleton.js.map +1 -1
  188. package/dist/skeleton/skeleton.mjs +3 -3
  189. package/dist/tabs/index.js.map +1 -1
  190. package/dist/tabs/index.mjs +3 -3
  191. package/dist/tabs/tabs-list.js.map +1 -1
  192. package/dist/tabs/tabs-list.mjs +2 -2
  193. package/dist/tabs/tabs.js.map +1 -1
  194. package/dist/tabs/tabs.mjs +3 -3
  195. package/dist/utils/auto-animate-height.js.map +1 -1
  196. package/dist/utils/auto-animate-height.mjs +2 -2
  197. package/dist/utils/index.js +11 -0
  198. package/dist/utils/index.js.map +1 -1
  199. package/dist/utils/index.mjs +4 -2
  200. package/dist/utils/utils.d.ts +4 -0
  201. package/dist/utils/utils.d.ts.map +1 -1
  202. package/dist/utils/utils.js +11 -0
  203. package/dist/utils/utils.js.map +1 -1
  204. package/dist/utils/utils.mjs +3 -1
  205. package/package.json +4 -4
  206. package/src/form/checkbox/checkbox.tsx +32 -11
  207. package/src/form/date-picker/date-picker.tsx +7 -1
  208. package/src/form/error-message/error-message.tsx +8 -14
  209. package/src/form/fieldset/fieldset-description.tsx +17 -0
  210. package/src/form/fieldset/fieldset-legend.tsx +22 -0
  211. package/src/form/fieldset/fieldset.stories.tsx +2 -1
  212. package/src/form/fieldset/fieldset.tsx +95 -26
  213. package/src/form/fieldset/index.tsx +2 -0
  214. package/src/form/index.tsx +1 -0
  215. package/src/form/input/input.tsx +23 -8
  216. package/src/form/input-group/input-group.tsx +22 -7
  217. package/src/form/radio-button/radio-button.stories.tsx +0 -1
  218. package/src/form/radio-button/radio-button.tsx +8 -34
  219. package/src/form/radio-button/radio-group.tsx +20 -19
  220. package/src/form/search-wrapper/search-wrapper.tsx +7 -22
  221. package/src/form/select/select.tsx +25 -8
  222. package/src/form/textarea/textarea.tsx +19 -2
  223. package/src/form/validation-message/index.tsx +2 -0
  224. package/src/form/validation-message/validation-message.stories.tsx +20 -0
  225. package/src/form/validation-message/validation-message.tsx +18 -0
  226. package/src/utils/utils.ts +16 -0
  227. package/dist/chunk-6BDVJ3J2.mjs +0 -37
  228. package/dist/chunk-6BDVJ3J2.mjs.map +0 -1
  229. package/dist/chunk-77M2ZTP7.mjs.map +0 -1
  230. package/dist/chunk-7T2GDVFS.mjs +0 -37
  231. package/dist/chunk-7T2GDVFS.mjs.map +0 -1
  232. package/dist/chunk-BO3EWZGA.mjs +0 -78
  233. package/dist/chunk-BO3EWZGA.mjs.map +0 -1
  234. package/dist/chunk-BOPY5K4T.mjs +0 -1
  235. package/dist/chunk-E6OOFTRQ.mjs.map +0 -1
  236. package/dist/chunk-HEDGKRGC.mjs.map +0 -1
  237. package/dist/chunk-IZFODQCF.mjs +0 -36
  238. package/dist/chunk-IZFODQCF.mjs.map +0 -1
  239. package/dist/chunk-JFTUBOIF.mjs.map +0 -1
  240. package/dist/chunk-LHIG6RW7.mjs.map +0 -1
  241. package/dist/chunk-LMF3QGSF.mjs +0 -1
  242. package/dist/chunk-Z2ZPTZ6F.mjs +0 -69
  243. package/dist/chunk-Z2ZPTZ6F.mjs.map +0 -1
  244. package/dist/chunk-Z56XN4AZ.mjs.map +0 -1
  245. package/dist/chunk-ZIVURWHY.mjs +0 -30
  246. package/dist/chunk-ZIVURWHY.mjs.map +0 -1
  247. package/src/form/error-message/error-message.stories.tsx +0 -20
  248. /package/dist/{chunk-BOPY5K4T.mjs.map → chunk-5M6MEYM7.mjs.map} +0 -0
  249. /package/dist/{chunk-LMF3QGSF.mjs.map → chunk-CSIXGT7P.mjs.map} +0 -0
  250. /package/dist/{chunk-5RXT5GLF.mjs.map → chunk-F6QJWZJX.mjs.map} +0 -0
  251. /package/dist/{chunk-UYLKAPXD.mjs.map → chunk-GICUX46A.mjs.map} +0 -0
  252. /package/dist/{chunk-SF6EDUHP.mjs.map → chunk-HOLFVKXQ.mjs.map} +0 -0
  253. /package/dist/{chunk-GYI4NCUY.mjs.map → chunk-KPNAC2WN.mjs.map} +0 -0
  254. /package/dist/{chunk-WNYCOHSD.mjs.map → chunk-NAXSP4VU.mjs.map} +0 -0
  255. /package/dist/{chunk-R6MQFVHE.mjs.map → chunk-O55OTMJ5.mjs.map} +0 -0
  256. /package/dist/{chunk-B4D2GO6E.mjs.map → chunk-QDG2QLFV.mjs.map} +0 -0
  257. /package/dist/{chunk-B6T36QDV.mjs.map → chunk-QTC4ATZD.mjs.map} +0 -0
  258. /package/dist/{chunk-AGIY7SFP.mjs.map → chunk-SO7TS4TS.mjs.map} +0 -0
  259. /package/dist/{chunk-HBGFFKP3.mjs.map → chunk-WVCJV74B.mjs.map} +0 -0
  260. /package/dist/{chunk-EDPWJWQO.mjs.map → chunk-YQT2TN3U.mjs.map} +0 -0
@@ -64,172 +64,294 @@ __export(form_exports, {
64
64
  ErrorMessage: () => ErrorMessage,
65
65
  ErrorSummary: () => ErrorSummary,
66
66
  Fieldset: () => Fieldset,
67
+ FieldsetDescription: () => FieldsetDescription,
68
+ FieldsetLegend: () => FieldsetLegend,
67
69
  Input: () => Input,
68
70
  RadioButton: () => RadioButton,
69
71
  RadioGroup: () => RadioGroup,
70
72
  SearchWrapper: () => SearchWrapper,
71
73
  Select: () => Select,
72
74
  Textarea: () => Textarea,
75
+ ValidationMessage: () => ValidationMessage,
73
76
  useFieldsetContext: () => useFieldsetContext,
74
77
  useRadioGroupContext: () => useRadioGroupContext
75
78
  });
76
79
  module.exports = __toCommonJS(form_exports);
77
80
 
78
81
  // src/form/checkbox/checkbox.tsx
79
- var import_react3 = require("react");
80
- var import_typed_classname3 = require("@postenbring/hedwig-css/typed-classname");
82
+ var import_react7 = require("react");
83
+ var import_typed_classname4 = require("@postenbring/hedwig-css/typed-classname");
81
84
 
82
- // src/form/error-message/error-message.tsx
85
+ // src/form/validation-message/validation-message.tsx
83
86
  var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
84
87
  var import_react = require("react");
85
88
  var import_jsx_runtime = require("react/jsx-runtime");
86
- var ErrorMessage = (0, import_react.forwardRef)(
89
+ var ValidationMessage = (0, import_react.forwardRef)(
87
90
  (_a, ref) => {
88
- var _b = _a, { children, id, className } = _b, rest = __objRest(_b, ["children", "id", "className"]);
91
+ var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
89
92
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
93
  "div",
91
- __spreadProps(__spreadValues({
94
+ __spreadValues({
92
95
  "aria-live": "polite",
93
- className: (0, import_typed_classname.clsx)("hds-error-message", className),
94
- id,
96
+ className: (0, import_typed_classname.clsx)("hds-validation-message", className),
95
97
  ref
96
- }, rest), {
97
- children
98
- })
98
+ }, rest)
99
99
  );
100
100
  }
101
101
  );
102
+ ValidationMessage.displayName = "ValidationMessage";
103
+
104
+ // src/form/error-message/error-message.tsx
105
+ var import_react2 = require("react");
106
+ var import_jsx_runtime2 = require("react/jsx-runtime");
107
+ var ErrorMessage = (0, import_react2.forwardRef)(
108
+ (_a, ref) => {
109
+ var _b = _a, { children, id, className } = _b, rest = __objRest(_b, ["children", "id", "className"]);
110
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ValidationMessage, __spreadProps(__spreadValues({ id, "data-color": "error", className }, rest), { ref, children }));
111
+ }
112
+ );
102
113
  ErrorMessage.displayName = "ErrorMessage";
103
114
 
104
115
  // src/form/fieldset/fieldset.tsx
105
- var import_react2 = require("react");
116
+ var import_react6 = require("react");
117
+ var import_typed_classname3 = require("@postenbring/hedwig-css/typed-classname");
118
+
119
+ // src/utils/utils.ts
120
+ var React = __toESM(require("react"));
121
+ var import_react3 = require("react");
122
+ function useMergeRefs(refs) {
123
+ return React.useMemo(() => {
124
+ if (refs.every((ref) => ref === null)) {
125
+ return null;
126
+ }
127
+ return (value) => {
128
+ refs.forEach((ref) => {
129
+ if (typeof ref === "function") {
130
+ ref(value);
131
+ } else if (ref !== null) {
132
+ ref.current = value;
133
+ }
134
+ });
135
+ };
136
+ }, refs);
137
+ }
138
+ function getValidationMessageValue(validationMessage, errorMessage) {
139
+ if (validationMessage) {
140
+ if (typeof validationMessage === "object" && "value" in validationMessage) {
141
+ return validationMessage.value;
142
+ }
143
+ return validationMessage;
144
+ }
145
+ return errorMessage;
146
+ }
147
+ var inertBooleanSupported = Number(import_react3.version.split(".")[0]) >= 19;
148
+
149
+ // src/form/fieldset/fieldset-description.tsx
150
+ var import_react4 = require("react");
151
+ var import_jsx_runtime3 = require("react/jsx-runtime");
152
+ var FieldsetDescription = (0, import_react4.forwardRef)(
153
+ function FieldsetDescription2(rest, ref) {
154
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", __spreadValues({ className: "hds-fieldset__description", ref }, rest));
155
+ }
156
+ );
157
+
158
+ // src/form/fieldset/fieldset-legend.tsx
159
+ var import_react5 = require("react");
106
160
  var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname");
107
- var import_jsx_runtime2 = require("react/jsx-runtime");
108
- var FieldsetContext = (0, import_react2.createContext)({ hasError: false });
109
- var useFieldsetContext = () => (0, import_react2.useContext)(FieldsetContext);
110
- var Fieldset = (0, import_react2.forwardRef)(function Fieldset2(_a, ref) {
161
+ var import_jsx_runtime4 = require("react/jsx-runtime");
162
+ var FieldsetLegend = (0, import_react5.forwardRef)(
163
+ function FieldsetLegend2(_a, ref) {
164
+ var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
165
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
166
+ "legend",
167
+ __spreadValues({
168
+ className: (0, import_typed_classname2.clsx)("hds-fieldset__legend", className),
169
+ ref
170
+ }, rest)
171
+ );
172
+ }
173
+ );
174
+ FieldsetLegend.displayName = "Fieldset.Legend";
175
+
176
+ // src/form/fieldset/fieldset.tsx
177
+ var import_jsx_runtime5 = require("react/jsx-runtime");
178
+ var FieldsetContext = (0, import_react6.createContext)({
179
+ hasError: false,
180
+ size: ""
181
+ });
182
+ var useFieldsetContext = () => (0, import_react6.useContext)(FieldsetContext);
183
+ var Fieldset = (0, import_react6.forwardRef)(function Fieldset2(_a, ref) {
111
184
  var _b = _a, {
112
185
  className,
113
186
  style,
187
+ "data-color": dataColor = void 0,
188
+ validationMessage,
189
+ validationMessageProps,
114
190
  errorMessage,
115
191
  errorMessageProps,
116
- legendProps: _c = {}
117
- } = _b, _d = _c, { size: legendSize = "default", className: legendClassName } = _d, legendProps = __objRest(_d, ["size", "className"]), _e = _b, {
192
+ legendProps,
118
193
  legend,
194
+ size = "",
119
195
  children
120
- } = _e, rest = __objRest(_e, [
196
+ } = _b, rest = __objRest(_b, [
121
197
  "className",
122
198
  "style",
199
+ "data-color",
200
+ "validationMessage",
201
+ "validationMessageProps",
123
202
  "errorMessage",
124
203
  "errorMessageProps",
125
204
  "legendProps",
126
205
  "legend",
206
+ "size",
127
207
  "children"
128
208
  ]);
129
- const errorMessageId = (0, import_react2.useId)();
130
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
209
+ const validationMessageId = (0, import_react6.useId)();
210
+ const validationColor = errorMessage ? "error" : dataColor;
211
+ const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);
212
+ const childArray = import_react6.Children.toArray(children);
213
+ const legendChild = childArray.find(
214
+ (child) => (0, import_react6.isValidElement)(child) && child.type === FieldsetLegend
215
+ );
216
+ const contentChildren = legendChild ? childArray.filter((child) => child !== legendChild) : childArray;
217
+ let renderedLegend = null;
218
+ if (legendChild) {
219
+ renderedLegend = (0, import_react6.cloneElement)(legendChild, __spreadProps(__spreadValues(__spreadValues({}, legendProps), legendChild.props), {
220
+ className: (0, import_typed_classname3.clsx)(
221
+ legendProps == null ? void 0 : legendProps.className,
222
+ legendChild.props.className
223
+ )
224
+ }));
225
+ } else if (legend !== void 0) {
226
+ renderedLegend = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FieldsetLegend, __spreadProps(__spreadValues({}, legendProps), { children: legend }));
227
+ }
228
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
131
229
  "fieldset",
132
230
  __spreadProps(__spreadValues({
133
- "aria-describedby": errorMessage ? errorMessageId : void 0,
231
+ "aria-describedby": validationMessageValue ? validationMessageId : void 0,
134
232
  "aria-invalid": errorMessage ? true : void 0,
135
- className: (0, import_typed_classname2.clsx)("hds-fieldset", className),
233
+ className: (0, import_typed_classname3.clsx)("hds-fieldset", { [`hds-fieldset--${size}`]: size }, className),
234
+ "data-color": validationColor,
136
235
  ref,
137
236
  style
138
237
  }, rest), {
139
238
  children: [
140
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
141
- "legend",
239
+ renderedLegend,
240
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FieldsetContext.Provider, { value: { hasError: Boolean(errorMessage), size }, children: contentChildren }),
241
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
242
+ ValidationMessage,
142
243
  __spreadProps(__spreadValues({
143
- className: (0, import_typed_classname2.clsx)(
144
- "hds-fieldset__legend",
145
- { [`hds-fieldset__legend--${legendSize}`]: legendSize },
146
- legendClassName
147
- )
148
- }, legendProps), {
149
- children: legend
244
+ id: validationMessageId
245
+ }, validationMessageProps != null ? validationMessageProps : errorMessageProps), {
246
+ children: validationMessageValue
150
247
  })
151
- ),
152
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FieldsetContext.Provider, { value: { hasError: Boolean(errorMessage) }, children }),
153
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ErrorMessage, __spreadProps(__spreadValues({ id: errorMessageId }, errorMessageProps), { children: errorMessage }))
248
+ )
154
249
  ]
155
250
  })
156
251
  );
157
252
  });
253
+ Fieldset.Description = FieldsetDescription;
254
+ Fieldset.Legend = FieldsetLegend;
158
255
 
159
256
  // src/form/checkbox/checkbox.tsx
160
- var import_jsx_runtime3 = require("react/jsx-runtime");
161
- var Checkbox = (0, import_react3.forwardRef)(
257
+ var import_jsx_runtime6 = require("react/jsx-runtime");
258
+ var Checkbox = (0, import_react7.forwardRef)(
162
259
  (_a, ref) => {
163
260
  var _b = _a, {
164
261
  variant = "plain",
165
262
  hasError: hasErrorProp,
263
+ validationMessage,
264
+ validationMessageProps,
166
265
  errorMessage,
167
266
  errorMessageProps,
168
267
  title,
169
268
  children,
170
- className
269
+ className,
270
+ size = ""
171
271
  } = _b, rest = __objRest(_b, [
172
272
  "variant",
173
273
  "hasError",
274
+ "validationMessage",
275
+ "validationMessageProps",
174
276
  "errorMessage",
175
277
  "errorMessageProps",
176
278
  "title",
177
279
  "children",
178
- "className"
280
+ "className",
281
+ "size"
179
282
  ]);
180
- const errorMessageId = (0, import_react3.useId)();
181
- const { hasError: hasFieldsetError } = useFieldsetContext();
283
+ const validationMessageId = (0, import_react7.useId)();
284
+ const { hasError: hasFieldsetError, size: fieldsetSize } = useFieldsetContext();
182
285
  const hasError = !!errorMessage || hasFieldsetError || hasErrorProp;
183
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: (0, import_typed_classname3.clsx)("hds-checkbox-wrapper"), children: [
184
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
185
- "div",
186
- {
187
- className: (0, import_typed_classname3.clsx)(
188
- "hds-checkbox",
286
+ const effectiveSize = size || fieldsetSize;
287
+ const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);
288
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
289
+ "div",
290
+ {
291
+ className: (0, import_typed_classname4.clsx)("hds-checkbox-wrapper", {
292
+ "hds-checkbox-wrapper--small": effectiveSize === "small"
293
+ }),
294
+ children: [
295
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
296
+ "div",
189
297
  {
190
- [`hds-checkbox--${variant}`]: variant === "bounding-box",
191
- "hds-checkbox--error": hasError
192
- },
193
- className
194
- ),
195
- children: [
196
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { children: [
197
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
198
- "input",
199
- __spreadProps(__spreadValues({}, rest), {
200
- "aria-invalid": hasError ? true : void 0,
201
- "aria-describedby": errorMessage ? errorMessageId : void 0,
202
- ref,
203
- type: "checkbox"
204
- })
298
+ className: (0, import_typed_classname4.clsx)(
299
+ "hds-checkbox",
300
+ {
301
+ [`hds-checkbox--${variant}`]: variant === "bounding-box"
302
+ },
303
+ className
205
304
  ),
206
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { "aria-hidden": true, className: "hds-checkbox__checkmark" }),
207
- title ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "hds-checkbox__title", children: title }) : children
208
- ] }),
209
- title ? children : null
210
- ]
211
- }
212
- ),
213
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ErrorMessage, __spreadProps(__spreadValues({ id: errorMessageId }, errorMessageProps), { children: errorMessage }))
214
- ] });
305
+ children: [
306
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { children: [
307
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
308
+ "input",
309
+ __spreadValues({
310
+ "aria-invalid": hasError ? true : void 0,
311
+ "aria-describedby": validationMessageValue ? validationMessageId : void 0,
312
+ ref,
313
+ type: "checkbox"
314
+ }, rest)
315
+ ),
316
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { "aria-hidden": true, className: "hds-checkbox__checkmark" }),
317
+ title ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "hds-checkbox__title", children: title }) : children
318
+ ] }),
319
+ title ? children : null
320
+ ]
321
+ }
322
+ ),
323
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
324
+ ValidationMessage,
325
+ __spreadProps(__spreadValues({
326
+ id: validationMessageId
327
+ }, validationMessageProps != null ? validationMessageProps : errorMessageProps), {
328
+ children: validationMessageValue
329
+ })
330
+ )
331
+ ]
332
+ }
333
+ );
215
334
  }
216
335
  );
217
336
  Checkbox.displayName = "Checkbox";
218
337
 
219
338
  // src/form/date-picker/date-picker.tsx
220
- var import_react6 = require("react");
221
- var import_typed_classname5 = require("@postenbring/hedwig-css/typed-classname");
339
+ var import_react9 = require("react");
340
+ var import_typed_classname6 = require("@postenbring/hedwig-css/typed-classname");
222
341
 
223
342
  // src/form/input-group/input-group.tsx
224
- var import_react4 = require("react");
225
- var import_typed_classname4 = require("@postenbring/hedwig-css/typed-classname");
226
- var import_jsx_runtime4 = require("react/jsx-runtime");
227
- var InputGroup = (0, import_react4.forwardRef)(function InputGroup2(_a, ref) {
343
+ var import_react8 = require("react");
344
+ var import_typed_classname5 = require("@postenbring/hedwig-css/typed-classname");
345
+ var import_jsx_runtime7 = require("react/jsx-runtime");
346
+ var InputGroup = (0, import_react8.forwardRef)(function InputGroup2(_a, ref) {
228
347
  var _b = _a, {
229
348
  id,
230
349
  className,
231
350
  style,
351
+ "data-color": dataColor = void 0,
232
352
  size = "large",
353
+ validationMessage,
354
+ validationMessageProps,
233
355
  errorMessage,
234
356
  errorMessageProps,
235
357
  labelProps: _c = {}
@@ -242,7 +364,10 @@ var InputGroup = (0, import_react4.forwardRef)(function InputGroup2(_a, ref) {
242
364
  "id",
243
365
  "className",
244
366
  "style",
367
+ "data-color",
245
368
  "size",
369
+ "validationMessage",
370
+ "validationMessageProps",
246
371
  "errorMessage",
247
372
  "errorMessageProps",
248
373
  "labelProps",
@@ -251,93 +376,83 @@ var InputGroup = (0, import_react4.forwardRef)(function InputGroup2(_a, ref) {
251
376
  "readOnly",
252
377
  "children"
253
378
  ]);
254
- const errorMessageId = (0, import_react4.useId)();
255
- const inputId = (0, import_react4.useId)();
379
+ const validationMessageId = (0, import_react8.useId)();
380
+ const inputId = (0, import_react8.useId)();
381
+ const validationColor = errorMessage ? "error" : dataColor;
382
+ const validationMessageValue = getValidationMessageValue(validationMessage, errorMessage);
256
383
  const renderInput = () => {
257
384
  var _a2;
258
385
  const inputProps = {
259
- "aria-describedby": errorMessage ? errorMessageId : void 0,
386
+ "aria-describedby": validationMessage ? validationMessageId : void 0,
260
387
  "aria-invalid": errorMessage ? true : void 0,
261
388
  id: id != null ? id : inputId,
262
- className: (0, import_typed_classname4.clsx)("hds-input-group__input")
389
+ className: (0, import_typed_classname5.clsx)("hds-input-group__input")
263
390
  };
264
391
  if (typeof children === "function") {
265
392
  return children(inputProps);
266
393
  }
267
- const input = import_react4.Children.toArray(children)[0];
268
- if (!(0, import_react4.isValidElement)(input)) {
394
+ const input = import_react8.Children.toArray(children)[0];
395
+ if (!(0, import_react8.isValidElement)(input)) {
269
396
  return;
270
397
  }
271
- return (0, import_react4.cloneElement)(input, __spreadProps(__spreadValues(__spreadValues({}, inputProps), input.props), {
398
+ return (0, import_react8.cloneElement)(input, __spreadProps(__spreadValues(__spreadValues({}, inputProps), input.props), {
272
399
  className: `${inputProps.className} ${(_a2 = input.props.className) != null ? _a2 : ""}`
273
400
  }));
274
401
  };
275
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
402
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
276
403
  "div",
277
404
  __spreadProps(__spreadValues({
278
- className: (0, import_typed_classname4.clsx)(
405
+ className: (0, import_typed_classname5.clsx)(
279
406
  "hds-input-group",
280
407
  {
281
- [`hds-input-group--${size}`]: size,
282
- "hds-input-group--error": errorMessage
408
+ [`hds-input-group--${size}`]: size
283
409
  },
284
410
  className
285
411
  ),
286
412
  ref,
287
- style
413
+ style,
414
+ "data-color": validationColor
288
415
  }, rest), {
289
416
  children: [
290
- label !== null && label !== void 0 && label !== false && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
417
+ label !== null && label !== void 0 && label !== false && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
291
418
  "label",
292
419
  __spreadProps(__spreadValues({
293
- className: (0, import_typed_classname4.clsx)("hds-input-group__label", labelClassName)
420
+ className: (0, import_typed_classname5.clsx)("hds-input-group__label", labelClassName)
294
421
  }, labelProps), {
295
422
  htmlFor: id != null ? id : inputId,
296
423
  children: label
297
424
  })
298
425
  ),
299
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
426
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
300
427
  "div",
301
428
  {
302
- className: (0, import_typed_classname4.clsx)("hds-input-group__input-wrapper"),
429
+ className: (0, import_typed_classname5.clsx)("hds-input-group__input-wrapper"),
303
430
  "data-disabled": disabled,
304
431
  "data-readonly": readOnly,
305
432
  children: renderInput()
306
433
  }
307
434
  ),
308
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ErrorMessage, __spreadProps(__spreadValues({ id: errorMessageId }, errorMessageProps), { children: errorMessage }))
435
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
436
+ ValidationMessage,
437
+ __spreadProps(__spreadValues({
438
+ id: validationMessageId
439
+ }, validationMessageProps != null ? validationMessageProps : errorMessageProps), {
440
+ children: validationMessageValue
441
+ })
442
+ )
309
443
  ]
310
444
  })
311
445
  );
312
446
  });
313
447
 
314
- // src/utils/utils.ts
315
- var React = __toESM(require("react"));
316
- var import_react5 = require("react");
317
- function useMergeRefs(refs) {
318
- return React.useMemo(() => {
319
- if (refs.every((ref) => ref === null)) {
320
- return null;
321
- }
322
- return (value) => {
323
- refs.forEach((ref) => {
324
- if (typeof ref === "function") {
325
- ref(value);
326
- } else if (ref !== null) {
327
- ref.current = value;
328
- }
329
- });
330
- };
331
- }, refs);
332
- }
333
- var inertBooleanSupported = Number(import_react5.version.split(".")[0]) >= 19;
334
-
335
448
  // src/form/date-picker/date-picker.tsx
336
- var import_jsx_runtime5 = require("react/jsx-runtime");
337
- var DatePicker = (0, import_react6.forwardRef)(function DatePicker2(_a, ref) {
449
+ var import_jsx_runtime8 = require("react/jsx-runtime");
450
+ var DatePicker = (0, import_react9.forwardRef)(function DatePicker2(_a, ref) {
338
451
  var _b = _a, {
339
452
  className,
340
453
  size,
454
+ validationMessage,
455
+ validationMessageProps,
341
456
  errorMessage,
342
457
  labelProps,
343
458
  label,
@@ -345,10 +460,13 @@ var DatePicker = (0, import_react6.forwardRef)(function DatePicker2(_a, ref) {
345
460
  style,
346
461
  disabled,
347
462
  readOnly,
463
+ "data-color": dataColor,
348
464
  calendarButtonTitle = "\xC5pne kalender"
349
465
  } = _b, rest = __objRest(_b, [
350
466
  "className",
351
467
  "size",
468
+ "validationMessage",
469
+ "validationMessageProps",
352
470
  "errorMessage",
353
471
  "labelProps",
354
472
  "label",
@@ -356,15 +474,18 @@ var DatePicker = (0, import_react6.forwardRef)(function DatePicker2(_a, ref) {
356
474
  "style",
357
475
  "disabled",
358
476
  "readOnly",
477
+ "data-color",
359
478
  "calendarButtonTitle"
360
479
  ]);
361
- const inputRef = (0, import_react6.useRef)(null);
480
+ const inputRef = (0, import_react9.useRef)(null);
362
481
  const mergedRef = useMergeRefs([inputRef, ref]);
363
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
482
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
364
483
  InputGroup,
365
484
  {
366
- className: (0, import_typed_classname5.clsx)("hds-date-picker", className),
485
+ className: (0, import_typed_classname6.clsx)("hds-date-picker", className),
367
486
  disabled,
487
+ validationMessage,
488
+ validationMessageProps,
368
489
  errorMessage,
369
490
  id,
370
491
  label,
@@ -372,20 +493,21 @@ var DatePicker = (0, import_react6.forwardRef)(function DatePicker2(_a, ref) {
372
493
  readOnly,
373
494
  style,
374
495
  size,
375
- children: (inputProps) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
376
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
496
+ "data-color": dataColor,
497
+ children: (inputProps) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
498
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
377
499
  "input",
378
- __spreadProps(__spreadValues(__spreadValues({}, rest), inputProps), {
500
+ __spreadValues(__spreadProps(__spreadValues({}, inputProps), {
379
501
  disabled,
380
502
  readOnly,
381
503
  ref: mergedRef,
382
504
  type: "date"
383
- })
505
+ }), rest)
384
506
  ),
385
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
507
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
386
508
  "button",
387
509
  {
388
- className: (0, import_typed_classname5.clsx)("hds-date-picker__calendar-button"),
510
+ className: (0, import_typed_classname6.clsx)("hds-date-picker__calendar-button"),
389
511
  type: "button",
390
512
  title: calendarButtonTitle,
391
513
  onClick: () => {
@@ -401,17 +523,17 @@ var DatePicker = (0, import_react6.forwardRef)(function DatePicker2(_a, ref) {
401
523
  DatePicker.displayName = "DatePicker";
402
524
 
403
525
  // src/form/error-summary/error-summary.tsx
404
- var import_react10 = require("react");
405
- var import_typed_classname9 = require("@postenbring/hedwig-css/typed-classname");
526
+ var import_react13 = require("react");
527
+ var import_typed_classname10 = require("@postenbring/hedwig-css/typed-classname");
406
528
  var import_react_slot3 = require("@radix-ui/react-slot");
407
529
 
408
530
  // src/box/box.tsx
409
- var import_react7 = require("react");
410
- var import_typed_classname6 = require("@postenbring/hedwig-css/typed-classname");
531
+ var import_react10 = require("react");
532
+ var import_typed_classname7 = require("@postenbring/hedwig-css/typed-classname");
411
533
  var import_react_slot = require("@radix-ui/react-slot");
412
- var import_jsx_runtime6 = require("react/jsx-runtime");
534
+ var import_jsx_runtime9 = require("react/jsx-runtime");
413
535
  function CloseIcon() {
414
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { "aria-hidden": true, xmlns: "http://www.w3.org/2000/svg", width: 32, height: 32, viewBox: "0 0 32 32", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
536
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("svg", { "aria-hidden": true, xmlns: "http://www.w3.org/2000/svg", width: 32, height: 32, viewBox: "0 0 32 32", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
415
537
  "path",
416
538
  {
417
539
  d: "M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z",
@@ -419,17 +541,17 @@ function CloseIcon() {
419
541
  }
420
542
  ) });
421
543
  }
422
- var BoxCloseButton = (0, import_react7.forwardRef)(
544
+ var BoxCloseButton = (0, import_react10.forwardRef)(
423
545
  (_a, ref) => {
424
546
  var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
425
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
547
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
426
548
  "button",
427
549
  __spreadProps(__spreadValues({
428
- className: (0, import_typed_classname6.clsx)("hds-box__close-button", className),
550
+ className: (0, import_typed_classname7.clsx)("hds-box__close-button", className),
429
551
  ref,
430
552
  type: "button"
431
553
  }, rest), {
432
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CloseIcon, {})
554
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CloseIcon, {})
433
555
  })
434
556
  );
435
557
  }
@@ -447,7 +569,7 @@ var convertVariantToColor = (variant) => {
447
569
  return "neutral";
448
570
  }
449
571
  };
450
- var Box = (0, import_react7.forwardRef)(
572
+ var Box = (0, import_react10.forwardRef)(
451
573
  (_a, ref) => {
452
574
  var _b = _a, {
453
575
  "data-color": color = "",
@@ -470,8 +592,8 @@ var Box = (0, import_react7.forwardRef)(
470
592
  "children",
471
593
  "className"
472
594
  ]);
473
- const [closedState, setClosedState] = (0, import_react7.useState)(false);
474
- const onClose = (0, import_react7.useCallback)(() => {
595
+ const [closedState, setClosedState] = (0, import_react10.useState)(false);
596
+ const onClose = (0, import_react10.useCallback)(() => {
475
597
  if (onCloseProp) {
476
598
  const result = onCloseProp();
477
599
  if (result === true) {
@@ -484,11 +606,11 @@ var Box = (0, import_react7.forwardRef)(
484
606
  const closed = closedProp != null ? closedProp : closedState;
485
607
  const Component = asChild ? import_react_slot.Slot : "div";
486
608
  const resolvedColor = color && color !== "" ? color : convertVariantToColor(variant);
487
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
609
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
488
610
  Component,
489
611
  __spreadProps(__spreadValues({
490
612
  "data-color": resolvedColor,
491
- className: (0, import_typed_classname6.clsx)(
613
+ className: (0, import_typed_classname7.clsx)(
492
614
  "hds-box",
493
615
  { "hds-box--lighter": variant === "lighter" },
494
616
  { "hds-box--white": variant === "white" },
@@ -498,8 +620,8 @@ var Box = (0, import_react7.forwardRef)(
498
620
  ref
499
621
  }, rest), {
500
622
  children: [
501
- closeable ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
502
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_slot.Slottable, { children })
623
+ closeable ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
624
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_slot.Slottable, { children })
503
625
  ]
504
626
  })
505
627
  );
@@ -509,17 +631,17 @@ Box.displayName = "Box";
509
631
  Box.CloseButton = BoxCloseButton;
510
632
 
511
633
  // src/list/list.tsx
512
- var import_react8 = require("react");
513
- var import_typed_classname7 = require("@postenbring/hedwig-css/typed-classname");
514
- var import_jsx_runtime7 = require("react/jsx-runtime");
515
- var UnorderedList = (0, import_react8.forwardRef)(
634
+ var import_react11 = require("react");
635
+ var import_typed_classname8 = require("@postenbring/hedwig-css/typed-classname");
636
+ var import_jsx_runtime10 = require("react/jsx-runtime");
637
+ var UnorderedList = (0, import_react11.forwardRef)(
516
638
  (_a, ref) => {
517
639
  var _b = _a, { size = "default", className } = _b, rest = __objRest(_b, ["size", "className"]);
518
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
640
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
519
641
  "ul",
520
642
  __spreadValues({
521
643
  ref,
522
- className: (0, import_typed_classname7.clsx)(
644
+ className: (0, import_typed_classname8.clsx)(
523
645
  "hds-list",
524
646
  size !== "default" && `hds-list--${size}`,
525
647
  className
@@ -529,14 +651,14 @@ var UnorderedList = (0, import_react8.forwardRef)(
529
651
  }
530
652
  );
531
653
  UnorderedList.displayName = "UnorderedList";
532
- var OrderedList = (0, import_react8.forwardRef)(
654
+ var OrderedList = (0, import_react11.forwardRef)(
533
655
  (_a, ref) => {
534
656
  var _b = _a, { size = "medium", className } = _b, rest = __objRest(_b, ["size", "className"]);
535
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
657
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
536
658
  "ol",
537
659
  __spreadValues({
538
660
  ref,
539
- className: (0, import_typed_classname7.clsx)(
661
+ className: (0, import_typed_classname8.clsx)(
540
662
  "hds-list",
541
663
  size !== "default" && `hds-list--${size}`,
542
664
  className
@@ -549,18 +671,18 @@ OrderedList.displayName = "OrderedList";
549
671
 
550
672
  // src/link/link.tsx
551
673
  var React2 = require("react");
552
- var import_typed_classname8 = require("@postenbring/hedwig-css/typed-classname");
553
- var import_react9 = require("react");
674
+ var import_typed_classname9 = require("@postenbring/hedwig-css/typed-classname");
675
+ var import_react12 = require("react");
554
676
  var import_react_slot2 = require("@radix-ui/react-slot");
555
- var import_jsx_runtime8 = require("react/jsx-runtime");
556
- var Link = (0, import_react9.forwardRef)(
677
+ var import_jsx_runtime11 = require("react/jsx-runtime");
678
+ var Link = (0, import_react12.forwardRef)(
557
679
  (_a, ref) => {
558
680
  var _b = _a, { asChild, children, variant = "underline", size = "default", icon, className } = _b, rest = __objRest(_b, ["asChild", "children", "variant", "size", "icon", "className"]);
559
681
  const Component = asChild ? import_react_slot2.Slot : "a";
560
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
682
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
561
683
  Component,
562
684
  __spreadProps(__spreadValues({
563
- className: (0, import_typed_classname8.clsx)(
685
+ className: (0, import_typed_classname9.clsx)(
564
686
  "hds-link",
565
687
  variant !== "underline" && `hds-link--${variant}`,
566
688
  size !== "default" && `hds-link--${size}`,
@@ -619,30 +741,30 @@ function labelForInput(input) {
619
741
  }
620
742
 
621
743
  // src/form/error-summary/error-summary.tsx
622
- var import_jsx_runtime9 = require("react/jsx-runtime");
623
- var ErrorSummaryHeading = (0, import_react10.forwardRef)((_a, ref) => {
744
+ var import_jsx_runtime12 = require("react/jsx-runtime");
745
+ var ErrorSummaryHeading = (0, import_react13.forwardRef)((_a, ref) => {
624
746
  var _b = _a, { asChild, children, as: Tag, autoFocus = true } = _b, rest = __objRest(_b, ["asChild", "children", "as", "autoFocus"]);
625
- const focusRef = (0, import_react10.useRef)(null);
747
+ const focusRef = (0, import_react13.useRef)(null);
626
748
  const mergedRef = useMergeRefs([focusRef, ref]);
627
749
  const Component = asChild ? import_react_slot3.Slot : Tag;
628
- (0, import_react10.useEffect)(() => {
750
+ (0, import_react13.useEffect)(() => {
629
751
  setTimeout(() => {
630
752
  if (focusRef.current && autoFocus) {
631
753
  focusRef.current.focus();
632
754
  }
633
755
  });
634
756
  }, []);
635
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Component, __spreadProps(__spreadValues({ className: (0, import_typed_classname9.clsx)(`hds-error-summary__title`), ref: mergedRef, tabIndex: -1 }, rest), { children }));
757
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Component, __spreadProps(__spreadValues({ className: (0, import_typed_classname10.clsx)(`hds-error-summary__title`), ref: mergedRef, tabIndex: -1 }, rest), { children }));
636
758
  });
637
759
  ErrorSummaryHeading.displayName = "ErrorSummary.Heading";
638
- var ErrorSummaryList = (0, import_react10.forwardRef)(
760
+ var ErrorSummaryList = (0, import_react13.forwardRef)(
639
761
  (_a, ref) => {
640
762
  var _b = _a, { children, size = "small" } = _b, rest = __objRest(_b, ["children", "size"]);
641
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(UnorderedList, __spreadProps(__spreadValues({ size, ref }, rest), { children }));
763
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(UnorderedList, __spreadProps(__spreadValues({ size, ref }, rest), { children }));
642
764
  }
643
765
  );
644
766
  ErrorSummaryList.displayName = "ErrorSummary.List";
645
- var ErrorSummaryItem = (0, import_react10.forwardRef)(
767
+ var ErrorSummaryItem = (0, import_react13.forwardRef)(
646
768
  (_a, ref) => {
647
769
  var _b = _a, { children, href, linkProps } = _b, rest = __objRest(_b, ["children", "href", "linkProps"]);
648
770
  function onClick(e) {
@@ -652,20 +774,20 @@ var ErrorSummaryItem = (0, import_react10.forwardRef)(
652
774
  e.preventDefault();
653
775
  }
654
776
  }
655
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("li", __spreadProps(__spreadValues({ className: (0, import_typed_classname9.clsx)(`hds-error-summary__list-item`), ref }, rest), { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Link, __spreadProps(__spreadValues({ size: "small", href, variant: "solid" }, linkProps), { onClick, children })) }));
777
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", __spreadProps(__spreadValues({ className: (0, import_typed_classname10.clsx)(`hds-error-summary__list-item`), ref }, rest), { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Link, __spreadProps(__spreadValues({ size: "small", href, variant: "solid" }, linkProps), { onClick, children })) }));
656
778
  }
657
779
  );
658
780
  ErrorSummaryItem.displayName = "ErrorSummary.Item";
659
- var ErrorSummary = (0, import_react10.forwardRef)(
781
+ var ErrorSummary = (0, import_react13.forwardRef)(
660
782
  (_a, ref) => {
661
783
  var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
662
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
784
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
663
785
  Box,
664
786
  __spreadProps(__spreadValues({
665
787
  "data-color": "error",
666
788
  ref
667
789
  }, rest), {
668
- className: (0, import_typed_classname9.clsx)(`hds-error-summary`, className),
790
+ className: (0, import_typed_classname10.clsx)(`hds-error-summary`, className),
669
791
  children
670
792
  })
671
793
  );
@@ -677,52 +799,80 @@ ErrorSummary.List = ErrorSummaryList;
677
799
  ErrorSummary.Item = ErrorSummaryItem;
678
800
 
679
801
  // src/form/input/input.tsx
680
- var import_react11 = require("react");
681
- var import_typed_classname10 = require("@postenbring/hedwig-css/typed-classname");
682
- var import_jsx_runtime10 = require("react/jsx-runtime");
683
- var Input = (0, import_react11.forwardRef)(function Input2(_a, ref) {
684
- 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"]);
685
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
686
- InputGroup,
687
- {
688
- className: (0, import_typed_classname10.clsx)("hds-input", className),
689
- disabled,
802
+ var import_react14 = require("react");
803
+ var import_typed_classname11 = require("@postenbring/hedwig-css/typed-classname");
804
+ var import_jsx_runtime13 = require("react/jsx-runtime");
805
+ var Input = (0, import_react14.forwardRef)(
806
+ (_a, ref) => {
807
+ var _b = _a, {
808
+ className,
809
+ size,
810
+ validationMessage,
690
811
  errorMessage,
691
- id,
692
- label,
693
812
  labelProps,
694
- readOnly,
813
+ label,
814
+ id,
695
815
  style,
696
- size,
697
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("input", __spreadProps(__spreadValues({}, rest), { disabled, readOnly, ref }))
698
- }
699
- );
700
- });
816
+ disabled,
817
+ readOnly,
818
+ "data-color": dataColor
819
+ } = _b, rest = __objRest(_b, [
820
+ "className",
821
+ "size",
822
+ "validationMessage",
823
+ "errorMessage",
824
+ "labelProps",
825
+ "label",
826
+ "id",
827
+ "style",
828
+ "disabled",
829
+ "readOnly",
830
+ "data-color"
831
+ ]);
832
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
833
+ InputGroup,
834
+ {
835
+ className: (0, import_typed_classname11.clsx)("hds-input", className),
836
+ disabled,
837
+ validationMessage,
838
+ errorMessage,
839
+ id,
840
+ label,
841
+ labelProps,
842
+ readOnly,
843
+ style,
844
+ size,
845
+ "data-color": dataColor,
846
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("input", __spreadValues({ disabled, readOnly, ref }, rest))
847
+ }
848
+ );
849
+ }
850
+ );
701
851
  Input.displayName = "Input";
702
852
 
703
853
  // src/form/radio-button/radio-button.tsx
704
- var import_react13 = require("react");
705
- var import_typed_classname11 = require("@postenbring/hedwig-css/typed-classname");
854
+ var import_react16 = require("react");
855
+ var import_typed_classname12 = require("@postenbring/hedwig-css/typed-classname");
706
856
 
707
857
  // src/form/radio-button/radio-group.tsx
708
- var import_react12 = require("react");
709
- var import_jsx_runtime11 = require("react/jsx-runtime");
710
- var RadioGroupContext = (0, import_react12.createContext)({
858
+ var import_react15 = require("react");
859
+ var import_jsx_runtime14 = require("react/jsx-runtime");
860
+ var RadioGroupContext = (0, import_react15.createContext)({
711
861
  name: void 0,
712
- hasError: false,
713
- onChange: () => {
714
- return void 0;
715
- }
862
+ onChange: () => void 0,
863
+ size: void 0
716
864
  });
717
- var useRadioGroupContext = () => (0, import_react12.useContext)(RadioGroupContext);
718
- var RadioGroup = (0, import_react12.forwardRef)(function RadioGroup2(_a, ref) {
719
- var _b = _a, { name, value, errorMessage, onChange, children } = _b, rest = __objRest(_b, ["name", "value", "errorMessage", "onChange", "children"]);
720
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(RadioGroupContext.Provider, { value: { name, value, hasError: Boolean(errorMessage), onChange }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Fieldset, __spreadProps(__spreadValues({ errorMessage }, rest), { ref, children })) });
865
+ var useRadioGroupContext = () => (0, import_react15.useContext)(RadioGroupContext);
866
+ var RadioGroup = (0, import_react15.forwardRef)(function RadioGroup2(_a, ref) {
867
+ var _b = _a, { name, value, onChange, children, size } = _b, rest = __objRest(_b, ["name", "value", "onChange", "children", "size"]);
868
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RadioGroupContext.Provider, { value: { name, value, onChange, size }, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Fieldset, __spreadProps(__spreadValues({ size }, rest), { ref, children })) });
721
869
  });
870
+ RadioGroup.Description = FieldsetDescription;
871
+ RadioGroup.Legend = FieldsetLegend;
722
872
  RadioGroup.displayName = "RadioGroup";
723
873
 
724
874
  // src/form/radio-button/radio-button.tsx
725
- var import_jsx_runtime12 = require("react/jsx-runtime");
875
+ var import_jsx_runtime15 = require("react/jsx-runtime");
726
876
  var isChecked = ({
727
877
  checked,
728
878
  selectedValue,
@@ -732,48 +882,25 @@ var isChecked = ({
732
882
  if (typeof selectedValue !== "undefined") return value === selectedValue;
733
883
  return void 0;
734
884
  };
735
- var RadioButton = (0, import_react13.forwardRef)(
885
+ var RadioButton = (0, import_react16.forwardRef)(
736
886
  (_a, ref) => {
737
- var _b = _a, {
738
- checked,
739
- value,
740
- variant = "plain",
741
- hasError: hasErrorProp,
742
- title,
743
- children,
744
- className
745
- } = _b, rest = __objRest(_b, [
746
- "checked",
747
- "value",
748
- "variant",
749
- "hasError",
750
- "title",
751
- "children",
752
- "className"
753
- ]);
754
- const _a2 = useRadioGroupContext(), {
755
- value: selectedValue,
756
- hasError: hasRadioGroupError
757
- } = _a2, context = __objRest(_a2, [
758
- "value",
759
- "hasError"
760
- ]);
761
- const { hasError: hasFieldsetError } = useFieldsetContext();
762
- const hasError = hasFieldsetError || hasRadioGroupError || hasErrorProp;
763
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
887
+ var _b = _a, { checked, value, variant = "plain", title, children, className, size = "" } = _b, rest = __objRest(_b, ["checked", "value", "variant", "title", "children", "className", "size"]);
888
+ const _a2 = useRadioGroupContext(), { value: selectedValue, size: groupSize } = _a2, context = __objRest(_a2, ["value", "size"]);
889
+ const effectiveSize = size || groupSize;
890
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
764
891
  "div",
765
892
  {
766
- className: (0, import_typed_classname11.clsx)(
893
+ className: (0, import_typed_classname12.clsx)(
767
894
  "hds-radio-button",
768
895
  {
769
896
  [`hds-radio-button--${variant}`]: variant === "bounding-box",
770
- "hds-radio-button--error": hasError
897
+ [`hds-radio-button--${effectiveSize}`]: effectiveSize === "small"
771
898
  },
772
899
  className
773
900
  ),
774
901
  children: [
775
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("label", { children: [
776
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
902
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { children: [
903
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
777
904
  "input",
778
905
  __spreadProps(__spreadValues(__spreadValues({}, context), rest), {
779
906
  checked: isChecked({ checked, selectedValue, value }),
@@ -782,8 +909,8 @@ var RadioButton = (0, import_react13.forwardRef)(
782
909
  type: "radio"
783
910
  })
784
911
  ),
785
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { "aria-hidden": true, className: "hds-radio-button__checkmark" }),
786
- title ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "hds-radio-button__title", children: title }) : children
912
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": true, className: "hds-radio-button__checkmark" }),
913
+ title ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { className: "hds-radio-button__title", children: title }) : children
787
914
  ] }),
788
915
  title ? children : null
789
916
  ]
@@ -794,59 +921,110 @@ var RadioButton = (0, import_react13.forwardRef)(
794
921
  RadioButton.displayName = "RadioButton";
795
922
 
796
923
  // src/form/search-wrapper/search-wrapper.tsx
797
- var import_react14 = require("react");
798
- var import_typed_classname12 = require("@postenbring/hedwig-css/typed-classname");
799
- var import_jsx_runtime13 = require("react/jsx-runtime");
800
- var SearchWrapper = (0, import_react14.forwardRef)(function SearchWrapper2(_a, ref) {
801
- var _b = _a, { id, className, style, children } = _b, rest = __objRest(_b, ["id", "className", "style", "children"]);
802
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
803
- "div",
804
- __spreadProps(__spreadValues({
805
- id,
806
- className: (0, import_typed_classname12.clsx)("hds-search-wrapper", className),
807
- ref,
808
- style
809
- }, rest), {
810
- children
811
- })
812
- );
813
- });
924
+ var import_react17 = require("react");
925
+ var import_typed_classname13 = require("@postenbring/hedwig-css/typed-classname");
926
+ var import_jsx_runtime16 = require("react/jsx-runtime");
927
+ var SearchWrapper = (0, import_react17.forwardRef)(
928
+ (_a, ref) => {
929
+ var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
930
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", __spreadValues({ className: (0, import_typed_classname13.clsx)("hds-search-wrapper", className), ref }, rest));
931
+ }
932
+ );
814
933
  SearchWrapper.displayName = "SearchWrapper";
815
934
 
816
935
  // src/form/select/select.tsx
817
- var import_react15 = require("react");
818
- var import_typed_classname13 = require("@postenbring/hedwig-css/typed-classname");
819
- var import_jsx_runtime14 = require("react/jsx-runtime");
820
- var Select = (0, import_react15.forwardRef)(function Select2(_a, ref) {
821
- var _b = _a, { className, size, errorMessage, labelProps, label, id, style, disabled, children } = _b, rest = __objRest(_b, ["className", "size", "errorMessage", "labelProps", "label", "id", "style", "disabled", "children"]);
822
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
823
- InputGroup,
824
- {
825
- className: (0, import_typed_classname13.clsx)("hds-select", className),
826
- disabled,
936
+ var import_react18 = require("react");
937
+ var import_typed_classname14 = require("@postenbring/hedwig-css/typed-classname");
938
+ var import_jsx_runtime17 = require("react/jsx-runtime");
939
+ var Select = (0, import_react18.forwardRef)(
940
+ (_a, ref) => {
941
+ var _b = _a, {
942
+ className,
943
+ size,
944
+ validationMessage,
945
+ validationMessageProps,
827
946
  errorMessage,
828
- id,
829
- label,
830
947
  labelProps,
948
+ label,
949
+ id,
831
950
  style,
832
- size,
833
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("select", __spreadProps(__spreadValues({}, rest), { disabled, ref, children }))
834
- }
835
- );
836
- });
951
+ disabled,
952
+ "data-color": dataColor,
953
+ children
954
+ } = _b, rest = __objRest(_b, [
955
+ "className",
956
+ "size",
957
+ "validationMessage",
958
+ "validationMessageProps",
959
+ "errorMessage",
960
+ "labelProps",
961
+ "label",
962
+ "id",
963
+ "style",
964
+ "disabled",
965
+ "data-color",
966
+ "children"
967
+ ]);
968
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
969
+ InputGroup,
970
+ {
971
+ className: (0, import_typed_classname14.clsx)("hds-select", className),
972
+ disabled,
973
+ validationMessage,
974
+ validationMessageProps,
975
+ errorMessage,
976
+ id,
977
+ label,
978
+ labelProps,
979
+ style,
980
+ size,
981
+ "data-color": dataColor,
982
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("select", __spreadProps(__spreadValues({ disabled, ref }, rest), { children }))
983
+ }
984
+ );
985
+ }
986
+ );
837
987
  Select.displayName = "Select";
838
988
 
839
989
  // src/form/textarea/textarea.tsx
840
- var import_react16 = require("react");
841
- var import_typed_classname14 = require("@postenbring/hedwig-css/typed-classname");
842
- var import_jsx_runtime15 = require("react/jsx-runtime");
843
- var Textarea = (0, import_react16.forwardRef)(function Textarea2(_a, ref) {
844
- 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"]);
845
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
990
+ var import_react19 = require("react");
991
+ var import_typed_classname15 = require("@postenbring/hedwig-css/typed-classname");
992
+ var import_jsx_runtime18 = require("react/jsx-runtime");
993
+ var Textarea = (0, import_react19.forwardRef)(function Textarea2(_a, ref) {
994
+ var _b = _a, {
995
+ className,
996
+ size,
997
+ validationMessage,
998
+ validationMessageProps,
999
+ errorMessage,
1000
+ labelProps,
1001
+ label,
1002
+ id,
1003
+ style,
1004
+ disabled,
1005
+ readOnly,
1006
+ "data-color": dataColor
1007
+ } = _b, rest = __objRest(_b, [
1008
+ "className",
1009
+ "size",
1010
+ "validationMessage",
1011
+ "validationMessageProps",
1012
+ "errorMessage",
1013
+ "labelProps",
1014
+ "label",
1015
+ "id",
1016
+ "style",
1017
+ "disabled",
1018
+ "readOnly",
1019
+ "data-color"
1020
+ ]);
1021
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
846
1022
  InputGroup,
847
1023
  {
848
- className: (0, import_typed_classname14.clsx)("hds-textarea", className),
1024
+ className: (0, import_typed_classname15.clsx)("hds-textarea", className),
849
1025
  disabled,
1026
+ validationMessage,
1027
+ validationMessageProps,
850
1028
  errorMessage,
851
1029
  id,
852
1030
  label,
@@ -854,7 +1032,8 @@ var Textarea = (0, import_react16.forwardRef)(function Textarea2(_a, ref) {
854
1032
  readOnly,
855
1033
  style,
856
1034
  size,
857
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("textarea", __spreadProps(__spreadValues({}, rest), { disabled, readOnly, ref }))
1035
+ "data-color": dataColor,
1036
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("textarea", __spreadValues({ disabled, readOnly, ref }, rest))
858
1037
  }
859
1038
  );
860
1039
  });
@@ -866,12 +1045,15 @@ Textarea.displayName = "Textarea";
866
1045
  ErrorMessage,
867
1046
  ErrorSummary,
868
1047
  Fieldset,
1048
+ FieldsetDescription,
1049
+ FieldsetLegend,
869
1050
  Input,
870
1051
  RadioButton,
871
1052
  RadioGroup,
872
1053
  SearchWrapper,
873
1054
  Select,
874
1055
  Textarea,
1056
+ ValidationMessage,
875
1057
  useFieldsetContext,
876
1058
  useRadioGroupContext
877
1059
  });