@sanity/ui 2.0.0-alpha.2 → 2.0.0-alpha.21
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 +28 -0
- package/dist/index.d.ts +476 -12
- package/dist/index.esm.js +1326 -524
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1353 -523
- package/dist/index.js.map +1 -1
- package/package.json +6 -8
- package/src/components/autocomplete/autocomplete.tsx +6 -0
- package/src/components/dialog/constants.ts +4 -0
- package/src/components/dialog/dialog.tsx +79 -15
- package/src/components/hotkeys/hotkeys.tsx +2 -0
- package/src/components/menu/menu.tsx +2 -0
- package/src/components/menu/menuButton.tsx +2 -0
- package/src/components/menu/menuGroup.tsx +22 -23
- package/src/components/menu/menuItem.tsx +29 -35
- package/src/components/tab/tab.tsx +4 -1
- package/src/components/toast/toast.tsx +4 -0
- package/src/primitives/_selectable/style.ts +2 -1
- package/src/primitives/avatar/avatar.tsx +16 -9
- package/src/primitives/avatar/avatarCounter.tsx +3 -3
- package/src/primitives/avatar/styles.ts +1 -1
- package/src/primitives/badge/badge.tsx +7 -3
- package/src/primitives/box/box.tsx +3 -0
- package/src/primitives/button/__workshop__/sanityUploadButton.tsx +2 -1
- package/src/primitives/button/button.tsx +7 -3
- package/src/primitives/button/styles.ts +9 -2
- package/src/primitives/card/card.tsx +4 -0
- package/src/primitives/card/styles.ts +2 -0
- package/src/primitives/checkbox/checkbox.tsx +2 -0
- package/src/primitives/code/code.tsx +1 -0
- package/src/primitives/container/container.tsx +2 -0
- package/src/primitives/flex/flex.tsx +2 -0
- package/src/primitives/grid/grid.tsx +2 -0
- package/src/primitives/heading/heading.tsx +2 -0
- package/src/primitives/inline/inline.tsx +3 -0
- package/src/primitives/kbd/kbd.tsx +2 -0
- package/src/primitives/label/label.tsx +2 -0
- package/src/primitives/popover/popover.tsx +6 -1
- package/src/primitives/radio/radio.tsx +2 -0
- package/src/primitives/select/select.tsx +2 -0
- package/src/primitives/select/styles.ts +2 -0
- package/src/primitives/spinner/spinner.tsx +2 -0
- package/src/primitives/stack/stack.tsx +2 -0
- package/src/primitives/switch/switch.tsx +4 -0
- package/src/primitives/text/text.tsx +3 -0
- package/src/primitives/textArea/textArea.tsx +4 -1
- package/src/primitives/textInput/textInput.tsx +10 -1
- package/src/primitives/tooltip/__workshop__/customPortal.tsx +99 -0
- package/src/primitives/tooltip/__workshop__/index.ts +15 -0
- package/src/primitives/tooltip/__workshop__/overflowingBoundary.tsx +73 -0
- package/src/primitives/tooltip/__workshop__/resizableBoundary.tsx +85 -0
- package/src/primitives/tooltip/constants.ts +1 -0
- package/src/primitives/tooltip/tooltip.test.tsx +192 -0
- package/src/primitives/tooltip/tooltip.tsx +109 -33
- package/src/primitives/types.ts +4 -0
- package/src/styles/input/textInputStyle.ts +11 -6
- package/src/theme/_internal/__workshop__/build/story.tsx +288 -0
- package/src/theme/_internal/__workshop__/build/theme.ts +3 -0
- package/src/theme/_internal/__workshop__/index.ts +14 -0
- package/src/theme/_internal/build/buildTheme.test.ts +78 -0
- package/src/theme/_internal/build/buildTheme.ts +16 -0
- package/src/theme/_internal/build/colorTheme/buildColorTheme.test.ts +185 -0
- package/src/theme/_internal/build/colorTheme/buildColorTheme.ts +164 -0
- package/src/theme/_internal/build/colorTheme/renderColorTheme.ts +242 -0
- package/src/theme/_internal/build/colorTheme/resolveColorTokens.ts +121 -0
- package/src/theme/_internal/build/defaults/colorPalette.ts +8 -0
- package/src/theme/_internal/build/defaults/colorTokens.ts +147 -0
- package/src/theme/_internal/build/helpers.ts +65 -0
- package/src/theme/_internal/build/index.ts +1 -0
- package/src/theme/_internal/config/helpers.ts +47 -0
- package/src/theme/_internal/config/index.ts +3 -0
- package/src/theme/_internal/config/token/index.ts +2 -0
- package/src/theme/_internal/config/token/parseTokenKey.test.ts +72 -0
- package/src/theme/_internal/config/token/parseTokenKey.ts +88 -0
- package/src/theme/_internal/config/token/parseTokenValue.test.ts +45 -0
- package/src/theme/_internal/config/token/parseTokenValue.ts +123 -0
- package/src/theme/_internal/config/types.ts +137 -0
- package/src/theme/_internal/constants.ts +48 -0
- package/src/theme/_internal/helpers.ts +19 -0
- package/src/theme/_internal/index.ts +5 -0
- package/src/theme/_internal/types.ts +91 -0
- package/src/theme/index.ts +1 -0
- package/src/theme/lib/color-fns/blend/multiply.ts +2 -2
- package/src/theme/lib/color-fns/blend/screen.ts +2 -2
- package/src/theme/lib/color-fns/convert.ts +15 -1
- package/src/theme/lib/color-fns/parse.ts +7 -3
- package/src/theme/lib/color-fns/types.ts +11 -0
- package/src/theme/lib/theme/avatar.ts +2 -0
- package/src/theme/lib/theme/color/_legacy/createColorTheme.ts +7 -0
- package/src/theme/lib/theme/color/_legacy/index.ts +1 -0
- package/src/theme/lib/theme/color/_legacy/legacyColor.ts +3997 -0
- package/src/theme/studioTheme/color.ts +98 -82
- package/src/theme/studioTheme/helpers.ts +15 -1
- package/src/theme/studioTheme/theme.ts +5 -5
- package/src/theme/studioTheme/tints.ts +244 -84
- package/src/types/button.ts +5 -0
package/dist/index.cjs.mjs
CHANGED
|
@@ -9,6 +9,18 @@ export const BoundaryElementProvider = cjs.BoundaryElementProvider;
|
|
|
9
9
|
export const Box = cjs.Box;
|
|
10
10
|
export const Breadcrumbs = cjs.Breadcrumbs;
|
|
11
11
|
export const Button = cjs.Button;
|
|
12
|
+
export const COLOR_BASE_TONES = cjs.COLOR_BASE_TONES;
|
|
13
|
+
export const COLOR_BLEND_MODES = cjs.COLOR_BLEND_MODES;
|
|
14
|
+
export const COLOR_BUTTON_MODES = cjs.COLOR_BUTTON_MODES;
|
|
15
|
+
export const COLOR_CONFIG_BASE_KEYS = cjs.COLOR_CONFIG_BASE_KEYS;
|
|
16
|
+
export const COLOR_CONFIG_BASE_TONES = cjs.COLOR_CONFIG_BASE_TONES;
|
|
17
|
+
export const COLOR_CONFIG_BLEND_KEYS = cjs.COLOR_CONFIG_BLEND_KEYS;
|
|
18
|
+
export const COLOR_CONFIG_STATE_KEYS = cjs.COLOR_CONFIG_STATE_KEYS;
|
|
19
|
+
export const COLOR_CONFIG_STATE_TONES = cjs.COLOR_CONFIG_STATE_TONES;
|
|
20
|
+
export const COLOR_HUES = cjs.COLOR_HUES;
|
|
21
|
+
export const COLOR_STATES = cjs.COLOR_STATES;
|
|
22
|
+
export const COLOR_STATE_TONES = cjs.COLOR_STATE_TONES;
|
|
23
|
+
export const COLOR_TINTS = cjs.COLOR_TINTS;
|
|
12
24
|
export const Card = cjs.Card;
|
|
13
25
|
export const Checkbox = cjs.Checkbox;
|
|
14
26
|
export const Code = cjs.Code;
|
|
@@ -74,12 +86,25 @@ export const _raf = cjs._raf;
|
|
|
74
86
|
export const _raf2 = cjs._raf2;
|
|
75
87
|
export const _responsive = cjs._responsive;
|
|
76
88
|
export const attemptFocus = cjs.attemptFocus;
|
|
89
|
+
export const buildTheme = cjs.buildTheme;
|
|
77
90
|
export const containsOrEqualsElement = cjs.containsOrEqualsElement;
|
|
78
91
|
export const createColorTheme = cjs.createColorTheme;
|
|
79
92
|
export const focusFirstDescendant = cjs.focusFirstDescendant;
|
|
80
93
|
export const focusLastDescendant = cjs.focusLastDescendant;
|
|
81
94
|
export const hexToRgb = cjs.hexToRgb;
|
|
82
95
|
export const hslToRgb = cjs.hslToRgb;
|
|
96
|
+
export const isColorBlendModeValue = cjs.isColorBlendModeValue;
|
|
97
|
+
export const isColorButtonMode = cjs.isColorButtonMode;
|
|
98
|
+
export const isColorConfigBaseKey = cjs.isColorConfigBaseKey;
|
|
99
|
+
export const isColorConfigBaseTone = cjs.isColorConfigBaseTone;
|
|
100
|
+
export const isColorConfigBlendKey = cjs.isColorConfigBlendKey;
|
|
101
|
+
export const isColorConfigStateKey = cjs.isColorConfigStateKey;
|
|
102
|
+
export const isColorConfigStateTone = cjs.isColorConfigStateTone;
|
|
103
|
+
export const isColorHueValue = cjs.isColorHueValue;
|
|
104
|
+
export const isColorOpacityValue = cjs.isColorOpacityValue;
|
|
105
|
+
export const isColorTintValue = cjs.isColorTintValue;
|
|
106
|
+
export const isColorTokenValue = cjs.isColorTokenValue;
|
|
107
|
+
export const isColorValue = cjs.isColorValue;
|
|
83
108
|
export const isFocusable = cjs.isFocusable;
|
|
84
109
|
export const isHTMLAnchorElement = cjs.isHTMLAnchorElement;
|
|
85
110
|
export const isHTMLButtonElement = cjs.isHTMLButtonElement;
|
|
@@ -89,6 +114,8 @@ export const isHTMLSelectElement = cjs.isHTMLSelectElement;
|
|
|
89
114
|
export const isHTMLTextAreaElement = cjs.isHTMLTextAreaElement;
|
|
90
115
|
export const multiply = cjs.multiply;
|
|
91
116
|
export const parseColor = cjs.parseColor;
|
|
117
|
+
export const parseTokenKey = cjs.parseTokenKey;
|
|
118
|
+
export const parseTokenValue = cjs.parseTokenValue;
|
|
92
119
|
export const rem = cjs.rem;
|
|
93
120
|
export const responsiveCodeFontStyle = cjs.responsiveCodeFontStyle;
|
|
94
121
|
export const responsiveHeadingFont = cjs.responsiveHeadingFont;
|
|
@@ -98,6 +125,7 @@ export const responsiveTextFont = cjs.responsiveTextFont;
|
|
|
98
125
|
export const rgbToHex = cjs.rgbToHex;
|
|
99
126
|
export const rgbToHsl = cjs.rgbToHsl;
|
|
100
127
|
export const rgba = cjs.rgba;
|
|
128
|
+
export const rgbaToRGBA = cjs.rgbaToRGBA;
|
|
101
129
|
export const screen = cjs.screen;
|
|
102
130
|
export const studioTheme = cjs.studioTheme;
|
|
103
131
|
export const useArrayProp = cjs.useArrayProp;
|