@postenbring/hedwig-react 1.2.1 → 1.3.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 (175) hide show
  1. package/dist/accordion/accordion-content.d.ts.map +1 -1
  2. package/dist/accordion/accordion-content.js +0 -1
  3. package/dist/accordion/accordion-content.js.map +1 -1
  4. package/dist/accordion/accordion-content.mjs +1 -1
  5. package/dist/accordion/accordion.js +0 -1
  6. package/dist/accordion/accordion.js.map +1 -1
  7. package/dist/accordion/accordion.mjs +2 -2
  8. package/dist/accordion/index.js +0 -1
  9. package/dist/accordion/index.js.map +1 -1
  10. package/dist/accordion/index.mjs +2 -2
  11. package/dist/{chunk-JZXZYEPG.mjs → chunk-5FWY7FIX.mjs} +1 -2
  12. package/dist/chunk-5FWY7FIX.mjs.map +1 -0
  13. package/dist/{chunk-ROQH67YP.mjs → chunk-6DWIJEHQ.mjs} +2 -2
  14. package/dist/{chunk-6BXKRPR3.mjs → chunk-AXEAIXG7.mjs} +2 -2
  15. package/dist/{chunk-QRGGURVO.mjs → chunk-BO3EWZGA.mjs} +6 -4
  16. package/dist/chunk-BO3EWZGA.mjs.map +1 -0
  17. package/dist/{chunk-TWUAXAMR.mjs → chunk-BYFBK3J7.mjs} +1 -1
  18. package/dist/chunk-BYFBK3J7.mjs.map +1 -0
  19. package/dist/chunk-CKAL5ZJZ.mjs +45 -0
  20. package/dist/chunk-CKAL5ZJZ.mjs.map +1 -0
  21. package/dist/{chunk-CXX4SXJG.mjs → chunk-CKG2XRMX.mjs} +2 -2
  22. package/dist/{chunk-YS7HBWOI.mjs → chunk-E6OOFTRQ.mjs} +2 -2
  23. package/dist/{chunk-6SVLMQUW.mjs → chunk-FUIKSOJF.mjs} +4 -4
  24. package/dist/{chunk-WUPLEZEY.mjs → chunk-GVO57ZWU.mjs} +2 -2
  25. package/dist/{chunk-UL2V2Z5B.mjs → chunk-HEDGKRGC.mjs} +3 -3
  26. package/dist/chunk-IJSEJZ3W.mjs +1 -0
  27. package/dist/{chunk-S3QSGJX2.mjs → chunk-ITLZQ47H.mjs} +2 -2
  28. package/dist/{chunk-NIYDN3Y3.mjs → chunk-JEAGKB4V.mjs} +2 -2
  29. package/dist/chunk-KPPLVGZ3.mjs +1 -0
  30. package/dist/chunk-KPPLVGZ3.mjs.map +1 -0
  31. package/dist/{chunk-CC5QWW52.mjs → chunk-LHIG6RW7.mjs} +2 -2
  32. package/dist/chunk-LHIG6RW7.mjs.map +1 -0
  33. package/dist/{chunk-YQMTDQSQ.mjs → chunk-TC5PD4TA.mjs} +4 -4
  34. package/dist/chunk-VU2GCAM4.mjs +81 -0
  35. package/dist/chunk-VU2GCAM4.mjs.map +1 -0
  36. package/dist/{chunk-5UGT7L7R.mjs → chunk-XZ43OSZ5.mjs} +5 -3
  37. package/dist/chunk-XZ43OSZ5.mjs.map +1 -0
  38. package/dist/{chunk-JQGB77SS.mjs → chunk-Z2ZPTZ6F.mjs} +5 -3
  39. package/dist/chunk-Z2ZPTZ6F.mjs.map +1 -0
  40. package/dist/footer/footer.js +0 -1
  41. package/dist/footer/footer.js.map +1 -1
  42. package/dist/footer/footer.mjs +3 -3
  43. package/dist/footer/index.js +0 -1
  44. package/dist/footer/index.js.map +1 -1
  45. package/dist/footer/index.mjs +3 -3
  46. package/dist/form/checkbox/checkbox.d.ts +2 -0
  47. package/dist/form/checkbox/checkbox.d.ts.map +1 -1
  48. package/dist/form/checkbox/checkbox.js +7 -3
  49. package/dist/form/checkbox/checkbox.js.map +1 -1
  50. package/dist/form/checkbox/checkbox.mjs +3 -3
  51. package/dist/form/checkbox/index.js +7 -3
  52. package/dist/form/checkbox/index.js.map +1 -1
  53. package/dist/form/checkbox/index.mjs +3 -3
  54. package/dist/form/date-picker/date-picker.js +4 -2
  55. package/dist/form/date-picker/date-picker.js.map +1 -1
  56. package/dist/form/date-picker/date-picker.mjs +3 -3
  57. package/dist/form/date-picker/index.js +4 -2
  58. package/dist/form/date-picker/index.js.map +1 -1
  59. package/dist/form/date-picker/index.mjs +3 -3
  60. package/dist/form/error-message/error-message.js +1 -1
  61. package/dist/form/error-message/error-message.js.map +1 -1
  62. package/dist/form/error-message/error-message.mjs +1 -1
  63. package/dist/form/error-message/index.js +1 -1
  64. package/dist/form/error-message/index.js.map +1 -1
  65. package/dist/form/error-message/index.mjs +1 -1
  66. package/dist/form/error-summary/error-summary.d.ts +65 -0
  67. package/dist/form/error-summary/error-summary.d.ts.map +1 -0
  68. package/dist/form/error-summary/error-summary.js +379 -0
  69. package/dist/form/error-summary/error-summary.js.map +1 -0
  70. package/dist/form/error-summary/error-summary.mjs +26 -0
  71. package/dist/form/error-summary/error-summary.mjs.map +1 -0
  72. package/dist/form/error-summary/focus.d.ts +9 -0
  73. package/dist/form/error-summary/focus.d.ts.map +1 -0
  74. package/dist/form/error-summary/focus.js +69 -0
  75. package/dist/form/error-summary/focus.js.map +1 -0
  76. package/dist/form/error-summary/focus.mjs +8 -0
  77. package/dist/form/error-summary/focus.mjs.map +1 -0
  78. package/dist/form/error-summary/index.d.ts +3 -0
  79. package/dist/form/error-summary/index.d.ts.map +1 -0
  80. package/dist/form/error-summary/index.js +375 -0
  81. package/dist/form/error-summary/index.js.map +1 -0
  82. package/dist/form/error-summary/index.mjs +21 -0
  83. package/dist/form/error-summary/index.mjs.map +1 -0
  84. package/dist/form/fieldset/fieldset.d.ts +2 -0
  85. package/dist/form/fieldset/fieldset.d.ts.map +1 -1
  86. package/dist/form/fieldset/fieldset.js +4 -2
  87. package/dist/form/fieldset/fieldset.js.map +1 -1
  88. package/dist/form/fieldset/fieldset.mjs +2 -2
  89. package/dist/form/fieldset/index.js +4 -2
  90. package/dist/form/fieldset/index.js.map +1 -1
  91. package/dist/form/fieldset/index.mjs +2 -2
  92. package/dist/form/index.d.ts +1 -0
  93. package/dist/form/index.d.ts.map +1 -1
  94. package/dist/form/index.js +333 -39
  95. package/dist/form/index.js.map +1 -1
  96. package/dist/form/index.mjs +30 -14
  97. package/dist/form/input/index.js +4 -2
  98. package/dist/form/input/index.js.map +1 -1
  99. package/dist/form/input/index.mjs +3 -3
  100. package/dist/form/input/input.js +4 -2
  101. package/dist/form/input/input.js.map +1 -1
  102. package/dist/form/input/input.mjs +3 -3
  103. package/dist/form/input-group/index.js +4 -2
  104. package/dist/form/input-group/index.js.map +1 -1
  105. package/dist/form/input-group/index.mjs +2 -2
  106. package/dist/form/input-group/input-group.d.ts +2 -0
  107. package/dist/form/input-group/input-group.d.ts.map +1 -1
  108. package/dist/form/input-group/input-group.js +4 -2
  109. package/dist/form/input-group/input-group.js.map +1 -1
  110. package/dist/form/input-group/input-group.mjs +2 -2
  111. package/dist/form/radio-button/index.js +4 -2
  112. package/dist/form/radio-button/index.js.map +1 -1
  113. package/dist/form/radio-button/index.mjs +4 -4
  114. package/dist/form/radio-button/radio-button.js +4 -2
  115. package/dist/form/radio-button/radio-button.js.map +1 -1
  116. package/dist/form/radio-button/radio-button.mjs +4 -4
  117. package/dist/form/radio-button/radio-group.js +4 -2
  118. package/dist/form/radio-button/radio-group.js.map +1 -1
  119. package/dist/form/radio-button/radio-group.mjs +3 -3
  120. package/dist/form/select/index.js +4 -2
  121. package/dist/form/select/index.js.map +1 -1
  122. package/dist/form/select/index.mjs +3 -3
  123. package/dist/form/select/select.js +4 -2
  124. package/dist/form/select/select.js.map +1 -1
  125. package/dist/form/select/select.mjs +3 -3
  126. package/dist/form/textarea/index.js +4 -2
  127. package/dist/form/textarea/index.js.map +1 -1
  128. package/dist/form/textarea/index.mjs +3 -3
  129. package/dist/form/textarea/textarea.js +4 -2
  130. package/dist/form/textarea/textarea.js.map +1 -1
  131. package/dist/form/textarea/textarea.mjs +3 -3
  132. package/dist/index.js +573 -474
  133. package/dist/index.js.map +1 -1
  134. package/dist/index.mjs +54 -48
  135. package/dist/layout/grid/grid.mjs +2 -2
  136. package/dist/layout/grid/index.mjs +2 -2
  137. package/dist/layout/index.mjs +6 -6
  138. package/dist/layout/stack/index.mjs +2 -2
  139. package/dist/layout/stack/stack.mjs +2 -2
  140. package/dist/message/index.js.map +1 -1
  141. package/dist/message/index.mjs +1 -1
  142. package/dist/message/message.d.ts +2 -2
  143. package/dist/message/message.d.ts.map +1 -1
  144. package/dist/message/message.js.map +1 -1
  145. package/dist/message/message.mjs +1 -1
  146. package/package.json +5 -5
  147. package/src/accordion/accordion-content.tsx +0 -1
  148. package/src/form/checkbox/checkbox.tsx +6 -2
  149. package/src/form/error-message/error-message.tsx +1 -1
  150. package/src/form/error-summary/error-summary.stories.tsx +29 -0
  151. package/src/form/error-summary/error-summary.tsx +151 -0
  152. package/src/form/error-summary/focus.ts +66 -0
  153. package/src/form/error-summary/index.tsx +2 -0
  154. package/src/form/fieldset/fieldset.tsx +6 -2
  155. package/src/form/index.tsx +1 -0
  156. package/src/form/input-group/input-group.tsx +6 -2
  157. package/src/message/message.tsx +2 -2
  158. package/dist/chunk-5UGT7L7R.mjs.map +0 -1
  159. package/dist/chunk-CC5QWW52.mjs.map +0 -1
  160. package/dist/chunk-JQGB77SS.mjs.map +0 -1
  161. package/dist/chunk-JZXZYEPG.mjs.map +0 -1
  162. package/dist/chunk-QRGGURVO.mjs.map +0 -1
  163. package/dist/chunk-TWUAXAMR.mjs.map +0 -1
  164. package/dist/chunk-XFKD6EEJ.mjs +0 -1
  165. /package/dist/{chunk-ROQH67YP.mjs.map → chunk-6DWIJEHQ.mjs.map} +0 -0
  166. /package/dist/{chunk-6BXKRPR3.mjs.map → chunk-AXEAIXG7.mjs.map} +0 -0
  167. /package/dist/{chunk-CXX4SXJG.mjs.map → chunk-CKG2XRMX.mjs.map} +0 -0
  168. /package/dist/{chunk-YS7HBWOI.mjs.map → chunk-E6OOFTRQ.mjs.map} +0 -0
  169. /package/dist/{chunk-6SVLMQUW.mjs.map → chunk-FUIKSOJF.mjs.map} +0 -0
  170. /package/dist/{chunk-WUPLEZEY.mjs.map → chunk-GVO57ZWU.mjs.map} +0 -0
  171. /package/dist/{chunk-UL2V2Z5B.mjs.map → chunk-HEDGKRGC.mjs.map} +0 -0
  172. /package/dist/{chunk-XFKD6EEJ.mjs.map → chunk-IJSEJZ3W.mjs.map} +0 -0
  173. /package/dist/{chunk-S3QSGJX2.mjs.map → chunk-ITLZQ47H.mjs.map} +0 -0
  174. /package/dist/{chunk-NIYDN3Y3.mjs.map → chunk-JEAGKB4V.mjs.map} +0 -0
  175. /package/dist/{chunk-YQMTDQSQ.mjs.map → chunk-TC5PD4TA.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -1,4 +1,7 @@
1
- import "./chunk-CYDWEPFL.mjs";
1
+ import "./chunk-CSXSUQ2M.mjs";
2
+ import {
3
+ Text
4
+ } from "./chunk-DMOMTRIY.mjs";
2
5
  import "./chunk-3D2MWIEX.mjs";
3
6
  import {
4
7
  WarningBanner
@@ -16,13 +19,6 @@ import {
16
19
  TabsTab
17
20
  } from "./chunk-J5SCUELT.mjs";
18
21
  import "./chunk-KQITCS3U.mjs";
19
- import "./chunk-CSXSUQ2M.mjs";
20
- import {
21
- Text
22
- } from "./chunk-DMOMTRIY.mjs";
23
- import {
24
- AutoAnimateHeight
25
- } from "./chunk-KCEWKQ4W.mjs";
26
22
  import "./chunk-AJFQHFQT.mjs";
27
23
  import {
28
24
  Spinner
@@ -65,13 +61,6 @@ import "./chunk-JTZPQHKD.mjs";
65
61
  import {
66
62
  Skeleton
67
63
  } from "./chunk-WLESNP6Z.mjs";
68
- import "./chunk-6QV3OV66.mjs";
69
- import "./chunk-RC76SXBP.mjs";
70
- import {
71
- Message,
72
- MessageDescription,
73
- MessageTitle
74
- } from "./chunk-TWUAXAMR.mjs";
75
64
  import "./chunk-FYFJ75NX.mjs";
76
65
  import {
77
66
  Modal,
@@ -80,77 +69,93 @@ import {
80
69
  ModalHeader
81
70
  } from "./chunk-6VKQ6IRG.mjs";
82
71
  import "./chunk-HQVL3ZJ2.mjs";
83
- import "./chunk-CFAH2LID.mjs";
72
+ import "./chunk-IJSEJZ3W.mjs";
73
+ import "./chunk-AGZHQDCQ.mjs";
84
74
  import {
85
- HelpText
86
- } from "./chunk-YZDURLEY.mjs";
87
- import "./chunk-XFKD6EEJ.mjs";
75
+ Textarea
76
+ } from "./chunk-JEAGKB4V.mjs";
88
77
  import "./chunk-XAFNJELJ.mjs";
89
78
  import {
90
79
  RadioButton
91
- } from "./chunk-UL2V2Z5B.mjs";
80
+ } from "./chunk-HEDGKRGC.mjs";
92
81
  import {
93
82
  RadioGroup,
94
83
  useRadioGroupContext
95
- } from "./chunk-YS7HBWOI.mjs";
96
- import "./chunk-AGZHQDCQ.mjs";
97
- import {
98
- Textarea
99
- } from "./chunk-NIYDN3Y3.mjs";
84
+ } from "./chunk-E6OOFTRQ.mjs";
100
85
  import "./chunk-BYEJZSG5.mjs";
101
86
  import {
102
87
  Select
103
- } from "./chunk-6BXKRPR3.mjs";
88
+ } from "./chunk-AXEAIXG7.mjs";
89
+ import "./chunk-KPPLVGZ3.mjs";
90
+ import {
91
+ ErrorSummary
92
+ } from "./chunk-VU2GCAM4.mjs";
93
+ import "./chunk-CKAL5ZJZ.mjs";
104
94
  import "./chunk-7LPYJC6S.mjs";
