@sanity/ui 3.0.0-static.6 → 3.0.0-static.8
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/_chunks-cjs/_visual-editing.js +53 -53
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +54 -54
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/css.d.mts +207 -185
- package/dist/css.d.ts +207 -185
- package/dist/css.js +617 -547
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +617 -547
- package/dist/css.mjs.map +1 -1
- package/dist/index.js +3 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -13
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-theme.css +1 -1
- package/dist/system.css +1334 -914
- package/dist/theme.d.mts +84 -76
- package/dist/theme.d.ts +84 -76
- package/dist/theme.js +148 -124
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +148 -124
- package/dist/theme.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/aspects/index.ts +1 -0
- package/src/css/aspects/minWidth/index.ts +2 -0
- package/src/css/aspects/minWidth/minWidth.style.ts +13 -0
- package/src/css/aspects/minWidth/minWidth.ts +6 -0
- package/src/css/aspects/minWidth/types.ts +7 -0
- package/src/css/compile/compileRule.ts +1 -0
- package/src/css/compile/compileStyle.ts +1 -1
- package/src/css/compile/compileTheme_v3.ts +46 -37
- package/src/css/primitives/badge/badge.style.ts +1 -1
- package/src/css/primitives/box/box.style.ts +1 -1
- package/src/css/primitives/box/box.ts +2 -3
- package/src/css/primitives/box/types.ts +2 -0
- package/src/css/primitives/button/button.style.ts +20 -0
- package/src/css/primitives/card/card.style.ts +116 -44
- package/src/css/primitives/card/types.ts +0 -1
- package/src/css/primitives/kbd/kbd.style.ts +1 -1
- package/src/css/primitives/popover/popover.ts +4 -0
- package/src/css/primitives/switch/switch.style.ts +8 -83
- package/src/css/primitives/text/text.style.ts +11 -3
- package/src/css/system.style.ts +2 -0
- package/src/css/types.ts +200 -188
- package/src/css/varNames.ts +86 -76
- package/src/css/vars.ts +85 -76
- package/src/theme/v3/color/buildColor_v3.ts +43 -38
- package/src/theme/v3/color/card.ts +43 -38
- package/src/theme/v3/color/color.ts +42 -38
- package/src/theme/v3/defaults.ts +63 -47
- package/src/theme/v3/resolveTokens.ts +43 -38
- package/src/theme/versioning/themeColor_v3_v2.ts +1 -1
- package/src/ui/components/autocomplete/__workshop__/async.tsx +0 -1
- package/src/ui/components/autocomplete/autocomplete.tsx +2 -11
- package/src/ui/primitives/box/box.tsx +4 -3
- package/src/ui/primitives/card/card.tsx +2 -6
- package/src/ui/primitives/kbd/kbd.tsx +2 -2
- package/src/ui/primitives/popover/popoverCard.tsx +45 -39
- package/src/css/primitives/card/rules.ts +0 -473
package/src/css/varNames.ts
CHANGED
|
@@ -96,6 +96,49 @@ export const varNames: VarNames = {
|
|
|
96
96
|
backdrop: `--color-backdrop`,
|
|
97
97
|
bg: `--color-bg`,
|
|
98
98
|
border: `--color-border`,
|
|
99
|
+
code: {
|
|
100
|
+
bg: `--color-code-bg`,
|
|
101
|
+
fg: `--color-code-fg`,
|
|
102
|
+
|
|
103
|
+
token: {
|
|
104
|
+
atrule: `--color-code-token-atrule`,
|
|
105
|
+
attrName: `--color-code-token-attr-name`,
|
|
106
|
+
attrValue: `--color-code-token-attr-value`,
|
|
107
|
+
attribute: `--color-code-token-attribute`,
|
|
108
|
+
boolean: `--color-code-token-boolean`,
|
|
109
|
+
builtin: `--color-code-token-builtin`,
|
|
110
|
+
cdata: `--color-code-token-cdata`,
|
|
111
|
+
char: `--color-code-token-char`,
|
|
112
|
+
class: `--color-code-token-class`,
|
|
113
|
+
className: `--color-code-token-class-name`,
|
|
114
|
+
comment: `--color-code-token-comment`,
|
|
115
|
+
constant: `--color-code-token-constant`,
|
|
116
|
+
deleted: `--color-code-token-deleted`,
|
|
117
|
+
doctype: `--color-code-token-doctype`,
|
|
118
|
+
entity: `--color-code-token-entity`,
|
|
119
|
+
function: `--color-code-token-function`,
|
|
120
|
+
hexcode: `--color-code-token-hexcode`,
|
|
121
|
+
id: `--color-code-token-id`,
|
|
122
|
+
important: `--color-code-token-important`,
|
|
123
|
+
inserted: `--color-code-token-inserted`,
|
|
124
|
+
keyword: `--color-code-token-keyword`,
|
|
125
|
+
number: `--color-code-token-number`,
|
|
126
|
+
operator: `--color-code-token-operator`,
|
|
127
|
+
prolog: `--color-code-token-prolog`,
|
|
128
|
+
property: `--color-code-token-property`,
|
|
129
|
+
pseudoClass: `--color-code-token-pseudo-class`,
|
|
130
|
+
pseudoElement: `--color-code-token-pseudo-element`,
|
|
131
|
+
punctuation: `--color-code-token-punctuation`,
|
|
132
|
+
regex: `--color-code-token-regex`,
|
|
133
|
+
selector: `--color-code-token-selector`,
|
|
134
|
+
string: `--color-code-token-string`,
|
|
135
|
+
symbol: `--color-code-token-symbol`,
|
|
136
|
+
tag: `--color-code-token-tag`,
|
|
137
|
+
unit: `--color-code-token-unit`,
|
|
138
|
+
url: `--color-code-token-url`,
|
|
139
|
+
variable: `--color-code-token-variable`,
|
|
140
|
+
},
|
|
141
|
+
},
|
|
99
142
|
fg: `--color-fg`,
|
|
100
143
|
focusRing: `--color-focus-ring`,
|
|
101
144
|
input: {
|
|
@@ -121,44 +164,6 @@ export const varNames: VarNames = {
|
|
|
121
164
|
from: `--color-skeleton-from`,
|
|
122
165
|
to: `--color-skeleton-to`,
|
|
123
166
|
},
|
|
124
|
-
token: {
|
|
125
|
-
atrule: `--color-token-atrule`,
|
|
126
|
-
attrName: `--color-token-attr-name`,
|
|
127
|
-
attrValue: `--color-token-attr-value`,
|
|
128
|
-
attribute: `--color-token-attribute`,
|
|
129
|
-
boolean: `--color-token-boolean`,
|
|
130
|
-
builtin: `--color-token-builtin`,
|
|
131
|
-
cdata: `--color-token-cdata`,
|
|
132
|
-
char: `--color-token-char`,
|
|
133
|
-
class: `--color-token-class`,
|
|
134
|
-
className: `--color-token-class-name`,
|
|
135
|
-
comment: `--color-token-comment`,
|
|
136
|
-
constant: `--color-token-constant`,
|
|
137
|
-
deleted: `--color-token-deleted`,
|
|
138
|
-
doctype: `--color-token-doctype`,
|
|
139
|
-
entity: `--color-token-entity`,
|
|
140
|
-
function: `--color-token-function`,
|
|
141
|
-
hexcode: `--color-token-hexcode`,
|
|
142
|
-
id: `--color-token-id`,
|
|
143
|
-
important: `--color-token-important`,
|
|
144
|
-
inserted: `--color-token-inserted`,
|
|
145
|
-
keyword: `--color-token-keyword`,
|
|
146
|
-
number: `--color-token-number`,
|
|
147
|
-
operator: `--color-token-operator`,
|
|
148
|
-
prolog: `--color-token-prolog`,
|
|
149
|
-
property: `--color-token-property`,
|
|
150
|
-
pseudoClass: `--color-token-pseudo-class`,
|
|
151
|
-
pseudoElement: `--color-token-pseudo-element`,
|
|
152
|
-
punctuation: `--color-token-punctuation`,
|
|
153
|
-
regex: `--color-token-regex`,
|
|
154
|
-
selector: `--color-token-selector`,
|
|
155
|
-
string: `--color-token-string`,
|
|
156
|
-
symbol: `--color-token-symbol`,
|
|
157
|
-
tag: `--color-token-tag`,
|
|
158
|
-
unit: `--color-token-unit`,
|
|
159
|
-
url: `--color-token-url`,
|
|
160
|
-
variable: `--color-token-variable`,
|
|
161
|
-
},
|
|
162
167
|
|
|
163
168
|
solid: buildColorVariantVarNames({variant: 'solid'}),
|
|
164
169
|
tinted: buildColorVariantVarNames({variant: 'tinted'}),
|
|
@@ -350,6 +355,48 @@ function buildColorCardVarNames(props: {scheme?: Scheme; tone: CardTone}): Color
|
|
|
350
355
|
},
|
|
351
356
|
},
|
|
352
357
|
backdrop: `${sourcePrefix}-backdrop`,
|
|
358
|
+
code: {
|
|
359
|
+
bg: `${sourcePrefix}-code-bg`,
|
|
360
|
+
fg: `${sourcePrefix}-code-fg`,
|
|
361
|
+
token: {
|
|
362
|
+
atrule: `${sourcePrefix}-code-token-atrule`,
|
|
363
|
+
attrName: `${sourcePrefix}-code-token-attr-name`,
|
|
364
|
+
attrValue: `${sourcePrefix}-code-token-attr-value`,
|
|
365
|
+
attribute: `${sourcePrefix}-code-token-attribute`,
|
|
366
|
+
boolean: `${sourcePrefix}-code-token-boolean`,
|
|
367
|
+
builtin: `${sourcePrefix}-code-token-builtin`,
|
|
368
|
+
cdata: `${sourcePrefix}-code-token-cdata`,
|
|
369
|
+
char: `${sourcePrefix}-code-token-char`,
|
|
370
|
+
class: `${sourcePrefix}-code-token-class`,
|
|
371
|
+
className: `${sourcePrefix}-code-token-class-name`,
|
|
372
|
+
comment: `${sourcePrefix}-code-token-comment`,
|
|
373
|
+
constant: `${sourcePrefix}-code-token-constant`,
|
|
374
|
+
deleted: `${sourcePrefix}-code-token-deleted`,
|
|
375
|
+
doctype: `${sourcePrefix}-code-token-doctype`,
|
|
376
|
+
entity: `${sourcePrefix}-code-token-entity`,
|
|
377
|
+
function: `${sourcePrefix}-code-token-function`,
|
|
378
|
+
hexcode: `${sourcePrefix}-code-token-hexcode`,
|
|
379
|
+
id: `${sourcePrefix}-code-token-id`,
|
|
380
|
+
important: `${sourcePrefix}-code-token-important`,
|
|
381
|
+
inserted: `${sourcePrefix}-code-token-inserted`,
|
|
382
|
+
keyword: `${sourcePrefix}-code-token-keyword`,
|
|
383
|
+
number: `${sourcePrefix}-code-token-number`,
|
|
384
|
+
operator: `${sourcePrefix}-code-token-operator`,
|
|
385
|
+
prolog: `${sourcePrefix}-code-token-prolog`,
|
|
386
|
+
property: `${sourcePrefix}-code-token-property`,
|
|
387
|
+
pseudoClass: `${sourcePrefix}-code-token-pseudo-class`,
|
|
388
|
+
pseudoElement: `${sourcePrefix}-code-token-pseudo-element`,
|
|
389
|
+
punctuation: `${sourcePrefix}-code-token-punctuation`,
|
|
390
|
+
regex: `${sourcePrefix}-code-token-regex`,
|
|
391
|
+
selector: `${sourcePrefix}-code-token-selector`,
|
|
392
|
+
string: `${sourcePrefix}-code-token-string`,
|
|
393
|
+
symbol: `${sourcePrefix}-code-token-symbol`,
|
|
394
|
+
tag: `${sourcePrefix}-code-token-tag`,
|
|
395
|
+
unit: `${sourcePrefix}-code-token-unit`,
|
|
396
|
+
url: `${sourcePrefix}-code-token-url`,
|
|
397
|
+
variable: `${sourcePrefix}-code-token-variable`,
|
|
398
|
+
},
|
|
399
|
+
},
|
|
353
400
|
focusRing: `${sourcePrefix}-focus-ring`,
|
|
354
401
|
link: {
|
|
355
402
|
fg: `${sourcePrefix}-link-fg`,
|
|
@@ -368,44 +415,7 @@ function buildColorCardVarNames(props: {scheme?: Scheme; tone: CardTone}): Color
|
|
|
368
415
|
from: `${sourcePrefix}-skeleton-from`,
|
|
369
416
|
to: `${sourcePrefix}-skeleton-to`,
|
|
370
417
|
},
|
|
371
|
-
|
|
372
|
-
atrule: `${sourcePrefix}-token-atrule`,
|
|
373
|
-
attrName: `${sourcePrefix}-token-attr-name`,
|
|
374
|
-
attrValue: `${sourcePrefix}-token-attr-value`,
|
|
375
|
-
attribute: `${sourcePrefix}-token-attribute`,
|
|
376
|
-
boolean: `${sourcePrefix}-token-boolean`,
|
|
377
|
-
builtin: `${sourcePrefix}-token-builtin`,
|
|
378
|
-
cdata: `${sourcePrefix}-token-cdata`,
|
|
379
|
-
char: `${sourcePrefix}-token-char`,
|
|
380
|
-
class: `${sourcePrefix}-token-class`,
|
|
381
|
-
className: `${sourcePrefix}-token-class-name`,
|
|
382
|
-
comment: `${sourcePrefix}-token-comment`,
|
|
383
|
-
constant: `${sourcePrefix}-token-constant`,
|
|
384
|
-
deleted: `${sourcePrefix}-token-deleted`,
|
|
385
|
-
doctype: `${sourcePrefix}-token-doctype`,
|
|
386
|
-
entity: `${sourcePrefix}-token-entity`,
|
|
387
|
-
function: `${sourcePrefix}-token-function`,
|
|
388
|
-
hexcode: `${sourcePrefix}-token-hexcode`,
|
|
389
|
-
id: `${sourcePrefix}-token-id`,
|
|
390
|
-
important: `${sourcePrefix}-token-important`,
|
|
391
|
-
inserted: `${sourcePrefix}-token-inserted`,
|
|
392
|
-
keyword: `${sourcePrefix}-token-keyword`,
|
|
393
|
-
number: `${sourcePrefix}-token-number`,
|
|
394
|
-
operator: `${sourcePrefix}-token-operator`,
|
|
395
|
-
prolog: `${sourcePrefix}-token-prolog`,
|
|
396
|
-
property: `${sourcePrefix}-token-property`,
|
|
397
|
-
pseudoClass: `${sourcePrefix}-token-pseudo-class`,
|
|
398
|
-
pseudoElement: `${sourcePrefix}-token-pseudo-element`,
|
|
399
|
-
punctuation: `${sourcePrefix}-token-punctuation`,
|
|
400
|
-
regex: `${sourcePrefix}-token-regex`,
|
|
401
|
-
selector: `${sourcePrefix}-token-selector`,
|
|
402
|
-
string: `${sourcePrefix}-token-string`,
|
|
403
|
-
symbol: `${sourcePrefix}-token-symbol`,
|
|
404
|
-
tag: `${sourcePrefix}-token-tag`,
|
|
405
|
-
unit: `${sourcePrefix}-token-unit`,
|
|
406
|
-
url: `${sourcePrefix}-token-url`,
|
|
407
|
-
variable: `${sourcePrefix}-token-variable`,
|
|
408
|
-
},
|
|
418
|
+
|
|
409
419
|
solid: buildColorVariantVarNames({scheme, tone, variant: 'solid'}),
|
|
410
420
|
tinted: buildColorVariantVarNames({scheme, tone, variant: 'tinted'}),
|
|
411
421
|
}
|
package/src/css/vars.ts
CHANGED
|
@@ -90,6 +90,49 @@ const colorVars: Vars['color'] = {
|
|
|
90
90
|
backdrop: `var(${varNames.color.backdrop})`,
|
|
91
91
|
bg: `var(${varNames.color.bg})`,
|
|
92
92
|
border: `var(${varNames.color.border})`,
|
|
93
|
+
code: {
|
|
94
|
+
bg: `var(${varNames.color.code.bg})`,
|
|
95
|
+
fg: `var(${varNames.color.code.fg})`,
|
|
96
|
+
|
|
97
|
+
token: {
|
|
98
|
+
atrule: `var(${varNames.color.code.token.atrule})`,
|
|
99
|
+
attrName: `var(${varNames.color.code.token.attrName})`,
|
|
100
|
+
attrValue: `var(${varNames.color.code.token.attrValue})`,
|
|
101
|
+
attribute: `var(${varNames.color.code.token.attribute})`,
|
|
102
|
+
boolean: `var(${varNames.color.code.token.boolean})`,
|
|
103
|
+
builtin: `var(${varNames.color.code.token.builtin})`,
|
|
104
|
+
cdata: `var(${varNames.color.code.token.cdata})`,
|
|
105
|
+
char: `var(${varNames.color.code.token.char})`,
|
|
106
|
+
class: `var(${varNames.color.code.token.class})`,
|
|
107
|
+
className: `var(${varNames.color.code.token.className})`,
|
|
108
|
+
comment: `var(${varNames.color.code.token.comment})`,
|
|
109
|
+
constant: `var(${varNames.color.code.token.constant})`,
|
|
110
|
+
deleted: `var(${varNames.color.code.token.deleted})`,
|
|
111
|
+
doctype: `var(${varNames.color.code.token.doctype})`,
|
|
112
|
+
entity: `var(${varNames.color.code.token.entity})`,
|
|
113
|
+
function: `var(${varNames.color.code.token.function})`,
|
|
114
|
+
hexcode: `var(${varNames.color.code.token.hexcode})`,
|
|
115
|
+
id: `var(${varNames.color.code.token.id})`,
|
|
116
|
+
important: `var(${varNames.color.code.token.important})`,
|
|
117
|
+
inserted: `var(${varNames.color.code.token.inserted})`,
|
|
118
|
+
keyword: `var(${varNames.color.code.token.keyword})`,
|
|
119
|
+
number: `var(${varNames.color.code.token.number})`,
|
|
120
|
+
operator: `var(${varNames.color.code.token.operator})`,
|
|
121
|
+
prolog: `var(${varNames.color.code.token.prolog})`,
|
|
122
|
+
property: `var(${varNames.color.code.token.property})`,
|
|
123
|
+
pseudoClass: `var(${varNames.color.code.token.pseudoClass})`,
|
|
124
|
+
pseudoElement: `var(${varNames.color.code.token.pseudoElement})`,
|
|
125
|
+
punctuation: `var(${varNames.color.code.token.punctuation})`,
|
|
126
|
+
regex: `var(${varNames.color.code.token.regex})`,
|
|
127
|
+
selector: `var(${varNames.color.code.token.selector})`,
|
|
128
|
+
string: `var(${varNames.color.code.token.string})`,
|
|
129
|
+
symbol: `var(${varNames.color.code.token.symbol})`,
|
|
130
|
+
tag: `var(${varNames.color.code.token.tag})`,
|
|
131
|
+
unit: `var(${varNames.color.code.token.unit})`,
|
|
132
|
+
url: `var(${varNames.color.code.token.url})`,
|
|
133
|
+
variable: `var(${varNames.color.code.token.variable})`,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
93
136
|
fg: `var(${varNames.color.fg})`,
|
|
94
137
|
focusRing: `var(${varNames.color.focusRing})`,
|
|
95
138
|
input: {
|
|
@@ -115,44 +158,6 @@ const colorVars: Vars['color'] = {
|
|
|
115
158
|
from: `var(${varNames.color.skeleton.from})`,
|
|
116
159
|
to: `var(${varNames.color.skeleton.to})`,
|
|
117
160
|
},
|
|
118
|
-
token: {
|
|
119
|
-
atrule: `var(${varNames.color.token.atrule})`,
|
|
120
|
-
attrName: `var(${varNames.color.token.attrName})`,
|
|
121
|
-
attrValue: `var(${varNames.color.token.attrValue})`,
|
|
122
|
-
attribute: `var(${varNames.color.token.attribute})`,
|
|
123
|
-
boolean: `var(${varNames.color.token.boolean})`,
|
|
124
|
-
builtin: `var(${varNames.color.token.builtin})`,
|
|
125
|
-
cdata: `var(${varNames.color.token.cdata})`,
|
|
126
|
-
char: `var(${varNames.color.token.char})`,
|
|
127
|
-
class: `var(${varNames.color.token.class})`,
|
|
128
|
-
className: `var(${varNames.color.token.className})`,
|
|
129
|
-
comment: `var(${varNames.color.token.comment})`,
|
|
130
|
-
constant: `var(${varNames.color.token.constant})`,
|
|
131
|
-
deleted: `var(${varNames.color.token.deleted})`,
|
|
132
|
-
doctype: `var(${varNames.color.token.doctype})`,
|
|
133
|
-
entity: `var(${varNames.color.token.entity})`,
|
|
134
|
-
function: `var(${varNames.color.token.function})`,
|
|
135
|
-
hexcode: `var(${varNames.color.token.hexcode})`,
|
|
136
|
-
id: `var(${varNames.color.token.id})`,
|
|
137
|
-
important: `var(${varNames.color.token.important})`,
|
|
138
|
-
inserted: `var(${varNames.color.token.inserted})`,
|
|
139
|
-
keyword: `var(${varNames.color.token.keyword})`,
|
|
140
|
-
number: `var(${varNames.color.token.number})`,
|
|
141
|
-
operator: `var(${varNames.color.token.operator})`,
|
|
142
|
-
prolog: `var(${varNames.color.token.prolog})`,
|
|
143
|
-
property: `var(${varNames.color.token.property})`,
|
|
144
|
-
pseudoClass: `var(${varNames.color.token.pseudoClass})`,
|
|
145
|
-
pseudoElement: `var(${varNames.color.token.pseudoElement})`,
|
|
146
|
-
punctuation: `var(${varNames.color.token.punctuation})`,
|
|
147
|
-
regex: `var(${varNames.color.token.regex})`,
|
|
148
|
-
selector: `var(${varNames.color.token.selector})`,
|
|
149
|
-
string: `var(${varNames.color.token.string})`,
|
|
150
|
-
symbol: `var(${varNames.color.token.symbol})`,
|
|
151
|
-
tag: `var(${varNames.color.token.tag})`,
|
|
152
|
-
unit: `var(${varNames.color.token.unit})`,
|
|
153
|
-
url: `var(${varNames.color.token.url})`,
|
|
154
|
-
variable: `var(${varNames.color.token.variable})`,
|
|
155
|
-
},
|
|
156
161
|
|
|
157
162
|
solid: buildColorVariantVars({variant: 'solid'}),
|
|
158
163
|
tinted: buildColorVariantVars({variant: 'tinted'}),
|
|
@@ -319,6 +324,48 @@ function buildColorCardVars(props: {scheme?: Scheme; tone: CardTone}): ColorCard
|
|
|
319
324
|
}, {} as ColorAvatarVars),
|
|
320
325
|
},
|
|
321
326
|
backdrop: `var(${prefix.backdrop})`,
|
|
327
|
+
code: {
|
|
328
|
+
bg: `var(${prefix.code.bg})`,
|
|
329
|
+
fg: `var(${prefix.code.fg})`,
|
|
330
|
+
token: {
|
|
331
|
+
atrule: `var(${prefix.code.token.atrule})`,
|
|
332
|
+
attrName: `var(${prefix.code.token.attrName})`,
|
|
333
|
+
attrValue: `var(${prefix.code.token.attrValue})`,
|
|
334
|
+
attribute: `var(${prefix.code.token.attribute})`,
|
|
335
|
+
boolean: `var(${prefix.code.token.boolean})`,
|
|
336
|
+
builtin: `var(${prefix.code.token.builtin})`,
|
|
337
|
+
cdata: `var(${prefix.code.token.cdata})`,
|
|
338
|
+
char: `var(${prefix.code.token.char})`,
|
|
339
|
+
class: `var(${prefix.code.token.class})`,
|
|
340
|
+
className: `var(${prefix.code.token.className})`,
|
|
341
|
+
comment: `var(${prefix.code.token.comment})`,
|
|
342
|
+
constant: `var(${prefix.code.token.constant})`,
|
|
343
|
+
deleted: `var(${prefix.code.token.deleted})`,
|
|
344
|
+
doctype: `var(${prefix.code.token.doctype})`,
|
|
345
|
+
entity: `var(${prefix.code.token.entity})`,
|
|
346
|
+
function: `var(${prefix.code.token.function})`,
|
|
347
|
+
hexcode: `var(${prefix.code.token.hexcode})`,
|
|
348
|
+
id: `var(${prefix.code.token.id})`,
|
|
349
|
+
important: `var(${prefix.code.token.important})`,
|
|
350
|
+
inserted: `var(${prefix.code.token.inserted})`,
|
|
351
|
+
keyword: `var(${prefix.code.token.keyword})`,
|
|
352
|
+
number: `var(${prefix.code.token.number})`,
|
|
353
|
+
operator: `var(${prefix.code.token.operator})`,
|
|
354
|
+
prolog: `var(${prefix.code.token.prolog})`,
|
|
355
|
+
property: `var(${prefix.code.token.property})`,
|
|
356
|
+
pseudoClass: `var(${prefix.code.token.pseudoClass})`,
|
|
357
|
+
pseudoElement: `var(${prefix.code.token.pseudoElement})`,
|
|
358
|
+
punctuation: `var(${prefix.code.token.punctuation})`,
|
|
359
|
+
regex: `var(${prefix.code.token.regex})`,
|
|
360
|
+
selector: `var(${prefix.code.token.selector})`,
|
|
361
|
+
string: `var(${prefix.code.token.string})`,
|
|
362
|
+
symbol: `var(${prefix.code.token.symbol})`,
|
|
363
|
+
tag: `var(${prefix.code.token.tag})`,
|
|
364
|
+
unit: `var(${prefix.code.token.unit})`,
|
|
365
|
+
url: `var(${prefix.code.token.url})`,
|
|
366
|
+
variable: `var(${prefix.code.token.variable})`,
|
|
367
|
+
},
|
|
368
|
+
},
|
|
322
369
|
focusRing: `var(${prefix.focusRing})`,
|
|
323
370
|
link: {
|
|
324
371
|
fg: `var(${prefix.link.fg})`,
|
|
@@ -337,44 +384,6 @@ function buildColorCardVars(props: {scheme?: Scheme; tone: CardTone}): ColorCard
|
|
|
337
384
|
from: `var(${prefix.skeleton.from})`,
|
|
338
385
|
to: `var(${prefix.skeleton.to})`,
|
|
339
386
|
},
|
|
340
|
-
token: {
|
|
341
|
-
atrule: `var(${prefix.token.atrule})`,
|
|
342
|
-
attrName: `var(${prefix.token.attrName})`,
|
|
343
|
-
attrValue: `var(${prefix.token.attrValue})`,
|
|
344
|
-
attribute: `var(${prefix.token.attribute})`,
|
|
345
|
-
boolean: `var(${prefix.token.boolean})`,
|
|
346
|
-
builtin: `var(${prefix.token.builtin})`,
|
|
347
|
-
cdata: `var(${prefix.token.cdata})`,
|
|
348
|
-
char: `var(${prefix.token.char})`,
|
|
349
|
-
class: `var(${prefix.token.class})`,
|
|
350
|
-
className: `var(${prefix.token.className})`,
|
|
351
|
-
comment: `var(${prefix.token.comment})`,
|
|
352
|
-
constant: `var(${prefix.token.constant})`,
|
|
353
|
-
deleted: `var(${prefix.token.deleted})`,
|
|
354
|
-
doctype: `var(${prefix.token.doctype})`,
|
|
355
|
-
entity: `var(${prefix.token.entity})`,
|
|
356
|
-
function: `var(${prefix.token.function})`,
|
|
357
|
-
hexcode: `var(${prefix.token.hexcode})`,
|
|
358
|
-
id: `var(${prefix.token.id})`,
|
|
359
|
-
important: `var(${prefix.token.important})`,
|
|
360
|
-
inserted: `var(${prefix.token.inserted})`,
|
|
361
|
-
keyword: `var(${prefix.token.keyword})`,
|
|
362
|
-
number: `var(${prefix.token.number})`,
|
|
363
|
-
operator: `var(${prefix.token.operator})`,
|
|
364
|
-
prolog: `var(${prefix.token.prolog})`,
|
|
365
|
-
property: `var(${prefix.token.property})`,
|
|
366
|
-
pseudoClass: `var(${prefix.token.pseudoClass})`,
|
|
367
|
-
pseudoElement: `var(${prefix.token.pseudoElement})`,
|
|
368
|
-
punctuation: `var(${prefix.token.punctuation})`,
|
|
369
|
-
regex: `var(${prefix.token.regex})`,
|
|
370
|
-
selector: `var(${prefix.token.selector})`,
|
|
371
|
-
string: `var(${prefix.token.string})`,
|
|
372
|
-
symbol: `var(${prefix.token.symbol})`,
|
|
373
|
-
tag: `var(${prefix.token.tag})`,
|
|
374
|
-
unit: `var(${prefix.token.unit})`,
|
|
375
|
-
url: `var(${prefix.token.url})`,
|
|
376
|
-
variable: `var(${prefix.token.variable})`,
|
|
377
|
-
},
|
|
378
387
|
|
|
379
388
|
solid: buildColorVariantVars({scheme, tone, variant: 'solid'}),
|
|
380
389
|
tinted: buildColorVariantVars({scheme, tone, variant: 'tinted'}),
|
|
@@ -72,6 +72,48 @@ function buildColorCard_v3(
|
|
|
72
72
|
return acc
|
|
73
73
|
}, {} as ThemeColorAvatar_v2),
|
|
74
74
|
backdrop: renderColor(tokens.backdrop, context),
|
|
75
|
+
code: {
|
|
76
|
+
bg: renderColor(tokens.code.bg, context),
|
|
77
|
+
fg: renderColor(tokens.code.fg, context),
|
|
78
|
+
token: {
|
|
79
|
+
atrule: renderColor(tokens.code.token.atrule, context),
|
|
80
|
+
attrName: renderColor(tokens.code.token.attrName, context),
|
|
81
|
+
attrValue: renderColor(tokens.code.token.attrValue, context),
|
|
82
|
+
attribute: renderColor(tokens.code.token.attribute, context),
|
|
83
|
+
boolean: renderColor(tokens.code.token.boolean, context),
|
|
84
|
+
builtin: renderColor(tokens.code.token.builtin, context),
|
|
85
|
+
cdata: renderColor(tokens.code.token.cdata, context),
|
|
86
|
+
char: renderColor(tokens.code.token.char, context),
|
|
87
|
+
class: renderColor(tokens.code.token.class, context),
|
|
88
|
+
className: renderColor(tokens.code.token.className, context),
|
|
89
|
+
comment: renderColor(tokens.code.token.comment, context),
|
|
90
|
+
constant: renderColor(tokens.code.token.constant, context),
|
|
91
|
+
deleted: renderColor(tokens.code.token.deleted, context),
|
|
92
|
+
doctype: renderColor(tokens.code.token.doctype, context),
|
|
93
|
+
entity: renderColor(tokens.code.token.entity, context),
|
|
94
|
+
function: renderColor(tokens.code.token.function, context),
|
|
95
|
+
hexcode: renderColor(tokens.code.token.hexcode, context),
|
|
96
|
+
id: renderColor(tokens.code.token.id, context),
|
|
97
|
+
important: renderColor(tokens.code.token.important, context),
|
|
98
|
+
inserted: renderColor(tokens.code.token.inserted, context),
|
|
99
|
+
keyword: renderColor(tokens.code.token.keyword, context),
|
|
100
|
+
number: renderColor(tokens.code.token.number, context),
|
|
101
|
+
operator: renderColor(tokens.code.token.operator, context),
|
|
102
|
+
prolog: renderColor(tokens.code.token.prolog, context),
|
|
103
|
+
property: renderColor(tokens.code.token.property, context),
|
|
104
|
+
pseudoClass: renderColor(tokens.code.token.pseudoClass, context),
|
|
105
|
+
pseudoElement: renderColor(tokens.code.token.pseudoElement, context),
|
|
106
|
+
punctuation: renderColor(tokens.code.token.punctuation, context),
|
|
107
|
+
regex: renderColor(tokens.code.token.regex, context),
|
|
108
|
+
selector: renderColor(tokens.code.token.selector, context),
|
|
109
|
+
string: renderColor(tokens.code.token.string, context),
|
|
110
|
+
symbol: renderColor(tokens.code.token.symbol, context),
|
|
111
|
+
tag: renderColor(tokens.code.token.tag, context),
|
|
112
|
+
unit: renderColor(tokens.code.token.unit, context),
|
|
113
|
+
url: renderColor(tokens.code.token.url, context),
|
|
114
|
+
variable: renderColor(tokens.code.token.variable, context),
|
|
115
|
+
},
|
|
116
|
+
},
|
|
75
117
|
focusRing: renderColor(tokens.focusRing, context),
|
|
76
118
|
shadow: {
|
|
77
119
|
outline: renderColor(tokens.shadow.outline, context),
|
|
@@ -83,44 +125,7 @@ function buildColorCard_v3(
|
|
|
83
125
|
from: renderColor(tokens.skeleton.from, context),
|
|
84
126
|
to: renderColor(tokens.skeleton.to, context),
|
|
85
127
|
},
|
|
86
|
-
|
|
87
|
-
atrule: renderColor(tokens.token.atrule, context),
|
|
88
|
-
attrName: renderColor(tokens.token.attrName, context),
|
|
89
|
-
attrValue: renderColor(tokens.token.attrValue, context),
|
|
90
|
-
attribute: renderColor(tokens.token.attribute, context),
|
|
91
|
-
boolean: renderColor(tokens.token.boolean, context),
|
|
92
|
-
builtin: renderColor(tokens.token.builtin, context),
|
|
93
|
-
cdata: renderColor(tokens.token.cdata, context),
|
|
94
|
-
char: renderColor(tokens.token.char, context),
|
|
95
|
-
class: renderColor(tokens.token.class, context),
|
|
96
|
-
className: renderColor(tokens.token.className, context),
|
|
97
|
-
comment: renderColor(tokens.token.comment, context),
|
|
98
|
-
constant: renderColor(tokens.token.constant, context),
|
|
99
|
-
deleted: renderColor(tokens.token.deleted, context),
|
|
100
|
-
doctype: renderColor(tokens.token.doctype, context),
|
|
101
|
-
entity: renderColor(tokens.token.entity, context),
|
|
102
|
-
function: renderColor(tokens.token.function, context),
|
|
103
|
-
hexcode: renderColor(tokens.token.hexcode, context),
|
|
104
|
-
id: renderColor(tokens.token.id, context),
|
|
105
|
-
important: renderColor(tokens.token.important, context),
|
|
106
|
-
inserted: renderColor(tokens.token.inserted, context),
|
|
107
|
-
keyword: renderColor(tokens.token.keyword, context),
|
|
108
|
-
number: renderColor(tokens.token.number, context),
|
|
109
|
-
operator: renderColor(tokens.token.operator, context),
|
|
110
|
-
prolog: renderColor(tokens.token.prolog, context),
|
|
111
|
-
property: renderColor(tokens.token.property, context),
|
|
112
|
-
pseudoClass: renderColor(tokens.token.pseudoClass, context),
|
|
113
|
-
pseudoElement: renderColor(tokens.token.pseudoElement, context),
|
|
114
|
-
punctuation: renderColor(tokens.token.punctuation, context),
|
|
115
|
-
regex: renderColor(tokens.token.regex, context),
|
|
116
|
-
selector: renderColor(tokens.token.selector, context),
|
|
117
|
-
string: renderColor(tokens.token.string, context),
|
|
118
|
-
symbol: renderColor(tokens.token.symbol, context),
|
|
119
|
-
tag: renderColor(tokens.token.tag, context),
|
|
120
|
-
unit: renderColor(tokens.token.unit, context),
|
|
121
|
-
url: renderColor(tokens.token.url, context),
|
|
122
|
-
variable: renderColor(tokens.token.variable, context),
|
|
123
|
-
},
|
|
128
|
+
|
|
124
129
|
variant: {
|
|
125
130
|
solid: {
|
|
126
131
|
...THEME_COLOR_STATE_TONES.reduce(
|
|
@@ -15,6 +15,48 @@ export interface CardColorTokens {
|
|
|
15
15
|
}
|
|
16
16
|
>
|
|
17
17
|
backdrop: [ColorToken, ColorToken]
|
|
18
|
+
code: {
|
|
19
|
+
bg: [ColorToken, ColorToken]
|
|
20
|
+
fg: [ColorToken, ColorToken]
|
|
21
|
+
token: {
|
|
22
|
+
atrule: [ColorToken, ColorToken]
|
|
23
|
+
attrName: [ColorToken, ColorToken]
|
|
24
|
+
attrValue: [ColorToken, ColorToken]
|
|
25
|
+
attribute: [ColorToken, ColorToken]
|
|
26
|
+
boolean: [ColorToken, ColorToken]
|
|
27
|
+
builtin: [ColorToken, ColorToken]
|
|
28
|
+
cdata: [ColorToken, ColorToken]
|
|
29
|
+
char: [ColorToken, ColorToken]
|
|
30
|
+
class: [ColorToken, ColorToken]
|
|
31
|
+
className: [ColorToken, ColorToken]
|
|
32
|
+
comment: [ColorToken, ColorToken]
|
|
33
|
+
constant: [ColorToken, ColorToken]
|
|
34
|
+
deleted: [ColorToken, ColorToken]
|
|
35
|
+
doctype: [ColorToken, ColorToken]
|
|
36
|
+
entity: [ColorToken, ColorToken]
|
|
37
|
+
function: [ColorToken, ColorToken]
|
|
38
|
+
hexcode: [ColorToken, ColorToken]
|
|
39
|
+
id: [ColorToken, ColorToken]
|
|
40
|
+
important: [ColorToken, ColorToken]
|
|
41
|
+
inserted: [ColorToken, ColorToken]
|
|
42
|
+
keyword: [ColorToken, ColorToken]
|
|
43
|
+
number: [ColorToken, ColorToken]
|
|
44
|
+
operator: [ColorToken, ColorToken]
|
|
45
|
+
prolog: [ColorToken, ColorToken]
|
|
46
|
+
property: [ColorToken, ColorToken]
|
|
47
|
+
pseudoClass: [ColorToken, ColorToken]
|
|
48
|
+
pseudoElement: [ColorToken, ColorToken]
|
|
49
|
+
punctuation: [ColorToken, ColorToken]
|
|
50
|
+
regex: [ColorToken, ColorToken]
|
|
51
|
+
selector: [ColorToken, ColorToken]
|
|
52
|
+
string: [ColorToken, ColorToken]
|
|
53
|
+
symbol: [ColorToken, ColorToken]
|
|
54
|
+
tag: [ColorToken, ColorToken]
|
|
55
|
+
unit: [ColorToken, ColorToken]
|
|
56
|
+
url: [ColorToken, ColorToken]
|
|
57
|
+
variable: [ColorToken, ColorToken]
|
|
58
|
+
}
|
|
59
|
+
}
|
|
18
60
|
focusRing: [ColorToken, ColorToken]
|
|
19
61
|
link: {
|
|
20
62
|
fg: [ColorToken, ColorToken]
|
|
@@ -29,44 +71,7 @@ export interface CardColorTokens {
|
|
|
29
71
|
from: [ColorToken, ColorToken]
|
|
30
72
|
to: [ColorToken, ColorToken]
|
|
31
73
|
}
|
|
32
|
-
|
|
33
|
-
atrule: [ColorToken, ColorToken]
|
|
34
|
-
attrName: [ColorToken, ColorToken]
|
|
35
|
-
attrValue: [ColorToken, ColorToken]
|
|
36
|
-
attribute: [ColorToken, ColorToken]
|
|
37
|
-
boolean: [ColorToken, ColorToken]
|
|
38
|
-
builtin: [ColorToken, ColorToken]
|
|
39
|
-
cdata: [ColorToken, ColorToken]
|
|
40
|
-
char: [ColorToken, ColorToken]
|
|
41
|
-
class: [ColorToken, ColorToken]
|
|
42
|
-
className: [ColorToken, ColorToken]
|
|
43
|
-
comment: [ColorToken, ColorToken]
|
|
44
|
-
constant: [ColorToken, ColorToken]
|
|
45
|
-
deleted: [ColorToken, ColorToken]
|
|
46
|
-
doctype: [ColorToken, ColorToken]
|
|
47
|
-
entity: [ColorToken, ColorToken]
|
|
48
|
-
function: [ColorToken, ColorToken]
|
|
49
|
-
hexcode: [ColorToken, ColorToken]
|
|
50
|
-
id: [ColorToken, ColorToken]
|
|
51
|
-
important: [ColorToken, ColorToken]
|
|
52
|
-
inserted: [ColorToken, ColorToken]
|
|
53
|
-
keyword: [ColorToken, ColorToken]
|
|
54
|
-
number: [ColorToken, ColorToken]
|
|
55
|
-
operator: [ColorToken, ColorToken]
|
|
56
|
-
prolog: [ColorToken, ColorToken]
|
|
57
|
-
property: [ColorToken, ColorToken]
|
|
58
|
-
pseudoClass: [ColorToken, ColorToken]
|
|
59
|
-
pseudoElement: [ColorToken, ColorToken]
|
|
60
|
-
punctuation: [ColorToken, ColorToken]
|
|
61
|
-
regex: [ColorToken, ColorToken]
|
|
62
|
-
selector: [ColorToken, ColorToken]
|
|
63
|
-
string: [ColorToken, ColorToken]
|
|
64
|
-
symbol: [ColorToken, ColorToken]
|
|
65
|
-
tag: [ColorToken, ColorToken]
|
|
66
|
-
unit: [ColorToken, ColorToken]
|
|
67
|
-
url: [ColorToken, ColorToken]
|
|
68
|
-
variable: [ColorToken, ColorToken]
|
|
69
|
-
}
|
|
74
|
+
|
|
70
75
|
variant: {
|
|
71
76
|
solid: Record<'*' | ThemeColorStateToneKey, ElementColorTokens>
|
|
72
77
|
tinted: Record<'*' | ThemeColorStateToneKey, ElementColorTokens>
|
|
@@ -34,6 +34,48 @@ export interface ThemeColorCard_v3 {
|
|
|
34
34
|
_hue: Hue
|
|
35
35
|
avatar: ThemeColorAvatar_v2
|
|
36
36
|
backdrop: string
|
|
37
|
+
code: {
|
|
38
|
+
bg: string
|
|
39
|
+
fg: string
|
|
40
|
+
token: {
|
|
41
|
+
atrule: string
|
|
42
|
+
attrName: string
|
|
43
|
+
attrValue: string
|
|
44
|
+
attribute: string
|
|
45
|
+
boolean: string
|
|
46
|
+
builtin: string
|
|
47
|
+
cdata: string
|
|
48
|
+
char: string
|
|
49
|
+
class: string
|
|
50
|
+
className: string
|
|
51
|
+
comment: string
|
|
52
|
+
constant: string
|
|
53
|
+
deleted: string
|
|
54
|
+
doctype: string
|
|
55
|
+
entity: string
|
|
56
|
+
function: string
|
|
57
|
+
hexcode: string
|
|
58
|
+
id: string
|
|
59
|
+
important: string
|
|
60
|
+
inserted: string
|
|
61
|
+
keyword: string
|
|
62
|
+
number: string
|
|
63
|
+
operator: string
|
|
64
|
+
prolog: string
|
|
65
|
+
property: string
|
|
66
|
+
pseudoClass: string
|
|
67
|
+
pseudoElement: string
|
|
68
|
+
punctuation: string
|
|
69
|
+
regex: string
|
|
70
|
+
selector: string
|
|
71
|
+
string: string
|
|
72
|
+
symbol: string
|
|
73
|
+
tag: string
|
|
74
|
+
unit: string
|
|
75
|
+
url: string
|
|
76
|
+
variable: string
|
|
77
|
+
}
|
|
78
|
+
}
|
|
37
79
|
focusRing: string
|
|
38
80
|
shadow: {
|
|
39
81
|
outline: string
|
|
@@ -41,44 +83,6 @@ export interface ThemeColorCard_v3 {
|
|
|
41
83
|
penumbra: string
|
|
42
84
|
ambient: string
|
|
43
85
|
}
|
|
44
|
-
token: {
|
|
45
|
-
atrule: string
|
|
46
|
-
attrName: string
|
|
47
|
-
attrValue: string
|
|
48
|
-
attribute: string
|
|
49
|
-
boolean: string
|
|
50
|
-
builtin: string
|
|
51
|
-
cdata: string
|
|
52
|
-
char: string
|
|
53
|
-
class: string
|
|
54
|
-
className: string
|
|
55
|
-
comment: string
|
|
56
|
-
constant: string
|
|
57
|
-
deleted: string
|
|
58
|
-
doctype: string
|
|
59
|
-
entity: string
|
|
60
|
-
function: string
|
|
61
|
-
hexcode: string
|
|
62
|
-
id: string
|
|
63
|
-
important: string
|
|
64
|
-
inserted: string
|
|
65
|
-
keyword: string
|
|
66
|
-
number: string
|
|
67
|
-
operator: string
|
|
68
|
-
prolog: string
|
|
69
|
-
property: string
|
|
70
|
-
pseudoClass: string
|
|
71
|
-
pseudoElement: string
|
|
72
|
-
punctuation: string
|
|
73
|
-
regex: string
|
|
74
|
-
selector: string
|
|
75
|
-
string: string
|
|
76
|
-
symbol: string
|
|
77
|
-
tag: string
|
|
78
|
-
unit: string
|
|
79
|
-
url: string
|
|
80
|
-
variable: string
|
|
81
|
-
}
|
|
82
86
|
skeleton: {
|
|
83
87
|
from: string
|
|
84
88
|
to: string
|