@postenbring/hedwig-react 0.0.66 → 0.0.67

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 (178) hide show
  1. package/dist/_tsup-dts-rollup.d.mts +202 -128
  2. package/dist/_tsup-dts-rollup.d.ts +202 -128
  3. package/dist/accordion/index.d.mts +3 -3
  4. package/dist/accordion/index.d.ts +3 -3
  5. package/dist/accordion/index.js +8 -2
  6. package/dist/accordion/index.js.map +1 -1
  7. package/dist/accordion/index.mjs +14 -5
  8. package/dist/box/index.d.mts +1 -1
  9. package/dist/box/index.d.ts +1 -1
  10. package/dist/box/index.js +4 -2
  11. package/dist/box/index.js.map +1 -1
  12. package/dist/box/index.mjs +6 -3
  13. package/dist/card/index.d.mts +2 -2
  14. package/dist/card/index.d.ts +2 -2
  15. package/dist/card/index.js +12 -2
  16. package/dist/card/index.js.map +1 -1
  17. package/dist/card/index.mjs +14 -3
  18. package/dist/{chunk-2ICZ3Q7N.mjs → chunk-2FXMUF6K.mjs} +2 -2
  19. package/dist/{chunk-X46LM2QH.mjs → chunk-3KZOKDKP.mjs} +13 -3
  20. package/dist/chunk-3KZOKDKP.mjs.map +1 -0
  21. package/dist/{chunk-CLXHNRAI.mjs → chunk-B56JZJOS.mjs} +5 -3
  22. package/dist/chunk-B56JZJOS.mjs.map +1 -0
  23. package/dist/{chunk-RVJD2UZF.mjs → chunk-DFH4YKQA.mjs} +2 -2
  24. package/dist/chunk-DFH4YKQA.mjs.map +1 -0
  25. package/dist/{chunk-AR2NOI4U.mjs → chunk-EJ7ANN7M.mjs} +1 -1
  26. package/dist/{chunk-AR2NOI4U.mjs.map → chunk-EJ7ANN7M.mjs.map} +1 -1
  27. package/dist/{chunk-ZTYEOZLK.mjs → chunk-F4STR6SD.mjs} +2 -2
  28. package/dist/chunk-F4STR6SD.mjs.map +1 -0
  29. package/dist/{chunk-2JH4FG63.mjs → chunk-FOZSX44S.mjs} +2 -2
  30. package/dist/{chunk-2JH4FG63.mjs.map → chunk-FOZSX44S.mjs.map} +1 -1
  31. package/dist/chunk-G2SOAFGS.mjs +86 -0
  32. package/dist/chunk-G2SOAFGS.mjs.map +1 -0
  33. package/dist/{chunk-RXIP2JTE.mjs → chunk-K2HG7WRK.mjs} +2 -2
  34. package/dist/{chunk-RXIP2JTE.mjs.map → chunk-K2HG7WRK.mjs.map} +1 -1
  35. package/dist/{chunk-RK6BB3HH.mjs → chunk-KTRIVJM3.mjs} +2 -2
  36. package/dist/{chunk-BZNDK3KJ.mjs → chunk-NMMFIRLZ.mjs} +1 -1
  37. package/dist/{chunk-BZNDK3KJ.mjs.map → chunk-NMMFIRLZ.mjs.map} +1 -1
  38. package/dist/{chunk-BZRCDLEW.mjs → chunk-O32FZU7E.mjs} +2 -2
  39. package/dist/{chunk-IAS3E2S3.mjs → chunk-PUESATBQ.mjs} +2 -2
  40. package/dist/{chunk-27XJO7E4.mjs → chunk-QGZU7Z2W.mjs} +2 -2
  41. package/dist/{chunk-MRCE2Q7A.mjs → chunk-QYSLVQ4F.mjs} +2 -2
  42. package/dist/{chunk-MRCE2Q7A.mjs.map → chunk-QYSLVQ4F.mjs.map} +1 -1
  43. package/dist/chunk-TDLSHJ4Z.mjs +1 -0
  44. package/dist/{chunk-SKI2APSK.mjs → chunk-TNU64NUN.mjs} +13 -7
  45. package/dist/chunk-TNU64NUN.mjs.map +1 -0
  46. package/dist/{chunk-JC6DBIFE.mjs → chunk-XE4UZBL2.mjs} +1 -1
  47. package/dist/{chunk-JC6DBIFE.mjs.map → chunk-XE4UZBL2.mjs.map} +1 -1
  48. package/dist/chunk-XFKD6EEJ.mjs +1 -0
  49. package/dist/chunk-XFKD6EEJ.mjs.map +1 -0
  50. package/dist/{chunk-XIHKASNB.mjs → chunk-XYIY6FHW.mjs} +1 -1
  51. package/dist/{chunk-XIHKASNB.mjs.map → chunk-XYIY6FHW.mjs.map} +1 -1
  52. package/dist/{chunk-6TI7ACBR.mjs → chunk-YC7MT6SO.mjs} +2 -2
  53. package/dist/{chunk-WCA2WPFS.mjs → chunk-ZL56N4UK.mjs} +14 -2
  54. package/dist/{chunk-WCA2WPFS.mjs.map → chunk-ZL56N4UK.mjs.map} +1 -1
  55. package/dist/{chunk-IFGQR4J6.mjs → chunk-ZRFDCZ62.mjs} +2 -2
  56. package/dist/footer/footer.js.map +1 -1
  57. package/dist/footer/footer.mjs +2 -2
  58. package/dist/footer/index.d.mts +3 -3
  59. package/dist/footer/index.d.ts +3 -3
  60. package/dist/footer/index.js +10 -2
  61. package/dist/footer/index.js.map +1 -1
  62. package/dist/footer/index.mjs +13 -4
  63. package/dist/form/date-picker/date-picker.d.mts +2 -0
  64. package/dist/form/date-picker/date-picker.d.ts +2 -0
  65. package/dist/form/date-picker/date-picker.js +265 -0
  66. package/dist/form/date-picker/date-picker.js.map +1 -0
  67. package/dist/form/date-picker/date-picker.mjs +13 -0
  68. package/dist/form/date-picker/date-picker.mjs.map +1 -0
  69. package/dist/form/date-picker/index.d.mts +2 -0
  70. package/dist/form/date-picker/index.d.ts +2 -0
  71. package/dist/form/date-picker/index.js +267 -0
  72. package/dist/form/date-picker/index.js.map +1 -0
  73. package/dist/form/date-picker/index.mjs +14 -0
  74. package/dist/form/date-picker/index.mjs.map +1 -0
  75. package/dist/form/index.d.mts +10 -8
  76. package/dist/form/index.d.ts +10 -8
  77. package/dist/form/index.js +239 -131
  78. package/dist/form/index.js.map +1 -1
  79. package/dist/form/index.mjs +12 -6
  80. package/dist/form/input/index.js +12 -6
  81. package/dist/form/input/index.js.map +1 -1
  82. package/dist/form/input/index.mjs +2 -2
  83. package/dist/form/input/input.js +12 -6
  84. package/dist/form/input/input.js.map +1 -1
  85. package/dist/form/input/input.mjs +2 -2
  86. package/dist/form/input-group/index.js +12 -6
  87. package/dist/form/input-group/index.js.map +1 -1
  88. package/dist/form/input-group/index.mjs +1 -1
  89. package/dist/form/input-group/input-group.js +12 -6
  90. package/dist/form/input-group/input-group.js.map +1 -1
  91. package/dist/form/input-group/input-group.mjs +1 -1
  92. package/dist/form/select/index.js +12 -6
  93. package/dist/form/select/index.js.map +1 -1
  94. package/dist/form/select/index.mjs +2 -2
  95. package/dist/form/select/select.js +12 -6
  96. package/dist/form/select/select.js.map +1 -1
  97. package/dist/form/select/select.mjs +2 -2
  98. package/dist/form/textarea/index.js +12 -6
  99. package/dist/form/textarea/index.js.map +1 -1
  100. package/dist/form/textarea/index.mjs +2 -2
  101. package/dist/form/textarea/textarea.js +12 -6
  102. package/dist/form/textarea/textarea.js.map +1 -1
  103. package/dist/form/textarea/textarea.mjs +2 -2
  104. package/dist/index-no-css.d.mts +26 -22
  105. package/dist/index-no-css.d.ts +26 -22
  106. package/dist/index-no-css.js +544 -405
  107. package/dist/index-no-css.js.map +1 -1
  108. package/dist/index-no-css.mjs +87 -29
  109. package/dist/index.d.mts +26 -22
  110. package/dist/index.d.ts +26 -22
  111. package/dist/index.js +544 -405
  112. package/dist/index.js.map +1 -1
  113. package/dist/index.mjs +87 -29
  114. package/dist/index.mjs.map +1 -1
  115. package/dist/layout/index.js +1 -1
  116. package/dist/layout/index.js.map +1 -1
  117. package/dist/layout/index.mjs +2 -2
  118. package/dist/layout/responsive.js +1 -1
  119. package/dist/layout/responsive.js.map +1 -1
  120. package/dist/layout/responsive.mjs +1 -1
  121. package/dist/layout/stack/index.js +1 -1
  122. package/dist/layout/stack/index.js.map +1 -1
  123. package/dist/layout/stack/index.mjs +2 -2
  124. package/dist/layout/stack/stack.js +1 -1
  125. package/dist/layout/stack/stack.js.map +1 -1
  126. package/dist/layout/stack/stack.mjs +2 -2
  127. package/dist/message/index.d.mts +2 -0
  128. package/dist/message/index.d.ts +2 -0
  129. package/dist/message/index.js +6 -2
  130. package/dist/message/index.js.map +1 -1
  131. package/dist/message/index.mjs +8 -3
  132. package/dist/message/message.d.mts +2 -2
  133. package/dist/message/message.d.ts +2 -2
  134. package/dist/modal/index.d.mts +2 -2
  135. package/dist/modal/index.d.ts +2 -2
  136. package/dist/modal/index.js +8 -2
  137. package/dist/modal/index.js.map +1 -1
  138. package/dist/modal/index.mjs +11 -4
  139. package/dist/modal/modal.js.map +1 -1
  140. package/dist/modal/modal.mjs +2 -2
  141. package/dist/navbar/index.d.mts +3 -3
  142. package/dist/navbar/index.d.ts +3 -3
  143. package/dist/navbar/index.js +41 -11
  144. package/dist/navbar/index.js.map +1 -1
  145. package/dist/navbar/index.mjs +13 -3
  146. package/dist/navbar/navbar-expandable-menu.js +33 -11
  147. package/dist/navbar/navbar-expandable-menu.js.map +1 -1
  148. package/dist/navbar/navbar-expandable-menu.mjs +2 -1
  149. package/dist/tabs/index.js +13 -1
  150. package/dist/tabs/index.js.map +1 -1
  151. package/dist/tabs/index.mjs +3 -3
  152. package/dist/tabs/tabs-list.js +13 -1
  153. package/dist/tabs/tabs-list.js.map +1 -1
  154. package/dist/tabs/tabs-list.mjs +2 -2
  155. package/dist/utils.d.mts +1 -0
  156. package/dist/utils.d.ts +1 -0
  157. package/dist/utils.js +13 -0
  158. package/dist/utils.js.map +1 -1
  159. package/dist/utils.mjs +3 -1
  160. package/dist/warning-banner/index.js.map +1 -1
  161. package/dist/warning-banner/index.mjs +2 -2
  162. package/dist/warning-banner/warning-banner.js.map +1 -1
  163. package/dist/warning-banner/warning-banner.mjs +2 -2
  164. package/package.json +6 -6
  165. package/dist/chunk-CLXHNRAI.mjs.map +0 -1
  166. package/dist/chunk-RVJD2UZF.mjs.map +0 -1
  167. package/dist/chunk-SKI2APSK.mjs.map +0 -1
  168. package/dist/chunk-T24JZIQO.mjs +0 -1
  169. package/dist/chunk-X46LM2QH.mjs.map +0 -1
  170. package/dist/chunk-ZTYEOZLK.mjs.map +0 -1
  171. /package/dist/{chunk-2ICZ3Q7N.mjs.map → chunk-2FXMUF6K.mjs.map} +0 -0
  172. /package/dist/{chunk-RK6BB3HH.mjs.map → chunk-KTRIVJM3.mjs.map} +0 -0
  173. /package/dist/{chunk-BZRCDLEW.mjs.map → chunk-O32FZU7E.mjs.map} +0 -0
  174. /package/dist/{chunk-IAS3E2S3.mjs.map → chunk-PUESATBQ.mjs.map} +0 -0
  175. /package/dist/{chunk-27XJO7E4.mjs.map → chunk-QGZU7Z2W.mjs.map} +0 -0
  176. /package/dist/{chunk-T24JZIQO.mjs.map → chunk-TDLSHJ4Z.mjs.map} +0 -0
  177. /package/dist/{chunk-6TI7ACBR.mjs.map → chunk-YC7MT6SO.mjs.map} +0 -0
  178. /package/dist/{chunk-IFGQR4J6.mjs.map → chunk-ZRFDCZ62.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -2,10 +2,10 @@ import "./chunk-YWNVB7TY.mjs";
2
2
  import "./chunk-3D2MWIEX.mjs";
3
3
  import {
4
4
  WarningBanner
5
- } from "./chunk-IAS3E2S3.mjs";
5
+ } from "./chunk-PUESATBQ.mjs";
6
6
  import {
7
7
  TabsComponent
8
- } from "./chunk-IFGQR4J6.mjs";
8
+ } from "./chunk-ZRFDCZ62.mjs";
9
9
  import {
10
10
  TabsContent,
11
11
  TabsContents
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  TabsList,
15
15
  TabsTab
16
- } from "./chunk-CLXHNRAI.mjs";
16
+ } from "./chunk-B56JZJOS.mjs";
17
17
  import "./chunk-XVFQWVHO.mjs";
