@sentry/scraps 0.1.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/LICENSE.md +105 -0
- package/README.md +67 -0
- package/dist/code/inlineCode.d.ts +7 -0
- package/dist/code/inlineCode.js +38 -0
- package/dist/cssTypes.d.ts +57 -0
- package/dist/cssTypes.js +0 -0
- package/dist/hotkey/kbd.d.ts +8 -0
- package/dist/hotkey/kbd.js +31 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/layout/container.d.ts +114 -0
- package/dist/layout/container.js +161 -0
- package/dist/layout/flex.d.ts +42 -0
- package/dist/layout/flex.js +42 -0
- package/dist/layout/grid.d.ts +65 -0
- package/dist/layout/grid.js +83 -0
- package/dist/layout/index.d.ts +13 -0
- package/dist/layout/index.js +6 -0
- package/dist/layout/stack.d.ts +15 -0
- package/dist/layout/stack.js +55 -0
- package/dist/layout/styles.d.ts +118 -0
- package/dist/layout/styles.js +237 -0
- package/dist/layout/surface.d.ts +27 -0
- package/dist/layout/surface.js +28 -0
- package/dist/loader/indeterminateLoader.d.ts +5 -0
- package/dist/loader/indeterminateLoader.js +122 -0
- package/dist/loader/index.d.ts +1 -0
- package/dist/loader/index.js +1 -0
- package/dist/quote/index.d.ts +1 -0
- package/dist/quote/index.js +1 -0
- package/dist/quote/quote.d.ts +13 -0
- package/dist/quote/quote.js +73 -0
- package/dist/separator/index.d.ts +1 -0
- package/dist/separator/index.js +1 -0
- package/dist/separator/separator.d.ts +15 -0
- package/dist/separator/separator.js +29 -0
- package/dist/text/heading.d.ts +44 -0
- package/dist/text/heading.js +69 -0
- package/dist/text/index.d.ts +2 -0
- package/dist/text/index.js +2 -0
- package/dist/text/styles.d.ts +5 -0
- package/dist/text/styles.js +18 -0
- package/dist/text/text.d.ts +152 -0
- package/dist/text/text.js +81 -0
- package/dist/theme/base.d.ts +106 -0
- package/dist/theme/base.js +7 -0
- package/dist/theme/dark.d.ts +1904 -0
- package/dist/theme/dark.js +430 -0
- package/dist/theme/index.d.ts +14 -0
- package/dist/theme/index.js +3 -0
- package/dist/theme/light.d.ts +1904 -0
- package/dist/theme/light.js +430 -0
- package/dist/theme/types.d.ts +80 -0
- package/dist/theme/types.js +0 -0
- package/dist/tokens/color.d.ts +3309 -0
- package/dist/tokens/color.js +453 -0
- package/dist/tokens/index.d.ts +3 -0
- package/dist/tokens/index.js +3 -0
- package/dist/tokens/size.d.ts +372 -0
- package/dist/tokens/size.js +75 -0
- package/dist/tokens/typography.d.ts +88 -0
- package/dist/tokens/typography.js +35 -0
- package/package.json +83 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
import { color } from "../tokens/color.js";
|
|
2
|
+
import { baseTheme } from "./base.js";
|
|
3
|
+
const background = {
|
|
4
|
+
primary: color.white,
|
|
5
|
+
secondary: color.neutral.light.opaque100,
|
|
6
|
+
tertiary: color.neutral.light.opaque200,
|
|
7
|
+
overlay: color.white,
|
|
8
|
+
accent: {
|
|
9
|
+
vibrant: color.blue.light.opaque1000
|
|
10
|
+
},
|
|
11
|
+
promotion: {
|
|
12
|
+
vibrant: color.pink.light.opaque800
|
|
13
|
+
},
|
|
14
|
+
danger: {
|
|
15
|
+
vibrant: color.red.light.opaque1000
|
|
16
|
+
},
|
|
17
|
+
warning: {
|
|
18
|
+
vibrant: color.yellow.light.opaque600
|
|
19
|
+
},
|
|
20
|
+
success: {
|
|
21
|
+
vibrant: color.green.light.opaque800
|
|
22
|
+
},
|
|
23
|
+
transparent: {
|
|
24
|
+
neutral: {
|
|
25
|
+
muted: color.neutral.light.transparent200
|
|
26
|
+
},
|
|
27
|
+
accent: {
|
|
28
|
+
muted: color.blue.light.transparent200
|
|
29
|
+
},
|
|
30
|
+
promotion: {
|
|
31
|
+
muted: color.pink.light.transparent200
|
|
32
|
+
},
|
|
33
|
+
danger: {
|
|
34
|
+
muted: color.red.light.transparent200
|
|
35
|
+
},
|
|
36
|
+
warning: {
|
|
37
|
+
muted: color.yellow.light.transparent200
|
|
38
|
+
},
|
|
39
|
+
success: {
|
|
40
|
+
muted: color.green.light.transparent200
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const border = {
|
|
45
|
+
primary: color.neutral.light.opaque400,
|
|
46
|
+
secondary: color.neutral.light.opaque300,
|
|
47
|
+
neutral: {
|
|
48
|
+
muted: color.neutral.light.opaque400,
|
|
49
|
+
moderate: color.neutral.light.opaque600,
|
|
50
|
+
vibrant: color.neutral.light.opaque800
|
|
51
|
+
},
|
|
52
|
+
accent: {
|
|
53
|
+
muted: color.blue.light.opaque400,
|
|
54
|
+
moderate: color.blue.light.opaque600,
|
|
55
|
+
vibrant: color.blue.light.opaque1000
|
|
56
|
+
},
|
|
57
|
+
promotion: {
|
|
58
|
+
muted: color.pink.light.opaque400,
|
|
59
|
+
moderate: color.pink.light.opaque600,
|
|
60
|
+
vibrant: color.pink.light.opaque700
|
|
61
|
+
},
|
|
62
|
+
danger: {
|
|
63
|
+
muted: color.red.light.opaque400,
|
|
64
|
+
moderate: color.red.light.opaque600,
|
|
65
|
+
vibrant: color.red.light.opaque1000
|
|
66
|
+
},
|
|
67
|
+
warning: {
|
|
68
|
+
muted: color.yellow.light.opaque400,
|
|
69
|
+
moderate: color.yellow.light.opaque500,
|
|
70
|
+
vibrant: color.yellow.light.opaque600
|
|
71
|
+
},
|
|
72
|
+
success: {
|
|
73
|
+
muted: color.green.light.opaque400,
|
|
74
|
+
moderate: color.green.light.opaque600,
|
|
75
|
+
vibrant: color.green.light.opaque800
|
|
76
|
+
},
|
|
77
|
+
onVibrant: {
|
|
78
|
+
light: color.white,
|
|
79
|
+
dark: color.black
|
|
80
|
+
},
|
|
81
|
+
transparent: {
|
|
82
|
+
neutral: {
|
|
83
|
+
muted: color.neutral.light.transparent400,
|
|
84
|
+
moderate: color.neutral.light.transparent600,
|
|
85
|
+
vibrant: color.neutral.light.transparent800
|
|
86
|
+
},
|
|
87
|
+
accent: {
|
|
88
|
+
muted: color.blue.light.transparent400,
|
|
89
|
+
moderate: color.blue.light.transparent600,
|
|
90
|
+
vibrant: color.blue.light.transparent1000
|
|
91
|
+
},
|
|
92
|
+
promotion: {
|
|
93
|
+
muted: color.pink.light.transparent400,
|
|
94
|
+
moderate: color.pink.light.transparent600,
|
|
95
|
+
vibrant: color.pink.light.transparent700
|
|
96
|
+
},
|
|
97
|
+
danger: {
|
|
98
|
+
muted: color.red.light.transparent400,
|
|
99
|
+
moderate: color.red.light.transparent600,
|
|
100
|
+
vibrant: color.red.light.transparent1000
|
|
101
|
+
},
|
|
102
|
+
warning: {
|
|
103
|
+
muted: color.yellow.light.transparent400,
|
|
104
|
+
moderate: color.yellow.light.transparent500,
|
|
105
|
+
vibrant: color.yellow.light.transparent600
|
|
106
|
+
},
|
|
107
|
+
success: {
|
|
108
|
+
muted: color.green.light.transparent400,
|
|
109
|
+
moderate: color.green.light.transparent600,
|
|
110
|
+
vibrant: color.green.light.transparent800
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const content = {
|
|
115
|
+
primary: color.neutral.light.opaque1500,
|
|
116
|
+
secondary: color.neutral.light.opaque1100,
|
|
117
|
+
accent: color.blue.light.opaque1100,
|
|
118
|
+
promotion: color.pink.light.opaque1100,
|
|
119
|
+
danger: color.red.light.opaque1100,
|
|
120
|
+
warning: color.yellow.light.opaque1100,
|
|
121
|
+
success: color.green.light.opaque1100,
|
|
122
|
+
disabled: color.neutral.light.opaque900,
|
|
123
|
+
headings: color.neutral.light.opaque1600,
|
|
124
|
+
onVibrant: {
|
|
125
|
+
light: color.white,
|
|
126
|
+
dark: color.black
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const dataviz = {
|
|
130
|
+
categorical: [
|
|
131
|
+
[
|
|
132
|
+
color.categorical.light.blurple
|
|
133
|
+
],
|
|
134
|
+
[
|
|
135
|
+
color.categorical.light.blurple,
|
|
136
|
+
color.categorical.light.indigo
|
|
137
|
+
],
|
|
138
|
+
[
|
|
139
|
+
color.categorical.light.blurple,
|
|
140
|
+
color.categorical.light.indigo,
|
|
141
|
+
color.categorical.light.pink
|
|
142
|
+
],
|
|
143
|
+
[
|
|
144
|
+
color.categorical.light.blurple,
|
|
145
|
+
color.categorical.light.indigo,
|
|
146
|
+
color.categorical.light.pink,
|
|
147
|
+
color.categorical.light.orange
|
|
148
|
+
],
|
|
149
|
+
[
|
|
150
|
+
color.categorical.light.blurple,
|
|
151
|
+
color.categorical.light.indigo,
|
|
152
|
+
color.categorical.light.pink,
|
|
153
|
+
color.categorical.light.orange,
|
|
154
|
+
color.categorical.light.yellow
|
|
155
|
+
],
|
|
156
|
+
[
|
|
157
|
+
color.categorical.light.blurple,
|
|
158
|
+
color.categorical.light.indigo,
|
|
159
|
+
color.categorical.light.pink,
|
|
160
|
+
color.categorical.light.orange,
|
|
161
|
+
color.categorical.light.yellow,
|
|
162
|
+
color.categorical.light.green
|
|
163
|
+
],
|
|
164
|
+
[
|
|
165
|
+
color.categorical.light.blurple,
|
|
166
|
+
color.categorical.light.purple,
|
|
167
|
+
color.categorical.light.indigo,
|
|
168
|
+
color.categorical.light.pink,
|
|
169
|
+
color.categorical.light.orange,
|
|
170
|
+
color.categorical.light.yellow,
|
|
171
|
+
color.categorical.light.green
|
|
172
|
+
],
|
|
173
|
+
[
|
|
174
|
+
color.categorical.light.blurple,
|
|
175
|
+
color.categorical.light.purple,
|
|
176
|
+
color.categorical.light.indigo,
|
|
177
|
+
color.categorical.light.plum,
|
|
178
|
+
color.categorical.light.pink,
|
|
179
|
+
color.categorical.light.orange,
|
|
180
|
+
color.categorical.light.yellow,
|
|
181
|
+
color.categorical.light.green
|
|
182
|
+
],
|
|
183
|
+
[
|
|
184
|
+
color.categorical.light.blurple,
|
|
185
|
+
color.categorical.light.purple,
|
|
186
|
+
color.categorical.light.indigo,
|
|
187
|
+
color.categorical.light.plum,
|
|
188
|
+
color.categorical.light.magenta,
|
|
189
|
+
color.categorical.light.pink,
|
|
190
|
+
color.categorical.light.orange,
|
|
191
|
+
color.categorical.light.yellow,
|
|
192
|
+
color.categorical.light.green
|
|
193
|
+
],
|
|
194
|
+
[
|
|
195
|
+
color.categorical.light.blurple,
|
|
196
|
+
color.categorical.light.purple,
|
|
197
|
+
color.categorical.light.indigo,
|
|
198
|
+
color.categorical.light.plum,
|
|
199
|
+
color.categorical.light.magenta,
|
|
200
|
+
color.categorical.light.pink,
|
|
201
|
+
color.categorical.light.salmon,
|
|
202
|
+
color.categorical.light.orange,
|
|
203
|
+
color.categorical.light.yellow,
|
|
204
|
+
color.categorical.light.green
|
|
205
|
+
],
|
|
206
|
+
[
|
|
207
|
+
color.categorical.light.blurple,
|
|
208
|
+
color.categorical.light.purple,
|
|
209
|
+
color.categorical.light.indigo,
|
|
210
|
+
color.categorical.light.plum,
|
|
211
|
+
color.categorical.light.magenta,
|
|
212
|
+
color.categorical.light.pink,
|
|
213
|
+
color.categorical.light.salmon,
|
|
214
|
+
color.categorical.light.orange,
|
|
215
|
+
color.categorical.light.yellow,
|
|
216
|
+
color.categorical.light.lime,
|
|
217
|
+
color.categorical.light.green
|
|
218
|
+
]
|
|
219
|
+
],
|
|
220
|
+
semantic: {
|
|
221
|
+
neutral: color.neutral.light.opaque800,
|
|
222
|
+
accent: color.categorical.light.blurple,
|
|
223
|
+
good: color.green.light.opaque700,
|
|
224
|
+
meh: color.yellow.light.opaque600,
|
|
225
|
+
bad: color.red.light.opaque1200,
|
|
226
|
+
release: color.neutral.light.opaque900,
|
|
227
|
+
other: color.neutral.light.opaque400
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
const elevation = {
|
|
231
|
+
high: color.neutral.light.transparent100,
|
|
232
|
+
low: color.neutral.light.transparent200
|
|
233
|
+
};
|
|
234
|
+
const light_focus = {
|
|
235
|
+
default: border.accent.vibrant,
|
|
236
|
+
invalid: border.danger.vibrant,
|
|
237
|
+
onVibrant: {
|
|
238
|
+
light: border.onVibrant.light,
|
|
239
|
+
dark: border.onVibrant.dark
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
const graphics = {
|
|
243
|
+
neutral: {
|
|
244
|
+
muted: color.neutral.light.opaque400,
|
|
245
|
+
moderate: color.neutral.light.opaque600,
|
|
246
|
+
vibrant: color.neutral.light.opaque1000
|
|
247
|
+
},
|
|
248
|
+
accent: {
|
|
249
|
+
muted: color.blue.light.opaque400,
|
|
250
|
+
moderate: color.blue.light.opaque600,
|
|
251
|
+
vibrant: color.blue.light.opaque1000
|
|
252
|
+
},
|
|
253
|
+
promotion: {
|
|
254
|
+
muted: color.pink.light.opaque400,
|
|
255
|
+
moderate: color.pink.light.opaque600,
|
|
256
|
+
vibrant: color.pink.light.opaque1000
|
|
257
|
+
},
|
|
258
|
+
danger: {
|
|
259
|
+
muted: color.red.light.opaque400,
|
|
260
|
+
moderate: color.red.light.opaque600,
|
|
261
|
+
vibrant: color.red.light.opaque1000
|
|
262
|
+
},
|
|
263
|
+
warning: {
|
|
264
|
+
muted: color.yellow.light.opaque400,
|
|
265
|
+
moderate: color.yellow.light.opaque500,
|
|
266
|
+
vibrant: color.yellow.light.opaque800
|
|
267
|
+
},
|
|
268
|
+
success: {
|
|
269
|
+
muted: color.green.light.opaque400,
|
|
270
|
+
moderate: color.green.light.opaque600,
|
|
271
|
+
vibrant: color.green.light.opaque1000
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
const interactive = {
|
|
275
|
+
chonky: {
|
|
276
|
+
debossed: {
|
|
277
|
+
neutral: {
|
|
278
|
+
content: {
|
|
279
|
+
primary: content.headings,
|
|
280
|
+
secondary: content.secondary,
|
|
281
|
+
danger: content.danger
|
|
282
|
+
},
|
|
283
|
+
background: color.neutral.light.transparent100,
|
|
284
|
+
chonk: border.primary
|
|
285
|
+
},
|
|
286
|
+
accent: {
|
|
287
|
+
background: background.accent.vibrant,
|
|
288
|
+
chonk: color.blue.light.opaque1200
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
embossed: {
|
|
292
|
+
neutral: {
|
|
293
|
+
content: {
|
|
294
|
+
primary: content.headings,
|
|
295
|
+
secondary: content.secondary,
|
|
296
|
+
accent: content.accent
|
|
297
|
+
},
|
|
298
|
+
background: background.primary,
|
|
299
|
+
chonk: border.primary
|
|
300
|
+
},
|
|
301
|
+
accent: {
|
|
302
|
+
content: content.onVibrant.light,
|
|
303
|
+
background: background.accent.vibrant,
|
|
304
|
+
chonk: color.blue.light.opaque1200
|
|
305
|
+
},
|
|
306
|
+
promotion: {
|
|
307
|
+
content: content.onVibrant.dark,
|
|
308
|
+
background: background.promotion.vibrant,
|
|
309
|
+
chonk: color.pink.light.opaque1200
|
|
310
|
+
},
|
|
311
|
+
danger: {
|
|
312
|
+
content: content.onVibrant.light,
|
|
313
|
+
background: background.danger.vibrant,
|
|
314
|
+
chonk: color.red.light.opaque1200
|
|
315
|
+
},
|
|
316
|
+
warning: {
|
|
317
|
+
content: content.onVibrant.dark,
|
|
318
|
+
background: background.warning.vibrant,
|
|
319
|
+
chonk: color.yellow.light.opaque800
|
|
320
|
+
},
|
|
321
|
+
success: {
|
|
322
|
+
content: content.onVibrant.dark,
|
|
323
|
+
background: background.success.vibrant,
|
|
324
|
+
chonk: color.green.light.opaque1200
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
disabled: '0.6',
|
|
329
|
+
link: {
|
|
330
|
+
neutral: {
|
|
331
|
+
rest: content.secondary,
|
|
332
|
+
hover: color.neutral.light.opaque1200,
|
|
333
|
+
active: color.neutral.light.opaque1300
|
|
334
|
+
},
|
|
335
|
+
accent: {
|
|
336
|
+
rest: content.accent,
|
|
337
|
+
hover: color.blue.light.opaque1200,
|
|
338
|
+
active: color.blue.light.opaque1300
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
transparent: {
|
|
342
|
+
neutral: {
|
|
343
|
+
border: border.transparent.neutral.muted,
|
|
344
|
+
content: {
|
|
345
|
+
primary: content.primary,
|
|
346
|
+
secondary: content.secondary,
|
|
347
|
+
headings: content.headings
|
|
348
|
+
},
|
|
349
|
+
background: {
|
|
350
|
+
rest: '#00002000',
|
|
351
|
+
hover: color.neutral.light.transparent100,
|
|
352
|
+
active: color.neutral.light.transparent200
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
accent: {
|
|
356
|
+
border: border.transparent.accent.muted,
|
|
357
|
+
content: {
|
|
358
|
+
primary: content.accent,
|
|
359
|
+
secondary: content.secondary,
|
|
360
|
+
headings: content.headings
|
|
361
|
+
},
|
|
362
|
+
background: {
|
|
363
|
+
rest: '#0000f000',
|
|
364
|
+
hover: color.blue.light.transparent100,
|
|
365
|
+
active: color.blue.light.transparent200
|
|
366
|
+
},
|
|
367
|
+
selected: {
|
|
368
|
+
background: {
|
|
369
|
+
rest: color.blue.light.transparent100,
|
|
370
|
+
hover: color.blue.light.transparent200,
|
|
371
|
+
active: color.blue.light.transparent300
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
const syntax = {
|
|
378
|
+
base: content.primary,
|
|
379
|
+
codeBackground: background.secondary,
|
|
380
|
+
comment: content.secondary,
|
|
381
|
+
function: content.accent,
|
|
382
|
+
hightlightAccent: color.neutral.light.transparent400,
|
|
383
|
+
hightlightBackground: background.transparent.neutral.muted,
|
|
384
|
+
inlineCode: content.primary,
|
|
385
|
+
keyWord: content.danger,
|
|
386
|
+
operator: content.accent,
|
|
387
|
+
property: content.accent,
|
|
388
|
+
punctuation: content.primary,
|
|
389
|
+
selector: content.success,
|
|
390
|
+
variable: content.primary,
|
|
391
|
+
ansi: {
|
|
392
|
+
black: color.neutral.light.opaque1400,
|
|
393
|
+
red: color.red.light.opaque1100,
|
|
394
|
+
green: color.green.light.opaque1100,
|
|
395
|
+
yellow: color.yellow.light.opaque1100,
|
|
396
|
+
blue: color.blue.light.opaque1100,
|
|
397
|
+
magenta: color.pink.light.opaque1100,
|
|
398
|
+
cyan: color.blue.light.opaque1000,
|
|
399
|
+
white: color.neutral.light.opaque1400,
|
|
400
|
+
brightBlack: color.neutral.light.opaque1100,
|
|
401
|
+
brightRed: color.red.light.opaque1200,
|
|
402
|
+
brightGreen: color.green.light.opaque1200,
|
|
403
|
+
brightYellow: color.yellow.light.opaque1200,
|
|
404
|
+
brightBlue: color.blue.light.opaque1200,
|
|
405
|
+
brightMagenta: color.pink.light.opaque1200,
|
|
406
|
+
brightCyan: color.blue.light.opaque1000,
|
|
407
|
+
brightWhite: color.neutral.light.opaque1400
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
const shadow = {
|
|
411
|
+
low: `0px ${baseTheme.elevation.sm} 0px 0px ${elevation.low}`,
|
|
412
|
+
medium: `0px ${baseTheme.elevation.md} 0px 1px ${elevation.high}, 0px ${baseTheme.elevation.sm} 0px 0px ${elevation.high}`,
|
|
413
|
+
high: `0px ${baseTheme.elevation.lg} 0px 2px ${elevation.high}, 0px ${baseTheme.elevation.sm} 0px 1px ${elevation.high}`
|
|
414
|
+
};
|
|
415
|
+
const lightTheme = {
|
|
416
|
+
...baseTheme,
|
|
417
|
+
shadow: shadow,
|
|
418
|
+
tokens: {
|
|
419
|
+
background: background,
|
|
420
|
+
border: border,
|
|
421
|
+
content: content,
|
|
422
|
+
dataviz: dataviz,
|
|
423
|
+
elevation: elevation,
|
|
424
|
+
focus: light_focus,
|
|
425
|
+
graphics: graphics,
|
|
426
|
+
interactive: interactive,
|
|
427
|
+
syntax: syntax
|
|
428
|
+
}
|
|
429
|
+
};
|
|
430
|
+
export { lightTheme };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { size } from '../tokens/size.js';
|
|
2
|
+
/**
|
|
3
|
+
* Font size constraint for body typography.
|
|
4
|
+
*/
|
|
5
|
+
export type TextSize = SizeRange<'xs', '2xl'>;
|
|
6
|
+
/**
|
|
7
|
+
* Font size constraint for heading typography.
|
|
8
|
+
*/
|
|
9
|
+
export type HeadingSize = SizeRange<'xs', '4xl'>;
|
|
10
|
+
/**
|
|
11
|
+
* Responsive viewport breakpoint size constraint (`@media`).
|
|
12
|
+
*/
|
|
13
|
+
export type BreakpointSize = SizeRange<'2xs', '2xl'>;
|
|
14
|
+
/**
|
|
15
|
+
* Container query breakpoint size constraint (`@container`). A dedicated scale,
|
|
16
|
+
* separate from the viewport `BreakpointSize`, with `zero` as the always-applied
|
|
17
|
+
* base. Derived from the generated `size.container` token so it can't drift from it.
|
|
18
|
+
* See `theme.container`.
|
|
19
|
+
*/
|
|
20
|
+
export type ContainerBreakpointSize = keyof (typeof size)['container'];
|
|
21
|
+
/**
|
|
22
|
+
* Spacing size constraint for margin, padding, and gap.
|
|
23
|
+
*/
|
|
24
|
+
export type SpaceSize = SizeRange<'0', '3xl'>;
|
|
25
|
+
/**
|
|
26
|
+
* Border radius size constraint.
|
|
27
|
+
*/
|
|
28
|
+
export type RadiusSize = SizeRange<'0', '2xl'> | 'full';
|
|
29
|
+
/**
|
|
30
|
+
* Animation easing curve preset.
|
|
31
|
+
*/
|
|
32
|
+
export type MotionEasing = 'smooth' | 'snap' | 'enter' | 'exit' | 'spring';
|
|
33
|
+
/**
|
|
34
|
+
* Animation duration preset.
|
|
35
|
+
*/
|
|
36
|
+
export type MotionDuration = 'fast' | 'moderate' | 'slow';
|
|
37
|
+
/**
|
|
38
|
+
* Background surface level for layered UI elements.
|
|
39
|
+
*/
|
|
40
|
+
export type SurfaceVariant = 'primary' | 'secondary' | 'tertiary';
|
|
41
|
+
/**
|
|
42
|
+
* Semantic color variant for conveying meaning through color.
|
|
43
|
+
*/
|
|
44
|
+
type SemanticVariant = 'accent' | 'danger' | 'neutral' | 'promotion' | 'success' | 'warning';
|
|
45
|
+
/**
|
|
46
|
+
* Content/text color variant.
|
|
47
|
+
*/
|
|
48
|
+
export type ContentVariant = Exclude<SemanticVariant, 'neutral'> | 'primary' | 'secondary';
|
|
49
|
+
/**
|
|
50
|
+
* Graphics/icon color variant.
|
|
51
|
+
*/
|
|
52
|
+
export type GraphicsVariant = SemanticVariant;
|
|
53
|
+
/**
|
|
54
|
+
* Border color variant.
|
|
55
|
+
*/
|
|
56
|
+
export type BorderVariant = Exclude<SemanticVariant, 'neutral'> | 'primary' | 'secondary' | 'muted' | 'none';
|
|
57
|
+
/**
|
|
58
|
+
* Icon size constraint.
|
|
59
|
+
*/
|
|
60
|
+
export type IconSize = SizeRange<'xs', '2xl'>;
|
|
61
|
+
/**
|
|
62
|
+
* Form element size constraint.
|
|
63
|
+
*
|
|
64
|
+
* Unless you are implementing a new component in the `@sentry/scraps`
|
|
65
|
+
* directory, use `ComponentProps['size']` instead.
|
|
66
|
+
*/
|
|
67
|
+
export type FormSize = SizeRange<'xs', 'md'>;
|
|
68
|
+
/**
|
|
69
|
+
* Tag color scheme.
|
|
70
|
+
*/
|
|
71
|
+
export type TagVariant = 'muted' | 'info' | 'success' | 'warning' | 'danger' | 'promotion';
|
|
72
|
+
/**
|
|
73
|
+
* Alert/status color scheme.
|
|
74
|
+
*/
|
|
75
|
+
export type AlertVariant = 'muted' | 'info' | 'warning' | 'success' | 'danger';
|
|
76
|
+
type SizeKeys = readonly ['0', '2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl'];
|
|
77
|
+
type Size = SizeKeys[number];
|
|
78
|
+
type ExtractRange<T extends readonly string[], Start extends string, End extends string, Collecting extends boolean = false, Acc extends string = never> = T extends readonly [infer Head extends string, ...infer Tail extends string[]] ? Head extends Start ? Head extends End ? Acc | Head : ExtractRange<Tail, Start, End, true, Acc | Head> : Collecting extends true ? Head extends End ? Acc | Head : ExtractRange<Tail, Start, End, true, Acc | Head> : ExtractRange<Tail, Start, End, false, Acc> : Acc;
|
|
79
|
+
type SizeRange<Start extends Size, End extends Size> = ExtractRange<SizeKeys, Start, End>;
|
|
80
|
+
export {};
|
|
File without changes
|