@sanity/ui 2.0.0-alpha.1 → 2.0.0-alpha.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/dist/index.cjs.mjs +1 -0
- package/dist/index.d.ts +28 -7
- package/dist/index.esm.js +358 -398
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +357 -396
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/dialog/constants.ts +4 -0
- package/src/components/dialog/dialog.tsx +85 -23
- package/src/components/menu/menuGroup.tsx +22 -23
- package/src/components/menu/menuItem.tsx +29 -35
- package/src/primitives/_selectable/style.ts +0 -1
- package/src/primitives/badge/badge.tsx +5 -3
- package/src/primitives/card/card.tsx +1 -0
- package/src/primitives/textArea/textArea.tsx +1 -1
- package/src/primitives/textInput/textInput.tsx +1 -1
- 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/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/lib/theme/theme.ts +9 -4
- package/src/theme/studioTheme/color.ts +98 -82
- package/src/theme/studioTheme/helpers.ts +15 -1
- package/src/theme/studioTheme/theme.ts +5 -1
- package/src/theme/studioTheme/tints.ts +244 -84
package/dist/index.cjs.mjs
CHANGED
|
@@ -98,6 +98,7 @@ export const responsiveTextFont = cjs.responsiveTextFont;
|
|
|
98
98
|
export const rgbToHex = cjs.rgbToHex;
|
|
99
99
|
export const rgbToHsl = cjs.rgbToHsl;
|
|
100
100
|
export const rgba = cjs.rgba;
|
|
101
|
+
export const rgbaToRGBA = cjs.rgbaToRGBA;
|
|
101
102
|
export const screen = cjs.screen;
|
|
102
103
|
export const studioTheme = cjs.studioTheme;
|
|
103
104
|
export const useArrayProp = cjs.useArrayProp;
|
package/dist/index.d.ts
CHANGED
|
@@ -344,9 +344,18 @@ export declare interface BaseTheme<Styles extends {} = {}> {
|
|
|
344
344
|
textWeight: ThemeFontWeightKey
|
|
345
345
|
focusRing: FocusRing
|
|
346
346
|
}
|
|
347
|
+
card: {
|
|
348
|
+
focusRing: FocusRing
|
|
349
|
+
}
|
|
347
350
|
color: ThemeColorSchemes
|
|
348
351
|
container: number[]
|
|
352
|
+
/** @deprecated Use component-specific `focusRing` values instead */
|
|
353
|
+
focusRing: {
|
|
354
|
+
offset: number
|
|
355
|
+
width: number
|
|
356
|
+
}
|
|
349
357
|
fonts: ThemeFonts
|
|
358
|
+
input: ThemeInput
|
|
350
359
|
/**
|
|
351
360
|
* THIS API MAY BE UNSTABLE. DO NOT USE IN PRODUCTION.
|
|
352
361
|
* @beta
|
|
@@ -356,10 +365,6 @@ export declare interface BaseTheme<Styles extends {} = {}> {
|
|
|
356
365
|
radius: number[]
|
|
357
366
|
shadows: Array<ThemeShadow | null>
|
|
358
367
|
space: number[]
|
|
359
|
-
input: ThemeInput
|
|
360
|
-
card: {
|
|
361
|
-
focusRing: FocusRing
|
|
362
|
-
}
|
|
363
368
|
styles?: Styles
|
|
364
369
|
}
|
|
365
370
|
|
|
@@ -1659,12 +1664,12 @@ export declare interface MenuProps extends ResponsivePaddingProps {
|
|
|
1659
1664
|
* Source: https://www.w3.org/TR/compositing-1/#blendingmultiply
|
|
1660
1665
|
* @internal
|
|
1661
1666
|
*/
|
|
1662
|
-
export declare function multiply(b: RGB, s: RGB): RGB
|
|
1667
|
+
export declare function multiply(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
1663
1668
|
|
|
1664
1669
|
/**
|
|
1665
1670
|
* @internal
|
|
1666
1671
|
*/
|
|
1667
|
-
export declare function parseColor(color: unknown): RGB
|
|
1672
|
+
export declare function parseColor(color: unknown): RGB | RGBA
|
|
1668
1673
|
|
|
1669
1674
|
/**
|
|
1670
1675
|
* @public
|
|
@@ -2039,6 +2044,17 @@ export declare interface RGB {
|
|
|
2039
2044
|
r: number
|
|
2040
2045
|
g: number
|
|
2041
2046
|
b: number
|
|
2047
|
+
a?: undefined
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
/**
|
|
2051
|
+
* @internal
|
|
2052
|
+
*/
|
|
2053
|
+
export declare interface RGBA {
|
|
2054
|
+
r: number
|
|
2055
|
+
g: number
|
|
2056
|
+
b: number
|
|
2057
|
+
a: number
|
|
2042
2058
|
}
|
|
2043
2059
|
|
|
2044
2060
|
/**
|
|
@@ -2046,6 +2062,11 @@ export declare interface RGB {
|
|
|
2046
2062
|
*/
|
|
2047
2063
|
export declare function rgba(color: unknown, a: number): string
|
|
2048
2064
|
|
|
2065
|
+
/**
|
|
2066
|
+
* @internal
|
|
2067
|
+
*/
|
|
2068
|
+
export declare function rgbaToRGBA(rgba: string): RGBA
|
|
2069
|
+
|
|
2049
2070
|
/**
|
|
2050
2071
|
* @internal
|
|
2051
2072
|
*/
|
|
@@ -2067,7 +2088,7 @@ export declare type RootTheme = BaseTheme<Styles>
|
|
|
2067
2088
|
* Source: https://www.w3.org/TR/compositing-1/#blendingscreen
|
|
2068
2089
|
* @internal
|
|
2069
2090
|
*/
|
|
2070
|
-
declare function screen_2(b: RGB, s: RGB): RGB
|
|
2091
|
+
declare function screen_2(b: RGB | RGBA, s: RGB | RGBA): RGB
|
|
2071
2092
|
export {screen_2 as screen}
|
|
2072
2093
|
|
|
2073
2094
|
/**
|