@sanity/ui 2.0.0-alpha.34 → 2.0.0-alpha.35
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/index.cjs.mjs +4 -3
- package/dist/index.d.ts +29 -22
- package/dist/index.esm.js +397 -518
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +413 -534
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs.mjs +10 -4
- package/dist/theme.d.ts +450 -187
- package/dist/theme.esm.js +2933 -2750
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +2942 -2753
- package/dist/theme.js.map +1 -1
- package/package.json +3 -3
- package/src/core/_compat.ts +7 -7
- package/src/core/components/dialog/dialog.tsx +5 -5
- package/src/core/components/dialog/styles.ts +4 -5
- package/src/core/components/hotkeys/hotkeys.tsx +4 -2
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +50 -0
- package/src/core/components/menu/__workshop__/index.ts +5 -0
- package/src/core/components/menu/menuItem.tsx +7 -1
- package/src/core/components/skeleton/textSkeleton.tsx +12 -14
- package/src/core/components/tree/style.ts +14 -17
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +3 -3
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +2 -3
- package/src/core/primitives/_selectable/style.ts +18 -18
- package/src/core/primitives/avatar/avatar.tsx +3 -3
- package/src/core/primitives/avatar/avatarCounter.tsx +4 -4
- package/src/core/primitives/avatar/avatarStack.tsx +2 -2
- package/src/core/primitives/avatar/styles.ts +7 -8
- package/src/core/primitives/avatar/types.ts +2 -2
- package/src/core/primitives/badge/__workshop__/props.tsx +1 -1
- package/src/core/primitives/badge/__workshop__/tones.tsx +1 -1
- package/src/core/primitives/badge/badge.tsx +1 -1
- package/src/core/primitives/badge/styles.ts +5 -6
- package/src/core/primitives/button/button.tsx +3 -4
- package/src/core/primitives/button/styles.ts +22 -23
- package/src/core/primitives/card/__workshop__/selected.tsx +15 -15
- package/src/core/primitives/card/card.tsx +1 -1
- package/src/core/primitives/card/styles.ts +22 -22
- package/src/core/primitives/checkbox/styles.ts +21 -22
- package/src/core/primitives/code/styles.ts +4 -1
- package/src/core/primitives/container/styles.ts +2 -3
- package/src/core/primitives/heading/styles.ts +4 -2
- package/src/core/primitives/inline/styles.ts +6 -6
- package/src/core/primitives/kbd/kbd.tsx +7 -11
- package/src/core/primitives/label/styles.ts +4 -3
- package/src/core/primitives/popover/helpers.ts +3 -4
- package/src/core/primitives/popover/popover.tsx +8 -4
- package/src/core/primitives/popover/types.ts +1 -1
- package/src/core/primitives/radio/styles.ts +17 -19
- package/src/core/primitives/select/styles.ts +27 -32
- package/src/core/primitives/stack/styles.ts +2 -3
- package/src/core/primitives/switch/__workshop__/props.tsx +11 -31
- package/src/core/primitives/switch/styles.ts +18 -21
- package/src/core/primitives/text/__workshop__/colored.tsx +10 -10
- package/src/core/primitives/text/styles.ts +9 -4
- package/src/core/primitives/tooltip/tooltip.tsx +3 -3
- package/src/core/styles/border/borderStyle.ts +6 -11
- package/src/core/styles/box/boxStyle.ts +5 -9
- package/src/core/styles/card/_cardColorStyle.ts +99 -0
- package/src/core/styles/card/index.ts +1 -0
- package/src/core/styles/flex/flexItemStyle.ts +2 -3
- package/src/core/styles/flex/flexStyle.ts +6 -11
- package/src/core/styles/font/responsiveFont.ts +4 -4
- package/src/core/styles/font/textAlignStyle.ts +3 -3
- package/src/core/styles/grid/gridItemStyle.ts +7 -13
- package/src/core/styles/grid/gridStyle.ts +9 -17
- package/src/core/styles/helpers.ts +5 -3
- package/src/core/styles/input/responsiveInputPaddingStyle.ts +6 -6
- package/src/core/styles/input/textInputStyle.ts +36 -40
- package/src/core/styles/margin/marginsStyle.test.ts +2 -3
- package/src/core/styles/padding/paddingStyle.test.ts +2 -3
- package/src/core/styles/radius/radiusStyle.ts +2 -3
- package/src/core/styles/shadow/shadowStyle.ts +4 -5
- package/src/core/theme/__workshop__/build/Root.tsx +24 -20
- package/src/core/theme/__workshop__/build/story.tsx +22 -26
- package/src/core/theme/__workshop__/canvas.tsx +21 -40
- package/src/core/theme/theme.test.tsx +2 -35
- package/src/core/theme/themeColorProvider.tsx +2 -2
- package/src/core/theme/themeContext.ts +2 -2
- package/src/core/theme/themeProvider.tsx +25 -25
- package/src/core/theme/types.ts +3 -2
- package/src/core/theme/useRootTheme.ts +1 -9
- package/src/core/theme/useTheme.ts +8 -1
- package/src/core/types/card.ts +2 -2
- package/src/core/utils/arrow/arrow.tsx +3 -3
- package/src/core/utils/elementQuery/elementQuery.tsx +3 -3
- package/src/core/utils/virtualList/virtualList.tsx +2 -2
- package/src/theme/build/_deprecated/color/muted/createMuted.ts +2 -2
- package/src/theme/build/buildColorTheme.test.ts +14 -15
- package/src/theme/build/buildColorTheme.ts +239 -292
- package/src/theme/build/buildTheme.test.ts +9 -7
- package/src/theme/build/buildTheme.ts +12 -9
- package/src/theme/build/colorToken.ts +3 -1
- package/src/theme/build/lib/color-fns/contrastRatio.ts +1 -0
- package/src/theme/build/lib/isRecord.ts +3 -0
- package/src/theme/build/merge.ts +18 -13
- package/src/theme/build/renderColorTheme.ts +205 -213
- package/src/theme/build/renderColorValue.ts +15 -8
- package/src/theme/build/resolveColorTokens.ts +177 -198
- package/src/theme/build/theme.test.ts +27 -0
- package/src/theme/config/helpers.ts +16 -8
- package/src/theme/config/system.ts +46 -17
- package/src/theme/config/tokens/color/types.ts +55 -32
- package/src/theme/config/tokens/types.ts +11 -4
- package/src/theme/config/types.ts +5 -11
- package/src/theme/{build/defaults → defaults}/colorPalette.ts +1 -1
- package/src/theme/{build/defaults → defaults}/colorTokens.ts +189 -136
- package/src/theme/{build/defaults → defaults}/config.ts +14 -12
- package/src/theme/{build/defaults → defaults}/fonts.ts +6 -6
- package/src/theme/getScopedTheme.ts +81 -0
- package/src/theme/index.ts +9 -1
- package/src/theme/system/avatar.ts +1 -1
- package/src/theme/system/color/_constants.ts +11 -11
- package/src/theme/system/color/_system.ts +10 -71
- package/src/theme/system/color/avatar.ts +22 -10
- package/src/theme/system/color/badge.ts +18 -7
- package/src/theme/system/color/button.ts +17 -23
- package/src/theme/system/color/color.ts +34 -0
- package/src/theme/system/color/index.ts +3 -10
- package/src/theme/system/color/input.ts +13 -11
- package/src/theme/system/color/kbd.ts +3 -3
- package/src/theme/system/color/selectable.ts +13 -19
- package/src/theme/system/color/shadow.ts +7 -0
- package/src/theme/system/color/state.ts +37 -0
- package/src/theme/system/css.ts +9 -0
- package/src/theme/system/focusRing.ts +7 -0
- package/src/theme/system/index.ts +5 -1
- package/src/theme/system/input.ts +1 -1
- package/src/theme/system/layer.ts +1 -2
- package/src/theme/system/shadow.ts +1 -0
- package/src/theme/system/styles.ts +19 -0
- package/src/theme/system/theme.ts +97 -0
- package/src/theme/system/{color → v0/color}/_generic.ts +2 -1
- package/src/theme/system/v0/color/_system.ts +13 -0
- package/src/theme/system/{color → v0/color}/base.ts +2 -0
- package/src/theme/system/v0/color/button.ts +42 -0
- package/src/theme/system/{color → v0/color}/card.ts +2 -1
- package/src/theme/system/v0/color/color.ts +40 -0
- package/src/theme/system/v0/color/index.ts +11 -0
- package/src/theme/system/v0/color/input.ts +34 -0
- package/src/theme/system/{color/_deprecated → v0/color}/muted.ts +1 -1
- package/src/theme/system/v0/color/selectable.ts +31 -0
- package/src/theme/system/{color/_deprecated → v0/color}/solid.ts +1 -1
- package/src/theme/system/v0/color/spot.ts +13 -0
- package/src/theme/system/v0/index.ts +1 -0
- package/src/theme/versioning/getTheme_v2.ts +35 -0
- package/src/theme/versioning/index.ts +5 -0
- package/src/theme/versioning/is_v0.ts +6 -0
- package/src/theme/versioning/is_v2.ts +6 -0
- package/src/theme/versioning/themeColor_v0_v2.ts +217 -0
- package/src/theme/versioning/v0_v2.ts +70 -0
- package/src/theme/versioning/v2_v0.ts +128 -0
- package/src/core/styles/colorVars/colorVarsStyle.ts +0 -43
- package/src/core/styles/colorVars/index.ts +0 -1
- package/src/core/theme/defaults.ts +0 -7
- package/src/theme/system/_system.ts +0 -95
- package/src/theme/system/color/_deprecated/spot.ts +0 -13
- package/src/theme/themes/studio/config.ts +0 -69
- package/src/theme/themes/studio/fonts.ts +0 -219
- package/src/theme/themes/studio/index.ts +0 -1
- package/src/theme/themes/studio/studioTheme.test.ts +0 -27
- package/src/theme/themes/studio/studioTheme.ts +0 -8
package/dist/theme.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import type {StyledObject} from 'styled-components'
|
|
|
6
6
|
/**
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export declare interface BaseTheme
|
|
9
|
+
export declare interface BaseTheme {
|
|
10
|
+
_version?: 0
|
|
10
11
|
avatar: ThemeAvatar
|
|
11
12
|
button: {
|
|
12
13
|
border: {
|
|
@@ -42,10 +43,13 @@ export declare interface BaseTheme<Styles extends {} = {}> {
|
|
|
42
43
|
radius: number[]
|
|
43
44
|
shadows: Array<ThemeShadow | null>
|
|
44
45
|
space: number[]
|
|
45
|
-
|
|
46
|
+
/** @internal */
|
|
47
|
+
styles?: ThemeStyles
|
|
48
|
+
v2?: RootTheme_v2
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
/**
|
|
52
|
+
* @public
|
|
49
53
|
* @deprecated Use `ThemeBoxShadow` instead
|
|
50
54
|
*/
|
|
51
55
|
export declare type BoxShadow = ThemeBoxShadow
|
|
@@ -53,27 +57,41 @@ export declare type BoxShadow = ThemeBoxShadow
|
|
|
53
57
|
/** @internal */
|
|
54
58
|
export declare function buildTheme(config?: ThemeConfig): RootTheme
|
|
55
59
|
|
|
60
|
+
/** @internal */
|
|
56
61
|
export declare const COLOR_CONFIG_AVATAR_COLORS: readonly ['*', ...ColorHueKey[]]
|
|
57
62
|
|
|
58
|
-
|
|
63
|
+
/** @internal */
|
|
64
|
+
export declare const COLOR_CONFIG_BLEND_KEYS: readonly ['_blend']
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export declare const COLOR_CONFIG_CARD_KEYS: readonly [
|
|
59
68
|
'_hue',
|
|
60
69
|
'bg',
|
|
61
70
|
'fg',
|
|
62
71
|
'border',
|
|
63
72
|
'focusRing',
|
|
64
73
|
'muted/fg',
|
|
74
|
+
'accent/fg',
|
|
65
75
|
'link/fg',
|
|
66
76
|
'code/bg',
|
|
67
77
|
'code/fg',
|
|
78
|
+
'skeleton/from',
|
|
79
|
+
'skeleton/to',
|
|
80
|
+
'status/dot',
|
|
81
|
+
'status/icon',
|
|
82
|
+
'_hue',
|
|
83
|
+
'bg',
|
|
84
|
+
'fg',
|
|
85
|
+
'border',
|
|
86
|
+
'focusRing',
|
|
68
87
|
'shadow/outline',
|
|
69
88
|
'shadow/umbra',
|
|
70
89
|
'shadow/penumbra',
|
|
71
90
|
'shadow/ambient',
|
|
72
|
-
'skeleton/from',
|
|
73
|
-
'skeleton/to',
|
|
74
91
|
]
|
|
75
92
|
|
|
76
|
-
|
|
93
|
+
/** @internal */
|
|
94
|
+
export declare const COLOR_CONFIG_CARD_TONES: readonly [
|
|
77
95
|
'*',
|
|
78
96
|
'transparent',
|
|
79
97
|
'default',
|
|
@@ -83,10 +101,10 @@ export declare const COLOR_CONFIG_BASE_TONES: readonly [
|
|
|
83
101
|
'critical',
|
|
84
102
|
]
|
|
85
103
|
|
|
86
|
-
|
|
87
|
-
|
|
104
|
+
/** @internal */
|
|
88
105
|
export declare const COLOR_CONFIG_INPUT_MODES: readonly ['*', 'default', 'invalid']
|
|
89
106
|
|
|
107
|
+
/** @internal */
|
|
90
108
|
export declare const COLOR_CONFIG_INPUT_STATES: readonly [
|
|
91
109
|
'*',
|
|
92
110
|
'enabled',
|
|
@@ -95,6 +113,7 @@ export declare const COLOR_CONFIG_INPUT_STATES: readonly [
|
|
|
95
113
|
'disabled',
|
|
96
114
|
]
|
|
97
115
|
|
|
116
|
+
/** @internal */
|
|
98
117
|
export declare const COLOR_CONFIG_STATE_KEYS: readonly [
|
|
99
118
|
'_hue',
|
|
100
119
|
'bg',
|
|
@@ -102,13 +121,17 @@ export declare const COLOR_CONFIG_STATE_KEYS: readonly [
|
|
|
102
121
|
'border',
|
|
103
122
|
'focusRing',
|
|
104
123
|
'muted/fg',
|
|
124
|
+
'accent/fg',
|
|
105
125
|
'link/fg',
|
|
106
126
|
'code/bg',
|
|
107
127
|
'code/fg',
|
|
108
128
|
'skeleton/from',
|
|
109
129
|
'skeleton/to',
|
|
130
|
+
'status/dot',
|
|
131
|
+
'status/icon',
|
|
110
132
|
]
|
|
111
133
|
|
|
134
|
+
/** @internal */
|
|
112
135
|
export declare const COLOR_CONFIG_STATE_TONES: readonly [
|
|
113
136
|
'*',
|
|
114
137
|
'default',
|
|
@@ -118,6 +141,7 @@ export declare const COLOR_CONFIG_STATE_TONES: readonly [
|
|
|
118
141
|
'critical',
|
|
119
142
|
]
|
|
120
143
|
|
|
144
|
+
/** @internal */
|
|
121
145
|
export declare const COLOR_CONFIG_STATES: readonly [
|
|
122
146
|
'*',
|
|
123
147
|
'enabled',
|
|
@@ -127,28 +151,40 @@ export declare const COLOR_CONFIG_STATES: readonly [
|
|
|
127
151
|
'disabled',
|
|
128
152
|
]
|
|
129
153
|
|
|
154
|
+
/** @public */
|
|
130
155
|
export declare type ColorBlendModeTokenValue = [ThemeColorBlendModeKey, ThemeColorBlendModeKey]
|
|
131
156
|
|
|
157
|
+
/** @public */
|
|
132
158
|
export declare type ColorConfigAvatarColor = (typeof COLOR_CONFIG_AVATAR_COLORS)[number]
|
|
133
159
|
|
|
134
|
-
|
|
160
|
+
/** @public */
|
|
161
|
+
export declare type ColorConfigBlendKey = (typeof COLOR_CONFIG_BLEND_KEYS)[number]
|
|
135
162
|
|
|
136
|
-
|
|
163
|
+
/** @public */
|
|
164
|
+
export declare type ColorConfigCardKey = (typeof COLOR_CONFIG_CARD_KEYS)[number]
|
|
137
165
|
|
|
138
|
-
|
|
166
|
+
/** @public */
|
|
167
|
+
export declare type ColorConfigCardTone = (typeof COLOR_CONFIG_CARD_TONES)[number]
|
|
139
168
|
|
|
169
|
+
/** @public */
|
|
140
170
|
export declare type ColorConfigInputMode = (typeof COLOR_CONFIG_INPUT_MODES)[number]
|
|
141
171
|
|
|
172
|
+
/** @public */
|
|
142
173
|
export declare type ColorConfigInputState = (typeof COLOR_CONFIG_INPUT_STATES)[number]
|
|
143
174
|
|
|
175
|
+
/** @public */
|
|
144
176
|
export declare type ColorConfigOpacityValue = `0` | `0.${number}` | `1`
|
|
145
177
|
|
|
178
|
+
/** @public */
|
|
146
179
|
export declare type ColorConfigState = (typeof COLOR_CONFIG_STATES)[number]
|
|
147
180
|
|
|
181
|
+
/** @public */
|
|
148
182
|
export declare type ColorConfigStateKey = (typeof COLOR_CONFIG_STATE_KEYS)[number]
|
|
149
183
|
|
|
184
|
+
/** @public */
|
|
150
185
|
export declare type ColorConfigStateTone = (typeof COLOR_CONFIG_STATE_TONES)[number]
|
|
151
186
|
|
|
187
|
+
/** @public */
|
|
152
188
|
export declare type ColorConfigValue =
|
|
153
189
|
| `black`
|
|
154
190
|
| `white`
|
|
@@ -170,14 +206,30 @@ export declare function createColorTheme(
|
|
|
170
206
|
): ThemeColorSchemes
|
|
171
207
|
|
|
172
208
|
/**
|
|
173
|
-
*
|
|
209
|
+
* Work around types that are missing in `styled-components@6`
|
|
174
210
|
* https://github.com/styled-components/styled-components/issues/4062
|
|
175
211
|
* @internal
|
|
176
212
|
* */
|
|
177
213
|
export declare type CSSObject = StyledObject<any>
|
|
178
214
|
|
|
215
|
+
/**
|
|
216
|
+
* @public
|
|
217
|
+
*/
|
|
218
|
+
export declare const defaultTheme: BaseTheme
|
|
219
|
+
|
|
220
|
+
/** @internal */
|
|
179
221
|
export declare function getContrastRatio(bg: string, fg: string): number
|
|
180
222
|
|
|
223
|
+
/** @internal */
|
|
224
|
+
export declare function getScopedTheme(
|
|
225
|
+
themeProp: RootTheme | RootTheme_v2,
|
|
226
|
+
scheme: ThemeColorSchemeKey,
|
|
227
|
+
tone: ThemeColorCardToneKey,
|
|
228
|
+
): Theme
|
|
229
|
+
|
|
230
|
+
/** @public */
|
|
231
|
+
export declare function getTheme_v2(theme: Theme): Theme_v2
|
|
232
|
+
|
|
181
233
|
/**
|
|
182
234
|
* @internal
|
|
183
235
|
*/
|
|
@@ -197,32 +249,46 @@ export declare interface HSL {
|
|
|
197
249
|
*/
|
|
198
250
|
export declare function hslToRgb(hsl: HSL): RGB
|
|
199
251
|
|
|
252
|
+
/** @internal */
|
|
253
|
+
export declare function is_v0(themeProp: RootTheme | RootTheme_v2): themeProp is RootTheme
|
|
254
|
+
|
|
255
|
+
/** @internal */
|
|
256
|
+
export declare function is_v2(themeProp: RootTheme | RootTheme_v2): themeProp is RootTheme_v2
|
|
257
|
+
|
|
200
258
|
/** @internal */
|
|
201
259
|
export declare function isColorBlendModeValue(str: string): str is ThemeColorBlendModeKey
|
|
202
260
|
|
|
203
261
|
/** @internal */
|
|
204
262
|
export declare function isColorButtonMode(str: string): str is ThemeColorButtonModeKey
|
|
205
263
|
|
|
206
|
-
|
|
264
|
+
/** @internal */
|
|
265
|
+
export declare function isColorConfigBaseKey(str: string): str is ColorConfigCardKey
|
|
207
266
|
|
|
208
|
-
|
|
267
|
+
/** @internal */
|
|
268
|
+
export declare function isColorConfigBaseTone(str: string): str is ColorConfigCardTone
|
|
209
269
|
|
|
270
|
+
/** @internal */
|
|
210
271
|
export declare function isColorConfigBlendKey(str: string): str is ColorConfigBlendKey
|
|
211
272
|
|
|
273
|
+
/** @internal */
|
|
212
274
|
export declare function isColorConfigStateKey(str: string): str is ColorConfigStateKey
|
|
213
275
|
|
|
276
|
+
/** @internal */
|
|
214
277
|
export declare function isColorConfigStateTone(str: string): str is ColorConfigStateTone
|
|
215
278
|
|
|
216
279
|
/** @internal */
|
|
217
280
|
export declare function isColorHueKey(str: string): str is ColorHueKey
|
|
218
281
|
|
|
282
|
+
/** @internal */
|
|
219
283
|
export declare function isColorOpacityValue(str: string): str is ColorConfigOpacityValue
|
|
220
284
|
|
|
221
285
|
/** @internal */
|
|
222
286
|
export declare function isColorTintKey(str: string): str is ColorTintKey
|
|
223
287
|
|
|
288
|
+
/** @internal */
|
|
224
289
|
export declare function isColorTokenValue(str: string): str is ColorConfigValue
|
|
225
290
|
|
|
291
|
+
/** @internal */
|
|
226
292
|
export declare function isColorValue(str: string): str is 'black' | 'white'
|
|
227
293
|
|
|
228
294
|
/**
|
|
@@ -297,7 +363,41 @@ export declare function rgbToHsl({r, g, b}: RGB): HSL
|
|
|
297
363
|
/**
|
|
298
364
|
* @public
|
|
299
365
|
*/
|
|
300
|
-
export declare type RootTheme = BaseTheme
|
|
366
|
+
export declare type RootTheme = BaseTheme
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @public
|
|
370
|
+
*/
|
|
371
|
+
export declare interface RootTheme_v2 {
|
|
372
|
+
_version: 2
|
|
373
|
+
avatar: ThemeAvatar
|
|
374
|
+
button: {
|
|
375
|
+
border: {
|
|
376
|
+
width: number
|
|
377
|
+
}
|
|
378
|
+
focusRing: ThemeFocusRing
|
|
379
|
+
textWeight: ThemeFontWeightKey
|
|
380
|
+
}
|
|
381
|
+
card: {
|
|
382
|
+
border: {
|
|
383
|
+
width: number
|
|
384
|
+
}
|
|
385
|
+
focusRing: ThemeFocusRing
|
|
386
|
+
shadow: {
|
|
387
|
+
outline: number
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
color: ThemeColorSchemes_v2
|
|
391
|
+
container: number[]
|
|
392
|
+
font: ThemeFonts
|
|
393
|
+
input: ThemeInput
|
|
394
|
+
layer: ThemeLayer
|
|
395
|
+
media: number[]
|
|
396
|
+
radius: number[]
|
|
397
|
+
shadow: Array<ThemeShadow | null>
|
|
398
|
+
space: number[]
|
|
399
|
+
style?: ThemeStyles
|
|
400
|
+
}
|
|
301
401
|
|
|
302
402
|
/**
|
|
303
403
|
* Apply the \`screen\` blend mode
|
|
@@ -307,14 +407,9 @@ export declare type RootTheme = BaseTheme<ThemeStyles>
|
|
|
307
407
|
declare function screen_2(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
308
408
|
export {screen_2 as screen}
|
|
309
409
|
|
|
310
|
-
/**
|
|
311
|
-
* @public
|
|
312
|
-
*/
|
|
313
|
-
export declare const studioTheme: RootTheme
|
|
314
|
-
|
|
315
410
|
/**
|
|
316
411
|
* @deprecated Use `ThemeStyles` instead
|
|
317
|
-
* @
|
|
412
|
+
* @internal
|
|
318
413
|
*/
|
|
319
414
|
export declare type Styles = ThemeStyles
|
|
320
415
|
|
|
@@ -322,16 +417,23 @@ export declare type Styles = ThemeStyles
|
|
|
322
417
|
* @public
|
|
323
418
|
*/
|
|
324
419
|
export declare interface Theme {
|
|
325
|
-
sanity: Omit<RootTheme, 'color'> & {
|
|
420
|
+
sanity: Omit<RootTheme, 'color' | 'v2'> & {
|
|
326
421
|
color: ThemeColor
|
|
422
|
+
v2?: Theme_v2
|
|
327
423
|
}
|
|
328
424
|
}
|
|
329
425
|
|
|
330
|
-
/** @
|
|
426
|
+
/** @public */
|
|
331
427
|
export declare const THEME_COLOR_AVATAR_COLORS: ColorHueKey[]
|
|
332
428
|
|
|
333
|
-
/** @
|
|
334
|
-
export declare const
|
|
429
|
+
/** @public */
|
|
430
|
+
export declare const THEME_COLOR_BLEND_MODES: readonly ['multiply', 'screen']
|
|
431
|
+
|
|
432
|
+
/** @public */
|
|
433
|
+
export declare const THEME_COLOR_BUTTON_MODES: readonly ['default', 'ghost', 'bleed']
|
|
434
|
+
|
|
435
|
+
/** @public */
|
|
436
|
+
export declare const THEME_COLOR_CARD_TONES: readonly [
|
|
335
437
|
'transparent',
|
|
336
438
|
'default',
|
|
337
439
|
'primary',
|
|
@@ -340,16 +442,10 @@ export declare const THEME_COLOR_BASE_TONES: readonly [
|
|
|
340
442
|
'critical',
|
|
341
443
|
]
|
|
342
444
|
|
|
343
|
-
/** @
|
|
344
|
-
export declare const THEME_COLOR_BLEND_MODES: readonly ['multiply', 'screen']
|
|
345
|
-
|
|
346
|
-
/** @internal */
|
|
347
|
-
export declare const THEME_COLOR_BUTTON_MODES: readonly ['default', 'ghost', 'bleed']
|
|
348
|
-
|
|
349
|
-
/** @internal */
|
|
445
|
+
/** @public */
|
|
350
446
|
export declare const THEME_COLOR_INPUT_MODES: readonly ['default', 'invalid']
|
|
351
447
|
|
|
352
|
-
/** @
|
|
448
|
+
/** @public */
|
|
353
449
|
export declare const THEME_COLOR_INPUT_STATES: readonly [
|
|
354
450
|
'enabled',
|
|
355
451
|
'hovered',
|
|
@@ -357,7 +453,7 @@ export declare const THEME_COLOR_INPUT_STATES: readonly [
|
|
|
357
453
|
'disabled',
|
|
358
454
|
]
|
|
359
455
|
|
|
360
|
-
/** @
|
|
456
|
+
/** @public */
|
|
361
457
|
export declare const THEME_COLOR_STATE_TONES: readonly [
|
|
362
458
|
'default',
|
|
363
459
|
'primary',
|
|
@@ -366,7 +462,7 @@ export declare const THEME_COLOR_STATE_TONES: readonly [
|
|
|
366
462
|
'critical',
|
|
367
463
|
]
|
|
368
464
|
|
|
369
|
-
/** @
|
|
465
|
+
/** @public */
|
|
370
466
|
export declare const THEME_COLOR_STATES: readonly [
|
|
371
467
|
'enabled',
|
|
372
468
|
'hovered',
|
|
@@ -375,6 +471,13 @@ export declare const THEME_COLOR_STATES: readonly [
|
|
|
375
471
|
'disabled',
|
|
376
472
|
]
|
|
377
473
|
|
|
474
|
+
/**
|
|
475
|
+
* @public
|
|
476
|
+
*/
|
|
477
|
+
export declare type Theme_v2 = Omit<RootTheme_v2, 'color'> & {
|
|
478
|
+
color: ThemeColorCard_v2
|
|
479
|
+
}
|
|
480
|
+
|
|
378
481
|
/**
|
|
379
482
|
* @public
|
|
380
483
|
*/
|
|
@@ -395,131 +498,126 @@ export declare type ThemeBoxShadow = [number, number, number, number]
|
|
|
395
498
|
|
|
396
499
|
/**
|
|
397
500
|
* @public
|
|
501
|
+
* @deprecated Use `ThemeColor_v2` instead.
|
|
398
502
|
*/
|
|
399
|
-
export declare interface ThemeColor {
|
|
400
|
-
/** @internal */
|
|
401
|
-
_blend?: ThemeColorBlendModeKey
|
|
402
|
-
_dark?: boolean
|
|
403
|
-
avatar?: ThemeColorAvatar
|
|
404
|
-
badge?: ThemeColorBadge
|
|
503
|
+
export declare interface ThemeColor extends Partial<Omit<ThemeColorGenericState, 'muted'>> {
|
|
405
504
|
base: ThemeColorBase
|
|
406
505
|
button: ThemeColorButton
|
|
407
506
|
card: ThemeColorCard
|
|
408
|
-
input: ThemeColorInput
|
|
409
|
-
kbd?: ThemeColorKBD
|
|
410
|
-
selectable?: ThemeColorSelectable
|
|
411
|
-
syntax: ThemeColorSyntax
|
|
412
|
-
/** @deprecated Use `_dark` instead */
|
|
413
507
|
dark: boolean
|
|
414
|
-
|
|
508
|
+
focusRing?: string
|
|
509
|
+
input: ThemeColorInput
|
|
415
510
|
muted: ThemeColorMuted
|
|
416
|
-
|
|
417
|
-
spot: ThemeColorSpot
|
|
418
|
-
/** @deprecated */
|
|
511
|
+
selectable?: ThemeColorSelectable
|
|
419
512
|
solid: ThemeColorSolid
|
|
513
|
+
spot: ThemeColorSpot
|
|
514
|
+
syntax: ThemeColorSyntax
|
|
420
515
|
}
|
|
421
516
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
bg: string
|
|
436
|
-
fg: string
|
|
437
|
-
}
|
|
438
|
-
magenta: {
|
|
439
|
-
_blend?: ThemeColorBlendModeKey
|
|
440
|
-
bg: string
|
|
441
|
-
fg: string
|
|
442
|
-
}
|
|
443
|
-
red: {
|
|
444
|
-
_blend?: ThemeColorBlendModeKey
|
|
445
|
-
bg: string
|
|
446
|
-
fg: string
|
|
447
|
-
}
|
|
448
|
-
orange: {
|
|
449
|
-
_blend?: ThemeColorBlendModeKey
|
|
450
|
-
bg: string
|
|
451
|
-
fg: string
|
|
452
|
-
}
|
|
453
|
-
yellow: {
|
|
454
|
-
_blend?: ThemeColorBlendModeKey
|
|
455
|
-
bg: string
|
|
456
|
-
fg: string
|
|
457
|
-
}
|
|
458
|
-
green: {
|
|
459
|
-
_blend?: ThemeColorBlendModeKey
|
|
460
|
-
bg: string
|
|
461
|
-
fg: string
|
|
462
|
-
}
|
|
463
|
-
cyan: {
|
|
464
|
-
_blend?: ThemeColorBlendModeKey
|
|
465
|
-
bg: string
|
|
466
|
-
fg: string
|
|
467
|
-
}
|
|
517
|
+
/**
|
|
518
|
+
* @public
|
|
519
|
+
*/
|
|
520
|
+
export declare interface ThemeColorAvatar_v2 {
|
|
521
|
+
gray: ThemeColorAvatarHue_v2
|
|
522
|
+
blue: ThemeColorAvatarHue_v2
|
|
523
|
+
purple: ThemeColorAvatarHue_v2
|
|
524
|
+
magenta: ThemeColorAvatarHue_v2
|
|
525
|
+
red: ThemeColorAvatarHue_v2
|
|
526
|
+
orange: ThemeColorAvatarHue_v2
|
|
527
|
+
yellow: ThemeColorAvatarHue_v2
|
|
528
|
+
green: ThemeColorAvatarHue_v2
|
|
529
|
+
cyan: ThemeColorAvatarHue_v2
|
|
468
530
|
}
|
|
469
531
|
|
|
470
|
-
/** @
|
|
532
|
+
/** @public */
|
|
471
533
|
export declare type ThemeColorAvatarColorKey = (typeof THEME_COLOR_AVATAR_COLORS)[number]
|
|
472
534
|
|
|
473
|
-
|
|
535
|
+
/**
|
|
536
|
+
* @public
|
|
537
|
+
*/
|
|
538
|
+
export declare interface ThemeColorAvatarHue_v2 {
|
|
539
|
+
_blend?: ThemeColorBlendModeKey
|
|
540
|
+
bg: string
|
|
541
|
+
fg: string
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export declare interface ThemeColorAvatarHueTokens {
|
|
474
545
|
_blend?: ColorBlendModeTokenValue
|
|
475
546
|
_hue?: ColorHueKey
|
|
476
547
|
bg?: ThemeColorTokenValue
|
|
477
548
|
fg?: ThemeColorTokenValue
|
|
478
549
|
}
|
|
479
550
|
|
|
480
|
-
export declare interface
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
critical:
|
|
502
|
-
_blend?: ThemeColorBlendModeKey
|
|
503
|
-
bg: string
|
|
504
|
-
fg: string
|
|
505
|
-
}
|
|
551
|
+
export declare interface ThemeColorAvatarTokens {
|
|
552
|
+
'*'?: ThemeColorAvatarHueTokens
|
|
553
|
+
gray?: ThemeColorAvatarHueTokens
|
|
554
|
+
blue?: ThemeColorAvatarHueTokens
|
|
555
|
+
purple?: ThemeColorAvatarHueTokens
|
|
556
|
+
magenta?: ThemeColorAvatarHueTokens
|
|
557
|
+
red?: ThemeColorAvatarHueTokens
|
|
558
|
+
orange?: ThemeColorAvatarHueTokens
|
|
559
|
+
yellow?: ThemeColorAvatarHueTokens
|
|
560
|
+
green?: ThemeColorAvatarHueTokens
|
|
561
|
+
cyan?: ThemeColorAvatarHueTokens
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* @public
|
|
566
|
+
*/
|
|
567
|
+
export declare interface ThemeColorBadge_v2 {
|
|
568
|
+
default: ThemeColorBadgeTone_v2
|
|
569
|
+
primary: ThemeColorBadgeTone_v2
|
|
570
|
+
positive: ThemeColorBadgeTone_v2
|
|
571
|
+
caution: ThemeColorBadgeTone_v2
|
|
572
|
+
critical: ThemeColorBadgeTone_v2
|
|
506
573
|
}
|
|
507
574
|
|
|
508
575
|
export declare interface ThemeColorBadgeTokens {
|
|
576
|
+
_hue?: ColorHueKey
|
|
577
|
+
bg?: ThemeColorTokenValue
|
|
578
|
+
fg?: ThemeColorTokenValue
|
|
579
|
+
dot?: ThemeColorTokenValue
|
|
580
|
+
icon?: ThemeColorTokenValue
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
export declare interface ThemeColorBadgeTokens {
|
|
584
|
+
'*'?: ThemeColorBadgeToneTokens
|
|
585
|
+
default?: ThemeColorBadgeToneTokens
|
|
586
|
+
primary?: ThemeColorBadgeToneTokens
|
|
587
|
+
positive?: ThemeColorBadgeToneTokens
|
|
588
|
+
caution?: ThemeColorBadgeToneTokens
|
|
589
|
+
critical?: ThemeColorBadgeToneTokens
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* @public
|
|
594
|
+
*/
|
|
595
|
+
export declare interface ThemeColorBadgeTone_v2 {
|
|
596
|
+
bg: string
|
|
597
|
+
fg: string
|
|
598
|
+
dot: string
|
|
599
|
+
icon: string
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
export declare interface ThemeColorBadgeToneTokens {
|
|
509
603
|
_blend?: ColorBlendModeTokenValue
|
|
510
604
|
_hue?: ColorHueKey
|
|
511
605
|
bg?: ThemeColorTokenValue
|
|
606
|
+
dot?: ThemeColorTokenValue
|
|
512
607
|
fg?: ThemeColorTokenValue
|
|
608
|
+
icon?: ThemeColorTokenValue
|
|
513
609
|
}
|
|
514
610
|
|
|
515
611
|
/**
|
|
516
612
|
* @public
|
|
613
|
+
* @deprecated Use `ThemeColorCard_v2` instead.
|
|
517
614
|
*/
|
|
518
615
|
export declare interface ThemeColorBase {
|
|
519
616
|
bg: string
|
|
520
617
|
fg: string
|
|
521
618
|
border: string
|
|
522
619
|
focusRing: string
|
|
620
|
+
backdrop?: string
|
|
523
621
|
shadow: {
|
|
524
622
|
outline: string
|
|
525
623
|
umbra: string
|
|
@@ -532,29 +630,18 @@ export declare interface ThemeColorBase {
|
|
|
532
630
|
}
|
|
533
631
|
}
|
|
534
632
|
|
|
535
|
-
export declare interface ThemeColorBaseTokens {
|
|
536
|
-
_blend?: ColorBlendModeTokenValue
|
|
537
|
-
_hue?: ColorHueKey
|
|
538
|
-
bg?: ThemeColorTokenValue
|
|
539
|
-
fg?: ThemeColorTokenValue
|
|
540
|
-
border?: ThemeColorTokenValue
|
|
633
|
+
export declare interface ThemeColorBaseTokens extends ThemeColorStateTokens {
|
|
541
634
|
focusRing?: ThemeColorTokenValue
|
|
635
|
+
backdrop?: ThemeColorTokenValue
|
|
542
636
|
shadow?: {
|
|
543
637
|
outline?: ThemeColorTokenValue
|
|
544
638
|
umbra?: ThemeColorTokenValue
|
|
545
639
|
penumbra?: ThemeColorTokenValue
|
|
546
640
|
ambient?: ThemeColorTokenValue
|
|
547
641
|
}
|
|
548
|
-
skeleton?: {
|
|
549
|
-
from?: ThemeColorTokenValue
|
|
550
|
-
to?: ThemeColorTokenValue
|
|
551
|
-
}
|
|
552
642
|
}
|
|
553
643
|
|
|
554
|
-
/** @
|
|
555
|
-
export declare type ThemeColorBaseToneKey = (typeof THEME_COLOR_BASE_TONES)[number]
|
|
556
|
-
|
|
557
|
-
/** @internal */
|
|
644
|
+
/** @public */
|
|
558
645
|
export declare type ThemeColorBlendModeKey = (typeof THEME_COLOR_BLEND_MODES)[number]
|
|
559
646
|
|
|
560
647
|
/**
|
|
@@ -614,6 +701,7 @@ export declare interface ThemeColorBuilderOpts {
|
|
|
614
701
|
|
|
615
702
|
/**
|
|
616
703
|
* @public
|
|
704
|
+
* @deprecated
|
|
617
705
|
*/
|
|
618
706
|
export declare interface ThemeColorButton {
|
|
619
707
|
default: ThemeColorButtonTones
|
|
@@ -621,17 +709,27 @@ export declare interface ThemeColorButton {
|
|
|
621
709
|
bleed: ThemeColorButtonTones
|
|
622
710
|
}
|
|
623
711
|
|
|
624
|
-
/**
|
|
712
|
+
/**
|
|
713
|
+
* @public
|
|
714
|
+
*/
|
|
715
|
+
export declare interface ThemeColorButton_v2 {
|
|
716
|
+
default: ThemeColorButtonTones_v2
|
|
717
|
+
ghost: ThemeColorButtonTones_v2
|
|
718
|
+
bleed: ThemeColorButtonTones_v2
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/** @public */
|
|
625
722
|
export declare type ThemeColorButtonModeKey = (typeof THEME_COLOR_BUTTON_MODES)[number]
|
|
626
723
|
|
|
627
724
|
/**
|
|
628
|
-
* @deprecated Use `ThemeColorGenericState` instead.
|
|
629
725
|
* @public
|
|
726
|
+
* @deprecated Use `ThemeColorGenericState` instead.
|
|
630
727
|
*/
|
|
631
728
|
export declare type ThemeColorButtonState = ThemeColorGenericState
|
|
632
729
|
|
|
633
730
|
/**
|
|
634
731
|
* @public
|
|
732
|
+
* @deprecated
|
|
635
733
|
*/
|
|
636
734
|
export declare interface ThemeColorButtonStates {
|
|
637
735
|
enabled: ThemeColorGenericState
|
|
@@ -641,6 +739,17 @@ export declare interface ThemeColorButtonStates {
|
|
|
641
739
|
disabled: ThemeColorGenericState
|
|
642
740
|
}
|
|
643
741
|
|
|
742
|
+
/**
|
|
743
|
+
* @public
|
|
744
|
+
*/
|
|
745
|
+
export declare interface ThemeColorButtonStates_v2 {
|
|
746
|
+
enabled: ThemeColorState_v2
|
|
747
|
+
hovered: ThemeColorState_v2
|
|
748
|
+
pressed: ThemeColorState_v2
|
|
749
|
+
selected: ThemeColorState_v2
|
|
750
|
+
disabled: ThemeColorState_v2
|
|
751
|
+
}
|
|
752
|
+
|
|
644
753
|
export declare interface ThemeColorButtonTokens
|
|
645
754
|
extends Partial<Record<ColorConfigStateTone, ThemeColorStatesTokens>> {
|
|
646
755
|
_hue?: ColorHueKey
|
|
@@ -649,6 +758,7 @@ export declare interface ThemeColorButtonTokens
|
|
|
649
758
|
/**
|
|
650
759
|
* TODO: Rename to `ThemeColorButtonMode`.
|
|
651
760
|
* @public
|
|
761
|
+
* @deprecated
|
|
652
762
|
*/
|
|
653
763
|
export declare interface ThemeColorButtonTones {
|
|
654
764
|
default: ThemeColorButtonStates
|
|
@@ -659,8 +769,21 @@ export declare interface ThemeColorButtonTones {
|
|
|
659
769
|
}
|
|
660
770
|
|
|
661
771
|
/**
|
|
772
|
+
* TODO: Rename to `ThemeColorButtonMode`.
|
|
662
773
|
* @public
|
|
663
774
|
*/
|
|
775
|
+
export declare interface ThemeColorButtonTones_v2 {
|
|
776
|
+
default: ThemeColorButtonStates_v2
|
|
777
|
+
primary: ThemeColorButtonStates_v2
|
|
778
|
+
positive: ThemeColorButtonStates_v2
|
|
779
|
+
caution: ThemeColorButtonStates_v2
|
|
780
|
+
critical: ThemeColorButtonStates_v2
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* @public
|
|
785
|
+
* @deprecated
|
|
786
|
+
*/
|
|
664
787
|
export declare interface ThemeColorCard {
|
|
665
788
|
enabled: ThemeColorGenericState
|
|
666
789
|
hovered: ThemeColorGenericState
|
|
@@ -670,13 +793,33 @@ export declare interface ThemeColorCard {
|
|
|
670
793
|
}
|
|
671
794
|
|
|
672
795
|
/**
|
|
673
|
-
* @deprecated Use `ThemeColorGenericState` instead.
|
|
674
796
|
* @public
|
|
675
797
|
*/
|
|
798
|
+
export declare interface ThemeColorCard_v2 extends ThemeColorState_v2 {
|
|
799
|
+
/** @internal */
|
|
800
|
+
_blend: ThemeColorBlendModeKey
|
|
801
|
+
_dark: boolean
|
|
802
|
+
backdrop: string
|
|
803
|
+
button: ThemeColorButton_v2
|
|
804
|
+
focusRing: string
|
|
805
|
+
input: ThemeColorInput_v2
|
|
806
|
+
selectable: ThemeColorSelectable_v2
|
|
807
|
+
shadow: ThemeColorShadow
|
|
808
|
+
syntax: ThemeColorSyntax
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* @public
|
|
813
|
+
* @deprecated Use `ThemeColorGenericState` instead.
|
|
814
|
+
*/
|
|
676
815
|
export declare type ThemeColorCardState = ThemeColorGenericState
|
|
677
816
|
|
|
817
|
+
/** @public */
|
|
818
|
+
export declare type ThemeColorCardToneKey = (typeof THEME_COLOR_CARD_TONES)[number]
|
|
819
|
+
|
|
678
820
|
/**
|
|
679
821
|
* @public
|
|
822
|
+
* @deprecated Use `ThemeColorState_v2` instead.
|
|
680
823
|
*/
|
|
681
824
|
export declare interface ThemeColorGenericState {
|
|
682
825
|
/** @internal */
|
|
@@ -710,32 +853,57 @@ export declare interface ThemeColorGenericState {
|
|
|
710
853
|
|
|
711
854
|
/**
|
|
712
855
|
* @public
|
|
856
|
+
* @deprecated
|
|
713
857
|
*/
|
|
714
858
|
export declare interface ThemeColorInput {
|
|
715
859
|
default: ThemeColorInputStates
|
|
716
860
|
invalid: ThemeColorInputStates
|
|
717
861
|
}
|
|
718
862
|
|
|
719
|
-
/**
|
|
863
|
+
/**
|
|
864
|
+
* @public
|
|
865
|
+
*/
|
|
866
|
+
export declare interface ThemeColorInput_v2 {
|
|
867
|
+
default: ThemeColorInputStates_v2
|
|
868
|
+
invalid: ThemeColorInputStates_v2
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/** @public */
|
|
720
872
|
export declare type ThemeColorInputModeKey = (typeof THEME_COLOR_INPUT_MODES)[number]
|
|
721
873
|
|
|
722
874
|
/**
|
|
723
875
|
* @public
|
|
876
|
+
* @deprecated
|
|
724
877
|
*/
|
|
725
878
|
export declare interface ThemeColorInputState {
|
|
726
879
|
_blend?: ThemeColorBlendModeKey
|
|
727
880
|
bg: string
|
|
728
881
|
bg2: string
|
|
882
|
+
border: string
|
|
729
883
|
fg: string
|
|
884
|
+
placeholder: string
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* @public
|
|
889
|
+
*/
|
|
890
|
+
export declare interface ThemeColorInputState_v2 {
|
|
891
|
+
_blend?: ThemeColorBlendModeKey
|
|
892
|
+
bg: string
|
|
730
893
|
border: string
|
|
894
|
+
fg: string
|
|
895
|
+
muted: {
|
|
896
|
+
bg: string
|
|
897
|
+
}
|
|
731
898
|
placeholder: string
|
|
732
899
|
}
|
|
733
900
|
|
|
734
|
-
/** @
|
|
901
|
+
/** @public */
|
|
735
902
|
export declare type ThemeColorInputStateKey = (typeof THEME_COLOR_INPUT_STATES)[number]
|
|
736
903
|
|
|
737
904
|
/**
|
|
738
905
|
* @public
|
|
906
|
+
* @deprecated
|
|
739
907
|
*/
|
|
740
908
|
export declare interface ThemeColorInputStates {
|
|
741
909
|
enabled: ThemeColorInputState
|
|
@@ -744,13 +912,25 @@ export declare interface ThemeColorInputStates {
|
|
|
744
912
|
readOnly: ThemeColorInputState
|
|
745
913
|
}
|
|
746
914
|
|
|
915
|
+
/**
|
|
916
|
+
* @public
|
|
917
|
+
*/
|
|
918
|
+
export declare interface ThemeColorInputStates_v2 {
|
|
919
|
+
enabled: ThemeColorInputState_v2
|
|
920
|
+
disabled: ThemeColorInputState_v2
|
|
921
|
+
hovered: ThemeColorInputState_v2
|
|
922
|
+
readOnly: ThemeColorInputState_v2
|
|
923
|
+
}
|
|
924
|
+
|
|
747
925
|
export declare interface ThemeColorInputStateTokens {
|
|
748
926
|
_blend?: ColorBlendModeTokenValue
|
|
749
927
|
_hue?: ColorHueKey
|
|
750
928
|
bg?: ThemeColorTokenValue
|
|
751
|
-
bg2?: ThemeColorTokenValue
|
|
752
|
-
fg?: ThemeColorTokenValue
|
|
753
929
|
border?: ThemeColorTokenValue
|
|
930
|
+
fg?: ThemeColorTokenValue
|
|
931
|
+
muted?: {
|
|
932
|
+
bg?: ThemeColorTokenValue
|
|
933
|
+
}
|
|
754
934
|
placeholder?: ThemeColorTokenValue
|
|
755
935
|
}
|
|
756
936
|
|
|
@@ -759,8 +939,10 @@ export declare interface ThemeColorInputTokens
|
|
|
759
939
|
_hue?: ColorHueKey
|
|
760
940
|
}
|
|
761
941
|
|
|
942
|
+
/**
|
|
943
|
+
* @public
|
|
944
|
+
*/
|
|
762
945
|
export declare interface ThemeColorKBD {
|
|
763
|
-
_blend?: ThemeColorBlendModeKey
|
|
764
946
|
bg: string
|
|
765
947
|
fg: string
|
|
766
948
|
border: string
|
|
@@ -795,17 +977,24 @@ export declare interface ThemeColorMutedTone {
|
|
|
795
977
|
* @public
|
|
796
978
|
* @deprecated Use `ThemeColorBaseToneKey` instead.
|
|
797
979
|
*/
|
|
798
|
-
export declare type ThemeColorName =
|
|
980
|
+
export declare type ThemeColorName = ThemeColorCardToneKey
|
|
799
981
|
|
|
982
|
+
/** @public */
|
|
800
983
|
export declare type ThemeColorPalette = {
|
|
801
984
|
black: string | ColorTint
|
|
802
985
|
white: string | ColorTint
|
|
803
986
|
} & Record<ColorHueKey, Record<ColorTintKey, string | ColorTint>>
|
|
804
987
|
|
|
988
|
+
/**
|
|
989
|
+
* @public
|
|
990
|
+
* @deprecated Use `ThemeColorScheme_v2` instead.
|
|
991
|
+
*/
|
|
992
|
+
export declare type ThemeColorScheme = Record<ThemeColorCardToneKey, ThemeColor>
|
|
993
|
+
|
|
805
994
|
/**
|
|
806
995
|
* @public
|
|
807
996
|
*/
|
|
808
|
-
export declare type
|
|
997
|
+
export declare type ThemeColorScheme_v2 = Record<ThemeColorCardToneKey, ThemeColorCard_v2>
|
|
809
998
|
|
|
810
999
|
/**
|
|
811
1000
|
* @public
|
|
@@ -814,12 +1003,19 @@ export declare type ThemeColorSchemeKey = 'dark' | 'light'
|
|
|
814
1003
|
|
|
815
1004
|
/**
|
|
816
1005
|
* @public
|
|
1006
|
+
* @deprecated Use `ThemeColorSchemes_v2` instead.
|
|
817
1007
|
*/
|
|
818
1008
|
export declare type ThemeColorSchemes = Record<ThemeColorSchemeKey, ThemeColorScheme>
|
|
819
1009
|
|
|
820
1010
|
/**
|
|
821
1011
|
* @public
|
|
822
1012
|
*/
|
|
1013
|
+
export declare type ThemeColorSchemes_v2 = Record<ThemeColorSchemeKey, ThemeColorScheme_v2>
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* @public
|
|
1017
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
1018
|
+
*/
|
|
823
1019
|
export declare interface ThemeColorSelectable {
|
|
824
1020
|
default: ThemeColorSelectableStates
|
|
825
1021
|
primary: ThemeColorSelectableStates
|
|
@@ -829,13 +1025,25 @@ export declare interface ThemeColorSelectable {
|
|
|
829
1025
|
}
|
|
830
1026
|
|
|
831
1027
|
/**
|
|
832
|
-
* @deprecated Use `ThemeColorGenericState` instead.
|
|
833
1028
|
* @public
|
|
834
1029
|
*/
|
|
1030
|
+
export declare interface ThemeColorSelectable_v2 {
|
|
1031
|
+
default: ThemeColorSelectableStates_v2
|
|
1032
|
+
primary: ThemeColorSelectableStates_v2
|
|
1033
|
+
positive: ThemeColorSelectableStates_v2
|
|
1034
|
+
caution: ThemeColorSelectableStates_v2
|
|
1035
|
+
critical: ThemeColorSelectableStates_v2
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* @public
|
|
1040
|
+
* @deprecated Use `ThemeColorState_v2` instead.
|
|
1041
|
+
*/
|
|
835
1042
|
export declare type ThemeColorSelectableState = ThemeColorGenericState
|
|
836
1043
|
|
|
837
1044
|
/**
|
|
838
1045
|
* @public
|
|
1046
|
+
* @deprecated Use `ThemeColorSelectableStates_v2` instead.
|
|
839
1047
|
*/
|
|
840
1048
|
export declare interface ThemeColorSelectableStates {
|
|
841
1049
|
enabled: ThemeColorSelectableState
|
|
@@ -845,6 +1053,25 @@ export declare interface ThemeColorSelectableStates {
|
|
|
845
1053
|
disabled: ThemeColorSelectableState
|
|
846
1054
|
}
|
|
847
1055
|
|
|
1056
|
+
/**
|
|
1057
|
+
* @public
|
|
1058
|
+
*/
|
|
1059
|
+
export declare interface ThemeColorSelectableStates_v2 {
|
|
1060
|
+
enabled: ThemeColorState_v2
|
|
1061
|
+
hovered: ThemeColorState_v2
|
|
1062
|
+
pressed: ThemeColorState_v2
|
|
1063
|
+
selected: ThemeColorState_v2
|
|
1064
|
+
disabled: ThemeColorState_v2
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
/** @public */
|
|
1068
|
+
export declare interface ThemeColorShadow {
|
|
1069
|
+
outline: string
|
|
1070
|
+
umbra: string
|
|
1071
|
+
penumbra: string
|
|
1072
|
+
ambient: string
|
|
1073
|
+
}
|
|
1074
|
+
|
|
848
1075
|
/**
|
|
849
1076
|
* @public
|
|
850
1077
|
* @deprecated
|
|
@@ -872,17 +1099,50 @@ export declare interface ThemeColorSolidTone {
|
|
|
872
1099
|
|
|
873
1100
|
/**
|
|
874
1101
|
* @public
|
|
875
|
-
* @deprecated Use `
|
|
1102
|
+
* @deprecated Use `ThemeColorAvatar_v2` instead
|
|
876
1103
|
*/
|
|
877
1104
|
export declare type ThemeColorSpot = Record<ThemeColorSpotKey, string>
|
|
878
1105
|
|
|
879
1106
|
/**
|
|
880
1107
|
* @public
|
|
881
|
-
* @deprecated Use `
|
|
1108
|
+
* @deprecated Use `ThemeColorAvatarColorKey` instead
|
|
882
1109
|
*/
|
|
883
1110
|
export declare type ThemeColorSpotKey = ThemeColorAvatarColorKey
|
|
884
1111
|
|
|
885
|
-
/**
|
|
1112
|
+
/**
|
|
1113
|
+
* @public
|
|
1114
|
+
*/
|
|
1115
|
+
export declare interface ThemeColorState_v2 {
|
|
1116
|
+
/** @internal */
|
|
1117
|
+
_blend?: ThemeColorBlendModeKey
|
|
1118
|
+
accent: {
|
|
1119
|
+
fg: string
|
|
1120
|
+
}
|
|
1121
|
+
avatar: ThemeColorAvatar_v2
|
|
1122
|
+
badge: ThemeColorBadge_v2
|
|
1123
|
+
bg: string
|
|
1124
|
+
border: string
|
|
1125
|
+
code: {
|
|
1126
|
+
bg: string
|
|
1127
|
+
fg: string
|
|
1128
|
+
}
|
|
1129
|
+
fg: string
|
|
1130
|
+
icon: string
|
|
1131
|
+
kbd: ThemeColorKBD
|
|
1132
|
+
link: {
|
|
1133
|
+
fg: string
|
|
1134
|
+
}
|
|
1135
|
+
muted: {
|
|
1136
|
+
bg: string
|
|
1137
|
+
fg: string
|
|
1138
|
+
}
|
|
1139
|
+
skeleton: {
|
|
1140
|
+
from: string
|
|
1141
|
+
to: string
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
/** @public */
|
|
886
1146
|
export declare type ThemeColorStateKey = (typeof THEME_COLOR_STATES)[number]
|
|
887
1147
|
|
|
888
1148
|
export declare type ThemeColorStatesTokens = Partial<
|
|
@@ -892,21 +1152,28 @@ export declare type ThemeColorStatesTokens = Partial<
|
|
|
892
1152
|
export declare interface ThemeColorStateTokens {
|
|
893
1153
|
_blend?: ColorBlendModeTokenValue
|
|
894
1154
|
_hue?: ColorHueKey
|
|
1155
|
+
accent?: {
|
|
1156
|
+
fg?: ThemeColorTokenValue
|
|
1157
|
+
}
|
|
1158
|
+
avatar?: ThemeColorAvatarTokens
|
|
1159
|
+
badge?: ThemeColorBadgeTokens
|
|
895
1160
|
bg?: ThemeColorTokenValue
|
|
896
|
-
bg2?: ThemeColorTokenValue
|
|
897
|
-
fg?: ThemeColorTokenValue
|
|
898
|
-
icon?: ThemeColorTokenValue
|
|
899
1161
|
border?: ThemeColorTokenValue
|
|
900
|
-
|
|
1162
|
+
code?: {
|
|
1163
|
+
bg?: ThemeColorTokenValue
|
|
901
1164
|
fg?: ThemeColorTokenValue
|
|
902
1165
|
}
|
|
903
|
-
|
|
1166
|
+
fg?: ThemeColorTokenValue
|
|
1167
|
+
icon?: ThemeColorTokenValue
|
|
1168
|
+
kbd?: {
|
|
1169
|
+
bg?: ThemeColorTokenValue
|
|
904
1170
|
fg?: ThemeColorTokenValue
|
|
1171
|
+
border?: ThemeColorTokenValue
|
|
905
1172
|
}
|
|
906
1173
|
link?: {
|
|
907
1174
|
fg?: ThemeColorTokenValue
|
|
908
1175
|
}
|
|
909
|
-
|
|
1176
|
+
muted?: {
|
|
910
1177
|
bg?: ThemeColorTokenValue
|
|
911
1178
|
fg?: ThemeColorTokenValue
|
|
912
1179
|
}
|
|
@@ -916,7 +1183,7 @@ export declare interface ThemeColorStateTokens {
|
|
|
916
1183
|
}
|
|
917
1184
|
}
|
|
918
1185
|
|
|
919
|
-
/** @
|
|
1186
|
+
/** @public */
|
|
920
1187
|
export declare type ThemeColorStateToneKey = (typeof THEME_COLOR_STATE_TONES)[number]
|
|
921
1188
|
|
|
922
1189
|
/**
|
|
@@ -962,18 +1229,9 @@ export declare interface ThemeColorSyntax {
|
|
|
962
1229
|
}
|
|
963
1230
|
|
|
964
1231
|
export declare interface ThemeColorTokens {
|
|
965
|
-
|
|
966
|
-
badge?: Partial<Record<ColorConfigStateTone, ThemeColorBadgeTokens>>
|
|
967
|
-
base?: Partial<Record<ColorConfigBaseTone, ThemeColorBaseTokens>>
|
|
1232
|
+
base?: Partial<Record<ColorConfigCardTone, ThemeColorBaseTokens>>
|
|
968
1233
|
button?: Partial<Record<ThemeColorButtonModeKey, ThemeColorButtonTokens>>
|
|
969
|
-
card?: Partial<Record<ColorConfigState, ThemeColorStateTokens>>
|
|
970
1234
|
input?: Partial<Record<ColorConfigInputMode, ThemeColorInputTokens>>
|
|
971
|
-
kbd?: {
|
|
972
|
-
_blend?: ColorBlendModeTokenValue
|
|
973
|
-
bg?: ThemeColorTokenValue
|
|
974
|
-
fg?: ThemeColorTokenValue
|
|
975
|
-
border?: ThemeColorTokenValue
|
|
976
|
-
}
|
|
977
1235
|
selectable?: Partial<
|
|
978
1236
|
Record<
|
|
979
1237
|
ColorConfigStateTone,
|
|
@@ -982,18 +1240,19 @@ export declare interface ThemeColorTokens {
|
|
|
982
1240
|
} & ThemeColorStatesTokens
|
|
983
1241
|
>
|
|
984
1242
|
>
|
|
985
|
-
spot?: Partial<Record<ColorHueKey, ThemeColorTokenValue>>
|
|
986
1243
|
syntax?: Partial<Record<keyof ThemeColorSyntax, ThemeColorTokenValue>>
|
|
987
1244
|
}
|
|
988
1245
|
|
|
1246
|
+
/** @public */
|
|
989
1247
|
export declare type ThemeColorTokenValue = [ColorConfigValue, ColorConfigValue]
|
|
990
1248
|
|
|
991
1249
|
/**
|
|
992
1250
|
* @public
|
|
993
1251
|
* @deprecated Use `ThemeColorBaseToneKey` instead.
|
|
994
1252
|
*/
|
|
995
|
-
export declare type ThemeColorToneKey =
|
|
1253
|
+
export declare type ThemeColorToneKey = ThemeColorCardToneKey
|
|
996
1254
|
|
|
1255
|
+
/** @public */
|
|
997
1256
|
export declare interface ThemeConfig {
|
|
998
1257
|
avatar?: ThemeAvatar
|
|
999
1258
|
button?: {
|
|
@@ -1014,24 +1273,16 @@ export declare interface ThemeConfig {
|
|
|
1014
1273
|
}
|
|
1015
1274
|
color?: ThemeColorTokens
|
|
1016
1275
|
container?: number[]
|
|
1017
|
-
/** @deprecated Use component-specific `focusRing` values instead */
|
|
1018
|
-
focusRing?: {
|
|
1019
|
-
offset: number
|
|
1020
|
-
width: number
|
|
1021
|
-
}
|
|
1022
1276
|
fonts?: ThemeFonts
|
|
1023
1277
|
input?: ThemeInput
|
|
1024
|
-
/**
|
|
1025
|
-
* THIS API MAY BE UNSTABLE. DO NOT USE IN PRODUCTION.
|
|
1026
|
-
* @beta
|
|
1027
|
-
*/
|
|
1028
1278
|
layer?: ThemeLayer
|
|
1029
1279
|
media?: number[]
|
|
1030
1280
|
palette?: ThemeColorPalette
|
|
1031
1281
|
radius?: number[]
|
|
1032
|
-
|
|
1282
|
+
shadow?: Array<ThemeShadow | null>
|
|
1033
1283
|
space?: number[]
|
|
1034
|
-
|
|
1284
|
+
/** @internal */
|
|
1285
|
+
style?: ThemeStyles
|
|
1035
1286
|
}
|
|
1036
1287
|
|
|
1037
1288
|
/**
|
|
@@ -1128,8 +1379,7 @@ export declare interface ThemeInput {
|
|
|
1128
1379
|
}
|
|
1129
1380
|
|
|
1130
1381
|
/**
|
|
1131
|
-
*
|
|
1132
|
-
* @beta
|
|
1382
|
+
* @public
|
|
1133
1383
|
*/
|
|
1134
1384
|
export declare interface ThemeLayer {
|
|
1135
1385
|
dialog: {
|
|
@@ -1153,7 +1403,7 @@ export declare interface ThemeShadow {
|
|
|
1153
1403
|
}
|
|
1154
1404
|
|
|
1155
1405
|
/**
|
|
1156
|
-
* @
|
|
1406
|
+
* @internal
|
|
1157
1407
|
*/
|
|
1158
1408
|
export declare interface ThemeStyles {
|
|
1159
1409
|
button?: {
|
|
@@ -1164,17 +1414,20 @@ export declare interface ThemeStyles {
|
|
|
1164
1414
|
}
|
|
1165
1415
|
}
|
|
1166
1416
|
|
|
1417
|
+
/** @internal */
|
|
1167
1418
|
export declare interface TokenBaseKeyNode {
|
|
1168
1419
|
type: 'base'
|
|
1169
|
-
tone:
|
|
1170
|
-
key:
|
|
1420
|
+
tone: ColorConfigCardTone
|
|
1421
|
+
key: ColorConfigCardKey | ColorConfigBlendKey
|
|
1171
1422
|
}
|
|
1172
1423
|
|
|
1424
|
+
/** @internal */
|
|
1173
1425
|
export declare interface TokenBlendModeValueNode {
|
|
1174
1426
|
type: 'blendMode'
|
|
1175
1427
|
value?: ThemeColorBlendModeKey
|
|
1176
1428
|
}
|
|
1177
1429
|
|
|
1430
|
+
/** @internal */
|
|
1178
1431
|
export declare interface TokenButtonKeyNode {
|
|
1179
1432
|
type: 'button'
|
|
1180
1433
|
tone: ColorConfigStateTone
|
|
@@ -1182,6 +1435,7 @@ export declare interface TokenButtonKeyNode {
|
|
|
1182
1435
|
key: ColorConfigStateKey | ColorConfigBlendKey
|
|
1183
1436
|
}
|
|
1184
1437
|
|
|
1438
|
+
/** @internal */
|
|
1185
1439
|
export declare interface TokenColorValueNode {
|
|
1186
1440
|
type: 'color'
|
|
1187
1441
|
key?: 'black' | 'white' | `${ColorHueKey}/${ColorTintKey}` | ColorTintKey
|
|
@@ -1190,16 +1444,25 @@ export declare interface TokenColorValueNode {
|
|
|
1190
1444
|
opacity?: number
|
|
1191
1445
|
}
|
|
1192
1446
|
|
|
1447
|
+
/** @internal */
|
|
1193
1448
|
export declare interface TokenHueValueNode {
|
|
1194
1449
|
type: 'hue'
|
|
1195
1450
|
value?: ColorHueKey
|
|
1196
1451
|
}
|
|
1197
1452
|
|
|
1453
|
+
/** @internal */
|
|
1198
1454
|
export declare type TokenKeyNode = TokenBaseKeyNode | TokenButtonKeyNode
|
|
1199
1455
|
|
|
1456
|
+
/** @internal */
|
|
1200
1457
|
export declare type TokenValueNode =
|
|
1201
1458
|
| TokenColorValueNode
|
|
1202
1459
|
| TokenHueValueNode
|
|
1203
1460
|
| TokenBlendModeValueNode
|
|
1204
1461
|
|
|
1462
|
+
/** @internal */
|
|
1463
|
+
export declare function v0_v2(v0: RootTheme): RootTheme_v2
|
|
1464
|
+
|
|
1465
|
+
/** @internal */
|
|
1466
|
+
export declare function v2_v0(v2: RootTheme_v2): RootTheme
|
|
1467
|
+
|
|
1205
1468
|
export {}
|