@sanity/ui 2.0.0-beta.2 → 2.0.0-beta.4
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 +18 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +26 -218
- 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/components/menu/__workshop__/selectedItem.tsx +7 -2
- package/src/core/components/menu/menuButton.tsx +12 -1
- 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/index.d.ts
CHANGED
|
@@ -2,26 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import {AnimationEventHandler} from 'react'
|
|
4
4
|
import {AriaRole} from 'react'
|
|
5
|
-
import {BaseTheme} from '@sanity/ui/theme'
|
|
6
|
-
import {BoxShadow} from '@sanity/ui/theme'
|
|
7
|
-
import {buildTheme} from '@sanity/ui/theme'
|
|
5
|
+
import {BaseTheme as BaseTheme_2} from '@sanity/ui/theme'
|
|
8
6
|
import {ClipboardEventHandler} from 'react'
|
|
9
|
-
import {COLOR_CONFIG_BLEND_KEYS} from '@sanity/ui/theme'
|
|
10
|
-
import {COLOR_CONFIG_CARD_KEYS} from '@sanity/ui/theme'
|
|
11
|
-
import {COLOR_CONFIG_CARD_TONES} from '@sanity/ui/theme'
|
|
12
|
-
import {COLOR_CONFIG_STATE_KEYS} from '@sanity/ui/theme'
|
|
13
|
-
import {COLOR_CONFIG_STATE_TONES} from '@sanity/ui/theme'
|
|
14
|
-
import {ColorBlendModeTokenValue} from '@sanity/ui/theme'
|
|
15
|
-
import {ColorConfigBlendKey} from '@sanity/ui/theme'
|
|
16
|
-
import {ColorConfigCardKey} from '@sanity/ui/theme'
|
|
17
|
-
import {ColorConfigCardTone} from '@sanity/ui/theme'
|
|
18
|
-
import {ColorConfigOpacityValue} from '@sanity/ui/theme'
|
|
19
|
-
import {ColorConfigStateKey} from '@sanity/ui/theme'
|
|
20
|
-
import {ColorConfigStateTone} from '@sanity/ui/theme'
|
|
21
|
-
import {ColorConfigValue} from '@sanity/ui/theme'
|
|
22
7
|
import {Component} from 'react'
|
|
23
8
|
import {CompositionEventHandler} from 'react'
|
|
24
|
-
import {createColorTheme} from '@sanity/ui/theme'
|
|
25
9
|
import {CSSObject} from '@sanity/ui/theme'
|
|
26
10
|
import {CSSProperties} from 'react'
|
|
27
11
|
import {DragEventHandler} from 'react'
|
|
@@ -29,34 +13,16 @@ import {ElementType} from 'react'
|
|
|
29
13
|
import {FocusEventHandler} from 'react'
|
|
30
14
|
import {FormEventHandler} from 'react'
|
|
31
15
|
import {ForwardRefExoticComponent} from 'react'
|
|
32
|
-
import {
|
|
33
|
-
import {HSL} from '@sanity/ui/theme'
|
|
34
|
-
import {hslToRgb} from '@sanity/ui/theme'
|
|
16
|
+
import {HSL as HSL_2} from '@sanity/ui/theme'
|
|
35
17
|
import {HTMLProps} from 'react'
|
|
36
|
-
import {isColorBlendModeValue} from '@sanity/ui/theme'
|
|
37
|
-
import {isColorButtonMode} from '@sanity/ui/theme'
|
|
38
|
-
import {isColorConfigBaseKey} from '@sanity/ui/theme'
|
|
39
|
-
import {isColorConfigBaseTone} from '@sanity/ui/theme'
|
|
40
|
-
import {isColorConfigBlendKey} from '@sanity/ui/theme'
|
|
41
|
-
import {isColorConfigStateKey} from '@sanity/ui/theme'
|
|
42
|
-
import {isColorConfigStateTone} from '@sanity/ui/theme'
|
|
43
|
-
import {isColorHueKey} from '@sanity/ui/theme'
|
|
44
|
-
import {isColorOpacityValue} from '@sanity/ui/theme'
|
|
45
|
-
import {isColorTintKey} from '@sanity/ui/theme'
|
|
46
|
-
import {isColorTokenValue} from '@sanity/ui/theme'
|
|
47
|
-
import {isColorValue} from '@sanity/ui/theme'
|
|
48
18
|
import {IStyledComponent} from 'styled-components'
|
|
49
19
|
import {Key} from 'react'
|
|
50
20
|
import {KeyboardEventHandler} from 'react'
|
|
51
21
|
import {LegacyRef} from 'react'
|
|
52
22
|
import {MemoExoticComponent} from 'react'
|
|
53
23
|
import {MouseEventHandler} from 'react'
|
|
54
|
-
import {multiply} from '@sanity/ui/theme'
|
|
55
24
|
import {MutableRefObject} from 'react'
|
|
56
25
|
import {NamedExoticComponent} from 'react'
|
|
57
|
-
import {parseColor} from '@sanity/ui/theme'
|
|
58
|
-
import {parseTokenKey} from '@sanity/ui/theme'
|
|
59
|
-
import {parseTokenValue} from '@sanity/ui/theme'
|
|
60
26
|
import {PartialThemeColorBuilderOpts} from '@sanity/ui/theme'
|
|
61
27
|
import {PointerEventHandler} from 'react'
|
|
62
28
|
import {PropsWithChildren} from 'react'
|
|
@@ -66,34 +32,20 @@ import {ReactNode} from 'react'
|
|
|
66
32
|
import {Ref} from 'react'
|
|
67
33
|
import {RefAttributes} from 'react'
|
|
68
34
|
import {RefCallback} from 'react'
|
|
69
|
-
import {RGB} from '@sanity/ui/theme'
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {rgbaToRGBA} from '@sanity/ui/theme'
|
|
73
|
-
import {rgbToHex} from '@sanity/ui/theme'
|
|
74
|
-
import {rgbToHsl} from '@sanity/ui/theme'
|
|
75
|
-
import {RootTheme} from '@sanity/ui/theme'
|
|
76
|
-
import {screen as screen_2} from '@sanity/ui/theme'
|
|
77
|
-
import {defaultTheme as studioTheme} from '@sanity/ui/theme'
|
|
78
|
-
import {Theme} from '@sanity/ui/theme'
|
|
79
|
-
import {THEME_COLOR_BLEND_MODES} from '@sanity/ui/theme'
|
|
80
|
-
import {THEME_COLOR_BUTTON_MODES} from '@sanity/ui/theme'
|
|
81
|
-
import {THEME_COLOR_CARD_TONES} from '@sanity/ui/theme'
|
|
82
|
-
import {THEME_COLOR_STATE_TONES} from '@sanity/ui/theme'
|
|
83
|
-
import {THEME_COLOR_STATES} from '@sanity/ui/theme'
|
|
35
|
+
import {RGB as RGB_2} from '@sanity/ui/theme'
|
|
36
|
+
import {RootTheme as RootTheme_2} from '@sanity/ui/theme'
|
|
37
|
+
import {Theme as Theme_2} from '@sanity/ui/theme'
|
|
84
38
|
import {Theme_v2} from '@sanity/ui/theme'
|
|
85
39
|
import {ThemeAvatar} from '@sanity/ui/theme'
|
|
40
|
+
import {ThemeBoxShadow} from '@sanity/ui/theme'
|
|
86
41
|
import {ThemeColor} from '@sanity/ui/theme'
|
|
87
42
|
import {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
|
|
88
43
|
import {ThemeColorBase} from '@sanity/ui/theme'
|
|
89
|
-
import {ThemeColorBaseTokens} from '@sanity/ui/theme'
|
|
90
|
-
import {ThemeColorBlendModeKey} from '@sanity/ui/theme'
|
|
91
44
|
import {ThemeColorBuilderOpts} from '@sanity/ui/theme'
|
|
92
45
|
import {ThemeColorButton} from '@sanity/ui/theme'
|
|
93
|
-
import {ThemeColorButtonModeKey} from '@sanity/ui/theme'
|
|
46
|
+
import {ThemeColorButtonModeKey as ThemeColorButtonModeKey_2} from '@sanity/ui/theme'
|
|
94
47
|
import {ThemeColorButtonState} from '@sanity/ui/theme'
|
|
95
48
|
import {ThemeColorButtonStates} from '@sanity/ui/theme'
|
|
96
|
-
import {ThemeColorButtonTokens} from '@sanity/ui/theme'
|
|
97
49
|
import {ThemeColorButtonTones} from '@sanity/ui/theme'
|
|
98
50
|
import {ThemeColorCard} from '@sanity/ui/theme'
|
|
99
51
|
import {ThemeColorCardState} from '@sanity/ui/theme'
|
|
@@ -106,7 +58,7 @@ import {ThemeColorMuted} from '@sanity/ui/theme'
|
|
|
106
58
|
import {ThemeColorMutedTone} from '@sanity/ui/theme'
|
|
107
59
|
import {ThemeColorName} from '@sanity/ui/theme'
|
|
108
60
|
import {ThemeColorScheme} from '@sanity/ui/theme'
|
|
109
|
-
import {ThemeColorSchemeKey} from '@sanity/ui/theme'
|
|
61
|
+
import {ThemeColorSchemeKey as ThemeColorSchemeKey_2} from '@sanity/ui/theme'
|
|
110
62
|
import {ThemeColorSchemes} from '@sanity/ui/theme'
|
|
111
63
|
import {ThemeColorSelectable} from '@sanity/ui/theme'
|
|
112
64
|
import {ThemeColorSelectableState} from '@sanity/ui/theme'
|
|
@@ -115,33 +67,19 @@ import {ThemeColorSolid} from '@sanity/ui/theme'
|
|
|
115
67
|
import {ThemeColorSolidTone} from '@sanity/ui/theme'
|
|
116
68
|
import {ThemeColorSpot} from '@sanity/ui/theme'
|
|
117
69
|
import {ThemeColorSpotKey} from '@sanity/ui/theme'
|
|
118
|
-
import {ThemeColorStateKey} from '@sanity/ui/theme'
|
|
119
|
-
import {ThemeColorStatesTokens} from '@sanity/ui/theme'
|
|
120
|
-
import {ThemeColorStateTokens} from '@sanity/ui/theme'
|
|
121
70
|
import {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
122
|
-
import {ThemeColorSyntax} from '@sanity/ui/theme'
|
|
123
|
-
import {ThemeColorTokens} from '@sanity/ui/theme'
|
|
124
|
-
import {ThemeColorTokenValue} from '@sanity/ui/theme'
|
|
71
|
+
import {ThemeColorSyntax as ThemeColorSyntax_2} from '@sanity/ui/theme'
|
|
125
72
|
import {ThemeColorToneKey} from '@sanity/ui/theme'
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import {ThemeFontWeight} from '@sanity/ui/theme'
|
|
133
|
-
import {ThemeFontWeightKey} from '@sanity/ui/theme'
|
|
73
|
+
import {ThemeFont as ThemeFont_2} from '@sanity/ui/theme'
|
|
74
|
+
import {ThemeFontKey as ThemeFontKey_2} from '@sanity/ui/theme'
|
|
75
|
+
import {ThemeFonts as ThemeFonts_2} from '@sanity/ui/theme'
|
|
76
|
+
import {ThemeFontSize as ThemeFontSize_2} from '@sanity/ui/theme'
|
|
77
|
+
import {ThemeFontWeight as ThemeFontWeight_2} from '@sanity/ui/theme'
|
|
78
|
+
import {ThemeFontWeightKey as ThemeFontWeightKey_2} from '@sanity/ui/theme'
|
|
134
79
|
import {ThemeInput} from '@sanity/ui/theme'
|
|
135
|
-
import {ThemeLayer} from '@sanity/ui/theme'
|
|
136
|
-
import {ThemeShadow} from '@sanity/ui/theme'
|
|
80
|
+
import {ThemeLayer as ThemeLayer_2} from '@sanity/ui/theme'
|
|
81
|
+
import {ThemeShadow as ThemeShadow_2} from '@sanity/ui/theme'
|
|
137
82
|
import {ThemeStyles} from '@sanity/ui/theme'
|
|
138
|
-
import {TokenBaseKeyNode} from '@sanity/ui/theme'
|
|
139
|
-
import {TokenBlendModeValueNode} from '@sanity/ui/theme'
|
|
140
|
-
import {TokenButtonKeyNode} from '@sanity/ui/theme'
|
|
141
|
-
import {TokenColorValueNode} from '@sanity/ui/theme'
|
|
142
|
-
import {TokenHueValueNode} from '@sanity/ui/theme'
|
|
143
|
-
import {TokenKeyNode} from '@sanity/ui/theme'
|
|
144
|
-
import {TokenValueNode} from '@sanity/ui/theme'
|
|
145
83
|
import {TouchEventHandler} from 'react'
|
|
146
84
|
import {TransitionEventHandler} from 'react'
|
|
147
85
|
import {UIEventHandler} from 'react'
|
|
@@ -475,7 +413,11 @@ export declare interface BaseAutocompleteOption {
|
|
|
475
413
|
value: string
|
|
476
414
|
}
|
|
477
415
|
|
|
478
|
-
|
|
416
|
+
/**
|
|
417
|
+
* @public
|
|
418
|
+
* @deprecated Use `BaseTheme` from `@sanity/ui/theme` instead.
|
|
419
|
+
*/
|
|
420
|
+
export declare type BaseTheme = BaseTheme_2
|
|
479
421
|
|
|
480
422
|
/**
|
|
481
423
|
* @public
|
|
@@ -539,7 +481,11 @@ export declare interface BoxProps
|
|
|
539
481
|
forwardedAs?: React.ElementType | keyof JSX.IntrinsicElements
|
|
540
482
|
}
|
|
541
483
|
|
|
542
|
-
|
|
484
|
+
/**
|
|
485
|
+
* @public
|
|
486
|
+
* @deprecated Use `ThemeBoxShadow` from `@sanity/ui/theme` instead.
|
|
487
|
+
*/
|
|
488
|
+
export declare type BoxShadow = ThemeBoxShadow
|
|
543
489
|
|
|
544
490
|
/**
|
|
545
491
|
* @public
|
|
@@ -564,8 +510,6 @@ export declare interface BreadcrumbsProps {
|
|
|
564
510
|
space?: number | number[]
|
|
565
511
|
}
|
|
566
512
|
|
|
567
|
-
export {buildTheme}
|
|
568
|
-
|
|
569
513
|
/**
|
|
570
514
|
* @public
|
|
571
515
|
*/
|
|
@@ -577,7 +521,7 @@ export declare const Button: ForwardRefExoticComponent<
|
|
|
577
521
|
/**
|
|
578
522
|
* @public
|
|
579
523
|
*/
|
|
580
|
-
export declare type ButtonMode =
|
|
524
|
+
export declare type ButtonMode = ThemeColorButtonModeKey_2
|
|
581
525
|
|
|
582
526
|
/**
|
|
583
527
|
* @public
|
|
@@ -648,7 +592,7 @@ export declare interface CardProps
|
|
|
648
592
|
*/
|
|
649
593
|
__unstable_focusRing?: boolean
|
|
650
594
|
pressed?: boolean
|
|
651
|
-
scheme?:
|
|
595
|
+
scheme?: ThemeColorSchemeKey_2
|
|
652
596
|
tone?: CardTone
|
|
653
597
|
}
|
|
654
598
|
|
|
@@ -727,32 +671,6 @@ export declare interface CodeSkeletonProps extends SkeletonProps {
|
|
|
727
671
|
size?: number | number[]
|
|
728
672
|
}
|
|
729
673
|
|
|
730
|
-
export {COLOR_CONFIG_BLEND_KEYS}
|
|
731
|
-
|
|
732
|
-
export {COLOR_CONFIG_CARD_KEYS}
|
|
733
|
-
|
|
734
|
-
export {COLOR_CONFIG_CARD_TONES}
|
|
735
|
-
|
|
736
|
-
export {COLOR_CONFIG_STATE_KEYS}
|
|
737
|
-
|
|
738
|
-
export {COLOR_CONFIG_STATE_TONES}
|
|
739
|
-
|
|
740
|
-
export {ColorBlendModeTokenValue}
|
|
741
|
-
|
|
742
|
-
export {ColorConfigBlendKey}
|
|
743
|
-
|
|
744
|
-
export {ColorConfigCardKey}
|
|
745
|
-
|
|
746
|
-
export {ColorConfigCardTone}
|
|
747
|
-
|
|
748
|
-
export {ColorConfigOpacityValue}
|
|
749
|
-
|
|
750
|
-
export {ColorConfigStateKey}
|
|
751
|
-
|
|
752
|
-
export {ColorConfigStateTone}
|
|
753
|
-
|
|
754
|
-
export {ColorConfigValue}
|
|
755
|
-
|
|
756
674
|
/**
|
|
757
675
|
* The `Container` component wraps content layout in a defined set of widths.
|
|
758
676
|
*
|
|
@@ -773,9 +691,11 @@ export declare interface ContainerProps extends BoxProps, ResponsiveWidthProps {
|
|
|
773
691
|
*/
|
|
774
692
|
export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean
|
|
775
693
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
694
|
+
/**
|
|
695
|
+
* @public
|
|
696
|
+
* @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
|
|
697
|
+
*/
|
|
698
|
+
export declare const createColorTheme: any
|
|
779
699
|
|
|
780
700
|
/**
|
|
781
701
|
* @public
|
|
@@ -841,7 +761,7 @@ export declare interface DialogProps extends ResponsivePaddingProps, ResponsiveW
|
|
|
841
761
|
onClose?: () => void
|
|
842
762
|
portal?: string
|
|
843
763
|
position?: DialogPosition | DialogPosition[]
|
|
844
|
-
scheme?:
|
|
764
|
+
scheme?: ThemeColorSchemeKey_2
|
|
845
765
|
zOffset?: number | number[]
|
|
846
766
|
/**
|
|
847
767
|
* Whether the dialog should animate in on mount.
|
|
@@ -1019,7 +939,7 @@ export declare function focusLastDescendant(element: HTMLElement): boolean
|
|
|
1019
939
|
* @internal
|
|
1020
940
|
*/
|
|
1021
941
|
export declare interface FontWeightStyleProps {
|
|
1022
|
-
$weight?:
|
|
942
|
+
$weight?: ThemeFontWeightKey_2
|
|
1023
943
|
}
|
|
1024
944
|
|
|
1025
945
|
/**
|
|
@@ -1031,7 +951,7 @@ export declare function _getArrayProp<T = number>(val: T | T[] | undefined, defa
|
|
|
1031
951
|
* @internal
|
|
1032
952
|
*/
|
|
1033
953
|
export declare function _getResponsiveSpace(
|
|
1034
|
-
theme:
|
|
954
|
+
theme: Theme_2,
|
|
1035
955
|
props: string[],
|
|
1036
956
|
spaceIndexes?: number[],
|
|
1037
957
|
): CSSObject[] | null
|
|
@@ -1126,7 +1046,7 @@ export declare interface HeadingProps {
|
|
|
1126
1046
|
* @beta
|
|
1127
1047
|
*/
|
|
1128
1048
|
textOverflow?: 'ellipsis'
|
|
1129
|
-
weight?:
|
|
1049
|
+
weight?: ThemeFontWeightKey_2
|
|
1130
1050
|
}
|
|
1131
1051
|
|
|
1132
1052
|
/**
|
|
@@ -1149,7 +1069,11 @@ export declare interface HeadingSkeletonProps extends SkeletonProps {
|
|
|
1149
1069
|
size?: number | number[]
|
|
1150
1070
|
}
|
|
1151
1071
|
|
|
1152
|
-
|
|
1072
|
+
/**
|
|
1073
|
+
* @public
|
|
1074
|
+
* @deprecated Use `hexToRgb` from `@sanity/ui/theme` instead.
|
|
1075
|
+
*/
|
|
1076
|
+
export declare const hexToRgb: any
|
|
1153
1077
|
|
|
1154
1078
|
/**
|
|
1155
1079
|
* Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
|
|
@@ -1171,9 +1095,17 @@ export declare interface HotkeysProps {
|
|
|
1171
1095
|
keys?: string[]
|
|
1172
1096
|
}
|
|
1173
1097
|
|
|
1174
|
-
|
|
1098
|
+
/**
|
|
1099
|
+
* @public
|
|
1100
|
+
* @deprecated Use `HSL` from `@sanity/ui/theme` instead.
|
|
1101
|
+
*/
|
|
1102
|
+
export declare type HSL = HSL_2
|
|
1175
1103
|
|
|
1176
|
-
|
|
1104
|
+
/**
|
|
1105
|
+
* @public
|
|
1106
|
+
* @deprecated Use `hslToRgb` from `@sanity/ui/theme` instead.
|
|
1107
|
+
*/
|
|
1108
|
+
export declare const hslToRgb: any
|
|
1177
1109
|
|
|
1178
1110
|
/**
|
|
1179
1111
|
* The `Inline` component is a layout utility for aligning and spacing items horizontally.
|
|
@@ -1192,30 +1124,6 @@ export declare interface InlineProps extends Omit<BoxProps, 'display'> {
|
|
|
1192
1124
|
space?: number | number[]
|
|
1193
1125
|
}
|
|
1194
1126
|
|
|
1195
|
-
export {isColorBlendModeValue}
|
|
1196
|
-
|
|
1197
|
-
export {isColorButtonMode}
|
|
1198
|
-
|
|
1199
|
-
export {isColorConfigBaseKey}
|
|
1200
|
-
|
|
1201
|
-
export {isColorConfigBaseTone}
|
|
1202
|
-
|
|
1203
|
-
export {isColorConfigBlendKey}
|
|
1204
|
-
|
|
1205
|
-
export {isColorConfigStateKey}
|
|
1206
|
-
|
|
1207
|
-
export {isColorConfigStateTone}
|
|
1208
|
-
|
|
1209
|
-
export {isColorHueKey}
|
|
1210
|
-
|
|
1211
|
-
export {isColorOpacityValue}
|
|
1212
|
-
|
|
1213
|
-
export {isColorTintKey}
|
|
1214
|
-
|
|
1215
|
-
export {isColorTokenValue}
|
|
1216
|
-
|
|
1217
|
-
export {isColorValue}
|
|
1218
|
-
|
|
1219
1127
|
/**
|
|
1220
1128
|
* @internal
|
|
1221
1129
|
*/
|
|
@@ -1305,7 +1213,7 @@ export declare interface LabelProps {
|
|
|
1305
1213
|
* @beta
|
|
1306
1214
|
*/
|
|
1307
1215
|
textOverflow?: 'ellipsis'
|
|
1308
|
-
weight?:
|
|
1216
|
+
weight?: ThemeFontWeightKey_2
|
|
1309
1217
|
}
|
|
1310
1218
|
|
|
1311
1219
|
/**
|
|
@@ -1429,7 +1337,7 @@ export declare interface MenuButtonProps {
|
|
|
1429
1337
|
/**
|
|
1430
1338
|
* @deprecated Use `popover={{scheme: 'dark'}}` instead.
|
|
1431
1339
|
*/
|
|
1432
|
-
popoverScheme?:
|
|
1340
|
+
popoverScheme?: ThemeColorSchemeKey_2
|
|
1433
1341
|
/**
|
|
1434
1342
|
* @deprecated Use `popover={{radius: 2}}` instead.
|
|
1435
1343
|
*/
|
|
@@ -1834,13 +1742,17 @@ export declare interface MenuProps extends ResponsivePaddingProps {
|
|
|
1834
1742
|
space?: number | number[]
|
|
1835
1743
|
}
|
|
1836
1744
|
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
export
|
|
1745
|
+
/**
|
|
1746
|
+
* @public
|
|
1747
|
+
* @deprecated Use `multiply` from `@sanity/ui/theme` instead.
|
|
1748
|
+
*/
|
|
1749
|
+
export declare const multiply: any
|
|
1842
1750
|
|
|
1843
|
-
|
|
1751
|
+
/**
|
|
1752
|
+
* @public
|
|
1753
|
+
* @deprecated Use `parseColor` from `@sanity/ui/theme` instead.
|
|
1754
|
+
*/
|
|
1755
|
+
export declare const parseColor: any
|
|
1844
1756
|
|
|
1845
1757
|
export {PartialThemeColorBuilderOpts}
|
|
1846
1758
|
|
|
@@ -1909,7 +1821,7 @@ export declare interface PopoverProps
|
|
|
1909
1821
|
preventOverflow?: boolean
|
|
1910
1822
|
referenceBoundary?: HTMLElement | null
|
|
1911
1823
|
referenceElement?: HTMLElement | null
|
|
1912
|
-
scheme?:
|
|
1824
|
+
scheme?: ThemeColorSchemeKey_2
|
|
1913
1825
|
tone?: CardTone
|
|
1914
1826
|
/** @beta */
|
|
1915
1827
|
updateRef?:
|
|
@@ -2216,20 +2128,41 @@ export declare interface ResponsiveWidthStyleProps {
|
|
|
2216
2128
|
$width: (number | 'auto')[]
|
|
2217
2129
|
}
|
|
2218
2130
|
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
export
|
|
2131
|
+
/**
|
|
2132
|
+
* @public
|
|
2133
|
+
* @deprecated Use `RGB` from `@sanity/ui/theme` instead.
|
|
2134
|
+
*/
|
|
2135
|
+
export declare type RGB = RGB_2
|
|
2224
2136
|
|
|
2225
|
-
|
|
2137
|
+
/**
|
|
2138
|
+
* @public
|
|
2139
|
+
* @deprecated Use `rgba` from `@sanity/ui/theme` instead.
|
|
2140
|
+
*/
|
|
2141
|
+
export declare const rgba: any
|
|
2226
2142
|
|
|
2227
|
-
|
|
2143
|
+
/**
|
|
2144
|
+
* @public
|
|
2145
|
+
* @deprecated Use `rgbToHex` from `@sanity/ui/theme` instead.
|
|
2146
|
+
*/
|
|
2147
|
+
export declare const rgbToHex: any
|
|
2228
2148
|
|
|
2229
|
-
|
|
2149
|
+
/**
|
|
2150
|
+
* @public
|
|
2151
|
+
* @deprecated Use `rgbToHsl` from `@sanity/ui/theme` instead.
|
|
2152
|
+
*/
|
|
2153
|
+
export declare const rgbToHsl: any
|
|
2230
2154
|
|
|
2231
|
-
|
|
2155
|
+
/**
|
|
2156
|
+
* @public
|
|
2157
|
+
* @deprecated Use `RootTheme` from `@sanity/ui/theme` instead.
|
|
2158
|
+
*/
|
|
2159
|
+
export declare type RootTheme = RootTheme_2
|
|
2232
2160
|
|
|
2161
|
+
/**
|
|
2162
|
+
* @public
|
|
2163
|
+
* @deprecated Use `screen` from `@sanity/ui/theme` instead.
|
|
2164
|
+
*/
|
|
2165
|
+
declare const screen_2: any
|
|
2233
2166
|
export {screen_2 as screen}
|
|
2234
2167
|
|
|
2235
2168
|
/**
|
|
@@ -2326,7 +2259,17 @@ export declare interface StackProps extends BoxProps {
|
|
|
2326
2259
|
space?: number | number[]
|
|
2327
2260
|
}
|
|
2328
2261
|
|
|
2329
|
-
|
|
2262
|
+
/**
|
|
2263
|
+
* @public
|
|
2264
|
+
* @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
|
|
2265
|
+
*/
|
|
2266
|
+
export declare const studioTheme: any
|
|
2267
|
+
|
|
2268
|
+
/**
|
|
2269
|
+
* @public
|
|
2270
|
+
* @deprecated Use `ThemeStyles` from `@sanity/ui/theme` instead.
|
|
2271
|
+
*/
|
|
2272
|
+
export declare type Styles = ThemeStyles
|
|
2330
2273
|
|
|
2331
2274
|
/**
|
|
2332
2275
|
* The `Switch` component allows the user to toggle a setting on and off.
|
|
@@ -2452,7 +2395,7 @@ export declare interface TextAreaProps extends ResponsiveRadiusProps {
|
|
|
2452
2395
|
customValidity?: string
|
|
2453
2396
|
fontSize?: number | number[]
|
|
2454
2397
|
padding?: number | number[]
|
|
2455
|
-
weight?:
|
|
2398
|
+
weight?: ThemeFontWeightKey_2
|
|
2456
2399
|
}
|
|
2457
2400
|
|
|
2458
2401
|
/**
|
|
@@ -2498,7 +2441,7 @@ export declare interface TextInputProps {
|
|
|
2498
2441
|
space?: number | number[]
|
|
2499
2442
|
suffix?: React.ReactNode
|
|
2500
2443
|
type?: TextInputType
|
|
2501
|
-
weight?:
|
|
2444
|
+
weight?: ThemeFontWeightKey_2
|
|
2502
2445
|
}
|
|
2503
2446
|
|
|
2504
2447
|
/**
|
|
@@ -2534,7 +2477,7 @@ export declare interface TextProps {
|
|
|
2534
2477
|
* @beta
|
|
2535
2478
|
*/
|
|
2536
2479
|
textOverflow?: 'ellipsis'
|
|
2537
|
-
weight?:
|
|
2480
|
+
weight?: ThemeFontWeightKey_2
|
|
2538
2481
|
}
|
|
2539
2482
|
|
|
2540
2483
|
/**
|
|
@@ -2557,17 +2500,11 @@ export declare interface TextSkeletonProps extends SkeletonProps {
|
|
|
2557
2500
|
size?: number | number[]
|
|
2558
2501
|
}
|
|
2559
2502
|
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
export
|
|
2565
|
-
|
|
2566
|
-
export {THEME_COLOR_CARD_TONES}
|
|
2567
|
-
|
|
2568
|
-
export {THEME_COLOR_STATE_TONES}
|
|
2569
|
-
|
|
2570
|
-
export {THEME_COLOR_STATES}
|
|
2503
|
+
/**
|
|
2504
|
+
* @public
|
|
2505
|
+
* @deprecated Use `Theme` from `@sanity/ui/theme` instead.
|
|
2506
|
+
*/
|
|
2507
|
+
export declare type Theme = Theme_2
|
|
2571
2508
|
|
|
2572
2509
|
export {ThemeAvatar}
|
|
2573
2510
|
|
|
@@ -2575,30 +2512,26 @@ export {ThemeColor}
|
|
|
2575
2512
|
|
|
2576
2513
|
export {ThemeColorBase}
|
|
2577
2514
|
|
|
2578
|
-
export {ThemeColorBaseTokens}
|
|
2579
|
-
|
|
2580
|
-
export {ThemeColorBlendModeKey}
|
|
2581
|
-
|
|
2582
2515
|
export {ThemeColorBuilderOpts}
|
|
2583
2516
|
|
|
2584
2517
|
export {ThemeColorButton}
|
|
2585
2518
|
|
|
2586
|
-
|
|
2519
|
+
/**
|
|
2520
|
+
* @public
|
|
2521
|
+
* @deprecated Use `ThemeColorButtonModeKey` from `@sanity/ui/theme` instead.
|
|
2522
|
+
*/
|
|
2523
|
+
export declare type ThemeColorButtonModeKey = ThemeColorButtonModeKey_2
|
|
2587
2524
|
|
|
2588
2525
|
export {ThemeColorButtonState}
|
|
2589
2526
|
|
|
2590
2527
|
export {ThemeColorButtonStates}
|
|
2591
2528
|
|
|
2592
|
-
export {ThemeColorButtonTokens}
|
|
2593
|
-
|
|
2594
2529
|
export {ThemeColorButtonTones}
|
|
2595
2530
|
|
|
2596
2531
|
export {ThemeColorCard}
|
|
2597
2532
|
|
|
2598
2533
|
export {ThemeColorCardState}
|
|
2599
2534
|
|
|
2600
|
-
export {ThemeColorCardToneKey}
|
|
2601
|
-
|
|
2602
2535
|
export {ThemeColorGenericState}
|
|
2603
2536
|
|
|
2604
2537
|
export {ThemeColorInput}
|
|
@@ -2623,13 +2556,17 @@ export declare function ThemeColorProvider(props: ThemeColorProviderProps): Reac
|
|
|
2623
2556
|
*/
|
|
2624
2557
|
export declare interface ThemeColorProviderProps {
|
|
2625
2558
|
children?: React.ReactNode
|
|
2626
|
-
scheme?:
|
|
2559
|
+
scheme?: ThemeColorSchemeKey_2
|
|
2627
2560
|
tone?: ThemeColorCardToneKey
|
|
2628
2561
|
}
|
|
2629
2562
|
|
|
2630
2563
|
export {ThemeColorScheme}
|
|
2631
2564
|
|
|
2632
|
-
|
|
2565
|
+
/**
|
|
2566
|
+
* @public
|
|
2567
|
+
* @deprecated Use `ThemeColorSchemeKey` from `@sanity/ui/theme` instead.
|
|
2568
|
+
*/
|
|
2569
|
+
export declare type ThemeColorSchemeKey = ThemeColorSchemeKey_2
|
|
2633
2570
|
|
|
2634
2571
|
export {ThemeColorSchemes}
|
|
2635
2572
|
|
|
@@ -2647,58 +2584,74 @@ export {ThemeColorSpot}
|
|
|
2647
2584
|
|
|
2648
2585
|
export {ThemeColorSpotKey}
|
|
2649
2586
|
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
export
|
|
2655
|
-
|
|
2656
|
-
export {ThemeColorStateToneKey}
|
|
2657
|
-
|
|
2658
|
-
export {ThemeColorSyntax}
|
|
2659
|
-
|
|
2660
|
-
export {ThemeColorTokens}
|
|
2661
|
-
|
|
2662
|
-
export {ThemeColorTokenValue}
|
|
2587
|
+
/**
|
|
2588
|
+
* @public
|
|
2589
|
+
* @deprecated Use `ThemeColorSyntax` from `@sanity/ui/theme` instead.
|
|
2590
|
+
*/
|
|
2591
|
+
export declare type ThemeColorSyntax = ThemeColorSyntax_2
|
|
2663
2592
|
|
|
2664
2593
|
export {ThemeColorToneKey}
|
|
2665
2594
|
|
|
2666
|
-
export {ThemeConfig}
|
|
2667
|
-
|
|
2668
2595
|
/**
|
|
2669
2596
|
* @public
|
|
2670
2597
|
*/
|
|
2671
2598
|
export declare interface ThemeContextValue {
|
|
2672
2599
|
/** @deprecated No longer used */
|
|
2673
2600
|
version: 0.0
|
|
2674
|
-
scheme:
|
|
2675
|
-
theme:
|
|
2601
|
+
scheme: ThemeColorSchemeKey_2
|
|
2602
|
+
theme: RootTheme_2
|
|
2676
2603
|
tone: ThemeColorCardToneKey
|
|
2677
2604
|
}
|
|
2678
2605
|
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2606
|
+
/**
|
|
2607
|
+
* @public
|
|
2608
|
+
* @deprecated Use `ThemeFont` from `@sanity/ui/theme` instead.
|
|
2609
|
+
*/
|
|
2610
|
+
export declare type ThemeFont = ThemeFont_2
|
|
2682
2611
|
|
|
2683
|
-
|
|
2612
|
+
/**
|
|
2613
|
+
* @public
|
|
2614
|
+
* @deprecated Use `ThemeFontKey` from `@sanity/ui/theme` instead.
|
|
2615
|
+
*/
|
|
2616
|
+
export declare type ThemeFontKey = ThemeFontKey_2
|
|
2684
2617
|
|
|
2685
|
-
|
|
2618
|
+
/**
|
|
2619
|
+
* @public
|
|
2620
|
+
* @deprecated Use `ThemeFonts` from `@sanity/ui/theme` instead.
|
|
2621
|
+
*/
|
|
2622
|
+
export declare type ThemeFonts = ThemeFonts_2
|
|
2686
2623
|
|
|
2687
|
-
|
|
2624
|
+
/**
|
|
2625
|
+
* @public
|
|
2626
|
+
* @deprecated Use `ThemeFontSize` from `@sanity/ui/theme` instead.
|
|
2627
|
+
*/
|
|
2628
|
+
export declare type ThemeFontSize = ThemeFontSize_2
|
|
2688
2629
|
|
|
2689
|
-
|
|
2630
|
+
/**
|
|
2631
|
+
* @public
|
|
2632
|
+
* @deprecated Use `ThemeFontWeight` from `@sanity/ui/theme` instead.
|
|
2633
|
+
*/
|
|
2634
|
+
export declare type ThemeFontWeight = ThemeFontWeight_2
|
|
2690
2635
|
|
|
2691
|
-
|
|
2636
|
+
/**
|
|
2637
|
+
* @public
|
|
2638
|
+
* @deprecated Use `ThemeFontWeightKey` from `@sanity/ui/theme` instead.
|
|
2639
|
+
*/
|
|
2640
|
+
export declare type ThemeFontWeightKey = ThemeFontWeightKey_2
|
|
2692
2641
|
|
|
2693
2642
|
export {ThemeInput}
|
|
2694
2643
|
|
|
2695
|
-
|
|
2644
|
+
/**
|
|
2645
|
+
* @public
|
|
2646
|
+
* @deprecated Use `ThemeLayer` from `@sanity/ui/theme` instead.
|
|
2647
|
+
*/
|
|
2648
|
+
export declare type ThemeLayer = ThemeLayer_2
|
|
2696
2649
|
|
|
2697
2650
|
/**
|
|
2698
2651
|
* @internal
|
|
2699
2652
|
*/
|
|
2700
2653
|
export declare interface ThemeProps {
|
|
2701
|
-
theme:
|
|
2654
|
+
theme: Theme_2
|
|
2702
2655
|
}
|
|
2703
2656
|
|
|
2704
2657
|
/**
|
|
@@ -2711,14 +2664,16 @@ export declare function ThemeProvider(props: ThemeProviderProps): React.ReactEle
|
|
|
2711
2664
|
*/
|
|
2712
2665
|
export declare interface ThemeProviderProps {
|
|
2713
2666
|
children?: React.ReactNode
|
|
2714
|
-
scheme?:
|
|
2715
|
-
theme?:
|
|
2667
|
+
scheme?: ThemeColorSchemeKey_2
|
|
2668
|
+
theme?: RootTheme_2
|
|
2716
2669
|
tone?: ThemeColorCardToneKey
|
|
2717
2670
|
}
|
|
2718
2671
|
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2672
|
+
/**
|
|
2673
|
+
* @public
|
|
2674
|
+
* @deprecated Use `ThemeShadow` from `@sanity/ui/theme` instead.
|
|
2675
|
+
*/
|
|
2676
|
+
export declare type ThemeShadow = ThemeShadow_2
|
|
2722
2677
|
|
|
2723
2678
|
/**
|
|
2724
2679
|
* The `Toast` component gives feedback to users when an action has taken place.
|
|
@@ -2780,20 +2735,6 @@ export declare interface ToastProviderProps {
|
|
|
2780
2735
|
zOffset?: number | number[]
|
|
2781
2736
|
}
|
|
2782
2737
|
|
|
2783
|
-
export {TokenBaseKeyNode}
|
|
2784
|
-
|
|
2785
|
-
export {TokenBlendModeValueNode}
|
|
2786
|
-
|
|
2787
|
-
export {TokenButtonKeyNode}
|
|
2788
|
-
|
|
2789
|
-
export {TokenColorValueNode}
|
|
2790
|
-
|
|
2791
|
-
export {TokenHueValueNode}
|
|
2792
|
-
|
|
2793
|
-
export {TokenKeyNode}
|
|
2794
|
-
|
|
2795
|
-
export {TokenValueNode}
|
|
2796
|
-
|
|
2797
2738
|
/**
|
|
2798
2739
|
* Tooltips display information when hovering, focusing or tapping.
|
|
2799
2740
|
*
|
|
@@ -2864,7 +2805,7 @@ export declare interface TooltipProps extends Omit<LayerProps, 'as'> {
|
|
|
2864
2805
|
/** Whether or not to render the tooltip in a portal element. */
|
|
2865
2806
|
portal?: boolean | string
|
|
2866
2807
|
radius?: number | number[]
|
|
2867
|
-
scheme?:
|
|
2808
|
+
scheme?: ThemeColorSchemeKey_2
|
|
2868
2809
|
shadow?: number | number[]
|
|
2869
2810
|
/**
|
|
2870
2811
|
* Adds a delay to open or close the tooltip.
|
|
@@ -2935,7 +2876,7 @@ export declare interface TreeItemProps {
|
|
|
2935
2876
|
padding?: number | number[]
|
|
2936
2877
|
space?: number | number[]
|
|
2937
2878
|
text?: React.ReactNode
|
|
2938
|
-
weight?:
|
|
2879
|
+
weight?: ThemeFontWeightKey_2
|
|
2939
2880
|
}
|
|
2940
2881
|
|
|
2941
2882
|
/**
|
|
@@ -3060,7 +3001,7 @@ export declare function useRootTheme(): ThemeContextValue
|
|
|
3060
3001
|
/**
|
|
3061
3002
|
* @public
|
|
3062
3003
|
*/
|
|
3063
|
-
export declare function useTheme():
|
|
3004
|
+
export declare function useTheme(): Theme_2
|
|
3064
3005
|
|
|
3065
3006
|
/**
|
|
3066
3007
|
* @public
|