@tanstack/devtools-ui 0.5.3 → 0.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/dist/assets/BricolageGrotesque-Bold-BIJrwikb.ttf +0 -0
- package/dist/assets/Inter-latin-BwkfbSeq.woff2 +0 -0
- package/dist/esm/assets/fonts/BricolageGrotesque-Bold.js +6 -0
- package/dist/esm/assets/fonts/BricolageGrotesque-Bold.js.map +1 -0
- package/dist/esm/assets/fonts/Inter-latin.js +6 -0
- package/dist/esm/assets/fonts/Inter-latin.js.map +1 -0
- package/dist/esm/components/button.js +3 -3
- package/dist/esm/components/button.js.map +1 -1
- package/dist/esm/components/checkbox.js +16 -10
- package/dist/esm/components/checkbox.js.map +1 -1
- package/dist/esm/components/header.js +4 -4
- package/dist/esm/components/header.js.map +1 -1
- package/dist/esm/components/icons.d.ts +1 -1
- package/dist/esm/components/icons.js +4 -8
- package/dist/esm/components/icons.js.map +1 -1
- package/dist/esm/components/input.js +16 -9
- package/dist/esm/components/input.js.map +1 -1
- package/dist/esm/components/logo.js +3 -3
- package/dist/esm/components/logo.js.map +1 -1
- package/dist/esm/components/main-panel.js +3 -3
- package/dist/esm/components/main-panel.js.map +1 -1
- package/dist/esm/components/section.js +6 -6
- package/dist/esm/components/section.js.map +1 -1
- package/dist/esm/components/select.js +24 -13
- package/dist/esm/components/select.js.map +1 -1
- package/dist/esm/components/tag.js +3 -3
- package/dist/esm/components/tag.js.map +1 -1
- package/dist/esm/components/theme.d.ts +1 -1
- package/dist/esm/components/theme.js +15 -5
- package/dist/esm/components/theme.js.map +1 -1
- package/dist/esm/components/tree.js +114 -62
- package/dist/esm/components/tree.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/internal.d.ts +2 -0
- package/dist/esm/internal.js +2 -0
- package/dist/esm/styles/semantic-theme.d.ts +420 -0
- package/dist/esm/styles/semantic-theme.js +283 -0
- package/dist/esm/styles/semantic-theme.js.map +1 -0
- package/dist/esm/styles/use-styles.d.ts +3 -1
- package/dist/esm/styles/use-styles.js +304 -372
- package/dist/esm/styles/use-styles.js.map +1 -1
- package/package.json +15 -3
- package/src/assets/fonts/OFL-Bricolage-Grotesque.txt +93 -0
- package/src/assets/fonts/OFL-Inter.txt +92 -0
- package/src/components/button.tsx +3 -3
- package/src/components/checkbox.tsx +9 -5
- package/src/components/header.tsx +10 -4
- package/src/components/icons.tsx +5 -5
- package/src/components/input.tsx +14 -5
- package/src/components/logo.tsx +3 -2
- package/src/components/main-panel.tsx +3 -2
- package/src/components/section.tsx +15 -7
- package/src/components/select.tsx +29 -10
- package/src/components/tag.tsx +7 -3
- package/src/components/theme.tsx +18 -5
- package/src/components/tree.tsx +96 -29
- package/src/index.ts +1 -1
- package/src/internal.ts +11 -0
- package/src/styles/semantic-theme.ts +345 -0
- package/src/styles/use-styles.ts +318 -310
- package/dist/esm/styles/tokens.js +0 -301
- package/dist/esm/styles/tokens.js.map +0 -1
package/src/styles/use-styles.ts
CHANGED
|
@@ -1,138 +1,32 @@
|
|
|
1
1
|
import * as goober from 'goober'
|
|
2
2
|
import { createEffect, createSignal } from 'solid-js'
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { createTheme } from '../components/theme'
|
|
4
|
+
import { resolveSemanticTheme } from './semantic-theme'
|
|
5
|
+
import type { tokens } from './tokens'
|
|
5
6
|
|
|
6
7
|
import type { TanStackDevtoolsTheme } from '../components/theme'
|
|
7
8
|
import type { ButtonVariant } from '../components/button'
|
|
8
9
|
|
|
9
|
-
const buttonVariantColors: Record<
|
|
10
|
-
ButtonVariant,
|
|
11
|
-
{
|
|
12
|
-
bg: { light: string; dark: string }
|
|
13
|
-
hover: { light: string; dark: string }
|
|
14
|
-
active: { light: string; dark: string }
|
|
15
|
-
text: { light: string; dark: string }
|
|
16
|
-
border: { light: string; dark: string }
|
|
17
|
-
outline: { light: string; dark: string }
|
|
18
|
-
outlineHover: { light: string; dark: string }
|
|
19
|
-
}
|
|
20
|
-
> = {
|
|
21
|
-
primary: {
|
|
22
|
-
bg: { light: tokens.colors.gray[900], dark: tokens.colors.gray[100] },
|
|
23
|
-
hover: { light: tokens.colors.gray[800], dark: tokens.colors.gray[200] },
|
|
24
|
-
active: { light: tokens.colors.gray[700], dark: tokens.colors.gray[300] },
|
|
25
|
-
text: { light: '#fff', dark: tokens.colors.gray[900] },
|
|
26
|
-
border: { light: tokens.colors.gray[800], dark: tokens.colors.gray[200] },
|
|
27
|
-
outline: {
|
|
28
|
-
light: tokens.colors.gray[900],
|
|
29
|
-
dark: tokens.colors.gray[100],
|
|
30
|
-
},
|
|
31
|
-
outlineHover: {
|
|
32
|
-
light: tokens.colors.gray[800],
|
|
33
|
-
dark: tokens.colors.gray[200],
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
secondary: {
|
|
37
|
-
bg: { light: tokens.colors.gray[100], dark: tokens.colors.gray[100] },
|
|
38
|
-
hover: { light: tokens.colors.gray[200], dark: tokens.colors.gray[200] },
|
|
39
|
-
active: { light: tokens.colors.gray[300], dark: tokens.colors.gray[300] },
|
|
40
|
-
text: { light: tokens.colors.gray[900], dark: tokens.colors.gray[900] },
|
|
41
|
-
border: { light: tokens.colors.gray[300], dark: tokens.colors.gray[300] },
|
|
42
|
-
outline: {
|
|
43
|
-
light: tokens.colors.gray[700],
|
|
44
|
-
dark: tokens.colors.gray[300],
|
|
45
|
-
},
|
|
46
|
-
outlineHover: {
|
|
47
|
-
light: tokens.colors.gray[800],
|
|
48
|
-
dark: tokens.colors.gray[200],
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
info: {
|
|
52
|
-
bg: { light: tokens.colors.blue[500], dark: tokens.colors.blue[500] },
|
|
53
|
-
hover: { light: tokens.colors.blue[600], dark: tokens.colors.blue[600] },
|
|
54
|
-
active: { light: tokens.colors.blue[700], dark: tokens.colors.blue[700] },
|
|
55
|
-
text: { light: '#fff', dark: '#fff' },
|
|
56
|
-
border: { light: tokens.colors.blue[500], dark: tokens.colors.blue[500] },
|
|
57
|
-
outline: {
|
|
58
|
-
light: tokens.colors.blue[700],
|
|
59
|
-
dark: tokens.colors.blue[300],
|
|
60
|
-
},
|
|
61
|
-
outlineHover: {
|
|
62
|
-
light: tokens.colors.blue[600],
|
|
63
|
-
dark: tokens.colors.blue[200],
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
warning: {
|
|
67
|
-
bg: { light: tokens.colors.yellow[500], dark: tokens.colors.yellow[500] },
|
|
68
|
-
hover: {
|
|
69
|
-
light: tokens.colors.yellow[600],
|
|
70
|
-
dark: tokens.colors.yellow[600],
|
|
71
|
-
},
|
|
72
|
-
active: {
|
|
73
|
-
light: tokens.colors.yellow[700],
|
|
74
|
-
dark: tokens.colors.yellow[700],
|
|
75
|
-
},
|
|
76
|
-
text: { light: '#fff', dark: '#fff' },
|
|
77
|
-
border: {
|
|
78
|
-
light: tokens.colors.yellow[500],
|
|
79
|
-
dark: tokens.colors.yellow[500],
|
|
80
|
-
},
|
|
81
|
-
outline: {
|
|
82
|
-
light: tokens.colors.yellow[700],
|
|
83
|
-
dark: tokens.colors.yellow[300],
|
|
84
|
-
},
|
|
85
|
-
outlineHover: {
|
|
86
|
-
light: tokens.colors.yellow[600],
|
|
87
|
-
dark: tokens.colors.yellow[200],
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
danger: {
|
|
91
|
-
bg: { light: tokens.colors.red[500], dark: tokens.colors.red[500] },
|
|
92
|
-
hover: { light: tokens.colors.red[600], dark: tokens.colors.red[600] },
|
|
93
|
-
active: { light: tokens.colors.red[700], dark: tokens.colors.red[700] },
|
|
94
|
-
text: { light: '#fff', dark: '#fff' },
|
|
95
|
-
border: { light: tokens.colors.red[500], dark: tokens.colors.red[500] },
|
|
96
|
-
outline: {
|
|
97
|
-
light: tokens.colors.red[700],
|
|
98
|
-
dark: tokens.colors.red[300],
|
|
99
|
-
},
|
|
100
|
-
outlineHover: {
|
|
101
|
-
light: tokens.colors.red[600],
|
|
102
|
-
dark: tokens.colors.red[200],
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
success: {
|
|
106
|
-
bg: { light: tokens.colors.green[500], dark: tokens.colors.green[500] },
|
|
107
|
-
hover: { light: tokens.colors.green[600], dark: tokens.colors.green[600] },
|
|
108
|
-
active: { light: tokens.colors.green[700], dark: tokens.colors.green[700] },
|
|
109
|
-
text: { light: '#fff', dark: '#fff' },
|
|
110
|
-
border: { light: tokens.colors.green[500], dark: tokens.colors.green[500] },
|
|
111
|
-
outline: {
|
|
112
|
-
light: tokens.colors.green[700],
|
|
113
|
-
dark: tokens.colors.green[300],
|
|
114
|
-
},
|
|
115
|
-
outlineHover: {
|
|
116
|
-
light: tokens.colors.green[600],
|
|
117
|
-
dark: tokens.colors.green[200],
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
}
|
|
121
10
|
export const css = goober.css
|
|
122
11
|
const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
123
|
-
const
|
|
124
|
-
const { fontFamily } = font
|
|
12
|
+
const semantic = resolveSemanticTheme(theme)
|
|
125
13
|
|
|
126
14
|
const t = (light: string, dark: string) => (theme === 'light' ? light : dark)
|
|
127
15
|
const buildButtonVariant = (variant: ButtonVariant) => {
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
const
|
|
16
|
+
const statusRole =
|
|
17
|
+
variant === 'danger'
|
|
18
|
+
? 'error'
|
|
19
|
+
: variant === 'primary' || variant === 'secondary'
|
|
20
|
+
? 'neutral'
|
|
21
|
+
: variant
|
|
22
|
+
const status = semantic.color.status[statusRole]
|
|
23
|
+
const outlineColor = status.text
|
|
24
|
+
const outlineHoverColor = status.text
|
|
25
|
+
const solidBg = status.solidFill
|
|
26
|
+
const solidHover = status.border
|
|
27
|
+
const solidActive = status.solidFill
|
|
28
|
+
const solidText = status.onFill
|
|
29
|
+
const solidBorder = status.border
|
|
136
30
|
|
|
137
31
|
return {
|
|
138
32
|
ghost: css`
|
|
@@ -140,11 +34,11 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
140
34
|
color: ${outlineColor};
|
|
141
35
|
border-color: transparent;
|
|
142
36
|
&:hover {
|
|
143
|
-
background: ${
|
|
37
|
+
background: ${semantic.color.state.hover};
|
|
144
38
|
color: ${outlineHoverColor};
|
|
145
39
|
}
|
|
146
40
|
&:active {
|
|
147
|
-
background: ${
|
|
41
|
+
background: ${semantic.color.state.pressed};
|
|
148
42
|
color: ${outlineHoverColor};
|
|
149
43
|
}
|
|
150
44
|
`,
|
|
@@ -153,12 +47,12 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
153
47
|
color: ${outlineColor};
|
|
154
48
|
border-color: ${outlineColor};
|
|
155
49
|
&:hover {
|
|
156
|
-
background: ${
|
|
50
|
+
background: ${semantic.color.state.hover};
|
|
157
51
|
color: ${outlineHoverColor};
|
|
158
52
|
border-color: ${outlineHoverColor};
|
|
159
53
|
}
|
|
160
54
|
&:active {
|
|
161
|
-
background: ${
|
|
55
|
+
background: ${semantic.color.state.pressed};
|
|
162
56
|
color: ${outlineHoverColor};
|
|
163
57
|
border-color: ${outlineHoverColor};
|
|
164
58
|
}
|
|
@@ -170,18 +64,12 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
170
64
|
&:hover {
|
|
171
65
|
background: ${solidHover};
|
|
172
66
|
border-color: ${solidHover};
|
|
173
|
-
box-shadow: ${
|
|
174
|
-
tokens.shadow.xs('rgb(0 0 0 / 0.12)'),
|
|
175
|
-
tokens.shadow.xs('rgb(0 0 0 / 0.5)'),
|
|
176
|
-
)};
|
|
67
|
+
box-shadow: ${semantic.shadow.xs};
|
|
177
68
|
}
|
|
178
69
|
&:active {
|
|
179
70
|
background: ${solidActive};
|
|
180
71
|
border-color: ${solidActive};
|
|
181
|
-
box-shadow: ${
|
|
182
|
-
tokens.shadow.inner('rgb(0 0 0 / 0.2)'),
|
|
183
|
-
tokens.shadow.inner('rgb(0 0 0 / 0.6)'),
|
|
184
|
-
)};
|
|
72
|
+
box-shadow: ${semantic.shadow.sm};
|
|
185
73
|
}
|
|
186
74
|
`,
|
|
187
75
|
}
|
|
@@ -199,6 +87,19 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
199
87
|
}
|
|
200
88
|
|
|
201
89
|
const wrapperSize = 320
|
|
90
|
+
const legacyTagColor = (color: keyof typeof tokens.colors) => {
|
|
91
|
+
const semanticRole =
|
|
92
|
+
color === 'red'
|
|
93
|
+
? 'error'
|
|
94
|
+
: color === 'yellow'
|
|
95
|
+
? 'warning'
|
|
96
|
+
: color === 'green'
|
|
97
|
+
? 'success'
|
|
98
|
+
: color === 'blue' || color === 'cyan' || color === 'teal'
|
|
99
|
+
? 'info'
|
|
100
|
+
: 'neutral'
|
|
101
|
+
return semantic.color.status[semanticRole].solidFill
|
|
102
|
+
}
|
|
202
103
|
|
|
203
104
|
return {
|
|
204
105
|
logo: css`
|
|
@@ -207,10 +108,10 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
207
108
|
flex-direction: column;
|
|
208
109
|
background-color: transparent;
|
|
209
110
|
border: none;
|
|
210
|
-
width:
|
|
211
|
-
height:
|
|
212
|
-
font-family: ${
|
|
213
|
-
gap: ${
|
|
111
|
+
width: 48px;
|
|
112
|
+
height: 48px;
|
|
113
|
+
font-family: ${semantic.font.body};
|
|
114
|
+
gap: ${semantic.gap.tight};
|
|
214
115
|
padding: 0;
|
|
215
116
|
&:hover {
|
|
216
117
|
opacity: 0.7;
|
|
@@ -222,50 +123,77 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
222
123
|
max-width: ${wrapperSize}px;
|
|
223
124
|
display: flex;
|
|
224
125
|
flex-direction: column;
|
|
225
|
-
gap:
|
|
126
|
+
gap: ${semantic.gap.tight};
|
|
226
127
|
`,
|
|
227
128
|
selectContainer: css`
|
|
228
129
|
width: 100%;
|
|
130
|
+
&::selection,
|
|
131
|
+
& *::selection {
|
|
132
|
+
background: ${semantic.color.state.selectionFill};
|
|
133
|
+
color: ${semantic.color.state.selectionText};
|
|
134
|
+
}
|
|
229
135
|
`,
|
|
230
136
|
selectLabel: css`
|
|
231
|
-
font
|
|
232
|
-
|
|
233
|
-
|
|
137
|
+
font: ${semantic.type.labelSm.weight} ${semantic.type.labelSm.size} /
|
|
138
|
+
${semantic.type.labelSm.lineHeight} ${semantic.font.body};
|
|
139
|
+
letter-spacing: ${semantic.type.labelSm.tracking};
|
|
140
|
+
color: ${semantic.color.text.primary};
|
|
234
141
|
text-align: left;
|
|
235
142
|
`,
|
|
236
143
|
selectDescription: css`
|
|
237
|
-
font
|
|
238
|
-
|
|
144
|
+
font: ${semantic.type.bodyXs.weight} ${semantic.type.bodyXs.size} /
|
|
145
|
+
${semantic.type.bodyXs.lineHeight} ${semantic.font.body};
|
|
146
|
+
color: ${semantic.color.text.secondary};
|
|
239
147
|
margin: 0;
|
|
240
|
-
line-height: 1.3;
|
|
241
148
|
text-align: left;
|
|
242
149
|
`,
|
|
243
150
|
select: css`
|
|
151
|
+
/* The platform chevron is drawn in the OS accent, which reads as foreign
|
|
152
|
+
next to the rest of the panel — draw our own from currentColor instead
|
|
153
|
+
so it follows the theme. */
|
|
244
154
|
appearance: none;
|
|
155
|
+
-webkit-appearance: none;
|
|
245
156
|
width: 100%;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
157
|
+
box-sizing: border-box;
|
|
158
|
+
padding: ${semantic.padding.controlBlock} 28px
|
|
159
|
+
${semantic.padding.controlBlock} ${semantic.padding.controlInline};
|
|
160
|
+
border-radius: ${semantic.radius.control};
|
|
161
|
+
background-color: ${semantic.color.surface.elevated};
|
|
162
|
+
background-image:
|
|
163
|
+
linear-gradient(45deg, transparent 50%, currentColor 50%),
|
|
164
|
+
linear-gradient(135deg, currentColor 50%, transparent 50%);
|
|
165
|
+
background-position:
|
|
166
|
+
right 14px center,
|
|
167
|
+
right 9px center;
|
|
168
|
+
background-size:
|
|
169
|
+
5px 5px,
|
|
170
|
+
5px 5px;
|
|
257
171
|
background-repeat: no-repeat;
|
|
258
|
-
|
|
259
|
-
|
|
172
|
+
color: ${semantic.color.text.primary};
|
|
173
|
+
border: 1px solid ${semantic.color.border.control};
|
|
174
|
+
font: ${semantic.type.bodySm.weight} ${semantic.type.bodySm.size} /
|
|
175
|
+
${semantic.type.bodySm.lineHeight} ${semantic.font.body};
|
|
176
|
+
transition:
|
|
177
|
+
border-color 0.15s ease,
|
|
178
|
+
background-color 0.15s ease;
|
|
179
|
+
cursor: pointer;
|
|
260
180
|
|
|
261
181
|
&:hover {
|
|
262
|
-
border-color: ${
|
|
182
|
+
border-color: ${semantic.color.border.focus};
|
|
263
183
|
}
|
|
264
184
|
|
|
265
|
-
&:focus {
|
|
266
|
-
outline:
|
|
267
|
-
|
|
268
|
-
|
|
185
|
+
&:focus-visible {
|
|
186
|
+
outline: 2px solid ${semantic.color.border.focus};
|
|
187
|
+
outline-offset: 2px;
|
|
188
|
+
}
|
|
189
|
+
/* The custom chevron is decorative; let the platform draw its own when
|
|
190
|
+
the user forces system colours. */
|
|
191
|
+
@media (forced-colors: active) {
|
|
192
|
+
appearance: auto;
|
|
193
|
+
background-image: none;
|
|
194
|
+
}
|
|
195
|
+
@media (prefers-reduced-motion: reduce) {
|
|
196
|
+
transition: none;
|
|
269
197
|
}
|
|
270
198
|
`,
|
|
271
199
|
inputWrapper: css`
|
|
@@ -273,117 +201,134 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
273
201
|
max-width: ${wrapperSize}px;
|
|
274
202
|
display: flex;
|
|
275
203
|
flex-direction: column;
|
|
276
|
-
gap:
|
|
204
|
+
gap: ${semantic.gap.tight};
|
|
277
205
|
`,
|
|
278
206
|
inputContainer: css`
|
|
279
207
|
width: 100%;
|
|
208
|
+
&::selection,
|
|
209
|
+
& *::selection {
|
|
210
|
+
background: ${semantic.color.state.selectionFill};
|
|
211
|
+
color: ${semantic.color.state.selectionText};
|
|
212
|
+
}
|
|
280
213
|
`,
|
|
281
214
|
inputLabel: css`
|
|
282
|
-
font
|
|
283
|
-
|
|
284
|
-
|
|
215
|
+
font: ${semantic.type.labelSm.weight} ${semantic.type.labelSm.size} /
|
|
216
|
+
${semantic.type.labelSm.lineHeight} ${semantic.font.body};
|
|
217
|
+
letter-spacing: ${semantic.type.labelSm.tracking};
|
|
218
|
+
color: ${semantic.color.text.primary};
|
|
285
219
|
text-align: left;
|
|
286
220
|
`,
|
|
287
221
|
inputDescription: css`
|
|
288
|
-
font
|
|
289
|
-
|
|
222
|
+
font: ${semantic.type.bodyXs.weight} ${semantic.type.bodyXs.size} /
|
|
223
|
+
${semantic.type.bodyXs.lineHeight} ${semantic.font.body};
|
|
224
|
+
color: ${semantic.color.text.secondary};
|
|
290
225
|
margin: 0;
|
|
291
|
-
line-height: 1.3;
|
|
292
226
|
text-align: left;
|
|
293
227
|
`,
|
|
294
228
|
input: css`
|
|
295
229
|
appearance: none;
|
|
296
230
|
box-sizing: border-box;
|
|
297
231
|
width: 100%;
|
|
298
|
-
padding:
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
color: ${
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
font
|
|
232
|
+
padding: ${semantic.padding.controlBlock}
|
|
233
|
+
${semantic.padding.controlInline};
|
|
234
|
+
border-radius: ${semantic.radius.control};
|
|
235
|
+
background-color: ${semantic.color.surface.elevated};
|
|
236
|
+
color: ${semantic.color.text.primary};
|
|
237
|
+
border: 1px solid ${semantic.color.border.control};
|
|
238
|
+
font: ${semantic.type.bodySm.weight} ${semantic.type.bodySm.size} /
|
|
239
|
+
${semantic.type.bodySm.lineHeight} ${semantic.font.body};
|
|
305
240
|
transition: all 0.15s ease;
|
|
306
241
|
|
|
307
242
|
&::placeholder {
|
|
308
|
-
color: ${
|
|
243
|
+
color: ${semantic.color.text.secondary};
|
|
309
244
|
}
|
|
310
245
|
|
|
311
246
|
&:hover {
|
|
312
|
-
border-color: ${
|
|
247
|
+
border-color: ${semantic.color.border.focus};
|
|
313
248
|
}
|
|
314
249
|
|
|
315
250
|
&:focus {
|
|
316
|
-
outline:
|
|
317
|
-
|
|
318
|
-
box-shadow: 0 0 0 3px ${t(colors.gray[200], colors.gray[800])};
|
|
251
|
+
outline: 2px solid ${semantic.color.border.focus};
|
|
252
|
+
outline-offset: 2px;
|
|
319
253
|
}
|
|
320
254
|
`,
|
|
321
255
|
checkboxWrapper: css`
|
|
322
256
|
display: flex;
|
|
323
257
|
align-items: flex-start;
|
|
324
|
-
gap:
|
|
258
|
+
gap: ${semantic.gap.control};
|
|
325
259
|
cursor: pointer;
|
|
326
260
|
user-select: none;
|
|
327
|
-
padding:
|
|
328
|
-
|
|
261
|
+
padding: ${semantic.padding.controlBlock}
|
|
262
|
+
${semantic.padding.controlInline};
|
|
263
|
+
border-radius: ${semantic.radius.control};
|
|
329
264
|
transition: background-color 0.15s ease;
|
|
330
265
|
|
|
331
266
|
&:hover {
|
|
332
|
-
background-color: ${
|
|
267
|
+
background-color: ${semantic.color.state.hover};
|
|
333
268
|
}
|
|
334
269
|
`,
|
|
335
270
|
checkboxContainer: css`
|
|
336
271
|
width: 100%;
|
|
272
|
+
&::selection,
|
|
273
|
+
& *::selection {
|
|
274
|
+
background: ${semantic.color.state.selectionFill};
|
|
275
|
+
color: ${semantic.color.state.selectionText};
|
|
276
|
+
}
|
|
337
277
|
`,
|
|
338
278
|
checkboxLabelContainer: css`
|
|
339
279
|
display: flex;
|
|
340
280
|
flex-direction: column;
|
|
341
|
-
gap:
|
|
281
|
+
gap: ${semantic.gap.tight};
|
|
342
282
|
flex: 1;
|
|
343
283
|
`,
|
|
344
284
|
checkbox: css`
|
|
345
285
|
appearance: none;
|
|
346
|
-
width:
|
|
347
|
-
height:
|
|
348
|
-
border: 2px solid ${
|
|
349
|
-
border-radius:
|
|
350
|
-
background-color: ${
|
|
286
|
+
width: ${semantic.space[4]};
|
|
287
|
+
height: ${semantic.space[4]};
|
|
288
|
+
border: 2px solid ${semantic.color.border.control};
|
|
289
|
+
border-radius: ${semantic.radius.control};
|
|
290
|
+
background-color: ${semantic.color.surface.elevated};
|
|
351
291
|
display: grid;
|
|
352
292
|
place-items: center;
|
|
353
293
|
transition: all 0.15s ease;
|
|
354
294
|
flex-shrink: 0;
|
|
355
|
-
margin-top:
|
|
295
|
+
margin-top: ${semantic.space[1]};
|
|
356
296
|
|
|
357
297
|
&:hover {
|
|
358
|
-
border-color: ${
|
|
298
|
+
border-color: ${semantic.color.border.focus};
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&:focus-visible {
|
|
302
|
+
outline: 2px solid ${semantic.color.border.focus};
|
|
303
|
+
outline-offset: 2px;
|
|
359
304
|
}
|
|
360
305
|
|
|
361
306
|
&:checked {
|
|
362
|
-
background-color: ${
|
|
363
|
-
border-color: ${
|
|
307
|
+
background-color: ${semantic.color.state.selectionFill};
|
|
308
|
+
border-color: ${semantic.color.state.selectionFill};
|
|
364
309
|
}
|
|
365
310
|
|
|
366
311
|
&:checked::after {
|
|
367
312
|
content: '';
|
|
368
|
-
width:
|
|
369
|
-
height:
|
|
370
|
-
border: solid ${
|
|
313
|
+
width: ${semantic.space[1]};
|
|
314
|
+
height: ${semantic.space[2]};
|
|
315
|
+
border: solid ${semantic.color.state.selectionText};
|
|
371
316
|
border-width: 0 2px 2px 0;
|
|
372
317
|
transform: rotate(45deg);
|
|
373
318
|
margin-top: -3px;
|
|
374
319
|
}
|
|
375
320
|
`,
|
|
376
321
|
checkboxLabel: css`
|
|
377
|
-
color: ${
|
|
378
|
-
font
|
|
379
|
-
|
|
380
|
-
|
|
322
|
+
color: ${semantic.color.text.primary};
|
|
323
|
+
font: ${semantic.type.labelSm.weight} ${semantic.type.labelSm.size} /
|
|
324
|
+
${semantic.type.labelSm.lineHeight} ${semantic.font.body};
|
|
325
|
+
letter-spacing: ${semantic.type.labelSm.tracking};
|
|
381
326
|
text-align: left;
|
|
382
327
|
`,
|
|
383
328
|
checkboxDescription: css`
|
|
384
|
-
color: ${
|
|
385
|
-
font
|
|
386
|
-
|
|
329
|
+
color: ${semantic.color.text.secondary};
|
|
330
|
+
font: ${semantic.type.bodyXs.weight} ${semantic.type.bodyXs.size} /
|
|
331
|
+
${semantic.type.bodyXs.lineHeight} ${semantic.font.body};
|
|
387
332
|
text-align: left;
|
|
388
333
|
`,
|
|
389
334
|
button: {
|
|
@@ -391,20 +336,29 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
391
336
|
display: inline-flex;
|
|
392
337
|
align-items: center;
|
|
393
338
|
justify-content: center;
|
|
394
|
-
font-family: ${
|
|
395
|
-
font-size:
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
339
|
+
font-family: ${semantic.font.body};
|
|
340
|
+
font-size: ${semantic.type.bodyXs.size};
|
|
341
|
+
line-height: ${semantic.type.bodyXs.lineHeight};
|
|
342
|
+
font-weight: ${semantic.type.labelSm.weight};
|
|
343
|
+
border-radius: ${semantic.radius.control};
|
|
344
|
+
padding: ${semantic.padding.controlBlock}
|
|
345
|
+
${semantic.padding.controlInline};
|
|
399
346
|
cursor: pointer;
|
|
400
347
|
transition:
|
|
401
348
|
background 0.15s,
|
|
402
349
|
color 0.15s,
|
|
403
350
|
border 0.15s,
|
|
404
351
|
box-shadow 0.15s;
|
|
405
|
-
|
|
352
|
+
&:focus-visible {
|
|
353
|
+
outline: 2px solid ${semantic.color.border.focus};
|
|
354
|
+
outline-offset: 2px;
|
|
355
|
+
}
|
|
406
356
|
border-width: 1px;
|
|
407
357
|
border-style: solid;
|
|
358
|
+
&:disabled {
|
|
359
|
+
cursor: not-allowed;
|
|
360
|
+
opacity: 0.6;
|
|
361
|
+
}
|
|
408
362
|
`,
|
|
409
363
|
variant(variant: ButtonVariant, outline?: boolean, ghost?: boolean) {
|
|
410
364
|
const v = buttonVariants[variant]
|
|
@@ -419,81 +373,95 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
419
373
|
},
|
|
420
374
|
tag: {
|
|
421
375
|
dot: (color: keyof typeof tokens.colors) => css`
|
|
422
|
-
width: ${
|
|
423
|
-
height: ${
|
|
424
|
-
border-radius:
|
|
425
|
-
background-color: ${
|
|
426
|
-
tokens.colors[color][500],
|
|
427
|
-
tokens.colors[color][500],
|
|
428
|
-
)};
|
|
376
|
+
width: ${semantic.space[1]};
|
|
377
|
+
height: ${semantic.space[1]};
|
|
378
|
+
border-radius: 9999px;
|
|
379
|
+
background-color: ${legacyTagColor(color)};
|
|
429
380
|
`,
|
|
430
381
|
base: css`
|
|
431
382
|
display: flex;
|
|
432
|
-
gap: ${
|
|
383
|
+
gap: ${semantic.gap.tight};
|
|
433
384
|
box-sizing: border-box;
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
padding
|
|
385
|
+
background: ${semantic.color.surface.subtle};
|
|
386
|
+
color: ${semantic.color.text.primary};
|
|
387
|
+
border-radius: ${semantic.radius.control};
|
|
388
|
+
font-size: ${semantic.type.bodyXs.size};
|
|
389
|
+
line-height: ${semantic.type.bodyXs.lineHeight};
|
|
390
|
+
font-family: ${semantic.font.body};
|
|
391
|
+
padding: ${semantic.padding.controlBlock}
|
|
392
|
+
${semantic.padding.controlInline};
|
|
441
393
|
align-items: center;
|
|
442
|
-
font-weight: ${
|
|
443
|
-
border:
|
|
394
|
+
font-weight: ${semantic.type.labelSm.weight};
|
|
395
|
+
border: 1px solid ${semantic.color.border.control};
|
|
444
396
|
user-select: none;
|
|
445
397
|
position: relative;
|
|
398
|
+
&::selection,
|
|
399
|
+
& *::selection {
|
|
400
|
+
background: ${semantic.color.state.selectionFill};
|
|
401
|
+
color: ${semantic.color.state.selectionText};
|
|
402
|
+
}
|
|
446
403
|
&:focus-visible {
|
|
447
404
|
outline-offset: 2px;
|
|
448
|
-
outline: 2px solid ${
|
|
405
|
+
outline: 2px solid ${semantic.color.border.focus};
|
|
449
406
|
}
|
|
450
407
|
`,
|
|
451
408
|
label: css`
|
|
452
|
-
font-size: ${
|
|
409
|
+
font-size: ${semantic.type.bodyXs.size};
|
|
410
|
+
line-height: ${semantic.type.bodyXs.lineHeight};
|
|
411
|
+
font-family: ${semantic.font.body};
|
|
412
|
+
letter-spacing: ${semantic.type.labelSm.tracking};
|
|
453
413
|
`,
|
|
454
414
|
count: css`
|
|
455
|
-
font-size: ${
|
|
456
|
-
padding: 0
|
|
415
|
+
font-size: ${semantic.type.bodyXs.size};
|
|
416
|
+
padding: 0 ${semantic.space[1]};
|
|
457
417
|
display: flex;
|
|
458
418
|
align-items: center;
|
|
459
419
|
justify-content: center;
|
|
460
|
-
color: ${
|
|
461
|
-
background-color: ${
|
|
462
|
-
border-radius:
|
|
420
|
+
color: ${semantic.color.text.secondary};
|
|
421
|
+
background-color: ${semantic.color.state.hover};
|
|
422
|
+
border-radius: ${semantic.radius.control};
|
|
423
|
+
line-height: ${semantic.type.bodyXs.lineHeight};
|
|
424
|
+
font-family: ${semantic.font.body};
|
|
463
425
|
font-variant-numeric: tabular-nums;
|
|
464
|
-
height: ${
|
|
426
|
+
min-height: ${semantic.space[4]};
|
|
465
427
|
`,
|
|
466
428
|
},
|
|
467
429
|
tree: {
|
|
468
430
|
info: css`
|
|
469
|
-
color: ${
|
|
470
|
-
font-size: ${
|
|
471
|
-
margin-right: ${
|
|
431
|
+
color: ${semantic.color.text.secondary};
|
|
432
|
+
font-size: ${semantic.type.bodyXs.size};
|
|
433
|
+
margin-right: ${semantic.space[1]};
|
|
472
434
|
`,
|
|
473
435
|
actionButton: css`
|
|
474
436
|
background-color: transparent;
|
|
475
|
-
color: ${
|
|
437
|
+
color: ${semantic.color.text.secondary};
|
|
476
438
|
border: none;
|
|
477
439
|
display: inline-flex;
|
|
478
440
|
padding: 0;
|
|
479
441
|
align-items: center;
|
|
480
442
|
justify-content: center;
|
|
481
443
|
cursor: pointer;
|
|
482
|
-
width: ${
|
|
483
|
-
height: ${
|
|
444
|
+
width: ${semantic.space[3]};
|
|
445
|
+
height: ${semantic.space[3]};
|
|
484
446
|
position: relative;
|
|
485
447
|
z-index: 1;
|
|
486
448
|
|
|
487
449
|
&:hover svg {
|
|
488
|
-
color: ${
|
|
450
|
+
color: ${semantic.color.text.primary};
|
|
489
451
|
}
|
|
490
452
|
|
|
491
453
|
&:focus-visible {
|
|
492
|
-
border-radius: ${
|
|
493
|
-
outline: 2px solid ${
|
|
454
|
+
border-radius: ${semantic.radius.control};
|
|
455
|
+
outline: 2px solid ${semantic.color.border.focus};
|
|
494
456
|
outline-offset: 2px;
|
|
495
457
|
}
|
|
496
458
|
`,
|
|
459
|
+
actionSuccess: css`
|
|
460
|
+
color: ${semantic.color.status.success.text};
|
|
461
|
+
`,
|
|
462
|
+
actionError: css`
|
|
463
|
+
color: ${semantic.color.status.error.text};
|
|
464
|
+
`,
|
|
497
465
|
expanderContainer: css`
|
|
498
466
|
position: relative;
|
|
499
467
|
`,
|
|
@@ -503,38 +471,43 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
503
471
|
left: -16px;
|
|
504
472
|
top: 3px;
|
|
505
473
|
& path {
|
|
506
|
-
stroke: ${
|
|
474
|
+
stroke: ${semantic.color.text.link};
|
|
507
475
|
}
|
|
508
476
|
& svg {
|
|
509
|
-
width: ${
|
|
510
|
-
height: ${
|
|
477
|
+
width: ${semantic.space[3]};
|
|
478
|
+
height: ${semantic.space[3]};
|
|
511
479
|
}
|
|
512
480
|
|
|
513
481
|
display: inline-flex;
|
|
514
482
|
align-items: center;
|
|
515
483
|
transition: all 0.1s ease;
|
|
484
|
+
&:focus-visible {
|
|
485
|
+
border-radius: ${semantic.radius.control};
|
|
486
|
+
outline: 2px solid ${semantic.color.border.focus};
|
|
487
|
+
outline-offset: 2px;
|
|
488
|
+
}
|
|
516
489
|
`,
|
|
517
490
|
expandedLine: (hasBorder: boolean) => css`
|
|
518
491
|
display: block;
|
|
519
|
-
padding-left:
|
|
520
|
-
margin-left:
|
|
492
|
+
padding-left: ${semantic.space[3]};
|
|
493
|
+
margin-left: -${semantic.space[3]};
|
|
521
494
|
${hasBorder
|
|
522
|
-
? `border-left: 1px solid ${
|
|
495
|
+
? `border-left: 1px solid ${semantic.color.border.decorative};`
|
|
523
496
|
: ''}
|
|
524
497
|
`,
|
|
525
498
|
collapsible: css`
|
|
526
499
|
cursor: pointer;
|
|
527
500
|
transition: all 0.2s ease;
|
|
528
501
|
&:hover {
|
|
529
|
-
background-color: ${
|
|
530
|
-
border-radius: ${
|
|
531
|
-
padding: 0 ${
|
|
502
|
+
background-color: ${semantic.color.state.hover};
|
|
503
|
+
border-radius: ${semantic.radius.control};
|
|
504
|
+
padding: 0 ${semantic.space[1]};
|
|
532
505
|
}
|
|
533
506
|
`,
|
|
534
507
|
actions: css`
|
|
535
508
|
display: inline-flex;
|
|
536
|
-
margin-left: ${
|
|
537
|
-
gap: ${
|
|
509
|
+
margin-left: ${semantic.space[2]};
|
|
510
|
+
gap: ${semantic.gap.control};
|
|
538
511
|
align-items: center;
|
|
539
512
|
& svg {
|
|
540
513
|
height: 12px;
|
|
@@ -542,33 +515,43 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
542
515
|
}
|
|
543
516
|
`,
|
|
544
517
|
valueCollapsed: css`
|
|
545
|
-
color: ${
|
|
518
|
+
color: ${semantic.color.text.secondary};
|
|
546
519
|
`,
|
|
547
520
|
valueFunction: css`
|
|
548
|
-
color: ${
|
|
521
|
+
color: ${semantic.color.syntax.keyword};
|
|
549
522
|
`,
|
|
550
523
|
valueString: css`
|
|
551
|
-
color: ${
|
|
524
|
+
color: ${semantic.color.syntax.string};
|
|
552
525
|
`,
|
|
553
526
|
valueNumber: css`
|
|
554
|
-
color: ${
|
|
527
|
+
color: ${semantic.color.syntax.number};
|
|
555
528
|
`,
|
|
556
529
|
valueBoolean: css`
|
|
557
|
-
color: ${
|
|
530
|
+
color: ${semantic.color.syntax.keyword};
|
|
558
531
|
`,
|
|
559
532
|
valueNull: css`
|
|
560
|
-
color: ${
|
|
533
|
+
color: ${semantic.color.syntax.comment};
|
|
561
534
|
font-style: italic;
|
|
562
535
|
`,
|
|
563
536
|
valueKey: css`
|
|
564
|
-
color: ${
|
|
537
|
+
color: ${semantic.color.syntax.property};
|
|
565
538
|
`,
|
|
566
539
|
valueBraces: css`
|
|
567
|
-
color: ${
|
|
540
|
+
color: ${semantic.color.syntax.punctuation};
|
|
568
541
|
`,
|
|
569
542
|
valueContainer: (isRoot: boolean) => css`
|
|
570
543
|
display: block;
|
|
571
|
-
|
|
544
|
+
font-family: ${semantic.font.mono};
|
|
545
|
+
&::selection,
|
|
546
|
+
& *::selection {
|
|
547
|
+
background: ${semantic.color.state.selectionFill};
|
|
548
|
+
color: ${semantic.color.state.selectionText};
|
|
549
|
+
}
|
|
550
|
+
& [data-tsd-syntax]::selection {
|
|
551
|
+
background: ${semantic.color.syntax.selectionFill};
|
|
552
|
+
color: ${semantic.color.syntax.selectionText};
|
|
553
|
+
}
|
|
554
|
+
margin-left: ${isRoot ? '0' : semantic.space[4]};
|
|
572
555
|
|
|
573
556
|
&:not(:hover) .actions {
|
|
574
557
|
display: none;
|
|
@@ -584,21 +567,28 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
584
567
|
display: flex;
|
|
585
568
|
justify-content: space-between;
|
|
586
569
|
align-items: center;
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
570
|
+
&::selection,
|
|
571
|
+
& *::selection {
|
|
572
|
+
background: ${semantic.color.state.selectionFill};
|
|
573
|
+
color: ${semantic.color.state.selectionText};
|
|
574
|
+
}
|
|
575
|
+
padding: ${semantic.space[2]} ${semantic.space[3]};
|
|
576
|
+
gap: ${semantic.gap.control};
|
|
577
|
+
background: ${semantic.color.surface.elevated};
|
|
578
|
+
color: ${semantic.color.text.primary};
|
|
579
|
+
border-bottom: ${semantic.color.border.decorative} 1px solid;
|
|
590
580
|
align-items: center;
|
|
591
581
|
`,
|
|
592
582
|
logoAndToggleContainer: css`
|
|
593
583
|
display: flex;
|
|
594
|
-
gap: ${
|
|
584
|
+
gap: ${semantic.gap.section};
|
|
595
585
|
align-items: center;
|
|
596
586
|
& > button {
|
|
597
587
|
padding: 0;
|
|
598
588
|
background: transparent;
|
|
599
589
|
border: none;
|
|
600
590
|
display: flex;
|
|
601
|
-
gap: ${
|
|
591
|
+
gap: ${semantic.gap.tight};
|
|
602
592
|
flex-direction: column;
|
|
603
593
|
}
|
|
604
594
|
`,
|
|
@@ -608,54 +598,61 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
608
598
|
flex-direction: column;
|
|
609
599
|
background-color: transparent;
|
|
610
600
|
border: none;
|
|
611
|
-
gap: ${
|
|
601
|
+
gap: ${semantic.gap.tight};
|
|
612
602
|
padding: 0;
|
|
613
603
|
&:hover {
|
|
614
604
|
opacity: 0.7;
|
|
615
605
|
}
|
|
616
606
|
&:focus-visible {
|
|
617
|
-
outline-offset:
|
|
618
|
-
border-radius: ${
|
|
619
|
-
outline: 2px solid ${
|
|
607
|
+
outline-offset: 2px;
|
|
608
|
+
border-radius: ${semantic.radius.control};
|
|
609
|
+
outline: 2px solid ${semantic.color.border.focus};
|
|
620
610
|
}
|
|
621
611
|
`,
|
|
622
612
|
tanstackLogo: css`
|
|
623
|
-
font-size: ${
|
|
624
|
-
|
|
625
|
-
|
|
613
|
+
font-size: ${semantic.type.headingPane.size};
|
|
614
|
+
line-height: ${semantic.type.headingPane.lineHeight};
|
|
615
|
+
font-family: ${semantic.font.display};
|
|
616
|
+
font-weight: ${semantic.type.headingPane.weight};
|
|
626
617
|
white-space: nowrap;
|
|
627
|
-
color: ${
|
|
618
|
+
color: ${semantic.color.text.primary};
|
|
628
619
|
`,
|
|
629
620
|
flavorLogo: (flavorLight: string, flavorDark: string) => css`
|
|
630
|
-
font-weight: ${
|
|
631
|
-
font-size: ${
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
-
|
|
635
|
-
|
|
636
|
-
-webkit-text-fill-color: transparent;
|
|
621
|
+
font-weight: ${semantic.type.labelSm.weight};
|
|
622
|
+
font-size: ${semantic.type.labelSm.size};
|
|
623
|
+
line-height: ${semantic.type.labelSm.lineHeight};
|
|
624
|
+
font-family: ${semantic.font.body};
|
|
625
|
+
letter-spacing: ${semantic.type.labelSm.tracking};
|
|
626
|
+
color: ${t(flavorLight, flavorDark)};
|
|
637
627
|
white-space: nowrap;
|
|
638
628
|
`,
|
|
639
629
|
},
|
|
640
630
|
section: {
|
|
641
631
|
main: css`
|
|
642
|
-
margin-bottom:
|
|
643
|
-
padding:
|
|
644
|
-
background-color: ${
|
|
645
|
-
border: 1px solid ${
|
|
646
|
-
border-radius:
|
|
647
|
-
box-shadow:
|
|
632
|
+
margin-bottom: ${semantic.space[4]};
|
|
633
|
+
padding: ${semantic.space[4]};
|
|
634
|
+
background-color: ${semantic.color.surface.subtle};
|
|
635
|
+
border: 1px solid ${semantic.color.border.decorative};
|
|
636
|
+
border-radius: ${semantic.radius.overlay};
|
|
637
|
+
box-shadow: ${semantic.shadow.xs};
|
|
638
|
+
&::selection,
|
|
639
|
+
& *::selection {
|
|
640
|
+
background: ${semantic.color.state.selectionFill};
|
|
641
|
+
color: ${semantic.color.state.selectionText};
|
|
642
|
+
}
|
|
648
643
|
`,
|
|
649
644
|
title: css`
|
|
650
|
-
font-size:
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
645
|
+
font-size: ${semantic.type.headingPane.size};
|
|
646
|
+
line-height: ${semantic.type.headingPane.lineHeight};
|
|
647
|
+
font-weight: ${semantic.type.headingPane.weight};
|
|
648
|
+
color: ${semantic.color.text.primary};
|
|
649
|
+
font-family: ${semantic.font.display};
|
|
650
|
+
margin: 0 0 ${semantic.space[3]} 0;
|
|
651
|
+
padding-bottom: ${semantic.space[2]};
|
|
652
|
+
border-bottom: 1px solid ${semantic.color.border.decorative};
|
|
656
653
|
display: flex;
|
|
657
654
|
align-items: center;
|
|
658
|
-
gap:
|
|
655
|
+
gap: ${semantic.gap.control};
|
|
659
656
|
text-align: left;
|
|
660
657
|
`,
|
|
661
658
|
icon: css`
|
|
@@ -665,29 +662,40 @@ const stylesFactory = (theme: TanStackDevtoolsTheme) => {
|
|
|
665
662
|
height: 100%;
|
|
666
663
|
width: 100%;
|
|
667
664
|
}
|
|
668
|
-
color: ${
|
|
665
|
+
color: ${semantic.color.text.secondary};
|
|
669
666
|
`,
|
|
670
667
|
description: css`
|
|
671
|
-
color: ${
|
|
672
|
-
font
|
|
673
|
-
|
|
674
|
-
|
|
668
|
+
color: ${semantic.color.text.secondary};
|
|
669
|
+
font: ${semantic.type.bodyXs.weight} ${semantic.type.bodyXs.size} /
|
|
670
|
+
${semantic.type.bodyXs.lineHeight} ${semantic.font.body};
|
|
671
|
+
margin: 0 0 ${semantic.space[4]} 0;
|
|
675
672
|
text-align: left;
|
|
676
673
|
`,
|
|
677
674
|
},
|
|
678
675
|
mainPanel: {
|
|
679
676
|
panel: (withPadding: boolean) => css`
|
|
680
|
-
|
|
681
|
-
|
|
677
|
+
/* space[4] keeps the panel's own gutter equal to the workbench gutter,
|
|
678
|
+
so a destination's content lines up with the tab strip above it. */
|
|
679
|
+
padding: ${withPadding ? semantic.space[4] : 0};
|
|
680
|
+
background: ${semantic.color.surface.workspace};
|
|
681
|
+
color: ${semantic.color.text.primary};
|
|
682
682
|
overflow-y: auto;
|
|
683
|
+
/* Keep a scroll gesture inside the devtools instead of chaining it on
|
|
684
|
+
to the host page once this panel hits its end. */
|
|
685
|
+
overscroll-behavior: contain;
|
|
683
686
|
height: 100%;
|
|
687
|
+
&::selection,
|
|
688
|
+
& *::selection {
|
|
689
|
+
background: ${semantic.color.state.selectionFill};
|
|
690
|
+
color: ${semantic.color.state.selectionText};
|
|
691
|
+
}
|
|
684
692
|
`,
|
|
685
693
|
},
|
|
686
694
|
}
|
|
687
695
|
}
|
|
688
696
|
|
|
689
|
-
export function
|
|
690
|
-
const { theme } =
|
|
697
|
+
export function createStyles() {
|
|
698
|
+
const { theme } = createTheme()
|
|
691
699
|
const [styles, setStyles] = createSignal(stylesFactory(theme()))
|
|
692
700
|
createEffect(() => {
|
|
693
701
|
setStyles(stylesFactory(theme()))
|