105
95
  import {
106
96
  Input
107
- } from "./chunk-S3QSGJX2.mjs";
97
+ } from "./chunk-ITLZQ47H.mjs";
108
98
  import "./chunk-YJOOSTJC.mjs";
109
99
  import {
110
100
  Checkbox
111
- } from "./chunk-QRGGURVO.mjs";
101
+ } from "./chunk-BO3EWZGA.mjs";
112
102
  import "./chunk-LMF3QGSF.mjs";
113
103
  import {
114
104
  Fieldset,
115
105
  useFieldsetContext
116
- } from "./chunk-JQGB77SS.mjs";
106
+ } from "./chunk-Z2ZPTZ6F.mjs";
117
107
  import "./chunk-TDLSHJ4Z.mjs";
118
108
  import {
119
109
  DatePicker
120
- } from "./chunk-WUPLEZEY.mjs";
110
+ } from "./chunk-GVO57ZWU.mjs";
121
111
  import "./chunk-Y5SUMFYJ.mjs";
122
- import "./chunk-5UGT7L7R.mjs";
112
+ import "./chunk-XZ43OSZ5.mjs";
123
113
  import "./chunk-NSLSA7F7.mjs";
124
114
  import {
125
115
  ErrorMessage
126
- } from "./chunk-CC5QWW52.mjs";
116
+ } from "./chunk-LHIG6RW7.mjs";
117
+ import "./chunk-CYDWEPFL.mjs";
118
+ import {
119
+ AutoAnimateHeight
120
+ } from "./chunk-KCEWKQ4W.mjs";
121
+ import "./chunk-6QV3OV66.mjs";
122
+ import "./chunk-RC76SXBP.mjs";
123
+ import {
124
+ Message,
125
+ MessageDescription,
126
+ MessageTitle
127
+ } from "./chunk-BYFBK3J7.mjs";
127
128
  import {
128
129
  focusTrap,
129
130
  useHydrated,
130
131
  useMergeRefs,
131
132
  useResize
132
133
  } from "./chunk-ILFK3VKS.mjs";
