@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/index.cjs.mjs
CHANGED
|
@@ -1,41 +1,5 @@
|
|
|
1
1
|
import cjs from './index.js';
|
|
2
2
|
|
|
3
|
-
export const COLOR_CONFIG_BLEND_KEYS = cjs.COLOR_CONFIG_BLEND_KEYS;
|
|
4
|
-
export const COLOR_CONFIG_CARD_KEYS = cjs.COLOR_CONFIG_CARD_KEYS;
|
|
5
|
-
export const COLOR_CONFIG_CARD_TONES = cjs.COLOR_CONFIG_CARD_TONES;
|
|
6
|
-
export const COLOR_CONFIG_STATE_KEYS = cjs.COLOR_CONFIG_STATE_KEYS;
|
|
7
|
-
export const COLOR_CONFIG_STATE_TONES = cjs.COLOR_CONFIG_STATE_TONES;
|
|
8
|
-
export const THEME_COLOR_BLEND_MODES = cjs.THEME_COLOR_BLEND_MODES;
|
|
9
|
-
export const THEME_COLOR_BUTTON_MODES = cjs.THEME_COLOR_BUTTON_MODES;
|
|
10
|
-
export const THEME_COLOR_CARD_TONES = cjs.THEME_COLOR_CARD_TONES;
|
|
11
|
-
export const THEME_COLOR_STATES = cjs.THEME_COLOR_STATES;
|
|
12
|
-
export const THEME_COLOR_STATE_TONES = cjs.THEME_COLOR_STATE_TONES;
|
|
13
|
-
export const buildTheme = cjs.buildTheme;
|
|
14
|
-
export const createColorTheme = cjs.createColorTheme;
|
|
15
|
-
export const hexToRgb = cjs.hexToRgb;
|
|
16
|
-
export const hslToRgb = cjs.hslToRgb;
|
|
17
|
-
export const isColorBlendModeValue = cjs.isColorBlendModeValue;
|
|
18
|
-
export const isColorButtonMode = cjs.isColorButtonMode;
|
|
19
|
-
export const isColorConfigBaseKey = cjs.isColorConfigBaseKey;
|
|
20
|
-
export const isColorConfigBaseTone = cjs.isColorConfigBaseTone;
|
|
21
|
-
export const isColorConfigBlendKey = cjs.isColorConfigBlendKey;
|
|
22
|
-
export const isColorConfigStateKey = cjs.isColorConfigStateKey;
|
|
23
|
-
export const isColorConfigStateTone = cjs.isColorConfigStateTone;
|
|
24
|
-
export const isColorHueKey = cjs.isColorHueKey;
|
|
25
|
-
export const isColorOpacityValue = cjs.isColorOpacityValue;
|
|
26
|
-
export const isColorTintKey = cjs.isColorTintKey;
|
|
27
|
-
export const isColorTokenValue = cjs.isColorTokenValue;
|
|
28
|
-
export const isColorValue = cjs.isColorValue;
|
|
29
|
-
export const multiply = cjs.multiply;
|
|
30
|
-
export const parseColor = cjs.parseColor;
|
|
31
|
-
export const parseTokenKey = cjs.parseTokenKey;
|
|
32
|
-
export const parseTokenValue = cjs.parseTokenValue;
|
|
33
|
-
export const rgbToHex = cjs.rgbToHex;
|
|
34
|
-
export const rgbToHsl = cjs.rgbToHsl;
|
|
35
|
-
export const rgba = cjs.rgba;
|
|
36
|
-
export const rgbaToRGBA = cjs.rgbaToRGBA;
|
|
37
|
-
export const screen = cjs.screen;
|
|
38
|
-
export const studioTheme = cjs.studioTheme;
|
|
39
3
|
export const Arrow = cjs.Arrow;
|
|
40
4
|
export const Autocomplete = cjs.Autocomplete;
|
|
41
5
|
export const Avatar = cjs.Avatar;
|
|
@@ -112,8 +76,11 @@ export const _raf2 = cjs._raf2;
|
|
|
112
76
|
export const _responsive = cjs._responsive;
|
|
113
77
|
export const attemptFocus = cjs.attemptFocus;
|
|
114
78
|
export const containsOrEqualsElement = cjs.containsOrEqualsElement;
|
|
79
|
+
export const createColorTheme = cjs.createColorTheme;
|
|
115
80
|
export const focusFirstDescendant = cjs.focusFirstDescendant;
|
|
116
81
|
export const focusLastDescendant = cjs.focusLastDescendant;
|
|
82
|
+
export const hexToRgb = cjs.hexToRgb;
|
|
83
|
+
export const hslToRgb = cjs.hslToRgb;
|
|
117
84
|
export const isFocusable = cjs.isFocusable;
|
|
118
85
|
export const isHTMLAnchorElement = cjs.isHTMLAnchorElement;
|
|
119
86
|
export const isHTMLButtonElement = cjs.isHTMLButtonElement;
|
|
@@ -121,12 +88,19 @@ export const isHTMLElement = cjs.isHTMLElement;
|
|
|
121
88
|
export const isHTMLInputElement = cjs.isHTMLInputElement;
|
|
122
89
|
export const isHTMLSelectElement = cjs.isHTMLSelectElement;
|
|
123
90
|
export const isHTMLTextAreaElement = cjs.isHTMLTextAreaElement;
|
|
91
|
+
export const multiply = cjs.multiply;
|
|
92
|
+
export const parseColor = cjs.parseColor;
|
|
124
93
|
export const rem = cjs.rem;
|
|
125
94
|
export const responsiveCodeFontStyle = cjs.responsiveCodeFontStyle;
|
|
126
95
|
export const responsiveHeadingFont = cjs.responsiveHeadingFont;
|
|
127
96
|
export const responsiveLabelFont = cjs.responsiveLabelFont;
|
|
128
97
|
export const responsiveTextAlignStyle = cjs.responsiveTextAlignStyle;
|
|
129
98
|
export const responsiveTextFont = cjs.responsiveTextFont;
|
|
99
|
+
export const rgbToHex = cjs.rgbToHex;
|
|
100
|
+
export const rgbToHsl = cjs.rgbToHsl;
|
|
101
|
+
export const rgba = cjs.rgba;
|
|
102
|
+
export const screen = cjs.screen;
|
|
103
|
+
export const studioTheme = cjs.studioTheme;
|
|
130
104
|
export const useArrayProp = cjs.useArrayProp;
|
|
131
105
|
export const useBoundaryElement = cjs.useBoundaryElement;
|
|
132
106
|
export const useClickOutside = cjs.useClickOutside;
|