@sanity/ui 0.38.2-next.22 → 0.38.3-next.5
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 +1 -11167
- package/dist/sanity-ui.cjs.map +1 -1
- package/dist/sanity-ui.js +1 -11043
- package/dist/sanity-ui.js.map +1 -1
- package/dist/types/src/index.d.ts +10 -10
- package/package.json +9 -7
- package/src/components/autocomplete/autocomplete.tsx +1 -1
- package/src/components/menu/menuGroup.tsx +1 -1
- package/src/components/menu/menuItem.tsx +2 -2
- package/src/components/tab/tab.tsx +1 -1
- package/src/components/tree/treeItem.tsx +1 -1
- package/src/primitives/button/button.tsx +2 -2
- package/src/primitives/textInput/textInput.tsx +2 -2
- package/src/styles/helpers.ts +1 -1
|
@@ -94,7 +94,7 @@ export declare interface AutocompleteProps<
|
|
|
94
94
|
customValidity?: string
|
|
95
95
|
filterOption?: (query: string, option: Option) => boolean
|
|
96
96
|
fontSize?: number | number[]
|
|
97
|
-
icon?: React.
|
|
97
|
+
icon?: React.ElementType | React.ReactNode
|
|
98
98
|
id: string
|
|
99
99
|
/**
|
|
100
100
|
* @beta
|
|
@@ -1567,8 +1567,8 @@ export declare interface ButtonProps extends ResponsivePaddingProps, ResponsiveR
|
|
|
1567
1567
|
as?: React.ElementType | keyof JSX.IntrinsicElements
|
|
1568
1568
|
fontSize?: number | number[]
|
|
1569
1569
|
mode?: ButtonMode
|
|
1570
|
-
icon?: React.
|
|
1571
|
-
iconRight?: React.
|
|
1570
|
+
icon?: React.ElementType | React.ReactNode
|
|
1571
|
+
iconRight?: React.ElementType | React.ReactNode
|
|
1572
1572
|
justify?: FlexJustify | FlexJustify[]
|
|
1573
1573
|
/**
|
|
1574
1574
|
* @beta Do not use in production, as this might change.
|
|
@@ -8123,7 +8123,7 @@ export declare function MenuGroup(
|
|
|
8123
8123
|
export declare interface MenuGroupProps {
|
|
8124
8124
|
as?: React.ElementType | keyof JSX.IntrinsicElements
|
|
8125
8125
|
fontSize?: number | number[]
|
|
8126
|
-
icon?: React.
|
|
8126
|
+
icon?: React.ElementType | React.ReactNode
|
|
8127
8127
|
padding?: number | number[]
|
|
8128
8128
|
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
8129
8129
|
radius?: number | number[]
|
|
@@ -8148,8 +8148,8 @@ export declare interface MenuItemProps extends ResponsivePaddingProps, Responsiv
|
|
|
8148
8148
|
as?: React.ElementType | keyof JSX.IntrinsicElements
|
|
8149
8149
|
fontSize?: number | number[]
|
|
8150
8150
|
hotkeys?: string[]
|
|
8151
|
-
icon?: React.
|
|
8152
|
-
iconRight?: React.
|
|
8151
|
+
icon?: React.ElementType | React.ReactNode
|
|
8152
|
+
iconRight?: React.ElementType | React.ReactNode
|
|
8153
8153
|
pressed?: boolean
|
|
8154
8154
|
selected?: boolean
|
|
8155
8155
|
space?: number | number[]
|
|
@@ -12378,7 +12378,7 @@ export declare interface TabProps {
|
|
|
12378
12378
|
*/
|
|
12379
12379
|
'aria-controls': string
|
|
12380
12380
|
id: string
|
|
12381
|
-
icon?: React.
|
|
12381
|
+
icon?: React.ElementType | React.ReactNode
|
|
12382
12382
|
focused?: boolean
|
|
12383
12383
|
fontSize?: number | number[]
|
|
12384
12384
|
label?: React.ReactNode
|
|
@@ -13527,8 +13527,8 @@ export declare interface TextInputProps {
|
|
|
13527
13527
|
clearButton?: boolean | TextInputClearButtonProps
|
|
13528
13528
|
customValidity?: string
|
|
13529
13529
|
fontSize?: number | number[]
|
|
13530
|
-
icon?: React.
|
|
13531
|
-
iconRight?: React.
|
|
13530
|
+
icon?: React.ElementType | React.ReactNode
|
|
13531
|
+
iconRight?: React.ElementType | React.ReactNode
|
|
13532
13532
|
/**
|
|
13533
13533
|
* @beta
|
|
13534
13534
|
*/
|
|
@@ -14996,7 +14996,7 @@ export declare const TreeItem: NamedExoticComponent<
|
|
|
14996
14996
|
export declare interface TreeItemProps {
|
|
14997
14997
|
expanded?: boolean
|
|
14998
14998
|
fontSize?: number | number[]
|
|
14999
|
-
icon?: React.
|
|
14999
|
+
icon?: React.ElementType
|
|
15000
15000
|
padding?: number | number[]
|
|
15001
15001
|
space?: number | number[]
|
|
15002
15002
|
text?: React.ReactNode
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/ui",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.3-next.5+6563c40f",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"module": "./dist/sanity-ui.js",
|
|
@@ -21,10 +21,12 @@
|
|
|
21
21
|
],
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"scripts": {
|
|
24
|
-
"build": "pkg build --tsconfig tsconfig.dist.json
|
|
24
|
+
"build": "pkg build --tsconfig tsconfig.dist.json",
|
|
25
|
+
"check:package": "pkg --strict --tsconfig tsconfig.dist.json",
|
|
25
26
|
"clean": "rimraf dist",
|
|
26
27
|
"lint": "eslint . --ext .js,.jsx,.mjs,.ts,.tsx --quiet",
|
|
27
|
-
"
|
|
28
|
+
"postbuild": "run-s check:package",
|
|
29
|
+
"prebuild": "run-s clean",
|
|
28
30
|
"test": "vitest run",
|
|
29
31
|
"type-check": "tsc --build",
|
|
30
32
|
"watch": "pkg watch --tsconfig tsconfig.dist.json"
|
|
@@ -32,8 +34,8 @@
|
|
|
32
34
|
"dependencies": {
|
|
33
35
|
"@juggle/resize-observer": "^3.4.0",
|
|
34
36
|
"@popperjs/core": "^2.11.6",
|
|
35
|
-
"@sanity/color": "2.1.
|
|
36
|
-
"@sanity/icons": "1.3.
|
|
37
|
+
"@sanity/color": "2.1.17-next.5+6563c40f",
|
|
38
|
+
"@sanity/icons": "1.3.7-next.5+6563c40f",
|
|
37
39
|
"framer-motion": "^7.3.2",
|
|
38
40
|
"popper-max-size-modifier": "^0.2.0",
|
|
39
41
|
"react-is": "^18.2.0",
|
|
@@ -42,7 +44,7 @@
|
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
44
46
|
"@testing-library/dom": "^8.17.1",
|
|
45
|
-
"@testing-library/react": "^
|
|
47
|
+
"@testing-library/react": "^12.1.5",
|
|
46
48
|
"@types/refractor": "^3.0.2",
|
|
47
49
|
"react": "^18.2.0",
|
|
48
50
|
"react-dom": "^18.2.0",
|
|
@@ -70,5 +72,5 @@
|
|
|
70
72
|
"publishConfig": {
|
|
71
73
|
"access": "public"
|
|
72
74
|
},
|
|
73
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "6563c40f58e38749d55e348ced73ceecefdd3319"
|
|
74
76
|
}
|
|
@@ -32,7 +32,7 @@ export interface AutocompleteProps<Option extends BaseAutocompleteOption = BaseA
|
|
|
32
32
|
customValidity?: string
|
|
33
33
|
filterOption?: (query: string, option: Option) => boolean
|
|
34
34
|
fontSize?: number | number[]
|
|
35
|
-
icon?: React.
|
|
35
|
+
icon?: React.ElementType | React.ReactNode
|
|
36
36
|
id: string
|
|
37
37
|
/**
|
|
38
38
|
* @beta
|
|
@@ -14,7 +14,7 @@ import {useMenu} from './useMenu'
|
|
|
14
14
|
export interface MenuGroupProps {
|
|
15
15
|
as?: React.ElementType | keyof JSX.IntrinsicElements
|
|
16
16
|
fontSize?: number | number[]
|
|
17
|
-
icon?: React.
|
|
17
|
+
icon?: React.ElementType | React.ReactNode
|
|
18
18
|
padding?: number | number[]
|
|
19
19
|
popover?: Omit<PopoverProps, 'content' | 'open'>
|
|
20
20
|
radius?: number | number[]
|
|
@@ -23,8 +23,8 @@ export interface MenuItemProps extends ResponsivePaddingProps, ResponsiveRadiusP
|
|
|
23
23
|
as?: React.ElementType | keyof JSX.IntrinsicElements
|
|
24
24
|
fontSize?: number | number[]
|
|
25
25
|
hotkeys?: string[]
|
|
26
|
-
icon?: React.
|
|
27
|
-
iconRight?: React.
|
|
26
|
+
icon?: React.ElementType | React.ReactNode
|
|
27
|
+
iconRight?: React.ElementType | React.ReactNode
|
|
28
28
|
pressed?: boolean
|
|
29
29
|
selected?: boolean
|
|
30
30
|
space?: number | number[]
|
|
@@ -19,7 +19,7 @@ import {useTree} from './useTree'
|
|
|
19
19
|
export interface TreeItemProps {
|
|
20
20
|
expanded?: boolean
|
|
21
21
|
fontSize?: number | number[]
|
|
22
|
-
icon?: React.
|
|
22
|
+
icon?: React.ElementType
|
|
23
23
|
padding?: number | number[]
|
|
24
24
|
space?: number | number[]
|
|
25
25
|
text?: React.ReactNode
|
|
@@ -20,8 +20,8 @@ export interface ButtonProps extends ResponsivePaddingProps, ResponsiveRadiusPro
|
|
|
20
20
|
as?: React.ElementType | keyof JSX.IntrinsicElements
|
|
21
21
|
fontSize?: number | number[]
|
|
22
22
|
mode?: ButtonMode
|
|
23
|
-
icon?: React.
|
|
24
|
-
iconRight?: React.
|
|
23
|
+
icon?: React.ElementType | React.ReactNode
|
|
24
|
+
iconRight?: React.ElementType | React.ReactNode
|
|
25
25
|
justify?: FlexJustify | FlexJustify[]
|
|
26
26
|
/**
|
|
27
27
|
* @beta Do not use in production, as this might change.
|
|
@@ -55,8 +55,8 @@ export interface TextInputProps {
|
|
|
55
55
|
clearButton?: boolean | TextInputClearButtonProps
|
|
56
56
|
customValidity?: string
|
|
57
57
|
fontSize?: number | number[]
|
|
58
|
-
icon?: React.
|
|
59
|
-
iconRight?: React.
|
|
58
|
+
icon?: React.ElementType | React.ReactNode
|
|
59
|
+
iconRight?: React.ElementType | React.ReactNode
|
|
60
60
|
/**
|
|
61
61
|
* @beta
|
|
62
62
|
*/
|
package/src/styles/helpers.ts
CHANGED
|
@@ -30,7 +30,7 @@ export function _responsive<T>(
|
|
|
30
30
|
values: T[],
|
|
31
31
|
callback: (value: T, index: number, array: T[]) => CSSObject
|
|
32
32
|
): CSSObject[] {
|
|
33
|
-
const statements = values
|
|
33
|
+
const statements = values?.map(callback) || []
|
|
34
34
|
|
|
35
35
|
return statements.map((statement, mediaIndex) => {
|
|
36
36
|
if (mediaIndex === 0) return statement
|