133
- import "./chunk-XLLYMQLW.mjs";
134
+ import "./chunk-CFAH2LID.mjs";
134
135
  import {
135
- Link
136
- } from "./chunk-VYS2QNTL.mjs";
136
+ HelpText
137
+ } from "./chunk-YZDURLEY.mjs";
137
138
  import "./chunk-BVG5VSZK.mjs";
139
+ import {
140
+ Container
141
+ } from "./chunk-4QZR2H72.mjs";
138
142
  import "./chunk-G65EYZFQ.mjs";
139
143
  import {
140
144
  Grid,
141
145
  GridItem
142
- } from "./chunk-YQMTDQSQ.mjs";
146
+ } from "./chunk-TC5PD4TA.mjs";
143
147
  import "./chunk-ZQHLYAJU.mjs";
144
148
  import {
145
149
  HStack,
146
150
  Stack,
147
151
  VStack
148
- } from "./chunk-6SVLMQUW.mjs";
149
- import {
150
- Container
151
- } from "./chunk-4QZR2H72.mjs";
152
- import "./chunk-NE6W2PCD.mjs";
152
+ } from "./chunk-FUIKSOJF.mjs";
153
153
  import "./chunk-7ROE6ADK.mjs";
154
+ import "./chunk-NE6W2PCD.mjs";
155
+ import "./chunk-XLLYMQLW.mjs";
156
+ import {
157
+ Link
158
+ } from "./chunk-VYS2QNTL.mjs";
154
159
  import "./chunk-ARHJZUZG.mjs";
