@tanstack/devtools-ui 0.5.0 → 0.5.1
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/esm/components/button.js +21 -19
- package/dist/esm/components/button.js.map +1 -1
- package/dist/esm/components/checkbox.js +51 -50
- package/dist/esm/components/checkbox.js.map +1 -1
- package/dist/esm/components/header.js +38 -48
- package/dist/esm/components/header.js.map +1 -1
- package/dist/esm/components/icons.d.ts +2 -1
- package/dist/esm/components/icons.js +31 -50
- package/dist/esm/components/icons.js.map +1 -1
- package/dist/esm/components/input.js +53 -52
- package/dist/esm/components/input.js.map +1 -1
- package/dist/esm/components/logo.js +92 -91
- package/dist/esm/components/logo.js.map +1 -1
- package/dist/esm/components/main-panel.js +15 -19
- package/dist/esm/components/main-panel.js.map +1 -1
- package/dist/esm/components/section.js +47 -69
- package/dist/esm/components/section.js.map +1 -1
- package/dist/esm/components/select.js +55 -54
- package/dist/esm/components/select.js.map +1 -1
- package/dist/esm/components/tag.js +38 -37
- package/dist/esm/components/tag.js.map +1 -1
- package/dist/esm/components/theme.d.ts +4 -4
- package/dist/esm/components/theme.js +24 -26
- package/dist/esm/components/theme.js.map +1 -1
- package/dist/esm/components/tree.js +493 -517
- package/dist/esm/components/tree.js.map +1 -1
- package/dist/esm/icons.js +1 -24
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +3 -30
- package/dist/esm/styles/tokens.js +300 -189
- package/dist/esm/styles/tokens.js.map +1 -1
- package/dist/esm/styles/use-styles.js +337 -179
- package/dist/esm/styles/use-styles.js.map +1 -1
- package/package.json +2 -2
- package/src/components/button.tsx +14 -17
- package/src/components/icons.tsx +8 -6
- package/src/components/theme.tsx +5 -5
- package/src/index.ts +1 -0
- package/src/styles/use-styles.ts +179 -75
- package/dist/esm/icons.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
|
@@ -1,59 +1,261 @@
|
|
|
1
|
-
import * as goober from "goober";
|
|
2
|
-
import { createSignal, createEffect } from "solid-js";
|
|
3
1
|
import { useTheme } from "../components/theme.js";
|
|
4
2
|
import { tokens } from "./tokens.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
3
|
+
import { createEffect, createSignal } from "solid-js";
|
|
4
|
+
import * as goober from "goober";
|
|
5
|
+
//#region src/styles/use-styles.ts
|
|
6
|
+
var buttonVariantColors = {
|
|
7
|
+
primary: {
|
|
8
|
+
bg: {
|
|
9
|
+
light: tokens.colors.gray[900],
|
|
10
|
+
dark: tokens.colors.gray[100]
|
|
11
|
+
},
|
|
12
|
+
hover: {
|
|
13
|
+
light: tokens.colors.gray[800],
|
|
14
|
+
dark: tokens.colors.gray[200]
|
|
15
|
+
},
|
|
16
|
+
active: {
|
|
17
|
+
light: tokens.colors.gray[700],
|
|
18
|
+
dark: tokens.colors.gray[300]
|
|
19
|
+
},
|
|
20
|
+
text: {
|
|
21
|
+
light: "#fff",
|
|
22
|
+
dark: tokens.colors.gray[900]
|
|
23
|
+
},
|
|
24
|
+
border: {
|
|
25
|
+
light: tokens.colors.gray[800],
|
|
26
|
+
dark: tokens.colors.gray[200]
|
|
27
|
+
},
|
|
28
|
+
outline: {
|
|
29
|
+
light: tokens.colors.gray[900],
|
|
30
|
+
dark: tokens.colors.gray[100]
|
|
31
|
+
},
|
|
32
|
+
outlineHover: {
|
|
33
|
+
light: tokens.colors.gray[800],
|
|
34
|
+
dark: tokens.colors.gray[200]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
secondary: {
|
|
38
|
+
bg: {
|
|
39
|
+
light: tokens.colors.gray[100],
|
|
40
|
+
dark: tokens.colors.gray[100]
|
|
41
|
+
},
|
|
42
|
+
hover: {
|
|
43
|
+
light: tokens.colors.gray[200],
|
|
44
|
+
dark: tokens.colors.gray[200]
|
|
45
|
+
},
|
|
46
|
+
active: {
|
|
47
|
+
light: tokens.colors.gray[300],
|
|
48
|
+
dark: tokens.colors.gray[300]
|
|
49
|
+
},
|
|
50
|
+
text: {
|
|
51
|
+
light: tokens.colors.gray[900],
|
|
52
|
+
dark: tokens.colors.gray[900]
|
|
53
|
+
},
|
|
54
|
+
border: {
|
|
55
|
+
light: tokens.colors.gray[300],
|
|
56
|
+
dark: tokens.colors.gray[300]
|
|
57
|
+
},
|
|
58
|
+
outline: {
|
|
59
|
+
light: tokens.colors.gray[700],
|
|
60
|
+
dark: tokens.colors.gray[300]
|
|
61
|
+
},
|
|
62
|
+
outlineHover: {
|
|
63
|
+
light: tokens.colors.gray[800],
|
|
64
|
+
dark: tokens.colors.gray[200]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
info: {
|
|
68
|
+
bg: {
|
|
69
|
+
light: tokens.colors.blue[500],
|
|
70
|
+
dark: tokens.colors.blue[500]
|
|
71
|
+
},
|
|
72
|
+
hover: {
|
|
73
|
+
light: tokens.colors.blue[600],
|
|
74
|
+
dark: tokens.colors.blue[600]
|
|
75
|
+
},
|
|
76
|
+
active: {
|
|
77
|
+
light: tokens.colors.blue[700],
|
|
78
|
+
dark: tokens.colors.blue[700]
|
|
79
|
+
},
|
|
80
|
+
text: {
|
|
81
|
+
light: "#fff",
|
|
82
|
+
dark: "#fff"
|
|
83
|
+
},
|
|
84
|
+
border: {
|
|
85
|
+
light: tokens.colors.blue[500],
|
|
86
|
+
dark: tokens.colors.blue[500]
|
|
87
|
+
},
|
|
88
|
+
outline: {
|
|
89
|
+
light: tokens.colors.blue[700],
|
|
90
|
+
dark: tokens.colors.blue[300]
|
|
91
|
+
},
|
|
92
|
+
outlineHover: {
|
|
93
|
+
light: tokens.colors.blue[600],
|
|
94
|
+
dark: tokens.colors.blue[200]
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
warning: {
|
|
98
|
+
bg: {
|
|
99
|
+
light: tokens.colors.yellow[500],
|
|
100
|
+
dark: tokens.colors.yellow[500]
|
|
101
|
+
},
|
|
102
|
+
hover: {
|
|
103
|
+
light: tokens.colors.yellow[600],
|
|
104
|
+
dark: tokens.colors.yellow[600]
|
|
105
|
+
},
|
|
106
|
+
active: {
|
|
107
|
+
light: tokens.colors.yellow[700],
|
|
108
|
+
dark: tokens.colors.yellow[700]
|
|
109
|
+
},
|
|
110
|
+
text: {
|
|
111
|
+
light: "#fff",
|
|
112
|
+
dark: "#fff"
|
|
113
|
+
},
|
|
114
|
+
border: {
|
|
115
|
+
light: tokens.colors.yellow[500],
|
|
116
|
+
dark: tokens.colors.yellow[500]
|
|
117
|
+
},
|
|
118
|
+
outline: {
|
|
119
|
+
light: tokens.colors.yellow[700],
|
|
120
|
+
dark: tokens.colors.yellow[300]
|
|
121
|
+
},
|
|
122
|
+
outlineHover: {
|
|
123
|
+
light: tokens.colors.yellow[600],
|
|
124
|
+
dark: tokens.colors.yellow[200]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
danger: {
|
|
128
|
+
bg: {
|
|
129
|
+
light: tokens.colors.red[500],
|
|
130
|
+
dark: tokens.colors.red[500]
|
|
131
|
+
},
|
|
132
|
+
hover: {
|
|
133
|
+
light: tokens.colors.red[600],
|
|
134
|
+
dark: tokens.colors.red[600]
|
|
135
|
+
},
|
|
136
|
+
active: {
|
|
137
|
+
light: tokens.colors.red[700],
|
|
138
|
+
dark: tokens.colors.red[700]
|
|
139
|
+
},
|
|
140
|
+
text: {
|
|
141
|
+
light: "#fff",
|
|
142
|
+
dark: "#fff"
|
|
143
|
+
},
|
|
144
|
+
border: {
|
|
145
|
+
light: tokens.colors.red[500],
|
|
146
|
+
dark: tokens.colors.red[500]
|
|
147
|
+
},
|
|
148
|
+
outline: {
|
|
149
|
+
light: tokens.colors.red[700],
|
|
150
|
+
dark: tokens.colors.red[300]
|
|
151
|
+
},
|
|
152
|
+
outlineHover: {
|
|
153
|
+
light: tokens.colors.red[600],
|
|
154
|
+
dark: tokens.colors.red[200]
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
success: {
|
|
158
|
+
bg: {
|
|
159
|
+
light: tokens.colors.green[500],
|
|
160
|
+
dark: tokens.colors.green[500]
|
|
161
|
+
},
|
|
162
|
+
hover: {
|
|
163
|
+
light: tokens.colors.green[600],
|
|
164
|
+
dark: tokens.colors.green[600]
|
|
165
|
+
},
|
|
166
|
+
active: {
|
|
167
|
+
light: tokens.colors.green[700],
|
|
168
|
+
dark: tokens.colors.green[700]
|
|
169
|
+
},
|
|
170
|
+
text: {
|
|
171
|
+
light: "#fff",
|
|
172
|
+
dark: "#fff"
|
|
173
|
+
},
|
|
174
|
+
border: {
|
|
175
|
+
light: tokens.colors.green[500],
|
|
176
|
+
dark: tokens.colors.green[500]
|
|
177
|
+
},
|
|
178
|
+
outline: {
|
|
179
|
+
light: tokens.colors.green[700],
|
|
180
|
+
dark: tokens.colors.green[300]
|
|
181
|
+
},
|
|
182
|
+
outlineHover: {
|
|
183
|
+
light: tokens.colors.green[600],
|
|
184
|
+
dark: tokens.colors.green[200]
|
|
185
|
+
}
|
|
186
|
+
}
|
|
48
187
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
188
|
+
var css = goober.css;
|
|
189
|
+
var stylesFactory = (theme) => {
|
|
190
|
+
const { colors, font, size, border } = tokens;
|
|
191
|
+
const { fontFamily } = font;
|
|
192
|
+
const t = (light, dark) => theme === "light" ? light : dark;
|
|
193
|
+
const buildButtonVariant = (variant) => {
|
|
194
|
+
const v = buttonVariantColors[variant];
|
|
195
|
+
const outlineColor = t(v.outline.light, v.outline.dark);
|
|
196
|
+
const outlineHoverColor = t(v.outlineHover.light, v.outlineHover.dark);
|
|
197
|
+
const solidBg = t(v.bg.light, v.bg.dark);
|
|
198
|
+
const solidHover = t(v.hover.light, v.hover.dark);
|
|
199
|
+
const solidActive = t(v.active.light, v.active.dark);
|
|
200
|
+
const solidText = t(v.text.light, v.text.dark);
|
|
201
|
+
const solidBorder = t(v.border.light, v.border.dark);
|
|
202
|
+
return {
|
|
203
|
+
ghost: css`
|
|
204
|
+
background: transparent;
|
|
205
|
+
color: ${outlineColor};
|
|
206
|
+
border-color: transparent;
|
|
207
|
+
&:hover {
|
|
208
|
+
background: ${t(colors.gray[100], colors.darkGray[800])};
|
|
209
|
+
color: ${outlineHoverColor};
|
|
210
|
+
}
|
|
211
|
+
&:active {
|
|
212
|
+
background: ${t(colors.gray[200], colors.darkGray[700])};
|
|
213
|
+
color: ${outlineHoverColor};
|
|
214
|
+
}
|
|
215
|
+
`,
|
|
216
|
+
outline: css`
|
|
217
|
+
background: transparent;
|
|
218
|
+
color: ${outlineColor};
|
|
219
|
+
border-color: ${outlineColor};
|
|
220
|
+
&:hover {
|
|
221
|
+
background: ${t(colors.gray[50], colors.darkGray[800])};
|
|
222
|
+
color: ${outlineHoverColor};
|
|
223
|
+
border-color: ${outlineHoverColor};
|
|
224
|
+
}
|
|
225
|
+
&:active {
|
|
226
|
+
background: ${t(colors.gray[100], colors.darkGray[700])};
|
|
227
|
+
color: ${outlineHoverColor};
|
|
228
|
+
border-color: ${outlineHoverColor};
|
|
229
|
+
}
|
|
230
|
+
`,
|
|
231
|
+
solid: css`
|
|
232
|
+
background: ${solidBg};
|
|
233
|
+
color: ${solidText};
|
|
234
|
+
border-color: ${solidBorder};
|
|
235
|
+
&:hover {
|
|
236
|
+
background: ${solidHover};
|
|
237
|
+
border-color: ${solidHover};
|
|
238
|
+
box-shadow: ${t(tokens.shadow.xs("rgb(0 0 0 / 0.12)"), tokens.shadow.xs("rgb(0 0 0 / 0.5)"))};
|
|
239
|
+
}
|
|
240
|
+
&:active {
|
|
241
|
+
background: ${solidActive};
|
|
242
|
+
border-color: ${solidActive};
|
|
243
|
+
box-shadow: ${t(tokens.shadow.inner("rgb(0 0 0 / 0.2)"), tokens.shadow.inner("rgb(0 0 0 / 0.6)"))};
|
|
244
|
+
}
|
|
245
|
+
`
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
const buttonVariants = {
|
|
249
|
+
primary: buildButtonVariant("primary"),
|
|
250
|
+
secondary: buildButtonVariant("secondary"),
|
|
251
|
+
info: buildButtonVariant("info"),
|
|
252
|
+
warning: buildButtonVariant("warning"),
|
|
253
|
+
danger: buildButtonVariant("danger"),
|
|
254
|
+
success: buildButtonVariant("success")
|
|
255
|
+
};
|
|
256
|
+
const wrapperSize = 320;
|
|
257
|
+
return {
|
|
258
|
+
logo: css`
|
|
57
259
|
cursor: pointer;
|
|
58
260
|
display: flex;
|
|
59
261
|
flex-direction: column;
|
|
@@ -62,36 +264,36 @@ const stylesFactory = (theme = "dark") => {
|
|
|
62
264
|
width: ${size[12]};
|
|
63
265
|
height: ${size[12]};
|
|
64
266
|
font-family: ${fontFamily.sans};
|
|
65
|
-
gap: ${tokens.size[
|
|
66
|
-
padding:
|
|
267
|
+
gap: ${tokens.size[.5]};
|
|
268
|
+
padding: 0;
|
|
67
269
|
&:hover {
|
|
68
270
|
opacity: 0.7;
|
|
69
271
|
}
|
|
70
272
|
`,
|
|
71
|
-
|
|
273
|
+
selectWrapper: css`
|
|
72
274
|
width: 100%;
|
|
73
275
|
max-width: ${wrapperSize}px;
|
|
74
276
|
display: flex;
|
|
75
277
|
flex-direction: column;
|
|
76
278
|
gap: 0.375rem;
|
|
77
279
|
`,
|
|
78
|
-
|
|
280
|
+
selectContainer: css`
|
|
79
281
|
width: 100%;
|
|
80
282
|
`,
|
|
81
|
-
|
|
283
|
+
selectLabel: css`
|
|
82
284
|
font-size: 0.875rem;
|
|
83
285
|
font-weight: 500;
|
|
84
286
|
color: ${t(colors.gray[900], colors.gray[100])};
|
|
85
287
|
text-align: left;
|
|
86
288
|
`,
|
|
87
|
-
|
|
289
|
+
selectDescription: css`
|
|
88
290
|
font-size: 0.8rem;
|
|
89
291
|
color: ${t(colors.gray[500], colors.gray[400])};
|
|
90
292
|
margin: 0;
|
|
91
293
|
line-height: 1.3;
|
|
92
294
|
text-align: left;
|
|
93
295
|
`,
|
|
94
|
-
|
|
296
|
+
select: css`
|
|
95
297
|
appearance: none;
|
|
96
298
|
width: 100%;
|
|
97
299
|
padding: 0.5rem 3rem 0.5rem 0.75rem;
|
|
@@ -119,30 +321,30 @@ const stylesFactory = (theme = "dark") => {
|
|
|
119
321
|
box-shadow: 0 0 0 3px ${t(colors.gray[200], colors.gray[800])};
|
|
120
322
|
}
|
|
121
323
|
`,
|
|
122
|
-
|
|
324
|
+
inputWrapper: css`
|
|
123
325
|
width: 100%;
|
|
124
326
|
max-width: ${wrapperSize}px;
|
|
125
327
|
display: flex;
|
|
126
328
|
flex-direction: column;
|
|
127
329
|
gap: 0.375rem;
|
|
128
330
|
`,
|
|
129
|
-
|
|
331
|
+
inputContainer: css`
|
|
130
332
|
width: 100%;
|
|
131
333
|
`,
|
|
132
|
-
|
|
334
|
+
inputLabel: css`
|
|
133
335
|
font-size: 0.875rem;
|
|
134
336
|
font-weight: 500;
|
|
135
337
|
color: ${t(colors.gray[900], colors.gray[100])};
|
|
136
338
|
text-align: left;
|
|
137
339
|
`,
|
|
138
|
-
|
|
340
|
+
inputDescription: css`
|
|
139
341
|
font-size: 0.8rem;
|
|
140
342
|
color: ${t(colors.gray[500], colors.gray[400])};
|
|
141
343
|
margin: 0;
|
|
142
344
|
line-height: 1.3;
|
|
143
345
|
text-align: left;
|
|
144
346
|
`,
|
|
145
|
-
|
|
347
|
+
input: css`
|
|
146
348
|
appearance: none;
|
|
147
349
|
box-sizing: border-box;
|
|
148
350
|
width: 100%;
|
|
@@ -169,7 +371,7 @@ const stylesFactory = (theme = "dark") => {
|
|
|
169
371
|
box-shadow: 0 0 0 3px ${t(colors.gray[200], colors.gray[800])};
|
|
170
372
|
}
|
|
171
373
|
`,
|
|
172
|
-
|
|
374
|
+
checkboxWrapper: css`
|
|
173
375
|
display: flex;
|
|
174
376
|
align-items: flex-start;
|
|
175
377
|
gap: 0.75rem;
|
|
@@ -183,16 +385,16 @@ const stylesFactory = (theme = "dark") => {
|
|
|
183
385
|
background-color: ${t(colors.gray[50], colors.darkGray[900])};
|
|
184
386
|
}
|
|
185
387
|
`,
|
|
186
|
-
|
|
388
|
+
checkboxContainer: css`
|
|
187
389
|
width: 100%;
|
|
188
390
|
`,
|
|
189
|
-
|
|
391
|
+
checkboxLabelContainer: css`
|
|
190
392
|
display: flex;
|
|
191
393
|
flex-direction: column;
|
|
192
394
|
gap: 0.25rem;
|
|
193
395
|
flex: 1;
|
|
194
396
|
`,
|
|
195
|
-
|
|
397
|
+
checkbox: css`
|
|
196
398
|
appearance: none;
|
|
197
399
|
width: 1.25rem;
|
|
198
400
|
height: 1.25rem;
|
|
@@ -224,21 +426,21 @@ const stylesFactory = (theme = "dark") => {
|
|
|
224
426
|
margin-top: -3px;
|
|
225
427
|
}
|
|
226
428
|
`,
|
|
227
|
-
|
|
429
|
+
checkboxLabel: css`
|
|
228
430
|
color: ${t(colors.gray[900], colors.gray[100])};
|
|
229
431
|
font-size: 0.875rem;
|
|
230
432
|
font-weight: 500;
|
|
231
433
|
line-height: 1.4;
|
|
232
434
|
text-align: left;
|
|
233
435
|
`,
|
|
234
|
-
|
|
436
|
+
checkboxDescription: css`
|
|
235
437
|
color: ${t(colors.gray[500], colors.gray[400])};
|
|
236
438
|
font-size: 0.8rem;
|
|
237
439
|
line-height: 1.3;
|
|
238
440
|
text-align: left;
|
|
239
441
|
`,
|
|
240
|
-
|
|
241
|
-
|
|
442
|
+
button: {
|
|
443
|
+
base: css`
|
|
242
444
|
display: inline-flex;
|
|
243
445
|
align-items: center;
|
|
244
446
|
justify-content: center;
|
|
@@ -257,62 +459,21 @@ const stylesFactory = (theme = "dark") => {
|
|
|
257
459
|
border-width: 1px;
|
|
258
460
|
border-style: solid;
|
|
259
461
|
`,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
270
|
-
&:active {
|
|
271
|
-
background: ${t(colors.gray[200], colors.darkGray[700])};
|
|
272
|
-
}
|
|
273
|
-
`;
|
|
274
|
-
}
|
|
275
|
-
if (outline) {
|
|
276
|
-
return css`
|
|
277
|
-
background: transparent;
|
|
278
|
-
color: ${t(v.bg, v.bg)};
|
|
279
|
-
border-color: ${t(v.bg, v.bg)};
|
|
280
|
-
&:hover {
|
|
281
|
-
background: ${t(colors.gray[50], colors.darkGray[800])};
|
|
282
|
-
border-color: ${t(v.hover, v.hover)};
|
|
283
|
-
}
|
|
284
|
-
&:active {
|
|
285
|
-
background: ${t(colors.gray[100], colors.darkGray[700])};
|
|
286
|
-
border-color: ${t(v.active, v.active)};
|
|
287
|
-
}
|
|
288
|
-
`;
|
|
289
|
-
}
|
|
290
|
-
return css`
|
|
291
|
-
background: ${t(v.bg, v.bg)};
|
|
292
|
-
color: ${t(v.text, v.text)};
|
|
293
|
-
border-color: ${t(v.border, v.border)};
|
|
294
|
-
&:hover {
|
|
295
|
-
background: ${t(v.hover, v.hover)};
|
|
296
|
-
border-color: ${t(v.hover, v.hover)};
|
|
297
|
-
}
|
|
298
|
-
&:active {
|
|
299
|
-
background: ${t(v.active, v.active)};
|
|
300
|
-
border-color: ${t(v.active, v.active)};
|
|
301
|
-
}
|
|
302
|
-
`;
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
tag: {
|
|
306
|
-
dot: (color) => css`
|
|
462
|
+
variant(variant, outline, ghost) {
|
|
463
|
+
const v = buttonVariants[variant];
|
|
464
|
+
if (ghost) return v.ghost;
|
|
465
|
+
if (outline) return v.outline;
|
|
466
|
+
return v.solid;
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
tag: {
|
|
470
|
+
dot: (color) => css`
|
|
307
471
|
width: ${tokens.size[1.5]};
|
|
308
472
|
height: ${tokens.size[1.5]};
|
|
309
473
|
border-radius: ${tokens.border.radius.full};
|
|
310
|
-
background-color: ${t(
|
|
311
|
-
tokens.colors[color][500],
|
|
312
|
-
tokens.colors[color][500]
|
|
313
|
-
)};
|
|
474
|
+
background-color: ${t(tokens.colors[color][500], tokens.colors[color][500])};
|
|
314
475
|
`,
|
|
315
|
-
|
|
476
|
+
base: css`
|
|
316
477
|
display: flex;
|
|
317
478
|
gap: ${tokens.size[1.5]};
|
|
318
479
|
box-sizing: border-box;
|
|
@@ -333,10 +494,10 @@ const stylesFactory = (theme = "dark") => {
|
|
|
333
494
|
outline: 2px solid ${t(colors.blue[700], colors.blue[800])};
|
|
334
495
|
}
|
|
335
496
|
`,
|
|
336
|
-
|
|
497
|
+
label: css`
|
|
337
498
|
font-size: ${font.size.xs};
|
|
338
499
|
`,
|
|
339
|
-
|
|
500
|
+
count: css`
|
|
340
501
|
font-size: ${font.size.xs};
|
|
341
502
|
padding: 0 5px;
|
|
342
503
|
display: flex;
|
|
@@ -348,19 +509,19 @@ const stylesFactory = (theme = "dark") => {
|
|
|
348
509
|
font-variant-numeric: tabular-nums;
|
|
349
510
|
height: ${tokens.size[4.5]};
|
|
350
511
|
`
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
512
|
+
},
|
|
513
|
+
tree: {
|
|
514
|
+
info: css`
|
|
354
515
|
color: ${t(colors.gray[500], colors.gray[500])};
|
|
355
516
|
font-size: ${font.size.xs};
|
|
356
517
|
margin-right: ${size[1]};
|
|
357
518
|
`,
|
|
358
|
-
|
|
519
|
+
actionButton: css`
|
|
359
520
|
background-color: transparent;
|
|
360
521
|
color: ${t(colors.gray[500], colors.gray[500])};
|
|
361
522
|
border: none;
|
|
362
523
|
display: inline-flex;
|
|
363
|
-
padding:
|
|
524
|
+
padding: 0;
|
|
364
525
|
align-items: center;
|
|
365
526
|
justify-content: center;
|
|
366
527
|
cursor: pointer;
|
|
@@ -379,10 +540,10 @@ const stylesFactory = (theme = "dark") => {
|
|
|
379
540
|
outline-offset: 2px;
|
|
380
541
|
}
|
|
381
542
|
`,
|
|
382
|
-
|
|
543
|
+
expanderContainer: css`
|
|
383
544
|
position: relative;
|
|
384
545
|
`,
|
|
385
|
-
|
|
546
|
+
expander: css`
|
|
386
547
|
position: absolute;
|
|
387
548
|
cursor: pointer;
|
|
388
549
|
left: -16px;
|
|
@@ -399,13 +560,13 @@ const stylesFactory = (theme = "dark") => {
|
|
|
399
560
|
align-items: center;
|
|
400
561
|
transition: all 0.1s ease;
|
|
401
562
|
`,
|
|
402
|
-
|
|
563
|
+
expandedLine: (hasBorder) => css`
|
|
403
564
|
display: block;
|
|
404
565
|
padding-left: 0.75rem;
|
|
405
566
|
margin-left: -0.7rem;
|
|
406
567
|
${hasBorder ? `border-left: 1px solid ${t(colors.blue[400], colors.blue[300])};` : ""}
|
|
407
568
|
`,
|
|
408
|
-
|
|
569
|
+
collapsible: css`
|
|
409
570
|
cursor: pointer;
|
|
410
571
|
transition: all 0.2s ease;
|
|
411
572
|
&:hover {
|
|
@@ -414,7 +575,7 @@ const stylesFactory = (theme = "dark") => {
|
|
|
414
575
|
padding: 0 ${tokens.size[1]};
|
|
415
576
|
}
|
|
416
577
|
`,
|
|
417
|
-
|
|
578
|
+
actions: css`
|
|
418
579
|
display: inline-flex;
|
|
419
580
|
margin-left: ${size[2]};
|
|
420
581
|
gap: ${size[2]};
|
|
@@ -424,32 +585,32 @@ const stylesFactory = (theme = "dark") => {
|
|
|
424
585
|
width: 12px;
|
|
425
586
|
}
|
|
426
587
|
`,
|
|
427
|
-
|
|
588
|
+
valueCollapsed: css`
|
|
428
589
|
color: ${t(colors.gray[500], colors.gray[400])};
|
|
429
590
|
`,
|
|
430
|
-
|
|
591
|
+
valueFunction: css`
|
|
431
592
|
color: ${t(colors.cyan[500], colors.cyan[400])};
|
|
432
593
|
`,
|
|
433
|
-
|
|
594
|
+
valueString: css`
|
|
434
595
|
color: ${t(colors.green[500], colors.green[400])};
|
|
435
596
|
`,
|
|
436
|
-
|
|
597
|
+
valueNumber: css`
|
|
437
598
|
color: ${t(colors.yellow[500], colors.yellow[400])};
|
|
438
599
|
`,
|
|
439
|
-
|
|
600
|
+
valueBoolean: css`
|
|
440
601
|
color: ${t(colors.pink[500], colors.pink[400])};
|
|
441
602
|
`,
|
|
442
|
-
|
|
603
|
+
valueNull: css`
|
|
443
604
|
color: ${t(colors.gray[500], colors.gray[400])};
|
|
444
605
|
font-style: italic;
|
|
445
606
|
`,
|
|
446
|
-
|
|
607
|
+
valueKey: css`
|
|
447
608
|
color: ${t(colors.blue[400], colors.blue[300])};
|
|
448
609
|
`,
|
|
449
|
-
|
|
610
|
+
valueBraces: css`
|
|
450
611
|
color: ${colors.gray[500]};
|
|
451
612
|
`,
|
|
452
|
-
|
|
613
|
+
valueContainer: (isRoot) => css`
|
|
453
614
|
display: block;
|
|
454
615
|
margin-left: ${isRoot ? "0" : "1rem"};
|
|
455
616
|
|
|
@@ -461,9 +622,9 @@ const stylesFactory = (theme = "dark") => {
|
|
|
461
622
|
display: inline-flex;
|
|
462
623
|
}
|
|
463
624
|
`
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
625
|
+
},
|
|
626
|
+
header: {
|
|
627
|
+
row: css`
|
|
467
628
|
display: flex;
|
|
468
629
|
justify-content: space-between;
|
|
469
630
|
align-items: center;
|
|
@@ -472,7 +633,7 @@ const stylesFactory = (theme = "dark") => {
|
|
|
472
633
|
border-bottom: ${t(colors.gray[300], colors.darkGray[500])} 1px solid;
|
|
473
634
|
align-items: center;
|
|
474
635
|
`,
|
|
475
|
-
|
|
636
|
+
logoAndToggleContainer: css`
|
|
476
637
|
display: flex;
|
|
477
638
|
gap: ${tokens.size[3]};
|
|
478
639
|
align-items: center;
|
|
@@ -481,18 +642,18 @@ const stylesFactory = (theme = "dark") => {
|
|
|
481
642
|
background: transparent;
|
|
482
643
|
border: none;
|
|
483
644
|
display: flex;
|
|
484
|
-
gap: ${size[
|
|
645
|
+
gap: ${size[.5]};
|
|
485
646
|
flex-direction: column;
|
|
486
647
|
}
|
|
487
648
|
`,
|
|
488
|
-
|
|
649
|
+
logo: css`
|
|
489
650
|
cursor: pointer;
|
|
490
651
|
display: flex;
|
|
491
652
|
flex-direction: column;
|
|
492
653
|
background-color: transparent;
|
|
493
654
|
border: none;
|
|
494
|
-
gap: ${tokens.size[
|
|
495
|
-
padding:
|
|
655
|
+
gap: ${tokens.size[.5]};
|
|
656
|
+
padding: 0;
|
|
496
657
|
&:hover {
|
|
497
658
|
opacity: 0.7;
|
|
498
659
|
}
|
|
@@ -502,14 +663,14 @@ const stylesFactory = (theme = "dark") => {
|
|
|
502
663
|
outline: 2px solid ${colors.blue[800]};
|
|
503
664
|
}
|
|
504
665
|
`,
|
|
505
|
-
|
|
666
|
+
tanstackLogo: css`
|
|
506
667
|
font-size: ${font.size.md};
|
|
507
668
|
font-weight: ${font.weight.bold};
|
|
508
669
|
line-height: ${font.lineHeight.xs};
|
|
509
670
|
white-space: nowrap;
|
|
510
671
|
color: ${t(colors.gray[700], colors.gray[300])};
|
|
511
672
|
`,
|
|
512
|
-
|
|
673
|
+
flavorLogo: (flavorLight, flavorDark) => css`
|
|
513
674
|
font-weight: ${font.weight.semibold};
|
|
514
675
|
font-size: ${font.size.xs};
|
|
515
676
|
background: linear-gradient(to right, ${t(flavorLight, flavorDark)});
|
|
@@ -519,9 +680,9 @@ const stylesFactory = (theme = "dark") => {
|
|
|
519
680
|
-webkit-text-fill-color: transparent;
|
|
520
681
|
white-space: nowrap;
|
|
521
682
|
`
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
683
|
+
},
|
|
684
|
+
section: {
|
|
685
|
+
main: css`
|
|
525
686
|
margin-bottom: 1.5rem;
|
|
526
687
|
padding: 1rem;
|
|
527
688
|
background-color: ${t(colors.gray[50], colors.darkGray[800])};
|
|
@@ -529,7 +690,7 @@ const stylesFactory = (theme = "dark") => {
|
|
|
529
690
|
border-radius: 0.5rem;
|
|
530
691
|
box-shadow: none;
|
|
531
692
|
`,
|
|
532
|
-
|
|
693
|
+
title: css`
|
|
533
694
|
font-size: 1rem;
|
|
534
695
|
font-weight: 600;
|
|
535
696
|
color: ${t(colors.gray[900], colors.gray[100])};
|
|
@@ -541,7 +702,7 @@ const stylesFactory = (theme = "dark") => {
|
|
|
541
702
|
gap: 0.5rem;
|
|
542
703
|
text-align: left;
|
|
543
704
|
`,
|
|
544
|
-
|
|
705
|
+
icon: css`
|
|
545
706
|
height: 18px;
|
|
546
707
|
width: 18px;
|
|
547
708
|
& > svg {
|
|
@@ -550,34 +711,31 @@ const stylesFactory = (theme = "dark") => {
|
|
|
550
711
|
}
|
|
551
712
|
color: ${t(colors.gray[700], colors.gray[400])};
|
|
552
713
|
`,
|
|
553
|
-
|
|
714
|
+
description: css`
|
|
554
715
|
color: ${t(colors.gray[500], colors.gray[400])};
|
|
555
716
|
font-size: 0.8rem;
|
|
556
717
|
margin: 0 0 1rem 0;
|
|
557
718
|
line-height: 1.4;
|
|
558
719
|
text-align: left;
|
|
559
720
|
`
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
panel: (withPadding) => css`
|
|
721
|
+
},
|
|
722
|
+
mainPanel: { panel: (withPadding) => css`
|
|
563
723
|
padding: ${withPadding ? tokens.size[3] : 0};
|
|
564
724
|
background: ${t(colors.gray[50], colors.darkGray[700])};
|
|
565
725
|
overflow-y: auto;
|
|
566
726
|
height: 100%;
|
|
567
|
-
`
|
|
568
|
-
|
|
569
|
-
};
|
|
727
|
+
` }
|
|
728
|
+
};
|
|
570
729
|
};
|
|
571
730
|
function useStyles() {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
731
|
+
const { theme } = useTheme();
|
|
732
|
+
const [styles, setStyles] = createSignal(stylesFactory(theme()));
|
|
733
|
+
createEffect(() => {
|
|
734
|
+
setStyles(stylesFactory(theme()));
|
|
735
|
+
});
|
|
736
|
+
return styles;
|
|
578
737
|
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
//# sourceMappingURL=use-styles.js.map
|
|
738
|
+
//#endregion
|
|
739
|
+
export { css, useStyles };
|
|
740
|
+
|
|
741
|
+
//# sourceMappingURL=use-styles.js.map
|