@postenbring/hedwig-react 4.1.2 → 4.2.0

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