@sanity/ui 2.0.10 → 2.0.11
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.d.mts +2777 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +129 -129
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6852 -0
- package/dist/index.mjs.map +1 -0
- package/dist/theme.d.mts +1506 -0
- package/dist/theme.mjs +3348 -0
- package/dist/theme.mjs.map +1 -0
- package/package.json +37 -38
- package/src/core/components/autocomplete/autocomplete.styles.tsx +1 -1
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +1 -1
- package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
- package/src/core/components/dialog/dialog.tsx +1 -1
- package/src/core/components/hotkeys/hotkeys.tsx +1 -1
- package/src/core/components/menu/menu.tsx +1 -1
- package/src/core/components/menu/menuDivider.ts +1 -1
- package/src/core/components/skeleton/skeleton.tsx +1 -1
- package/src/core/components/skeleton/textSkeleton.tsx +1 -1
- package/src/core/components/tab/tab.tsx +1 -1
- package/src/core/components/tab/tabList.tsx +1 -1
- package/src/core/components/toast/toast.tsx +1 -1
- package/src/core/components/toast/toastProvider.tsx +1 -1
- package/src/core/components/tree/treeItem.tsx +1 -1
- package/src/core/primitives/_selectable/selectable.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +1 -1
- package/src/core/primitives/avatar/avatarCounter.tsx +1 -1
- package/src/core/primitives/avatar/avatarStack.tsx +1 -1
- package/src/core/primitives/badge/badge.tsx +1 -1
- package/src/core/primitives/box/box.tsx +1 -1
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
- package/src/core/primitives/button/button.tsx +1 -1
- package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
- package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
- package/src/core/primitives/card/card.tsx +1 -1
- package/src/core/primitives/checkbox/checkbox.tsx +1 -1
- package/src/core/primitives/code/code.tsx +1 -1
- package/src/core/primitives/container/container.tsx +1 -1
- package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
- package/src/core/primitives/flex/flex.tsx +1 -1
- package/src/core/primitives/grid/grid.tsx +1 -1
- package/src/core/primitives/heading/heading.tsx +1 -1
- package/src/core/primitives/inline/inline.tsx +1 -1
- package/src/core/primitives/kbd/kbd.tsx +1 -1
- package/src/core/primitives/label/label.tsx +1 -1
- package/src/core/primitives/popover/popoverCard.tsx +1 -1
- package/src/core/primitives/radio/radio.tsx +1 -1
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/spinner/spinner.tsx +1 -1
- package/src/core/primitives/stack/stack.tsx +1 -1
- package/src/core/primitives/switch/switch.tsx +1 -1
- package/src/core/primitives/text/__workshop__/colored.tsx +1 -1
- package/src/core/primitives/text/text.tsx +1 -1
- package/src/core/primitives/textArea/textArea.tsx +1 -1
- package/src/core/primitives/textInput/textInput.tsx +1 -1
- package/src/core/primitives/tooltip/tooltip.tsx +1 -1
- package/src/core/primitives/tooltip/tooltipCard.tsx +1 -1
- package/src/core/utils/arrow/arrow.tsx +1 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
- package/src/core/utils/layer/layer.tsx +1 -1
- package/src/core/utils/srOnly/srOnly.tsx +1 -1
- package/src/core/utils/virtualList/virtualList.tsx +1 -1
package/dist/theme.d.mts
ADDED
|
@@ -0,0 +1,1506 @@
|
|
|
1
|
+
import {ColorHueKey} from '@sanity/color'
|
|
2
|
+
import {ColorTint} from '@sanity/color'
|
|
3
|
+
import {ColorTintKey} from '@sanity/color'
|
|
4
|
+
import type {StyledObject} from 'styled-components'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare interface BaseTheme {
|
|
10
|
+
_version?: 0
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `v2.avatar` instead
|
|
13
|
+
*/
|
|
14
|
+
avatar: ThemeAvatar
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `v2.button` instead
|
|
17
|
+
*/
|
|
18
|
+
button: {
|
|
19
|
+
textWeight: ThemeFontWeightKey
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Use `v2.color` instead
|
|
23
|
+
*/
|
|
24
|
+
color: ThemeColorSchemes
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Use `v2.container` instead
|
|
27
|
+
*/
|
|
28
|
+
container: number[]
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Use component-specific `v2.{button | card | input}.focusRing` values instead
|
|
31
|
+
*/
|
|
32
|
+
focusRing: {
|
|
33
|
+
offset: number
|
|
34
|
+
width: number
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Use `v2.font` instead
|
|
38
|
+
*/
|
|
39
|
+
fonts: ThemeFonts
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use `v2.input` instead
|
|
42
|
+
*/
|
|
43
|
+
input: ThemeInput
|
|
44
|
+
/**
|
|
45
|
+
* THIS API MAY BE UNSTABLE. DO NOT USE IN PRODUCTION.
|
|
46
|
+
* @beta
|
|
47
|
+
* @deprecated Use `v2.layer` instead
|
|
48
|
+
*/
|
|
49
|
+
layer?: ThemeLayer
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Use `v2.media` instead
|
|
52
|
+
*/
|
|
53
|
+
media: number[]
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated Use `v2.radius` instead
|
|
56
|
+
*/
|
|
57
|
+
radius: number[]
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Use `v2.shadow` instead
|
|
60
|
+
*/
|
|
61
|
+
shadows: Array<ThemeShadow | null>
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Use `v2.space` instead
|
|
64
|
+
*/
|
|
65
|
+
space: number[]
|
|
66
|
+
/**
|
|
67
|
+
* @internal
|
|
68
|
+
* @deprecated Use `v2.style` instead
|
|
69
|
+
*/
|
|
70
|
+
styles?: ThemeStyles
|
|
71
|
+
v2?: RootTheme_v2
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export declare function buildTheme(config?: ThemeConfig): RootTheme
|
|
76
|
+
|
|
77
|
+
/** @public */
|
|
78
|
+
export declare const COLOR_CONFIG_AVATAR_COLORS: readonly ['*', ...ColorHueKey[]]
|
|
79
|
+
|
|
80
|
+
/** @public */
|
|
81
|
+
export declare const COLOR_CONFIG_BLEND_KEYS: readonly ['_blend']
|
|
82
|
+
|
|
83
|
+
/** @public */
|
|
84
|
+
export declare const COLOR_CONFIG_CARD_KEYS: readonly [
|
|
85
|
+
'_hue',
|
|
86
|
+
'bg',
|
|
87
|
+
'fg',
|
|
88
|
+
'border',
|
|
89
|
+
'focusRing',
|
|
90
|
+
'muted/fg',
|
|
91
|
+
'accent/fg',
|
|
92
|
+
'link/fg',
|
|
93
|
+
'code/bg',
|
|
94
|
+
'code/fg',
|
|
95
|
+
'skeleton/from',
|
|
96
|
+
'skeleton/to',
|
|
97
|
+
'status/dot',
|
|
98
|
+
'status/icon',
|
|
99
|
+
'_hue',
|
|
100
|
+
'bg',
|
|
101
|
+
'fg',
|
|
102
|
+
'border',
|
|
103
|
+
'focusRing',
|
|
104
|
+
'shadow/outline',
|
|
105
|
+
'shadow/umbra',
|
|
106
|
+
'shadow/penumbra',
|
|
107
|
+
'shadow/ambient',
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
/** @public */
|
|
111
|
+
export declare const COLOR_CONFIG_CARD_TONES: readonly [
|
|
112
|
+
'*',
|
|
113
|
+
'transparent',
|
|
114
|
+
'default',
|
|
115
|
+
'primary',
|
|
116
|
+
'positive',
|
|
117
|
+
'caution',
|
|
118
|
+
'critical',
|
|
119
|
+
]
|
|
120
|
+
|
|
121
|
+
/** @public */
|
|
122
|
+
export declare const COLOR_CONFIG_INPUT_MODES: readonly ['*', 'default', 'invalid']
|
|
123
|
+
|
|
124
|
+
/** @public */
|
|
125
|
+
export declare const COLOR_CONFIG_INPUT_STATES: readonly [
|
|
126
|
+
'*',
|
|
127
|
+
'enabled',
|
|
128
|
+
'hovered',
|
|
129
|
+
'readOnly',
|
|
130
|
+
'disabled',
|
|
131
|
+
]
|
|
132
|
+
|
|
133
|
+
/** @public */
|
|
134
|
+
export declare const COLOR_CONFIG_STATE_KEYS: readonly [
|
|
135
|
+
'_hue',
|
|
136
|
+
'bg',
|
|
137
|
+
'fg',
|
|
138
|
+
'border',
|
|
139
|
+
'focusRing',
|
|
140
|
+
'muted/fg',
|
|
141
|
+
'accent/fg',
|
|
142
|
+
'link/fg',
|
|
143
|
+
'code/bg',
|
|
144
|
+
'code/fg',
|
|
145
|
+
'skeleton/from',
|
|
146
|
+
'skeleton/to',
|
|
147
|
+
'status/dot',
|
|
148
|
+
'status/icon',
|
|
149
|
+
]
|
|
150
|
+
|
|
151
|
+
/** @public */
|
|
152
|
+
export declare const COLOR_CONFIG_STATE_TONES: readonly [
|
|
153
|
+
'*',
|
|
154
|
+
'default',
|
|
155
|
+
'primary',
|
|
156
|
+
'positive',
|
|
157
|
+
'caution',
|
|
158
|
+
'critical',
|
|
159
|
+
]
|
|
160
|
+
|
|
161
|
+
/** @public */
|
|
162
|
+
export declare const COLOR_CONFIG_STATES: readonly [
|
|
163
|
+
'*',
|
|
164
|
+
'enabled',
|
|
165
|
+
'hovered',
|
|
166
|
+
'pressed',
|
|
167
|
+
'selected',
|
|
168
|
+
'disabled',
|
|
169
|
+
]
|
|
170
|
+
|
|
171
|
+
/** @public */
|
|
172
|
+
export declare type ColorBlendModeTokenValue = [ThemeColorBlendModeKey, ThemeColorBlendModeKey]
|
|
173
|
+
|
|
174
|
+
/** @public */
|
|
175
|
+
export declare type ColorConfigAvatarColor = (typeof COLOR_CONFIG_AVATAR_COLORS)[number]
|
|
176
|
+
|
|
177
|
+
/** @public */
|
|
178
|
+
export declare type ColorConfigBlendKey = (typeof COLOR_CONFIG_BLEND_KEYS)[number]
|
|
179
|
+
|
|
180
|
+
/** @public */
|
|
181
|
+
export declare type ColorConfigCardKey = (typeof COLOR_CONFIG_CARD_KEYS)[number]
|
|
182
|
+
|
|
183
|
+
/** @public */
|
|
184
|
+
export declare type ColorConfigCardTone = (typeof COLOR_CONFIG_CARD_TONES)[number]
|
|
185
|
+
|
|
186
|
+
/** @public */
|
|
187
|
+
export declare type ColorConfigInputMode = (typeof COLOR_CONFIG_INPUT_MODES)[number]
|
|
188
|
+
|
|
189
|
+
/** @public */
|
|
190
|
+
export declare type ColorConfigInputState = (typeof COLOR_CONFIG_INPUT_STATES)[number]
|
|
191
|
+
|
|
192
|
+
/** @public */
|
|
193
|
+
export declare type ColorConfigOpacityValue = `0` | `0.${number}` | `1`
|
|
194
|
+
|
|
195
|
+
/** @public */
|
|
196
|
+
export declare type ColorConfigState = (typeof COLOR_CONFIG_STATES)[number]
|
|
197
|
+
|
|
198
|
+
/** @public */
|
|
199
|
+
export declare type ColorConfigStateKey = (typeof COLOR_CONFIG_STATE_KEYS)[number]
|
|
200
|
+
|
|
201
|
+
/** @public */
|
|
202
|
+
export declare type ColorConfigStateTone = (typeof COLOR_CONFIG_STATE_TONES)[number]
|
|
203
|
+
|
|
204
|
+
/** @public */
|
|
205
|
+
export declare type ColorConfigValue =
|
|
206
|
+
| `black`
|
|
207
|
+
| `white`
|
|
208
|
+
| `black/${ColorConfigOpacityValue}`
|
|
209
|
+
| `white/${ColorConfigOpacityValue}`
|
|
210
|
+
| `${ColorHueKey}`
|
|
211
|
+
| `${ColorHueKey} ${number}%`
|
|
212
|
+
| `${ColorHueKey}/${ColorTintKey}`
|
|
213
|
+
| `${ColorHueKey}/${ColorTintKey} ${number}%`
|
|
214
|
+
| `${ColorHueKey}/${ColorTintKey}/${ColorConfigOpacityValue}`
|
|
215
|
+
| `${ColorTintKey}`
|
|
216
|
+
| `${ColorTintKey} ${number}%`
|
|
217
|
+
| `${ColorTintKey}/${ColorConfigOpacityValue}`
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @public
|
|
221
|
+
* @deprecated Use `buildColorTheme` instead.
|
|
222
|
+
*/
|
|
223
|
+
export declare function createColorTheme(
|
|
224
|
+
partialOpts?: PartialThemeColorBuilderOpts,
|
|
225
|
+
): ThemeColorSchemes
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Work around types that are missing in `styled-components@6`
|
|
229
|
+
* https://github.com/styled-components/styled-components/issues/4062
|
|
230
|
+
* @internal
|
|
231
|
+
* */
|
|
232
|
+
export declare type CSSObject = StyledObject<any>
|
|
233
|
+
|
|
234
|
+
/** @internal */
|
|
235
|
+
export declare function getContrastRatio(bg: string, fg: string): number
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export declare function getScopedTheme(
|
|
239
|
+
themeProp: RootTheme | RootTheme_v2,
|
|
240
|
+
scheme: ThemeColorSchemeKey,
|
|
241
|
+
tone: ThemeColorCardToneKey,
|
|
242
|
+
): Theme
|
|
243
|
+
|
|
244
|
+
/** @public */
|
|
245
|
+
export declare function getTheme_v2(theme: Theme): Theme_v2
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @internal
|
|
249
|
+
*/
|
|
250
|
+
export declare function hexToRgb(hex: string): RGB
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* @internal
|
|
254
|
+
*/
|
|
255
|
+
export declare interface HSL {
|
|
256
|
+
h: number
|
|
257
|
+
s: number
|
|
258
|
+
l: number
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @internal
|
|
263
|
+
*/
|
|
264
|
+
export declare function hslToRgb(hsl: HSL): RGB
|
|
265
|
+
|
|
266
|
+
/** @internal */
|
|
267
|
+
export declare function is_v0(themeProp: RootTheme | RootTheme_v2): themeProp is RootTheme
|
|
268
|
+
|
|
269
|
+
/** @internal */
|
|
270
|
+
export declare function is_v2(themeProp: RootTheme | RootTheme_v2): themeProp is RootTheme_v2
|
|
271
|
+
|
|
272
|
+
/** @internal */
|
|
273
|
+
export declare function isColorBlendModeValue(str: string): str is ThemeColorBlendModeKey
|
|
274
|
+
|
|
275
|
+
/** @internal */
|
|
276
|
+
export declare function isColorButtonMode(str: string): str is ThemeColorButtonModeKey
|
|
277
|
+
|
|
278
|
+
/** @internal */
|
|
279
|
+
export declare function isColorConfigBaseKey(str: string): str is ColorConfigCardKey
|
|
280
|
+
|
|
281
|
+
/** @internal */
|
|
282
|
+
export declare function isColorConfigBaseTone(str: string): str is ColorConfigCardTone
|
|
283
|
+
|
|
284
|
+
/** @internal */
|
|
285
|
+
export declare function isColorConfigBlendKey(str: string): str is ColorConfigBlendKey
|
|
286
|
+
|
|
287
|
+
/** @internal */
|
|
288
|
+
export declare function isColorConfigStateKey(str: string): str is ColorConfigStateKey
|
|
289
|
+
|
|
290
|
+
/** @internal */
|
|
291
|
+
export declare function isColorConfigStateTone(str: string): str is ColorConfigStateTone
|
|
292
|
+
|
|
293
|
+
/** @internal */
|
|
294
|
+
export declare function isColorHueKey(str: string): str is ColorHueKey
|
|
295
|
+
|
|
296
|
+
/** @internal */
|
|
297
|
+
export declare function isColorOpacityValue(str: string): str is ColorConfigOpacityValue
|
|
298
|
+
|
|
299
|
+
/** @internal */
|
|
300
|
+
export declare function isColorTintKey(str: string): str is ColorTintKey
|
|
301
|
+
|
|
302
|
+
/** @internal */
|
|
303
|
+
export declare function isColorTokenValue(str: string): str is ColorConfigValue
|
|
304
|
+
|
|
305
|
+
/** @internal */
|
|
306
|
+
export declare function isColorValue(str: string): str is 'black' | 'white'
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Apply the \`mix\` blend mode
|
|
310
|
+
* @internal
|
|
311
|
+
*/
|
|
312
|
+
export declare function mix(b: RGB | RGBA, s: RGB | RGBA, weight: number): RGB
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* Apply the \`multiply\` blend mode
|
|
316
|
+
* Source: https://www.w3.org/TR/compositing-1/#blendingmultiply
|
|
317
|
+
* @internal
|
|
318
|
+
*/
|
|
319
|
+
export declare function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @internal
|
|
323
|
+
*/
|
|
324
|
+
export declare function parseColor(color: unknown): RGB | RGBA
|
|
325
|
+
|
|
326
|
+
/** @internal */
|
|
327
|
+
export declare function parseTokenKey(str: string): TokenKeyNode | undefined
|
|
328
|
+
|
|
329
|
+
/** @internal */
|
|
330
|
+
export declare function parseTokenValue(str: string): TokenValueNode | undefined
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* @public
|
|
334
|
+
* @deprecated Use `ThemeConfig` instead.
|
|
335
|
+
*/
|
|
336
|
+
export declare type PartialThemeColorBuilderOpts = Partial<ThemeColorBuilderOpts>
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* @internal
|
|
340
|
+
*/
|
|
341
|
+
export declare interface RGB {
|
|
342
|
+
r: number
|
|
343
|
+
g: number
|
|
344
|
+
b: number
|
|
345
|
+
a?: undefined
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* @internal
|
|
350
|
+
*/
|
|
351
|
+
export declare interface RGBA {
|
|
352
|
+
r: number
|
|
353
|
+
g: number
|
|
354
|
+
b: number
|
|
355
|
+
a: number
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* @internal
|
|
360
|
+
*/
|
|
361
|
+
export declare function rgba(color: unknown, a: number): string
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* @internal
|
|
365
|
+
*/
|
|
366
|
+
export declare function rgbaToRGBA(rgba: string): RGBA
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @internal
|
|
370
|
+
*/
|
|
371
|
+
export declare function rgbToHex(color: RGB | RGBA): string
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @internal
|
|
375
|
+
* @see https://css-tricks.com/converting-color-spaces-in-javascript/
|
|
376
|
+
*/
|
|
377
|
+
export declare function rgbToHsl({r, g, b}: RGB): HSL
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* @public
|
|
381
|
+
*/
|
|
382
|
+
export declare type RootTheme = BaseTheme
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* @public
|
|
386
|
+
*/
|
|
387
|
+
export declare interface RootTheme_v2 {
|
|
388
|
+
_version: 2
|
|
389
|
+
avatar: ThemeAvatar_v2
|
|
390
|
+
button: {
|
|
391
|
+
border: {
|
|
392
|
+
width: number
|
|
393
|
+
}
|
|
394
|
+
focusRing: ThemeFocusRing
|
|
395
|
+
textWeight: ThemeFontWeightKey
|
|
396
|
+
}
|
|
397
|
+
card: {
|
|
398
|
+
border: {
|
|
399
|
+
width: number
|
|
400
|
+
}
|
|
401
|
+
focusRing: ThemeFocusRing
|
|
402
|
+
shadow: {
|
|
403
|
+
outline: number
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
color: ThemeColorSchemes_v2
|
|
407
|
+
container: number[]
|
|
408
|
+
font: ThemeFonts
|
|
409
|
+
input: ThemeInput_v2
|
|
410
|
+
layer: ThemeLayer
|
|
411
|
+
media: number[]
|
|
412
|
+
radius: number[]
|
|
413
|
+
shadow: Array<ThemeShadow | null>
|
|
414
|
+
space: number[]
|
|
415
|
+
/** @internal */
|
|
416
|
+
style?: ThemeStyles
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Apply the \`screen\` blend mode
|
|
421
|
+
* Source: https://www.w3.org/TR/compositing-1/#blendingscreen
|
|
422
|
+
* @internal
|
|
423
|
+
*/
|
|
424
|
+
declare function screen_2(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
425
|
+
export {screen_2 as screen}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* @public
|
|
429
|
+
*/
|
|
430
|
+
export declare interface Theme {
|
|
431
|
+
sanity: Omit<RootTheme, 'color' | 'v2'> & {
|
|
432
|
+
/**
|
|
433
|
+
* @deprecated Use `v2.color` instead
|
|
434
|
+
*/
|
|
435
|
+
color: ThemeColor
|
|
436
|
+
v2?: Theme_v2
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/** @public */
|
|
441
|
+
export declare const THEME_COLOR_AVATAR_COLORS: ColorHueKey[]
|
|
442
|
+
|
|
443
|
+
/** @public */
|
|
444
|
+
export declare const THEME_COLOR_BLEND_MODES: readonly ['multiply', 'screen']
|
|
445
|
+
|
|
446
|
+
/** @public */
|
|
447
|
+
export declare const THEME_COLOR_BUTTON_MODES: readonly ['default', 'ghost', 'bleed']
|
|
448
|
+
|
|
449
|
+
/** @public */
|
|
450
|
+
export declare const THEME_COLOR_CARD_TONES: readonly [
|
|
451
|
+
'transparent',
|
|
452
|
+
'default',
|
|
453
|
+
'primary',
|
|
454
|
+
'positive',
|
|
455
|
+
'caution',
|
|
456
|
+
'critical',
|
|
457
|
+
]
|
|
458
|
+
|
|
459
|
+
/** @public */
|
|
460
|
+
export declare const THEME_COLOR_INPUT_MODES: readonly ['default', 'invalid']
|
|
461
|
+
|
|
462
|
+
/** @public */
|
|
463
|
+
export declare const THEME_COLOR_INPUT_STATES: readonly [
|
|
464
|
+
'enabled',
|
|
465
|
+
'hovered',
|
|
466
|
+
'readOnly',
|
|
467
|
+
'disabled',
|
|
468
|
+
]
|
|
469
|
+
|
|
470
|
+
/** @public */
|
|
471
|
+
export declare const THEME_COLOR_SCHEMES: readonly ['light', 'dark']
|
|
472
|
+
|
|
473
|
+
/** @public */
|
|
474
|
+
export declare const THEME_COLOR_STATE_TONES: readonly [
|
|
475
|
+
'default',
|
|
476
|
+
'primary',
|
|
477
|
+
'positive',
|
|
478
|
+
'caution',
|
|
479
|
+
'critical',
|
|
480
|
+
]
|
|
481
|
+
|
|
482
|
+
/** @public */
|
|
483
|
+
export declare const THEME_COLOR_STATES: readonly [
|
|
484
|
+
'enabled',
|
|
485
|
+
'hovered',
|
|
486
|
+
'pressed',
|
|
487
|
+
'selected',
|
|
488
|
+
'disabled',
|
|
489
|
+
]
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* @public
|
|
493
|
+
*/
|
|
494
|
+
export declare type Theme_v2 = Omit<RootTheme_v2, 'color'> & {
|
|
495
|
+
color: ThemeColorCard_v2
|
|
496
|
+
/**
|
|
497
|
+
* Indicates whether the theme is resolved or raw, it's necessary to avoid issues
|
|
498
|
+
* with sanity V2 components accessing a v1 <ThemeProvider>.
|
|
499
|
+
* See https://github.com/sanity-io/ui/pull/1203 for more info.
|
|
500
|
+
*/
|
|
501
|
+
_resolved: boolean
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* @public
|
|
506
|
+
* @deprecated Use `ThemeAvatar_v2` from `@sanity/ui/theme` instead.
|
|
507
|
+
*/
|
|
508
|
+
export declare interface ThemeAvatar {
|
|
509
|
+
sizes: {
|
|
510
|
+
distance: number
|
|
511
|
+
size: number
|
|
512
|
+
}[]
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* @public
|
|
517
|
+
*/
|
|
518
|
+
export declare interface ThemeAvatar_v2 {
|
|
519
|
+
sizes: {
|
|
520
|
+
/** Spacing between avatars in an <AvatarStack> component (px) */
|
|
521
|
+
distance: number
|
|
522
|
+
/** Diameter of the avatar (px) */
|
|
523
|
+
size: number
|
|
524
|
+
}[]
|
|
525
|
+
focusRing: ThemeFocusRing
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* @public
|
|
530
|
+
*/
|
|
531
|
+
export declare type ThemeBoxShadow = [number, number, number, number]
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* @public
|
|
535
|
+
* @deprecated Use `ThemeColor_v2` instead.
|
|
536
|
+
*/
|
|
537
|
+
export declare interface ThemeColor extends Partial<Omit<ThemeColorGenericState, 'muted'>> {
|
|
538
|
+
base: ThemeColorBase
|
|
539
|
+
button: ThemeColorButton
|
|
540
|
+
card: ThemeColorCard
|
|
541
|
+
dark: boolean
|
|
542
|
+
input: ThemeColorInput
|
|
543
|
+
muted: ThemeColorMuted
|
|
544
|
+
selectable?: ThemeColorSelectable
|
|
545
|
+
solid: ThemeColorSolid
|
|
546
|
+
spot: ThemeColorSpot
|
|
547
|
+
syntax: ThemeColorSyntax
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* @public
|
|
552
|
+
*/
|
|
553
|
+
export declare type ThemeColorAvatar_v2 = Record<ThemeColorAvatarColorKey, ThemeColorAvatarHue_v2>
|
|
554
|
+
|
|
555
|
+
/** @public */
|
|
556
|
+
export declare type ThemeColorAvatarColorKey = (typeof THEME_COLOR_AVATAR_COLORS)[number]
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* @public
|
|
560
|
+
*/
|
|
561
|
+
export declare interface ThemeColorAvatarHue_v2 {
|
|
562
|
+
_blend?: ThemeColorBlendModeKey
|
|
563
|
+
bg: string
|
|
564
|
+
fg: string
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/** @public */
|
|
568
|
+
export declare interface ThemeColorAvatarHueTokens {
|
|
569
|
+
_blend?: ColorBlendModeTokenValue
|
|
570
|
+
_hue?: ColorHueKey
|
|
571
|
+
bg?: ThemeColorTokenValue
|
|
572
|
+
fg?: ThemeColorTokenValue
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/** @public */
|
|
576
|
+
export declare interface ThemeColorAvatarTokens {
|
|
577
|
+
'*'?: ThemeColorAvatarHueTokens
|
|
578
|
+
gray?: ThemeColorAvatarHueTokens
|
|
579
|
+
blue?: ThemeColorAvatarHueTokens
|
|
580
|
+
purple?: ThemeColorAvatarHueTokens
|
|
581
|
+
magenta?: ThemeColorAvatarHueTokens
|
|
582
|
+
red?: ThemeColorAvatarHueTokens
|
|
583
|
+
orange?: ThemeColorAvatarHueTokens
|
|
584
|
+
yellow?: ThemeColorAvatarHueTokens
|
|
585
|
+
green?: ThemeColorAvatarHueTokens
|
|
586
|
+
cyan?: ThemeColorAvatarHueTokens
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* @public
|
|
591
|
+
*/
|
|
592
|
+
export declare interface ThemeColorBadge_v2 {
|
|
593
|
+
default: ThemeColorBadgeTone_v2
|
|
594
|
+
primary: ThemeColorBadgeTone_v2
|
|
595
|
+
positive: ThemeColorBadgeTone_v2
|
|
596
|
+
caution: ThemeColorBadgeTone_v2
|
|
597
|
+
critical: ThemeColorBadgeTone_v2
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
/** @public */
|
|
601
|
+
export declare interface ThemeColorBadgeTokens {
|
|
602
|
+
_hue?: ColorHueKey
|
|
603
|
+
bg?: ThemeColorTokenValue
|
|
604
|
+
fg?: ThemeColorTokenValue
|
|
605
|
+
dot?: ThemeColorTokenValue
|
|
606
|
+
icon?: ThemeColorTokenValue
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/** @public */
|
|
610
|
+
export declare interface ThemeColorBadgeTokens {
|
|
611
|
+
'*'?: ThemeColorBadgeToneTokens
|
|
612
|
+
default?: ThemeColorBadgeToneTokens
|
|
613
|
+
primary?: ThemeColorBadgeToneTokens
|
|
614
|
+
positive?: ThemeColorBadgeToneTokens
|
|
615
|
+
caution?: ThemeColorBadgeToneTokens
|
|
616
|
+
critical?: ThemeColorBadgeToneTokens
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* @public
|
|
621
|
+
*/
|
|
622
|
+
export declare interface ThemeColorBadgeTone_v2 {
|
|
623
|
+
bg: string
|
|
624
|
+
fg: string
|
|
625
|
+
dot: string
|
|
626
|
+
icon: string
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/** @public */
|
|
630
|
+
export declare interface ThemeColorBadgeToneTokens {
|
|
631
|
+
_blend?: ColorBlendModeTokenValue
|
|
632
|
+
_hue?: ColorHueKey
|
|
633
|
+
bg?: ThemeColorTokenValue
|
|
634
|
+
dot?: ThemeColorTokenValue
|
|
635
|
+
fg?: ThemeColorTokenValue
|
|
636
|
+
icon?: ThemeColorTokenValue
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* @public
|
|
641
|
+
* @deprecated Use `ThemeColorCard_v2` instead.
|
|
642
|
+
*/
|
|
643
|
+
export declare interface ThemeColorBase {
|
|
644
|
+
bg: string
|
|
645
|
+
fg: string
|
|
646
|
+
border: string
|
|
647
|
+
focusRing: string
|
|
648
|
+
backdrop?: string
|
|
649
|
+
shadow: {
|
|
650
|
+
outline: string
|
|
651
|
+
umbra: string
|
|
652
|
+
penumbra: string
|
|
653
|
+
ambient: string
|
|
654
|
+
}
|
|
655
|
+
skeleton?: {
|
|
656
|
+
from: string
|
|
657
|
+
to: string
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/** @public */
|
|
662
|
+
export declare interface ThemeColorBaseTokens extends ThemeColorStateTokens {
|
|
663
|
+
focusRing?: ThemeColorTokenValue
|
|
664
|
+
backdrop?: ThemeColorTokenValue
|
|
665
|
+
shadow?: {
|
|
666
|
+
outline?: ThemeColorTokenValue
|
|
667
|
+
umbra?: ThemeColorTokenValue
|
|
668
|
+
penumbra?: ThemeColorTokenValue
|
|
669
|
+
ambient?: ThemeColorTokenValue
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/** @public */
|
|
674
|
+
export declare type ThemeColorBlendModeKey = (typeof THEME_COLOR_BLEND_MODES)[number]
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* @public
|
|
678
|
+
* @deprecated Use `buildColorTheme` instead.
|
|
679
|
+
*/
|
|
680
|
+
export declare interface ThemeColorBuilderOpts {
|
|
681
|
+
base: (opts: {dark: boolean; name: ThemeColorName}) => ThemeColorBase
|
|
682
|
+
solid: (opts: {
|
|
683
|
+
base: ThemeColorBase
|
|
684
|
+
dark: boolean
|
|
685
|
+
tone: ThemeColorToneKey
|
|
686
|
+
name: ThemeColorName
|
|
687
|
+
state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'
|
|
688
|
+
}) => ThemeColorGenericState
|
|
689
|
+
muted: (opts: {
|
|
690
|
+
base: ThemeColorBase
|
|
691
|
+
dark: boolean
|
|
692
|
+
tone: ThemeColorToneKey
|
|
693
|
+
name: ThemeColorName
|
|
694
|
+
state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'
|
|
695
|
+
}) => ThemeColorGenericState
|
|
696
|
+
card: (opts: {
|
|
697
|
+
base: ThemeColorBase
|
|
698
|
+
dark: boolean
|
|
699
|
+
muted: ThemeColorMuted
|
|
700
|
+
name: ThemeColorName
|
|
701
|
+
solid: ThemeColorSolid
|
|
702
|
+
state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'
|
|
703
|
+
}) => ThemeColorGenericState
|
|
704
|
+
button: (opts: {
|
|
705
|
+
dark: boolean
|
|
706
|
+
mode: ThemeColorButtonModeKey
|
|
707
|
+
base: ThemeColorBase
|
|
708
|
+
solid: ThemeColorSolidTone
|
|
709
|
+
muted: ThemeColorMutedTone
|
|
710
|
+
}) => ThemeColorButtonStates
|
|
711
|
+
input: (opts: {
|
|
712
|
+
base: ThemeColorBase
|
|
713
|
+
solid: ThemeColorSolidTone
|
|
714
|
+
muted: ThemeColorMutedTone
|
|
715
|
+
dark: boolean
|
|
716
|
+
mode: 'default' | 'invalid'
|
|
717
|
+
state: 'enabled' | 'disabled' | 'hovered' | 'readOnly'
|
|
718
|
+
}) => ThemeColorInputState
|
|
719
|
+
selectable: (opts: {
|
|
720
|
+
dark: boolean
|
|
721
|
+
base: ThemeColorBase
|
|
722
|
+
solid: ThemeColorSolid
|
|
723
|
+
muted: ThemeColorMuted
|
|
724
|
+
state: 'enabled' | 'disabled' | 'hovered' | 'pressed' | 'selected'
|
|
725
|
+
tone: 'default' | 'primary' | 'positive' | 'caution' | 'critical'
|
|
726
|
+
}) => ThemeColorGenericState
|
|
727
|
+
syntax: (opts: {base: ThemeColorBase; dark: boolean}) => ThemeColorSyntax
|
|
728
|
+
spot: (opts: {base: ThemeColorBase; dark: boolean; key: ThemeColorSpotKey}) => string
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* @public
|
|
733
|
+
* @deprecated Use `ThemeColorButton_v2` instead.
|
|
734
|
+
*/
|
|
735
|
+
export declare interface ThemeColorButton {
|
|
736
|
+
default: ThemeColorButtonTones
|
|
737
|
+
ghost: ThemeColorButtonTones
|
|
738
|
+
bleed: ThemeColorButtonTones
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* @public
|
|
743
|
+
*/
|
|
744
|
+
export declare type ThemeColorButton_v2 = Record<ThemeColorButtonModeKey, ThemeColorButtonMode_v2>
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* @public
|
|
748
|
+
*/
|
|
749
|
+
export declare type ThemeColorButtonMode_v2 = Record<
|
|
750
|
+
ThemeColorStateToneKey,
|
|
751
|
+
ThemeColorButtonTone_v2
|
|
752
|
+
>
|
|
753
|
+
|
|
754
|
+
/** @public */
|
|
755
|
+
export declare type ThemeColorButtonModeKey = (typeof THEME_COLOR_BUTTON_MODES)[number]
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* @public
|
|
759
|
+
* @deprecated Use `ThemeColorState_v2` instead.
|
|
760
|
+
*/
|
|
761
|
+
export declare type ThemeColorButtonState = ThemeColorGenericState
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* @public
|
|
765
|
+
* @deprecated Use `ThemeColorButtonStates_v2` instead.
|
|
766
|
+
*/
|
|
767
|
+
export declare interface ThemeColorButtonStates {
|
|
768
|
+
enabled: ThemeColorGenericState
|
|
769
|
+
hovered: ThemeColorGenericState
|
|
770
|
+
pressed: ThemeColorGenericState
|
|
771
|
+
selected: ThemeColorGenericState
|
|
772
|
+
disabled: ThemeColorGenericState
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/** @public */
|
|
776
|
+
export declare interface ThemeColorButtonTokens
|
|
777
|
+
extends Partial<Record<ColorConfigStateTone, ThemeColorStatesTokens>> {
|
|
778
|
+
_hue?: ColorHueKey
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* @public
|
|
783
|
+
*/
|
|
784
|
+
export declare type ThemeColorButtonTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* TODO: Rename to `ThemeColorButtonMode`.
|
|
788
|
+
* @public
|
|
789
|
+
* @deprecated Use `ThemeColorButtonTones_v2` instead.
|
|
790
|
+
*/
|
|
791
|
+
export declare interface ThemeColorButtonTones {
|
|
792
|
+
default: ThemeColorButtonStates
|
|
793
|
+
primary: ThemeColorButtonStates
|
|
794
|
+
positive: ThemeColorButtonStates
|
|
795
|
+
caution: ThemeColorButtonStates
|
|
796
|
+
critical: ThemeColorButtonStates
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* @public
|
|
801
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
802
|
+
*/
|
|
803
|
+
export declare interface ThemeColorCard {
|
|
804
|
+
enabled: ThemeColorGenericState
|
|
805
|
+
hovered: ThemeColorGenericState
|
|
806
|
+
pressed: ThemeColorGenericState
|
|
807
|
+
selected: ThemeColorGenericState
|
|
808
|
+
disabled: ThemeColorGenericState
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/**
|
|
812
|
+
* @public
|
|
813
|
+
*/
|
|
814
|
+
export declare interface ThemeColorCard_v2 extends ThemeColorState_v2 {
|
|
815
|
+
/** @internal */
|
|
816
|
+
_blend: ThemeColorBlendModeKey
|
|
817
|
+
_dark: boolean
|
|
818
|
+
backdrop: string
|
|
819
|
+
button: ThemeColorButton_v2
|
|
820
|
+
focusRing: string
|
|
821
|
+
input: ThemeColorInput_v2
|
|
822
|
+
selectable: ThemeColorSelectable_v2
|
|
823
|
+
shadow: ThemeColorShadow
|
|
824
|
+
syntax: ThemeColorSyntax
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* @public
|
|
829
|
+
* @deprecated Use `ThemeColorState_v2` instead.
|
|
830
|
+
*/
|
|
831
|
+
export declare type ThemeColorCardState = ThemeColorGenericState
|
|
832
|
+
|
|
833
|
+
/** @public */
|
|
834
|
+
export declare type ThemeColorCardToneKey = (typeof THEME_COLOR_CARD_TONES)[number]
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* @public
|
|
838
|
+
* @deprecated Use `ThemeColorState_v2` instead.
|
|
839
|
+
*/
|
|
840
|
+
export declare interface ThemeColorGenericState {
|
|
841
|
+
/** @internal */
|
|
842
|
+
_blend?: ThemeColorBlendModeKey
|
|
843
|
+
bg: string
|
|
844
|
+
/**
|
|
845
|
+
* @beta
|
|
846
|
+
*/
|
|
847
|
+
bg2?: string
|
|
848
|
+
border: string
|
|
849
|
+
fg: string
|
|
850
|
+
icon: string
|
|
851
|
+
muted: {
|
|
852
|
+
fg: string
|
|
853
|
+
}
|
|
854
|
+
accent: {
|
|
855
|
+
fg: string
|
|
856
|
+
}
|
|
857
|
+
link: {
|
|
858
|
+
fg: string
|
|
859
|
+
}
|
|
860
|
+
code: {
|
|
861
|
+
bg: string
|
|
862
|
+
fg: string
|
|
863
|
+
}
|
|
864
|
+
skeleton?: {
|
|
865
|
+
from: string
|
|
866
|
+
to: string
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* @public
|
|
872
|
+
* @deprecated Use `ThemeColorInput_v2` instead.
|
|
873
|
+
*/
|
|
874
|
+
export declare interface ThemeColorInput {
|
|
875
|
+
default: ThemeColorInputStates
|
|
876
|
+
invalid: ThemeColorInputStates
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* @public
|
|
881
|
+
*/
|
|
882
|
+
export declare type ThemeColorInput_v2 = Record<ThemeColorInputModeKey, ThemeColorInputMode_v2>
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* @public
|
|
886
|
+
*/
|
|
887
|
+
export declare type ThemeColorInputMode_v2 = Record<
|
|
888
|
+
ThemeColorInputStateKey,
|
|
889
|
+
ThemeColorInputState_v2
|
|
890
|
+
>
|
|
891
|
+
|
|
892
|
+
/** @public */
|
|
893
|
+
export declare type ThemeColorInputModeKey = (typeof THEME_COLOR_INPUT_MODES)[number]
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* @public
|
|
897
|
+
* @deprecated Use `ThemeColorInputState_v2` instead.
|
|
898
|
+
*/
|
|
899
|
+
export declare interface ThemeColorInputState {
|
|
900
|
+
_blend?: ThemeColorBlendModeKey
|
|
901
|
+
bg: string
|
|
902
|
+
bg2: string
|
|
903
|
+
border: string
|
|
904
|
+
fg: string
|
|
905
|
+
placeholder: string
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* @public
|
|
910
|
+
*/
|
|
911
|
+
export declare interface ThemeColorInputState_v2 {
|
|
912
|
+
_blend?: ThemeColorBlendModeKey
|
|
913
|
+
bg: string
|
|
914
|
+
border: string
|
|
915
|
+
fg: string
|
|
916
|
+
muted: {
|
|
917
|
+
bg: string
|
|
918
|
+
}
|
|
919
|
+
placeholder: string
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
/** @public */
|
|
923
|
+
export declare type ThemeColorInputStateKey = (typeof THEME_COLOR_INPUT_STATES)[number]
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* @public
|
|
927
|
+
* @deprecated Use `ThemeColorInputMode_v2` instead.
|
|
928
|
+
*/
|
|
929
|
+
export declare interface ThemeColorInputStates {
|
|
930
|
+
enabled: ThemeColorInputState
|
|
931
|
+
disabled: ThemeColorInputState
|
|
932
|
+
hovered: ThemeColorInputState
|
|
933
|
+
readOnly: ThemeColorInputState
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
/** @public */
|
|
937
|
+
export declare interface ThemeColorInputStateTokens {
|
|
938
|
+
_blend?: ColorBlendModeTokenValue
|
|
939
|
+
_hue?: ColorHueKey
|
|
940
|
+
bg?: ThemeColorTokenValue
|
|
941
|
+
border?: ThemeColorTokenValue
|
|
942
|
+
fg?: ThemeColorTokenValue
|
|
943
|
+
muted?: {
|
|
944
|
+
bg?: ThemeColorTokenValue
|
|
945
|
+
}
|
|
946
|
+
placeholder?: ThemeColorTokenValue
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/** @public */
|
|
950
|
+
export declare interface ThemeColorInputTokens
|
|
951
|
+
extends Partial<Record<ColorConfigInputState, ThemeColorInputStateTokens>> {
|
|
952
|
+
_hue?: ColorHueKey
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* @public
|
|
957
|
+
*/
|
|
958
|
+
export declare interface ThemeColorKBD {
|
|
959
|
+
bg: string
|
|
960
|
+
fg: string
|
|
961
|
+
border: string
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* @public
|
|
966
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
967
|
+
*/
|
|
968
|
+
export declare interface ThemeColorMuted {
|
|
969
|
+
default: ThemeColorMutedTone
|
|
970
|
+
transparent: ThemeColorMutedTone
|
|
971
|
+
primary: ThemeColorMutedTone
|
|
972
|
+
positive: ThemeColorMutedTone
|
|
973
|
+
caution: ThemeColorMutedTone
|
|
974
|
+
critical: ThemeColorMutedTone
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* @public
|
|
979
|
+
* @deprecated Use `ThemeColorSelectableTone_v2` instead.
|
|
980
|
+
*/
|
|
981
|
+
export declare interface ThemeColorMutedTone {
|
|
982
|
+
enabled: ThemeColorGenericState
|
|
983
|
+
disabled: ThemeColorGenericState
|
|
984
|
+
hovered: ThemeColorGenericState
|
|
985
|
+
pressed: ThemeColorGenericState
|
|
986
|
+
selected: ThemeColorGenericState
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* @public
|
|
991
|
+
* @deprecated Use `ThemeColorBaseToneKey` instead.
|
|
992
|
+
*/
|
|
993
|
+
export declare type ThemeColorName = ThemeColorCardToneKey
|
|
994
|
+
|
|
995
|
+
/** @public */
|
|
996
|
+
export declare type ThemeColorPalette = {
|
|
997
|
+
black: string | ColorTint
|
|
998
|
+
white: string | ColorTint
|
|
999
|
+
} & Record<ColorHueKey, Record<ColorTintKey, string | ColorTint>>
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* @public
|
|
1003
|
+
* @deprecated Use `ThemeColorScheme_v2` instead.
|
|
1004
|
+
*/
|
|
1005
|
+
export declare type ThemeColorScheme = Record<ThemeColorCardToneKey, ThemeColor>
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* @public
|
|
1009
|
+
*/
|
|
1010
|
+
export declare type ThemeColorScheme_v2 = Record<ThemeColorCardToneKey, ThemeColorCard_v2>
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* @public
|
|
1014
|
+
*/
|
|
1015
|
+
export declare type ThemeColorSchemeKey = (typeof THEME_COLOR_SCHEMES)[number]
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* @public
|
|
1019
|
+
* @deprecated Use `ThemeColorSchemes_v2` instead.
|
|
1020
|
+
*/
|
|
1021
|
+
export declare type ThemeColorSchemes = Record<ThemeColorSchemeKey, ThemeColorScheme>
|
|
1022
|
+
|
|
1023
|
+
/**
|
|
1024
|
+
* @public
|
|
1025
|
+
*/
|
|
1026
|
+
export declare type ThemeColorSchemes_v2 = Record<ThemeColorSchemeKey, ThemeColorScheme_v2>
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* @public
|
|
1030
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
1031
|
+
*/
|
|
1032
|
+
export declare interface ThemeColorSelectable {
|
|
1033
|
+
default: ThemeColorSelectableStates
|
|
1034
|
+
primary: ThemeColorSelectableStates
|
|
1035
|
+
positive: ThemeColorSelectableStates
|
|
1036
|
+
caution: ThemeColorSelectableStates
|
|
1037
|
+
critical: ThemeColorSelectableStates
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* @public
|
|
1042
|
+
*/
|
|
1043
|
+
export declare type ThemeColorSelectable_v2 = Record<
|
|
1044
|
+
ThemeColorStateToneKey,
|
|
1045
|
+
ThemeColorSelectableTone_v2
|
|
1046
|
+
>
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* @public
|
|
1050
|
+
* @deprecated Use `ThemeColorState_v2` instead.
|
|
1051
|
+
*/
|
|
1052
|
+
export declare type ThemeColorSelectableState = ThemeColorGenericState
|
|
1053
|
+
|
|
1054
|
+
/**
|
|
1055
|
+
* @public
|
|
1056
|
+
* @deprecated Use `ThemeColorSelectableStates_v2` instead.
|
|
1057
|
+
*/
|
|
1058
|
+
export declare interface ThemeColorSelectableStates {
|
|
1059
|
+
enabled: ThemeColorSelectableState
|
|
1060
|
+
hovered: ThemeColorSelectableState
|
|
1061
|
+
pressed: ThemeColorSelectableState
|
|
1062
|
+
selected: ThemeColorSelectableState
|
|
1063
|
+
disabled: ThemeColorSelectableState
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* @public
|
|
1068
|
+
*/
|
|
1069
|
+
export declare type ThemeColorSelectableTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
|
|
1070
|
+
|
|
1071
|
+
/** @public */
|
|
1072
|
+
export declare interface ThemeColorShadow {
|
|
1073
|
+
outline: string
|
|
1074
|
+
umbra: string
|
|
1075
|
+
penumbra: string
|
|
1076
|
+
ambient: string
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* @public
|
|
1081
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
1082
|
+
*/
|
|
1083
|
+
export declare interface ThemeColorSolid {
|
|
1084
|
+
default: ThemeColorSolidTone
|
|
1085
|
+
transparent: ThemeColorSolidTone
|
|
1086
|
+
primary: ThemeColorSolidTone
|
|
1087
|
+
positive: ThemeColorSolidTone
|
|
1088
|
+
caution: ThemeColorSolidTone
|
|
1089
|
+
critical: ThemeColorSolidTone
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* @public
|
|
1094
|
+
* @deprecated Use `ThemeColorSelectableTone_v2` instead.
|
|
1095
|
+
*/
|
|
1096
|
+
export declare interface ThemeColorSolidTone {
|
|
1097
|
+
enabled: ThemeColorGenericState
|
|
1098
|
+
disabled: ThemeColorGenericState
|
|
1099
|
+
hovered: ThemeColorGenericState
|
|
1100
|
+
pressed: ThemeColorGenericState
|
|
1101
|
+
selected: ThemeColorGenericState
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* @public
|
|
1106
|
+
* @deprecated Use `ThemeColorAvatar_v2` instead
|
|
1107
|
+
*/
|
|
1108
|
+
export declare type ThemeColorSpot = Record<ThemeColorSpotKey, string>
|
|
1109
|
+
|
|
1110
|
+
/**
|
|
1111
|
+
* @public
|
|
1112
|
+
* @deprecated Use `ThemeColorAvatarColorKey` instead
|
|
1113
|
+
*/
|
|
1114
|
+
export declare type ThemeColorSpotKey = ThemeColorAvatarColorKey
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* @public
|
|
1118
|
+
*/
|
|
1119
|
+
export declare interface ThemeColorState_v2 {
|
|
1120
|
+
/** @internal */
|
|
1121
|
+
_blend?: ThemeColorBlendModeKey
|
|
1122
|
+
accent: {
|
|
1123
|
+
fg: string
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* @internal This may be removed in a future release
|
|
1127
|
+
* */
|
|
1128
|
+
avatar: ThemeColorAvatar_v2
|
|
1129
|
+
/**
|
|
1130
|
+
* @internal This may be removed in a future release
|
|
1131
|
+
* */
|
|
1132
|
+
badge: ThemeColorBadge_v2
|
|
1133
|
+
bg: string
|
|
1134
|
+
border: string
|
|
1135
|
+
code: {
|
|
1136
|
+
bg: string
|
|
1137
|
+
fg: string
|
|
1138
|
+
}
|
|
1139
|
+
fg: string
|
|
1140
|
+
icon: string
|
|
1141
|
+
kbd: ThemeColorKBD
|
|
1142
|
+
link: {
|
|
1143
|
+
fg: string
|
|
1144
|
+
}
|
|
1145
|
+
muted: {
|
|
1146
|
+
bg: string
|
|
1147
|
+
fg: string
|
|
1148
|
+
}
|
|
1149
|
+
skeleton: {
|
|
1150
|
+
from: string
|
|
1151
|
+
to: string
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
/** @public */
|
|
1156
|
+
export declare type ThemeColorStateKey = (typeof THEME_COLOR_STATES)[number]
|
|
1157
|
+
|
|
1158
|
+
/** @public */
|
|
1159
|
+
export declare type ThemeColorStatesTokens = Partial<
|
|
1160
|
+
Record<ColorConfigState, ThemeColorStateTokens>
|
|
1161
|
+
>
|
|
1162
|
+
|
|
1163
|
+
/** @public */
|
|
1164
|
+
export declare interface ThemeColorStateTokens {
|
|
1165
|
+
_blend?: ColorBlendModeTokenValue
|
|
1166
|
+
_hue?: ColorHueKey
|
|
1167
|
+
accent?: {
|
|
1168
|
+
fg?: ThemeColorTokenValue
|
|
1169
|
+
}
|
|
1170
|
+
avatar?: ThemeColorAvatarTokens
|
|
1171
|
+
badge?: ThemeColorBadgeTokens
|
|
1172
|
+
bg?: ThemeColorTokenValue
|
|
1173
|
+
border?: ThemeColorTokenValue
|
|
1174
|
+
code?: {
|
|
1175
|
+
bg?: ThemeColorTokenValue
|
|
1176
|
+
fg?: ThemeColorTokenValue
|
|
1177
|
+
}
|
|
1178
|
+
fg?: ThemeColorTokenValue
|
|
1179
|
+
icon?: ThemeColorTokenValue
|
|
1180
|
+
kbd?: {
|
|
1181
|
+
bg?: ThemeColorTokenValue
|
|
1182
|
+
fg?: ThemeColorTokenValue
|
|
1183
|
+
border?: ThemeColorTokenValue
|
|
1184
|
+
}
|
|
1185
|
+
link?: {
|
|
1186
|
+
fg?: ThemeColorTokenValue
|
|
1187
|
+
}
|
|
1188
|
+
muted?: {
|
|
1189
|
+
bg?: ThemeColorTokenValue
|
|
1190
|
+
fg?: ThemeColorTokenValue
|
|
1191
|
+
}
|
|
1192
|
+
skeleton?: {
|
|
1193
|
+
from?: ThemeColorTokenValue
|
|
1194
|
+
to?: ThemeColorTokenValue
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
/** @public */
|
|
1199
|
+
export declare type ThemeColorStateToneKey = (typeof THEME_COLOR_STATE_TONES)[number]
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* @public
|
|
1203
|
+
*/
|
|
1204
|
+
export declare interface ThemeColorSyntax {
|
|
1205
|
+
atrule: string
|
|
1206
|
+
attrName: string
|
|
1207
|
+
attrValue: string
|
|
1208
|
+
attribute: string
|
|
1209
|
+
boolean: string
|
|
1210
|
+
builtin: string
|
|
1211
|
+
cdata: string
|
|
1212
|
+
char: string
|
|
1213
|
+
class: string
|
|
1214
|
+
className: string
|
|
1215
|
+
comment: string
|
|
1216
|
+
constant: string
|
|
1217
|
+
deleted: string
|
|
1218
|
+
doctype: string
|
|
1219
|
+
entity: string
|
|
1220
|
+
function: string
|
|
1221
|
+
hexcode: string
|
|
1222
|
+
id: string
|
|
1223
|
+
important: string
|
|
1224
|
+
inserted: string
|
|
1225
|
+
keyword: string
|
|
1226
|
+
number: string
|
|
1227
|
+
operator: string
|
|
1228
|
+
prolog: string
|
|
1229
|
+
property: string
|
|
1230
|
+
pseudoClass: string
|
|
1231
|
+
pseudoElement: string
|
|
1232
|
+
punctuation: string
|
|
1233
|
+
regex: string
|
|
1234
|
+
selector: string
|
|
1235
|
+
string: string
|
|
1236
|
+
symbol: string
|
|
1237
|
+
tag: string
|
|
1238
|
+
unit: string
|
|
1239
|
+
url: string
|
|
1240
|
+
variable: string
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
/** @public */
|
|
1244
|
+
export declare interface ThemeColorTokens {
|
|
1245
|
+
base?: Partial<Record<ColorConfigCardTone, ThemeColorBaseTokens>>
|
|
1246
|
+
button?: Partial<Record<ThemeColorButtonModeKey, ThemeColorButtonTokens>>
|
|
1247
|
+
input?: Partial<Record<ColorConfigInputMode, ThemeColorInputTokens>>
|
|
1248
|
+
selectable?: Partial<
|
|
1249
|
+
Record<
|
|
1250
|
+
ColorConfigStateTone,
|
|
1251
|
+
{
|
|
1252
|
+
_hue?: ColorHueKey
|
|
1253
|
+
} & ThemeColorStatesTokens
|
|
1254
|
+
>
|
|
1255
|
+
>
|
|
1256
|
+
syntax?: Partial<Record<keyof ThemeColorSyntax, ThemeColorTokenValue>>
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
/** @public */
|
|
1260
|
+
export declare type ThemeColorTokenValue = [ColorConfigValue, ColorConfigValue]
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* @public
|
|
1264
|
+
* @deprecated Use `ThemeColorBaseToneKey` instead.
|
|
1265
|
+
*/
|
|
1266
|
+
export declare type ThemeColorToneKey = ThemeColorCardToneKey
|
|
1267
|
+
|
|
1268
|
+
/** @public */
|
|
1269
|
+
export declare interface ThemeConfig {
|
|
1270
|
+
avatar?: ThemeAvatar_v2
|
|
1271
|
+
button?: {
|
|
1272
|
+
border: {
|
|
1273
|
+
width: number
|
|
1274
|
+
}
|
|
1275
|
+
focusRing: ThemeFocusRing
|
|
1276
|
+
textWeight: ThemeFontWeightKey
|
|
1277
|
+
}
|
|
1278
|
+
card?: {
|
|
1279
|
+
border: {
|
|
1280
|
+
width: number
|
|
1281
|
+
}
|
|
1282
|
+
focusRing: ThemeFocusRing
|
|
1283
|
+
shadow: {
|
|
1284
|
+
outline: number
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
color?: ThemeColorTokens
|
|
1288
|
+
container?: number[]
|
|
1289
|
+
font?: ThemeFonts
|
|
1290
|
+
input?: ThemeInput_v2
|
|
1291
|
+
layer?: ThemeLayer
|
|
1292
|
+
media?: number[]
|
|
1293
|
+
palette?: ThemeColorPalette
|
|
1294
|
+
radius?: number[]
|
|
1295
|
+
shadow?: Array<ThemeShadow | null>
|
|
1296
|
+
space?: number[]
|
|
1297
|
+
/** @internal */
|
|
1298
|
+
style?: ThemeStyles
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* @public
|
|
1303
|
+
*/
|
|
1304
|
+
export declare interface ThemeFocusRing {
|
|
1305
|
+
offset: number
|
|
1306
|
+
width: number
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* @public
|
|
1311
|
+
*/
|
|
1312
|
+
export declare interface ThemeFont {
|
|
1313
|
+
family: string
|
|
1314
|
+
weights: ThemeFontWeight
|
|
1315
|
+
sizes: ThemeFontSize[]
|
|
1316
|
+
/** @deprecated No longer supported. */
|
|
1317
|
+
horizontalOffset?: number
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* @public
|
|
1322
|
+
*/
|
|
1323
|
+
export declare type ThemeFontKey = 'code' | 'heading' | 'label' | 'text'
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* @public
|
|
1327
|
+
*/
|
|
1328
|
+
export declare interface ThemeFonts {
|
|
1329
|
+
code: ThemeFont
|
|
1330
|
+
heading: ThemeFont
|
|
1331
|
+
label: ThemeFont
|
|
1332
|
+
text: ThemeFont
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* @public
|
|
1337
|
+
*/
|
|
1338
|
+
export declare interface ThemeFontSize {
|
|
1339
|
+
ascenderHeight: number
|
|
1340
|
+
descenderHeight: number
|
|
1341
|
+
fontSize: number
|
|
1342
|
+
iconSize: number
|
|
1343
|
+
letterSpacing: number
|
|
1344
|
+
lineHeight: number
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* @public
|
|
1349
|
+
*/
|
|
1350
|
+
export declare interface ThemeFontWeight {
|
|
1351
|
+
regular: number
|
|
1352
|
+
medium: number
|
|
1353
|
+
semibold: number
|
|
1354
|
+
bold: number
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* @public
|
|
1359
|
+
*/
|
|
1360
|
+
export declare type ThemeFontWeightKey = 'regular' | 'medium' | 'semibold' | 'bold'
|
|
1361
|
+
|
|
1362
|
+
/**
|
|
1363
|
+
* @public
|
|
1364
|
+
* @deprecated Use `ThemeInput_v2` instead
|
|
1365
|
+
*/
|
|
1366
|
+
export declare interface ThemeInput {
|
|
1367
|
+
checkbox: {
|
|
1368
|
+
size: number
|
|
1369
|
+
}
|
|
1370
|
+
radio: {
|
|
1371
|
+
size: number
|
|
1372
|
+
markSize: number
|
|
1373
|
+
}
|
|
1374
|
+
switch: {
|
|
1375
|
+
width: number
|
|
1376
|
+
height: number
|
|
1377
|
+
padding: number
|
|
1378
|
+
transitionDurationMs: number
|
|
1379
|
+
transitionTimingFunction: string
|
|
1380
|
+
}
|
|
1381
|
+
border: {
|
|
1382
|
+
width: number
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
/**
|
|
1387
|
+
* @public
|
|
1388
|
+
*/
|
|
1389
|
+
export declare interface ThemeInput_v2 {
|
|
1390
|
+
checkbox: {
|
|
1391
|
+
size: number
|
|
1392
|
+
focusRing: ThemeFocusRing
|
|
1393
|
+
}
|
|
1394
|
+
radio: {
|
|
1395
|
+
size: number
|
|
1396
|
+
markSize: number
|
|
1397
|
+
focusRing: ThemeFocusRing
|
|
1398
|
+
}
|
|
1399
|
+
switch: {
|
|
1400
|
+
width: number
|
|
1401
|
+
height: number
|
|
1402
|
+
padding: number
|
|
1403
|
+
transitionDurationMs: number
|
|
1404
|
+
transitionTimingFunction: string
|
|
1405
|
+
focusRing: ThemeFocusRing
|
|
1406
|
+
}
|
|
1407
|
+
border: {
|
|
1408
|
+
width: number
|
|
1409
|
+
}
|
|
1410
|
+
select: {
|
|
1411
|
+
focusRing: ThemeFocusRing
|
|
1412
|
+
}
|
|
1413
|
+
text: {
|
|
1414
|
+
focusRing: ThemeFocusRing
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* @public
|
|
1420
|
+
*/
|
|
1421
|
+
export declare interface ThemeLayer {
|
|
1422
|
+
dialog: {
|
|
1423
|
+
zOffset: number
|
|
1424
|
+
}
|
|
1425
|
+
popover: {
|
|
1426
|
+
zOffset: number
|
|
1427
|
+
}
|
|
1428
|
+
tooltip: {
|
|
1429
|
+
zOffset: number
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* @public
|
|
1435
|
+
*/
|
|
1436
|
+
export declare interface ThemeShadow {
|
|
1437
|
+
umbra: ThemeBoxShadow
|
|
1438
|
+
penumbra: ThemeBoxShadow
|
|
1439
|
+
ambient: ThemeBoxShadow
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* @internal
|
|
1444
|
+
*/
|
|
1445
|
+
export declare interface ThemeStyles {
|
|
1446
|
+
button?: {
|
|
1447
|
+
root?: CSSObject
|
|
1448
|
+
}
|
|
1449
|
+
card?: {
|
|
1450
|
+
root?: CSSObject
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
/** @internal */
|
|
1455
|
+
export declare interface TokenBaseKeyNode {
|
|
1456
|
+
type: 'base'
|
|
1457
|
+
tone: ColorConfigCardTone
|
|
1458
|
+
key: ColorConfigCardKey | ColorConfigBlendKey
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
/** @internal */
|
|
1462
|
+
export declare interface TokenBlendModeValueNode {
|
|
1463
|
+
type: 'blendMode'
|
|
1464
|
+
value?: ThemeColorBlendModeKey
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
/** @internal */
|
|
1468
|
+
export declare interface TokenButtonKeyNode {
|
|
1469
|
+
type: 'button'
|
|
1470
|
+
tone: ColorConfigStateTone
|
|
1471
|
+
mode: ThemeColorButtonModeKey
|
|
1472
|
+
key: ColorConfigStateKey | ColorConfigBlendKey
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
/** @internal */
|
|
1476
|
+
export declare interface TokenColorValueNode {
|
|
1477
|
+
type: 'color'
|
|
1478
|
+
key?: 'black' | 'white'
|
|
1479
|
+
hue?: ColorHueKey
|
|
1480
|
+
mix?: number
|
|
1481
|
+
opacity?: number
|
|
1482
|
+
tint?: ColorTintKey
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
/** @internal */
|
|
1486
|
+
export declare interface TokenHueValueNode {
|
|
1487
|
+
type: 'hue'
|
|
1488
|
+
value?: ColorHueKey
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
/** @internal */
|
|
1492
|
+
export declare type TokenKeyNode = TokenBaseKeyNode | TokenButtonKeyNode
|
|
1493
|
+
|
|
1494
|
+
/** @internal */
|
|
1495
|
+
export declare type TokenValueNode =
|
|
1496
|
+
| TokenColorValueNode
|
|
1497
|
+
| TokenHueValueNode
|
|
1498
|
+
| TokenBlendModeValueNode
|
|
1499
|
+
|
|
1500
|
+
/** @internal */
|
|
1501
|
+
export declare function v0_v2(v0: RootTheme): RootTheme_v2
|
|
1502
|
+
|
|
1503
|
+
/** @internal */
|
|
1504
|
+
export declare function v2_v0(v2: RootTheme_v2): RootTheme
|
|
1505
|
+
|
|
1506
|
+
export {}
|