@sanity/ui 2.0.0-beta.1 → 2.0.0-beta.10

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.
Files changed (85) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +6 -3
  3. package/dist/index.cjs.mjs +11 -36
  4. package/dist/index.d.ts +248 -268
  5. package/dist/index.esm.js +494 -354
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.js +503 -567
  8. package/dist/index.js.map +1 -1
  9. package/dist/theme.cjs.mjs +1 -1
  10. package/dist/theme.d.ts +81 -114
  11. package/dist/theme.esm.js +299 -252
  12. package/dist/theme.esm.js.map +1 -1
  13. package/dist/theme.js +299 -252
  14. package/dist/theme.js.map +1 -1
  15. package/package.json +6 -3
  16. package/src/core/__workshop__/constants.ts +3 -2
  17. package/src/core/_compat.ts +236 -87
  18. package/src/core/components/menu/__workshop__/selectedItem.tsx +7 -2
  19. package/src/core/components/menu/menuButton.tsx +12 -1
  20. package/src/core/constants.ts +18 -0
  21. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +6 -3
  22. package/src/core/middleware/origin.ts +47 -0
  23. package/src/core/primitives/avatar/__workshop__/asButton.tsx +1 -1
  24. package/src/core/primitives/avatar/__workshop__/stack.tsx +1 -1
  25. package/src/core/primitives/avatar/avatar.tsx +14 -4
  26. package/src/core/primitives/avatar/avatarCounter.tsx +16 -5
  27. package/src/core/primitives/avatar/avatarStack.tsx +2 -2
  28. package/src/core/primitives/badge/badge.tsx +1 -3
  29. package/src/core/primitives/kbd/kbd.tsx +2 -0
  30. package/src/core/primitives/popover/popover.tsx +67 -13
  31. package/src/core/primitives/popover/popoverCard.tsx +26 -15
  32. package/src/core/primitives/select/select.tsx +1 -1
  33. package/src/core/primitives/switch/styles.ts +6 -1
  34. package/src/core/primitives/tooltip/tooltip.tsx +47 -57
  35. package/src/core/primitives/tooltip/tooltipCard.tsx +104 -0
  36. package/src/core/styles/card/_cardColorStyle.ts +2 -0
  37. package/src/core/styles/margin/marginsStyle.test.ts +2 -2
  38. package/src/core/styles/padding/paddingStyle.test.ts +2 -2
  39. package/src/core/theme/__workshop__/build/Root.tsx +20 -3
  40. package/src/core/theme/__workshop__/build/story.tsx +16 -10
  41. package/src/core/theme/__workshop__/canvas.tsx +7 -7
  42. package/src/core/theme/__workshop__/debug/story.tsx +159 -0
  43. package/src/core/theme/__workshop__/index.ts +5 -0
  44. package/src/core/theme/theme.test.tsx +2 -2
  45. package/src/core/types/avatar.ts +1 -1
  46. package/src/core/types/button.ts +1 -2
  47. package/src/core/{primitives/tooltip → utils/conditionalWrapper}/conditionalWrapper.tsx +3 -0
  48. package/src/core/utils/conditionalWrapper/index.ts +1 -0
  49. package/src/core/utils/index.ts +1 -0
  50. package/src/theme/build/_deprecated/color/factory.ts +3 -3
  51. package/src/theme/build/buildColorTheme.ts +16 -16
  52. package/src/theme/build/colorToken/colorToken.ts +19 -0
  53. package/src/theme/build/colorToken/compileColorToken.ts +21 -0
  54. package/src/theme/build/colorToken/index.ts +2 -0
  55. package/src/theme/build/colorToken/types.ts +6 -0
  56. package/src/theme/build/renderColorTheme.ts +14 -15
  57. package/src/theme/build/renderColorValue.ts +9 -2
  58. package/src/theme/config/system.ts +12 -10
  59. package/src/theme/config/tokens/color/types.ts +12 -1
  60. package/src/theme/config/tokens/parseTokenKey.ts +1 -0
  61. package/src/theme/config/tokens/parseTokenValue.test.ts +13 -16
  62. package/src/theme/config/tokens/parseTokenValue.ts +45 -14
  63. package/src/theme/config/tokens/types.ts +3 -2
  64. package/src/theme/defaults/colorTokens.ts +219 -211
  65. package/src/theme/defaults/config.ts +2 -1
  66. package/src/theme/defaults/fonts.ts +13 -5
  67. package/src/theme/index.ts +0 -7
  68. package/src/theme/system/color/_constants.ts +5 -2
  69. package/src/theme/system/color/_system.ts +2 -1
  70. package/src/theme/system/color/avatar.ts +2 -12
  71. package/src/theme/system/color/button.ts +4 -20
  72. package/src/theme/system/color/input.ts +3 -11
  73. package/src/theme/system/color/selectable.ts +3 -14
  74. package/src/theme/system/shadow.ts +0 -6
  75. package/src/theme/system/styles.ts +0 -6
  76. package/src/theme/system/theme.ts +2 -0
  77. package/src/theme/system/v0/avatar.ts +1 -1
  78. package/src/theme/system/v0/color/button.ts +4 -4
  79. package/src/theme/system/v0/color/card.ts +2 -2
  80. package/src/theme/system/v0/color/input.ts +3 -3
  81. package/src/theme/system/v0/color/muted.ts +2 -2
  82. package/src/theme/system/v0/color/solid.ts +2 -2
  83. package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
  84. package/src/theme/versioning/v2_v0.ts +2 -2
  85. package/src/theme/build/colorToken.ts +0 -39
