@sanity/ui 0.38.1-next.6 → 0.38.1
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/sanity-ui.cjs.map +1 -1
- package/dist/sanity-ui.js.map +1 -1
- package/dist/types/src/index.d.ts +9 -6
- package/package.json +4 -4
- package/src/hooks/useArrayProp.ts +3 -2
- package/src/hooks/useElementRect/useElementRect.ts +2 -0
- package/src/theme/lib/theme/color/button/types.ts +1 -1
- package/src/theme/lib/theme/shadow.ts +1 -1
- package/src/theme/types.ts +1 -1
|
@@ -4,6 +4,9 @@ import {CSSObject} from 'styled-components'
|
|
|
4
4
|
import {default as React_2} from 'react'
|
|
5
5
|
import {StyledComponent} from 'styled-components'
|
|
6
6
|
|
|
7
|
+
/** @beta */
|
|
8
|
+
export declare type ArrayPropPrimitive = string | number | boolean | undefined | null
|
|
9
|
+
|
|
7
10
|
/**
|
|
8
11
|
* @internal
|
|
9
12
|
*/
|
|
@@ -1153,8 +1156,8 @@ export declare interface BoxProps
|
|
|
1153
1156
|
}
|
|
1154
1157
|
|
|
1155
1158
|
/**
|
|
1159
|
+
* TODO: Rename to `ThemeBoxShadow`
|
|
1156
1160
|
* @public
|
|
1157
|
-
* @todo Rename to `ThemeBoxShadow`
|
|
1158
1161
|
*/
|
|
1159
1162
|
export declare type BoxShadow = [number, number, number, number]
|
|
1160
1163
|
|
|
@@ -8669,8 +8672,6 @@ export declare interface PortalProviderProps {
|
|
|
8669
8672
|
__unstable_elements?: Record<string, HTMLElement | null | undefined>
|
|
8670
8673
|
}
|
|
8671
8674
|
|
|
8672
|
-
export declare type Primitive = string | number | boolean | undefined | null
|
|
8673
|
-
|
|
8674
8675
|
/**
|
|
8675
8676
|
* @public
|
|
8676
8677
|
*/
|
|
@@ -10872,7 +10873,7 @@ export declare interface StackProps extends BoxProps {
|
|
|
10872
10873
|
export declare const studioTheme: RootTheme
|
|
10873
10874
|
|
|
10874
10875
|
/**
|
|
10875
|
-
*
|
|
10876
|
+
* TODO: Rename to `ThemeStyles`
|
|
10876
10877
|
* @public
|
|
10877
10878
|
*/
|
|
10878
10879
|
export declare interface Styles {
|
|
@@ -14104,8 +14105,8 @@ export declare interface ThemeColorButtonStates {
|
|
|
14104
14105
|
}
|
|
14105
14106
|
|
|
14106
14107
|
/**
|
|
14108
|
+
* TODO: Rename to `ThemeColorButtonMode`.
|
|
14107
14109
|
* @public
|
|
14108
|
-
* @todo Rename to `ThemeColorButtonMode`.
|
|
14109
14110
|
*/
|
|
14110
14111
|
export declare interface ThemeColorButtonTones {
|
|
14111
14112
|
default: ThemeColorButtonStates
|
|
@@ -15038,7 +15039,7 @@ export declare interface TreeState {
|
|
|
15038
15039
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
15039
15040
|
* @beta
|
|
15040
15041
|
*/
|
|
15041
|
-
export declare function useArrayProp<T extends
|
|
15042
|
+
export declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
|
|
15042
15043
|
val: T | T[] | undefined,
|
|
15043
15044
|
defaultVal?: T[]
|
|
15044
15045
|
): T[]
|
|
@@ -15077,6 +15078,8 @@ export declare function useDialog(): DialogContextValue
|
|
|
15077
15078
|
|
|
15078
15079
|
/**
|
|
15079
15080
|
* Subscribe to the rect of a DOM element.
|
|
15081
|
+
* @beta
|
|
15082
|
+
*
|
|
15080
15083
|
* @deprecated Use `useElementSize` instead
|
|
15081
15084
|
*/
|
|
15082
15085
|
export declare function useElementRect(element: HTMLElement | null): DOMRectReadOnly | null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/ui",
|
|
3
|
-
"version": "0.38.1
|
|
3
|
+
"version": "0.38.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"module": "./dist/sanity-ui.js",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"@juggle/resize-observer": "^3.4.0",
|
|
33
33
|
"@popperjs/core": "^2.11.6",
|
|
34
34
|
"@reach/auto-id": "^0.17.0",
|
|
35
|
-
"@sanity/color": "2.1.15
|
|
36
|
-
"@sanity/icons": "1.3.5
|
|
35
|
+
"@sanity/color": "^2.1.15",
|
|
36
|
+
"@sanity/icons": "^1.3.5",
|
|
37
37
|
"framer-motion": "6.3.0",
|
|
38
38
|
"popper-max-size-modifier": "^0.2.0",
|
|
39
39
|
"react-is": "^17.0.2",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "18d4d339ca7de574829d021cafe5d04aca7eff7b"
|
|
75
75
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {useMemo} from 'react'
|
|
2
2
|
import {_getArrayProp} from '../styles'
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/** @beta */
|
|
5
|
+
export type ArrayPropPrimitive = string | number | boolean | undefined | null
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* This API might change. DO NOT USE IN PRODUCTION.
|
|
8
9
|
* @beta
|
|
9
10
|
*/
|
|
10
|
-
export function useArrayProp<T extends
|
|
11
|
+
export function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
|
|
11
12
|
val: T | T[] | undefined,
|
|
12
13
|
defaultVal?: T[]
|
|
13
14
|
): T[] {
|
package/src/theme/types.ts
CHANGED