@atom-learning/components 3.5.2 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -3
- package/dist/components/banner/BannerContainer.d.ts +1 -1
- package/dist/components/banner/BannerContainer.js +1 -1
- package/dist/components/banner/BannerContainer.js.map +1 -1
- package/dist/components/banner/banner-regular/BannerRegular.js +1 -1
- package/dist/components/banner/banner-regular/BannerRegular.js.map +1 -1
- package/dist/components/banner/banner-slim/BannerSlim.js +1 -1
- package/dist/components/banner/banner-slim/BannerSlim.js.map +1 -1
- package/dist/components/banner/banner-slim/BannerSlimContainer.d.ts +1 -1
- package/dist/components/dismissible/DismissibleRoot.d.ts +6 -4
- package/dist/components/dismissible/DismissibleRoot.js +1 -1
- package/dist/components/dismissible/DismissibleRoot.js.map +1 -1
- package/dist/components/dismissible/DismissibleTrigger.js +1 -1
- package/dist/components/dismissible/DismissibleTrigger.js.map +1 -1
- package/dist/components/dismissible-group/DismissibleGroupItem.d.ts +1 -0
- package/dist/components/dismissible-group/DismissibleGroupItem.js +1 -1
- package/dist/components/dismissible-group/DismissibleGroupItem.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/pagination/PaginationPopover.js +1 -1
- package/dist/components/pagination/PaginationPopover.js.map +1 -1
- package/dist/components/section-message/SectionMessage.d.ts +1 -1
- package/dist/components/tree/Tree.d.ts +4775 -0
- package/dist/components/tree/Tree.js +2 -0
- package/dist/components/tree/Tree.js.map +1 -0
- package/dist/components/tree/TreeCollapsible.d.ts +328 -0
- package/dist/components/tree/TreeCollapsible.js +2 -0
- package/dist/components/tree/TreeCollapsible.js.map +1 -0
- package/dist/components/tree/TreeCollapsibleContent.d.ts +939 -0
- package/dist/components/tree/TreeCollapsibleContent.js +2 -0
- package/dist/components/tree/TreeCollapsibleContent.js.map +1 -0
- package/dist/components/tree/TreeCollapsibleTrigger.d.ts +7 -0
- package/dist/components/tree/TreeCollapsibleTrigger.js +2 -0
- package/dist/components/tree/TreeCollapsibleTrigger.js.map +1 -0
- package/dist/components/tree/TreeIcon.d.ts +649 -0
- package/dist/components/tree/TreeIcon.js +2 -0
- package/dist/components/tree/TreeIcon.js.map +1 -0
- package/dist/components/tree/TreeItem.d.ts +5 -0
- package/dist/components/tree/TreeItem.js +2 -0
- package/dist/components/tree/TreeItem.js.map +1 -0
- package/dist/components/tree/TreeItemContent.d.ts +330 -0
- package/dist/components/tree/TreeItemContent.js +2 -0
- package/dist/components/tree/TreeItemContent.js.map +1 -0
- package/dist/components/tree/TreeList.d.ts +5 -0
- package/dist/components/tree/TreeList.js +2 -0
- package/dist/components/tree/TreeList.js.map +1 -0
- package/dist/components/tree/TreeListItem.d.ts +330 -0
- package/dist/components/tree/TreeListItem.js +2 -0
- package/dist/components/tree/TreeListItem.js.map +1 -0
- package/dist/components/tree/TreeText.d.ts +5 -0
- package/dist/components/tree/TreeText.js +2 -0
- package/dist/components/tree/TreeText.js.map +1 -0
- package/dist/components/tree/index.d.ts +1 -0
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeItem.js","sources":["../../../src/components/tree/TreeItem.tsx"],"sourcesContent":["import React from 'react'\n\nimport { TreeItemContent } from './TreeItemContent'\nimport { TreeListItem } from './TreeListItem'\n\ntype TreeItemProps = React.ComponentProps<typeof TreeItemContent>\n\nexport const TreeItem = ({ children, ...rest }: TreeItemProps): JSX.Element => {\n return (\n <TreeListItem>\n <TreeItemContent {...rest}>{children}</TreeItemContent>\n </TreeListItem>\n )\n}\n"],"names":["TreeItem","children","rest","React","TreeListItem","TreeItemContent"],"mappings":"6HAOa,MAAAA,EAAW,CAAC,CAAE,SAAAC,KAAaC,CAAK,IAEzCC,EAAA,cAACC,EAAA,KACCD,EAAA,cAACE,EAAA,CAAiB,GAAGH,CAAAA,EAAOD,CAAS,CACvC"}
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const TreeItemContent: React.ForwardRefExoticComponent<Pick<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
3
|
+
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
+
}, "direction" | "gap" | "css" | "wrap" | "justify" | "align"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
5
|
+
direction?: "inherit" | "initial" | "revert" | "unset" | "row" | "column" | "column-reverse" | "row-reverse" | "revert-layer" | undefined;
|
|
6
|
+
wrap?: "inherit" | "initial" | "revert" | "unset" | "nowrap" | "wrap" | "wrap-reverse" | "revert-layer" | undefined;
|
|
7
|
+
justify?: "center" | "left" | "right" | "stretch" | "inherit" | "initial" | "revert" | "unset" | "space-around" | "space-between" | "space-evenly" | "end" | "flex-end" | "flex-start" | "start" | "normal" | "revert-layer" | "unsafe" | "safe" | undefined;
|
|
8
|
+
align?: "center" | "stretch" | "inherit" | "initial" | "revert" | "unset" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "normal" | "self-end" | "self-start" | "revert-layer" | "unsafe" | "safe" | "first baseline" | "last baseline" | undefined;
|
|
9
|
+
gap?: number | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
sm: string;
|
|
12
|
+
md: string;
|
|
13
|
+
lg: string;
|
|
14
|
+
xl: string;
|
|
15
|
+
reducedMotion: string;
|
|
16
|
+
allowMotion: string;
|
|
17
|
+
hover: string;
|
|
18
|
+
}> & {
|
|
19
|
+
css?: import("@stitches/react/types/css-util").CSS<{
|
|
20
|
+
sm: string;
|
|
21
|
+
md: string;
|
|
22
|
+
lg: string;
|
|
23
|
+
xl: string;
|
|
24
|
+
reducedMotion: string;
|
|
25
|
+
allowMotion: string;
|
|
26
|
+
hover: string;
|
|
27
|
+
}, {
|
|
28
|
+
colors: {
|
|
29
|
+
textForeground: any;
|
|
30
|
+
textSubtle: any;
|
|
31
|
+
textPlaceholder: any;
|
|
32
|
+
background: any;
|
|
33
|
+
backgroundAccent: any;
|
|
34
|
+
grey100: any;
|
|
35
|
+
grey200: any;
|
|
36
|
+
grey300: any;
|
|
37
|
+
grey400: any;
|
|
38
|
+
grey500: any;
|
|
39
|
+
grey600: any;
|
|
40
|
+
grey700: any;
|
|
41
|
+
grey800: any;
|
|
42
|
+
grey900: any;
|
|
43
|
+
grey1000: any;
|
|
44
|
+
grey1100: any;
|
|
45
|
+
grey1200: any;
|
|
46
|
+
blue100: any;
|
|
47
|
+
blue200: any;
|
|
48
|
+
blue300: any;
|
|
49
|
+
blue400: any;
|
|
50
|
+
blue500: any;
|
|
51
|
+
blue600: any;
|
|
52
|
+
blue700: any;
|
|
53
|
+
blue800: any;
|
|
54
|
+
blue900: any;
|
|
55
|
+
blue1000: any;
|
|
56
|
+
blue1100: any;
|
|
57
|
+
blue1200: any;
|
|
58
|
+
purple100: any;
|
|
59
|
+
purple200: any;
|
|
60
|
+
purple300: any;
|
|
61
|
+
purple400: any;
|
|
62
|
+
purple500: any;
|
|
63
|
+
purple600: any;
|
|
64
|
+
purple700: any;
|
|
65
|
+
purple800: any;
|
|
66
|
+
purple900: any;
|
|
67
|
+
purple1000: any;
|
|
68
|
+
purple1100: any;
|
|
69
|
+
purple1200: any;
|
|
70
|
+
cyan100: any;
|
|
71
|
+
cyan200: any;
|
|
72
|
+
cyan300: any;
|
|
73
|
+
cyan400: any;
|
|
74
|
+
cyan500: any;
|
|
75
|
+
cyan600: any;
|
|
76
|
+
cyan700: any;
|
|
77
|
+
cyan800: any;
|
|
78
|
+
cyan900: any;
|
|
79
|
+
cyan1000: any;
|
|
80
|
+
cyan1100: any;
|
|
81
|
+
cyan1200: any;
|
|
82
|
+
green100: any;
|
|
83
|
+
green200: any;
|
|
84
|
+
green300: any;
|
|
85
|
+
green400: any;
|
|
86
|
+
green500: any;
|
|
87
|
+
green600: any;
|
|
88
|
+
green700: any;
|
|
89
|
+
green800: any;
|
|
90
|
+
green900: any;
|
|
91
|
+
green1000: any;
|
|
92
|
+
green1100: any;
|
|
93
|
+
green1200: any;
|
|
94
|
+
magenta100: any;
|
|
95
|
+
magenta200: any;
|
|
96
|
+
magenta300: any;
|
|
97
|
+
magenta400: any;
|
|
98
|
+
magenta500: any;
|
|
99
|
+
magenta600: any;
|
|
100
|
+
magenta700: any;
|
|
101
|
+
magenta800: any;
|
|
102
|
+
magenta900: any;
|
|
103
|
+
magenta1000: any;
|
|
104
|
+
magenta1100: any;
|
|
105
|
+
magenta1200: any;
|
|
106
|
+
red100: any;
|
|
107
|
+
red200: any;
|
|
108
|
+
red300: any;
|
|
109
|
+
red400: any;
|
|
110
|
+
red500: any;
|
|
111
|
+
red600: any;
|
|
112
|
+
red700: any;
|
|
113
|
+
red800: any;
|
|
114
|
+
red900: any;
|
|
115
|
+
red1000: any;
|
|
116
|
+
red1100: any;
|
|
117
|
+
red1200: any;
|
|
118
|
+
teal100: any;
|
|
119
|
+
teal200: any;
|
|
120
|
+
teal300: any;
|
|
121
|
+
teal400: any;
|
|
122
|
+
teal500: any;
|
|
123
|
+
teal600: any;
|
|
124
|
+
teal700: any;
|
|
125
|
+
teal800: any;
|
|
126
|
+
teal900: any;
|
|
127
|
+
teal1000: any;
|
|
128
|
+
teal1100: any;
|
|
129
|
+
teal1200: any;
|
|
130
|
+
orange100: any;
|
|
131
|
+
orange200: any;
|
|
132
|
+
orange300: any;
|
|
133
|
+
orange400: any;
|
|
134
|
+
orange500: any;
|
|
135
|
+
orange600: any;
|
|
136
|
+
orange700: any;
|
|
137
|
+
orange800: any;
|
|
138
|
+
orange900: any;
|
|
139
|
+
orange1000: any;
|
|
140
|
+
orange1100: any;
|
|
141
|
+
orange1200: any;
|
|
142
|
+
yellow100: any;
|
|
143
|
+
yellow200: any;
|
|
144
|
+
yellow300: any;
|
|
145
|
+
yellow400: any;
|
|
146
|
+
yellow500: any;
|
|
147
|
+
yellow600: any;
|
|
148
|
+
yellow700: any;
|
|
149
|
+
yellow800: any;
|
|
150
|
+
yellow900: any;
|
|
151
|
+
yellow1000: any;
|
|
152
|
+
yellow1100: any;
|
|
153
|
+
yellow1200: any;
|
|
154
|
+
lime100: any;
|
|
155
|
+
lime200: any;
|
|
156
|
+
lime300: any;
|
|
157
|
+
lime400: any;
|
|
158
|
+
lime500: any;
|
|
159
|
+
lime600: any;
|
|
160
|
+
lime700: any;
|
|
161
|
+
lime800: any;
|
|
162
|
+
lime900: any;
|
|
163
|
+
lime1000: any;
|
|
164
|
+
lime1100: any;
|
|
165
|
+
lime1200: any;
|
|
166
|
+
tonal50: any;
|
|
167
|
+
tonal100: any;
|
|
168
|
+
tonal200: any;
|
|
169
|
+
tonal300: any;
|
|
170
|
+
tonal400: any;
|
|
171
|
+
tonal500: any;
|
|
172
|
+
tonal600: any;
|
|
173
|
+
alpha100: any;
|
|
174
|
+
alpha150: any;
|
|
175
|
+
alpha200: any;
|
|
176
|
+
alpha250: any;
|
|
177
|
+
alpha600: any;
|
|
178
|
+
primaryLight: any;
|
|
179
|
+
primary: any;
|
|
180
|
+
primaryMid: any;
|
|
181
|
+
primaryDark: any;
|
|
182
|
+
secondary: any;
|
|
183
|
+
brandRed: any;
|
|
184
|
+
brandRedAccent: any;
|
|
185
|
+
brandGreen: any;
|
|
186
|
+
brandGreenAccent: any;
|
|
187
|
+
brandPurple: any;
|
|
188
|
+
brandPurpleAccent: any;
|
|
189
|
+
brandYellow: any;
|
|
190
|
+
brandYellowAccent: any;
|
|
191
|
+
successLight: any;
|
|
192
|
+
success: any;
|
|
193
|
+
successMid: any;
|
|
194
|
+
successDark: any;
|
|
195
|
+
dangerLight: any;
|
|
196
|
+
danger: any;
|
|
197
|
+
dangerMid: any;
|
|
198
|
+
dangerDark: any;
|
|
199
|
+
warningLight: any;
|
|
200
|
+
warning: any;
|
|
201
|
+
warningMid: any;
|
|
202
|
+
warningDark: any;
|
|
203
|
+
warningText: any;
|
|
204
|
+
subjectEnglish: any;
|
|
205
|
+
subjectMaths: any;
|
|
206
|
+
subjectScience: any;
|
|
207
|
+
subjectVerbalReasoning: any;
|
|
208
|
+
subjectNonVerbalReasoning: any;
|
|
209
|
+
subjectCreativeWriting: any;
|
|
210
|
+
subjectExamSkills: any;
|
|
211
|
+
glBlueLight: any;
|
|
212
|
+
glBluePrimary: any;
|
|
213
|
+
glBlueDark: any;
|
|
214
|
+
};
|
|
215
|
+
space: {
|
|
216
|
+
"0": any;
|
|
217
|
+
"1": any;
|
|
218
|
+
"2": any;
|
|
219
|
+
"3": any;
|
|
220
|
+
"4": any;
|
|
221
|
+
"5": any;
|
|
222
|
+
"6": any;
|
|
223
|
+
"7": any;
|
|
224
|
+
"8": any;
|
|
225
|
+
"9": any;
|
|
226
|
+
"24": any;
|
|
227
|
+
};
|
|
228
|
+
fontSizes: {
|
|
229
|
+
xs: any;
|
|
230
|
+
sm: any;
|
|
231
|
+
md: any;
|
|
232
|
+
lg: any;
|
|
233
|
+
xl: any;
|
|
234
|
+
"2xl": any;
|
|
235
|
+
"3xl": any;
|
|
236
|
+
"4xl": any;
|
|
237
|
+
};
|
|
238
|
+
fonts: {
|
|
239
|
+
sans: any;
|
|
240
|
+
mono: any;
|
|
241
|
+
display: any;
|
|
242
|
+
body: any;
|
|
243
|
+
};
|
|
244
|
+
sizes: {
|
|
245
|
+
"0": any;
|
|
246
|
+
"1": any;
|
|
247
|
+
"2": any;
|
|
248
|
+
"3": any;
|
|
249
|
+
"4": any;
|
|
250
|
+
"5": any;
|
|
251
|
+
"6": any;
|
|
252
|
+
"7": any;
|
|
253
|
+
"8": any;
|
|
254
|
+
};
|
|
255
|
+
radii: {
|
|
256
|
+
"0": any;
|
|
257
|
+
"1": any;
|
|
258
|
+
"2": any;
|
|
259
|
+
"3": any;
|
|
260
|
+
round: any;
|
|
261
|
+
};
|
|
262
|
+
shadows: {
|
|
263
|
+
"0": any;
|
|
264
|
+
"1": any;
|
|
265
|
+
"2": any;
|
|
266
|
+
"3": any;
|
|
267
|
+
};
|
|
268
|
+
ratios: {
|
|
269
|
+
"16-9": any;
|
|
270
|
+
"3-2": any;
|
|
271
|
+
"4-3": any;
|
|
272
|
+
"1-1": any;
|
|
273
|
+
"3-4": any;
|
|
274
|
+
};
|
|
275
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
276
|
+
bg: (value: import("@stitches/react/types/css-util").WithPropertyValue<"background">) => {
|
|
277
|
+
background: import("@stitches/react/types/css-util").WithPropertyValue<"background">;
|
|
278
|
+
};
|
|
279
|
+
size: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">) => {
|
|
280
|
+
height: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
|
|
281
|
+
width: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
|
|
282
|
+
};
|
|
283
|
+
p: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
284
|
+
padding: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
285
|
+
};
|
|
286
|
+
pt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
287
|
+
paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
288
|
+
};
|
|
289
|
+
pr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
290
|
+
paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
291
|
+
};
|
|
292
|
+
pb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
293
|
+
paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
294
|
+
};
|
|
295
|
+
pl: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
296
|
+
paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
297
|
+
};
|
|
298
|
+
px: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
299
|
+
paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
300
|
+
paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
301
|
+
};
|
|
302
|
+
py: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
303
|
+
paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
304
|
+
paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
305
|
+
};
|
|
306
|
+
m: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
307
|
+
margin: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
308
|
+
};
|
|
309
|
+
mt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
310
|
+
marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
311
|
+
};
|
|
312
|
+
mr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
313
|
+
marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
314
|
+
};
|
|
315
|
+
mb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
316
|
+
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
317
|
+
};
|
|
318
|
+
ml: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
319
|
+
marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
320
|
+
};
|
|
321
|
+
mx: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
322
|
+
marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
323
|
+
marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
324
|
+
};
|
|
325
|
+
my: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
326
|
+
marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
327
|
+
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
328
|
+
};
|
|
329
|
+
}> | undefined;
|
|
330
|
+
}, "direction" | "gap" | "css" | "key" | "wrap" | "justify" | keyof React.HTMLAttributes<HTMLDivElement> | "align"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as t from"react";import{Flex as n}from"../flex/Flex.js";import{Icon as i}from"../icon/Icon.js";import{styled as p}from"../../stitches.js";import{TreeIcon as l}from"./TreeIcon.js";import{TreeText as a}from"./TreeText.js";const f=p(n,{width:"100%",position:"relative",minHeight:"$3",pl:"$6"}),c=t.forwardRef(({children:r,...o},m)=>t.createElement(f,{gap:2,align:"center",ref:m,...o},t.Children.map(r,e=>typeof e=="string"||typeof e=="number"?t.createElement(a,null,e):t.isValidElement(e)&&e.type===i?t.createElement(l,{...e.props}):e)));export{c as TreeItemContent};
|
|
2
|
+
//# sourceMappingURL=TreeItemContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeItemContent.js","sources":["../../../src/components/tree/TreeItemContent.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Flex } from '~/components/flex'\nimport { Icon } from '~/components/icon'\nimport { styled } from '~/stitches'\n\nimport { TreeIcon } from './TreeIcon'\nimport { TreeText } from './TreeText'\n\nconst StyledItemContent = styled(Flex, {\n width: '100%',\n position: 'relative',\n minHeight: '$3',\n pl: '$6'\n})\n\ntype TreeItemContentProps = React.ComponentProps<typeof Flex>\n\nexport const TreeItemContent = React.forwardRef(\n (\n { children, ...rest }: TreeItemContentProps,\n ref: React.ForwardedRef<HTMLDivElement>\n ): JSX.Element => {\n return (\n <StyledItemContent gap={2} align=\"center\" ref={ref} {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <TreeText>{child}</TreeText>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n return <TreeIcon {...child.props} />\n }\n return child\n }) as React.ReactElement[]\n }\n </StyledItemContent>\n )\n }\n)\n"],"names":["StyledItemContent","styled","Flex","TreeItemContent","React","children","rest","ref","child","TreeText","Icon","TreeIcon"],"mappings":"mOASA,MAAMA,EAAoBC,EAAOC,EAAM,CACrC,MAAO,OACP,SAAU,WACV,UAAW,KACX,GAAI,IACN,CAAC,EAIYC,EAAkBC,EAAM,WACnC,CACE,CAAE,SAAAC,KAAaC,CAAK,EACpBC,IAGEH,EAAA,cAACJ,EAAA,CAAkB,IAAK,EAAG,MAAM,SAAS,IAAKO,EAAM,GAAGD,GAEpDF,EAAM,SAAS,IAAIC,EAAWG,GACxB,OAAOA,GAAU,UAAY,OAAOA,GAAU,SACzCJ,EAAA,cAACK,EAAA,KAAUD,CAAM,EAEtBJ,EAAM,eAAeI,CAAK,GAAKA,EAAM,OAASE,EACzCN,EAAA,cAACO,EAAA,CAAU,GAAGH,EAAM,KAAO,CAAA,EAE7BA,CACR,CAEL,CAGN"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Flex } from '../../components/flex';
|
|
3
|
+
declare type TreeListProps = Omit<React.ComponentPropsWithoutRef<typeof Flex>, 'direction'>;
|
|
4
|
+
export declare const TreeList: React.ForwardRefExoticComponent<TreeListProps & React.RefAttributes<HTMLUListElement>>;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from"react";import{Flex as r}from"../flex/Flex.js";import{styled as m}from"../../stitches.js";const s=m(r,{width:"100%",p:0,m:0,listStyle:"none","& &":{pl:"$space$4"}}),i=e.forwardRef((t,o)=>e.createElement(s,{as:"ul",ref:o,...t,direction:"column"}));export{i as TreeList};
|
|
2
|
+
//# sourceMappingURL=TreeList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeList.js","sources":["../../../src/components/tree/TreeList.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Flex } from '~/components/flex'\nimport { styled } from '~/stitches'\n\nconst StyledList = styled(Flex, {\n width: '100%',\n p: 0,\n m: 0,\n listStyle: 'none',\n '& &': {\n pl: '$space$4'\n }\n})\n\ntype TreeListProps = Omit<\n React.ComponentPropsWithoutRef<typeof Flex>,\n 'direction'\n>\n\nexport const TreeList = React.forwardRef(\n (\n props: TreeListProps,\n ref: React.ForwardedRef<HTMLUListElement>\n ): JSX.Element => (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Stitches polymorphic components issue due to `as=\"ul\"`\n <StyledList as=\"ul\" ref={ref} {...props} direction=\"column\" />\n )\n)\n"],"names":["StyledList","styled","Flex","TreeList","React","props","ref"],"mappings":"0GAKA,MAAMA,EAAaC,EAAOC,EAAM,CAC9B,MAAO,OACP,EAAG,EACH,EAAG,EACH,UAAW,OACX,MAAO,CACL,GAAI,UACN,CACF,CAAC,EAOYC,EAAWC,EAAM,WAC5B,CACEC,EACAC,IAIAF,EAAA,cAACJ,EAAA,CAAW,GAAG,KAAK,IAAKM,EAAM,GAAGD,EAAO,UAAU,QAAA,CAAS,CAEhE"}
|