@atom-learning/components 3.6.0 → 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 +8 -7
- 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/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,2 @@
|
|
|
1
|
+
import e from"react";import{styled as m}from"../../stitches.js";import{TreeCollapsible as i}from"./TreeCollapsible.js";import{TreeCollapsibleContent as p}from"./TreeCollapsibleContent.js";import{TreeCollapsibleTrigger as f}from"./TreeCollapsibleTrigger.js";import{TreeIcon as T}from"./TreeIcon.js";import{TreeItem as s}from"./TreeItem.js";import{TreeList as a}from"./TreeList.js";import{TreeText as n}from"./TreeText.js";const C=m(a,{}),r=e.forwardRef(({children:o,...t},l)=>e.createElement(C,{...t,ref:l,role:"tree"},o)),b=Object.assign(r,{Collapsible:i,CollapsibleContent:p,CollapsibleTrigger:f,Item:s,Icon:T,Text:n});export{b as Tree,r as TreeRoot};
|
|
2
|
+
//# sourceMappingURL=Tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tree.js","sources":["../../../src/components/tree/Tree.tsx"],"sourcesContent":["import React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { TreeCollapsible } from './TreeCollapsible'\nimport { TreeCollapsibleContent } from './TreeCollapsibleContent'\nimport { TreeCollapsibleTrigger } from './TreeCollapsibleTrigger'\nimport { TreeIcon } from './TreeIcon'\nimport { TreeItem } from './TreeItem'\nimport { TreeList } from './TreeList'\nimport { TreeText } from './TreeText'\n\nconst StyledRoot = styled(TreeList, {})\n\ntype TreeProps = React.ComponentProps<typeof StyledRoot>\n\nexport const TreeRoot = React.forwardRef(\n (\n { children, ...rest }: TreeProps,\n ref: React.ForwardedRef<HTMLUListElement>\n ) => {\n return (\n <StyledRoot {...rest} ref={ref} role=\"tree\">\n {children}\n </StyledRoot>\n )\n }\n)\n\nexport const Tree = Object.assign(TreeRoot, {\n Collapsible: TreeCollapsible,\n CollapsibleContent: TreeCollapsibleContent,\n CollapsibleTrigger: TreeCollapsibleTrigger,\n Item: TreeItem,\n Icon: TreeIcon,\n Text: TreeText\n})\n"],"names":["StyledRoot","styled","TreeList","TreeRoot","React","children","rest","ref","Tree","TreeCollapsible","TreeCollapsibleContent","TreeCollapsibleTrigger","TreeItem","TreeIcon","TreeText"],"mappings":"qaAYA,MAAMA,EAAaC,EAAOC,EAAU,CAAE,CAAA,EAIzBC,EAAWC,EAAM,WAC5B,CACE,CAAE,SAAAC,KAAaC,CAAK,EACpBC,IAGEH,EAAA,cAACJ,EAAA,CAAY,GAAGM,EAAM,IAAKC,EAAK,KAAK,MAAA,EAClCF,CACH,CAGN,EAEaG,EAAO,OAAO,OAAOL,EAAU,CAC1C,YAAaM,EACb,mBAAoBC,EACpB,mBAAoBC,EACpB,KAAMC,EACN,KAAMC,EACN,KAAMC,CACR,CAAC"}
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare type TreeCollapsibleContextValue = {
|
|
3
|
+
triggerRef?: React.MutableRefObject<HTMLElement | null>;
|
|
4
|
+
setTriggerRef?: (HTMLElement: any) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const TreeCollapsibleContext: React.Context<TreeCollapsibleContextValue>;
|
|
7
|
+
export declare const TreeCollapsible: React.ForwardRefExoticComponent<Pick<import("@radix-ui/react-collapsible").CollapsibleProps & React.RefAttributes<HTMLDivElement> & Omit<import("@radix-ui/react-collapsible").CollapsibleProps & React.RefAttributes<HTMLDivElement>, "css"> & import("@stitches/react/types/styled-component").TransformProps<{}, {
|
|
8
|
+
sm: string;
|
|
9
|
+
md: string;
|
|
10
|
+
lg: string;
|
|
11
|
+
xl: string;
|
|
12
|
+
reducedMotion: string;
|
|
13
|
+
allowMotion: string;
|
|
14
|
+
hover: string;
|
|
15
|
+
}> & {
|
|
16
|
+
css?: import("@stitches/react/types/css-util").CSS<{
|
|
17
|
+
sm: string;
|
|
18
|
+
md: string;
|
|
19
|
+
lg: string;
|
|
20
|
+
xl: string;
|
|
21
|
+
reducedMotion: string;
|
|
22
|
+
allowMotion: string;
|
|
23
|
+
hover: string;
|
|
24
|
+
}, {
|
|
25
|
+
colors: {
|
|
26
|
+
textForeground: any;
|
|
27
|
+
textSubtle: any;
|
|
28
|
+
textPlaceholder: any;
|
|
29
|
+
background: any;
|
|
30
|
+
backgroundAccent: any;
|
|
31
|
+
grey100: any;
|
|
32
|
+
grey200: any;
|
|
33
|
+
grey300: any;
|
|
34
|
+
grey400: any;
|
|
35
|
+
grey500: any;
|
|
36
|
+
grey600: any;
|
|
37
|
+
grey700: any;
|
|
38
|
+
grey800: any;
|
|
39
|
+
grey900: any;
|
|
40
|
+
grey1000: any;
|
|
41
|
+
grey1100: any;
|
|
42
|
+
grey1200: any;
|
|
43
|
+
blue100: any;
|
|
44
|
+
blue200: any;
|
|
45
|
+
blue300: any;
|
|
46
|
+
blue400: any;
|
|
47
|
+
blue500: any;
|
|
48
|
+
blue600: any;
|
|
49
|
+
blue700: any;
|
|
50
|
+
blue800: any;
|
|
51
|
+
blue900: any;
|
|
52
|
+
blue1000: any;
|
|
53
|
+
blue1100: any;
|
|
54
|
+
blue1200: any;
|
|
55
|
+
purple100: any;
|
|
56
|
+
purple200: any;
|
|
57
|
+
purple300: any;
|
|
58
|
+
purple400: any;
|
|
59
|
+
purple500: any;
|
|
60
|
+
purple600: any;
|
|
61
|
+
purple700: any;
|
|
62
|
+
purple800: any;
|
|
63
|
+
purple900: any;
|
|
64
|
+
purple1000: any;
|
|
65
|
+
purple1100: any;
|
|
66
|
+
purple1200: any;
|
|
67
|
+
cyan100: any;
|
|
68
|
+
cyan200: any;
|
|
69
|
+
cyan300: any;
|
|
70
|
+
cyan400: any;
|
|
71
|
+
cyan500: any;
|
|
72
|
+
cyan600: any;
|
|
73
|
+
cyan700: any;
|
|
74
|
+
cyan800: any;
|
|
75
|
+
cyan900: any;
|
|
76
|
+
cyan1000: any;
|
|
77
|
+
cyan1100: any;
|
|
78
|
+
cyan1200: any;
|
|
79
|
+
green100: any;
|
|
80
|
+
green200: any;
|
|
81
|
+
green300: any;
|
|
82
|
+
green400: any;
|
|
83
|
+
green500: any;
|
|
84
|
+
green600: any;
|
|
85
|
+
green700: any;
|
|
86
|
+
green800: any;
|
|
87
|
+
green900: any;
|
|
88
|
+
green1000: any;
|
|
89
|
+
green1100: any;
|
|
90
|
+
green1200: any;
|
|
91
|
+
magenta100: any;
|
|
92
|
+
magenta200: any;
|
|
93
|
+
magenta300: any;
|
|
94
|
+
magenta400: any;
|
|
95
|
+
magenta500: any;
|
|
96
|
+
magenta600: any;
|
|
97
|
+
magenta700: any;
|
|
98
|
+
magenta800: any;
|
|
99
|
+
magenta900: any;
|
|
100
|
+
magenta1000: any;
|
|
101
|
+
magenta1100: any;
|
|
102
|
+
magenta1200: any;
|
|
103
|
+
red100: any;
|
|
104
|
+
red200: any;
|
|
105
|
+
red300: any;
|
|
106
|
+
red400: any;
|
|
107
|
+
red500: any;
|
|
108
|
+
red600: any;
|
|
109
|
+
red700: any;
|
|
110
|
+
red800: any;
|
|
111
|
+
red900: any;
|
|
112
|
+
red1000: any;
|
|
113
|
+
red1100: any;
|
|
114
|
+
red1200: any;
|
|
115
|
+
teal100: any;
|
|
116
|
+
teal200: any;
|
|
117
|
+
teal300: any;
|
|
118
|
+
teal400: any;
|
|
119
|
+
teal500: any;
|
|
120
|
+
teal600: any;
|
|
121
|
+
teal700: any;
|
|
122
|
+
teal800: any;
|
|
123
|
+
teal900: any;
|
|
124
|
+
teal1000: any;
|
|
125
|
+
teal1100: any;
|
|
126
|
+
teal1200: any;
|
|
127
|
+
orange100: any;
|
|
128
|
+
orange200: any;
|
|
129
|
+
orange300: any;
|
|
130
|
+
orange400: any;
|
|
131
|
+
orange500: any;
|
|
132
|
+
orange600: any;
|
|
133
|
+
orange700: any;
|
|
134
|
+
orange800: any;
|
|
135
|
+
orange900: any;
|
|
136
|
+
orange1000: any;
|
|
137
|
+
orange1100: any;
|
|
138
|
+
orange1200: any;
|
|
139
|
+
yellow100: any;
|
|
140
|
+
yellow200: any;
|
|
141
|
+
yellow300: any;
|
|
142
|
+
yellow400: any;
|
|
143
|
+
yellow500: any;
|
|
144
|
+
yellow600: any;
|
|
145
|
+
yellow700: any;
|
|
146
|
+
yellow800: any;
|
|
147
|
+
yellow900: any;
|
|
148
|
+
yellow1000: any;
|
|
149
|
+
yellow1100: any;
|
|
150
|
+
yellow1200: any;
|
|
151
|
+
lime100: any;
|
|
152
|
+
lime200: any;
|
|
153
|
+
lime300: any;
|
|
154
|
+
lime400: any;
|
|
155
|
+
lime500: any;
|
|
156
|
+
lime600: any;
|
|
157
|
+
lime700: any;
|
|
158
|
+
lime800: any;
|
|
159
|
+
lime900: any;
|
|
160
|
+
lime1000: any;
|
|
161
|
+
lime1100: any;
|
|
162
|
+
lime1200: any;
|
|
163
|
+
tonal50: any;
|
|
164
|
+
tonal100: any;
|
|
165
|
+
tonal200: any;
|
|
166
|
+
tonal300: any;
|
|
167
|
+
tonal400: any;
|
|
168
|
+
tonal500: any;
|
|
169
|
+
tonal600: any;
|
|
170
|
+
alpha100: any;
|
|
171
|
+
alpha150: any;
|
|
172
|
+
alpha200: any;
|
|
173
|
+
alpha250: any;
|
|
174
|
+
alpha600: any;
|
|
175
|
+
primaryLight: any;
|
|
176
|
+
primary: any;
|
|
177
|
+
primaryMid: any;
|
|
178
|
+
primaryDark: any;
|
|
179
|
+
secondary: any;
|
|
180
|
+
brandRed: any;
|
|
181
|
+
brandRedAccent: any;
|
|
182
|
+
brandGreen: any;
|
|
183
|
+
brandGreenAccent: any;
|
|
184
|
+
brandPurple: any;
|
|
185
|
+
brandPurpleAccent: any;
|
|
186
|
+
brandYellow: any;
|
|
187
|
+
brandYellowAccent: any;
|
|
188
|
+
successLight: any;
|
|
189
|
+
success: any;
|
|
190
|
+
successMid: any;
|
|
191
|
+
successDark: any;
|
|
192
|
+
dangerLight: any;
|
|
193
|
+
danger: any;
|
|
194
|
+
dangerMid: any;
|
|
195
|
+
dangerDark: any;
|
|
196
|
+
warningLight: any;
|
|
197
|
+
warning: any;
|
|
198
|
+
warningMid: any;
|
|
199
|
+
warningDark: any;
|
|
200
|
+
warningText: any;
|
|
201
|
+
subjectEnglish: any;
|
|
202
|
+
subjectMaths: any;
|
|
203
|
+
subjectScience: any;
|
|
204
|
+
subjectVerbalReasoning: any;
|
|
205
|
+
subjectNonVerbalReasoning: any;
|
|
206
|
+
subjectCreativeWriting: any;
|
|
207
|
+
subjectExamSkills: any;
|
|
208
|
+
glBlueLight: any;
|
|
209
|
+
glBluePrimary: any;
|
|
210
|
+
glBlueDark: any;
|
|
211
|
+
};
|
|
212
|
+
space: {
|
|
213
|
+
"0": any;
|
|
214
|
+
"1": any;
|
|
215
|
+
"2": any;
|
|
216
|
+
"3": any;
|
|
217
|
+
"4": any;
|
|
218
|
+
"5": any;
|
|
219
|
+
"6": any;
|
|
220
|
+
"7": any;
|
|
221
|
+
"8": any;
|
|
222
|
+
"9": any;
|
|
223
|
+
"24": any;
|
|
224
|
+
};
|
|
225
|
+
fontSizes: {
|
|
226
|
+
xs: any;
|
|
227
|
+
sm: any;
|
|
228
|
+
md: any;
|
|
229
|
+
lg: any;
|
|
230
|
+
xl: any;
|
|
231
|
+
"2xl": any;
|
|
232
|
+
"3xl": any;
|
|
233
|
+
"4xl": any;
|
|
234
|
+
};
|
|
235
|
+
fonts: {
|
|
236
|
+
sans: any;
|
|
237
|
+
mono: any;
|
|
238
|
+
display: any;
|
|
239
|
+
body: any;
|
|
240
|
+
};
|
|
241
|
+
sizes: {
|
|
242
|
+
"0": any;
|
|
243
|
+
"1": any;
|
|
244
|
+
"2": any;
|
|
245
|
+
"3": any;
|
|
246
|
+
"4": any;
|
|
247
|
+
"5": any;
|
|
248
|
+
"6": any;
|
|
249
|
+
"7": any;
|
|
250
|
+
"8": any;
|
|
251
|
+
};
|
|
252
|
+
radii: {
|
|
253
|
+
"0": any;
|
|
254
|
+
"1": any;
|
|
255
|
+
"2": any;
|
|
256
|
+
"3": any;
|
|
257
|
+
round: any;
|
|
258
|
+
};
|
|
259
|
+
shadows: {
|
|
260
|
+
"0": any;
|
|
261
|
+
"1": any;
|
|
262
|
+
"2": any;
|
|
263
|
+
"3": any;
|
|
264
|
+
};
|
|
265
|
+
ratios: {
|
|
266
|
+
"16-9": any;
|
|
267
|
+
"3-2": any;
|
|
268
|
+
"4-3": any;
|
|
269
|
+
"1-1": any;
|
|
270
|
+
"3-4": any;
|
|
271
|
+
};
|
|
272
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
273
|
+
bg: (value: import("@stitches/react/types/css-util").WithPropertyValue<"background">) => {
|
|
274
|
+
background: import("@stitches/react/types/css-util").WithPropertyValue<"background">;
|
|
275
|
+
};
|
|
276
|
+
size: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">) => {
|
|
277
|
+
height: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
|
|
278
|
+
width: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
|
|
279
|
+
};
|
|
280
|
+
p: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
281
|
+
padding: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
282
|
+
};
|
|
283
|
+
pt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
284
|
+
paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
285
|
+
};
|
|
286
|
+
pr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
287
|
+
paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
288
|
+
};
|
|
289
|
+
pb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
290
|
+
paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
291
|
+
};
|
|
292
|
+
pl: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
293
|
+
paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
294
|
+
};
|
|
295
|
+
px: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
296
|
+
paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
297
|
+
paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
298
|
+
};
|
|
299
|
+
py: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
300
|
+
paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
301
|
+
paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
302
|
+
};
|
|
303
|
+
m: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
304
|
+
margin: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
305
|
+
};
|
|
306
|
+
mt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
307
|
+
marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
308
|
+
};
|
|
309
|
+
mr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
310
|
+
marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
311
|
+
};
|
|
312
|
+
mb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
313
|
+
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
314
|
+
};
|
|
315
|
+
ml: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
316
|
+
marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
317
|
+
};
|
|
318
|
+
mx: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
319
|
+
marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
320
|
+
marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
321
|
+
};
|
|
322
|
+
my: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
|
|
323
|
+
marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
324
|
+
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
325
|
+
};
|
|
326
|
+
}> | undefined;
|
|
327
|
+
}, "color" | "translate" | "css" | "onBlur" | "onChange" | "onSubmit" | "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "open" | "asChild" | "defaultOpen" | "disabled" | "onOpenChange"> & React.RefAttributes<HTMLLIElement>>;
|
|
328
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Root as m}from"@radix-ui/react-collapsible";import*as e from"react";import{styled as n}from"../../stitches.js";import{useCallbackRef as a}from"../../utilities/hooks/useCallbackRef.js";import{TreeListItem as i}from"./TreeListItem.js";const o=e.createContext({}),c=({children:r})=>{const[t,l]=a();return e.createElement(o.Provider,{value:{triggerRef:t,setTriggerRef:l}},r)},f=n(m,{width:"100%"}),s=e.forwardRef((r,t)=>e.createElement(i,{ref:t},e.createElement(c,null,e.createElement(f,{...r}))));export{s as TreeCollapsible,o as TreeCollapsibleContext};
|
|
2
|
+
//# sourceMappingURL=TreeCollapsible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TreeCollapsible.js","sources":["../../../src/components/tree/TreeCollapsible.tsx"],"sourcesContent":["import { Root } from '@radix-ui/react-collapsible'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { useCallbackRef } from '~/utilities/hooks/useCallbackRef'\n\nimport { TreeListItem } from './TreeListItem'\n\ntype TreeCollapsibleContextValue = {\n triggerRef?: React.MutableRefObject<HTMLElement | null>\n setTriggerRef?: (HTMLElement) => void\n}\nexport const TreeCollapsibleContext =\n React.createContext<TreeCollapsibleContextValue>({})\nconst TreeCollapsibleProvider = ({ children }) => {\n const [triggerRef, setTriggerRef] = useCallbackRef()\n return (\n <TreeCollapsibleContext.Provider value={{ triggerRef, setTriggerRef }}>\n {children}\n </TreeCollapsibleContext.Provider>\n )\n}\n\nconst StyledCollapsibleTreeItemRoot = styled(Root, {\n width: '100%'\n})\n\ntype TreeCollapsibleProps = React.ComponentProps<typeof Root> &\n React.ComponentProps<typeof StyledCollapsibleTreeItemRoot>\nexport const TreeCollapsible = React.forwardRef(\n (\n props: TreeCollapsibleProps,\n ref: React.ForwardedRef<HTMLLIElement>\n ): JSX.Element => {\n return (\n <TreeListItem ref={ref}>\n <TreeCollapsibleProvider>\n <StyledCollapsibleTreeItemRoot {...props} />\n </TreeCollapsibleProvider>\n </TreeListItem>\n )\n }\n)\n"],"names":["TreeCollapsibleContext","React","TreeCollapsibleProvider","children","triggerRef","setTriggerRef","useCallbackRef","StyledCollapsibleTreeItemRoot","styled","Root","TreeCollapsible","props","ref","TreeListItem"],"mappings":"sPAYaA,EACXC,EAAM,cAA2C,CAAE,CAAA,EAC/CC,EAA0B,CAAC,CAAE,SAAAC,CAAS,IAAM,CAChD,KAAM,CAACC,EAAYC,CAAa,EAAIC,IACpC,OACEL,EAAA,cAACD,EAAuB,SAAvB,CAAgC,MAAO,CAAE,WAAAI,EAAY,cAAAC,CAAc,GACjEF,CACH,CAEJ,EAEMI,EAAgCC,EAAOC,EAAM,CACjD,MAAO,MACT,CAAC,EAIYC,EAAkBT,EAAM,WACnC,CACEU,EACAC,IAGEX,EAAA,cAACY,EAAA,CAAa,IAAKD,GACjBX,EAAA,cAACC,EAAA,KACCD,EAAA,cAACM,EAAA,CAA+B,GAAGI,CAAO,CAAA,CAC5C,CACF,CAGN"}
|