155
160
  import {
156
161
  Card,
@@ -164,21 +169,21 @@ import {
164
169
  CardMedia,
165
170
  CardMediaImg
166
171
  } from "./chunk-AZ6X4L5C.mjs";
167
- import "./chunk-K2CB2NLY.mjs";
168
- import {
169
- Figure
170
- } from "./chunk-OE6RISJS.mjs";
171
172
  import "./chunk-2YL2MVWN.mjs";
172
173
  import {
173
174
  DescriptionList
174
175
  } from "./chunk-C7ZTOZP3.mjs";
176
+ import "./chunk-K2CB2NLY.mjs";
177
+ import {
178
+ Figure
179
+ } from "./chunk-OE6RISJS.mjs";
175
180
  import {
176
181
  Footer,
177
182
  FooterButtonLink,
178
183
  FooterLinkSection,
179
184
  FooterLinkSections,
180
185
  FooterLogo
181
- } from "./chunk-ROQH67YP.mjs";
186
+ } from "./chunk-6DWIJEHQ.mjs";
182
187
  import {
183
188
  LinkList
184
189
  } from "./chunk-Z2ZCM4BE.mjs";
@@ -207,10 +212,10 @@ import {
207
212
  import "./chunk-ZKMFJZSH.mjs";
208
213
  import {
209
214
  Accordion
210
- } from "./chunk-CXX4SXJG.mjs";
215
+ } from "./chunk-CKG2XRMX.mjs";
211
216
  import {
212
217
  AccordionContent
213
- } from "./chunk-JZXZYEPG.mjs";
218
+ } from "./chunk-5FWY7FIX.mjs";
214
219
  import {
215
220
  AccordionHeader
216
221
  } from "./chunk-MYVC3HMO.mjs";
@@ -249,6 +254,7 @@ export {
249
254
  DatePicker,
250
255
  DescriptionList,
251
256
  ErrorMessage,
257
+ ErrorSummary,
252
258
  Fieldset,
253
259
  Figure,
254
260
  Footer,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Grid,
3
3
  GridItem
4
- } from "../../chunk-YQMTDQSQ.mjs";
5
- import "../../chunk-NE6W2PCD.mjs";
4
+ } from "../../chunk-TC5PD4TA.mjs";
6
5
  import "../../chunk-7ROE6ADK.mjs";
6
+ import "../../chunk-NE6W2PCD.mjs";
7
7
  import "../../chunk-YOSPWY5K.mjs";
8
8
  export {
9
9
  Grid,
@@ -2,9 +2,9 @@ import "../../chunk-G65EYZFQ.mjs";
2
2
  import {
3
3
  Grid,
4
4
  GridItem
5
- } from "../../chunk-YQMTDQSQ.mjs";
6
- import "../../chunk-NE6W2PCD.mjs";
5
+ } from "../../chunk-TC5PD4TA.mjs";
7
6
  import "../../chunk-7ROE6ADK.mjs";
7
+ import "../../chunk-NE6W2PCD.mjs";
8
8
  import "../../chunk-YOSPWY5K.mjs";
9
9
  export {
10
10
  Grid,
@@ -1,20 +1,20 @@
1
1
  import "../chunk-BVG5VSZK.mjs";
2
+ import {
3
+ Container
4
+ } from "../chunk-4QZR2H72.mjs";
2
5
  import "../chunk-G65EYZFQ.mjs";
3
6
  import {
4
7
  Grid,
5
8
  GridItem
6
- } from "../chunk-YQMTDQSQ.mjs";
9
+ } from "../chunk-TC5PD4TA.mjs";
7
10
  import "../chunk-ZQHLYAJU.mjs";