18
18
  import {
19
19
  TextBody,
@@ -35,16 +35,25 @@ import {
35
35
  } from "./chunk-57SSGJ4X.mjs";
36
36
  import {
37
37
  ModalComponent
38
- } from "./chunk-MRCE2Q7A.mjs";
39
- import "./chunk-2ICZ3Q7N.mjs";
38
+ } from "./chunk-QYSLVQ4F.mjs";
39
+ import {
40
+ ModalContent,
41
+ ModalFooter,
42
+ ModalHeader
43
+ } from "./chunk-2FXMUF6K.mjs";
40
44
  import {
41
45
  NavbarComponent
42
- } from "./chunk-2JH4FG63.mjs";
46
+ } from "./chunk-FOZSX44S.mjs";
43
47
  import {
44
48
  useNavbarExpendableMenuContext
45
- } from "./chunk-X46LM2QH.mjs";
49
+ } from "./chunk-3KZOKDKP.mjs";
46
50
  import "./chunk-MGUYIOP2.mjs";
47
- import "./chunk-625SVQEP.mjs";
51
+ import {
52
+ NavbarButton,
53
+ NavbarLogo,
54
+ NavbarLogoAndServiceText,
55
+ NavbarNavigation
56
+ } from "./chunk-625SVQEP.mjs";
48
57
  import "./chunk-L4GQJETB.mjs";
49
58
  import {
50
59
  Container
@@ -53,7 +62,7 @@ import {
53
62
  HStack,
54
63
  Stack,
55
64
  VStack
56
- } from "./chunk-27XJO7E4.mjs";
65
+ } from "./chunk-QGZU7Z2W.mjs";
57
66
  import "./chunk-XLLYMQLW.mjs";
58
67
  import {
59
68
  Link
@@ -61,20 +70,34 @@ import {
61
70
  import "./chunk-6QV3OV66.mjs";
62
71
  import {
63
72
  MessageComponent
64
- } from "./chunk-AR2NOI4U.mjs";
65
- import "./chunk-ME66RUR6.mjs";
73
+ } from "./chunk-EJ7ANN7M.mjs";
74
+ import {
75
+ MessageDescription,
76
+ MessageTitle
77
+ } from "./chunk-ME66RUR6.mjs";
66
78
  import {
67
79
  CardComponent
68
- } from "./chunk-JC6DBIFE.mjs";
69
- import "./chunk-X5JERDDU.mjs";
80
+ } from "./chunk-XE4UZBL2.mjs";
81
+ import {
82
+ CardBody,
83
+ CardBodyHeader,
84
+ CardBodyHeaderOverline,
85
+ CardMedia,
86
+ CardMediaImg
87
+ } from "./chunk-X5JERDDU.mjs";
70
88
  import "./chunk-2YL2MVWN.mjs";
71
89
  import {
72
90
  DescriptionList
73
91
  } from "./chunk-XMB45ILT.mjs";
74
92
  import {
75
93
  FooterComponent
76
- } from "./chunk-RXIP2JTE.mjs";
77
- import "./chunk-BZRCDLEW.mjs";
94
+ } from "./chunk-K2HG7WRK.mjs";
95
+ import {
96
+ FooterButtonLink,
97
+ FooterLinkSection,
98
+ FooterLinkSections,
99
+ FooterLogo
100
+ } from "./chunk-O32FZU7E.mjs";
78
101
  import {
79
102
  LinkList
80
103
  } from "./chunk-GJDRW6PA.mjs";
@@ -83,21 +106,19 @@ import {
83
106
  UnorderedList
84
107
  } from "./chunk-PMLDK3VC.mjs";
85
108
  import "./chunk-HT2EIJAD.mjs";
86
- import "./chunk-T24JZIQO.mjs";
109
+ import "./chunk-XFKD6EEJ.mjs";
87
110
  import "./chunk-BYEJZSG5.mjs";
88
111
  import {
89
112
  Select
90
- } from "./chunk-RVJD2UZF.mjs";
113
+ } from "./chunk-DFH4YKQA.mjs";
91
114
  import "./chunk-AGZHQDCQ.mjs";
92
115
  import {
93
116
  Textarea
94
- } from "./chunk-RK6BB3HH.mjs";
117
+ } from "./chunk-KTRIVJM3.mjs";
95
118
  import "./chunk-7LPYJC6S.mjs";
96
119
  import {
97
120
  Input
98
- } from "./chunk-6TI7ACBR.mjs";
99
- import "./chunk-Y5SUMFYJ.mjs";
100
- import "./chunk-SKI2APSK.mjs";
121
+ } from "./chunk-YC7MT6SO.mjs";
101
122
  import "./chunk-2KX7VFN2.mjs";
102
123
  import {
103
124
  Radiobutton
@@ -115,16 +136,28 @@ import {
115
136
  Fieldset,
116
137
  useFieldsetContext
117
138
  } from "./chunk-DM4PJFLG.mjs";
139
+ import "./chunk-TDLSHJ4Z.mjs";
140
+ import {
141
+ DatePicker
142
+ } from "./chunk-G2SOAFGS.mjs";
143
+ import "./chunk-Y5SUMFYJ.mjs";
144
+ import "./chunk-TNU64NUN.mjs";
118
145
  import "./chunk-NSLSA7F7.mjs";
119
146
  import {
120
147
  ErrorMessage
121
148
  } from "./chunk-IL7576PP.mjs";
122
149
  import {
123
150
  AccordionComponent
124
- } from "./chunk-XIHKASNB.mjs";
125
- import "./chunk-GUB3UCXO.mjs";
126
- import "./chunk-YXHXRUFX.mjs";
127
- import "./chunk-62F4I3MQ.mjs";
151
+ } from "./chunk-XYIY6FHW.mjs";
152
+ import {
153
+ AccordionContent
154
+ } from "./chunk-GUB3UCXO.mjs";
155
+ import {
156
+ AccordionHeader
157
+ } from "./chunk-YXHXRUFX.mjs";
158
+ import {
159
+ AccordionItem
160
+ } from "./chunk-62F4I3MQ.mjs";
128
161
  import "./chunk-VRIY65P5.mjs";
