@sanity/ui 2.0.0-beta.2 → 2.0.0-beta.21
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 +247 -267
- package/dist/index.esm.js +477 -326
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +486 -539
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs.mjs +1 -1
- package/dist/theme.d.ts +87 -115
- package/dist/theme.esm.js +348 -290
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +348 -290
- package/dist/theme.js.map +1 -1
- package/package.json +6 -3
- package/src/core/__workshop__/fontsPlugin.tsx +48 -8
- package/src/core/_compat.ts +236 -87
- package/src/core/components/dialog/dialog.tsx +1 -1
- package/src/core/components/dialog/styles.ts +2 -2
- package/src/core/components/menu/__workshop__/selectedItem.tsx +7 -2
- package/src/core/components/menu/menuButton.tsx +12 -1
- package/src/core/components/toast/toast.tsx +17 -2
- package/src/core/components/toast/toastProvider.tsx +20 -3
- package/src/core/constants.ts +37 -0
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +6 -3
- package/src/core/middleware/origin.ts +47 -0
- package/src/core/primitives/badge/badge.tsx +1 -3
- package/src/core/primitives/button/button.tsx +9 -11
- package/src/core/primitives/heading/styles.ts +4 -0
- 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 +31 -15
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/switch/styles.ts +6 -1
- package/src/core/primitives/textInput/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/states.tsx +10 -2
- package/src/core/primitives/tooltip/tooltip.tsx +46 -56
- package/src/core/primitives/tooltip/tooltipCard.tsx +110 -0
- package/src/core/styles/card/_cardColorStyle.ts +2 -0
- package/src/core/styles/input/textInputStyle.ts +33 -2
- 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 +196 -0
- package/src/core/theme/__workshop__/index.ts +5 -0
- package/src/core/theme/theme.test.tsx +2 -2
- 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.test.ts +2 -2
- 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 +279 -253
- package/src/theme/defaults/config.ts +2 -2
- package/src/theme/getScopedTheme.ts +1 -0
- 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 +11 -1
- 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/color.ts +0 -1
- 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/getTheme_v2.ts +2 -1
- package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
- package/src/theme/versioning/v2_v0.ts +3 -2
- package/src/theme/build/colorToken.ts +0 -39
package/dist/theme.esm.js
CHANGED
|
@@ -1200,7 +1200,7 @@ const defaultThemeConfig = {
|
|
|
1200
1200
|
outline: OUTLINE_WIDTH
|
|
1201
1201
|
}
|
|
1202
1202
|
},
|
|
1203
|
-
container: [
|
|
1203
|
+
container: [320, 640, 960, 1280, 1600, 1920],
|
|
1204
1204
|
media: [360, 600, 900, 1200, 1800, 2400],
|
|
1205
1205
|
layer: {
|
|
1206
1206
|
dialog: {
|
|
@@ -1258,7 +1258,7 @@ const defaultThemeConfig = {
|
|
|
1258
1258
|
switch: {
|
|
1259
1259
|
width: 25,
|
|
1260
1260
|
height: 17,
|
|
1261
|
-
padding:
|
|
1261
|
+
padding: 5,
|
|
1262
1262
|
transitionDurationMs: 150,
|
|
1263
1263
|
transitionTimingFunction: "ease-out",
|
|
1264
1264
|
focusRing: {
|
|
@@ -1682,12 +1682,13 @@ function inputStateThemeColor_v0_v2(state) {
|
|
|
1682
1682
|
}
|
|
1683
1683
|
const cache$3 = /* @__PURE__ */new WeakMap();
|
|
1684
1684
|
function getTheme_v2(theme) {
|
|
1685
|
-
var _a;
|
|
1686
|
-
if (theme.sanity.v2) return theme.sanity.v2;
|
|
1685
|
+
var _a, _b;
|
|
1686
|
+
if ((_a = theme.sanity.v2) == null ? void 0 : _a._resolved) return theme.sanity.v2;
|
|
1687
1687
|
const cached_v2 = cache$3.get(theme);
|
|
1688
1688
|
if (cached_v2) return cached_v2;
|
|
1689
1689
|
const v2 = {
|
|
1690
1690
|
_version: 2,
|
|
1691
|
+
_resolved: true,
|
|
1691
1692
|
avatar: {
|
|
1692
1693
|
...defaultThemeConfig.avatar,
|
|
1693
1694
|
...theme.sanity.avatar
|
|
@@ -1716,7 +1717,7 @@ function getTheme_v2(theme) {
|
|
|
1716
1717
|
...theme.sanity.input.switch
|
|
1717
1718
|
}
|
|
1718
1719
|
},
|
|
1719
|
-
layer: (
|
|
1720
|
+
layer: (_b = theme.sanity.layer) != null ? _b : defaultThemeConfig.layer,
|
|
1720
1721
|
media: theme.sanity.media,
|
|
1721
1722
|
radius: theme.sanity.radius,
|
|
1722
1723
|
shadow: theme.sanity.shadows,
|
|
@@ -1885,6 +1886,7 @@ function themeColor_v2_v0(color_v2) {
|
|
|
1885
1886
|
...color_v2.button.default,
|
|
1886
1887
|
transparent: color_v2.button.default.default
|
|
1887
1888
|
},
|
|
1889
|
+
selectable: color_v2.selectable,
|
|
1888
1890
|
spot: {
|
|
1889
1891
|
gray: color_v2.avatar.gray.bg,
|
|
1890
1892
|
blue: color_v2.avatar.blue.bg,
|
|
@@ -1916,13 +1918,10 @@ function inputStateThemeColor_v2_v0(t) {
|
|
|
1916
1918
|
placeholder: t.placeholder
|
|
1917
1919
|
};
|
|
1918
1920
|
}
|
|
1921
|
+
const THEME_COLOR_SCHEMES = ["light", "dark"];
|
|
1919
1922
|
const THEME_COLOR_BLEND_MODES = ["multiply", "screen"];
|
|
1920
|
-
const THEME_COLOR_CARD_TONES = ["transparent", "default", "primary",
|
|
1921
|
-
|
|
1922
|
-
"positive", "caution", "critical"];
|
|
1923
|
-
const THEME_COLOR_STATE_TONES = ["default", "primary",
|
|
1924
|
-
// todo: rename to `accent` in the next breaking major version
|
|
1925
|
-
"positive", "caution", "critical"];
|
|
1923
|
+
const THEME_COLOR_CARD_TONES = ["transparent", "default", "primary", "positive", "caution", "critical"];
|
|
1924
|
+
const THEME_COLOR_STATE_TONES = ["default", "primary", "positive", "caution", "critical"];
|
|
1926
1925
|
const THEME_COLOR_STATES = ["enabled", "hovered", "pressed", "selected", "disabled"];
|
|
1927
1926
|
const THEME_COLOR_BUTTON_MODES = ["default", "ghost", "bleed"];
|
|
1928
1927
|
const THEME_COLOR_INPUT_MODES = ["default", "invalid"];
|
|
@@ -1996,12 +1995,24 @@ function parseTokenKey(str) {
|
|
|
1996
1995
|
}
|
|
1997
1996
|
return void 0;
|
|
1998
1997
|
}
|
|
1998
|
+
function isColorMixPercentValue(str) {
|
|
1999
|
+
return /^\d+%$/.test(str);
|
|
2000
|
+
}
|
|
1999
2001
|
function parseTokenValue(str) {
|
|
2000
2002
|
const segments = str.split("/");
|
|
2001
|
-
|
|
2003
|
+
let nextSegment = segments.shift() || "";
|
|
2004
|
+
const [segment0, segment0mix] = nextSegment.split(" ");
|
|
2002
2005
|
if (isColorTintKey(segment0)) {
|
|
2003
2006
|
const tint = segment0;
|
|
2004
2007
|
const segment1 = segments.shift() || "";
|
|
2008
|
+
if (isColorMixPercentValue(segment0mix)) {
|
|
2009
|
+
const mix = Number(segment0mix.slice(0, -1)) / 100;
|
|
2010
|
+
return {
|
|
2011
|
+
type: "color",
|
|
2012
|
+
tint,
|
|
2013
|
+
mix
|
|
2014
|
+
};
|
|
2015
|
+
}
|
|
2005
2016
|
if (isColorOpacityValue(segment1)) {
|
|
2006
2017
|
const opacity = Number(segment1);
|
|
2007
2018
|
return {
|
|
@@ -2018,6 +2029,14 @@ function parseTokenValue(str) {
|
|
|
2018
2029
|
if (isColorValue(segment0)) {
|
|
2019
2030
|
const key = segment0;
|
|
2020
2031
|
const segment1 = segments.shift() || "";
|
|
2032
|
+
if (isColorMixPercentValue(segment0mix)) {
|
|
2033
|
+
const mix = Number(segment0mix.slice(0, -1)) / 100;
|
|
2034
|
+
return {
|
|
2035
|
+
type: "color",
|
|
2036
|
+
key,
|
|
2037
|
+
mix
|
|
2038
|
+
};
|
|
2039
|
+
}
|
|
2021
2040
|
if (isColorOpacityValue(segment1)) {
|
|
2022
2041
|
const opacity = Number(segment1);
|
|
2023
2042
|
return {
|
|
@@ -2033,15 +2052,24 @@ function parseTokenValue(str) {
|
|
|
2033
2052
|
}
|
|
2034
2053
|
if (isColorHueKey(segment0)) {
|
|
2035
2054
|
const hue = segment0;
|
|
2036
|
-
|
|
2055
|
+
nextSegment = segments.shift() || "";
|
|
2056
|
+
const [segment1, segment1mix] = nextSegment.split(" ");
|
|
2037
2057
|
if (isColorTintKey(segment1)) {
|
|
2038
2058
|
const tint = segment1;
|
|
2039
2059
|
const segment2 = segments.shift() || "";
|
|
2060
|
+
if (isColorMixPercentValue(segment1mix)) {
|
|
2061
|
+
const mix = Number(segment1mix.slice(0, -1)) / 100;
|
|
2062
|
+
return {
|
|
2063
|
+
type: "color",
|
|
2064
|
+
hue,
|
|
2065
|
+
tint,
|
|
2066
|
+
mix
|
|
2067
|
+
};
|
|
2068
|
+
}
|
|
2040
2069
|
if (isColorOpacityValue(segment2)) {
|
|
2041
2070
|
const opacity = Number(segment2);
|
|
2042
2071
|
return {
|
|
2043
2072
|
type: "color",
|
|
2044
|
-
key: "".concat(hue, "/").concat(tint),
|
|
2045
2073
|
hue,
|
|
2046
2074
|
tint,
|
|
2047
2075
|
opacity
|
|
@@ -2049,21 +2077,13 @@ function parseTokenValue(str) {
|
|
|
2049
2077
|
}
|
|
2050
2078
|
return {
|
|
2051
2079
|
type: "color",
|
|
2052
|
-
key: "".concat(hue, "/").concat(tint),
|
|
2053
2080
|
hue,
|
|
2054
2081
|
tint
|
|
2055
2082
|
};
|
|
2056
2083
|
}
|
|
2057
2084
|
return {
|
|
2058
2085
|
type: "hue",
|
|
2059
|
-
value:
|
|
2060
|
-
};
|
|
2061
|
-
}
|
|
2062
|
-
if (isColorOpacityValue(segment0)) {
|
|
2063
|
-
const opacity = Number(segment0);
|
|
2064
|
-
return {
|
|
2065
|
-
type: "color",
|
|
2066
|
-
opacity
|
|
2086
|
+
value: hue
|
|
2067
2087
|
};
|
|
2068
2088
|
}
|
|
2069
2089
|
if (isColorBlendModeValue(segment0)) {
|
|
@@ -2100,6 +2120,21 @@ function isColorValue(str) {
|
|
|
2100
2120
|
function isColorOpacityValue(str) {
|
|
2101
2121
|
return str === "0" || /^0\.[0-9]+$/.test(str) || str === "1";
|
|
2102
2122
|
}
|
|
2123
|
+
function compileColorTokenValue(node) {
|
|
2124
|
+
let key = "";
|
|
2125
|
+
if (node.key === "black" || node.key === "white") {
|
|
2126
|
+
key = node.key;
|
|
2127
|
+
} else {
|
|
2128
|
+
key = "".concat(node.hue, "/").concat(node.tint);
|
|
2129
|
+
}
|
|
2130
|
+
if (node.mix !== void 0) {
|
|
2131
|
+
return "".concat(key, " ").concat(node.mix * 100, "%");
|
|
2132
|
+
}
|
|
2133
|
+
if (node.opacity !== void 0) {
|
|
2134
|
+
key += "/".concat(node.opacity);
|
|
2135
|
+
}
|
|
2136
|
+
return key;
|
|
2137
|
+
}
|
|
2103
2138
|
const DEFAULT_COLOR_TOKEN_VALUE = ["500", "500"];
|
|
2104
2139
|
function resolveColorTokenValue(context) {
|
|
2105
2140
|
let value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_COLOR_TOKEN_VALUE;
|
|
@@ -2116,51 +2151,35 @@ function resolveColorTokenValue(context) {
|
|
|
2116
2151
|
hue: node.hue || hue
|
|
2117
2152
|
});
|
|
2118
2153
|
}
|
|
2119
|
-
function compileColorTokenValue(node) {
|
|
2120
|
-
let key = "";
|
|
2121
|
-
if (node.key === "black" || node.key === "white") {
|
|
2122
|
-
key = node.key;
|
|
2123
|
-
} else {
|
|
2124
|
-
key = "".concat(node.hue, "/").concat(node.tint);
|
|
2125
|
-
}
|
|
2126
|
-
if (node.opacity !== void 0) {
|
|
2127
|
-
key += "/".concat(node.opacity);
|
|
2128
|
-
}
|
|
2129
|
-
return key;
|
|
2130
|
-
}
|
|
2131
2154
|
const defaultColorTokens = {
|
|
2132
2155
|
base: {
|
|
2133
2156
|
"*": {
|
|
2134
2157
|
_blend: ["multiply", "screen"],
|
|
2158
|
+
accent: {
|
|
2159
|
+
fg: ["purple/600", "purple/400"]
|
|
2160
|
+
},
|
|
2135
2161
|
avatar: {
|
|
2136
2162
|
"*": {
|
|
2137
2163
|
_blend: ["screen", "multiply"],
|
|
2138
2164
|
bg: ["500", "400"],
|
|
2139
2165
|
fg: ["white", "black"]
|
|
2140
|
-
},
|
|
2141
|
-
yellow: {
|
|
2142
|
-
bg: ["600", "400"]
|
|
2143
|
-
},
|
|
2144
|
-
green: {
|
|
2145
|
-
bg: ["600", "400"]
|
|
2146
|
-
},
|
|
2147
|
-
cyan: {
|
|
2148
|
-
bg: ["600", "400"]
|
|
2149
2166
|
}
|
|
2150
2167
|
},
|
|
2151
|
-
backdrop: ["gray/200/0.
|
|
2168
|
+
backdrop: ["gray/200/0.5", "black/0.5"],
|
|
2152
2169
|
badge: {
|
|
2153
2170
|
"*": {
|
|
2154
2171
|
bg: ["100", "900"],
|
|
2155
|
-
fg: ["600", "400"]
|
|
2172
|
+
fg: ["600", "400"],
|
|
2173
|
+
icon: ["500", "500"],
|
|
2174
|
+
dot: ["500", "500"]
|
|
2156
2175
|
},
|
|
2157
2176
|
positive: {
|
|
2158
|
-
bg: ["200
|
|
2159
|
-
fg: ["
|
|
2177
|
+
bg: ["200 50%", "900"],
|
|
2178
|
+
fg: ["600", "500"]
|
|
2160
2179
|
},
|
|
2161
2180
|
caution: {
|
|
2162
|
-
bg: ["200
|
|
2163
|
-
fg: ["
|
|
2181
|
+
bg: ["200 50%", "900"],
|
|
2182
|
+
fg: ["600", "500"]
|
|
2164
2183
|
}
|
|
2165
2184
|
},
|
|
2166
2185
|
bg: ["50", "950"],
|
|
@@ -2171,17 +2190,18 @@ const defaultColorTokens = {
|
|
|
2171
2190
|
},
|
|
2172
2191
|
fg: ["800", "200"],
|
|
2173
2192
|
focusRing: ["blue/500", "blue/500"],
|
|
2193
|
+
icon: ["600", "400"],
|
|
2174
2194
|
kbd: {
|
|
2175
2195
|
bg: ["white", "black"],
|
|
2176
2196
|
fg: ["600", "400"],
|
|
2177
2197
|
border: ["200", "800"]
|
|
2178
2198
|
},
|
|
2179
2199
|
link: {
|
|
2180
|
-
fg: ["blue/600", "blue/
|
|
2200
|
+
fg: ["blue/600", "blue/300"]
|
|
2181
2201
|
},
|
|
2182
2202
|
muted: {
|
|
2183
2203
|
bg: ["50", "950"],
|
|
2184
|
-
fg: ["
|
|
2204
|
+
fg: ["700 75%", "300 75%"]
|
|
2185
2205
|
},
|
|
2186
2206
|
shadow: {
|
|
2187
2207
|
outline: ["500/0.3", "500/0.4"],
|
|
@@ -2191,16 +2211,18 @@ const defaultColorTokens = {
|
|
|
2191
2211
|
},
|
|
2192
2212
|
skeleton: {
|
|
2193
2213
|
from: ["100", "900"],
|
|
2194
|
-
to: ["100
|
|
2214
|
+
to: ["100 50%", "900 50%"]
|
|
2195
2215
|
}
|
|
2196
2216
|
},
|
|
2197
2217
|
transparent: {
|
|
2198
|
-
bg: ["50", "black"]
|
|
2199
|
-
fg: ["600", "400"]
|
|
2218
|
+
bg: ["50", "black"]
|
|
2200
2219
|
},
|
|
2201
2220
|
default: {
|
|
2202
2221
|
bg: ["white", "950"],
|
|
2203
|
-
fg: ["
|
|
2222
|
+
fg: ["800", "200"],
|
|
2223
|
+
muted: {
|
|
2224
|
+
fg: ["600", "400"]
|
|
2225
|
+
}
|
|
2204
2226
|
},
|
|
2205
2227
|
primary: {
|
|
2206
2228
|
_hue: "blue"
|
|
@@ -2208,20 +2230,17 @@ const defaultColorTokens = {
|
|
|
2208
2230
|
positive: {
|
|
2209
2231
|
_hue: "green",
|
|
2210
2232
|
shadow: {
|
|
2211
|
-
outline: ["
|
|
2233
|
+
outline: ["500/0.4", "500/0.4"]
|
|
2212
2234
|
}
|
|
2213
2235
|
},
|
|
2214
2236
|
caution: {
|
|
2215
2237
|
_hue: "yellow",
|
|
2216
2238
|
shadow: {
|
|
2217
|
-
outline: ["600/0.3", "500/0.
|
|
2239
|
+
outline: ["600/0.3", "500/0.4"]
|
|
2218
2240
|
}
|
|
2219
2241
|
},
|
|
2220
2242
|
critical: {
|
|
2221
|
-
_hue: "red"
|
|
2222
|
-
shadow: {
|
|
2223
|
-
outline: ["500/0.3", "500/0.3"]
|
|
2224
|
-
}
|
|
2243
|
+
_hue: "red"
|
|
2225
2244
|
}
|
|
2226
2245
|
},
|
|
2227
2246
|
button: {
|
|
@@ -2230,58 +2249,89 @@ const defaultColorTokens = {
|
|
|
2230
2249
|
"*": {
|
|
2231
2250
|
_blend: ["screen", "multiply"],
|
|
2232
2251
|
accent: {
|
|
2233
|
-
fg: ["purple/
|
|
2252
|
+
fg: ["purple/300", "purple/700"]
|
|
2253
|
+
},
|
|
2254
|
+
avatar: {
|
|
2255
|
+
"*": {
|
|
2256
|
+
_blend: ["multiply", "screen"],
|
|
2257
|
+
bg: ["white", "black"],
|
|
2258
|
+
fg: ["black", "white"]
|
|
2259
|
+
}
|
|
2234
2260
|
},
|
|
2235
2261
|
badge: {
|
|
2236
2262
|
"*": {
|
|
2237
|
-
|
|
2238
|
-
|
|
2263
|
+
bg: ["900", "100"],
|
|
2264
|
+
fg: ["400", "600"],
|
|
2265
|
+
dot: ["500", "500"],
|
|
2266
|
+
icon: ["500", "500"]
|
|
2239
2267
|
}
|
|
2240
2268
|
},
|
|
2241
2269
|
bg: ["500", "400"],
|
|
2242
2270
|
border: ["500/0", "400/0"],
|
|
2243
2271
|
code: {
|
|
2244
|
-
bg: ["500
|
|
2245
|
-
fg: ["200", "
|
|
2272
|
+
bg: ["500 20%", "400 20%"],
|
|
2273
|
+
fg: ["200", "600"]
|
|
2246
2274
|
},
|
|
2247
2275
|
fg: ["white", "black"],
|
|
2248
|
-
icon: ["
|
|
2276
|
+
icon: ["100 70%", "900 70%"],
|
|
2249
2277
|
kbd: {
|
|
2250
|
-
bg: ["
|
|
2251
|
-
fg: ["
|
|
2278
|
+
bg: ["black", "white"],
|
|
2279
|
+
fg: ["200", "600"],
|
|
2252
2280
|
border: ["800", "200"]
|
|
2253
2281
|
},
|
|
2254
2282
|
link: {
|
|
2255
|
-
fg: ["blue/200", "blue/
|
|
2283
|
+
fg: ["blue/200", "blue/600"]
|
|
2256
2284
|
},
|
|
2257
2285
|
muted: {
|
|
2258
|
-
bg: ["
|
|
2259
|
-
fg: ["
|
|
2286
|
+
bg: ["950", "50"],
|
|
2287
|
+
fg: ["100 70%", "900 70%"]
|
|
2260
2288
|
},
|
|
2261
2289
|
skeleton: {
|
|
2262
2290
|
from: ["900", "100"],
|
|
2263
|
-
to: ["900
|
|
2291
|
+
to: ["900 50%", "100 50%"]
|
|
2264
2292
|
}
|
|
2265
2293
|
},
|
|
2266
2294
|
hovered: {
|
|
2267
|
-
bg: ["
|
|
2268
|
-
border: ["
|
|
2295
|
+
bg: ["700", "300"],
|
|
2296
|
+
border: ["700/0", "300/0"]
|
|
2269
2297
|
},
|
|
2270
2298
|
pressed: {
|
|
2271
|
-
bg: ["700", "
|
|
2299
|
+
bg: ["700", "300"]
|
|
2272
2300
|
},
|
|
2273
2301
|
selected: {
|
|
2274
|
-
bg: ["700", "
|
|
2302
|
+
bg: ["700", "300"]
|
|
2275
2303
|
},
|
|
2276
2304
|
disabled: {
|
|
2277
2305
|
_hue: "gray",
|
|
2306
|
+
accent: {
|
|
2307
|
+
fg: ["100 70%", "900 70%"]
|
|
2308
|
+
},
|
|
2309
|
+
badge: {
|
|
2310
|
+
"*": {
|
|
2311
|
+
bg: ["gray/700", "gray/300"],
|
|
2312
|
+
fg: ["white", "black"],
|
|
2313
|
+
dot: ["white", "black"],
|
|
2314
|
+
icon: ["white", "black"]
|
|
2315
|
+
}
|
|
2316
|
+
},
|
|
2278
2317
|
bg: ["200", "800"],
|
|
2279
|
-
|
|
2318
|
+
kbd: {
|
|
2319
|
+
bg: ["black", "white"],
|
|
2320
|
+
fg: ["white", "black"],
|
|
2321
|
+
border: ["700", "300"]
|
|
2322
|
+
},
|
|
2323
|
+
link: {
|
|
2324
|
+
fg: ["100 70%", "900 70%"]
|
|
2325
|
+
}
|
|
2280
2326
|
}
|
|
2281
2327
|
},
|
|
2282
2328
|
default: {
|
|
2283
2329
|
"*": {
|
|
2284
|
-
bg: ["800", "200"]
|
|
2330
|
+
bg: ["800", "200"],
|
|
2331
|
+
muted: {
|
|
2332
|
+
bg: ["950", "50"],
|
|
2333
|
+
fg: ["400", "600"]
|
|
2334
|
+
}
|
|
2285
2335
|
},
|
|
2286
2336
|
hovered: {
|
|
2287
2337
|
bg: ["900", "100"]
|
|
@@ -2292,67 +2342,46 @@ const defaultColorTokens = {
|
|
|
2292
2342
|
selected: {
|
|
2293
2343
|
bg: ["black", "white"]
|
|
2294
2344
|
}
|
|
2295
|
-
},
|
|
2296
|
-
positive: {
|
|
2297
|
-
"*": {
|
|
2298
|
-
bg: ["600", "400"]
|
|
2299
|
-
},
|
|
2300
|
-
hovered: {
|
|
2301
|
-
bg: ["700", "300"]
|
|
2302
|
-
},
|
|
2303
|
-
pressed: {
|
|
2304
|
-
bg: ["800", "200"]
|
|
2305
|
-
},
|
|
2306
|
-
selected: {
|
|
2307
|
-
bg: ["800", "200"]
|
|
2308
|
-
}
|
|
2309
|
-
},
|
|
2310
|
-
caution: {
|
|
2311
|
-
"*": {
|
|
2312
|
-
bg: ["600", "400"]
|
|
2313
|
-
},
|
|
2314
|
-
hovered: {
|
|
2315
|
-
bg: ["700", "300"]
|
|
2316
|
-
},
|
|
2317
|
-
pressed: {
|
|
2318
|
-
bg: ["800", "200"]
|
|
2319
|
-
},
|
|
2320
|
-
selected: {
|
|
2321
|
-
bg: ["800", "200"]
|
|
2322
|
-
}
|
|
2323
2345
|
}
|
|
2324
2346
|
},
|
|
2325
2347
|
ghost: {
|
|
2326
2348
|
"*": {
|
|
2327
2349
|
"*": {
|
|
2328
2350
|
_blend: ["multiply", "screen"],
|
|
2351
|
+
accent: {
|
|
2352
|
+
fg: ["purple/700 60%", "purple/300 70%"]
|
|
2353
|
+
},
|
|
2354
|
+
badge: {
|
|
2355
|
+
"*": {
|
|
2356
|
+
bg: ["100", "900"],
|
|
2357
|
+
fg: ["600", "400"],
|
|
2358
|
+
dot: ["500", "500"],
|
|
2359
|
+
icon: ["500", "500"]
|
|
2360
|
+
}
|
|
2361
|
+
},
|
|
2329
2362
|
bg: ["50", "950"],
|
|
2330
|
-
fg: ["700", "400"],
|
|
2331
|
-
icon: ["600", "500"],
|
|
2332
2363
|
border: ["100", "900"],
|
|
2333
|
-
|
|
2334
|
-
|
|
2364
|
+
code: {
|
|
2365
|
+
bg: ["500 10%", "400 10%"],
|
|
2366
|
+
fg: ["700 60%", "400 60%"]
|
|
2367
|
+
},
|
|
2368
|
+
fg: ["600", "400"],
|
|
2369
|
+
icon: ["700 60%", "300 60%"],
|
|
2370
|
+
kbd: {
|
|
2371
|
+
bg: ["white", "black"],
|
|
2372
|
+
fg: ["600", "400"],
|
|
2373
|
+
border: ["200", "800"]
|
|
2335
2374
|
},
|
|
2336
2375
|
link: {
|
|
2337
|
-
fg: ["blue/700
|
|
2376
|
+
fg: ["blue/700 60%", "blue/300 60%"]
|
|
2338
2377
|
},
|
|
2339
2378
|
muted: {
|
|
2340
2379
|
bg: ["100", "950"],
|
|
2341
|
-
fg: ["700
|
|
2342
|
-
},
|
|
2343
|
-
code: {
|
|
2344
|
-
bg: ["500/0.1", "400/0.1"],
|
|
2345
|
-
fg: ["700/0.6", "400/0.6"]
|
|
2380
|
+
fg: ["700 60%", "300 60%"]
|
|
2346
2381
|
},
|
|
2347
2382
|
skeleton: {
|
|
2348
2383
|
from: ["100", "900"],
|
|
2349
|
-
to: ["100
|
|
2350
|
-
},
|
|
2351
|
-
badge: {
|
|
2352
|
-
"*": {
|
|
2353
|
-
dot: ["300", "700"],
|
|
2354
|
-
icon: ["600", "400"]
|
|
2355
|
-
}
|
|
2384
|
+
to: ["100 50%", "900 50%"]
|
|
2356
2385
|
}
|
|
2357
2386
|
},
|
|
2358
2387
|
hovered: {
|
|
@@ -2369,32 +2398,46 @@ const defaultColorTokens = {
|
|
|
2369
2398
|
},
|
|
2370
2399
|
disabled: {
|
|
2371
2400
|
_hue: "gray",
|
|
2372
|
-
|
|
2373
|
-
|
|
2401
|
+
accent: {
|
|
2402
|
+
fg: ["200", "800"]
|
|
2403
|
+
},
|
|
2404
|
+
badge: {
|
|
2405
|
+
"*": {
|
|
2406
|
+
_hue: "gray",
|
|
2407
|
+
bg: ["50", "950"],
|
|
2408
|
+
fg: ["gray/200", "gray/800"],
|
|
2409
|
+
dot: ["gray/200", "gray/800"],
|
|
2410
|
+
icon: ["gray/200", "gray/800"]
|
|
2411
|
+
}
|
|
2412
|
+
},
|
|
2374
2413
|
border: ["100", "900"],
|
|
2375
|
-
|
|
2376
|
-
|
|
2414
|
+
code: {
|
|
2415
|
+
bg: ["50", "950"],
|
|
2416
|
+
fg: ["200", "800"]
|
|
2377
2417
|
},
|
|
2378
|
-
|
|
2379
|
-
|
|
2418
|
+
fg: ["200", "800"],
|
|
2419
|
+
icon: ["200", "800"],
|
|
2420
|
+
kbd: {
|
|
2421
|
+
bg: ["white", "black"],
|
|
2422
|
+
fg: ["200", "800"],
|
|
2423
|
+
border: ["100", "900"]
|
|
2380
2424
|
},
|
|
2381
2425
|
link: {
|
|
2382
|
-
fg: ["200
|
|
2426
|
+
fg: ["200", "800"]
|
|
2383
2427
|
},
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
fg: ["200/0.6", "900/0.6"]
|
|
2428
|
+
muted: {
|
|
2429
|
+
fg: ["200", "800"]
|
|
2387
2430
|
}
|
|
2388
2431
|
}
|
|
2389
2432
|
},
|
|
2390
2433
|
positive: {
|
|
2391
2434
|
"*": {
|
|
2392
|
-
border: ["600
|
|
2435
|
+
border: ["600 20%", "800"]
|
|
2393
2436
|
}
|
|
2394
2437
|
},
|
|
2395
2438
|
caution: {
|
|
2396
2439
|
"*": {
|
|
2397
|
-
border: ["600
|
|
2440
|
+
border: ["600 20%", "800"]
|
|
2398
2441
|
}
|
|
2399
2442
|
}
|
|
2400
2443
|
},
|
|
@@ -2402,65 +2445,86 @@ const defaultColorTokens = {
|
|
|
2402
2445
|
"*": {
|
|
2403
2446
|
"*": {
|
|
2404
2447
|
_blend: ["multiply", "screen"],
|
|
2448
|
+
accent: {
|
|
2449
|
+
fg: ["purple/700 70%", "purple/300 70%"]
|
|
2450
|
+
},
|
|
2451
|
+
badge: {
|
|
2452
|
+
"*": {
|
|
2453
|
+
bg: ["100", "900"],
|
|
2454
|
+
fg: ["600", "400"],
|
|
2455
|
+
dot: ["500", "500"],
|
|
2456
|
+
icon: ["500", "500"]
|
|
2457
|
+
}
|
|
2458
|
+
},
|
|
2405
2459
|
bg: ["white", "black"],
|
|
2406
|
-
fg: ["700", "300"],
|
|
2407
|
-
icon: ["700/0.7", "300/0.7"],
|
|
2408
2460
|
border: ["white/0", "black/0"],
|
|
2409
|
-
|
|
2410
|
-
bg: ["
|
|
2411
|
-
fg: ["700
|
|
2461
|
+
code: {
|
|
2462
|
+
bg: ["50", "950"],
|
|
2463
|
+
fg: ["700 75%", "300 75%"]
|
|
2412
2464
|
},
|
|
2413
|
-
|
|
2414
|
-
|
|
2465
|
+
fg: ["700", "300"],
|
|
2466
|
+
icon: ["700 75%", "300 75%"],
|
|
2467
|
+
kbd: {
|
|
2468
|
+
bg: ["white", "black"],
|
|
2469
|
+
fg: ["700", "300"],
|
|
2470
|
+
border: ["200", "800"]
|
|
2415
2471
|
},
|
|
2416
2472
|
link: {
|
|
2417
|
-
fg: ["blue/700
|
|
2473
|
+
fg: ["blue/700 70%", "blue/300 70%"]
|
|
2418
2474
|
},
|
|
2419
|
-
|
|
2475
|
+
muted: {
|
|
2420
2476
|
bg: ["100", "950"],
|
|
2421
|
-
fg: ["
|
|
2477
|
+
fg: ["700 75%", "300 75%"]
|
|
2422
2478
|
},
|
|
2423
2479
|
skeleton: {
|
|
2424
2480
|
from: ["100", "900"],
|
|
2425
|
-
to: ["100
|
|
2426
|
-
},
|
|
2427
|
-
badge: {
|
|
2428
|
-
"*": {
|
|
2429
|
-
dot: ["300", "700"],
|
|
2430
|
-
icon: ["600", "400"]
|
|
2431
|
-
}
|
|
2481
|
+
to: ["100 50%", "900 50%"]
|
|
2432
2482
|
}
|
|
2433
2483
|
},
|
|
2434
2484
|
hovered: {
|
|
2435
2485
|
bg: ["50", "950"],
|
|
2436
|
-
|
|
2437
|
-
icon: ["700/0.7", "400/0.7"]
|
|
2486
|
+
icon: ["700 70%", "400 70%"]
|
|
2438
2487
|
},
|
|
2439
2488
|
pressed: {
|
|
2440
2489
|
bg: ["100", "900"],
|
|
2441
2490
|
fg: ["800", "200"],
|
|
2442
|
-
icon: ["800
|
|
2491
|
+
icon: ["800 70%", "200 70%"]
|
|
2443
2492
|
},
|
|
2444
2493
|
selected: {
|
|
2445
2494
|
bg: ["100", "900"],
|
|
2446
2495
|
fg: ["800", "200"],
|
|
2447
|
-
icon: ["800
|
|
2496
|
+
icon: ["800 60%", "200 60%"]
|
|
2448
2497
|
},
|
|
2449
2498
|
disabled: {
|
|
2450
2499
|
_hue: "gray",
|
|
2451
|
-
fg: ["200", "800"],
|
|
2452
|
-
muted: {
|
|
2453
|
-
fg: ["200/0.6", "900/0.6"]
|
|
2454
|
-
},
|
|
2455
2500
|
accent: {
|
|
2456
|
-
fg: ["200
|
|
2501
|
+
fg: ["200", "800"]
|
|
2457
2502
|
},
|
|
2458
|
-
|
|
2459
|
-
|
|
2503
|
+
badge: {
|
|
2504
|
+
"*": {
|
|
2505
|
+
_hue: "gray",
|
|
2506
|
+
bg: ["50", "950"],
|
|
2507
|
+
fg: ["gray/200", "gray/800"],
|
|
2508
|
+
dot: ["gray/200", "gray/800"],
|
|
2509
|
+
icon: ["gray/200", "gray/800"]
|
|
2510
|
+
}
|
|
2460
2511
|
},
|
|
2461
2512
|
code: {
|
|
2462
|
-
bg: ["50
|
|
2463
|
-
fg: ["200
|
|
2513
|
+
bg: ["50", "950"],
|
|
2514
|
+
fg: ["200", "800"]
|
|
2515
|
+
},
|
|
2516
|
+
fg: ["200", "800"],
|
|
2517
|
+
icon: ["200", "800"],
|
|
2518
|
+
kbd: {
|
|
2519
|
+
bg: ["white", "black"],
|
|
2520
|
+
fg: ["200", "800"],
|
|
2521
|
+
border: ["100", "900"]
|
|
2522
|
+
},
|
|
2523
|
+
link: {
|
|
2524
|
+
fg: ["200", "800"]
|
|
2525
|
+
},
|
|
2526
|
+
muted: {
|
|
2527
|
+
fg: ["200", "800"]
|
|
2464
2528
|
}
|
|
2465
2529
|
}
|
|
2466
2530
|
}
|
|
@@ -2476,14 +2540,14 @@ const defaultColorTokens = {
|
|
|
2476
2540
|
muted: {
|
|
2477
2541
|
bg: ["50", "950"]
|
|
2478
2542
|
},
|
|
2479
|
-
placeholder: ["400", "600
|
|
2543
|
+
placeholder: ["400", "600 50%"]
|
|
2480
2544
|
},
|
|
2481
2545
|
hovered: {
|
|
2482
|
-
border: ["300", "
|
|
2546
|
+
border: ["300", "700"]
|
|
2483
2547
|
},
|
|
2484
2548
|
readOnly: {
|
|
2485
|
-
|
|
2486
|
-
|
|
2549
|
+
bg: ["50", "950"],
|
|
2550
|
+
border: ["200", "800"],
|
|
2487
2551
|
fg: ["800", "200"]
|
|
2488
2552
|
},
|
|
2489
2553
|
disabled: {
|
|
@@ -2502,52 +2566,40 @@ const defaultColorTokens = {
|
|
|
2502
2566
|
"*": {
|
|
2503
2567
|
"*": {
|
|
2504
2568
|
_blend: ["multiply", "screen"],
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2569
|
+
accent: {
|
|
2570
|
+
fg: ["purple/700 70%", "purple/300 70%"]
|
|
2571
|
+
},
|
|
2572
|
+
badge: {
|
|
2509
2573
|
"*": {
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2574
|
+
bg: ["100", "900"],
|
|
2575
|
+
fg: ["600", "400"],
|
|
2576
|
+
dot: ["500", "500"],
|
|
2577
|
+
icon: ["500", "500"]
|
|
2513
2578
|
}
|
|
2514
|
-
// yellow: {bg: ['600', '400']},
|
|
2515
|
-
// green: {bg: ['600', '400']},
|
|
2516
|
-
// cyan: {bg: ['600', '400']},
|
|
2517
2579
|
},
|
|
2580
|
+
bg: ["white", "black"],
|
|
2518
2581
|
border: ["200", "800"],
|
|
2519
|
-
|
|
2582
|
+
code: {
|
|
2520
2583
|
bg: ["50", "950"],
|
|
2521
|
-
fg: ["
|
|
2584
|
+
fg: ["600", "400"]
|
|
2522
2585
|
},
|
|
2523
|
-
|
|
2524
|
-
|
|
2586
|
+
fg: ["700", "300"],
|
|
2587
|
+
icon: ["700 75%", "300 75%"],
|
|
2588
|
+
kbd: {
|
|
2589
|
+
bg: ["white", "black"],
|
|
2590
|
+
fg: ["600", "400"],
|
|
2591
|
+
border: ["200", "800"]
|
|
2525
2592
|
},
|
|
2526
2593
|
link: {
|
|
2527
|
-
fg: ["blue/700", "blue/300"]
|
|
2594
|
+
fg: ["blue/700 70%", "blue/300 70%"]
|
|
2528
2595
|
},
|
|
2529
|
-
|
|
2596
|
+
muted: {
|
|
2530
2597
|
bg: ["100", "950"],
|
|
2531
|
-
fg: ["700", "300"]
|
|
2598
|
+
fg: ["700 75%", "300 75%"]
|
|
2532
2599
|
},
|
|
2533
2600
|
skeleton: {
|
|
2534
2601
|
from: ["100", "900"],
|
|
2535
|
-
to: ["100
|
|
2536
|
-
},
|
|
2537
|
-
badge: {
|
|
2538
|
-
"*": {
|
|
2539
|
-
// _blend: ['multiply', 'screen'],
|
|
2540
|
-
bg: ["100", "900"],
|
|
2541
|
-
fg: ["600", "200"],
|
|
2542
|
-
dot: ["300", "700"],
|
|
2543
|
-
icon: ["600", "400"]
|
|
2544
|
-
}
|
|
2545
|
-
},
|
|
2546
|
-
kbd: {
|
|
2547
|
-
// _blend: ['multiply', 'screen'],
|
|
2548
|
-
bg: ["white", "black"],
|
|
2549
|
-
fg: ["600", "400"],
|
|
2550
|
-
border: ["200", "800"]
|
|
2602
|
+
to: ["100 50%", "900 50%"]
|
|
2551
2603
|
}
|
|
2552
2604
|
},
|
|
2553
2605
|
hovered: {
|
|
@@ -2558,127 +2610,129 @@ const defaultColorTokens = {
|
|
|
2558
2610
|
},
|
|
2559
2611
|
selected: {
|
|
2560
2612
|
_blend: ["screen", "multiply"],
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2613
|
+
accent: {
|
|
2614
|
+
fg: ["purple/300", "purple/700"]
|
|
2615
|
+
},
|
|
2564
2616
|
avatar: {
|
|
2565
2617
|
"*": {
|
|
2566
2618
|
_blend: ["multiply", "screen"],
|
|
2567
2619
|
bg: ["white", "black"],
|
|
2568
2620
|
fg: ["black", "white"]
|
|
2569
2621
|
}
|
|
2570
|
-
// magenta: {_hue: 'green'},
|
|
2571
|
-
// yellow: {bg: ['600', '400']},
|
|
2572
|
-
// green: {bg: ['600', '400']},
|
|
2573
|
-
// cyan: {bg: ['600', '400']},
|
|
2574
2622
|
},
|
|
2575
2623
|
badge: {
|
|
2576
2624
|
"*": {
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2625
|
+
bg: ["900", "100"],
|
|
2626
|
+
fg: ["400", "600"],
|
|
2627
|
+
dot: ["500", "500"],
|
|
2628
|
+
icon: ["500", "500"]
|
|
2581
2629
|
}
|
|
2582
2630
|
},
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
accent: {
|
|
2589
|
-
fg: ["purple/200", "purple/800"]
|
|
2631
|
+
bg: ["500", "400"],
|
|
2632
|
+
border: ["500 20%", "400 20%"],
|
|
2633
|
+
code: {
|
|
2634
|
+
bg: ["500 20%", "400 20%"],
|
|
2635
|
+
fg: ["200", "600"]
|
|
2590
2636
|
},
|
|
2637
|
+
fg: ["white", "black"],
|
|
2638
|
+
icon: ["100 70%", "900 70%"],
|
|
2591
2639
|
kbd: {
|
|
2592
|
-
bg: ["black
|
|
2593
|
-
fg: ["
|
|
2594
|
-
border: ["
|
|
2640
|
+
bg: ["black", "white"],
|
|
2641
|
+
fg: ["200", "600"],
|
|
2642
|
+
border: ["800", "200"]
|
|
2595
2643
|
},
|
|
2596
2644
|
link: {
|
|
2597
|
-
fg: ["blue/200", "blue/
|
|
2645
|
+
fg: ["blue/200", "blue/600"]
|
|
2598
2646
|
},
|
|
2599
|
-
|
|
2600
|
-
bg: ["
|
|
2601
|
-
fg: ["
|
|
2647
|
+
muted: {
|
|
2648
|
+
bg: ["950", "50"],
|
|
2649
|
+
fg: ["100 70%", "900 70%"]
|
|
2602
2650
|
},
|
|
2603
2651
|
skeleton: {
|
|
2604
2652
|
from: ["900", "100"],
|
|
2605
|
-
to: ["900
|
|
2653
|
+
to: ["900 50%", "100 50%"]
|
|
2606
2654
|
}
|
|
2607
|
-
// badge: {
|
|
2608
|
-
// '*': {
|
|
2609
|
-
// _blend: ['multiply', 'screen'],
|
|
2610
|
-
// bg: ['900', '100'],
|
|
2611
|
-
// fg: ['white', 'black'],
|
|
2612
|
-
// dot: ['700', '300'],
|
|
2613
|
-
// icon: ['400', '600'],
|
|
2614
|
-
// },
|
|
2615
|
-
// },
|
|
2616
2655
|
},
|
|
2617
2656
|
disabled: {
|
|
2657
|
+
_hue: "gray",
|
|
2658
|
+
accent: {
|
|
2659
|
+
fg: ["200", "800"]
|
|
2660
|
+
},
|
|
2661
|
+
badge: {
|
|
2662
|
+
"*": {
|
|
2663
|
+
_hue: "gray",
|
|
2664
|
+
bg: ["50", "950"],
|
|
2665
|
+
fg: ["gray/200", "gray/800"],
|
|
2666
|
+
dot: ["gray/200", "gray/800"],
|
|
2667
|
+
icon: ["gray/200", "gray/800"]
|
|
2668
|
+
}
|
|
2669
|
+
},
|
|
2670
|
+
border: ["100", "900"],
|
|
2671
|
+
code: {
|
|
2672
|
+
bg: ["50", "950"],
|
|
2673
|
+
fg: ["200", "800"]
|
|
2674
|
+
},
|
|
2618
2675
|
fg: ["200", "800"],
|
|
2619
2676
|
icon: ["200", "800"],
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
fg: ["purple/200", "purple/800/0.5"]
|
|
2677
|
+
kbd: {
|
|
2678
|
+
bg: ["white", "black"],
|
|
2679
|
+
fg: ["200", "800"],
|
|
2680
|
+
border: ["100", "900"]
|
|
2625
2681
|
},
|
|
2626
2682
|
link: {
|
|
2627
|
-
fg: ["
|
|
2683
|
+
fg: ["200", "800"]
|
|
2628
2684
|
},
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
fg: ["200", "800/0.5"]
|
|
2685
|
+
muted: {
|
|
2686
|
+
fg: ["200", "800"]
|
|
2632
2687
|
}
|
|
2633
2688
|
}
|
|
2634
2689
|
},
|
|
2635
2690
|
default: {
|
|
2636
2691
|
selected: {
|
|
2637
2692
|
_hue: "blue"
|
|
2638
|
-
// bg: ['500', '400'],
|
|
2639
2693
|
}
|
|
2640
2694
|
},
|
|
2641
2695
|
critical: {
|
|
2642
2696
|
disabled: {
|
|
2643
|
-
bg: ["50
|
|
2697
|
+
bg: ["50 50%", "950 50%"]
|
|
2644
2698
|
}
|
|
2645
2699
|
}
|
|
2646
2700
|
},
|
|
2647
2701
|
syntax: {
|
|
2648
|
-
atrule: ["purple/
|
|
2649
|
-
attrName: ["green/
|
|
2650
|
-
attrValue: ["yellow/
|
|
2651
|
-
attribute: ["yellow/
|
|
2652
|
-
boolean: ["purple/
|
|
2653
|
-
builtin: ["purple/
|
|
2654
|
-
cdata: ["yellow/
|
|
2655
|
-
char: ["yellow/
|
|
2656
|
-
class: ["orange/
|
|
2657
|
-
className: ["cyan/
|
|
2658
|
-
comment: ["gray/
|
|
2659
|
-
constant: ["purple/
|
|
2660
|
-
deleted: ["red/
|
|
2661
|
-
entity: ["red/
|
|
2662
|
-
function: ["green/
|
|
2663
|
-
hexcode: ["blue/
|
|
2664
|
-
id: ["purple/
|
|
2665
|
-
important: ["purple/
|
|
2666
|
-
inserted: ["yellow/
|
|
2667
|
-
keyword: ["magenta/
|
|
2668
|
-
number: ["purple/
|
|
2669
|
-
operator: ["magenta/
|
|
2670
|
-
property: ["blue/
|
|
2671
|
-
pseudoClass: ["yellow/
|
|
2672
|
-
pseudoElement: ["yellow/
|
|
2673
|
-
punctuation: ["gray/
|
|
2674
|
-
regex: ["blue/
|
|
2675
|
-
selector: ["red/
|
|
2676
|
-
string: ["yellow/
|
|
2677
|
-
symbol: ["purple/
|
|
2678
|
-
tag: ["red/
|
|
2679
|
-
unit: ["orange/
|
|
2680
|
-
url: ["red/
|
|
2681
|
-
variable: ["red/
|
|
2702
|
+
atrule: ["purple/600", "purple/400"],
|
|
2703
|
+
attrName: ["green/600", "green/400"],
|
|
2704
|
+
attrValue: ["yellow/600", "yellow/400"],
|
|
2705
|
+
attribute: ["yellow/600", "yellow/400"],
|
|
2706
|
+
boolean: ["purple/600", "purple/400"],
|
|
2707
|
+
builtin: ["purple/600", "purple/400"],
|
|
2708
|
+
cdata: ["yellow/600", "yellow/400"],
|
|
2709
|
+
char: ["yellow/600", "yellow/400"],
|
|
2710
|
+
class: ["orange/600", "orange/400"],
|
|
2711
|
+
className: ["cyan/600", "cyan/400"],
|
|
2712
|
+
comment: ["gray/400", "gray/600"],
|
|
2713
|
+
constant: ["purple/600", "purple/400"],
|
|
2714
|
+
deleted: ["red/600", "red/400"],
|
|
2715
|
+
entity: ["red/600", "red/400"],
|
|
2716
|
+
function: ["green/600", "green/400"],
|
|
2717
|
+
hexcode: ["blue/600", "blue/400"],
|
|
2718
|
+
id: ["purple/600", "purple/400"],
|
|
2719
|
+
important: ["purple/600", "purple/400"],
|
|
2720
|
+
inserted: ["yellow/600", "yellow/400"],
|
|
2721
|
+
keyword: ["magenta/600", "magenta/400"],
|
|
2722
|
+
number: ["purple/600", "purple/400"],
|
|
2723
|
+
operator: ["magenta/600", "magenta/400"],
|
|
2724
|
+
property: ["blue/600", "blue/400"],
|
|
2725
|
+
pseudoClass: ["yellow/600", "yellow/400"],
|
|
2726
|
+
pseudoElement: ["yellow/600", "yellow/400"],
|
|
2727
|
+
punctuation: ["gray/600", "gray/400"],
|
|
2728
|
+
regex: ["blue/600", "blue/400"],
|
|
2729
|
+
selector: ["red/600", "red/400"],
|
|
2730
|
+
string: ["yellow/600", "yellow/400"],
|
|
2731
|
+
symbol: ["purple/600", "purple/400"],
|
|
2732
|
+
tag: ["red/600", "red/400"],
|
|
2733
|
+
unit: ["orange/600", "orange/400"],
|
|
2734
|
+
url: ["red/600", "red/400"],
|
|
2735
|
+
variable: ["red/600", "red/400"]
|
|
2682
2736
|
}
|
|
2683
2737
|
};
|
|
2684
2738
|
function isRecord(value) {
|
|
@@ -3817,8 +3871,13 @@ function renderColorValue(str, options) {
|
|
|
3817
3871
|
};
|
|
3818
3872
|
try {
|
|
3819
3873
|
hex = mixThemeColor(hex, mixOptions);
|
|
3874
|
+
if (bg && node.mix !== void 0) {
|
|
3875
|
+
const from = hexToRgb(bg);
|
|
3876
|
+
const to = hexToRgb(hex);
|
|
3877
|
+
hex = rgbToHex(mix(from, to, node.mix));
|
|
3878
|
+
}
|
|
3820
3879
|
} catch (err) {
|
|
3821
|
-
console.
|
|
3880
|
+
console.warn("could not blend", hex, mixOptions);
|
|
3822
3881
|
throw err;
|
|
3823
3882
|
}
|
|
3824
3883
|
if (hex === "#aN") {
|
|
@@ -4070,10 +4129,9 @@ function renderThemeColorBadgeColor(value, options) {
|
|
|
4070
4129
|
colorPalette
|
|
4071
4130
|
};
|
|
4072
4131
|
return {
|
|
4073
|
-
// _blend: blendMode,
|
|
4074
4132
|
bg,
|
|
4075
|
-
fg: renderColorValue(value.fg, colorOptions),
|
|
4076
4133
|
dot: renderColorValue(value.dot, colorOptions),
|
|
4134
|
+
fg: renderColorValue(value.fg, colorOptions),
|
|
4077
4135
|
icon: renderColorValue(value.icon, colorOptions)
|
|
4078
4136
|
};
|
|
4079
4137
|
}
|
|
@@ -4132,7 +4190,7 @@ function renderThemeColorState(value, options) {
|
|
|
4132
4190
|
blendMode
|
|
4133
4191
|
}),
|
|
4134
4192
|
badge: renderThemeColorBadge(value.badge, {
|
|
4135
|
-
baseBg,
|
|
4193
|
+
baseBg: bg,
|
|
4136
4194
|
colorPalette,
|
|
4137
4195
|
blendMode
|
|
4138
4196
|
}),
|
|
@@ -4318,6 +4376,7 @@ function getScopedTheme(themeProp, scheme, tone) {
|
|
|
4318
4376
|
layer: layer_v0,
|
|
4319
4377
|
v2: {
|
|
4320
4378
|
...v2,
|
|
4379
|
+
_resolved: true,
|
|
4321
4380
|
color: color_v2,
|
|
4322
4381
|
layer: layer_v2
|
|
4323
4382
|
}
|
|
@@ -4340,6 +4399,5 @@ function _setCachedTheme(rootTheme, scheme, tone, theme) {
|
|
|
4340
4399
|
const toneCache = schemeCache.get(tone);
|
|
4341
4400
|
toneCache.set(rootTheme, theme);
|
|
4342
4401
|
}
|
|
4343
|
-
|
|
4344
|
-
export { COLOR_CONFIG_AVATAR_COLORS, COLOR_CONFIG_BLEND_KEYS, COLOR_CONFIG_CARD_KEYS, COLOR_CONFIG_CARD_TONES, COLOR_CONFIG_INPUT_MODES, COLOR_CONFIG_INPUT_STATES, COLOR_CONFIG_STATES, COLOR_CONFIG_STATE_KEYS, COLOR_CONFIG_STATE_TONES, THEME_COLOR_AVATAR_COLORS, THEME_COLOR_BLEND_MODES, THEME_COLOR_BUTTON_MODES, THEME_COLOR_CARD_TONES, THEME_COLOR_INPUT_MODES, THEME_COLOR_INPUT_STATES, THEME_COLOR_STATES, THEME_COLOR_STATE_TONES, buildTheme, createColorTheme, defaultTheme, getContrastRatio, getScopedTheme, getTheme_v2, hexToRgb, hslToRgb, isColorBlendModeValue, isColorButtonMode, isColorConfigBaseKey, isColorConfigBaseTone, isColorConfigBlendKey, isColorConfigStateKey, isColorConfigStateTone, isColorHueKey, isColorOpacityValue, isColorTintKey, isColorTokenValue, isColorValue, is_v0, is_v2, mix, multiply, parseColor, parseTokenKey, parseTokenValue, rgbToHex, rgbToHsl, rgba, rgbaToRGBA, screen, v0_v2, v2_v0 };
|
|
4402
|
+
export { COLOR_CONFIG_AVATAR_COLORS, COLOR_CONFIG_BLEND_KEYS, COLOR_CONFIG_CARD_KEYS, COLOR_CONFIG_CARD_TONES, COLOR_CONFIG_INPUT_MODES, COLOR_CONFIG_INPUT_STATES, COLOR_CONFIG_STATES, COLOR_CONFIG_STATE_KEYS, COLOR_CONFIG_STATE_TONES, THEME_COLOR_AVATAR_COLORS, THEME_COLOR_BLEND_MODES, THEME_COLOR_BUTTON_MODES, THEME_COLOR_CARD_TONES, THEME_COLOR_INPUT_MODES, THEME_COLOR_INPUT_STATES, THEME_COLOR_SCHEMES, THEME_COLOR_STATES, THEME_COLOR_STATE_TONES, buildTheme, createColorTheme, getContrastRatio, getScopedTheme, getTheme_v2, hexToRgb, hslToRgb, isColorBlendModeValue, isColorButtonMode, isColorConfigBaseKey, isColorConfigBaseTone, isColorConfigBlendKey, isColorConfigStateKey, isColorConfigStateTone, isColorHueKey, isColorOpacityValue, isColorTintKey, isColorTokenValue, isColorValue, is_v0, is_v2, mix, multiply, parseColor, parseTokenKey, parseTokenValue, rgbToHex, rgbToHsl, rgba, rgbaToRGBA, screen, v0_v2, v2_v0 };
|
|
4345
4403
|
//# sourceMappingURL=theme.esm.js.map
|