8
11
  import {
9
12
  HStack,
10
13
  Stack,
11
14
  VStack
12
- } from "../chunk-6SVLMQUW.mjs";
13
- import {
14
- Container
15
- } from "../chunk-4QZR2H72.mjs";
16
- import "../chunk-NE6W2PCD.mjs";
15
+ } from "../chunk-FUIKSOJF.mjs";
17
16
  import "../chunk-7ROE6ADK.mjs";
17
+ import "../chunk-NE6W2PCD.mjs";
18
18
  import "../chunk-YOSPWY5K.mjs";
19
19
  export {
20
20
  Container,
@@ -3,9 +3,9 @@ import {
3
3
  HStack,
4
4
  Stack,
5
5
  VStack
6
- } from "../../chunk-6SVLMQUW.mjs";
7
- import "../../chunk-NE6W2PCD.mjs";
6
+ } from "../../chunk-FUIKSOJF.mjs";
8
7
  import "../../chunk-7ROE6ADK.mjs";
8
+ import "../../chunk-NE6W2PCD.mjs";
9
9
  import "../../chunk-YOSPWY5K.mjs";
10
10
  export {
11
11
  HStack,
@@ -2,9 +2,9 @@ import {
2
2
  HStack,
3
3
  Stack,
4
4
  VStack
5
- } from "../../chunk-6SVLMQUW.mjs";
6
- import "../../chunk-NE6W2PCD.mjs";
5
+ } from "../../chunk-FUIKSOJF.mjs";
7
6
  import "../../chunk-7ROE6ADK.mjs";
7
+ import "../../chunk-NE6W2PCD.mjs";
8
8
  import "../../chunk-YOSPWY5K.mjs";
