@sanity/ui 2.0.0-beta.2 → 2.0.0-beta.3
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 +10 -36
- package/dist/index.d.ts +179 -238
- package/dist/index.esm.js +13 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +21 -217
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs.mjs +1 -1
- package/dist/theme.d.ts +75 -111
- package/dist/theme.esm.js +154 -92
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +154 -92
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
- package/src/core/_compat.ts +236 -87
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +6 -3
- package/src/core/primitives/kbd/kbd.tsx +2 -0
- package/src/core/styles/margin/marginsStyle.test.ts +2 -2
- package/src/core/styles/padding/paddingStyle.test.ts +2 -2
- package/src/core/theme/__workshop__/build/Root.tsx +20 -3
- package/src/core/theme/__workshop__/build/story.tsx +16 -10
- package/src/core/theme/__workshop__/canvas.tsx +7 -7
- package/src/core/theme/__workshop__/debug/story.tsx +159 -0
- package/src/core/theme/__workshop__/index.ts +5 -0
- package/src/core/theme/theme.test.tsx +2 -2
- package/src/core/types/button.ts +1 -2
- package/src/theme/build/_deprecated/color/factory.ts +3 -3
- package/src/theme/build/buildColorTheme.ts +16 -16
- package/src/theme/build/colorToken/colorToken.ts +19 -0
- package/src/theme/build/colorToken/compileColorToken.ts +17 -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 +1 -1
- package/src/theme/config/system.ts +9 -9
- 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.ts +1 -0
- package/src/theme/defaults/colorTokens.ts +127 -66
- 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',
|
|
@@ -221,7 +216,7 @@ export declare type ColorConfigValue =
|
|
|
221
216
|
|
|
222
217
|
/**
|
|
223
218
|
* @public
|
|
224
|
-
* @deprecated Use `
|
|
219
|
+
* @deprecated Use `buildColorTheme` instead.
|
|
225
220
|
*/
|
|
226
221
|
export declare function createColorTheme(
|
|
227
222
|
partialOpts?: PartialThemeColorBuilderOpts,
|
|
@@ -234,11 +229,6 @@ export declare function createColorTheme(
|
|
|
234
229
|
* */
|
|
235
230
|
export declare type CSSObject = StyledObject<any>
|
|
236
231
|
|
|
237
|
-
/**
|
|
238
|
-
* @public
|
|
239
|
-
*/
|
|
240
|
-
export declare const defaultTheme: BaseTheme
|
|
241
|
-
|
|
242
232
|
/** @internal */
|
|
243
233
|
export declare function getContrastRatio(bg: string, fg: string): number
|
|
244
234
|
|
|
@@ -331,13 +321,15 @@ export declare function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
|
331
321
|
*/
|
|
332
322
|
export declare function parseColor(color: unknown): RGB | RGBA
|
|
333
323
|
|
|
324
|
+
/** @internal */
|
|
334
325
|
export declare function parseTokenKey(str: string): TokenKeyNode | undefined
|
|
335
326
|
|
|
327
|
+
/** @internal */
|
|
336
328
|
export declare function parseTokenValue(str: string): TokenValueNode | undefined
|
|
337
329
|
|
|
338
330
|
/**
|
|
339
331
|
* @public
|
|
340
|
-
* @deprecated
|
|
332
|
+
* @deprecated Use `ThemeConfig` instead.
|
|
341
333
|
*/
|
|
342
334
|
export declare type PartialThemeColorBuilderOpts = Partial<ThemeColorBuilderOpts>
|
|
343
335
|
|
|
@@ -418,6 +410,7 @@ export declare interface RootTheme_v2 {
|
|
|
418
410
|
radius: number[]
|
|
419
411
|
shadow: Array<ThemeShadow | null>
|
|
420
412
|
space: number[]
|
|
413
|
+
/** @internal */
|
|
421
414
|
style?: ThemeStyles
|
|
422
415
|
}
|
|
423
416
|
|
|
@@ -429,12 +422,6 @@ export declare interface RootTheme_v2 {
|
|
|
429
422
|
declare function screen_2(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
430
423
|
export {screen_2 as screen}
|
|
431
424
|
|
|
432
|
-
/**
|
|
433
|
-
* @deprecated Use `ThemeStyles` instead
|
|
434
|
-
* @internal
|
|
435
|
-
*/
|
|
436
|
-
export declare type Styles = ThemeStyles
|
|
437
|
-
|
|
438
425
|
/**
|
|
439
426
|
* @public
|
|
440
427
|
*/
|
|
@@ -478,6 +465,9 @@ export declare const THEME_COLOR_INPUT_STATES: readonly [
|
|
|
478
465
|
'disabled',
|
|
479
466
|
]
|
|
480
467
|
|
|
468
|
+
/** @public */
|
|
469
|
+
export declare const THEME_COLOR_SCHEMES: readonly ['light', 'dark']
|
|
470
|
+
|
|
481
471
|
/** @public */
|
|
482
472
|
export declare const THEME_COLOR_STATE_TONES: readonly [
|
|
483
473
|
'default',
|
|
@@ -505,7 +495,7 @@ export declare type Theme_v2 = Omit<RootTheme_v2, 'color'> & {
|
|
|
505
495
|
|
|
506
496
|
/**
|
|
507
497
|
* @public
|
|
508
|
-
* @deprecated Use `ThemeAvatar_v2` instead
|
|
498
|
+
* @deprecated Use `ThemeAvatar_v2` from `@sanity/ui/theme` instead.
|
|
509
499
|
*/
|
|
510
500
|
export declare interface ThemeAvatar {
|
|
511
501
|
sizes: {
|
|
@@ -553,17 +543,7 @@ export declare interface ThemeColor extends Partial<Omit<ThemeColorGenericState,
|
|
|
553
543
|
/**
|
|
554
544
|
* @public
|
|
555
545
|
*/
|
|
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
|
-
}
|
|
546
|
+
export declare type ThemeColorAvatar_v2 = Record<ThemeColorAvatarColorKey, ThemeColorAvatarHue_v2>
|
|
567
547
|
|
|
568
548
|
/** @public */
|
|
569
549
|
export declare type ThemeColorAvatarColorKey = (typeof THEME_COLOR_AVATAR_COLORS)[number]
|
|
@@ -577,6 +557,7 @@ export declare interface ThemeColorAvatarHue_v2 {
|
|
|
577
557
|
fg: string
|
|
578
558
|
}
|
|
579
559
|
|
|
560
|
+
/** @public */
|
|
580
561
|
export declare interface ThemeColorAvatarHueTokens {
|
|
581
562
|
_blend?: ColorBlendModeTokenValue
|
|
582
563
|
_hue?: ColorHueKey
|
|
@@ -584,6 +565,7 @@ export declare interface ThemeColorAvatarHueTokens {
|
|
|
584
565
|
fg?: ThemeColorTokenValue
|
|
585
566
|
}
|
|
586
567
|
|
|
568
|
+
/** @public */
|
|
587
569
|
export declare interface ThemeColorAvatarTokens {
|
|
588
570
|
'*'?: ThemeColorAvatarHueTokens
|
|
589
571
|
gray?: ThemeColorAvatarHueTokens
|
|
@@ -608,6 +590,7 @@ export declare interface ThemeColorBadge_v2 {
|
|
|
608
590
|
critical: ThemeColorBadgeTone_v2
|
|
609
591
|
}
|
|
610
592
|
|
|
593
|
+
/** @public */
|
|
611
594
|
export declare interface ThemeColorBadgeTokens {
|
|
612
595
|
_hue?: ColorHueKey
|
|
613
596
|
bg?: ThemeColorTokenValue
|
|
@@ -616,6 +599,7 @@ export declare interface ThemeColorBadgeTokens {
|
|
|
616
599
|
icon?: ThemeColorTokenValue
|
|
617
600
|
}
|
|
618
601
|
|
|
602
|
+
/** @public */
|
|
619
603
|
export declare interface ThemeColorBadgeTokens {
|
|
620
604
|
'*'?: ThemeColorBadgeToneTokens
|
|
621
605
|
default?: ThemeColorBadgeToneTokens
|
|
@@ -635,6 +619,7 @@ export declare interface ThemeColorBadgeTone_v2 {
|
|
|
635
619
|
icon: string
|
|
636
620
|
}
|
|
637
621
|
|
|
622
|
+
/** @public */
|
|
638
623
|
export declare interface ThemeColorBadgeToneTokens {
|
|
639
624
|
_blend?: ColorBlendModeTokenValue
|
|
640
625
|
_hue?: ColorHueKey
|
|
@@ -666,6 +651,7 @@ export declare interface ThemeColorBase {
|
|
|
666
651
|
}
|
|
667
652
|
}
|
|
668
653
|
|
|
654
|
+
/** @public */
|
|
669
655
|
export declare interface ThemeColorBaseTokens extends ThemeColorStateTokens {
|
|
670
656
|
focusRing?: ThemeColorTokenValue
|
|
671
657
|
backdrop?: ThemeColorTokenValue
|
|
@@ -682,7 +668,7 @@ export declare type ThemeColorBlendModeKey = (typeof THEME_COLOR_BLEND_MODES)[nu
|
|
|
682
668
|
|
|
683
669
|
/**
|
|
684
670
|
* @public
|
|
685
|
-
* @deprecated
|
|
671
|
+
* @deprecated Use `buildColorTheme` instead.
|
|
686
672
|
*/
|
|
687
673
|
export declare interface ThemeColorBuilderOpts {
|
|
688
674
|
base: (opts: {dark: boolean; name: ThemeColorName}) => ThemeColorBase
|
|
@@ -737,7 +723,7 @@ export declare interface ThemeColorBuilderOpts {
|
|
|
737
723
|
|
|
738
724
|
/**
|
|
739
725
|
* @public
|
|
740
|
-
* @deprecated
|
|
726
|
+
* @deprecated Use `ThemeColorButton_v2` instead.
|
|
741
727
|
*/
|
|
742
728
|
export declare interface ThemeColorButton {
|
|
743
729
|
default: ThemeColorButtonTones
|
|
@@ -748,24 +734,28 @@ export declare interface ThemeColorButton {
|
|
|
748
734
|
/**
|
|
749
735
|
* @public
|
|
750
736
|
*/
|
|
751
|
-
export declare
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
737
|
+
export declare type ThemeColorButton_v2 = Record<ThemeColorButtonModeKey, ThemeColorButtonMode_v2>
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* @public
|
|
741
|
+
*/
|
|
742
|
+
export declare type ThemeColorButtonMode_v2 = Record<
|
|
743
|
+
ThemeColorStateToneKey,
|
|
744
|
+
ThemeColorButtonTone_v2
|
|
745
|
+
>
|
|
756
746
|
|
|
757
747
|
/** @public */
|
|
758
748
|
export declare type ThemeColorButtonModeKey = (typeof THEME_COLOR_BUTTON_MODES)[number]
|
|
759
749
|
|
|
760
750
|
/**
|
|
761
751
|
* @public
|
|
762
|
-
* @deprecated Use `
|
|
752
|
+
* @deprecated Use `ThemeColorState_v2` instead.
|
|
763
753
|
*/
|
|
764
754
|
export declare type ThemeColorButtonState = ThemeColorGenericState
|
|
765
755
|
|
|
766
756
|
/**
|
|
767
757
|
* @public
|
|
768
|
-
* @deprecated
|
|
758
|
+
* @deprecated Use `ThemeColorButtonStates_v2` instead.
|
|
769
759
|
*/
|
|
770
760
|
export declare interface ThemeColorButtonStates {
|
|
771
761
|
enabled: ThemeColorGenericState
|
|
@@ -775,26 +765,21 @@ export declare interface ThemeColorButtonStates {
|
|
|
775
765
|
disabled: ThemeColorGenericState
|
|
776
766
|
}
|
|
777
767
|
|
|
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
|
-
|
|
768
|
+
/** @public */
|
|
789
769
|
export declare interface ThemeColorButtonTokens
|
|
790
770
|
extends Partial<Record<ColorConfigStateTone, ThemeColorStatesTokens>> {
|
|
791
771
|
_hue?: ColorHueKey
|
|
792
772
|
}
|
|
793
773
|
|
|
774
|
+
/**
|
|
775
|
+
* @public
|
|
776
|
+
*/
|
|
777
|
+
export declare type ThemeColorButtonTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
|
|
778
|
+
|
|
794
779
|
/**
|
|
795
780
|
* TODO: Rename to `ThemeColorButtonMode`.
|
|
796
781
|
* @public
|
|
797
|
-
* @deprecated
|
|
782
|
+
* @deprecated Use `ThemeColorButtonTones_v2` instead.
|
|
798
783
|
*/
|
|
799
784
|
export declare interface ThemeColorButtonTones {
|
|
800
785
|
default: ThemeColorButtonStates
|
|
@@ -805,20 +790,8 @@ export declare interface ThemeColorButtonTones {
|
|
|
805
790
|
}
|
|
806
791
|
|
|
807
792
|
/**
|
|
808
|
-
* TODO: Rename to `ThemeColorButtonMode`.
|
|
809
793
|
* @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
|
|
794
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
822
795
|
*/
|
|
823
796
|
export declare interface ThemeColorCard {
|
|
824
797
|
enabled: ThemeColorGenericState
|
|
@@ -846,7 +819,7 @@ export declare interface ThemeColorCard_v2 extends ThemeColorState_v2 {
|
|
|
846
819
|
|
|
847
820
|
/**
|
|
848
821
|
* @public
|
|
849
|
-
* @deprecated Use `
|
|
822
|
+
* @deprecated Use `ThemeColorState_v2` instead.
|
|
850
823
|
*/
|
|
851
824
|
export declare type ThemeColorCardState = ThemeColorGenericState
|
|
852
825
|
|
|
@@ -889,7 +862,7 @@ export declare interface ThemeColorGenericState {
|
|
|
889
862
|
|
|
890
863
|
/**
|
|
891
864
|
* @public
|
|
892
|
-
* @deprecated
|
|
865
|
+
* @deprecated Use `ThemeColorInput_v2` instead.
|
|
893
866
|
*/
|
|
894
867
|
export declare interface ThemeColorInput {
|
|
895
868
|
default: ThemeColorInputStates
|
|
@@ -899,17 +872,22 @@ export declare interface ThemeColorInput {
|
|
|
899
872
|
/**
|
|
900
873
|
* @public
|
|
901
874
|
*/
|
|
902
|
-
export declare
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
875
|
+
export declare type ThemeColorInput_v2 = Record<ThemeColorInputModeKey, ThemeColorInputMode_v2>
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* @public
|
|
879
|
+
*/
|
|
880
|
+
export declare type ThemeColorInputMode_v2 = Record<
|
|
881
|
+
ThemeColorInputStateKey,
|
|
882
|
+
ThemeColorInputState_v2
|
|
883
|
+
>
|
|
906
884
|
|
|
907
885
|
/** @public */
|
|
908
886
|
export declare type ThemeColorInputModeKey = (typeof THEME_COLOR_INPUT_MODES)[number]
|
|
909
887
|
|
|
910
888
|
/**
|
|
911
889
|
* @public
|
|
912
|
-
* @deprecated
|
|
890
|
+
* @deprecated Use `ThemeColorInputState_v2` instead.
|
|
913
891
|
*/
|
|
914
892
|
export declare interface ThemeColorInputState {
|
|
915
893
|
_blend?: ThemeColorBlendModeKey
|
|
@@ -939,7 +917,7 @@ export declare type ThemeColorInputStateKey = (typeof THEME_COLOR_INPUT_STATES)[
|
|
|
939
917
|
|
|
940
918
|
/**
|
|
941
919
|
* @public
|
|
942
|
-
* @deprecated
|
|
920
|
+
* @deprecated Use `ThemeColorInputMode_v2` instead.
|
|
943
921
|
*/
|
|
944
922
|
export declare interface ThemeColorInputStates {
|
|
945
923
|
enabled: ThemeColorInputState
|
|
@@ -948,16 +926,7 @@ export declare interface ThemeColorInputStates {
|
|
|
948
926
|
readOnly: ThemeColorInputState
|
|
949
927
|
}
|
|
950
928
|
|
|
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
|
-
|
|
929
|
+
/** @public */
|
|
961
930
|
export declare interface ThemeColorInputStateTokens {
|
|
962
931
|
_blend?: ColorBlendModeTokenValue
|
|
963
932
|
_hue?: ColorHueKey
|
|
@@ -970,6 +939,7 @@ export declare interface ThemeColorInputStateTokens {
|
|
|
970
939
|
placeholder?: ThemeColorTokenValue
|
|
971
940
|
}
|
|
972
941
|
|
|
942
|
+
/** @public */
|
|
973
943
|
export declare interface ThemeColorInputTokens
|
|
974
944
|
extends Partial<Record<ColorConfigInputState, ThemeColorInputStateTokens>> {
|
|
975
945
|
_hue?: ColorHueKey
|
|
@@ -986,7 +956,7 @@ export declare interface ThemeColorKBD {
|
|
|
986
956
|
|
|
987
957
|
/**
|
|
988
958
|
* @public
|
|
989
|
-
* @deprecated
|
|
959
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
990
960
|
*/
|
|
991
961
|
export declare interface ThemeColorMuted {
|
|
992
962
|
default: ThemeColorMutedTone
|
|
@@ -999,7 +969,7 @@ export declare interface ThemeColorMuted {
|
|
|
999
969
|
|
|
1000
970
|
/**
|
|
1001
971
|
* @public
|
|
1002
|
-
* @deprecated
|
|
972
|
+
* @deprecated Use `ThemeColorSelectableTone_v2` instead.
|
|
1003
973
|
*/
|
|
1004
974
|
export declare interface ThemeColorMutedTone {
|
|
1005
975
|
enabled: ThemeColorGenericState
|
|
@@ -1035,7 +1005,7 @@ export declare type ThemeColorScheme_v2 = Record<ThemeColorCardToneKey, ThemeCol
|
|
|
1035
1005
|
/**
|
|
1036
1006
|
* @public
|
|
1037
1007
|
*/
|
|
1038
|
-
export declare type ThemeColorSchemeKey =
|
|
1008
|
+
export declare type ThemeColorSchemeKey = (typeof THEME_COLOR_SCHEMES)[number]
|
|
1039
1009
|
|
|
1040
1010
|
/**
|
|
1041
1011
|
* @public
|
|
@@ -1063,13 +1033,10 @@ export declare interface ThemeColorSelectable {
|
|
|
1063
1033
|
/**
|
|
1064
1034
|
* @public
|
|
1065
1035
|
*/
|
|
1066
|
-
export declare
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
caution: ThemeColorSelectableStates_v2
|
|
1071
|
-
critical: ThemeColorSelectableStates_v2
|
|
1072
|
-
}
|
|
1036
|
+
export declare type ThemeColorSelectable_v2 = Record<
|
|
1037
|
+
ThemeColorStateToneKey,
|
|
1038
|
+
ThemeColorSelectableTone_v2
|
|
1039
|
+
>
|
|
1073
1040
|
|
|
1074
1041
|
/**
|
|
1075
1042
|
* @public
|
|
@@ -1092,13 +1059,7 @@ export declare interface ThemeColorSelectableStates {
|
|
|
1092
1059
|
/**
|
|
1093
1060
|
* @public
|
|
1094
1061
|
*/
|
|
1095
|
-
export declare
|
|
1096
|
-
enabled: ThemeColorState_v2
|
|
1097
|
-
hovered: ThemeColorState_v2
|
|
1098
|
-
pressed: ThemeColorState_v2
|
|
1099
|
-
selected: ThemeColorState_v2
|
|
1100
|
-
disabled: ThemeColorState_v2
|
|
1101
|
-
}
|
|
1062
|
+
export declare type ThemeColorSelectableTone_v2 = Record<ThemeColorStateKey, ThemeColorState_v2>
|
|
1102
1063
|
|
|
1103
1064
|
/** @public */
|
|
1104
1065
|
export declare interface ThemeColorShadow {
|
|
@@ -1110,7 +1071,7 @@ export declare interface ThemeColorShadow {
|
|
|
1110
1071
|
|
|
1111
1072
|
/**
|
|
1112
1073
|
* @public
|
|
1113
|
-
* @deprecated
|
|
1074
|
+
* @deprecated Use `ThemeColorSelectable_v2` instead.
|
|
1114
1075
|
*/
|
|
1115
1076
|
export declare interface ThemeColorSolid {
|
|
1116
1077
|
default: ThemeColorSolidTone
|
|
@@ -1123,7 +1084,7 @@ export declare interface ThemeColorSolid {
|
|
|
1123
1084
|
|
|
1124
1085
|
/**
|
|
1125
1086
|
* @public
|
|
1126
|
-
* @deprecated
|
|
1087
|
+
* @deprecated Use `ThemeColorSelectableTone_v2` instead.
|
|
1127
1088
|
*/
|
|
1128
1089
|
export declare interface ThemeColorSolidTone {
|
|
1129
1090
|
enabled: ThemeColorGenericState
|
|
@@ -1181,10 +1142,12 @@ export declare interface ThemeColorState_v2 {
|
|
|
1181
1142
|
/** @public */
|
|
1182
1143
|
export declare type ThemeColorStateKey = (typeof THEME_COLOR_STATES)[number]
|
|
1183
1144
|
|
|
1145
|
+
/** @public */
|
|
1184
1146
|
export declare type ThemeColorStatesTokens = Partial<
|
|
1185
1147
|
Record<ColorConfigState, ThemeColorStateTokens>
|
|
1186
1148
|
>
|
|
1187
1149
|
|
|
1150
|
+
/** @public */
|
|
1188
1151
|
export declare interface ThemeColorStateTokens {
|
|
1189
1152
|
_blend?: ColorBlendModeTokenValue
|
|
1190
1153
|
_hue?: ColorHueKey
|
|
@@ -1264,6 +1227,7 @@ export declare interface ThemeColorSyntax {
|
|
|
1264
1227
|
variable: string
|
|
1265
1228
|
}
|
|
1266
1229
|
|
|
1230
|
+
/** @public */
|
|
1267
1231
|
export declare interface ThemeColorTokens {
|
|
1268
1232
|
base?: Partial<Record<ColorConfigCardTone, ThemeColorBaseTokens>>
|
|
1269
1233
|
button?: Partial<Record<ThemeColorButtonModeKey, ThemeColorButtonTokens>>
|