@sanity/ui 2.8.24 → 2.8.26
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.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +19 -19
- package/src/core/primitives/popover/popover.tsx +6 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/ui",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.26",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"sanity",
|
|
6
6
|
"ui",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@sanity/icons": "^3.4.0",
|
|
111
111
|
"csstype": "^3.1.3",
|
|
112
112
|
"framer-motion": "11.0.8",
|
|
113
|
-
"react-compiler-runtime": "19.0.0-beta-
|
|
113
|
+
"react-compiler-runtime": "19.0.0-beta-df7b47d-20241124",
|
|
114
114
|
"react-refractor": "^2.2.0",
|
|
115
115
|
"use-effect-event": "^1.0.2"
|
|
116
116
|
},
|
|
@@ -126,20 +126,20 @@
|
|
|
126
126
|
"@sanity/prettier-config": "^1.0.3",
|
|
127
127
|
"@sanity/semantic-release-preset": "^5.0.0",
|
|
128
128
|
"@sanity/ui-workshop": "^2.0.16",
|
|
129
|
-
"@storybook/addon-a11y": "^8.4.
|
|
130
|
-
"@storybook/addon-docs": "^8.4.
|
|
131
|
-
"@storybook/addon-essentials": "^8.4.
|
|
132
|
-
"@storybook/addon-interactions": "^8.4.
|
|
133
|
-
"@storybook/addon-links": "^8.4.
|
|
134
|
-
"@storybook/addon-mdx-gfm": "^8.4.
|
|
135
|
-
"@storybook/addon-storysource": "^8.4.
|
|
136
|
-
"@storybook/addon-themes": "^8.4.
|
|
137
|
-
"@storybook/blocks": "^8.4.
|
|
138
|
-
"@storybook/manager-api": "^8.4.
|
|
139
|
-
"@storybook/react": "^8.4.
|
|
140
|
-
"@storybook/react-vite": "^8.4.
|
|
141
|
-
"@storybook/test": "^8.4.
|
|
142
|
-
"@storybook/theming": "^8.4.
|
|
129
|
+
"@storybook/addon-a11y": "^8.4.5",
|
|
130
|
+
"@storybook/addon-docs": "^8.4.5",
|
|
131
|
+
"@storybook/addon-essentials": "^8.4.5",
|
|
132
|
+
"@storybook/addon-interactions": "^8.4.5",
|
|
133
|
+
"@storybook/addon-links": "^8.4.5",
|
|
134
|
+
"@storybook/addon-mdx-gfm": "^8.4.5",
|
|
135
|
+
"@storybook/addon-storysource": "^8.4.5",
|
|
136
|
+
"@storybook/addon-themes": "^8.4.5",
|
|
137
|
+
"@storybook/blocks": "^8.4.5",
|
|
138
|
+
"@storybook/manager-api": "^8.4.5",
|
|
139
|
+
"@storybook/react": "^8.4.5",
|
|
140
|
+
"@storybook/react-vite": "^8.4.5",
|
|
141
|
+
"@storybook/test": "^8.4.5",
|
|
142
|
+
"@storybook/theming": "^8.4.5",
|
|
143
143
|
"@testing-library/dom": "^10.4.0",
|
|
144
144
|
"@testing-library/jest-dom": "^6.6.2",
|
|
145
145
|
"@testing-library/react": "^16.0.1",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
155
155
|
"@typescript-eslint/parser": "^7.18.0",
|
|
156
156
|
"@vitejs/plugin-react": "^4.3.3",
|
|
157
|
-
"babel-plugin-react-compiler": "19.0.0-beta-
|
|
157
|
+
"babel-plugin-react-compiler": "19.0.0-beta-df7b47d-20241124",
|
|
158
158
|
"commitizen": "^4.3.0",
|
|
159
159
|
"cypress": "^13.13.2",
|
|
160
160
|
"cypress-real-events": "^1.13.0",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
167
167
|
"eslint-plugin-prettier": "^5.2.1",
|
|
168
168
|
"eslint-plugin-react": "^7.37.2",
|
|
169
|
-
"eslint-plugin-react-compiler": "19.0.0-beta-
|
|
169
|
+
"eslint-plugin-react-compiler": "19.0.0-beta-df7b47d-20241124",
|
|
170
170
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
171
171
|
"eslint-plugin-storybook": "^0.11.0",
|
|
172
172
|
"http-server": "^14.1.1",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"rimraf": "^5.0.5",
|
|
186
186
|
"semantic-release": "^24.0.0",
|
|
187
187
|
"start-server-and-test": "^2.0.5",
|
|
188
|
-
"storybook": "^8.4.
|
|
188
|
+
"storybook": "^8.4.5",
|
|
189
189
|
"styled-components": "^6.1.13",
|
|
190
190
|
"tsconfig-paths": "^4.2.0",
|
|
191
191
|
"typescript": "5.6.3",
|
|
@@ -366,7 +366,10 @@ export const Popover = memo(
|
|
|
366
366
|
)
|
|
367
367
|
|
|
368
368
|
const child = useMemo(() => {
|
|
369
|
-
|
|
369
|
+
// If a reference element is defined, we don't need to clone the child
|
|
370
|
+
if (referenceElement) return childProp
|
|
371
|
+
|
|
372
|
+
if (!childProp) return null
|
|
370
373
|
|
|
371
374
|
return cloneElement(childProp, {ref: setReference})
|
|
372
375
|
}, [childProp, referenceElement, setReference])
|
|
@@ -382,9 +385,8 @@ export const Popover = memo(
|
|
|
382
385
|
}, [update, updateRef])
|
|
383
386
|
|
|
384
387
|
useEffect(() => {
|
|
385
|
-
if (
|
|
386
|
-
|
|
387
|
-
}, [referenceElement, refs, child])
|
|
388
|
+
if (referenceElement) refs.setReference(referenceElement)
|
|
389
|
+
}, [referenceElement, refs])
|
|
388
390
|
|
|
389
391
|
if (disabled) {
|
|
390
392
|
return childProp || <></>
|