9
9
  export {
10
10
  HStack,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/message/index.tsx","../../src/message/message.tsx","../../src/box/box.tsx"],"sourcesContent":["export { Message, MessageTitle, MessageDescription } from \"./message\";\nexport type * from \"./message\";\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box, type BoxProps } from \"../box/box\";\n\ninterface MessageTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageTitle = forwardRef<HTMLParagraphElement, MessageTitleProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-message__title\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageTitle.displayName = \"Message.Title\";\n\ninterface MessageDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageDescription = forwardRef<HTMLParagraphElement, MessageDescriptionProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-message__description\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageDescription.displayName = \"Message.Description\";\n\nexport type MessageProps = (\n | {\n variant?: \"success\" | \"attention\" | \"warning\" | \"info\";\n icon?: never;\n iconClassName?: never;\n }\n | {\n variant: \"neutral\";\n icon?: React.ReactNode;\n iconClassName?: string;\n }\n) &\n Omit<BoxProps, \"variant\" | \"asChild\">;\n\nexport const Message = forwardRef<HTMLDivElement, MessageProps>(\n ({ children, className, variant = \"success\", icon, iconClassName, ...rest }, ref) => {\n return (\n <Box\n className={clsx(`hds-message`, `hds-message--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {variant === \"neutral\" && (\n <div className={clsx(\"hds-message--neutral__icon\", iconClassName as undefined)}>\n {icon}\n </div>\n )}\n {children}\n </Box>\n );\n },\n) as MessageType;\nMessage.displayName = \"Message\";\n\ntype MessageType = ReturnType<typeof forwardRef<HTMLDivElement, MessageProps>> & {\n Title: typeof MessageTitle;\n Description: typeof MessageDescription;\n};\nMessage.Title = MessageTitle;\nMessage.Description = MessageDescription;\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\n\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n />\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Color variant of the box\n *\n * @default \"light-grey\"\n */\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n return (\n <Component\n className={clsx(\n \"hds-box\",\n variant && `hds-box--${variant}`,\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2B;AAC3B,IAAAC,0BAAqB;AACrB,IAAAC,qBAAqB;;;ACFrB,mBAAkD;AAClD,6BAAqB;AACrB,wBAAgC;AAM1B;AAHC,IAAM,qBAAiB;AAAA,EAC5B,CAAC,IAAwB,QAAQ;AAAhC,iBAAE,YANL,IAMG,IAAgB,iBAAhB,IAAgB,CAAd;AACD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,6BAAK,yBAAyB,SA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AA,MAAC;AAAA;AAAA,QACC,eAAW,8BAAK,sBAAsB,SAAsB;AAAA,QAC5D;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,aAAa,cAAc;AAUpB,IAAM,yBAAqB;AAAA,EAChC,CAAC,IAAiC,QAAQ;AAAzC,iBAAE,WAAS,UApCd,IAoCG,IAAyB,iBAAzB,IAAyB,CAAvB,WAAS;AACV,UAAM,YAAY,UAAU,0BAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,8BAAK,4BAA4B,SAAsB;AAAA,QAClE;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,mBAAmB,cAAc;AAgB1B,IAAM,cAAU;AAAA,EACrB,CAAC,IAA4E,QAAQ;AAApF,iBAAE,YAAU,WAAW,UAAU,WAAW,MAAM,cAhErD,IAgEG,IAAoE,iBAApE,IAAoE,CAAlE,YAAU,aAAW,WAAqB,QAAM;AACjD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,8BAAK,eAAe,gBAAgB,OAAO,IAAI,SAAsB;AAAA,QAChF;AAAA,SACI,OAHL;AAAA,QAKE;AAAA,sBAAY,aACX,6CAAC,SAAI,eAAW,8BAAK,8BAA8B,aAA0B,GAC1E,gBACH;AAAA,UAED;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,QAAQ,cAAc;AAMtB,QAAQ,QAAQ;AAChB,QAAQ,cAAc;","names":["import_react","import_typed_classname","import_react_slot","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/message/index.tsx","../../src/message/message.tsx","../../src/box/box.tsx"],"sourcesContent":["export { Message, MessageTitle, MessageDescription } from \"./message\";\nexport type * from \"./message\";\n","import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box, type BoxProps } from \"../box/box\";\n\nexport interface MessageTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageTitle = forwardRef<HTMLParagraphElement, MessageTitleProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-message__title\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageTitle.displayName = \"Message.Title\";\n\nexport interface MessageDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageDescription = forwardRef<HTMLParagraphElement, MessageDescriptionProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-message__description\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageDescription.displayName = \"Message.Description\";\n\nexport type MessageProps = (\n | {\n variant?: \"success\" | \"attention\" | \"warning\" | \"info\";\n icon?: never;\n iconClassName?: never;\n }\n | {\n variant: \"neutral\";\n icon?: React.ReactNode;\n iconClassName?: string;\n }\n) &\n Omit<BoxProps, \"variant\" | \"asChild\">;\n\nexport const Message = forwardRef<HTMLDivElement, MessageProps>(\n ({ children, className, variant = \"success\", icon, iconClassName, ...rest }, ref) => {\n return (\n <Box\n className={clsx(`hds-message`, `hds-message--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {variant === \"neutral\" && (\n <div className={clsx(\"hds-message--neutral__icon\", iconClassName as undefined)}>\n {icon}\n </div>\n )}\n {children}\n </Box>\n );\n },\n) as MessageType;\nMessage.displayName = \"Message\";\n\ntype MessageType = ReturnType<typeof forwardRef<HTMLDivElement, MessageProps>> & {\n Title: typeof MessageTitle;\n Description: typeof MessageDescription;\n};\nMessage.Title = MessageTitle;\nMessage.Description = MessageDescription;\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\n\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n />\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Color variant of the box\n *\n * @default \"light-grey\"\n */\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n return (\n <Component\n className={clsx(\n \"hds-box\",\n variant && `hds-box--${variant}`,\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA2B;AAC3B,IAAAC,0BAAqB;AACrB,IAAAC,qBAAqB;;;ACFrB,mBAAkD;AAClD,6BAAqB;AACrB,wBAAgC;AAM1B;AAHC,IAAM,qBAAiB;AAAA,EAC5B,CAAC,IAAwB,QAAQ;AAAhC,iBAAE,YANL,IAMG,IAAgB,iBAAhB,IAAgB,CAAd;AACD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,6BAAK,yBAAyB,SAAsB;AAAA,QAC/D;AAAA,QACA,MAAK;AAAA,SACD;AAAA,IACN;AAAA,EAEJ;AACF;AACA,eAAe,cAAc;AAmDtB,IAAM,UAAM;AAAA,EACjB,CACE,IAWA,QACG;AAZH,iBACE;AAAA;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,IA9EN,IAsEI,IASK,iBATL,IASK;AAAA,MARH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,CAAC,a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A,mBAAmB,cAAc;AAgB1B,IAAM,cAAU;AAAA,EACrB,CAAC,IAA4E,QAAQ;AAApF,iBAAE,YAAU,WAAW,UAAU,WAAW,MAAM,cAhErD,IAgEG,IAAoE,iBAApE,IAAoE,CAAlE,YAAU,aAAW,WAAqB,QAAM;AACjD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,8BAAK,eAAe,gBAAgB,OAAO,IAAI,SAAsB;AAAA,QAChF;AAAA,SACI,OAHL;AAAA,QAKE;AAAA,sBAAY,aACX,6CAAC,SAAI,eAAW,8BAAK,8BAA8B,aAA0B,GAC1E,gBACH;AAAA,UAED;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,QAAQ,cAAc;AAMtB,QAAQ,QAAQ;AAChB,QAAQ,cAAc;","names":["import_react","import_typed_classname","import_react_slot","import_jsx_runtime"]}
@@ -3,7 +3,7 @@ import {
3
3
  Message,
4
4
  MessageDescription,
5
5
  MessageTitle
6
- } from "../chunk-TWUAXAMR.mjs";
6
+ } from "../chunk-BYFBK3J7.mjs";
7
7
  import "../chunk-3OGHJOJF.mjs";
8
8
  import "../chunk-YOSPWY5K.mjs";