@@ -4,36 +4,38 @@ export const defaultColorTokens: ThemeColorTokens = {
4
4
  base: {
5
5
  '*': {
6
6
  _blend: ['multiply', 'screen'],
7
+ accent: {
8
+ fg: ['purple/600', 'purple/400'],
9
+ },
7
10
  avatar: {
8
11
  '*': {
9
12
  _blend: ['screen', 'multiply'],
10
13
  bg: ['500', '400'],
11
14
  fg: ['white', 'black'],
12
15
  },
13
- yellow: {bg: ['600', '400']},
14
- green: {bg: ['600', '400']},
15
- cyan: {bg: ['600', '400']},
16
16
  },
17
17
  backdrop: ['gray/200/0.2', 'black/0.5'],
18
18
  badge: {
19
19
  '*': {
20
20
  bg: ['100', '900'],
21
21
  fg: ['600', '400'],
22
+ icon: ['500', '500'],
23
+ dot: ['500', '500'],
22
24
  },
23
25
  positive: {
24
- bg: ['200/0.6', '900'],
25
- fg: ['700', '500'],
26
+ bg: ['200 50%', '900'],
27
+ fg: ['600', '500'],
26
28
  },
27
29
  caution: {
28
- bg: ['200/0.7', '900'],
29
- fg: ['700', '500'],
30
+ bg: ['200 50%', '900'],
31
+ fg: ['600', '500'],
30
32
  },
31
33
  },
32
34
  bg: ['50', '950'],
33
35
  border: ['200', '800'],
34
36
  code: {
35
37
  bg: ['50', '950'],
36
- fg: ['600', '400'],
38
+ fg: ['600', '300'],
37
39
  },
38
40
  fg: ['800', '200'],
39
41
  focusRing: ['blue/500', 'blue/500'],
@@ -43,11 +45,11 @@ export const defaultColorTokens: ThemeColorTokens = {
43
45
  border: ['200', '800'],
44
46
  },
45
47
  link: {
46
- fg: ['blue/600', 'blue/400'],
48
+ fg: ['blue/600', 'blue/300'],
47
49
  },
48
50
  muted: {
49
51
  bg: ['50', '950'],
50
- fg: ['600', '400'],
52
+ fg: ['700 70%', '300 70%'],
51
53
  },
52
54
  shadow: {
53
55
  outline: ['500/0.3', '500/0.4'],
@@ -57,38 +59,33 @@ export const defaultColorTokens: ThemeColorTokens = {
57
59
  },
58
60
  skeleton: {
59
61
  from: ['100', '900'],
60
- to: ['100/0.5', '900/0.5'],
62
+ to: ['100 50%', '900 50%'],
61
63
  },
62
64
  },
63
65
  transparent: {
64
66
  bg: ['50', 'black'],
65
67
  fg: ['600', '400'],
68
+ muted: {
69
+ fg: ['600', '400'],
70
+ },
66
71
  },
67
72
  default: {
68
73
  bg: ['white', '950'],
69
74
  fg: ['black', '200'],
75
+ muted: {
76
+ fg: ['600', '400'],
77
+ },
70
78
  },
71
- primary: {
72
- _hue: 'blue',
73
- },
79
+ primary: {_hue: 'blue'},
74
80
  positive: {
75
81
  _hue: 'green',
76
- shadow: {
77
- outline: ['600/0.3', '500/0.25'],
78
- },
82
+ shadow: {outline: ['500/0.4', '500/0.4']},
79
83
  },
80
84
  caution: {
81
85
  _hue: 'yellow',
82
- shadow: {
83
- outline: ['600/0.3', '500/0.25'],
84
- },
85
- },
86
- critical: {
87
- _hue: 'red',
88
- shadow: {
89
- outline: ['500/0.3', '500/0.3'],
90
- },
86
+ shadow: {outline: ['600/0.3', '500/0.4']},
91
87
  },
88
+ critical: {_hue: 'red'},
92
89
  },
93
90
  button: {
94
91
  default: {
@@ -96,58 +93,77 @@ export const defaultColorTokens: ThemeColorTokens = {
96
93
  '*': {
97
94
  _blend: ['screen', 'multiply'],
98
95
  accent: {
99
- fg: ['purple/200', 'purple/700'],
96
+ fg: ['purple/300', 'purple/700'],
100
97
  },
101
98
  badge: {
102
99
  '*': {
103
- dot: ['300', '700'],
104
- icon: ['600', '400'],
100
+ bg: ['900', '100'],
101
+ fg: ['400', '600'],
102
+ dot: ['500', '500'],
103
+ icon: ['500', '500'],
105
104
  },
106
105
  },
107
106
  bg: ['500', '400'],
108
107
  border: ['500/0', '400/0'],
109
108
  code: {
110
- bg: ['500/0.2', '400/0.2'],
111
- fg: ['200', '700'],
109
+ bg: ['500 20%', '400 20%'],
110
+ fg: ['200', '600'],
112
111
  },
113
112
  fg: ['white', 'black'],
114
113
  icon: ['200', '800'],
115
114
  kbd: {
116
- bg: ['900', '50'],
117
- fg: ['white', 'black'],
115
+ bg: ['black', 'white'],
116
+ fg: ['200', '800'],
118
117
  border: ['800', '200'],
119
118
  },
120
119
  link: {
121
120
  fg: ['blue/200', 'blue/700'],
122
121
  },
123
122
  muted: {
124
- bg: ['900', '50'],
125
- fg: ['200', '700'],
123
+ bg: ['950', '50'],
124
+ fg: ['100 70%', '600'],
126
125
  },
127
126
  skeleton: {
128
127
  from: ['900', '100'],
129
- to: ['900/0.5', '100/0.5'],
128
+ to: ['900 50%', '100 50%'],
130
129
  },
131
130
  },
132
131
  hovered: {
133
- bg: ['600', '300'],
134
- border: ['600/0', '300/0'],
132
+ bg: ['700', '300'],
133
+ border: ['700/0', '300/0'],
135
134
  },
136
135
  pressed: {
137
- bg: ['700', '200'],
136
+ bg: ['700', '300'],
138
137
  },
139
138
  selected: {
140
- bg: ['700', '200'],
139
+ bg: ['700', '300'],
141
140
  },
142
141
  disabled: {
143
142
  _hue: 'gray',
143
+ badge: {
144
+ '*': {
145
+ bg: ['gray/700', 'gray/300'],
146
+ fg: ['white', 'black'],
147
+ dot: ['white', 'black'],
148
+ icon: ['white', 'black'],
149
+ },
150
+ },
144
151
  bg: ['200', '800'],
145
152
  icon: ['white', 'black'],
153
+ kbd: {
154
+ bg: ['black', 'white'],
155
+ fg: ['white', 'black'],
156
+ border: ['700', '300'],
157
+ },
146
158
  },
147
159
  },
148
160
  default: {
149
161
  '*': {
150
162
  bg: ['800', '200'],
163
+ muted: {
164
+ bg: ['950', '50'],
165
+ fg: ['400', '600'],
166
+ },
151
167
  },
152
168
  hovered: {
153
169
  bg: ['900', '100'],
@@ -159,66 +175,45 @@ export const defaultColorTokens: ThemeColorTokens = {
159
175
  bg: ['black', 'white'],
160
176
  },
161
177
  },
162
- positive: {
163
- '*': {
164
- bg: ['600', '400'],
165
- },
166
- hovered: {
167
- bg: ['700', '300'],
168
- },
169
- pressed: {
170
- bg: ['800', '200'],
171
- },
172
- selected: {
173
- bg: ['800', '200'],
174
- },
175
- },
176
- caution: {
177
- '*': {
178
- bg: ['600', '400'],
179
- },
180
- hovered: {
181
- bg: ['700', '300'],
182
- },
183
- pressed: {
184
- bg: ['800', '200'],
185
- },
186
- selected: {
187
- bg: ['800', '200'],
188
- },
189
- },
190
178
  },
191
179
  ghost: {
192
180
  '*': {
193
181
  '*': {
194
182
  _blend: ['multiply', 'screen'],
183
+ accent: {
184
+ fg: ['purple/700 60%', 'purple/300 70%'],
185
+ },
186
+ badge: {
187
+ '*': {
188
+ bg: ['100', '900'],
189
+ fg: ['600', '400'],
190
+ dot: ['500', '500'],
191
+ icon: ['500', '500'],
192
+ },
193
+ },
195
194
  bg: ['50', '950'],
196
- fg: ['700', '400'],
197
- icon: ['600', '500'],
198
195
  border: ['100', '900'],
199
- accent: {
200
- fg: ['purple/700/0.6', 'purple/400/0.8'],
196
+ code: {
197
+ bg: ['500 10%', '400 10%'],
198
+ fg: ['700 60%', '400 60%'],
199
+ },
200
+ fg: ['600', '400'],
201
+ icon: ['600', '500'],
202
+ kbd: {
203
+ bg: ['white', 'black'],
204
+ fg: ['600', '400'],
205
+ border: ['200', '800'],
201
206
  },
202
207
  link: {
203
- fg: ['blue/700/0.6', 'blue/400/0.8'],
208
+ fg: ['blue/700 60%', 'blue/300 60%'],
204
209
  },
205
210
  muted: {
206
211
  bg: ['100', '950'],
207
- fg: ['700/0.6', '400/0.6'],
208
- },
209
- code: {
210
- bg: ['500/0.1', '400/0.1'],
211
- fg: ['700/0.6', '400/0.6'],
212
+ fg: ['700 60%', '300 60%'],
212
213
  },
213
214
  skeleton: {
214
215
  from: ['100', '900'],
215
- to: ['100/0.5', '900/0.5'],
216
- },
217
- badge: {
218
- '*': {
219
- dot: ['300', '700'],
220
- icon: ['600', '400'],
221
- },
216
+ to: ['100 50%', '900 50%'],
222
217
  },
223
218
  },
224
219
  hovered: {
@@ -235,32 +230,46 @@ export const defaultColorTokens: ThemeColorTokens = {
235
230
  },
236
231
  disabled: {
237
232
  _hue: 'gray',
238
- fg: ['200', '800'],
239
- icon: ['200', '800'],
233
+ accent: {
234
+ fg: ['200', '800'],
235
+ },
236
+ badge: {
237
+ '*': {
238
+ _hue: 'gray',
239
+ bg: ['50', '950'],
240
+ fg: ['gray/200', 'gray/800'],
241
+ dot: ['gray/200', 'gray/800'],
242
+ icon: ['gray/200', 'gray/800'],
243
+ },
244
+ },
240
245
  border: ['100', '900'],
241
- muted: {
242
- fg: ['200/0.6', '900/0.6'],
246
+ code: {
247
+ bg: ['50', '950'],
248
+ fg: ['200', '800'],
243
249
  },
244
- accent: {
245
- fg: ['200/0.6', '900/0.6'],
250
+ fg: ['200', '800'],
251
+ icon: ['200', '800'],
252
+ kbd: {
253
+ bg: ['white', 'black'],
254
+ fg: ['200', '800'],
255
+ border: ['100', '900'],
246
256
  },
247
257
  link: {
248
- fg: ['200/0.6', '900/0.6'],
258
+ fg: ['200', '800'],
249
259
  },
250
- code: {
251
- bg: ['50/0.5', '950/0.5'],
252
- fg: ['200/0.6', '900/0.6'],
260
+ muted: {
261
+ fg: ['200', '800'],
253
262
  },
254
263
  },
255
264
  },
256
265
  positive: {
257
266
  '*': {
258
- border: ['600/0.2', '800'],
267
+ border: ['600 20%', '800'],
259
268
  },
260
269
  },
261
270
  caution: {
262
271
  '*': {
263
- border: ['600/0.2', '800'],
272
+ border: ['600 20%', '800'],
264
273
  },
265
274
  },
266
275
  },
@@ -268,65 +277,86 @@ export const defaultColorTokens: ThemeColorTokens = {
268
277
  '*': {
269
278
  '*': {
270
279
  _blend: ['multiply', 'screen'],
280
+ accent: {
281
+ fg: ['purple/700 70%', 'purple/300 70%'],
282
+ },
283
+ badge: {
284
+ '*': {
285
+ bg: ['100', '900'],
286
+ fg: ['600', '400'],
287
+ dot: ['500', '500'],
288
+ icon: ['500', '500'],
289
+ },
290
+ },
271
291
  bg: ['white', 'black'],
272
- fg: ['700', '300'],
273
- icon: ['700/0.7', '300/0.7'],
274
292
  border: ['white/0', 'black/0'],
275
- muted: {
293
+ code: {
276
294
  bg: ['100', '950'],
277
- fg: ['700/0.7', '300/0.7'],
295
+ fg: ['600', '300'],
278
296
  },
279
- accent: {
280
- fg: ['purple/700/0.7', 'purple/300/0.7'],
297
+ fg: ['700', '300'],
298
+ icon: ['700 70%', '300 70%'],
299
+ kbd: {
300
+ bg: ['white', 'black'],
301
+ fg: ['600', '400'],
302
+ border: ['200', '800'],
281
303
  },
282
304
  link: {
283
- fg: ['blue/700/0.7', 'blue/300/0.7'],
305
+ fg: ['blue/700 70%', 'blue/300 70%'],
284
306
  },
285
- code: {
307
+ muted: {
286
308
  bg: ['100', '950'],
287
- fg: ['600', '300'],
309
+ fg: ['700 70%', '300 70%'],
288
310
  },
289
311
  skeleton: {
290
312
  from: ['100', '900'],
291
- to: ['100/0.5', '900/0.5'],
292
- },
293
- badge: {
294
- '*': {
295
- dot: ['300', '700'],
296
- icon: ['600', '400'],
297
- },
313
+ to: ['100 50%', '900 50%'],
298
314
  },
299
315
  },
300
316
  hovered: {
301
317
  bg: ['50', '950'],
302
318
  fg: ['700', '300'],
303
- icon: ['700/0.7', '400/0.7'],
319
+ icon: ['700 70%', '400 70%'],
304
320
  },
305
321
  pressed: {
306
322
  bg: ['100', '900'],
307
323
  fg: ['800', '200'],
308
- icon: ['800/0.7', '200/0.7'],
324
+ icon: ['800 70%', '200 70%'],
309
325
  },
310
326
  selected: {
311
327
  bg: ['100', '900'],
312
328
  fg: ['800', '200'],
313
- icon: ['800/0.7', '200/0.7'],
329
+ icon: ['800 60%', '200 60%'],
314
330
  },
315
331
  disabled: {
316
332
  _hue: 'gray',
333
+ badge: {
334
+ '*': {
335
+ _hue: 'gray',
336
+ bg: ['50', '950'],
337
+ fg: ['gray/200', 'gray/800'],
338
+ dot: ['gray/200', 'gray/800'],
339
+ icon: ['gray/200', 'gray/800'],
340
+ },
341
+ },
317
342
  fg: ['200', '800'],
318
343
  muted: {
319
- fg: ['200/0.6', '900/0.6'],
344
+ fg: ['200', '800'],
320
345
  },
321
346
  accent: {
322
- fg: ['200/0.6', '900/0.6'],
347
+ fg: ['200', '800'],
348
+ },
349
+ kbd: {
350
+ bg: ['white', 'black'],
351
+ fg: ['200', '800'],
352
+ border: ['100', '900'],
323
353
  },
324
354
  link: {
325
- fg: ['200/0.6', '900/0.6'],
355
+ fg: ['200', '800'],
326
356
  },
327
357
  code: {
328
- bg: ['50/0.5', '950/0.5'],
329
- fg: ['200/0.6', '900/0.6'],
358
+ bg: ['50', '950'],
359
+ fg: ['200', '800'],
330
360
  },
331
361
  },
332
362
  },
@@ -342,19 +372,16 @@ export const defaultColorTokens: ThemeColorTokens = {
342
372
  muted: {
343
373
  bg: ['50', '950'],
344
374
  },
345
- placeholder: ['400', '600/0.5'],
375
+ placeholder: ['400', '600 50%'],
346
376
  },
347
-
348
377
  hovered: {
349
- border: ['300', '800'],
378
+ border: ['300', '700'],
350
379
  },
351
-
352
380
  readOnly: {
353
- border: ['200/0', '900/0'],
354
- bg: ['100', '950'],
381
+ bg: ['50', '950'],
382
+ border: ['200', '800'],
355
383
  fg: ['800', '200'],
356
384
  },
357
-
358
385
  disabled: {
359
386
  fg: ['200', '800'],
360
387
  border: ['100', '900'],
@@ -373,16 +400,21 @@ export const defaultColorTokens: ThemeColorTokens = {
373
400
  _blend: ['multiply', 'screen'],
374
401
  bg: ['white', 'black'],
375
402
  fg: ['800', '200'],
376
- icon: ['700/0.7', '300/0.7'],
403
+ icon: ['700 70%', '300 70%'],
377
404
  avatar: {
378
405
  '*': {
379
406
  _blend: ['screen', 'multiply'],
380
407
  bg: ['500', '400'],
381
408
  fg: ['white', 'black'],
382
409
  },
383
- // yellow: {bg: ['600', '400']},
384
- // green: {bg: ['600', '400']},
385
- // cyan: {bg: ['600', '400']},
410
+ },
411
+ badge: {
412
+ '*': {
413
+ bg: ['100', '900'],
414
+ fg: ['600', '400'],
415
+ dot: ['500', '500'],
416
+ icon: ['500', '500'],
417
+ },
386
418
  },
387
419
  border: ['200', '800'],
388
420
  muted: {
@@ -392,31 +424,21 @@ export const defaultColorTokens: ThemeColorTokens = {
392
424
  accent: {
393
425
  fg: ['purple/600', 'purple/400'],
394
426
  },
427
+ kbd: {
428
+ bg: ['white', 'black'],
429
+ fg: ['600', '400'],
430
+ border: ['200', '800'],
431
+ },
395
432
  link: {
396
433
  fg: ['blue/700', 'blue/300'],
397
434
  },
398
435
  code: {
399
- bg: ['100', '950'],
436
+ bg: ['50', '950'],
400
437
  fg: ['700', '300'],
401
438
  },
402
439
  skeleton: {
403
440
  from: ['100', '900'],
404
- to: ['100/0.5', '900/0.5'],
405
- },
406
- badge: {
407
- '*': {
408
- // _blend: ['multiply', 'screen'],
409
- bg: ['100', '900'],
410
- fg: ['600', '200'],
411
- dot: ['300', '700'],
412
- icon: ['600', '400'],
413
- },
414
- },
415
- kbd: {
416
- // _blend: ['multiply', 'screen'],
417
- bg: ['white', 'black'],
418
- fg: ['600', '400'],
419
- border: ['200', '800'],
441
+ to: ['100 50%', '900 50%'],
420
442
  },
421
443
  },
422
444
  hovered: {
@@ -436,22 +458,18 @@ export const defaultColorTokens: ThemeColorTokens = {
436
458
  bg: ['white', 'black'],
437
459
  fg: ['black', 'white'],
438
460
  },
439
- // magenta: {_hue: 'green'},
440
- // yellow: {bg: ['600', '400']},
441
- // green: {bg: ['600', '400']},
442
- // cyan: {bg: ['600', '400']},
443
461
  },
444
462
  badge: {
445
463
  '*': {
446
- // _blend: ['multiply', 'screen'],
447
- // _blend: ['screen', 'multiply'],
448
464
  bg: ['700', '300'],
449
465
  fg: ['white', 'black'],
466
+ dot: ['300', '700'],
467
+ icon: ['300', '700'],
450
468
  },
451
469
  },
452
- border: ['500/0.2', '400/0.2'],
470
+ border: ['500 20%', '400 20%'],
453
471
  muted: {
454
- bg: ['900', '50'],
472
+ bg: ['950', '50'],
455
473
  fg: ['200', '800'],
456
474
  },
457
475
  accent: {
@@ -466,87 +484,77 @@ export const defaultColorTokens: ThemeColorTokens = {
466
484
  fg: ['blue/200', 'blue/800'],
467
485
  },
468
486
  code: {
469
- bg: ['500/0.2', '400/0.2'],
470
- fg: ['200', '700'],
487
+ bg: ['500 20%', '400 20%'],
488
+ fg: ['300', '700'],
471
489
  },
472
490
  skeleton: {
473
491
  from: ['900', '100'],
474
- to: ['900/0.5', '100/0.5'],
475
- },
476
- // badge: {
477
- // '*': {
478
- // _blend: ['multiply', 'screen'],
479
- // bg: ['900', '100'],
480
- // fg: ['white', 'black'],
481
- // dot: ['700', '300'],
482
- // icon: ['400', '600'],
483
- // },
484
- // },
492
+ to: ['900 50%', '100 50%'],
493
+ },
485
494
  },
486
495
  disabled: {
487
496
  fg: ['200', '800'],
488
497
  icon: ['200', '800'],
489
498
  muted: {
490
- fg: ['200', '800/0.5'],
499
+ fg: ['200', '800'],
491
500
  },
492
501
  accent: {
493
- fg: ['purple/200', 'purple/800/0.5'],
502
+ fg: ['purple/200', 'purple/800'],
494
503
  },
495
504
  link: {
496
- fg: ['blue/200', 'blue/800/0.5'],
505
+ fg: ['blue/200', 'blue/800'],
497
506
  },
498
507
  code: {
499
- bg: ['100', '950/0.5'],
500
- fg: ['200', '800/0.5'],
508
+ bg: ['50', '950'],
509
+ fg: ['200', '800'],
501
510
  },
502
511
  },
503
512
  },
504
513
  default: {
505
514
  selected: {
506
515
  _hue: 'blue',
507
- // bg: ['500', '400'],
508
516
  },
509
517
  },
510
518
  critical: {
511
519
  disabled: {
512
- bg: ['50/0.5', '950/0.5'],
520
+ bg: ['50 50%', '950 50%'],
513
521
  },
514
522
  },
515
523
  },
516
524
  syntax: {
517
- atrule: ['purple/700', 'purple/400'],
518
- attrName: ['green/700', 'green/400'],
519
- attrValue: ['yellow/700', 'yellow/400'],
520
- attribute: ['yellow/700', 'yellow/400'],
521
- boolean: ['purple/700', 'purple/400'],
522
- builtin: ['purple/700', 'purple/400'],
523
- cdata: ['yellow/700', 'yellow/400'],
524
- char: ['yellow/700', 'yellow/400'],
525
- class: ['orange/700', 'orange/400'],
526
- className: ['cyan/700', 'cyan/400'],
527
- comment: ['gray/700/0.5', 'gray/400/0.5'],
528
- constant: ['purple/700', 'purple/400'],
529
- deleted: ['red/700', 'red/400'],
530
- entity: ['red/700', 'red/400'],
531
- function: ['green/700', 'green/400'],
532
- hexcode: ['blue/700', 'blue/400'],
533
- id: ['purple/700', 'purple/400'],
534
- important: ['purple/700', 'purple/400'],
535
- inserted: ['yellow/700', 'yellow/400'],
536
- keyword: ['magenta/700', 'magenta/400'],
537
- number: ['purple/700', 'purple/400'],
538
- operator: ['magenta/700', 'magenta/400'],
539
- property: ['blue/700', 'blue/400'],
540
- pseudoClass: ['yellow/700', 'yellow/400'],
541
- pseudoElement: ['yellow/700', 'yellow/400'],
542
- punctuation: ['gray/700', 'gray/400'],
543
- regex: ['blue/700', 'blue/400'],
544
- selector: ['red/700', 'red/400'],
545
- string: ['yellow/700', 'yellow/400'],
546
- symbol: ['purple/700', 'purple/400'],
547
- tag: ['red/700', 'red/400'],
548
- unit: ['orange/700', 'orange/400'],
549
- url: ['red/700', 'red/400'],
550
- variable: ['red/700', 'red/400'],
525
+ atrule: ['purple/600', 'purple/400'],
526
+ attrName: ['green/600', 'green/400'],
527
+ attrValue: ['yellow/600', 'yellow/400'],
528
+ attribute: ['yellow/600', 'yellow/400'],
529
+ boolean: ['purple/600', 'purple/400'],
530
+ builtin: ['purple/600', 'purple/400'],
531
+ cdata: ['yellow/600', 'yellow/400'],
532
+ char: ['yellow/600', 'yellow/400'],
533
+ class: ['orange/600', 'orange/400'],
534
+ className: ['cyan/600', 'cyan/400'],
535
+ comment: ['gray/400', 'gray/600'],
536
+ constant: ['purple/600', 'purple/400'],
537
+ deleted: ['red/600', 'red/400'],
538
+ entity: ['red/600', 'red/400'],
539
+ function: ['green/600', 'green/400'],
540
+ hexcode: ['blue/600', 'blue/400'],
541
+ id: ['purple/600', 'purple/400'],
542
+ important: ['purple/600', 'purple/400'],
543
+ inserted: ['yellow/600', 'yellow/400'],
544
+ keyword: ['magenta/600', 'magenta/400'],
545
+ number: ['purple/600', 'purple/400'],
546
+ operator: ['magenta/600', 'magenta/400'],
547
+ property: ['blue/600', 'blue/400'],
548
+ pseudoClass: ['yellow/600', 'yellow/400'],
549
+ pseudoElement: ['yellow/600', 'yellow/400'],
550
+ punctuation: ['gray/600', 'gray/400'],
551
+ regex: ['blue/600', 'blue/400'],
552
+ selector: ['red/600', 'red/400'],
553
+ string: ['yellow/600', 'yellow/400'],
554
+ symbol: ['purple/600', 'purple/400'],
555
+ tag: ['red/600', 'red/400'],
556
+ unit: ['orange/600', 'orange/400'],
557
+ url: ['red/600', 'red/400'],
558
+ variable: ['red/600', 'red/400'],
551
559
  },
552
560
  }