129
162
  import "./chunk-ZOCMUEOX.mjs";
130
163
  import {
@@ -145,11 +178,13 @@ import {
145
178
  } from "./chunk-W3D4VR4Y.mjs";
146
179
  import {
147
180
  BoxComponent
148
- } from "./chunk-BZNDK3KJ.mjs";
149
- import "./chunk-EGXM575K.mjs";
150
- import "./chunk-WCA2WPFS.mjs";
181
+ } from "./chunk-NMMFIRLZ.mjs";
182
+ import {
183
+ BoxCloseButton
184
+ } from "./chunk-EGXM575K.mjs";
185
+ import "./chunk-ZL56N4UK.mjs";
151
186
  import "./chunk-V3PAFMK5.mjs";
152
- import "./chunk-ZTYEOZLK.mjs";
187
+ import "./chunk-F4STR6SD.mjs";
153
188
  import "./chunk-NE6W2PCD.mjs";
154
189
  import "./chunk-MSFHJVHD.mjs";
155
190
  import {
@@ -176,25 +211,48 @@ import "./chunk-R4SQKVDQ.mjs";
176
211
  import "@postenbring/hedwig-css/dist/index.css";
177
212
  export {
178
213
  AccordionComponent as Accordion,
214
+ AccordionContent,
215
+ AccordionHeader,
216
+ AccordionItem,
179
217
  AutoAnimateHeight,
180
218
  Badge,
181
219
  BoxComponent as Box,
220
+ BoxCloseButton,
182
221
  Breadcrumbs,
183
222
  CardComponent as Card,
223
+ CardBody,
224
+ CardBodyHeader,
225
+ CardBodyHeaderOverline,
226
+ CardMedia,
227
+ CardMediaImg,
184
228
  Checkbox,
185
229
  Container,
186
230
  DarkBadge,
231
+ DatePicker,
187
232
  DescriptionList,
188
233
  ErrorMessage,
189
234
  Fieldset,
190
235
  FooterComponent as Footer,
236
+ FooterButtonLink,
237
+ FooterLinkSection,
238
+ FooterLinkSections,
239
+ FooterLogo,
191
240
  HStack,
192
241
  Input,
193
242
  Link,
194
243
  LinkList,
195
244
  MessageComponent as Message,
245
+ MessageDescription,
246
+ MessageTitle,
196
247
  ModalComponent as Modal,
248
+ ModalContent,
249
+ ModalFooter,
250
+ ModalHeader,
197
251
  NavbarComponent as Navbar,
252
+ NavbarButton,
253
+ NavbarLogo,
254
+ NavbarLogoAndServiceText,
255
+ NavbarNavigation,
198
256
  OrderedList,
199
257
  PrimaryButton,
200
258
  RadioGroup,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["/**\n * Import the hedwig css file, so the consumers don't have to. Plug and play.\n *\n * NOTE: Importing the full path, not just the package name.\n * For some reason vite did not include the css during development when this file only imported the package name.\n *\n * Consumers using the `@postenbring/hedwig-css` package directly should only need to import the package without a path.\n */\nimport \"@postenbring/hedwig-css/dist/index.css\";\n\nexport * from \"./index-no-css\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,OAAO;","names":[]}
1
+ {"version":3,"sources":["../src/index.tsx"],"sourcesContent":["/**\n * Import the hedwig css file, so the consumers don't have to. Plug and play.\n *\n * NOTE: Importing the full path, not just the package name.\n * For some reason vite did not include the css during development when this file only imported the package name.\n *\n * Consumers using the `@postenbring/hedwig-css` package directly should only need to import the package without a path.\n */\nimport \"@postenbring/hedwig-css/dist/index.css\";\n\nexport * from \"./index-no-css\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,OAAO;","names":[]}
@@ -95,7 +95,7 @@ function getResponsiveProps(variable, inputValues, valueTransformer = (value) =>
95
95
  if (!inputValues)
96
96
  return {};
97
97
  if (typeof inputValues !== "object") {
98
- return { [`${variable}-xsmall`]: valueTransformer(inputValues) };
98
+ return { [`${variable}-initial`]: valueTransformer(inputValues) };
99
99
  }
100
100
  const result = {};
101
101
  for (const [key, value] of Object.entries(inputValues)) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/index.tsx","../../src/layout/container/container.tsx","../../src/layout/stack/stack.tsx","../../src/layout/spacing.ts","../../src/layout/responsive.ts"],"sourcesContent":["export * from \"./container/container\";\nexport * from \"./stack/stack\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { forwardRef } from \"react\";\nimport type { OverridableComponent } from \"../../utils\";\n\nexport interface ContainerProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"default\" | \"slim\";\n children: ReactNode;\n}\n\n/**\n * Container is a layout component that is used to wrap content.\n * It ensures a max-width and minimum spacing on the sides.\n */\nexport const Container: OverridableComponent<ContainerProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, children, variant, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-container\",\n { \"hds-container--slim\": variant === \"slim\" },\n className as undefined,\n )}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nContainer.displayName = \"Container\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getSpacingVariable, type ResponsiveSpacingSizes, type SpacingSizes } from \"../spacing\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\n\ntype CSSPropertiesWithVar = React.CSSProperties & {\n \"--hds-stack-gap\"?: string;\n \"--hds-stack-direction\"?: string;\n \"--hds-stack-wrap\"?: string;\n \"--hds-stack-align\"?: string;\n \"--hds-stack-justify\"?: string;\n};\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n direction?: ResponsiveProp<React.CSSProperties[\"flexDirection\"]>;\n wrap?: ResponsiveProp<boolean>;\n align?: ResponsiveProp<React.CSSProperties[\"alignItems\"]>;\n justify?: ResponsiveProp<React.CSSProperties[\"justifyContent\"]>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n { children, asChild, className, style: _style, gap, direction, wrap, align, justify, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: CSSPropertiesWithVar = {\n ..._style,\n ...getResponsiveProps(\"--hds-stack-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-direction\", direction),\n ...getResponsiveProps(\"--hds-stack-wrap\", wrap, (value) => (value ? \"wrap\" : \"nowrap\")),\n ...getResponsiveProps(\"--hds-stack-align\", align),\n ...getResponsiveProps(\"--hds-stack-justify\", justify),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-stack\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStack.displayName = \"Stack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const HStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"row\" />;\n});\nHStack.displayName = \"HStack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const VStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"column\" />;\n});\nVStack.displayName = \"VStack\";\n","// TODO: Get from tokens package\n// For now it's fine, since it's still in this monorepo\nconst spacingSizes = {\n \"4\": \"4\",\n \"8\": \"8\",\n \"12\": \"12\",\n \"16\": \"16\",\n \"20\": \"20\",\n \"24\": \"24\",\n \"32\": \"32\",\n \"40\": \"40\",\n \"48\": \"48\",\n \"64\": \"64\",\n \"80\": \"80\",\n \"120\": \"120\",\n} as const;\nexport type SpacingSizes = keyof typeof spacingSizes;\n\nconst responsiveSpacingSizes = {\n \"4-8\": \"4-8\",\n \"8-12\": \"8-12\",\n \"12-16\": \"12-16\",\n \"16-20\": \"16-20\",\n \"20-24\": \"20-24\",\n \"24-32\": \"24-32\",\n \"32-40\": \"32-40\",\n \"40-48\": \"40-48\",\n \"48-64\": \"48-64\",\n \"64-80\": \"64-80\",\n \"80-120\": \"80-120\",\n \"120-160\": \"120-160\",\n} as const;\nexport type ResponsiveSpacingSizes = keyof typeof responsiveSpacingSizes;\n\nexport function getSpacingVariable(size: SpacingSizes | ResponsiveSpacingSizes) {\n return `var(--hds-spacing-${size})`;\n}\n","type Breakpoints = \"xsmall\" | \"small\" | \"medium\" | \"large\" | \"xlarge\";\n\ntype ResponsiveValues<T> = {\n [Breakpoint in Breakpoints]?: T;\n};\n\nexport type ResponsiveProp<T> = T | ResponsiveValues<T>;\n\nexport function getResponsiveProps<T>(\n variable: `--hds-${string}`,\n inputValues?: ResponsiveProp<T>,\n valueTransformer: (value: T) => string = (value) => String(value),\n) {\n if (!inputValues) return {};\n\n if (typeof inputValues !== \"object\") {\n return { [`${variable}-xsmall`]: valueTransformer(inputValues) };\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(inputValues as ResponsiveValues<T>)) {\n result[`${variable}-${key}`] = valueTransformer(value);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,6BAAq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BAAmB,mBAAmB,KAAK,kBAAkB,IAC7D,mBAAmB,yBAAyB,SAAS,IACrD,mBAAmB,oBAAoB,MAAM,CAAC,UAAW,QAAQ,SAAS,QAAS,IACnF,mBAAmB,qBAAqB,KAAK,IAC7C,mBAAmB,uBAAuB,OAAO;AAEtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,8BAAK,aAAa,SAAsB;AAAA,QACnD;AAAA,SACI,OAJL;AAAA,QAME;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;AAUb,IAAM,aAAS,0BAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,6CAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,QAAM;AACrD,CAAC;AACD,OAAO,cAAc;AAUd,IAAM,aAAS,0BAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,6CAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,WAAS;AACxD,CAAC;AACD,OAAO,cAAc;","names":["import_typed_classname","import_react","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/layout/index.tsx","../../src/layout/container/container.tsx","../../src/layout/stack/stack.tsx","../../src/layout/spacing.ts","../../src/layout/responsive.ts"],"sourcesContent":["export * from \"./container/container\";\nexport * from \"./stack/stack\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { HTMLAttributes, ReactNode } from \"react\";\nimport { forwardRef } from \"react\";\nimport type { OverridableComponent } from \"../../utils\";\n\nexport interface ContainerProps extends HTMLAttributes<HTMLDivElement> {\n variant?: \"default\" | \"slim\";\n children: ReactNode;\n}\n\n/**\n * Container is a layout component that is used to wrap content.\n * It ensures a max-width and minimum spacing on the sides.\n */\nexport const Container: OverridableComponent<ContainerProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, children, variant, ...rest }, ref) => {\n return (\n <Component\n {...rest}\n className={clsx(\n \"hds-container\",\n { \"hds-container--slim\": variant === \"slim\" },\n className as undefined,\n )}\n ref={ref}\n >\n {children}\n </Component>\n );\n },\n);\nContainer.displayName = \"Container\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getSpacingVariable, type ResponsiveSpacingSizes, type SpacingSizes } from \"../spacing\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\n\ntype CSSPropertiesWithVar = React.CSSProperties & {\n \"--hds-stack-gap\"?: string;\n \"--hds-stack-direction\"?: string;\n \"--hds-stack-wrap\"?: string;\n \"--hds-stack-align\"?: string;\n \"--hds-stack-justify\"?: string;\n};\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n direction?: ResponsiveProp<React.CSSProperties[\"flexDirection\"]>;\n wrap?: ResponsiveProp<boolean>;\n align?: ResponsiveProp<React.CSSProperties[\"alignItems\"]>;\n justify?: ResponsiveProp<React.CSSProperties[\"justifyContent\"]>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n { children, asChild, className, style: _style, gap, direction, wrap, align, justify, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: CSSPropertiesWithVar = {\n ..._style,\n ...getResponsiveProps(\"--hds-stack-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-direction\", direction),\n ...getResponsiveProps(\"--hds-stack-wrap\", wrap, (value) => (value ? \"wrap\" : \"nowrap\")),\n ...getResponsiveProps(\"--hds-stack-align\", align),\n ...getResponsiveProps(\"--hds-stack-justify\", justify),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-stack\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStack.displayName = \"Stack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const HStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"row\" />;\n});\nHStack.displayName = \"HStack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const VStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"column\" />;\n});\nVStack.displayName = \"VStack\";\n","// TODO: Get from tokens package\n// For now it's fine, since it's still in this monorepo\nconst spacingSizes = {\n \"4\": \"4\",\n \"8\": \"8\",\n \"12\": \"12\",\n \"16\": \"16\",\n \"20\": \"20\",\n \"24\": \"24\",\n \"32\": \"32\",\n \"40\": \"40\",\n \"48\": \"48\",\n \"64\": \"64\",\n \"80\": \"80\",\n \"120\": \"120\",\n} as const;\nexport type SpacingSizes = keyof typeof spacingSizes;\n\nconst responsiveSpacingSizes = {\n \"4-8\": \"4-8\",\n \"8-12\": \"8-12\",\n \"12-16\": \"12-16\",\n \"16-20\": \"16-20\",\n \"20-24\": \"20-24\",\n \"24-32\": \"24-32\",\n \"32-40\": \"32-40\",\n \"40-48\": \"40-48\",\n \"48-64\": \"48-64\",\n \"64-80\": \"64-80\",\n \"80-120\": \"80-120\",\n \"120-160\": \"120-160\",\n} as const;\nexport type ResponsiveSpacingSizes = keyof typeof responsiveSpacingSizes;\n\nexport function getSpacingVariable(size: SpacingSizes | ResponsiveSpacingSizes) {\n return `var(--hds-spacing-${size})`;\n}\n","type Breakpoints = \"initial\" | \"small\" | \"medium\" | \"large\" | \"xlarge\";\n\ntype ResponsiveValues<T> = {\n [Breakpoint in Breakpoints]?: T;\n};\n\nexport type ResponsiveProp<T> = T | ResponsiveValues<T>;\n\nexport function getResponsiveProps<T>(\n variable: `--hds-${string}`,\n inputValues?: ResponsiveProp<T>,\n valueTransformer: (value: T) => string = (value) => String(value),\n) {\n if (!inputValues) return {};\n\n if (typeof inputValues !== \"object\") {\n return { [`${variable}-initial`]: valueTransformer(inputValues) };\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(inputValues as ResponsiveValues<T>)) {\n result[`${variable}-${key}`] = valueTransformer(value);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,6BAAqB;AAErB,mBAA2B;AAerB;AAHC,IAAM,gBAAkE;AAAA,EAC7E,CAAC,IAAkE,QAAQ;AAA1E,iBAAE,MAAI,YAAY,OAAO,WAAW,UAAU,QAfjD,IAeG,IAA0D,iBAA1D,IAA0D,CAAxD,MAAuB,aAAW,YAAU;AAC7C,WACE;AAAA,MAAC;AAAA,uCACK,OADL;AAAA,QAEC,eAAW;AAAA,UACT;AAAA,UACA,EAAE,uBAAuB,YAAY,OAAO;AAAA,UAC5C;AAAA,QACF;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,UAAU,cAAc;;;AC/BxB,YAAuB;AACvB,IAAAA,0BAAqB;AACrB,IAAAC,gBAA2B;AAC3B,wBAAqB;;;AC+Bd,SAAS,mBAAmB,MAA6C;AAC9E,SAAO,qBAAqB,IAAI;AAClC;;;AC5BO,SAAS,mBACd,UACA,aACA,mBAAyC,CAAC,UAAU,OAAO,KAAK,GAChE;AACA,MAAI,CAAC;AAAa,WAAO,CAAC;AAE1B,MAAI,OAAO,gBAAgB,UAAU;AACnC,WAAO,EAAE,CAAC,GAAG,QAAQ,UAAU,GAAG,iBAAiB,WAAW,EAAE;AAAA,EAClE;AAEA,QAAM,SAAiC,CAAC;AACxC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,WAAkC,GAAG;AAC7E,WAAO,GAAG,QAAQ,IAAI,GAAG,EAAE,IAAI,iBAAiB,KAAK;AAAA,EACvD;AAEA,SAAO;AACT;;;AF4BM,IAAAC,sBAAA;AAfC,IAAM,YAAQ;AAAA,EACnB,CACE,IACA,QACG;AAFH,iBAAE,YAAU,SAAS,WAAW,OAAO,QAAQ,KAAK,WAAW,MAAM,OAAO,QAxChF,IAwCI,IAAwF,iBAAxF,IAAwF,CAAtF,YAAU,WAAS,aAAW,SAAe,OAAK,aAAW,QAAM,SAAO;AAG5E,UAAM,YAAY,UAAU,yBAAO;AACnC,UAAM,QAA8B,8FAC/B,SACA,mBAAmB,mBAAmB,KAAK,kBAAkB,IAC7D,mBAAmB,yBAAyB,SAAS,IACrD,mBAAmB,oBAAoB,MAAM,CAAC,UAAW,QAAQ,SAAS,QAAS,IACnF,mBAAmB,qBAAqB,KAAK,IAC7C,mBAAmB,uBAAuB,OAAO;AAEtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,8BAAK,aAAa,SAAsB;AAAA,QACnD;AAAA,SACI,OAJL;AAAA,QAME;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;AAUb,IAAM,aAAS,0BAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,6CAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,QAAM;AACrD,CAAC;AACD,OAAO,cAAc;AAUd,IAAM,aAAS,0BAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,6CAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,WAAS;AACxD,CAAC;AACD,OAAO,cAAc;","names":["import_typed_classname","import_react","import_jsx_runtime"]}
@@ -6,8 +6,8 @@ import {
6
6
  HStack,
7
7
  Stack,
8
8
  VStack
9
- } from "../chunk-27XJO7E4.mjs";
10
- import "../chunk-ZTYEOZLK.mjs";
9
+ } from "../chunk-QGZU7Z2W.mjs";
10
+ import "../chunk-F4STR6SD.mjs";
11
11
  import "../chunk-NE6W2PCD.mjs";
12
12
  import "../chunk-R4SQKVDQ.mjs";
13
13
  export {
@@ -27,7 +27,7 @@ function getResponsiveProps(variable, inputValues, valueTransformer = (value) =>
27
27
  if (!inputValues)
28
28
  return {};
29
29
  if (typeof inputValues !== "object") {
30
- return { [`${variable}-xsmall`]: valueTransformer(inputValues) };
30
+ return { [`${variable}-initial`]: valueTransformer(inputValues) };
31
31
  }
32
32
  const result = {};
33
33
  for (const [key, value] of Object.entries(inputValues)) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/layout/responsive.ts"],"sourcesContent":["type Breakpoints = \"xsmall\" | \"small\" | \"medium\" | \"large\" | \"xlarge\";\n\ntype ResponsiveValues<T> = {\n [Breakpoint in Breakpoints]?: T;\n};\n\nexport type ResponsiveProp<T> = T | ResponsiveValues<T>;\n\nexport function getResponsiveProps<T>(\n variable: `--hds-${string}`,\n inputValues?: ResponsiveProp<T>,\n valueTransformer: (value: T) => string = (value) => String(value),\n) {\n if (!inputValues) return {};\n\n if (typeof inputValues !== \"object\") {\n return { [`${variable}-xsmall`]: valueTransformer(inputValues) };\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(inputValues as ResponsiveValues<T>)) {\n result[`${variable}-${key}`] = valueTransformer(value);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,SAAS,mBACd,UACA,aACA,mBAAyC,CAAC,UAAU,OAAO,KAAK,GAChE;AACA,MAAI,CAAC;AAAa,WAAO,CAAC;AAE1B,MAAI,OAAO,gBAAgB,UAAU;AACnC,WAAO,EAAE,CAAC,GAAG,QAAQ,SAAS,GAAG,iBAAiB,WAAW,EAAE;AAAA,EACjE;AAEA,QAAM,SAAiC,CAAC;AACxC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,WAAkC,GAAG;AAC7E,WAAO,GAAG,QAAQ,IAAI,GAAG,EAAE,IAAI,iBAAiB,KAAK;AAAA,EACvD;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/layout/responsive.ts"],"sourcesContent":["type Breakpoints = \"initial\" | \"small\" | \"medium\" | \"large\" | \"xlarge\";\n\ntype ResponsiveValues<T> = {\n [Breakpoint in Breakpoints]?: T;\n};\n\nexport type ResponsiveProp<T> = T | ResponsiveValues<T>;\n\nexport function getResponsiveProps<T>(\n variable: `--hds-${string}`,\n inputValues?: ResponsiveProp<T>,\n valueTransformer: (value: T) => string = (value) => String(value),\n) {\n if (!inputValues) return {};\n\n if (typeof inputValues !== \"object\") {\n return { [`${variable}-initial`]: valueTransformer(inputValues) };\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(inputValues as ResponsiveValues<T>)) {\n result[`${variable}-${key}`] = valueTransformer(value);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,SAAS,mBACd,UACA,aACA,mBAAyC,CAAC,UAAU,OAAO,KAAK,GAChE;AACA,MAAI,CAAC;AAAa,WAAO,CAAC;AAE1B,MAAI,OAAO,gBAAgB,UAAU;AACnC,WAAO,EAAE,CAAC,GAAG,QAAQ,UAAU,GAAG,iBAAiB,WAAW,EAAE;AAAA,EAClE;AAEA,QAAM,SAAiC,CAAC;AACxC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,WAAkC,GAAG;AAC7E,WAAO,GAAG,QAAQ,IAAI,GAAG,EAAE,IAAI,iBAAiB,KAAK;AAAA,EACvD;AAEA,SAAO;AACT;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getResponsiveProps
3
- } from "../chunk-ZTYEOZLK.mjs";
3
+ } from "../chunk-F4STR6SD.mjs";
4
4
  import "../chunk-R4SQKVDQ.mjs";
5
5
  export {
6
6
  getResponsiveProps
@@ -71,7 +71,7 @@ function getResponsiveProps(variable, inputValues, valueTransformer = (value) =>
71
71
  if (!inputValues)
72
72
  return {};
73
73
  if (typeof inputValues !== "object") {
74
- return { [`${variable}-xsmall`]: valueTransformer(inputValues) };
74
+ return { [`${variable}-initial`]: valueTransformer(inputValues) };
75
75
  }
76
76
  const result = {};
77
77
  for (const [key, value] of Object.entries(inputValues)) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/layout/stack/index.tsx","../../../src/layout/stack/stack.tsx","../../../src/layout/spacing.ts","../../../src/layout/responsive.ts"],"sourcesContent":["export { Stack, HStack, VStack } from \"./stack\";\nexport type * from \"./stack\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getSpacingVariable, type ResponsiveSpacingSizes, type SpacingSizes } from \"../spacing\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\n\ntype CSSPropertiesWithVar = React.CSSProperties & {\n \"--hds-stack-gap\"?: string;\n \"--hds-stack-direction\"?: string;\n \"--hds-stack-wrap\"?: string;\n \"--hds-stack-align\"?: string;\n \"--hds-stack-justify\"?: string;\n};\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n direction?: ResponsiveProp<React.CSSProperties[\"flexDirection\"]>;\n wrap?: ResponsiveProp<boolean>;\n align?: ResponsiveProp<React.CSSProperties[\"alignItems\"]>;\n justify?: ResponsiveProp<React.CSSProperties[\"justifyContent\"]>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n { children, asChild, className, style: _style, gap, direction, wrap, align, justify, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: CSSPropertiesWithVar = {\n ..._style,\n ...getResponsiveProps(\"--hds-stack-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-direction\", direction),\n ...getResponsiveProps(\"--hds-stack-wrap\", wrap, (value) => (value ? \"wrap\" : \"nowrap\")),\n ...getResponsiveProps(\"--hds-stack-align\", align),\n ...getResponsiveProps(\"--hds-stack-justify\", justify),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-stack\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStack.displayName = \"Stack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const HStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"row\" />;\n});\nHStack.displayName = \"HStack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const VStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"column\" />;\n});\nVStack.displayName = \"VStack\";\n","// TODO: Get from tokens package\n// For now it's fine, since it's still in this monorepo\nconst spacingSizes = {\n \"4\": \"4\",\n \"8\": \"8\",\n \"12\": \"12\",\n \"16\": \"16\",\n \"20\": \"20\",\n \"24\": \"24\",\n \"32\": \"32\",\n \"40\": \"40\",\n \"48\": \"48\",\n \"64\": \"64\",\n \"80\": \"80\",\n \"120\": \"120\",\n} as const;\nexport type SpacingSizes = keyof typeof spacingSizes;\n\nconst responsiveSpacingSizes = {\n \"4-8\": \"4-8\",\n \"8-12\": \"8-12\",\n \"12-16\": \"12-16\",\n \"16-20\": \"16-20\",\n \"20-24\": \"20-24\",\n \"24-32\": \"24-32\",\n \"32-40\": \"32-40\",\n \"40-48\": \"40-48\",\n \"48-64\": \"48-64\",\n \"64-80\": \"64-80\",\n \"80-120\": \"80-120\",\n \"120-160\": \"120-160\",\n} as const;\nexport type ResponsiveSpacingSizes = keyof typeof responsiveSpacingSizes;\n\nexport function getSpacingVariable(size: SpacingSizes | ResponsiveSpacingSizes) {\n return `var(--hds-spacing-${size})`;\n}\n","type Breakpoints = \"xsmall\" | \"small\" | \"medium\" | \"large\" | \"xlarge\";\n\ntype ResponsiveValues<T> = {\n [Breakpoint in Breakpoints]?: T;\n};\n\nexport type ResponsiveProp<T> = T | ResponsiveValues<T>;\n\nexport function getResponsiveProps<T>(\n variable: `--hds-${string}`,\n inputValues?: ResponsiveProp<T>,\n valueTransformer: (value: T) => string = (value) => String(value),\n) {\n if (!inputValues) return {};\n\n if (typeof inputValues !== \"object\") {\n return { [`${variable}-xsmall`]: valueTransformer(inputValues) };\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(inputValues as ResponsiveValues<T>)) {\n result[`${variable}-${key}`] = valueTransformer(value);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAAqB;AACrB,mBAA2B;AAC3B,wBAAqB;;;AC+Bd,SAAS,mBAAmB,MAA6C;AAC9E,SAAO,qBAAqB,IAAI;AAClC;;;AC5BO,SAAS,mBACd,UACA,aACA,mBAAyC,CAAC,UAAU,OAAO,KAAK,GAChE;AACA,MAAI,CAAC;AAAa,WAAO,CAAC;AAE1B,MAAI,OAAO,gBAAgB,UAAU;AACnC,WAAO,EAAE,CAAC,GAAG,QAAQ,SAAS,GAAG,iBAAiB,WAAW,EAAE;AAAA,EACjE;AAEA,QAAM,SAAiC,CAAC;AACxC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,WAAkC,GAAG;AAC7E,WAAO,GAAG,QAAQ,IAAI,GAAG,EAAE,IAAI,iBAAiB,KAAK;AAAA,EACvD;AAEA,SAAO;AACT;;;AF4BM;AAfC,IAAM,YAAQ;AAAA,EACnB,CACE,IACA,QACG;AAFH,iBAAE,YAAU,SAAS,WAAW,OAAO,QAAQ,KAAK,WAAW,MAAM,OAAO,QAxChF,IAwCI,IAAwF,iBAAxF,IAAwF,CAAtF,YAAU,WAAS,aAAW,SAAe,OAAK,aAAW,QAAM,SAAO;AAG5E,UAAM,YAAY,UAAU,yBAAO;AACnC,UAAM,QAA8B,8FAC/B,SACA,mBAAmB,mBAAmB,KAAK,kBAAkB,IAC7D,mBAAmB,yBAAyB,SAAS,IACrD,mBAAmB,oBAAoB,MAAM,CAAC,UAAW,QAAQ,SAAS,QAAS,IACnF,mBAAmB,qBAAqB,KAAK,IAC7C,mBAAmB,uBAAuB,OAAO;AAEtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,6BAAK,aAAa,SAAsB;AAAA,QACnD;AAAA,SACI,OAJL;AAAA,QAME;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;AAUb,IAAM,aAAS,yBAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,4CAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,QAAM;AACrD,CAAC;AACD,OAAO,cAAc;AAUd,IAAM,aAAS,yBAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,4CAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,WAAS;AACxD,CAAC;AACD,OAAO,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../src/layout/stack/index.tsx","../../../src/layout/stack/stack.tsx","../../../src/layout/spacing.ts","../../../src/layout/responsive.ts"],"sourcesContent":["export { Stack, HStack, VStack } from \"./stack\";\nexport type * from \"./stack\";\n","import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getSpacingVariable, type ResponsiveSpacingSizes, type SpacingSizes } from \"../spacing\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\n\ntype CSSPropertiesWithVar = React.CSSProperties & {\n \"--hds-stack-gap\"?: string;\n \"--hds-stack-direction\"?: string;\n \"--hds-stack-wrap\"?: string;\n \"--hds-stack-align\"?: string;\n \"--hds-stack-justify\"?: string;\n};\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n direction?: ResponsiveProp<React.CSSProperties[\"flexDirection\"]>;\n wrap?: ResponsiveProp<boolean>;\n align?: ResponsiveProp<React.CSSProperties[\"alignItems\"]>;\n justify?: ResponsiveProp<React.CSSProperties[\"justifyContent\"]>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n { children, asChild, className, style: _style, gap, direction, wrap, align, justify, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: CSSPropertiesWithVar = {\n ..._style,\n ...getResponsiveProps(\"--hds-stack-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-direction\", direction),\n ...getResponsiveProps(\"--hds-stack-wrap\", wrap, (value) => (value ? \"wrap\" : \"nowrap\")),\n ...getResponsiveProps(\"--hds-stack-align\", align),\n ...getResponsiveProps(\"--hds-stack-justify\", justify),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-stack\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStack.displayName = \"Stack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const HStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"row\" />;\n});\nHStack.displayName = \"HStack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const VStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"column\" />;\n});\nVStack.displayName = \"VStack\";\n","// TODO: Get from tokens package\n// For now it's fine, since it's still in this monorepo\nconst spacingSizes = {\n \"4\": \"4\",\n \"8\": \"8\",\n \"12\": \"12\",\n \"16\": \"16\",\n \"20\": \"20\",\n \"24\": \"24\",\n \"32\": \"32\",\n \"40\": \"40\",\n \"48\": \"48\",\n \"64\": \"64\",\n \"80\": \"80\",\n \"120\": \"120\",\n} as const;\nexport type SpacingSizes = keyof typeof spacingSizes;\n\nconst responsiveSpacingSizes = {\n \"4-8\": \"4-8\",\n \"8-12\": \"8-12\",\n \"12-16\": \"12-16\",\n \"16-20\": \"16-20\",\n \"20-24\": \"20-24\",\n \"24-32\": \"24-32\",\n \"32-40\": \"32-40\",\n \"40-48\": \"40-48\",\n \"48-64\": \"48-64\",\n \"64-80\": \"64-80\",\n \"80-120\": \"80-120\",\n \"120-160\": \"120-160\",\n} as const;\nexport type ResponsiveSpacingSizes = keyof typeof responsiveSpacingSizes;\n\nexport function getSpacingVariable(size: SpacingSizes | ResponsiveSpacingSizes) {\n return `var(--hds-spacing-${size})`;\n}\n","type Breakpoints = \"initial\" | \"small\" | \"medium\" | \"large\" | \"xlarge\";\n\ntype ResponsiveValues<T> = {\n [Breakpoint in Breakpoints]?: T;\n};\n\nexport type ResponsiveProp<T> = T | ResponsiveValues<T>;\n\nexport function getResponsiveProps<T>(\n variable: `--hds-${string}`,\n inputValues?: ResponsiveProp<T>,\n valueTransformer: (value: T) => string = (value) => String(value),\n) {\n if (!inputValues) return {};\n\n if (typeof inputValues !== \"object\") {\n return { [`${variable}-initial`]: valueTransformer(inputValues) };\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(inputValues as ResponsiveValues<T>)) {\n result[`${variable}-${key}`] = valueTransformer(value);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,6BAAqB;AACrB,mBAA2B;AAC3B,wBAAqB;;;AC+Bd,SAAS,mBAAmB,MAA6C;AAC9E,SAAO,qBAAqB,IAAI;AAClC;;;AC5BO,SAAS,mBACd,UACA,aACA,mBAAyC,CAAC,UAAU,OAAO,KAAK,GAChE;AACA,MAAI,CAAC;AAAa,WAAO,CAAC;AAE1B,MAAI,OAAO,gBAAgB,UAAU;AACnC,WAAO,EAAE,CAAC,GAAG,QAAQ,UAAU,GAAG,iBAAiB,WAAW,EAAE;AAAA,EAClE;AAEA,QAAM,SAAiC,CAAC;AACxC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,WAAkC,GAAG;AAC7E,WAAO,GAAG,QAAQ,IAAI,GAAG,EAAE,IAAI,iBAAiB,KAAK;AAAA,EACvD;AAEA,SAAO;AACT;;;AF4BM;AAfC,IAAM,YAAQ;AAAA,EACnB,CACE,IACA,QACG;AAFH,iBAAE,YAAU,SAAS,WAAW,OAAO,QAAQ,KAAK,WAAW,MAAM,OAAO,QAxChF,IAwCI,IAAwF,iBAAxF,IAAwF,CAAtF,YAAU,WAAS,aAAW,SAAe,OAAK,aAAW,QAAM,SAAO;AAG5E,UAAM,YAAY,UAAU,yBAAO;AACnC,UAAM,QAA8B,8FAC/B,SACA,mBAAmB,mBAAmB,KAAK,kBAAkB,IAC7D,mBAAmB,yBAAyB,SAAS,IACrD,mBAAmB,oBAAoB,MAAM,CAAC,UAAW,QAAQ,SAAS,QAAS,IACnF,mBAAmB,qBAAqB,KAAK,IAC7C,mBAAmB,uBAAuB,OAAO;AAEtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,6BAAK,aAAa,SAAsB;AAAA,QACnD;AAAA,SACI,OAJL;AAAA,QAME;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;AAUb,IAAM,aAAS,yBAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,4CAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,QAAM;AACrD,CAAC;AACD,OAAO,cAAc;AAUd,IAAM,aAAS,yBAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,4CAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,WAAS;AACxD,CAAC;AACD,OAAO,cAAc;","names":[]}
@@ -2,8 +2,8 @@ import {
2
2
  HStack,
3
3
  Stack,
4
4
  VStack
5
- } from "../../chunk-27XJO7E4.mjs";
6
- import "../../chunk-ZTYEOZLK.mjs";
5
+ } from "../../chunk-QGZU7Z2W.mjs";
6
+ import "../../chunk-F4STR6SD.mjs";
7
7
  import "../../chunk-NE6W2PCD.mjs";
8
8
  import "../../chunk-R4SQKVDQ.mjs";
9
9
  export {
@@ -69,7 +69,7 @@ function getResponsiveProps(variable, inputValues, valueTransformer = (value) =>
69
69
  if (!inputValues)
70
70
  return {};
71
71
  if (typeof inputValues !== "object") {
72
- return { [`${variable}-xsmall`]: valueTransformer(inputValues) };
72
+ return { [`${variable}-initial`]: valueTransformer(inputValues) };
73
73
  }
74
74
  const result = {};
75
75
  for (const [key, value] of Object.entries(inputValues)) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/layout/stack/stack.tsx","../../../src/layout/spacing.ts","../../../src/layout/responsive.ts"],"sourcesContent":["import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getSpacingVariable, type ResponsiveSpacingSizes, type SpacingSizes } from \"../spacing\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\n\ntype CSSPropertiesWithVar = React.CSSProperties & {\n \"--hds-stack-gap\"?: string;\n \"--hds-stack-direction\"?: string;\n \"--hds-stack-wrap\"?: string;\n \"--hds-stack-align\"?: string;\n \"--hds-stack-justify\"?: string;\n};\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n direction?: ResponsiveProp<React.CSSProperties[\"flexDirection\"]>;\n wrap?: ResponsiveProp<boolean>;\n align?: ResponsiveProp<React.CSSProperties[\"alignItems\"]>;\n justify?: ResponsiveProp<React.CSSProperties[\"justifyContent\"]>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n { children, asChild, className, style: _style, gap, direction, wrap, align, justify, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: CSSPropertiesWithVar = {\n ..._style,\n ...getResponsiveProps(\"--hds-stack-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-direction\", direction),\n ...getResponsiveProps(\"--hds-stack-wrap\", wrap, (value) => (value ? \"wrap\" : \"nowrap\")),\n ...getResponsiveProps(\"--hds-stack-align\", align),\n ...getResponsiveProps(\"--hds-stack-justify\", justify),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-stack\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStack.displayName = \"Stack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const HStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"row\" />;\n});\nHStack.displayName = \"HStack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const VStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"column\" />;\n});\nVStack.displayName = \"VStack\";\n","// TODO: Get from tokens package\n// For now it's fine, since it's still in this monorepo\nconst spacingSizes = {\n \"4\": \"4\",\n \"8\": \"8\",\n \"12\": \"12\",\n \"16\": \"16\",\n \"20\": \"20\",\n \"24\": \"24\",\n \"32\": \"32\",\n \"40\": \"40\",\n \"48\": \"48\",\n \"64\": \"64\",\n \"80\": \"80\",\n \"120\": \"120\",\n} as const;\nexport type SpacingSizes = keyof typeof spacingSizes;\n\nconst responsiveSpacingSizes = {\n \"4-8\": \"4-8\",\n \"8-12\": \"8-12\",\n \"12-16\": \"12-16\",\n \"16-20\": \"16-20\",\n \"20-24\": \"20-24\",\n \"24-32\": \"24-32\",\n \"32-40\": \"32-40\",\n \"40-48\": \"40-48\",\n \"48-64\": \"48-64\",\n \"64-80\": \"64-80\",\n \"80-120\": \"80-120\",\n \"120-160\": \"120-160\",\n} as const;\nexport type ResponsiveSpacingSizes = keyof typeof responsiveSpacingSizes;\n\nexport function getSpacingVariable(size: SpacingSizes | ResponsiveSpacingSizes) {\n return `var(--hds-spacing-${size})`;\n}\n","type Breakpoints = \"xsmall\" | \"small\" | \"medium\" | \"large\" | \"xlarge\";\n\ntype ResponsiveValues<T> = {\n [Breakpoint in Breakpoints]?: T;\n};\n\nexport type ResponsiveProp<T> = T | ResponsiveValues<T>;\n\nexport function getResponsiveProps<T>(\n variable: `--hds-${string}`,\n inputValues?: ResponsiveProp<T>,\n valueTransformer: (value: T) => string = (value) => String(value),\n) {\n if (!inputValues) return {};\n\n if (typeof inputValues !== \"object\") {\n return { [`${variable}-xsmall`]: valueTransformer(inputValues) };\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(inputValues as ResponsiveValues<T>)) {\n result[`${variable}-${key}`] = valueTransformer(value);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,6BAAqB;AACrB,mBAA2B;AAC3B,wBAAqB;;;AC+Bd,SAAS,mBAAmB,MAA6C;AAC9E,SAAO,qBAAqB,IAAI;AAClC;;;AC5BO,SAAS,mBACd,UACA,aACA,mBAAyC,CAAC,UAAU,OAAO,KAAK,GAChE;AACA,MAAI,CAAC;AAAa,WAAO,CAAC;AAE1B,MAAI,OAAO,gBAAgB,UAAU;AACnC,WAAO,EAAE,CAAC,GAAG,QAAQ,SAAS,GAAG,iBAAiB,WAAW,EAAE;AAAA,EACjE;AAEA,QAAM,SAAiC,CAAC;AACxC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,WAAkC,GAAG;AAC7E,WAAO,GAAG,QAAQ,IAAI,GAAG,EAAE,IAAI,iBAAiB,KAAK;AAAA,EACvD;AAEA,SAAO;AACT;;;AF4BM;AAfC,IAAM,YAAQ;AAAA,EACnB,CACE,IACA,QACG;AAFH,iBAAE,YAAU,SAAS,WAAW,OAAO,QAAQ,KAAK,WAAW,MAAM,OAAO,QAxChF,IAwCI,IAAwF,iBAAxF,IAAwF,CAAtF,YAAU,WAAS,aAAW,SAAe,OAAK,aAAW,QAAM,SAAO;AAG5E,UAAM,YAAY,UAAU,yBAAO;AACnC,UAAM,QAA8B,8FAC/B,SACA,mBAAmB,mBAAmB,KAAK,kBAAkB,IAC7D,mBAAmB,yBAAyB,SAAS,IACrD,mBAAmB,oBAAoB,MAAM,CAAC,UAAW,QAAQ,SAAS,QAAS,IACnF,mBAAmB,qBAAqB,KAAK,IAC7C,mBAAmB,uBAAuB,OAAO;AAEtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW,6BAAK,aAAa,SAAsB;AAAA,QACnD;AAAA,SACI,OAJL;AAAA,QAME;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;AAUb,IAAM,aAAS,yBAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,4CAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,QAAM;AACrD,CAAC;AACD,OAAO,cAAc;AAUd,IAAM,aAAS,yBAA0D,CAAC,OAAO,QAAQ;AAC9F,SAAO,4CAAC,sCAAM,OAAc,QAApB,EAA2B,WAAU,WAAS;AACxD,CAAC;AACD,OAAO,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../src/layout/stack/stack.tsx","../../../src/layout/spacing.ts","../../../src/layout/responsive.ts"],"sourcesContent":["import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { getSpacingVariable, type ResponsiveSpacingSizes, type SpacingSizes } from \"../spacing\";\nimport { getResponsiveProps, type ResponsiveProp } from \"../responsive\";\n\ntype CSSPropertiesWithVar = React.CSSProperties & {\n \"--hds-stack-gap\"?: string;\n \"--hds-stack-direction\"?: string;\n \"--hds-stack-wrap\"?: string;\n \"--hds-stack-align\"?: string;\n \"--hds-stack-justify\"?: string;\n};\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode;\n\n gap?: ResponsiveProp<SpacingSizes> | ResponsiveSpacingSizes;\n direction?: ResponsiveProp<React.CSSProperties[\"flexDirection\"]>;\n wrap?: ResponsiveProp<boolean>;\n align?: ResponsiveProp<React.CSSProperties[\"alignItems\"]>;\n justify?: ResponsiveProp<React.CSSProperties[\"justifyContent\"]>;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n (\n { children, asChild, className, style: _style, gap, direction, wrap, align, justify, ...rest },\n ref,\n ) => {\n const Component = asChild ? Slot : \"div\";\n const style: CSSPropertiesWithVar = {\n ..._style,\n ...getResponsiveProps(\"--hds-stack-gap\", gap, getSpacingVariable),\n ...getResponsiveProps(\"--hds-stack-direction\", direction),\n ...getResponsiveProps(\"--hds-stack-wrap\", wrap, (value) => (value ? \"wrap\" : \"nowrap\")),\n ...getResponsiveProps(\"--hds-stack-align\", align),\n ...getResponsiveProps(\"--hds-stack-justify\", justify),\n };\n return (\n <Component\n style={style}\n className={clsx(\"hds-stack\", className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStack.displayName = \"Stack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const HStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"row\" />;\n});\nHStack.displayName = \"HStack\";\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n *\n * TODO\n * - [ ] Add more examples\n * - [ ] Document usage\n * - [ ] Document props\n */\nexport const VStack = forwardRef<HTMLDivElement, Omit<StackProps, \"direction\">>((props, ref) => {\n return <Stack ref={ref} {...props} direction=\"column\" />;\n});\nVStack.displayName = \"VStack\";\n","// TODO: Get from tokens package\n// For now it's fine, since it's still in this monorepo\nconst spacingSizes = {\n \"4\": \"4\",\n \"8\": \"8\",\n \"12\": \"12\",\n \"16\": \"16\",\n \"20\": \"20\",\n \"24\": \"24\",\n \"32\": \"32\",\n \"40\": \"40\",\n \"48\": \"48\",\n \"64\": \"64\",\n \"80\": \"80\",\n \"120\": \"120\",\n} as const;\nexport type SpacingSizes = keyof typeof spacingSizes;\n\nconst responsiveSpacingSizes = {\n \"4-8\": \"4-8\",\n \"8-12\": \"8-12\",\n \"12-16\": \"12-16\",\n \"16-20\": \"16-20\",\n \"20-24\": \"20-24\",\n \"24-32\": \"24-32\",\n \"32-40\": \"32-40\",\n \"40-48\": \"40-48\",\n \"48-64\": \"48-64\",\n \"64-80\": \"64-80\",\n \"80-120\": \"80-120\",\n \"120-160\": \"120-160\",\n} as const;\nexport type ResponsiveSpacingSizes = keyof typeof responsiveSpacingSizes;\n\nexport function getSpacingVariable(size: SpacingSizes | ResponsiveSpacingSizes) {\n return `var(--hds-spacing-${size})`;\n}\n","type Breakpoints = \"initial\" | \"small\" | \"medium\" | \"large\" | \"xlarge\";\n\ntype ResponsiveValues<T> = {\n [Breakpoint in Breakpoints]?: T;\n};\n\nexport type ResponsiveProp<T> = T | ResponsiveValues<T>;\n\nexport function getResponsiveProps<T>(\n variable: `--hds-${string}`,\n inputValues?: ResponsiveProp<T>,\n valueTransformer: (value: T) => string = (value) => String(value),\n) {\n if (!inputValues) return {};\n\n if (typeof inputValues !== \"object\") {\n return { [`${variable}-initial`]: valueTransformer(inputValues) };\n }\n\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(inputValues as ResponsiveValues<T>)) {\n result[`${variable}-${key}`] = valueTransformer(value);\n }\n\n return result;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,6BAAqB;AACrB,mBAA2B;AAC3B,wBAAqB;;;AC+Bd,SAAS,mBAAmB,MAA6C;AAC9E,SAAO,qBAAqB,IAAI;AAClC;;;AC5BO,SAAS,mBACd,UACA,aACA,mBAAyC,CAAC,UAAU,OAAO,KAAK,GAChE;AACA,MAAI,CAAC;AAAa,WAAO,CAAC;AAE1B,MAAI,OAAO,gBAAg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VStack
5
- } from "../../chunk-27XJO7E4.mjs";
6
- import "../../chunk-ZTYEOZLK.mjs";
5
+ } from "../../chunk-QGZU7Z2W.mjs";
6
+ import "../../chunk-F4STR6SD.mjs";
7
7
  import "../../chunk-NE6W2PCD.mjs";
8
8
  import "../../chunk-R4SQKVDQ.mjs";
9
9
  export {
@@ -1 +1,3 @@
1
1
  export { Message_alias_2 as Message } from '../_tsup-dts-rollup';
2
+ export { MessageTitle_alias_2 as MessageTitle } from '../_tsup-dts-rollup';
3
+ export { MessageDescription_alias_2 as MessageDescription } from '../_tsup-dts-rollup';
@@ -1 +1,3 @@
1
1
  export { Message_alias_2 as Message } from '../_tsup-dts-rollup';
2
+ export { MessageTitle_alias_2 as MessageTitle } from '../_tsup-dts-rollup';
3
+ export { MessageDescription_alias_2 as MessageDescription } from '../_tsup-dts-rollup';
@@ -49,7 +49,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
49
49
  // src/message/index.tsx
50
50
  var message_exports = {};
51
51
  __export(message_exports, {
52
- Message: () => MessageComponent
52
+ Message: () => MessageComponent,
53
+ MessageDescription: () => MessageDescription,
54
+ MessageTitle: () => MessageTitle
53
55
  });
54
56
  module.exports = __toCommonJS(message_exports);
55
57
 
@@ -182,6 +184,8 @@ MessageComponent.Title = MessageTitle;
182
184
  MessageComponent.Description = MessageDescription;
183
185
  // Annotate the CommonJS export names for ESM import in node:
184
186
  0 && (module.exports = {
185
- Message
187
+ Message,
188
+ MessageDescription,
189
+ MessageTitle
186
190
  });
187
191
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/message/index.tsx","../../src/message/message.tsx","../../src/box/box.tsx"],"sourcesContent":["import { Message, MessageTitle, MessageDescription } from \"./message\";\n\nconst MessageComponent = Message as typeof Message & {\n Title: typeof MessageTitle;\n Description: typeof MessageDescription;\n};\n\nMessageComponent.Title = MessageTitle;\nMessageComponent.Description = MessageDescription;\n\nexport { MessageComponent as Message };\n","import React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { Box, type BoxProps } from \"../box/box\";\n\nexport type MessageProps = (\n | {\n variant?: \"success\" | \"attention\" | \"warning\";\n icon?: never;\n iconClassName?: never;\n }\n | {\n variant: \"neutral\";\n icon?: React.ReactNode;\n iconClassName?: string;\n }\n) &\n Omit<BoxProps, \"variant\">;\n\nexport const Message: OverridableComponent<MessageProps, HTMLDivElement> = forwardRef(\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);\nMessage.displayName = \"Message\";\n\nexport const MessageTitle: OverridableComponent<object, HTMLParagraphElement> = forwardRef(\n ({ as: Component = \"p\", className, ...rest }, ref) => {\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 const MessageDescription: OverridableComponent<object, HTMLParagraphElement> = forwardRef(\n ({ as: Component = \"p\", className, ...rest }, ref) => {\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","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n children?: React.ReactNode;\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 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\nexport const Box: OverridableComponent<BoxProps, HTMLDivElement> = forwardRef(\n (\n {\n as: Component = \"div\",\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\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 {children}\n </Component>\n );\n },\n);\nBox.displayName = \"Box\";\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;A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ACF;AACA,eAAe,cAAc;;;AD7EvB,IAAAC,sBAAA;AAHC,IAAM,cAA8D;AAAA,EACzE,CAAC,IAA4E,QAAQ;AAApF,iBAAE,YAAU,WAAW,UAAU,WAAW,MAAM,cApBrD,IAoBG,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;AAEf,IAAM,mBAAmE;AAAA,EAC9E,CAAC,IAA6C,QAAQ;AAArD,iBAAE,MAAI,YAAY,KAAK,UAxC1B,IAwCG,IAAqC,iBAArC,IAAqC,CAAnC,MAAqB;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,8BAAK,sBAAsB,SAAsB;AAAA,QAC5D;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,aAAa,cAAc;AAEpB,IAAM,yBAAyE;AAAA,EACpF,CAAC,IAA6C,QAAQ;AAArD,iBAAE,MAAI,YAAY,KAAK,UArD1B,IAqDG,IAAqC,iBAArC,IAAqC,CAAnC,MAAqB;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,8BAAK,4BAA4B,SAAsB;AAAA,QAClE;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AACA,mBAAmB,cAAc;;;AD7DjC,IAAM,mBAAmB;AAKzB,iBAAiB,QAAQ;AACzB,iBAAiB,cAAc;","names":["import_react","import_typed_classname","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/message/index.tsx","../../src/message/message.tsx","../../src/box/box.tsx"],"sourcesContent":["import { Message, MessageTitle, MessageDescription } from \"./message\";\n\nconst MessageComponent = Message as typeof Message & {\n Title: typeof MessageTitle;\n Description: typeof MessageDescription;\n};\n\nMessageComponent.Title = MessageTitle;\nMessageComponent.Description = MessageDescription;\n\nexport { MessageComponent as Message, MessageTitle, MessageDescription };\n","import React, { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\nimport { Box, type BoxProps } from \"../box/box\";\n\nexport type MessageProps = (\n | {\n variant?: \"success\" | \"attention\" | \"warning\";\n icon?: never;\n iconClassName?: never;\n }\n | {\n variant: \"neutral\";\n icon?: React.ReactNode;\n iconClassName?: string;\n }\n) &\n Omit<BoxProps, \"variant\">;\n\nexport const Message: OverridableComponent<MessageProps, HTMLDivElement> = forwardRef(\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);\nMessage.displayName = \"Message\";\n\nexport const MessageTitle: OverridableComponent<object, HTMLParagraphElement> = forwardRef(\n ({ as: Component = \"p\", className, ...rest }, ref) => {\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 const MessageDescription: OverridableComponent<object, HTMLParagraphElement> = forwardRef(\n ({ as: Component = \"p\", className, ...rest }, ref) => {\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","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n children?: React.ReactNode;\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 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\nexport const Box: OverridableComponent<BoxProps, HTMLDivElement> = forwardRef(\n (\n {\n as: Component = \"div\",\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\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 {children}\n </Component>\n );\n },\n);\nBox.displayName = \"Box\";\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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zB,iBAAiB,QAAQ;AACzB,iBAAiB,cAAc;","names":["import_react","import_typed_classname","import_jsx_runtime"]}
@@ -1,10 +1,15 @@
1
1
  import {
2
2
  MessageComponent
3
- } from "../chunk-AR2NOI4U.mjs";
4
- import "../chunk-ME66RUR6.mjs";
3
+ } from "../chunk-EJ7ANN7M.mjs";
4
+ import {
5
+ MessageDescription,
6
+ MessageTitle
7
+ } from "../chunk-ME66RUR6.mjs";
5
8
  import "../chunk-EGXM575K.mjs";
6
9
  import "../chunk-R4SQKVDQ.mjs";
7
10
  export {
8
- MessageComponent as Message
11
+ MessageComponent as Message,
12
+ MessageDescription,
13
+ MessageTitle
9
14
  };
10
15
  //# sourceMappingURL=index.mjs.map
@@ -1,4 +1,4 @@
1
1
  export { MessageProps } from '../_tsup-dts-rollup';
2
2
  export { Message_alias_3 as Message } from '../_tsup-dts-rollup';
3
- export { MessageTitle } from '../_tsup-dts-rollup';
4
- export { MessageDescription } from '../_tsup-dts-rollup';
3
+ export { MessageTitle_alias_3 as MessageTitle } from '../_tsup-dts-rollup';
4
+ export { MessageDescription_alias_3 as MessageDescription } from '../_tsup-dts-rollup';
@@ -1,4 +1,4 @@
1
1
  export { MessageProps } from '../_tsup-dts-rollup';
2
2
  export { Message_alias_3 as Message } from '../_tsup-dts-rollup';
3
- export { MessageTitle } from '../_tsup-dts-rollup';
4
- export { MessageDescription } from '../_tsup-dts-rollup';
3
+ export { MessageTitle_alias_3 as MessageTitle } from '../_tsup-dts-rollup';
4
+ export { MessageDescription_alias_3 as MessageDescription } from '../_tsup-dts-rollup';
@@ -1,6 +1,6 @@
1
1
  export { Modal_alias_2 as Modal } from '../_tsup-dts-rollup';
2
- export { useScrollLock_alias_2 as useScrollLock } from '../_tsup-dts-rollup';
3
- export { ModalProps_alias_2 as ModalProps } from '../_tsup-dts-rollup';
4
2
  export { ModalHeader_alias_2 as ModalHeader } from '../_tsup-dts-rollup';
5
3
  export { ModalContent_alias_2 as ModalContent } from '../_tsup-dts-rollup';
6
4
  export { ModalFooter_alias_2 as ModalFooter } from '../_tsup-dts-rollup';
5
+ export { useScrollLock_alias_2 as useScrollLock } from '../_tsup-dts-rollup';
6
+ export { ModalProps_alias_2 as ModalProps } from '../_tsup-dts-rollup';
@@ -1,6 +1,6 @@
1
1
  export { Modal_alias_2 as Modal } from '../_tsup-dts-rollup';
2
- export { useScrollLock_alias_2 as useScrollLock } from '../_tsup-dts-rollup';
3
- export { ModalProps_alias_2 as ModalProps } from '../_tsup-dts-rollup';
4
2
  export { ModalHeader_alias_2 as ModalHeader } from '../_tsup-dts-rollup';
5
3
  export { ModalContent_alias_2 as ModalContent } from '../_tsup-dts-rollup';
6
4
  export { ModalFooter_alias_2 as ModalFooter } from '../_tsup-dts-rollup';
5
+ export { useScrollLock_alias_2 as useScrollLock } from '../_tsup-dts-rollup';
6
+ export { ModalProps_alias_2 as ModalProps } from '../_tsup-dts-rollup';
@@ -59,7 +59,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
59
59
  // src/modal/index.tsx
60
60
  var modal_exports = {};
61
61
  __export(modal_exports, {
62
- Modal: () => ModalComponent
62
+ Modal: () => ModalComponent,
63
+ ModalContent: () => ModalContent,
64
+ ModalFooter: () => ModalFooter,
65
+ ModalHeader: () => ModalHeader
63
66
  });
64
67
  module.exports = __toCommonJS(modal_exports);
65
68
 
@@ -274,6 +277,9 @@ ModalComponent.Content = ModalContent;
274
277
  ModalComponent.Footer = ModalFooter;
275
278
  // Annotate the CommonJS export names for ESM import in node:
276
279
  0 && (module.exports = {
277
- Modal
280
+ Modal,
281
+ ModalContent,
282
+ ModalFooter,
283
+ ModalHeader
278
284
  });
279
285
  //# sourceMappingURL=index.js.map