@sanity/ui 2.0.0-beta.1 → 2.0.0-beta.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/LICENSE +1 -1
- package/README.md +6 -3
- package/dist/index.cjs.mjs +11 -36
- package/dist/index.d.ts +248 -268
- package/dist/index.esm.js +502 -356
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +511 -569
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs.mjs +1 -1
- package/dist/theme.d.ts +81 -114
- package/dist/theme.esm.js +355 -290
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +355 -290
- package/dist/theme.js.map +1 -1
- package/package.json +6 -3
- package/src/core/__workshop__/constants.ts +3 -2
- package/src/core/_compat.ts +236 -87
- package/src/core/components/menu/__workshop__/selectedItem.tsx +7 -2
- package/src/core/components/menu/menuButton.tsx +12 -1
- package/src/core/constants.ts +18 -0
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +6 -3
- package/src/core/middleware/origin.ts +47 -0
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +1 -1
- package/src/core/primitives/avatar/__workshop__/stack.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +14 -4
- package/src/core/primitives/avatar/avatarCounter.tsx +16 -5
- package/src/core/primitives/avatar/avatarStack.tsx +2 -2
- package/src/core/primitives/badge/badge.tsx +1 -3
- package/src/core/primitives/kbd/kbd.tsx +2 -0
- package/src/core/primitives/popover/popover.tsx +67 -13
- package/src/core/primitives/popover/popoverCard.tsx +26 -15
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/switch/styles.ts +6 -1
- package/src/core/primitives/textInput/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/states.tsx +10 -2
- package/src/core/primitives/tooltip/tooltip.tsx +47 -57
- package/src/core/primitives/tooltip/tooltipCard.tsx +104 -0
- package/src/core/styles/card/_cardColorStyle.ts +2 -0
- package/src/core/styles/input/textInputStyle.ts +33 -2
- package/src/core/styles/margin/marginsStyle.test.ts +2 -2
- package/src/core/styles/padding/paddingStyle.test.ts +2 -2
- package/src/core/theme/__workshop__/build/Root.tsx +20 -3
- package/src/core/theme/__workshop__/build/story.tsx +16 -10
- package/src/core/theme/__workshop__/canvas.tsx +7 -7
- package/src/core/theme/__workshop__/debug/story.tsx +196 -0
- package/src/core/theme/__workshop__/index.ts +5 -0
- package/src/core/theme/theme.test.tsx +2 -2
- package/src/core/types/avatar.ts +1 -1
- package/src/core/types/button.ts +1 -2
- package/src/core/{primitives/tooltip → utils/conditionalWrapper}/conditionalWrapper.tsx +3 -0
- package/src/core/utils/conditionalWrapper/index.ts +1 -0
- package/src/core/utils/index.ts +1 -0
- package/src/theme/build/_deprecated/color/factory.ts +3 -3
- package/src/theme/build/buildColorTheme.test.ts +2 -2
- package/src/theme/build/buildColorTheme.ts +16 -16
- package/src/theme/build/colorToken/colorToken.ts +19 -0
- package/src/theme/build/colorToken/compileColorToken.ts +21 -0
- package/src/theme/build/colorToken/index.ts +2 -0
- package/src/theme/build/colorToken/types.ts +6 -0
- package/src/theme/build/renderColorTheme.ts +14 -15
- package/src/theme/build/renderColorValue.ts +9 -2
- package/src/theme/config/system.ts +12 -10
- package/src/theme/config/tokens/color/types.ts +12 -1
- package/src/theme/config/tokens/parseTokenKey.ts +1 -0
- package/src/theme/config/tokens/parseTokenValue.test.ts +13 -16
- package/src/theme/config/tokens/parseTokenValue.ts +45 -14
- package/src/theme/config/tokens/types.ts +3 -2
- package/src/theme/defaults/colorTokens.ts +278 -252
- package/src/theme/defaults/config.ts +2 -1
- package/src/theme/defaults/fonts.ts +13 -5
- package/src/theme/index.ts +0 -7
- package/src/theme/system/color/_constants.ts +5 -2
- package/src/theme/system/color/_system.ts +2 -1
- package/src/theme/system/color/avatar.ts +2 -12
- package/src/theme/system/color/button.ts +4 -20
- package/src/theme/system/color/input.ts +3 -11
- package/src/theme/system/color/selectable.ts +3 -14
- package/src/theme/system/shadow.ts +0 -6
- package/src/theme/system/styles.ts +0 -6
- package/src/theme/system/theme.ts +2 -0
- package/src/theme/system/v0/avatar.ts +1 -1
- package/src/theme/system/v0/color/button.ts +4 -4
- package/src/theme/system/v0/color/card.ts +2 -2
- package/src/theme/system/v0/color/input.ts +3 -3
- package/src/theme/system/v0/color/muted.ts +2 -2
- package/src/theme/system/v0/color/solid.ts +2 -2
- package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
- package/src/theme/versioning/v2_v0.ts +2 -2
- package/src/theme/build/colorToken.ts +0 -39
package/dist/theme.cjs.mjs
CHANGED
|
@@ -15,11 +15,11 @@ export const THEME_COLOR_BUTTON_MODES = cjs.THEME_COLOR_BUTTON_MODES;
|
|
|
15
15
|
export const THEME_COLOR_CARD_TONES = cjs.THEME_COLOR_CARD_TONES;
|
|
16
16
|
export const THEME_COLOR_INPUT_MODES = cjs.THEME_COLOR_INPUT_MODES;
|
|
17
17
|
export const THEME_COLOR_INPUT_STATES = cjs.THEME_COLOR_INPUT_STATES;
|
|
18
|
+
export const THEME_COLOR_SCHEMES = cjs.THEME_COLOR_SCHEMES;
|
|
18
19
|
export const THEME_COLOR_STATES = cjs.THEME_COLOR_STATES;
|
|
19
20
|
export const THEME_COLOR_STATE_TONES = cjs.THEME_COLOR_STATE_TONES;
|
|
20
21
|
export const buildTheme = cjs.buildTheme;
|
|
21
22
|
export const createColorTheme = cjs.createColorTheme;
|
|
22
|
-
export const defaultTheme = cjs.defaultTheme;
|
|
23
23
|
export const getContrastRatio = cjs.getContrastRatio;
|
|
24
24
|
export const getScopedTheme = cjs.getScopedTheme;
|
|
25
25
|
export const getTheme_v2 = cjs.getTheme_v2;
|
package/dist/theme.d.ts
CHANGED
|
@@ -64,28 +64,23 @@ export declare interface BaseTheme {
|
|
|
64
64
|
*/
|
|
65
65
|
space: number[]
|
|
66
66
|
/**
|
|
67
|
+
* @internal
|
|
67
68
|
* @deprecated Use `v2.style` instead
|
|
68
69
|
*/
|
|
69
70
|
styles?: ThemeStyles
|
|
70
71
|
v2?: RootTheme_v2
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
/**
|
|
74
|
-
* @public
|
|
75
|
-
* @deprecated Use `ThemeBoxShadow` instead
|
|
76
|
-
*/
|
|
77
|
-
export declare type BoxShadow = ThemeBoxShadow
|
|
78
|
-
|
|
79
74
|
/** @internal */
|
|
80
75
|
export declare function buildTheme(config?: ThemeConfig): RootTheme
|
|
81
76
|
|
|
82
|
-
/** @
|
|
77
|
+
/** @public */
|
|
83
78
|
export declare const COLOR_CONFIG_AVATAR_COLORS: readonly ['*', ...ColorHueKey[]]
|
|
84
79
|
|
|
85
|
-
/** @
|
|
80
|
+
/** @public */
|
|
86
81
|
export declare const COLOR_CONFIG_BLEND_KEYS: readonly ['_blend']
|
|
87
82
|
|
|
88
|
-
/** @
|
|
83
|
+
/** @public */
|
|
89
84
|
export declare const COLOR_CONFIG_CARD_KEYS: readonly [
|
|
90
85
|
'_hue',
|
|
91
86
|
'bg',
|
|
@@ -112,7 +107,7 @@ export declare const COLOR_CONFIG_CARD_KEYS: readonly [
|
|
|
112
107
|
'shadow/ambient',
|
|
113
108
|
]
|
|
114
109
|
|
|
115
|
-
/** @
|
|
110
|
+
/** @public */
|
|
116
111
|
export declare const COLOR_CONFIG_CARD_TONES: readonly [
|
|
117
112
|
'*',
|
|
118
113
|
'transparent',
|
|
@@ -123,10 +118,10 @@ export declare const COLOR_CONFIG_CARD_TONES: readonly [
|
|
|
123
118
|
'critical',
|
|
124
119
|
]
|
|
125
120
|
|
|
126
|
-
/** @
|
|
121
|
+
/** @public */
|
|
127
122
|
export declare const COLOR_CONFIG_INPUT_MODES: readonly ['*', 'default', 'invalid']
|
|
128
123
|
|
|
129
|
-
/** @
|
|
124
|
+
/** @public */
|
|
130
125
|
export declare const COLOR_CONFIG_INPUT_STATES: readonly [
|
|
131
126
|
'*',
|
|
132
127
|
'enabled',
|
|
@@ -135,7 +130,7 @@ export declare const COLOR_CONFIG_INPUT_STATES: readonly [
|
|
|
135
130
|
'disabled',
|
|
136
131
|
]
|
|
137
132
|
|
|
138
|
-
/** @
|
|
133
|
+
/** @public */
|
|
139
134
|
export declare const COLOR_CONFIG_STATE_KEYS: readonly [
|
|
140
135
|
'_hue',
|
|
141
136
|
'bg',
|
|
@@ -153,7 +148,7 @@ export declare const COLOR_CONFIG_STATE_KEYS: readonly [
|
|
|
153
148
|
'status/icon',
|
|
154
149
|
]
|
|
155
150
|
|
|
156
|
-
/** @
|
|
151
|
+
/** @public */
|
|
157
152
|
export declare const COLOR_CONFIG_STATE_TONES: readonly [
|
|
158
153
|
'*',
|
|
159
154
|
'default',
|
|
@@ -163,7 +158,7 @@ export declare const COLOR_CONFIG_STATE_TONES: readonly [
|
|
|
163
158
|
'critical',
|
|
164
159
|
]
|
|
165
160
|
|
|
166
|
-
/** @
|
|
161
|
+
/** @public */
|
|
167
162
|
export declare const COLOR_CONFIG_STATES: readonly [
|
|
168
163
|
'*',
|
|
169
164
|
'enabled',
|
|
@@ -213,15 +208,17 @@ export declare type ColorConfigValue =
|
|
|
213
208
|
| `black/${ColorConfigOpacityValue}`
|
|
214
209
|
| `white/${ColorConfigOpacityValue}`
|
|
215
210
|
| `${ColorHueKey}`
|
|
211
|
+
| `${ColorHueKey} ${number}%`
|
|
216
212
|
| `${ColorHueKey}/${ColorTintKey}`
|
|
213
|
+
| `${ColorHueKey}/${ColorTintKey} ${number}%`
|
|
217
214
|
| `${ColorHueKey}/${ColorTintKey}/${ColorConfigOpacityValue}`
|
|
218
215
|
| `${ColorTintKey}`
|
|
216
|
+
| `${ColorTintKey} ${number}%`
|
|
219
217
|
| `${ColorTintKey}/${ColorConfigOpacityValue}`
|
|
220
|
-
| ThemeColorBlendModeKey
|
|
221
218
|
|
|
222
219
|
/**
|
|
223
220
|
* @public
|
|
224
|
-
* @deprecated Use `
|
|
221
|
+
* @deprecated Use `buildColorTheme` instead.
|
|
225
222
|
*/
|
|
226
223
|
export declare function createColorTheme(
|
|
227
224
|
partialOpts?: PartialThemeColorBuilderOpts,
|
|
@@ -234,11 +231,6 @@ export declare function createColorTheme(
|
|
|
234
231
|
* */
|
|
235
232
|
export declare type CSSObject = StyledObject<any>
|
|
236
233
|
|
|
237
|
-
/**
|
|
238
|
-
* @public
|
|
239
|
-
*/
|
|
240
|
-
export declare const defaultTheme: BaseTheme
|
|
241
|
-
|
|
242
234
|
/** @internal */
|
|
243
235
|
export declare function getContrastRatio(bg: string, fg: string): number
|
|
244
236
|
|
|
@@ -331,13 +323,15 @@ export declare function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
|
331
323
|
*/
|
|
332
324
|
export declare function parseColor(color: unknown): RGB | RGBA
|
|
333
325
|
|
|
326
|
+
/** @internal */
|
|
334
327
|
export declare function parseTokenKey(str: string): TokenKeyNode | undefined
|
|
335
328
|
|
|
329
|
+
/** @internal */
|
|
336
330
|
export declare function parseTokenValue(str: string): TokenValueNode | undefined
|
|
337
331
|
|
|
338
332
|
/**
|
|
339
333
|
* @public
|
|
340
|
-
* @deprecated
|
|
334
|
+
* @deprecated Use `ThemeConfig` instead.
|
|
341
335
|
*/
|
|
342
336
|
export declare type PartialThemeColorBuilderOpts = Partial<ThemeColorBuilderOpts>
|
|
343
337
|
|
|
@@ -418,6 +412,7 @@ export declare interface RootTheme_v2 {
|
|
|
418
412
|
radius: number[]
|
|
419
413
|
shadow: Array<ThemeShadow | null>
|
|
420
414
|
space: number[]
|
|
415
|
+
/** @internal */
|
|
421
416
|
style?: ThemeStyles
|
|
422
417
|
}
|
|
423
418
|
|
|
@@ -429,12 +424,6 @@ export declare interface RootTheme_v2 {
|
|
|
429
424
|
declare function screen_2(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
430
425
|
export {screen_2 as screen}
|
|
431
426
|
|
|
432
|
-
/**
|
|
433
|
-
* @deprecated Use `ThemeStyles` instead
|
|
434
|
-
* @internal
|
|
435
|
-
*/
|
|
436
|
-
export declare type Styles = ThemeStyles
|
|
437
|
-
|
|
438
427
|
/**
|
|
439
428
|
* @public
|
|
440
429
|
*/
|
|
@@ -478,6 +467,9 @@ export declare const THEME_COLOR_INPUT_STATES: readonly [
|
|
|
478
467
|
'disabled',
|
|
479
468
|
]
|
|
480
469
|
|
|
470
|
+
/** @public */
|
|
471
|
+
export declare const THEME_COLOR_SCHEMES: readonly ['light', 'dark']
|
|
472
|
+
|
|
481
473
|
/** @public */
|
|
482
474
|
export declare const THEME_COLOR_STATE_TONES: readonly [
|
|
483
475
|
'default',
|
|
@@ -505,7 +497,7 @@ export declare type Theme_v2 = Omit<RootTheme_v2, 'color'> & {
|
|
|
505
497
|
|
|
506
498
|
/**
|
|
507
499
|
* @public
|
|
508
|
-
* @deprecated Use `ThemeAvatar_v2` instead
|
|
500
|
+
* @deprecated Use `ThemeAvatar_v2` from `@sanity/ui/theme` instead.
|
|
509
501
|
*/
|
|
510
502
|
export declare interface ThemeAvatar {
|
|
511
503
|
sizes: {
|
|
@@ -553,17 +545,7 @@ export declare interface ThemeColor extends Partial<Omit<ThemeColorGenericState,
|
|
|
553
545
|
/**
|
|
554
546
|
* @public
|
|
555
547
|
*/
|
|
556
|
-
export declare
|
|
557
|
-
gray: ThemeColorAvatarHue_v2
|
|
558
|
-
blue: ThemeColorAvatarHue_v2
|
|
559
|
-
purple: ThemeColorAvatarHue_v2
|
|
560
|
-
magenta: ThemeColorAvatarHue_v2
|
|
561
|
-
red: ThemeColorAvatarHue_v2
|
|
562
|
-
orange: ThemeColorAvatarHue_v2
|
|
563
|
-
yellow: ThemeColorAvatarHue_v2
|
|
564
|
-
green: ThemeColorAvatarHue_v2
|
|
565
|
-
cyan: ThemeColorAvatarHue_v2
|
|
566
|
-
}
|
|
548
|
+
export declare type ThemeColorAvatar_v2 = Record<ThemeColorAvatarColorKey, ThemeColorAvatarHue_v2>
|
|
567
549
|
|
|
568
550
|
/** @public */
|
|
569
551
|
export declare type ThemeColorAvatarColorKey = (typeof THEME_COLOR_AVATAR_COLORS)[number]
|
|
@@ -577,6 +559,7 @@ export declare interface ThemeColorAvatarHue_v2 {
|
|
|
577
559
|
fg: string
|
|
578
560
|
}
|
|
579
561
|
|
|
562
|
+
/** @public */
|
|
580
563
|
export declare interface ThemeColorAvatarHueTokens {
|
|
581
564
|
_blend?: ColorBlendModeTokenValue
|
|
582
565
|
_hue?: ColorHueKey
|
|
@@ -584,6 +567,7 @@ export declare interface ThemeColorAvatarHueTokens {
|
|
|
584
567
|
fg?: ThemeColorTokenValue
|
|
585
568
|
}
|
|
586
569
|
|
|
570
|
+
/** @public */
|
|
587
571
|
export declare interface ThemeColorAvatarTokens {
|
|
588
572
|
'*'?: ThemeColorAvatarHueTokens
|
|
589
573
|
gray?: ThemeColorAvatarHueTokens
|
|
@@ -608,6 +592,7 @@ export declare interface ThemeColorBadge_v2 {
|
|
|
608
592
|
critical: ThemeColorBadgeTone_v2
|
|
609
593
|
}
|
|
610
594
|
|
|
595
|
+
/** @public */
|
|
611
596
|
export declare interface ThemeColorBadgeTokens {
|
|
612
597
|
_hue?: ColorHueKey
|
|
613
598
|
bg?: ThemeColorTokenValue
|
|
@@ -616,6 +601,7 @@ export declare interface ThemeColorBadgeTokens {
|
|
|
616
601
|
icon?: ThemeColorTokenValue
|
|
617
602
|
}
|
|
618
603
|
|
|
604
|
+
/** @public */
|
|
619
605
|
export declare interface ThemeColorBadgeTokens {
|
|
620
606
|
'*'?: ThemeColorBadgeToneTokens
|
|
621
607
|
default?: ThemeColorBadgeToneTokens
|
|
@@ -635,6 +621,7 @@ export declare interface ThemeColorBadgeTone_v2 {
|
|
|
635
621
|
icon: string
|
|
636
622
|
}
|
|
637
623
|
|
|
624
|
+
/** @public */
|
|
638
625
|
export declare interface ThemeColorBadgeToneTokens {
|
|
639
626
|
_blend?: ColorBlendModeTokenValue
|
|
640
627
|
_hue?: ColorHueKey
|
|
@@ -666,6 +653,7 @@ export declare interface ThemeColorBase {
|
|
|
666
653
|
}
|
|
667
654
|
}
|
|
668
655
|
|
|
656
|
+
/** @public */
|
|
669
657
|
export declare interface ThemeColorBaseTokens extends ThemeColorStateTokens {
|
|
670
658
|
focusRing?: ThemeColorTokenValue
|
|
671
659
|
backdrop?: ThemeColorTokenValue
|
|
@@ -682,7 +670,7 @@ export declare type ThemeColorBlendModeKey = (typeof THEME_COLOR_BLEND_MODES)[nu
|
|
|
682
670
|
|
|
683
671
|
/**
|
|
684
672
|
* @public
|
|
685
|
-
* @deprecated
|
|
673
|
+
* @deprecated Use `buildColorTheme` instead.
|
|
686
674
|
*/
|
|
687
675
|
export declare interface ThemeColorBuilderOpts {
|
|
688
676
|
base: (opts: {dark: boolean; name: ThemeColorName}) => ThemeColorBase
|
|
@@ -737,7 +725,7 @@ export declare interface ThemeColorBuilderOpts {
|
|
|
737
725
|
|
|
738
726
|
/**
|
|
739
727
|
* @public
|
|
740
|
-
* @deprecated
|
|
728
|
+
* @deprecated Use `ThemeColorButton_v2` instead.
|
|
741
729
|
*/
|
|
742
730
|
export declare interface ThemeColorButton {
|
|
743
731
|
default: ThemeColorButtonTones
|
|
@@ -748,24 +736,28 @@ export declare interface ThemeColorButton {
|
|
|
748
736
|
/**
|
|
749
737
|
* @public
|
|
750
738
|
*/
|
|
751
|
-
export declare
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
739
|
+
export declare type ThemeColorButton_v2 = Record<ThemeColorButtonModeKey, ThemeColorButtonMode_v2>
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* @public
|
|
743
|
+
*/
|
|
744
|
+
export declare type ThemeColorButtonMode_v2 = Record<
|
|
745
|
+
ThemeColorStateToneKey,
|
|
746
|
+
ThemeColorButtonTone_v2
|
|
747
|
+
>
|
|
756
748
|
|
|
757
749
|
/** @public */
|
|
758
750
|
export declare type ThemeColorButtonModeKey = (typeof THEME_COLOR_BUTTON_MODES)[number]
|
|
759
751
|
|
|
760
752
|
/**
|
|
761
753
|
* @public
|
|
762
|
-
* @deprecated Use `
|
|
754
|
+
* @deprecated Use `ThemeColorState_v2` instead.
|
|
763
755
|
*/
|
|
764
756
|
export declare type ThemeColorButtonState = ThemeColorGenericState
|
|
765
757
|
|
|
766
758
|
/**
|
|
767
759
|
* @public
|
|
768
|
-
* @deprecated
|
|
760
|
+
* @deprecated Use `ThemeColorButtonStates_v2` instead.
|
|
769
761
|
*/
|
|
770
762
|
export declare interface ThemeColorButtonStates {
|
|
771
763
|
enabled: ThemeColorGenericState
|
|
@@ -775,26 +767,21 @@ export declare interface ThemeColorButtonStates {
|
|
|
775
767
|
disabled: ThemeColorGenericState
|
|
776
768
|
}
|
|
777
769
|
|
|
778
|
-
/**
|
|
779
|
-
* @public
|
|
780
|
-
*/
|
|
781
|
-
export declare interface ThemeColorButtonStates_v2 {
|
|
782
|
-
enabled: ThemeColorState_v2
|
|
783
|
-
hovered: ThemeColorState_v2
|
|
784
|
-
pressed: ThemeColorState_v2
|
|
785
|
-
selected: ThemeColorState_v2
|
|
786
|
-
disabled: ThemeColorState_v2
|
|
787
|
-
}
|
|
788
|
-
|
|
770
|
+
/** @public */
|
|
789
771
|
export declare interface ThemeColorButtonTokens
|
|
790
772
|
extends Partial<Record<ColorConfigStateTone, ThemeColorStatesTokens>> {
|
|
791
773
|
_hue?: ColorHueKey
|
|
792
774
|
}
|
|
793
775
|
|
|
776
|
+
/**
|
|
777
|
+
* @public
|
|
778
|
+
*/
|
|
779
|
+
export declare type ThemeColorButtonTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
|
|
780
|
+
|
|
794
781
|
/**
|
|
795
782
|
* TODO: Rename to `ThemeColorButtonMode`.
|
|
796
783
|
* @public
|
|
797
|
-
* @deprecated
|
|
784
|
+
* @deprecated Use `ThemeColorButtonTones_v2` instead.
|
|
798
785
|
*/
|
|
799
786
|
export declare interface ThemeColorButtonTones {
|
|
800
787
|
default: ThemeColorButtonStates
|
|
@@ -805,20 +792,8 @@ export declare interface ThemeColorButtonTones {
|
|
|
805
792
|
}
|
|
806
793
|
|
|
807
794
|
/**
|
|
808
|
-
* TODO: Rename to `ThemeColorButtonMode`.
|
|
809
795
|
* @public
|
|
810
|
-
|
|
811
|
-
export declare interface ThemeColorButtonTones_v2 {
|
|
812
|
-
default: ThemeColorButtonStates_v2
|
|
813
|
-
primary: ThemeColorButtonStates_v2
|
|
814
|
-
positive: ThemeColorButtonStates_v2
|
|
815
|
-
caution: ThemeColorButtonStates_v2
|
|
816
|
-
critical: ThemeColorButtonStates_v2
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* @public
|
|
821
|
-
* @deprecated
|
|
796
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
822
797
|
*/
|
|
823
798
|
export declare interface ThemeColorCard {
|
|
824
799
|
enabled: ThemeColorGenericState
|
|
@@ -846,7 +821,7 @@ export declare interface ThemeColorCard_v2 extends ThemeColorState_v2 {
|
|
|
846
821
|
|
|
847
822
|
/**
|
|
848
823
|
* @public
|
|
849
|
-
* @deprecated Use `
|
|
824
|
+
* @deprecated Use `ThemeColorState_v2` instead.
|
|
850
825
|
*/
|
|
851
826
|
export declare type ThemeColorCardState = ThemeColorGenericState
|
|
852
827
|
|
|
@@ -889,7 +864,7 @@ export declare interface ThemeColorGenericState {
|
|
|
889
864
|
|
|
890
865
|
/**
|
|
891
866
|
* @public
|
|
892
|
-
* @deprecated
|
|
867
|
+
* @deprecated Use `ThemeColorInput_v2` instead.
|
|
893
868
|
*/
|
|
894
869
|
export declare interface ThemeColorInput {
|
|
895
870
|
default: ThemeColorInputStates
|
|
@@ -899,17 +874,22 @@ export declare interface ThemeColorInput {
|
|
|
899
874
|
/**
|
|
900
875
|
* @public
|
|
901
876
|
*/
|
|
902
|
-
export declare
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
877
|
+
export declare type ThemeColorInput_v2 = Record<ThemeColorInputModeKey, ThemeColorInputMode_v2>
|
|
878
|
+
|
|
879
|
+
/**
|
|
880
|
+
* @public
|
|
881
|
+
*/
|
|
882
|
+
export declare type ThemeColorInputMode_v2 = Record<
|
|
883
|
+
ThemeColorInputStateKey,
|
|
884
|
+
ThemeColorInputState_v2
|
|
885
|
+
>
|
|
906
886
|
|
|
907
887
|
/** @public */
|
|
908
888
|
export declare type ThemeColorInputModeKey = (typeof THEME_COLOR_INPUT_MODES)[number]
|
|
909
889
|
|
|
910
890
|
/**
|
|
911
891
|
* @public
|
|
912
|
-
* @deprecated
|
|
892
|
+
* @deprecated Use `ThemeColorInputState_v2` instead.
|
|
913
893
|
*/
|
|
914
894
|
export declare interface ThemeColorInputState {
|
|
915
895
|
_blend?: ThemeColorBlendModeKey
|
|
@@ -939,7 +919,7 @@ export declare type ThemeColorInputStateKey = (typeof THEME_COLOR_INPUT_STATES)[
|
|
|
939
919
|
|
|
940
920
|
/**
|
|
941
921
|
* @public
|
|
942
|
-
* @deprecated
|
|
922
|
+
* @deprecated Use `ThemeColorInputMode_v2` instead.
|
|
943
923
|
*/
|
|
944
924
|
export declare interface ThemeColorInputStates {
|
|
945
925
|
enabled: ThemeColorInputState
|
|
@@ -948,16 +928,7 @@ export declare interface ThemeColorInputStates {
|
|
|
948
928
|
readOnly: ThemeColorInputState
|
|
949
929
|
}
|
|
950
930
|
|
|
951
|
-
/**
|
|
952
|
-
* @public
|
|
953
|
-
*/
|
|
954
|
-
export declare interface ThemeColorInputStates_v2 {
|
|
955
|
-
enabled: ThemeColorInputState_v2
|
|
956
|
-
disabled: ThemeColorInputState_v2
|
|
957
|
-
hovered: ThemeColorInputState_v2
|
|
958
|
-
readOnly: ThemeColorInputState_v2
|
|
959
|
-
}
|
|
960
|
-
|
|
931
|
+
/** @public */
|
|
961
932
|
export declare interface ThemeColorInputStateTokens {
|
|
962
933
|
_blend?: ColorBlendModeTokenValue
|
|
963
934
|
_hue?: ColorHueKey
|
|
@@ -970,6 +941,7 @@ export declare interface ThemeColorInputStateTokens {
|
|
|
970
941
|
placeholder?: ThemeColorTokenValue
|
|
971
942
|
}
|
|
972
943
|
|
|
944
|
+
/** @public */
|
|
973
945
|
export declare interface ThemeColorInputTokens
|
|
974
946
|
extends Partial<Record<ColorConfigInputState, ThemeColorInputStateTokens>> {
|
|
975
947
|
_hue?: ColorHueKey
|
|
@@ -986,7 +958,7 @@ export declare interface ThemeColorKBD {
|
|
|
986
958
|
|
|
987
959
|
/**
|
|
988
960
|
* @public
|
|
989
|
-
* @deprecated
|
|
961
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
990
962
|
*/
|
|
991
963
|
export declare interface ThemeColorMuted {
|
|
992
964
|
default: ThemeColorMutedTone
|
|
@@ -999,7 +971,7 @@ export declare interface ThemeColorMuted {
|
|
|
999
971
|
|
|
1000
972
|
/**
|
|
1001
973
|
* @public
|
|
1002
|
-
* @deprecated
|
|
974
|
+
* @deprecated Use `ThemeColorSelectableTone_v2` instead.
|
|
1003
975
|
*/
|
|
1004
976
|
export declare interface ThemeColorMutedTone {
|
|
1005
977
|
enabled: ThemeColorGenericState
|
|
@@ -1035,7 +1007,7 @@ export declare type ThemeColorScheme_v2 = Record<ThemeColorCardToneKey, ThemeCol
|
|
|
1035
1007
|
/**
|
|
1036
1008
|
* @public
|
|
1037
1009
|
*/
|
|
1038
|
-
export declare type ThemeColorSchemeKey =
|
|
1010
|
+
export declare type ThemeColorSchemeKey = (typeof THEME_COLOR_SCHEMES)[number]
|
|
1039
1011
|
|
|
1040
1012
|
/**
|
|
1041
1013
|
* @public
|
|
@@ -1063,13 +1035,10 @@ export declare interface ThemeColorSelectable {
|
|
|
1063
1035
|
/**
|
|
1064
1036
|
* @public
|
|
1065
1037
|
*/
|
|
1066
|
-
export declare
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
caution: ThemeColorSelectableStates_v2
|
|
1071
|
-
critical: ThemeColorSelectableStates_v2
|
|
1072
|
-
}
|
|
1038
|
+
export declare type ThemeColorSelectable_v2 = Record<
|
|
1039
|
+
ThemeColorStateToneKey,
|
|
1040
|
+
ThemeColorSelectableTone_v2
|
|
1041
|
+
>
|
|
1073
1042
|
|
|
1074
1043
|
/**
|
|
1075
1044
|
* @public
|
|
@@ -1092,13 +1061,7 @@ export declare interface ThemeColorSelectableStates {
|
|
|
1092
1061
|
/**
|
|
1093
1062
|
* @public
|
|
1094
1063
|
*/
|
|
1095
|
-
export declare
|
|
1096
|
-
enabled: ThemeColorState_v2
|
|
1097
|
-
hovered: ThemeColorState_v2
|
|
1098
|
-
pressed: ThemeColorState_v2
|
|
1099
|
-
selected: ThemeColorState_v2
|
|
1100
|
-
disabled: ThemeColorState_v2
|
|
1101
|
-
}
|
|
1064
|
+
export declare type ThemeColorSelectableTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
|
|
1102
1065
|
|
|
1103
1066
|
/** @public */
|
|
1104
1067
|
export declare interface ThemeColorShadow {
|
|
@@ -1110,7 +1073,7 @@ export declare interface ThemeColorShadow {
|
|
|
1110
1073
|
|
|
1111
1074
|
/**
|
|
1112
1075
|
* @public
|
|
1113
|
-
* @deprecated
|
|
1076
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
1114
1077
|
*/
|
|
1115
1078
|
export declare interface ThemeColorSolid {
|
|
1116
1079
|
default: ThemeColorSolidTone
|
|
@@ -1123,7 +1086,7 @@ export declare interface ThemeColorSolid {
|
|
|
1123
1086
|
|
|
1124
1087
|
/**
|
|
1125
1088
|
* @public
|
|
1126
|
-
* @deprecated
|
|
1089
|
+
* @deprecated Use `ThemeColorSelectableTone_v2` instead.
|
|
1127
1090
|
*/
|
|
1128
1091
|
export declare interface ThemeColorSolidTone {
|
|
1129
1092
|
enabled: ThemeColorGenericState
|
|
@@ -1181,10 +1144,12 @@ export declare interface ThemeColorState_v2 {
|
|
|
1181
1144
|
/** @public */
|
|
1182
1145
|
export declare type ThemeColorStateKey = (typeof THEME_COLOR_STATES)[number]
|
|
1183
1146
|
|
|
1147
|
+
/** @public */
|
|
1184
1148
|
export declare type ThemeColorStatesTokens = Partial<
|
|
1185
1149
|
Record<ColorConfigState, ThemeColorStateTokens>
|
|
1186
1150
|
>
|
|
1187
1151
|
|
|
1152
|
+
/** @public */
|
|
1188
1153
|
export declare interface ThemeColorStateTokens {
|
|
1189
1154
|
_blend?: ColorBlendModeTokenValue
|
|
1190
1155
|
_hue?: ColorHueKey
|
|
@@ -1264,6 +1229,7 @@ export declare interface ThemeColorSyntax {
|
|
|
1264
1229
|
variable: string
|
|
1265
1230
|
}
|
|
1266
1231
|
|
|
1232
|
+
/** @public */
|
|
1267
1233
|
export declare interface ThemeColorTokens {
|
|
1268
1234
|
base?: Partial<Record<ColorConfigCardTone, ThemeColorBaseTokens>>
|
|
1269
1235
|
button?: Partial<Record<ThemeColorButtonModeKey, ThemeColorButtonTokens>>
|
|
@@ -1498,10 +1464,11 @@ export declare interface TokenButtonKeyNode {
|
|
|
1498
1464
|
/** @internal */
|
|
1499
1465
|
export declare interface TokenColorValueNode {
|
|
1500
1466
|
type: 'color'
|
|
1501
|
-
key?: 'black' | 'white'
|
|
1467
|
+
key?: 'black' | 'white'
|
|
1502
1468
|
hue?: ColorHueKey
|
|
1503
|
-
|
|
1469
|
+
mix?: number
|
|
1504
1470
|
opacity?: number
|
|
1471
|
+
tint?: ColorTintKey
|
|
1505
1472
|
}
|
|
1506
1473
|
|
|
1507
1474
|
/** @internal */
|