9
9
  export {
@@ -1,6 +1,6 @@
1
1
  import { forwardRef } from "react";
2
2
  import { type BoxProps } from "../box/box";
3
- interface MessageTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {
3
+ export interface MessageTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {
4
4
  /**
5
5
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
6
6
  *
@@ -9,7 +9,7 @@ interface MessageTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {
9
9
  asChild?: boolean;
10
10
  }
11
11
  export declare const MessageTitle: import("react").ForwardRefExoticComponent<MessageTitleProps & import("react").RefAttributes<HTMLParagraphElement>>;
12
- interface MessageDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
12
+ export interface MessageDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
13
13
  /**
14
14
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
15
15
  *
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/message/message.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEhD,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IAC5E;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AACD,eAAO,MAAM,YAAY,oHAWxB,CAAC;AAGF,UAAU,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IAClF;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AACD,eAAO,MAAM,kBAAkB,0HAW9B,CAAC;AAGF,MAAM,MAAM,YAAY,GAAG,CACvB;IACE,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;IACvD,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB,GACD;IACE,OAAO,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CACJ,GACC,IAAI,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;AAExC,eAAO,MAAM,OAAO,EAiBf,WAAW,CAAC;AAGjB,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC,GAAG;IAC/E,KAAK,EAAE,OAAO,YAAY,CAAC;IAC3B,WAAW,EAAE,OAAO,kBAAkB,CAAC;CACxC,CAAC"}
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/message/message.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IACnF;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AACD,eAAO,MAAM,YAAY,oHAWxB,CAAC;AAGF,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC;IACzF;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AACD,eAAO,MAAM,kBAAkB,0HAW9B,CAAC;AAGF,MAAM,MAAM,YAAY,GAAG,CACvB;IACE,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;IACvD,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB,GACD;IACE,OAAO,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CACJ,GACC,IAAI,CAAC,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;AAExC,eAAO,MAAM,OAAO,EAiBf,WAAW,CAAC;AAGjB,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC,GAAG;IAC/E,KAAK,EAAE,OAAO,YAAY,CAAC;IAC3B,WAAW,EAAE,OAAO,kBAAkB,CAAC;CACxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/message/message.tsx","../../src/box/box.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box, type BoxProps } from \"../box/box\";\n\ninterface MessageTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageTitle = forwardRef<HTMLParagraphElement, MessageTitleProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-message__title\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageTitle.displayName = \"Message.Title\";\n\ninterface MessageDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageDescription = forwardRef<HTMLParagraphElement, MessageDescriptionProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-message__description\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageDescription.displayName = \"Message.Description\";\n\nexport type MessageProps = (\n | {\n variant?: \"success\" | \"attention\" | \"warning\" | \"info\";\n icon?: never;\n iconClassName?: never;\n }\n | {\n variant: \"neutral\";\n icon?: React.ReactNode;\n iconClassName?: string;\n }\n) &\n Omit<BoxProps, \"variant\" | \"asChild\">;\n\nexport const Message = forwardRef<HTMLDivElement, MessageProps>(\n ({ children, className, variant = \"success\", icon, iconClassName, ...rest }, ref) => {\n return (\n <Box\n className={clsx(`hds-message`, `hds-message--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {variant === \"neutral\" && (\n <div className={clsx(\"hds-message--neutral__icon\", iconClassName as undefined)}>\n {icon}\n </div>\n )}\n {children}\n </Box>\n );\n },\n) as MessageType;\nMessage.displayName = \"Message\";\n\ntype MessageType = ReturnType<typeof forwardRef<HTMLDivElement, MessageProps>> & {\n Title: typeof MessageTitle;\n Description: typeof MessageDescription;\n};\nMessage.Title = MessageTitle;\nMessage.Description = MessageDescription;\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\n\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n />\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Color variant of the box\n *\n * @default \"light-grey\"\n */\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n return (\n <Component\n className={clsx(\n \"hds-box\",\n variant && `hds-box--${variant}`,\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseButton;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,gBAA2B;AAC3B,IAAAC,0BAAqB;AACrB,IAAAC,qBAAqB;;;ACFrB,mBAAkD;AAClD,6BAAqB;AACrB,wBAAgC;AAM1B;AAHC,IAAM,qBAAiB;AAAA,EAC5B,CAAC,IAAwB,QAAQ;AAAhC,iBAAE,YANL,IAMG,IAAgB,iBAAhB,IAAgB,CAAd;AACD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,6BAAK,yBAAyB,SAAsB;AAAA,QAC/D;AAAA,QACA,MAAK;AAAA,SACD;AAAA,IACN;AAAA,EAEJ;AACF;AACA,eAAe,cAAc;AAmDtB,IAAM,UAAM;AAAA,EACjB,CACE,IAWA,QACG;AAZH,iBACE;AAAA;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,IA9EN,IAsEI,IASK,iBATL,IASK;AAAA,MARH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA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QAClE;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,mBAAmB,cAAc;AAgB1B,IAAM,cAAU;AAAA,EACrB,CAAC,IAA4E,QAAQ;AAApF,iBAAE,YAAU,WAAW,UAAU,WAAW,MAAM,cAhErD,IAgEG,IAAoE,iBAApE,IAAoE,CAAlE,YAAU,aAAW,WAAqB,QAAM;AACjD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,8BAAK,eAAe,gBAAgB,OAAO,IAAI,SAAsB;AAAA,QAChF;AAAA,SACI,OAHL;AAAA,QAKE;AAAA,sBAAY,aACX,6CAAC,SAAI,eAAW,8BAAK,8BAA8B,aAA0B,GAC1E,gBACH;AAAA,UAED;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,QAAQ,cAAc;AAMtB,QAAQ,QAAQ;AAChB,QAAQ,cAAc;","names":["import_react","import_typed_classname","import_react_slot","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/message/message.tsx","../../src/box/box.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Box, type BoxProps } from \"../box/box\";\n\nexport interface MessageTitleProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageTitle = forwardRef<HTMLParagraphElement, MessageTitleProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-message__title\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageTitle.displayName = \"Message.Title\";\n\nexport interface MessageDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\nexport const MessageDescription = forwardRef<HTMLParagraphElement, MessageDescriptionProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\"hds-message__description\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n },\n);\nMessageDescription.displayName = \"Message.Description\";\n\nexport type MessageProps = (\n | {\n variant?: \"success\" | \"attention\" | \"warning\" | \"info\";\n icon?: never;\n iconClassName?: never;\n }\n | {\n variant: \"neutral\";\n icon?: React.ReactNode;\n iconClassName?: string;\n }\n) &\n Omit<BoxProps, \"variant\" | \"asChild\">;\n\nexport const Message = forwardRef<HTMLDivElement, MessageProps>(\n ({ children, className, variant = \"success\", icon, iconClassName, ...rest }, ref) => {\n return (\n <Box\n className={clsx(`hds-message`, `hds-message--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {variant === \"neutral\" && (\n <div className={clsx(\"hds-message--neutral__icon\", iconClassName as undefined)}>\n {icon}\n </div>\n )}\n {children}\n </Box>\n );\n },\n) as MessageType;\nMessage.displayName = \"Message\";\n\ntype MessageType = ReturnType<typeof forwardRef<HTMLDivElement, MessageProps>> & {\n Title: typeof MessageTitle;\n Description: typeof MessageDescription;\n};\nMessage.Title = MessageTitle;\nMessage.Description = MessageDescription;\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot, Slottable } from \"@radix-ui/react-slot\";\n\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n />\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Color variant of the box\n *\n * @default \"light-grey\"\n */\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n *\n * @default false\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\nexport const Box = forwardRef<HTMLDivElement, BoxProps>(\n (\n {\n asChild,\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n const Component = asChild ? Slot : \"div\";\n\n return (\n <Component\n className={clsx(\n \"hds-box\",\n variant && `hds-box--${variant}`,\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n <Slottable>{children}</Slottable>\n </Component>\n );\n },\n) as BoxType;\nBox.displayName = \"Box\";\n\nBox.CloseButton = BoxCloseButton;\n\ntype BoxType = ReturnType<typeof forwardRef<HTMLDivElement, BoxProps>> & {\n CloseButton: typeof BoxCloseBut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,EAEJ;AACF;AACA,QAAQ,cAAc;AAMtB,QAAQ,QAAQ;AAChB,QAAQ,cAAc;","names":["import_react","import_typed_classname","import_react_slot","import_jsx_runtime"]}
@@ -2,7 +2,7 @@ import {
2
2
  Message,
3
3
  MessageDescription,
4
4
  MessageTitle
5
- } from "../chunk-TWUAXAMR.mjs";
5
+ } from "../chunk-BYFBK3J7.mjs";
6
6
  import "../chunk-3OGHJOJF.mjs";
7
7
  import "../chunk-YOSPWY5K.mjs";
8
8
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postenbring/hedwig-react",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -14,13 +14,13 @@
14
14
  ],
15
15
  "devDependencies": {
16
16
  "@types/react": "^18.3.11",
17
- "@types/react-dom": "^18.3.0",
17
+ "@types/react-dom": "^18.3.1",
18
18
  "react": "^18.3.1",
19
19
  "react-dom": "18.3.1",
20
20
  "tsup": "^8.3.0",
21
21
  "typescript": "^5.6.2",
22
- "eslint-config-custom": "0.0.1",
23
- "hedwig-tsconfig": "0.0.0"
22
+ "hedwig-tsconfig": "0.0.0",
23
+ "eslint-config-custom": "0.0.1"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@types/react": "^17.0.0 || ^18.0.0",
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@radix-ui/react-popover": "1.1.2",
33
33
  "@radix-ui/react-slot": "1.1.0",
34
- "@postenbring/hedwig-css": "1.2.0"
34
+ "@postenbring/hedwig-css": "1.3.0"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
@@ -16,7 +16,6 @@ export const AccordionContent = forwardRef<HTMLDivElement, AccordionContentProps
16
16
  return (
17
17
  <div
18
18
  id={context.contentId}
19
- aria-hidden={!context.open}
20
19
  data-state={context.open ? "open" : "closed"}
21
20
  {...{ inert: context.open ? undefined : "true" }}
22
21
  className={clsx("hds-accordion-item-content", className as undefined)}
@@ -1,12 +1,13 @@
1
1
  import { forwardRef, useId, type InputHTMLAttributes, type ReactNode } from "react";
2
2
  import { clsx } from "@postenbring/hedwig-css/typed-classname";
3
- import { ErrorMessage } from "../error-message";
3
+ import { ErrorMessage, type ErrorMessageProps } from "../error-message";
4
4
  import { useFieldsetContext } from "../fieldset";
5
5
 
6
6
  export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue"> & {
7
7
  children: ReactNode;
8
8
  variant?: "plain" | "bounding-box";
9
9
  title?: string;
10
+ errorMessageProps?: Partial<ErrorMessageProps>;
10
11
  } & (
11
12
  | {
12
13
  /**
@@ -38,6 +39,7 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
38
39
  variant = "plain",
39
40
  hasError: hasErrorProp,
40
41
  errorMessage,
42
+ errorMessageProps,
41
43
  title,
42
44
  children,
43
45
  className,
@@ -74,7 +76,9 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
74
76
  </label>
75
77
  {title ? children : null}
76
78
  </div>
77
- <ErrorMessage id={errorMessageId}>{errorMessage}</ErrorMessage>
79
+ <ErrorMessage id={errorMessageId} {...errorMessageProps}>
80
+ {errorMessage}
81
+ </ErrorMessage>
78
82
  </div>
79
83
  );
80
84
  },
@@ -11,7 +11,7 @@ export const ErrorMessage = forwardRef<HTMLDivElement, ErrorMessageProps>(
11
11
  ({ children, id, className, ...rest }, ref) => {
12
12
  return (
13
13
  <div
14
- aria-live="assertive"
14
+ aria-live="polite"
15
15
  className={clsx("hds-error-message", className as undefined)}
16
16
  id={id}
17
17
  ref={ref}
@@ -0,0 +1,29 @@
1
+ /* eslint-disable import/no-extraneous-dependencies -- storybook story */
2
+ import type { Meta, StoryObj } from "@storybook/react";
3
+ import { ErrorSummary } from ".";
4
+
5
+ const meta: Meta<typeof ErrorSummary> = {
6
+ title: "Form/Error Summary",
7
+ component: ErrorSummary,
8
+ };
9
+
10
+ export default meta;
11
+
12
+ type Story = StoryObj<typeof ErrorSummary>;
13
+
14
+ export const Preview: Story = {
15
+ tags: ["!dev"],
16
+ args: {
17
+ children: (
18
+ <>
19
+ <ErrorSummary.Heading as="h2">
20
+ To continue please correct the following issues
21
+ </ErrorSummary.Heading>
22
+ <ErrorSummary.List>
23
+ <ErrorSummary.Item href="#firstname">First name is required</ErrorSummary.Item>
24
+ <ErrorSummary.Item href="#surname">Surname is required</ErrorSummary.Item>
25
+ </ErrorSummary.List>
26
+ </>
27
+ ),
28
+ },
29
+ };