@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.
- package/LICENSE +1 -1
- package/README.md +6 -3
- package/dist/index.cjs.mjs +11 -36
- package/dist/index.d.ts +248 -268
- package/dist/index.esm.js +494 -354
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +503 -567
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs.mjs +1 -1
- package/dist/theme.d.ts +81 -114
- package/dist/theme.esm.js +299 -252
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +299 -252
- package/dist/theme.js.map +1 -1
- package/package.json +6 -3
- package/src/core/__workshop__/constants.ts +3 -2
- package/src/core/_compat.ts +236 -87
- package/src/core/components/menu/__workshop__/selectedItem.tsx +7 -2
- package/src/core/components/menu/menuButton.tsx +12 -1
- package/src/core/constants.ts +18 -0
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +6 -3
- package/src/core/middleware/origin.ts +47 -0
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +1 -1
- package/src/core/primitives/avatar/__workshop__/stack.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +14 -4
- package/src/core/primitives/avatar/avatarCounter.tsx +16 -5
- package/src/core/primitives/avatar/avatarStack.tsx +2 -2
- package/src/core/primitives/badge/badge.tsx +1 -3
- package/src/core/primitives/kbd/kbd.tsx +2 -0
- package/src/core/primitives/popover/popover.tsx +67 -13
- package/src/core/primitives/popover/popoverCard.tsx +26 -15
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/switch/styles.ts +6 -1
- package/src/core/primitives/tooltip/tooltip.tsx +47 -57
- package/src/core/primitives/tooltip/tooltipCard.tsx +104 -0
- package/src/core/styles/card/_cardColorStyle.ts +2 -0
- package/src/core/styles/margin/marginsStyle.test.ts +2 -2
- package/src/core/styles/padding/paddingStyle.test.ts +2 -2
- package/src/core/theme/__workshop__/build/Root.tsx +20 -3
- package/src/core/theme/__workshop__/build/story.tsx +16 -10
- package/src/core/theme/__workshop__/canvas.tsx +7 -7
- package/src/core/theme/__workshop__/debug/story.tsx +159 -0
- package/src/core/theme/__workshop__/index.ts +5 -0
- package/src/core/theme/theme.test.tsx +2 -2
- package/src/core/types/avatar.ts +1 -1
- package/src/core/types/button.ts +1 -2
- package/src/core/{primitives/tooltip → utils/conditionalWrapper}/conditionalWrapper.tsx +3 -0
- package/src/core/utils/conditionalWrapper/index.ts +1 -0
- package/src/core/utils/index.ts +1 -0
- package/src/theme/build/_deprecated/color/factory.ts +3 -3
- package/src/theme/build/buildColorTheme.ts +16 -16
- package/src/theme/build/colorToken/colorToken.ts +19 -0
- package/src/theme/build/colorToken/compileColorToken.ts +21 -0
- package/src/theme/build/colorToken/index.ts +2 -0
- package/src/theme/build/colorToken/types.ts +6 -0
- package/src/theme/build/renderColorTheme.ts +14 -15
- package/src/theme/build/renderColorValue.ts +9 -2
- package/src/theme/config/system.ts +12 -10
- package/src/theme/config/tokens/color/types.ts +12 -1
- package/src/theme/config/tokens/parseTokenKey.ts +1 -0
- package/src/theme/config/tokens/parseTokenValue.test.ts +13 -16
- package/src/theme/config/tokens/parseTokenValue.ts +45 -14
- package/src/theme/config/tokens/types.ts +3 -2
- package/src/theme/defaults/colorTokens.ts +219 -211
- package/src/theme/defaults/config.ts +2 -1
- package/src/theme/defaults/fonts.ts +13 -5
- package/src/theme/index.ts +0 -7
- package/src/theme/system/color/_constants.ts +5 -2
- package/src/theme/system/color/_system.ts +2 -1
- package/src/theme/system/color/avatar.ts +2 -12
- package/src/theme/system/color/button.ts +4 -20
- package/src/theme/system/color/input.ts +3 -11
- package/src/theme/system/color/selectable.ts +3 -14
- package/src/theme/system/shadow.ts +0 -6
- package/src/theme/system/styles.ts +0 -6
- package/src/theme/system/theme.ts +2 -0
- package/src/theme/system/v0/avatar.ts +1 -1
- package/src/theme/system/v0/color/button.ts +4 -4
- package/src/theme/system/v0/color/card.ts +2 -2
- package/src/theme/system/v0/color/input.ts +3 -3
- package/src/theme/system/v0/color/muted.ts +2 -2
- package/src/theme/system/v0/color/solid.ts +2 -2
- package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
- package/src/theme/versioning/v2_v0.ts +2 -2
- package/src/theme/build/colorToken.ts +0 -39
package/dist/theme.js
CHANGED
|
@@ -1166,6 +1166,9 @@ const defaultThemeConfig = {
|
|
|
1166
1166
|
_version: 2,
|
|
1167
1167
|
avatar: {
|
|
1168
1168
|
sizes: [{
|
|
1169
|
+
distance: -4,
|
|
1170
|
+
size: 19
|
|
1171
|
+
}, {
|
|
1169
1172
|
distance: -4,
|
|
1170
1173
|
size: 25
|
|
1171
1174
|
}, {
|
|
@@ -1260,7 +1263,7 @@ const defaultThemeConfig = {
|
|
|
1260
1263
|
switch: {
|
|
1261
1264
|
width: 25,
|
|
1262
1265
|
height: 17,
|
|
1263
|
-
padding:
|
|
1266
|
+
padding: 5,
|
|
1264
1267
|
transitionDurationMs: 150,
|
|
1265
1268
|
transitionTimingFunction: "ease-out",
|
|
1266
1269
|
focusRing: {
|
|
@@ -1403,35 +1406,42 @@ const defaultThemeFonts = {
|
|
|
1403
1406
|
sizes: [{
|
|
1404
1407
|
ascenderHeight: 2,
|
|
1405
1408
|
descenderHeight: 2,
|
|
1406
|
-
fontSize:
|
|
1409
|
+
fontSize: 8.1,
|
|
1410
|
+
iconSize: 13,
|
|
1411
|
+
lineHeight: 10,
|
|
1412
|
+
letterSpacing: 0.5
|
|
1413
|
+
}, {
|
|
1414
|
+
ascenderHeight: 2,
|
|
1415
|
+
descenderHeight: 2,
|
|
1416
|
+
fontSize: 9.5,
|
|
1407
1417
|
iconSize: 15,
|
|
1408
1418
|
lineHeight: 11,
|
|
1409
1419
|
letterSpacing: 0.5
|
|
1410
1420
|
}, {
|
|
1411
1421
|
ascenderHeight: 2,
|
|
1412
1422
|
descenderHeight: 2,
|
|
1413
|
-
fontSize:
|
|
1423
|
+
fontSize: 10.8,
|
|
1414
1424
|
iconSize: 17,
|
|
1415
1425
|
lineHeight: 12,
|
|
1416
1426
|
letterSpacing: 0.5
|
|
1417
1427
|
}, {
|
|
1418
1428
|
ascenderHeight: 2,
|
|
1419
1429
|
descenderHeight: 2,
|
|
1420
|
-
fontSize: 12.
|
|
1430
|
+
fontSize: 12.25,
|
|
1421
1431
|
iconSize: 19,
|
|
1422
1432
|
lineHeight: 13,
|
|
1423
1433
|
letterSpacing: 0.5
|
|
1424
1434
|
}, {
|
|
1425
1435
|
ascenderHeight: 2,
|
|
1426
1436
|
descenderHeight: 2,
|
|
1427
|
-
fontSize:
|
|
1437
|
+
fontSize: 13.6,
|
|
1428
1438
|
iconSize: 21,
|
|
1429
1439
|
lineHeight: 14,
|
|
1430
1440
|
letterSpacing: 0.5
|
|
1431
1441
|
}, {
|
|
1432
1442
|
ascenderHeight: 2,
|
|
1433
1443
|
descenderHeight: 2,
|
|
1434
|
-
fontSize: 15
|
|
1444
|
+
fontSize: 15,
|
|
1435
1445
|
iconSize: 23,
|
|
1436
1446
|
lineHeight: 15,
|
|
1437
1447
|
letterSpacing: 0.5
|
|
@@ -1911,13 +1921,10 @@ function inputStateThemeColor_v2_v0(t) {
|
|
|
1911
1921
|
placeholder: t.placeholder
|
|
1912
1922
|
};
|
|
1913
1923
|
}
|
|
1924
|
+
const THEME_COLOR_SCHEMES = ["light", "dark"];
|
|
1914
1925
|
const THEME_COLOR_BLEND_MODES = ["multiply", "screen"];
|
|
1915
|
-
const THEME_COLOR_CARD_TONES = ["transparent", "default", "primary",
|
|
1916
|
-
|
|
1917
|
-
"positive", "caution", "critical"];
|
|
1918
|
-
const THEME_COLOR_STATE_TONES = ["default", "primary",
|
|
1919
|
-
// todo: rename to `accent` in the next breaking major version
|
|
1920
|
-
"positive", "caution", "critical"];
|
|
1926
|
+
const THEME_COLOR_CARD_TONES = ["transparent", "default", "primary", "positive", "caution", "critical"];
|
|
1927
|
+
const THEME_COLOR_STATE_TONES = ["default", "primary", "positive", "caution", "critical"];
|
|
1921
1928
|
const THEME_COLOR_STATES = ["enabled", "hovered", "pressed", "selected", "disabled"];
|
|
1922
1929
|
const THEME_COLOR_BUTTON_MODES = ["default", "ghost", "bleed"];
|
|
1923
1930
|
const THEME_COLOR_INPUT_MODES = ["default", "invalid"];
|
|
@@ -1991,12 +1998,24 @@ function parseTokenKey(str) {
|
|
|
1991
1998
|
}
|
|
1992
1999
|
return void 0;
|
|
1993
2000
|
}
|
|
2001
|
+
function isColorMixPercentValue(str) {
|
|
2002
|
+
return /^\d+%$/.test(str);
|
|
2003
|
+
}
|
|
1994
2004
|
function parseTokenValue(str) {
|
|
1995
2005
|
const segments = str.split("/");
|
|
1996
|
-
|
|
2006
|
+
let nextSegment = segments.shift() || "";
|
|
2007
|
+
const [segment0, segment0mix] = nextSegment.split(" ");
|
|
1997
2008
|
if (isColorTintKey(segment0)) {
|
|
1998
2009
|
const tint = segment0;
|
|
1999
2010
|
const segment1 = segments.shift() || "";
|
|
2011
|
+
if (isColorMixPercentValue(segment0mix)) {
|
|
2012
|
+
const mix = Number(segment0mix.slice(0, -1)) / 100;
|
|
2013
|
+
return {
|
|
2014
|
+
type: "color",
|
|
2015
|
+
tint,
|
|
2016
|
+
mix
|
|
2017
|
+
};
|
|
2018
|
+
}
|
|
2000
2019
|
if (isColorOpacityValue(segment1)) {
|
|
2001
2020
|
const opacity = Number(segment1);
|
|
2002
2021
|
return {
|
|
@@ -2013,6 +2032,14 @@ function parseTokenValue(str) {
|
|
|
2013
2032
|
if (isColorValue(segment0)) {
|
|
2014
2033
|
const key = segment0;
|
|
2015
2034
|
const segment1 = segments.shift() || "";
|
|
2035
|
+
if (isColorMixPercentValue(segment0mix)) {
|
|
2036
|
+
const mix = Number(segment0mix.slice(0, -1)) / 100;
|
|
2037
|
+
return {
|
|
2038
|
+
type: "color",
|
|
2039
|
+
key,
|
|
2040
|
+
mix
|
|
2041
|
+
};
|
|
2042
|
+
}
|
|
2016
2043
|
if (isColorOpacityValue(segment1)) {
|
|
2017
2044
|
const opacity = Number(segment1);
|
|
2018
2045
|
return {
|
|
@@ -2028,15 +2055,24 @@ function parseTokenValue(str) {
|
|
|
2028
2055
|
}
|
|
2029
2056
|
if (isColorHueKey(segment0)) {
|
|
2030
2057
|
const hue = segment0;
|
|
2031
|
-
|
|
2058
|
+
nextSegment = segments.shift() || "";
|
|
2059
|
+
const [segment1, segment1mix] = nextSegment.split(" ");
|
|
2032
2060
|
if (isColorTintKey(segment1)) {
|
|
2033
2061
|
const tint = segment1;
|
|
2034
2062
|
const segment2 = segments.shift() || "";
|
|
2063
|
+
if (isColorMixPercentValue(segment1mix)) {
|
|
2064
|
+
const mix = Number(segment1mix.slice(0, -1)) / 100;
|
|
2065
|
+
return {
|
|
2066
|
+
type: "color",
|
|
2067
|
+
hue,
|
|
2068
|
+
tint,
|
|
2069
|
+
mix
|
|
2070
|
+
};
|
|
2071
|
+
}
|
|
2035
2072
|
if (isColorOpacityValue(segment2)) {
|
|
2036
2073
|
const opacity = Number(segment2);
|
|
2037
2074
|
return {
|
|
2038
2075
|
type: "color",
|
|
2039
|
-
key: "".concat(hue, "/").concat(tint),
|
|
2040
2076
|
hue,
|
|
2041
2077
|
tint,
|
|
2042
2078
|
opacity
|
|
@@ -2044,21 +2080,13 @@ function parseTokenValue(str) {
|
|
|
2044
2080
|
}
|
|
2045
2081
|
return {
|
|
2046
2082
|
type: "color",
|
|
2047
|
-
key: "".concat(hue, "/").concat(tint),
|
|
2048
2083
|
hue,
|
|
2049
2084
|
tint
|
|
2050
2085
|
};
|
|
2051
2086
|
}
|
|
2052
2087
|
return {
|
|
2053
2088
|
type: "hue",
|
|
2054
|
-
value:
|
|
2055
|
-
};
|
|
2056
|
-
}
|
|
2057
|
-
if (isColorOpacityValue(segment0)) {
|
|
2058
|
-
const opacity = Number(segment0);
|
|
2059
|
-
return {
|
|
2060
|
-
type: "color",
|
|
2061
|
-
opacity
|
|
2089
|
+
value: hue
|
|
2062
2090
|
};
|
|
2063
2091
|
}
|
|
2064
2092
|
if (isColorBlendModeValue(segment0)) {
|
|
@@ -2095,6 +2123,21 @@ function isColorValue(str) {
|
|
|
2095
2123
|
function isColorOpacityValue(str) {
|
|
2096
2124
|
return str === "0" || /^0\.[0-9]+$/.test(str) || str === "1";
|
|
2097
2125
|
}
|
|
2126
|
+
function compileColorTokenValue(node) {
|
|
2127
|
+
let key = "";
|
|
2128
|
+
if (node.key === "black" || node.key === "white") {
|
|
2129
|
+
key = node.key;
|
|
2130
|
+
} else {
|
|
2131
|
+
key = "".concat(node.hue, "/").concat(node.tint);
|
|
2132
|
+
}
|
|
2133
|
+
if (node.mix !== void 0) {
|
|
2134
|
+
return "".concat(key, " ").concat(node.mix * 100, "%");
|
|
2135
|
+
}
|
|
2136
|
+
if (node.opacity !== void 0) {
|
|
2137
|
+
key += "/".concat(node.opacity);
|
|
2138
|
+
}
|
|
2139
|
+
return key;
|
|
2140
|
+
}
|
|
2098
2141
|
const DEFAULT_COLOR_TOKEN_VALUE = ["500", "500"];
|
|
2099
2142
|
function resolveColorTokenValue(context) {
|
|
2100
2143
|
let value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_COLOR_TOKEN_VALUE;
|
|
@@ -2111,58 +2154,42 @@ function resolveColorTokenValue(context) {
|
|
|
2111
2154
|
hue: node.hue || hue
|
|
2112
2155
|
});
|
|
2113
2156
|
}
|
|
2114
|
-
function compileColorTokenValue(node) {
|
|
2115
|
-
let key = "";
|
|
2116
|
-
if (node.key === "black" || node.key === "white") {
|
|
2117
|
-
key = node.key;
|
|
2118
|
-
} else {
|
|
2119
|
-
key = "".concat(node.hue, "/").concat(node.tint);
|
|
2120
|
-
}
|
|
2121
|
-
if (node.opacity !== void 0) {
|
|
2122
|
-
key += "/".concat(node.opacity);
|
|
2123
|
-
}
|
|
2124
|
-
return key;
|
|
2125
|
-
}
|
|
2126
2157
|
const defaultColorTokens = {
|
|
2127
2158
|
base: {
|
|
2128
2159
|
"*": {
|
|
2129
2160
|
_blend: ["multiply", "screen"],
|
|
2161
|
+
accent: {
|
|
2162
|
+
fg: ["purple/600", "purple/400"]
|
|
2163
|
+
},
|
|
2130
2164
|
avatar: {
|
|
2131
2165
|
"*": {
|
|
2132
2166
|
_blend: ["screen", "multiply"],
|
|
2133
2167
|
bg: ["500", "400"],
|
|
2134
2168
|
fg: ["white", "black"]
|
|
2135
|
-
},
|
|
2136
|
-
yellow: {
|
|
2137
|
-
bg: ["600", "400"]
|
|
2138
|
-
},
|
|
2139
|
-
green: {
|
|
2140
|
-
bg: ["600", "400"]
|
|
2141
|
-
},
|
|
2142
|
-
cyan: {
|
|
2143
|
-
bg: ["600", "400"]
|
|
2144
2169
|
}
|
|
2145
2170
|
},
|
|
2146
2171
|
backdrop: ["gray/200/0.2", "black/0.5"],
|
|
2147
2172
|
badge: {
|
|
2148
2173
|
"*": {
|
|
2149
2174
|
bg: ["100", "900"],
|
|
2150
|
-
fg: ["600", "400"]
|
|
2175
|
+
fg: ["600", "400"],
|
|
2176
|
+
icon: ["500", "500"],
|
|
2177
|
+
dot: ["500", "500"]
|
|
2151
2178
|
},
|
|
2152
2179
|
positive: {
|
|
2153
|
-
bg: ["200
|
|
2154
|
-
fg: ["
|
|
2180
|
+
bg: ["200 50%", "900"],
|
|
2181
|
+
fg: ["600", "500"]
|
|
2155
2182
|
},
|
|
2156
2183
|
caution: {
|
|
2157
|
-
bg: ["200
|
|
2158
|
-
fg: ["
|
|
2184
|
+
bg: ["200 50%", "900"],
|
|
2185
|
+
fg: ["600", "500"]
|
|
2159
2186
|
}
|
|
2160
2187
|
},
|
|
2161
2188
|
bg: ["50", "950"],
|
|
2162
2189
|
border: ["200", "800"],
|
|
2163
2190
|
code: {
|
|
2164
2191
|
bg: ["50", "950"],
|
|
2165
|
-
fg: ["600", "
|
|
2192
|
+
fg: ["600", "300"]
|
|
2166
2193
|
},
|
|
2167
2194
|
fg: ["800", "200"],
|
|
2168
2195
|
focusRing: ["blue/500", "blue/500"],
|
|
@@ -2172,11 +2199,11 @@ const defaultColorTokens = {
|
|
|
2172
2199
|
border: ["200", "800"]
|
|
2173
2200
|
},
|
|
2174
2201
|
link: {
|
|
2175
|
-
fg: ["blue/600", "blue/
|
|
2202
|
+
fg: ["blue/600", "blue/300"]
|
|
2176
2203
|
},
|
|
2177
2204
|
muted: {
|
|
2178
2205
|
bg: ["50", "950"],
|
|
2179
|
-
fg: ["
|
|
2206
|
+
fg: ["700 70%", "300 70%"]
|
|
2180
2207
|
},
|
|
2181
2208
|
shadow: {
|
|
2182
2209
|
outline: ["500/0.3", "500/0.4"],
|
|
@@ -2186,16 +2213,22 @@ const defaultColorTokens = {
|
|
|
2186
2213
|
},
|
|
2187
2214
|
skeleton: {
|
|
2188
2215
|
from: ["100", "900"],
|
|
2189
|
-
to: ["100
|
|
2216
|
+
to: ["100 50%", "900 50%"]
|
|
2190
2217
|
}
|
|
2191
2218
|
},
|
|
2192
2219
|
transparent: {
|
|
2193
2220
|
bg: ["50", "black"],
|
|
2194
|
-
fg: ["600", "400"]
|
|
2221
|
+
fg: ["600", "400"],
|
|
2222
|
+
muted: {
|
|
2223
|
+
fg: ["600", "400"]
|
|
2224
|
+
}
|
|
2195
2225
|
},
|
|
2196
2226
|
default: {
|
|
2197
2227
|
bg: ["white", "950"],
|
|
2198
|
-
fg: ["black", "200"]
|
|
2228
|
+
fg: ["black", "200"],
|
|
2229
|
+
muted: {
|
|
2230
|
+
fg: ["600", "400"]
|
|
2231
|
+
}
|
|
2199
2232
|
},
|
|
2200
2233
|
primary: {
|
|
2201
2234
|
_hue: "blue"
|
|
@@ -2203,20 +2236,17 @@ const defaultColorTokens = {
|
|
|
2203
2236
|
positive: {
|
|
2204
2237
|
_hue: "green",
|
|
2205
2238
|
shadow: {
|
|
2206
|
-
outline: ["
|
|
2239
|
+
outline: ["500/0.4", "500/0.4"]
|
|
2207
2240
|
}
|
|
2208
2241
|
},
|
|
2209
2242
|
caution: {
|
|
2210
2243
|
_hue: "yellow",
|
|
2211
2244
|
shadow: {
|
|
2212
|
-
outline: ["600/0.3", "500/0.
|
|
2245
|
+
outline: ["600/0.3", "500/0.4"]
|
|
2213
2246
|
}
|
|
2214
2247
|
},
|
|
2215
2248
|
critical: {
|
|
2216
|
-
_hue: "red"
|
|
2217
|
-
shadow: {
|
|
2218
|
-
outline: ["500/0.3", "500/0.3"]
|
|
2219
|
-
}
|
|
2249
|
+
_hue: "red"
|
|
2220
2250
|
}
|
|
2221
2251
|
},
|
|
2222
2252
|
button: {
|
|
@@ -2225,58 +2255,77 @@ const defaultColorTokens = {
|
|
|
2225
2255
|
"*": {
|
|
2226
2256
|
_blend: ["screen", "multiply"],
|
|
2227
2257
|
accent: {
|
|
2228
|
-
fg: ["purple/
|
|
2258
|
+
fg: ["purple/300", "purple/700"]
|
|
2229
2259
|
},
|
|
2230
2260
|
badge: {
|
|
2231
2261
|
"*": {
|
|
2232
|
-
|
|
2233
|
-
|
|
2262
|
+
bg: ["900", "100"],
|
|
2263
|
+
fg: ["400", "600"],
|
|
2264
|
+
dot: ["500", "500"],
|
|
2265
|
+
icon: ["500", "500"]
|
|
2234
2266
|
}
|
|
2235
2267
|
},
|
|
2236
2268
|
bg: ["500", "400"],
|
|
2237
2269
|
border: ["500/0", "400/0"],
|
|
2238
2270
|
code: {
|
|
2239
|
-
bg: ["500
|
|
2240
|
-
fg: ["200", "
|
|
2271
|
+
bg: ["500 20%", "400 20%"],
|
|
2272
|
+
fg: ["200", "600"]
|
|
2241
2273
|
},
|
|
2242
2274
|
fg: ["white", "black"],
|
|
2243
2275
|
icon: ["200", "800"],
|
|
2244
2276
|
kbd: {
|
|
2245
|
-
bg: ["
|
|
2246
|
-
fg: ["
|
|
2277
|
+
bg: ["black", "white"],
|
|
2278
|
+
fg: ["200", "800"],
|
|
2247
2279
|
border: ["800", "200"]
|
|
2248
2280
|
},
|
|
2249
2281
|
link: {
|
|
2250
2282
|
fg: ["blue/200", "blue/700"]
|
|
2251
2283
|
},
|
|
2252
2284
|
muted: {
|
|
2253
|
-
bg: ["
|
|
2254
|
-
fg: ["
|
|
2285
|
+
bg: ["950", "50"],
|
|
2286
|
+
fg: ["100 70%", "600"]
|
|
2255
2287
|
},
|
|
2256
2288
|
skeleton: {
|
|
2257
2289
|
from: ["900", "100"],
|
|
2258
|
-
to: ["900
|
|
2290
|
+
to: ["900 50%", "100 50%"]
|
|
2259
2291
|
}
|
|
2260
2292
|
},
|
|
2261
2293
|
hovered: {
|
|
2262
|
-
bg: ["
|
|
2263
|
-
border: ["
|
|
2294
|
+
bg: ["700", "300"],
|
|
2295
|
+
border: ["700/0", "300/0"]
|
|
2264
2296
|
},
|
|
2265
2297
|
pressed: {
|
|
2266
|
-
bg: ["700", "
|
|
2298
|
+
bg: ["700", "300"]
|
|
2267
2299
|
},
|
|
2268
2300
|
selected: {
|
|
2269
|
-
bg: ["700", "
|
|
2301
|
+
bg: ["700", "300"]
|
|
2270
2302
|
},
|
|
2271
2303
|
disabled: {
|
|
2272
2304
|
_hue: "gray",
|
|
2305
|
+
badge: {
|
|
2306
|
+
"*": {
|
|
2307
|
+
bg: ["gray/700", "gray/300"],
|
|
2308
|
+
fg: ["white", "black"],
|
|
2309
|
+
dot: ["white", "black"],
|
|
2310
|
+
icon: ["white", "black"]
|
|
2311
|
+
}
|
|
2312
|
+
},
|
|
2273
2313
|
bg: ["200", "800"],
|
|
2274
|
-
icon: ["white", "black"]
|
|
2314
|
+
icon: ["white", "black"],
|
|
2315
|
+
kbd: {
|
|
2316
|
+
bg: ["black", "white"],
|
|
2317
|
+
fg: ["white", "black"],
|
|
2318
|
+
border: ["700", "300"]
|
|
2319
|
+
}
|
|
2275
2320
|
}
|
|
2276
2321
|
},
|
|
2277
2322
|
default: {
|
|
2278
2323
|
"*": {
|
|
2279
|
-
bg: ["800", "200"]
|
|
2324
|
+
bg: ["800", "200"],
|
|
2325
|
+
muted: {
|
|
2326
|
+
bg: ["950", "50"],
|
|
2327
|
+
fg: ["400", "600"]
|
|
2328
|
+
}
|
|
2280
2329
|
},
|
|
2281
2330
|
hovered: {
|
|
2282
2331
|
bg: ["900", "100"]
|
|
@@ -2287,67 +2336,46 @@ const defaultColorTokens = {
|
|
|
2287
2336
|
selected: {
|
|
2288
2337
|
bg: ["black", "white"]
|
|
2289
2338
|
}
|
|
2290
|
-
},
|
|
2291
|
-
positive: {
|
|
2292
|
-
"*": {
|
|
2293
|
-
bg: ["600", "400"]
|
|
2294
|
-
},
|
|
2295
|
-
hovered: {
|
|
2296
|
-
bg: ["700", "300"]
|
|
2297
|
-
},
|
|
2298
|
-
pressed: {
|
|
2299
|
-
bg: ["800", "200"]
|
|
2300
|
-
},
|
|
2301
|
-
selected: {
|
|
2302
|
-
bg: ["800", "200"]
|
|
2303
|
-
}
|
|
2304
|
-
},
|
|
2305
|
-
caution: {
|
|
2306
|
-
"*": {
|
|
2307
|
-
bg: ["600", "400"]
|
|
2308
|
-
},
|
|
2309
|
-
hovered: {
|
|
2310
|
-
bg: ["700", "300"]
|
|
2311
|
-
},
|
|
2312
|
-
pressed: {
|
|
2313
|
-
bg: ["800", "200"]
|
|
2314
|
-
},
|
|
2315
|
-
selected: {
|
|
2316
|
-
bg: ["800", "200"]
|
|
2317
|
-
}
|
|
2318
2339
|
}
|
|
2319
2340
|
},
|
|
2320
2341
|
ghost: {
|
|
2321
2342
|
"*": {
|
|
2322
2343
|
"*": {
|
|
2323
2344
|
_blend: ["multiply", "screen"],
|
|
2345
|
+
accent: {
|
|
2346
|
+
fg: ["purple/700 60%", "purple/300 70%"]
|
|
2347
|
+
},
|
|
2348
|
+
badge: {
|
|
2349
|
+
"*": {
|
|
2350
|
+
bg: ["100", "900"],
|
|
2351
|
+
fg: ["600", "400"],
|
|
2352
|
+
dot: ["500", "500"],
|
|
2353
|
+
icon: ["500", "500"]
|
|
2354
|
+
}
|
|
2355
|
+
},
|
|
2324
2356
|
bg: ["50", "950"],
|
|
2325
|
-
fg: ["700", "400"],
|
|
2326
|
-
icon: ["600", "500"],
|
|
2327
2357
|
border: ["100", "900"],
|
|
2328
|
-
|
|
2329
|
-
|
|
2358
|
+
code: {
|
|
2359
|
+
bg: ["500 10%", "400 10%"],
|
|
2360
|
+
fg: ["700 60%", "400 60%"]
|
|
2361
|
+
},
|
|
2362
|
+
fg: ["600", "400"],
|
|
2363
|
+
icon: ["600", "500"],
|
|
2364
|
+
kbd: {
|
|
2365
|
+
bg: ["white", "black"],
|
|
2366
|
+
fg: ["600", "400"],
|
|
2367
|
+
border: ["200", "800"]
|
|
2330
2368
|
},
|
|
2331
2369
|
link: {
|
|
2332
|
-
fg: ["blue/700
|
|
2370
|
+
fg: ["blue/700 60%", "blue/300 60%"]
|
|
2333
2371
|
},
|
|
2334
2372
|
muted: {
|
|
2335
2373
|
bg: ["100", "950"],
|
|
2336
|
-
fg: ["700
|
|
2337
|
-
},
|
|
2338
|
-
code: {
|
|
2339
|
-
bg: ["500/0.1", "400/0.1"],
|
|
2340
|
-
fg: ["700/0.6", "400/0.6"]
|
|
2374
|
+
fg: ["700 60%", "300 60%"]
|
|
2341
2375
|
},
|
|
2342
2376
|
skeleton: {
|
|
2343
2377
|
from: ["100", "900"],
|
|
2344
|
-
to: ["100
|
|
2345
|
-
},
|
|
2346
|
-
badge: {
|
|
2347
|
-
"*": {
|
|
2348
|
-
dot: ["300", "700"],
|
|
2349
|
-
icon: ["600", "400"]
|
|
2350
|
-
}
|
|
2378
|
+
to: ["100 50%", "900 50%"]
|
|
2351
2379
|
}
|
|
2352
2380
|
},
|
|
2353
2381
|
hovered: {
|
|
@@ -2364,32 +2392,46 @@ const defaultColorTokens = {
|
|
|
2364
2392
|
},
|
|
2365
2393
|
disabled: {
|
|
2366
2394
|
_hue: "gray",
|
|
2367
|
-
|
|
2368
|
-
|
|
2395
|
+
accent: {
|
|
2396
|
+
fg: ["200", "800"]
|
|
2397
|
+
},
|
|
2398
|
+
badge: {
|
|
2399
|
+
"*": {
|
|
2400
|
+
_hue: "gray",
|
|
2401
|
+
bg: ["50", "950"],
|
|
2402
|
+
fg: ["gray/200", "gray/800"],
|
|
2403
|
+
dot: ["gray/200", "gray/800"],
|
|
2404
|
+
icon: ["gray/200", "gray/800"]
|
|
2405
|
+
}
|
|
2406
|
+
},
|
|
2369
2407
|
border: ["100", "900"],
|
|
2370
|
-
|
|
2371
|
-
|
|
2408
|
+
code: {
|
|
2409
|
+
bg: ["50", "950"],
|
|
2410
|
+
fg: ["200", "800"]
|
|
2372
2411
|
},
|
|
2373
|
-
|
|
2374
|
-
|
|
2412
|
+
fg: ["200", "800"],
|
|
2413
|
+
icon: ["200", "800"],
|
|
2414
|
+
kbd: {
|
|
2415
|
+
bg: ["white", "black"],
|
|
2416
|
+
fg: ["200", "800"],
|
|
2417
|
+
border: ["100", "900"]
|
|
2375
2418
|
},
|
|
2376
2419
|
link: {
|
|
2377
|
-
fg: ["200
|
|
2420
|
+
fg: ["200", "800"]
|
|
2378
2421
|
},
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
fg: ["200/0.6", "900/0.6"]
|
|
2422
|
+
muted: {
|
|
2423
|
+
fg: ["200", "800"]
|
|
2382
2424
|
}
|
|
2383
2425
|
}
|
|
2384
2426
|
},
|
|
2385
2427
|
positive: {
|
|
2386
2428
|
"*": {
|
|
2387
|
-
border: ["600
|
|
2429
|
+
border: ["600 20%", "800"]
|
|
2388
2430
|
}
|
|
2389
2431
|
},
|
|
2390
2432
|
caution: {
|
|
2391
2433
|
"*": {
|
|
2392
|
-
border: ["600
|
|
2434
|
+
border: ["600 20%", "800"]
|
|
2393
2435
|
}
|
|
2394
2436
|
}
|
|
2395
2437
|
},
|
|
@@ -2397,65 +2439,86 @@ const defaultColorTokens = {
|
|
|
2397
2439
|
"*": {
|
|
2398
2440
|
"*": {
|
|
2399
2441
|
_blend: ["multiply", "screen"],
|
|
2442
|
+
accent: {
|
|
2443
|
+
fg: ["purple/700 70%", "purple/300 70%"]
|
|
2444
|
+
},
|
|
2445
|
+
badge: {
|
|
2446
|
+
"*": {
|
|
2447
|
+
bg: ["100", "900"],
|
|
2448
|
+
fg: ["600", "400"],
|
|
2449
|
+
dot: ["500", "500"],
|
|
2450
|
+
icon: ["500", "500"]
|
|
2451
|
+
}
|
|
2452
|
+
},
|
|
2400
2453
|
bg: ["white", "black"],
|
|
2401
|
-
fg: ["700", "300"],
|
|
2402
|
-
icon: ["700/0.7", "300/0.7"],
|
|
2403
2454
|
border: ["white/0", "black/0"],
|
|
2404
|
-
|
|
2455
|
+
code: {
|
|
2405
2456
|
bg: ["100", "950"],
|
|
2406
|
-
fg: ["
|
|
2457
|
+
fg: ["600", "300"]
|
|
2407
2458
|
},
|
|
2408
|
-
|
|
2409
|
-
|
|
2459
|
+
fg: ["700", "300"],
|
|
2460
|
+
icon: ["700 70%", "300 70%"],
|
|
2461
|
+
kbd: {
|
|
2462
|
+
bg: ["white", "black"],
|
|
2463
|
+
fg: ["600", "400"],
|
|
2464
|
+
border: ["200", "800"]
|
|
2410
2465
|
},
|
|
2411
2466
|
link: {
|
|
2412
|
-
fg: ["blue/700
|
|
2467
|
+
fg: ["blue/700 70%", "blue/300 70%"]
|
|
2413
2468
|
},
|
|
2414
|
-
|
|
2469
|
+
muted: {
|
|
2415
2470
|
bg: ["100", "950"],
|
|
2416
|
-
fg: ["
|
|
2471
|
+
fg: ["700 70%", "300 70%"]
|
|
2417
2472
|
},
|
|
2418
2473
|
skeleton: {
|
|
2419
2474
|
from: ["100", "900"],
|
|
2420
|
-
to: ["100
|
|
2421
|
-
},
|
|
2422
|
-
badge: {
|
|
2423
|
-
"*": {
|
|
2424
|
-
dot: ["300", "700"],
|
|
2425
|
-
icon: ["600", "400"]
|
|
2426
|
-
}
|
|
2475
|
+
to: ["100 50%", "900 50%"]
|
|
2427
2476
|
}
|
|
2428
2477
|
},
|
|
2429
2478
|
hovered: {
|
|
2430
2479
|
bg: ["50", "950"],
|
|
2431
2480
|
fg: ["700", "300"],
|
|
2432
|
-
icon: ["700
|
|
2481
|
+
icon: ["700 70%", "400 70%"]
|
|
2433
2482
|
},
|
|
2434
2483
|
pressed: {
|
|
2435
2484
|
bg: ["100", "900"],
|
|
2436
2485
|
fg: ["800", "200"],
|
|
2437
|
-
icon: ["800
|
|
2486
|
+
icon: ["800 70%", "200 70%"]
|
|
2438
2487
|
},
|
|
2439
2488
|
selected: {
|
|
2440
2489
|
bg: ["100", "900"],
|
|
2441
2490
|
fg: ["800", "200"],
|
|
2442
|
-
icon: ["800
|
|
2491
|
+
icon: ["800 60%", "200 60%"]
|
|
2443
2492
|
},
|
|
2444
2493
|
disabled: {
|
|
2445
2494
|
_hue: "gray",
|
|
2495
|
+
badge: {
|
|
2496
|
+
"*": {
|
|
2497
|
+
_hue: "gray",
|
|
2498
|
+
bg: ["50", "950"],
|
|
2499
|
+
fg: ["gray/200", "gray/800"],
|
|
2500
|
+
dot: ["gray/200", "gray/800"],
|
|
2501
|
+
icon: ["gray/200", "gray/800"]
|
|
2502
|
+
}
|
|
2503
|
+
},
|
|
2446
2504
|
fg: ["200", "800"],
|
|
2447
2505
|
muted: {
|
|
2448
|
-
fg: ["200
|
|
2506
|
+
fg: ["200", "800"]
|
|
2449
2507
|
},
|
|
2450
2508
|
accent: {
|
|
2451
|
-
fg: ["200
|
|
2509
|
+
fg: ["200", "800"]
|
|
2510
|
+
},
|
|
2511
|
+
kbd: {
|
|
2512
|
+
bg: ["white", "black"],
|
|
2513
|
+
fg: ["200", "800"],
|
|
2514
|
+
border: ["100", "900"]
|
|
2452
2515
|
},
|
|
2453
2516
|
link: {
|
|
2454
|
-
fg: ["200
|
|
2517
|
+
fg: ["200", "800"]
|
|
2455
2518
|
},
|
|
2456
2519
|
code: {
|
|
2457
|
-
bg: ["50
|
|
2458
|
-
fg: ["200
|
|
2520
|
+
bg: ["50", "950"],
|
|
2521
|
+
fg: ["200", "800"]
|
|
2459
2522
|
}
|
|
2460
2523
|
}
|
|
2461
2524
|
}
|
|
@@ -2471,14 +2534,14 @@ const defaultColorTokens = {
|
|
|
2471
2534
|
muted: {
|
|
2472
2535
|
bg: ["50", "950"]
|
|
2473
2536
|
},
|
|
2474
|
-
placeholder: ["400", "600
|
|
2537
|
+
placeholder: ["400", "600 50%"]
|
|
2475
2538
|
},
|
|
2476
2539
|
hovered: {
|
|
2477
|
-
border: ["300", "
|
|
2540
|
+
border: ["300", "700"]
|
|
2478
2541
|
},
|
|
2479
2542
|
readOnly: {
|
|
2480
|
-
|
|
2481
|
-
|
|
2543
|
+
bg: ["50", "950"],
|
|
2544
|
+
border: ["200", "800"],
|
|
2482
2545
|
fg: ["800", "200"]
|
|
2483
2546
|
},
|
|
2484
2547
|
disabled: {
|
|
@@ -2499,16 +2562,21 @@ const defaultColorTokens = {
|
|
|
2499
2562
|
_blend: ["multiply", "screen"],
|
|
2500
2563
|
bg: ["white", "black"],
|
|
2501
2564
|
fg: ["800", "200"],
|
|
2502
|
-
icon: ["700
|
|
2565
|
+
icon: ["700 70%", "300 70%"],
|
|
2503
2566
|
avatar: {
|
|
2504
2567
|
"*": {
|
|
2505
2568
|
_blend: ["screen", "multiply"],
|
|
2506
2569
|
bg: ["500", "400"],
|
|
2507
2570
|
fg: ["white", "black"]
|
|
2508
2571
|
}
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2572
|
+
},
|
|
2573
|
+
badge: {
|
|
2574
|
+
"*": {
|
|
2575
|
+
bg: ["100", "900"],
|
|
2576
|
+
fg: ["600", "400"],
|
|
2577
|
+
dot: ["500", "500"],
|
|
2578
|
+
icon: ["500", "500"]
|
|
2579
|
+
}
|
|
2512
2580
|
},
|
|
2513
2581
|
border: ["200", "800"],
|
|
2514
2582
|
muted: {
|
|
@@ -2518,31 +2586,21 @@ const defaultColorTokens = {
|
|
|
2518
2586
|
accent: {
|
|
2519
2587
|
fg: ["purple/600", "purple/400"]
|
|
2520
2588
|
},
|
|
2589
|
+
kbd: {
|
|
2590
|
+
bg: ["white", "black"],
|
|
2591
|
+
fg: ["600", "400"],
|
|
2592
|
+
border: ["200", "800"]
|
|
2593
|
+
},
|
|
2521
2594
|
link: {
|
|
2522
2595
|
fg: ["blue/700", "blue/300"]
|
|
2523
2596
|
},
|
|
2524
2597
|
code: {
|
|
2525
|
-
bg: ["
|
|
2598
|
+
bg: ["50", "950"],
|
|
2526
2599
|
fg: ["700", "300"]
|
|
2527
2600
|
},
|
|
2528
2601
|
skeleton: {
|
|
2529
2602
|
from: ["100", "900"],
|
|
2530
|
-
to: ["100
|
|
2531
|
-
},
|
|
2532
|
-
badge: {
|
|
2533
|
-
"*": {
|
|
2534
|
-
// _blend: ['multiply', 'screen'],
|
|
2535
|
-
bg: ["100", "900"],
|
|
2536
|
-
fg: ["600", "200"],
|
|
2537
|
-
dot: ["300", "700"],
|
|
2538
|
-
icon: ["600", "400"]
|
|
2539
|
-
}
|
|
2540
|
-
},
|
|
2541
|
-
kbd: {
|
|
2542
|
-
// _blend: ['multiply', 'screen'],
|
|
2543
|
-
bg: ["white", "black"],
|
|
2544
|
-
fg: ["600", "400"],
|
|
2545
|
-
border: ["200", "800"]
|
|
2603
|
+
to: ["100 50%", "900 50%"]
|
|
2546
2604
|
}
|
|
2547
2605
|
},
|
|
2548
2606
|
hovered: {
|
|
@@ -2562,22 +2620,18 @@ const defaultColorTokens = {
|
|
|
2562
2620
|
bg: ["white", "black"],
|
|
2563
2621
|
fg: ["black", "white"]
|
|
2564
2622
|
}
|
|
2565
|
-
// magenta: {_hue: 'green'},
|
|
2566
|
-
// yellow: {bg: ['600', '400']},
|
|
2567
|
-
// green: {bg: ['600', '400']},
|
|
2568
|
-
// cyan: {bg: ['600', '400']},
|
|
2569
2623
|
},
|
|
2570
2624
|
badge: {
|
|
2571
2625
|
"*": {
|
|
2572
|
-
// _blend: ['multiply', 'screen'],
|
|
2573
|
-
// _blend: ['screen', 'multiply'],
|
|
2574
2626
|
bg: ["700", "300"],
|
|
2575
|
-
fg: ["white", "black"]
|
|
2627
|
+
fg: ["white", "black"],
|
|
2628
|
+
dot: ["300", "700"],
|
|
2629
|
+
icon: ["300", "700"]
|
|
2576
2630
|
}
|
|
2577
2631
|
},
|
|
2578
|
-
border: ["500
|
|
2632
|
+
border: ["500 20%", "400 20%"],
|
|
2579
2633
|
muted: {
|
|
2580
|
-
bg: ["
|
|
2634
|
+
bg: ["950", "50"],
|
|
2581
2635
|
fg: ["200", "800"]
|
|
2582
2636
|
},
|
|
2583
2637
|
accent: {
|
|
@@ -2592,88 +2646,78 @@ const defaultColorTokens = {
|
|
|
2592
2646
|
fg: ["blue/200", "blue/800"]
|
|
2593
2647
|
},
|
|
2594
2648
|
code: {
|
|
2595
|
-
bg: ["500
|
|
2596
|
-
fg: ["
|
|
2649
|
+
bg: ["500 20%", "400 20%"],
|
|
2650
|
+
fg: ["300", "700"]
|
|
2597
2651
|
},
|
|
2598
2652
|
skeleton: {
|
|
2599
2653
|
from: ["900", "100"],
|
|
2600
|
-
to: ["900
|
|
2654
|
+
to: ["900 50%", "100 50%"]
|
|
2601
2655
|
}
|
|
2602
|
-
// badge: {
|
|
2603
|
-
// '*': {
|
|
2604
|
-
// _blend: ['multiply', 'screen'],
|
|
2605
|
-
// bg: ['900', '100'],
|
|
2606
|
-
// fg: ['white', 'black'],
|
|
2607
|
-
// dot: ['700', '300'],
|
|
2608
|
-
// icon: ['400', '600'],
|
|
2609
|
-
// },
|
|
2610
|
-
// },
|
|
2611
2656
|
},
|
|
2612
2657
|
disabled: {
|
|
2613
2658
|
fg: ["200", "800"],
|
|
2614
2659
|
icon: ["200", "800"],
|
|
2615
2660
|
muted: {
|
|
2616
|
-
fg: ["200", "800
|
|
2661
|
+
fg: ["200", "800"]
|
|
2617
2662
|
},
|
|
2618
2663
|
accent: {
|
|
2619
|
-
fg: ["purple/200", "purple/800
|
|
2664
|
+
fg: ["purple/200", "purple/800"]
|
|
2620
2665
|
},
|
|
2621
2666
|
link: {
|
|
2622
|
-
fg: ["blue/200", "blue/800
|
|
2667
|
+
fg: ["blue/200", "blue/800"]
|
|
2623
2668
|
},
|
|
2624
2669
|
code: {
|
|
2625
|
-
bg: ["
|
|
2626
|
-
fg: ["200", "800
|
|
2670
|
+
bg: ["50", "950"],
|
|
2671
|
+
fg: ["200", "800"]
|
|
2627
2672
|
}
|
|
2628
2673
|
}
|
|
2629
2674
|
},
|
|
2630
2675
|
default: {
|
|
2631
2676
|
selected: {
|
|
2632
2677
|
_hue: "blue"
|
|
2633
|
-
// bg: ['500', '400'],
|
|
2634
2678
|
}
|
|
2635
2679
|
},
|
|
2636
2680
|
critical: {
|
|
2637
2681
|
disabled: {
|
|
2638
|
-
bg: ["50
|
|
2682
|
+
bg: ["50 50%", "950 50%"]
|
|
2639
2683
|
}
|
|
2640
2684
|
}
|
|
2641
2685
|
},
|
|
2642
2686
|
syntax: {
|
|
2643
|
-
atrule: ["purple/
|
|
2644
|
-
attrName: ["green/
|
|
2645
|
-
attrValue: ["yellow/
|
|
2646
|
-
attribute: ["yellow/
|
|
2647
|
-
boolean: ["purple/
|
|
2648
|
-
builtin: ["purple/
|
|
2649
|
-
cdata: ["yellow/
|
|
2650
|
-
char: ["yellow/
|
|
2651
|
-
class: ["orange/
|
|
2652
|
-
className: ["cyan/
|
|
2653
|
-
comment: ["gray/
|
|
2654
|
-
constant: ["purple/
|
|
2655
|
-
deleted: ["red/
|
|
2656
|
-
entity: ["red/
|
|
2657
|
-
function: ["green/
|
|
2658
|
-
hexcode: ["blue/
|
|
2659
|
-
id: ["purple/
|
|
2660
|
-
important: ["purple/
|
|
2661
|
-
inserted: ["yellow/
|
|
2662
|
-
keyword: ["magenta/
|
|
2663
|
-
number: ["purple/
|
|
2664
|
-
operator: ["magenta/
|
|
2665
|
-
property: ["blue/
|
|
2666
|
-
pseudoClass: ["yellow/
|
|
2667
|
-
pseudoElement: ["yellow/
|
|
2668
|
-
punctuation: ["gray/
|
|
2669
|
-
regex: ["blue/
|
|
2670
|
-
selector: ["red/
|
|
2671
|
-
string: ["yellow/
|
|
2672
|
-
symbol: ["purple/
|
|
2673
|
-
tag: ["red/
|
|
2674
|
-
unit: ["orange/
|
|
2675
|
-
url: ["red/
|
|
2676
|
-
variable: ["red/
|
|
2687
|
+
atrule: ["purple/600", "purple/400"],
|
|
2688
|
+
attrName: ["green/600", "green/400"],
|
|
2689
|
+
attrValue: ["yellow/600", "yellow/400"],
|
|
2690
|
+
attribute: ["yellow/600", "yellow/400"],
|
|
2691
|
+
boolean: ["purple/600", "purple/400"],
|
|
2692
|
+
builtin: ["purple/600", "purple/400"],
|
|
2693
|
+
cdata: ["yellow/600", "yellow/400"],
|
|
2694
|
+
char: ["yellow/600", "yellow/400"],
|
|
2695
|
+
class: ["orange/600", "orange/400"],
|
|
2696
|
+
className: ["cyan/600", "cyan/400"],
|
|
2697
|
+
comment: ["gray/400", "gray/600"],
|
|
2698
|
+
constant: ["purple/600", "purple/400"],
|
|
2699
|
+
deleted: ["red/600", "red/400"],
|
|
2700
|
+
entity: ["red/600", "red/400"],
|
|
2701
|
+
function: ["green/600", "green/400"],
|
|
2702
|
+
hexcode: ["blue/600", "blue/400"],
|
|
2703
|
+
id: ["purple/600", "purple/400"],
|
|
2704
|
+
important: ["purple/600", "purple/400"],
|
|
2705
|
+
inserted: ["yellow/600", "yellow/400"],
|
|
2706
|
+
keyword: ["magenta/600", "magenta/400"],
|
|
2707
|
+
number: ["purple/600", "purple/400"],
|
|
2708
|
+
operator: ["magenta/600", "magenta/400"],
|
|
2709
|
+
property: ["blue/600", "blue/400"],
|
|
2710
|
+
pseudoClass: ["yellow/600", "yellow/400"],
|
|
2711
|
+
pseudoElement: ["yellow/600", "yellow/400"],
|
|
2712
|
+
punctuation: ["gray/600", "gray/400"],
|
|
2713
|
+
regex: ["blue/600", "blue/400"],
|
|
2714
|
+
selector: ["red/600", "red/400"],
|
|
2715
|
+
string: ["yellow/600", "yellow/400"],
|
|
2716
|
+
symbol: ["purple/600", "purple/400"],
|
|
2717
|
+
tag: ["red/600", "red/400"],
|
|
2718
|
+
unit: ["orange/600", "orange/400"],
|
|
2719
|
+
url: ["red/600", "red/400"],
|
|
2720
|
+
variable: ["red/600", "red/400"]
|
|
2677
2721
|
}
|
|
2678
2722
|
};
|
|
2679
2723
|
function isRecord(value) {
|
|
@@ -3812,8 +3856,13 @@ function renderColorValue(str, options) {
|
|
|
3812
3856
|
};
|
|
3813
3857
|
try {
|
|
3814
3858
|
hex = mixThemeColor(hex, mixOptions);
|
|
3859
|
+
if (bg && node.mix !== void 0) {
|
|
3860
|
+
const from = hexToRgb(bg);
|
|
3861
|
+
const to = hexToRgb(hex);
|
|
3862
|
+
hex = rgbToHex(mix(from, to, node.mix));
|
|
3863
|
+
}
|
|
3815
3864
|
} catch (err) {
|
|
3816
|
-
console.
|
|
3865
|
+
console.warn("could not blend", hex, mixOptions);
|
|
3817
3866
|
throw err;
|
|
3818
3867
|
}
|
|
3819
3868
|
if (hex === "#aN") {
|
|
@@ -4065,10 +4114,9 @@ function renderThemeColorBadgeColor(value, options) {
|
|
|
4065
4114
|
colorPalette
|
|
4066
4115
|
};
|
|
4067
4116
|
return {
|
|
4068
|
-
// _blend: blendMode,
|
|
4069
4117
|
bg,
|
|
4070
|
-
fg: renderColorValue(value.fg, colorOptions),
|
|
4071
4118
|
dot: renderColorValue(value.dot, colorOptions),
|
|
4119
|
+
fg: renderColorValue(value.fg, colorOptions),
|
|
4072
4120
|
icon: renderColorValue(value.icon, colorOptions)
|
|
4073
4121
|
};
|
|
4074
4122
|
}
|
|
@@ -4127,7 +4175,7 @@ function renderThemeColorState(value, options) {
|
|
|
4127
4175
|
blendMode
|
|
4128
4176
|
}),
|
|
4129
4177
|
badge: renderThemeColorBadge(value.badge, {
|
|
4130
|
-
baseBg,
|
|
4178
|
+
baseBg: bg,
|
|
4131
4179
|
colorPalette,
|
|
4132
4180
|
blendMode
|
|
4133
4181
|
}),
|
|
@@ -4335,7 +4383,6 @@ function _setCachedTheme(rootTheme, scheme, tone, theme) {
|
|
|
4335
4383
|
const toneCache = schemeCache.get(tone);
|
|
4336
4384
|
toneCache.set(rootTheme, theme);
|
|
4337
4385
|
}
|
|
4338
|
-
const defaultTheme = buildTheme();
|
|
4339
4386
|
exports.COLOR_CONFIG_AVATAR_COLORS = COLOR_CONFIG_AVATAR_COLORS;
|
|
4340
4387
|
exports.COLOR_CONFIG_BLEND_KEYS = COLOR_CONFIG_BLEND_KEYS;
|
|
4341
4388
|
exports.COLOR_CONFIG_CARD_KEYS = COLOR_CONFIG_CARD_KEYS;
|
|
@@ -4351,11 +4398,11 @@ exports.THEME_COLOR_BUTTON_MODES = THEME_COLOR_BUTTON_MODES;
|
|
|
4351
4398
|
exports.THEME_COLOR_CARD_TONES = THEME_COLOR_CARD_TONES;
|
|
4352
4399
|
exports.THEME_COLOR_INPUT_MODES = THEME_COLOR_INPUT_MODES;
|
|
4353
4400
|
exports.THEME_COLOR_INPUT_STATES = THEME_COLOR_INPUT_STATES;
|
|
4401
|
+
exports.THEME_COLOR_SCHEMES = THEME_COLOR_SCHEMES;
|
|
4354
4402
|
exports.THEME_COLOR_STATES = THEME_COLOR_STATES;
|
|
4355
4403
|
exports.THEME_COLOR_STATE_TONES = THEME_COLOR_STATE_TONES;
|
|
4356
4404
|
exports.buildTheme = buildTheme;
|
|
4357
4405
|
exports.createColorTheme = createColorTheme;
|
|
4358
|
-
exports.defaultTheme = defaultTheme;
|
|
4359
4406
|
exports.getContrastRatio = getContrastRatio;
|
|
4360
4407
|
exports.getScopedTheme = getScopedTheme;
|
|
4361
4408
|
exports.getTheme_v2 = getTheme_v2;
|