@postenbring/hedwig-react 0.0.65 → 0.0.66
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.
- package/dist/_tsup-dts-rollup.d.mts +133 -52
- package/dist/_tsup-dts-rollup.d.ts +133 -52
- package/dist/accordion/index.mjs +3 -3
- package/dist/chunk-27XJO7E4.mjs +51 -0
- package/dist/chunk-27XJO7E4.mjs.map +1 -0
- package/dist/{chunk-POJTVNEO.mjs → chunk-2ICZ3Q7N.mjs} +1 -1
- package/dist/chunk-2ICZ3Q7N.mjs.map +1 -0
- package/dist/{chunk-TE5M6GJB.mjs → chunk-2JH4FG63.mjs} +2 -2
- package/dist/{chunk-XFSZBILE.mjs → chunk-6NGF7FFY.mjs} +2 -2
- package/dist/{chunk-EHUVLDIZ.mjs → chunk-BZRCDLEW.mjs} +11 -14
- package/dist/chunk-BZRCDLEW.mjs.map +1 -0
- package/dist/{chunk-MUVJAMFN.mjs → chunk-CLXHNRAI.mjs} +7 -7
- package/dist/chunk-CLXHNRAI.mjs.map +1 -0
- package/dist/{chunk-HXV2UMEV.mjs → chunk-DM4PJFLG.mjs} +2 -2
- package/dist/{chunk-HXV2UMEV.mjs.map → chunk-DM4PJFLG.mjs.map} +1 -1
- package/dist/{chunk-RLUXDZ6X.mjs → chunk-HMB4TY2F.mjs} +3 -3
- package/dist/{chunk-VFFIUNR6.mjs → chunk-IFGQR4J6.mjs} +5 -5
- package/dist/chunk-IFGQR4J6.mjs.map +1 -0
- package/dist/chunk-L4GQJETB.mjs +1 -0
- package/dist/{chunk-QSYU64U4.mjs → chunk-MRCE2Q7A.mjs} +2 -2
- package/dist/chunk-NE6W2PCD.mjs +9 -0
- package/dist/chunk-NE6W2PCD.mjs.map +1 -0
- package/dist/{chunk-X7EKQZNU.mjs → chunk-RHCMBJOT.mjs} +2 -2
- package/dist/{chunk-U2MRMUB2.mjs → chunk-RXIP2JTE.mjs} +2 -2
- package/dist/{chunk-DEVTAZKG.mjs → chunk-X46LM2QH.mjs} +2 -1
- package/dist/{chunk-DEVTAZKG.mjs.map → chunk-X46LM2QH.mjs.map} +1 -1
- package/dist/{chunk-LIQ3FB56.mjs → chunk-XIHKASNB.mjs} +7 -7
- package/dist/chunk-ZTYEOZLK.mjs +18 -0
- package/dist/chunk-ZTYEOZLK.mjs.map +1 -0
- package/dist/footer/footer.js +9 -12
- package/dist/footer/footer.js.map +1 -1
- package/dist/footer/footer.mjs +5 -5
- package/dist/footer/index.js +9 -12
- package/dist/footer/index.js.map +1 -1
- package/dist/footer/index.mjs +6 -6
- package/dist/form/checkbox/checkbox.js +1 -1
- package/dist/form/checkbox/checkbox.js.map +1 -1
- package/dist/form/checkbox/checkbox.mjs +2 -2
- package/dist/form/checkbox/index.js +1 -1
- package/dist/form/checkbox/index.js.map +1 -1
- package/dist/form/checkbox/index.mjs +2 -2
- package/dist/form/fieldset/fieldset.js +1 -1
- package/dist/form/fieldset/fieldset.js.map +1 -1
- package/dist/form/fieldset/fieldset.mjs +1 -1
- package/dist/form/fieldset/index.js +1 -1
- package/dist/form/fieldset/index.js.map +1 -1
- package/dist/form/fieldset/index.mjs +1 -1
- package/dist/form/index.js +1 -1
- package/dist/form/index.js.map +1 -1
- package/dist/form/index.mjs +14 -14
- package/dist/form/radiobutton/index.js +1 -1
- package/dist/form/radiobutton/index.js.map +1 -1
- package/dist/form/radiobutton/index.mjs +3 -3
- package/dist/form/radiobutton/radiobutton.js +1 -1
- package/dist/form/radiobutton/radiobutton.js.map +1 -1
- package/dist/form/radiobutton/radiobutton.mjs +3 -3
- package/dist/form/radiobutton/radiogroup.js +1 -1
- package/dist/form/radiobutton/radiogroup.js.map +1 -1
- package/dist/form/radiobutton/radiogroup.mjs +2 -2
- package/dist/index-no-css.d.mts +10 -6
- package/dist/index-no-css.d.ts +10 -6
- package/dist/index-no-css.js +267 -201
- package/dist/index-no-css.js.map +1 -1
- package/dist/index-no-css.mjs +66 -46
- package/dist/index.d.mts +10 -6
- package/dist/index.d.ts +10 -6
- package/dist/index.js +267 -201
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +66 -46
- package/dist/index.mjs.map +1 -1
- package/dist/layout/index.d.mts +5 -1
- package/dist/layout/index.d.ts +5 -1
- package/dist/layout/index.js +62 -2
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/index.mjs +12 -2
- package/dist/layout/responsive.d.mts +2 -0
- package/dist/layout/responsive.d.ts +2 -0
- package/dist/layout/responsive.js +42 -0
- package/dist/layout/responsive.js.map +1 -0
- package/dist/layout/responsive.mjs +8 -0
- package/dist/layout/responsive.mjs.map +1 -0
- package/dist/layout/spacing.d.mts +3 -0
- package/dist/layout/spacing.d.ts +3 -0
- package/dist/layout/spacing.js +33 -0
- package/dist/layout/spacing.js.map +1 -0
- package/dist/layout/spacing.mjs +8 -0
- package/dist/layout/spacing.mjs.map +1 -0
- package/dist/layout/stack/index.d.mts +4 -0
- package/dist/layout/stack/index.d.ts +4 -0
- package/dist/layout/stack/index.js +117 -0
- package/dist/layout/stack/index.js.map +1 -0
- package/dist/layout/stack/index.mjs +14 -0
- package/dist/layout/stack/index.mjs.map +1 -0
- package/dist/layout/stack/stack.d.mts +4 -0
- package/dist/layout/stack/stack.d.ts +4 -0
- package/dist/layout/stack/stack.js +115 -0
- package/dist/layout/stack/stack.js.map +1 -0
- package/dist/layout/stack/stack.mjs +14 -0
- package/dist/layout/stack/stack.mjs.map +1 -0
- package/dist/modal/index.js.map +1 -1
- package/dist/modal/index.mjs +2 -2
- package/dist/modal/modal.js.map +1 -1
- package/dist/modal/modal.mjs +1 -1
- package/dist/navbar/index.js +1 -0
- package/dist/navbar/index.js.map +1 -1
- package/dist/navbar/index.mjs +2 -2
- package/dist/navbar/navbar-expandable-menu.js +1 -0
- package/dist/navbar/navbar-expandable-menu.js.map +1 -1
- package/dist/navbar/navbar-expandable-menu.mjs +1 -1
- package/dist/tabs/index.d.mts +5 -5
- package/dist/tabs/index.d.ts +5 -5
- package/dist/tabs/index.js +13 -5
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +15 -5
- package/dist/tabs/tabs-list.d.mts +2 -2
- package/dist/tabs/tabs-list.d.ts +2 -2
- package/dist/tabs/tabs-list.js +6 -6
- package/dist/tabs/tabs-list.js.map +1 -1
- package/dist/tabs/tabs-list.mjs +6 -6
- package/package.json +4 -4
- package/dist/chunk-EHUVLDIZ.mjs.map +0 -1
- package/dist/chunk-MUVJAMFN.mjs.map +0 -1
- package/dist/chunk-OIQUYB26.mjs +0 -1
- package/dist/chunk-POJTVNEO.mjs.map +0 -1
- package/dist/chunk-VFFIUNR6.mjs.map +0 -1
- /package/dist/{chunk-TE5M6GJB.mjs.map → chunk-2JH4FG63.mjs.map} +0 -0
- /package/dist/{chunk-XFSZBILE.mjs.map → chunk-6NGF7FFY.mjs.map} +0 -0
- /package/dist/{chunk-RLUXDZ6X.mjs.map → chunk-HMB4TY2F.mjs.map} +0 -0
- /package/dist/{chunk-OIQUYB26.mjs.map → chunk-L4GQJETB.mjs.map} +0 -0
- /package/dist/{chunk-QSYU64U4.mjs.map → chunk-MRCE2Q7A.mjs.map} +0 -0
- /package/dist/{chunk-X7EKQZNU.mjs.map → chunk-RHCMBJOT.mjs.map} +0 -0
- /package/dist/{chunk-U2MRMUB2.mjs.map → chunk-RXIP2JTE.mjs.map} +0 -0
- /package/dist/{chunk-LIQ3FB56.mjs.map → chunk-XIHKASNB.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import "./chunk-YWNVB7TY.mjs";
|
|
2
|
+
import "./chunk-3D2MWIEX.mjs";
|
|
3
|
+
import {
|
|
4
|
+
WarningBanner
|
|
5
|
+
} from "./chunk-IAS3E2S3.mjs";
|
|
2
6
|
import {
|
|
3
7
|
TabsComponent
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import
|
|
6
|
-
|
|
8
|
+
} from "./chunk-IFGQR4J6.mjs";
|
|
9
|
+
import {
|
|
10
|
+
TabsContent,
|
|
11
|
+
TabsContents
|
|
12
|
+
} from "./chunk-UWTGHSWT.mjs";
|
|
13
|
+
import {
|
|
14
|
+
TabsList,
|
|
15
|
+
TabsTab
|
|
16
|
+
} from "./chunk-CLXHNRAI.mjs";
|
|
7
17
|
import "./chunk-XVFQWVHO.mjs";
|
|
8
18
|
import {
|
|
9
19
|
TextBody,
|
|
@@ -23,38 +33,48 @@ import {
|
|
|
23
33
|
import {
|
|
24
34
|
Text
|
|
25
35
|
} from "./chunk-57SSGJ4X.mjs";
|
|
26
|
-
import "./chunk-3D2MWIEX.mjs";
|
|
27
36
|
import {
|
|
28
|
-
|
|
29
|
-
} from "./chunk-
|
|
37
|
+
ModalComponent
|
|
38
|
+
} from "./chunk-MRCE2Q7A.mjs";
|
|
39
|
+
import "./chunk-2ICZ3Q7N.mjs";
|
|
30
40
|
import {
|
|
31
41
|
NavbarComponent
|
|
32
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-2JH4FG63.mjs";
|
|
33
43
|
import {
|
|
34
44
|
useNavbarExpendableMenuContext
|
|
35
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-X46LM2QH.mjs";
|
|
36
46
|
import "./chunk-MGUYIOP2.mjs";
|
|
37
47
|
import "./chunk-625SVQEP.mjs";
|
|
48
|
+
import "./chunk-L4GQJETB.mjs";
|
|
49
|
+
import {
|
|
50
|
+
Container
|
|
51
|
+
} from "./chunk-I6GDRDYD.mjs";
|
|
52
|
+
import {
|
|
53
|
+
HStack,
|
|
54
|
+
Stack,
|
|
55
|
+
VStack
|
|
56
|
+
} from "./chunk-27XJO7E4.mjs";
|
|
57
|
+
import "./chunk-XLLYMQLW.mjs";
|
|
58
|
+
import {
|
|
59
|
+
Link
|
|
60
|
+
} from "./chunk-5QL53TR2.mjs";
|
|
38
61
|
import "./chunk-6QV3OV66.mjs";
|
|
39
62
|
import {
|
|
40
63
|
MessageComponent
|
|
41
64
|
} from "./chunk-AR2NOI4U.mjs";
|
|
42
65
|
import "./chunk-ME66RUR6.mjs";
|
|
43
|
-
import {
|
|
44
|
-
ModalComponent
|
|
45
|
-
} from "./chunk-QSYU64U4.mjs";
|
|
46
|
-
import "./chunk-POJTVNEO.mjs";
|
|
47
66
|
import {
|
|
48
67
|
CardComponent
|
|
49
68
|
} from "./chunk-JC6DBIFE.mjs";
|
|
69
|
+
import "./chunk-X5JERDDU.mjs";
|
|
50
70
|
import "./chunk-2YL2MVWN.mjs";
|
|
51
71
|
import {
|
|
52
72
|
DescriptionList
|
|
53
73
|
} from "./chunk-XMB45ILT.mjs";
|
|
54
74
|
import {
|
|
55
75
|
FooterComponent
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import "./chunk-
|
|
76
|
+
} from "./chunk-RXIP2JTE.mjs";
|
|
77
|
+
import "./chunk-BZRCDLEW.mjs";
|
|
58
78
|
import {
|
|
59
79
|
LinkList
|
|
60
80
|
} from "./chunk-GJDRW6PA.mjs";
|
|
@@ -62,65 +82,60 @@ import {
|
|
|
62
82
|
OrderedList,
|
|
63
83
|
UnorderedList
|
|
64
84
|
} from "./chunk-PMLDK3VC.mjs";
|
|
85
|
+
import "./chunk-HT2EIJAD.mjs";
|
|
65
86
|
import "./chunk-T24JZIQO.mjs";
|
|
87
|
+
import "./chunk-BYEJZSG5.mjs";
|
|
88
|
+
import {
|
|
89
|
+
Select
|
|
90
|
+
} from "./chunk-RVJD2UZF.mjs";
|
|
66
91
|
import "./chunk-AGZHQDCQ.mjs";
|
|
67
92
|
import {
|
|
68
93
|
Textarea
|
|
69
94
|
} from "./chunk-RK6BB3HH.mjs";
|
|
95
|
+
import "./chunk-7LPYJC6S.mjs";
|
|
96
|
+
import {
|
|
97
|
+
Input
|
|
98
|
+
} from "./chunk-6TI7ACBR.mjs";
|
|
99
|
+
import "./chunk-Y5SUMFYJ.mjs";
|
|
100
|
+
import "./chunk-SKI2APSK.mjs";
|
|
70
101
|
import "./chunk-2KX7VFN2.mjs";
|
|
71
102
|
import {
|
|
72
103
|
Radiobutton
|
|
73
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-HMB4TY2F.mjs";
|
|
74
105
|
import {
|
|
75
106
|
RadioGroup,
|
|
76
107
|
useRadioGroupContext
|
|
77
|
-
} from "./chunk-
|
|
78
|
-
import "./chunk-BYEJZSG5.mjs";
|
|
79
|
-
import {
|
|
80
|
-
Select
|
|
81
|
-
} from "./chunk-RVJD2UZF.mjs";
|
|
108
|
+
} from "./chunk-6NGF7FFY.mjs";
|
|
82
109
|
import "./chunk-YJOOSTJC.mjs";
|
|
83
110
|
import {
|
|
84
111
|
Checkbox
|
|
85
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-RHCMBJOT.mjs";
|
|
86
113
|
import "./chunk-LMF3QGSF.mjs";
|
|
87
114
|
import {
|
|
88
115
|
Fieldset,
|
|
89
116
|
useFieldsetContext
|
|
90
|
-
} from "./chunk-
|
|
91
|
-
import "./chunk-7LPYJC6S.mjs";
|
|
92
|
-
import {
|
|
93
|
-
Input
|
|
94
|
-
} from "./chunk-6TI7ACBR.mjs";
|
|
95
|
-
import "./chunk-Y5SUMFYJ.mjs";
|
|
96
|
-
import "./chunk-SKI2APSK.mjs";
|
|
117
|
+
} from "./chunk-DM4PJFLG.mjs";
|
|
97
118
|
import "./chunk-NSLSA7F7.mjs";
|
|
98
119
|
import {
|
|
99
120
|
ErrorMessage
|
|
100
121
|
} from "./chunk-IL7576PP.mjs";
|
|
101
|
-
import "./chunk-OIQUYB26.mjs";
|
|
102
|
-
import {
|
|
103
|
-
Container
|
|
104
|
-
} from "./chunk-I6GDRDYD.mjs";
|
|
105
|
-
import "./chunk-XLLYMQLW.mjs";
|
|
106
|
-
import {
|
|
107
|
-
Link
|
|
108
|
-
} from "./chunk-5QL53TR2.mjs";
|
|
109
122
|
import {
|
|
110
123
|
AccordionComponent
|
|
111
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-XIHKASNB.mjs";
|
|
125
|
+
import "./chunk-GUB3UCXO.mjs";
|
|
126
|
+
import "./chunk-YXHXRUFX.mjs";
|
|
112
127
|
import "./chunk-62F4I3MQ.mjs";
|
|
113
128
|
import "./chunk-VRIY65P5.mjs";
|
|
114
129
|
import "./chunk-ZOCMUEOX.mjs";
|
|
115
130
|
import {
|
|
116
131
|
Breadcrumbs
|
|
117
132
|
} from "./chunk-YKDKFWP2.mjs";
|
|
118
|
-
import "./chunk-HT2EIJAD.mjs";
|
|
119
133
|
import {
|
|
120
134
|
PrimaryButton,
|
|
121
135
|
SecondaryButton
|
|
122
136
|
} from "./chunk-OUHO4LGN.mjs";
|
|
123
|
-
import "./chunk-
|
|
137
|
+
import "./chunk-KQITCS3U.mjs";
|
|
138
|
+
import "./chunk-DZNH5JHY.mjs";
|
|
124
139
|
import "./chunk-K6PP3ACJ.mjs";
|
|
125
140
|
import {
|
|
126
141
|
Badge,
|
|
@@ -132,14 +147,17 @@ import {
|
|
|
132
147
|
BoxComponent
|
|
133
148
|
} from "./chunk-BZNDK3KJ.mjs";
|
|
134
149
|
import "./chunk-EGXM575K.mjs";
|
|
135
|
-
import "./chunk-GUB3UCXO.mjs";
|
|
136
|
-
import "./chunk-YXHXRUFX.mjs";
|
|
137
150
|
import "./chunk-WCA2WPFS.mjs";
|
|
138
151
|
import "./chunk-V3PAFMK5.mjs";
|
|
152
|
+
import "./chunk-ZTYEOZLK.mjs";
|
|
153
|
+
import "./chunk-NE6W2PCD.mjs";
|
|
139
154
|
import "./chunk-MSFHJVHD.mjs";
|
|
140
155
|
import {
|
|
141
156
|
ShowMoreButton
|
|
142
157
|
} from "./chunk-ZDPU3N54.mjs";
|
|
158
|
+
import {
|
|
159
|
+
AutoAnimateHeight
|
|
160
|
+
} from "./chunk-AKYK3XFN.mjs";
|
|
143
161
|
import "./chunk-JTZPQHKD.mjs";
|
|
144
162
|
import {
|
|
145
163
|
Skeleton
|
|
@@ -152,11 +170,6 @@ import "./chunk-JKCVB5TR.mjs";
|
|
|
152
170
|
import {
|
|
153
171
|
StyledHtml
|
|
154
172
|
} from "./chunk-S5RB7KLJ.mjs";
|
|
155
|
-
import "./chunk-KQITCS3U.mjs";
|
|
156
|
-
import "./chunk-DZNH5JHY.mjs";
|
|
157
|
-
import {
|
|
158
|
-
AutoAnimateHeight
|
|
159
|
-
} from "./chunk-AKYK3XFN.mjs";
|
|
160
173
|
import "./chunk-R4SQKVDQ.mjs";
|
|
161
174
|
|
|
162
175
|
// src/index.tsx
|
|
@@ -175,6 +188,7 @@ export {
|
|
|
175
188
|
ErrorMessage,
|
|
176
189
|
Fieldset,
|
|
177
190
|
FooterComponent as Footer,
|
|
191
|
+
HStack,
|
|
178
192
|
Input,
|
|
179
193
|
Link,
|
|
180
194
|
LinkList,
|
|
@@ -189,9 +203,14 @@ export {
|
|
|
189
203
|
Select,
|
|
190
204
|
ShowMoreButton,
|
|
191
205
|
Skeleton,
|
|
206
|
+
Stack,
|
|
192
207
|
StepIndicator,
|
|
193
208
|
StyledHtml,
|
|
194
209
|
TabsComponent as Tabs,
|
|
210
|
+
TabsContent,
|
|
211
|
+
TabsContents,
|
|
212
|
+
TabsList,
|
|
213
|
+
TabsTab,
|
|
195
214
|
Text,
|
|
196
215
|
TextBody,
|
|
197
216
|
TextBodySmall,
|
|
@@ -208,6 +227,7 @@ export {
|
|
|
208
227
|
TextTechnicalTitle,
|
|
209
228
|
Textarea,
|
|
210
229
|
UnorderedList,
|
|
230
|
+
VStack,
|
|
211
231
|
WarningBadge,
|
|
212
232
|
WarningBanner,
|
|
213
233
|
WhiteBadge,
|
package/dist/index.mjs.map
CHANGED
|
@@ -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":"
|
|
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":[]}
|
package/dist/layout/index.d.mts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export { Container_alias_2 as Container } from '../_tsup-dts-rollup';
|
|
2
1
|
export { ContainerProps_alias_2 as ContainerProps } from '../_tsup-dts-rollup';
|
|
2
|
+
export { Container_alias_2 as Container } from '../_tsup-dts-rollup';
|
|
3
|
+
export { StackProps_alias_2 as StackProps } from '../_tsup-dts-rollup';
|
|
4
|
+
export { Stack_alias_2 as Stack } from '../_tsup-dts-rollup';
|
|
5
|
+
export { HStack_alias_2 as HStack } from '../_tsup-dts-rollup';
|
|
6
|
+
export { VStack_alias_2 as VStack } from '../_tsup-dts-rollup';
|
package/dist/layout/index.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export { Container_alias_2 as Container } from '../_tsup-dts-rollup';
|
|
2
1
|
export { ContainerProps_alias_2 as ContainerProps } from '../_tsup-dts-rollup';
|
|
2
|
+
export { Container_alias_2 as Container } from '../_tsup-dts-rollup';
|
|
3
|
+
export { StackProps_alias_2 as StackProps } from '../_tsup-dts-rollup';
|
|
4
|
+
export { Stack_alias_2 as Stack } from '../_tsup-dts-rollup';
|
|
5
|
+
export { HStack_alias_2 as HStack } from '../_tsup-dts-rollup';
|
|
6
|
+
export { VStack_alias_2 as VStack } from '../_tsup-dts-rollup';
|
package/dist/layout/index.js
CHANGED
|
@@ -49,7 +49,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
49
49
|
// src/layout/index.tsx
|
|
50
50
|
var layout_exports = {};
|
|
51
51
|
__export(layout_exports, {
|
|
52
|
-
Container: () => Container
|
|
52
|
+
Container: () => Container,
|
|
53
|
+
HStack: () => HStack,
|
|
54
|
+
Stack: () => Stack,
|
|
55
|
+
VStack: () => VStack
|
|
53
56
|
});
|
|
54
57
|
module.exports = __toCommonJS(layout_exports);
|
|
55
58
|
|
|
@@ -75,8 +78,65 @@ var Container = (0, import_react.forwardRef)(
|
|
|
75
78
|
}
|
|
76
79
|
);
|
|
77
80
|
Container.displayName = "Container";
|
|
81
|
+
|
|
82
|
+
// src/layout/stack/stack.tsx
|
|
83
|
+
var React = require("react");
|
|
84
|
+
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname");
|
|
85
|
+
var import_react2 = require("react");
|
|
86
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
87
|
+
|
|
88
|
+
// src/layout/spacing.ts
|
|
89
|
+
function getSpacingVariable(size) {
|
|
90
|
+
return `var(--hds-spacing-${size})`;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// src/layout/responsive.ts
|
|
94
|
+
function getResponsiveProps(variable, inputValues, valueTransformer = (value) => String(value)) {
|
|
95
|
+
if (!inputValues)
|
|
96
|
+
return {};
|
|
97
|
+
if (typeof inputValues !== "object") {
|
|
98
|
+
return { [`${variable}-xsmall`]: valueTransformer(inputValues) };
|
|
99
|
+
}
|
|
100
|
+
const result = {};
|
|
101
|
+
for (const [key, value] of Object.entries(inputValues)) {
|
|
102
|
+
result[`${variable}-${key}`] = valueTransformer(value);
|
|
103
|
+
}
|
|
104
|
+
return result;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// src/layout/stack/stack.tsx
|
|
108
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
109
|
+
var Stack = (0, import_react2.forwardRef)(
|
|
110
|
+
(_a, ref) => {
|
|
111
|
+
var _b = _a, { children, asChild, className, style: _style, gap, direction, wrap, align, justify } = _b, rest = __objRest(_b, ["children", "asChild", "className", "style", "gap", "direction", "wrap", "align", "justify"]);
|
|
112
|
+
const Component = asChild ? import_react_slot.Slot : "div";
|
|
113
|
+
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, _style), getResponsiveProps("--hds-stack-gap", gap, getSpacingVariable)), getResponsiveProps("--hds-stack-direction", direction)), getResponsiveProps("--hds-stack-wrap", wrap, (value) => value ? "wrap" : "nowrap")), getResponsiveProps("--hds-stack-align", align)), getResponsiveProps("--hds-stack-justify", justify));
|
|
114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
115
|
+
Component,
|
|
116
|
+
__spreadProps(__spreadValues({
|
|
117
|
+
style,
|
|
118
|
+
className: (0, import_typed_classname2.clsx)("hds-stack", className),
|
|
119
|
+
ref
|
|
120
|
+
}, rest), {
|
|
121
|
+
children
|
|
122
|
+
})
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
Stack.displayName = "Stack";
|
|
127
|
+
var HStack = (0, import_react2.forwardRef)((props, ref) => {
|
|
128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Stack, __spreadProps(__spreadValues({ ref }, props), { direction: "row" }));
|
|
129
|
+
});
|
|
130
|
+
HStack.displayName = "HStack";
|
|
131
|
+
var VStack = (0, import_react2.forwardRef)((props, ref) => {
|
|
132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Stack, __spreadProps(__spreadValues({ ref }, props), { direction: "column" }));
|
|
133
|
+
});
|
|
134
|
+
VStack.displayName = "VStack";
|
|
78
135
|
// Annotate the CommonJS export names for ESM import in node:
|
|
79
136
|
0 && (module.exports = {
|
|
80
|
-
Container
|
|
137
|
+
Container,
|
|
138
|
+
HStack,
|
|
139
|
+
Stack,
|
|
140
|
+
VStack
|
|
81
141
|
});
|
|
82
142
|
//# sourceMappingURL=index.js.map
|
package/dist/layout/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/layout/index.tsx","../../src/layout/container/container.tsx"],"sourcesContent":["export
|
|
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,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,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,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"]}
|
package/dist/layout/index.mjs
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-L4GQJETB.mjs";
|
|
2
2
|
import {
|
|
3
3
|
Container
|
|
4
4
|
} from "../chunk-I6GDRDYD.mjs";
|
|
5
|
+
import {
|
|
6
|
+
HStack,
|
|
7
|
+
Stack,
|
|
8
|
+
VStack
|
|
9
|
+
} from "../chunk-27XJO7E4.mjs";
|
|
10
|
+
import "../chunk-ZTYEOZLK.mjs";
|
|
11
|
+
import "../chunk-NE6W2PCD.mjs";
|
|
5
12
|
import "../chunk-R4SQKVDQ.mjs";
|
|
6
13
|
export {
|
|
7
|
-
Container
|
|
14
|
+
Container,
|
|
15
|
+
HStack,
|
|
16
|
+
Stack,
|
|
17
|
+
VStack
|
|
8
18
|
};
|
|
9
19
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/layout/responsive.ts
|
|
21
|
+
var responsive_exports = {};
|
|
22
|
+
__export(responsive_exports, {
|
|
23
|
+
getResponsiveProps: () => getResponsiveProps
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(responsive_exports);
|
|
26
|
+
function getResponsiveProps(variable, inputValues, valueTransformer = (value) => String(value)) {
|
|
27
|
+
if (!inputValues)
|
|
28
|
+
return {};
|
|
29
|
+
if (typeof inputValues !== "object") {
|
|
30
|
+
return { [`${variable}-xsmall`]: valueTransformer(inputValues) };
|
|
31
|
+
}
|
|
32
|
+
const result = {};
|
|
33
|
+
for (const [key, value] of Object.entries(inputValues)) {
|
|
34
|
+
result[`${variable}-${key}`] = valueTransformer(value);
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
getResponsiveProps
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=responsive.js.map
|
|
@@ -0,0 +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":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/layout/spacing.ts
|
|
21
|
+
var spacing_exports = {};
|
|
22
|
+
__export(spacing_exports, {
|
|
23
|
+
getSpacingVariable: () => getSpacingVariable
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(spacing_exports);
|
|
26
|
+
function getSpacingVariable(size) {
|
|
27
|
+
return `var(--hds-spacing-${size})`;
|
|
28
|
+
}
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
getSpacingVariable
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=spacing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/layout/spacing.ts"],"sourcesContent":["// 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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCO,SAAS,mBAAmB,MAA6C;AAC9E,SAAO,qBAAqB,IAAI;AAClC;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Stack_alias_3 as Stack } from '../../_tsup-dts-rollup';
|
|
2
|
+
export { HStack_alias_3 as HStack } from '../../_tsup-dts-rollup';
|
|
3
|
+
export { VStack_alias_3 as VStack } from '../../_tsup-dts-rollup';
|
|
4
|
+
export { StackProps_alias_3 as StackProps } from '../../_tsup-dts-rollup';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Stack_alias_3 as Stack } from '../../_tsup-dts-rollup';
|
|
2
|
+
export { HStack_alias_3 as HStack } from '../../_tsup-dts-rollup';
|
|
3
|
+
export { VStack_alias_3 as VStack } from '../../_tsup-dts-rollup';
|
|
4
|
+
export { StackProps_alias_3 as StackProps } from '../../_tsup-dts-rollup';
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
var __export = (target, all) => {
|
|
36
|
+
for (var name in all)
|
|
37
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from, except, desc) => {
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (let key of __getOwnPropNames(from))
|
|
42
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
+
}
|
|
45
|
+
return to;
|
|
46
|
+
};
|
|
47
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
|
+
|
|
49
|
+
// src/layout/stack/index.tsx
|
|
50
|
+
var stack_exports = {};
|
|
51
|
+
__export(stack_exports, {
|
|
52
|
+
HStack: () => HStack,
|
|
53
|
+
Stack: () => Stack,
|
|
54
|
+
VStack: () => VStack
|
|
55
|
+
});
|
|
56
|
+
module.exports = __toCommonJS(stack_exports);
|
|
57
|
+
|
|
58
|
+
// src/layout/stack/stack.tsx
|
|
59
|
+
var React = require("react");
|
|
60
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
|
|
61
|
+
var import_react = require("react");
|
|
62
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
63
|
+
|
|
64
|
+
// src/layout/spacing.ts
|
|
65
|
+
function getSpacingVariable(size) {
|
|
66
|
+
return `var(--hds-spacing-${size})`;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// src/layout/responsive.ts
|
|
70
|
+
function getResponsiveProps(variable, inputValues, valueTransformer = (value) => String(value)) {
|
|
71
|
+
if (!inputValues)
|
|
72
|
+
return {};
|
|
73
|
+
if (typeof inputValues !== "object") {
|
|
74
|
+
return { [`${variable}-xsmall`]: valueTransformer(inputValues) };
|
|
75
|
+
}
|
|
76
|
+
const result = {};
|
|
77
|
+
for (const [key, value] of Object.entries(inputValues)) {
|
|
78
|
+
result[`${variable}-${key}`] = valueTransformer(value);
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// src/layout/stack/stack.tsx
|
|
84
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
85
|
+
var Stack = (0, import_react.forwardRef)(
|
|
86
|
+
(_a, ref) => {
|
|
87
|
+
var _b = _a, { children, asChild, className, style: _style, gap, direction, wrap, align, justify } = _b, rest = __objRest(_b, ["children", "asChild", "className", "style", "gap", "direction", "wrap", "align", "justify"]);
|
|
88
|
+
const Component = asChild ? import_react_slot.Slot : "div";
|
|
89
|
+
const style = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, _style), getResponsiveProps("--hds-stack-gap", gap, getSpacingVariable)), getResponsiveProps("--hds-stack-direction", direction)), getResponsiveProps("--hds-stack-wrap", wrap, (value) => value ? "wrap" : "nowrap")), getResponsiveProps("--hds-stack-align", align)), getResponsiveProps("--hds-stack-justify", justify));
|
|
90
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
91
|
+
Component,
|
|
92
|
+
__spreadProps(__spreadValues({
|
|
93
|
+
style,
|
|
94
|
+
className: (0, import_typed_classname.clsx)("hds-stack", className),
|
|
95
|
+
ref
|
|
96
|
+
}, rest), {
|
|
97
|
+
children
|
|
98
|
+
})
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
Stack.displayName = "Stack";
|
|
103
|
+
var HStack = (0, import_react.forwardRef)((props, ref) => {
|
|
104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Stack, __spreadProps(__spreadValues({ ref }, props), { direction: "row" }));
|
|
105
|
+
});
|
|
106
|
+
HStack.displayName = "HStack";
|
|
107
|
+
var VStack = (0, import_react.forwardRef)((props, ref) => {
|
|
108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Stack, __spreadProps(__spreadValues({ ref }, props), { direction: "column" }));
|
|
109
|
+
});
|
|
110
|
+
VStack.displayName = "VStack";
|
|
111
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
112
|
+
0 && (module.exports = {
|
|
113
|
+
HStack,
|
|
114
|
+
Stack,
|
|
115
|
+
VStack
|
|
116
|
+
});
|
|
117
|
+
//# sourceMappingURL=index.js.map
|