@sanity/ui 2.10.6 → 2.10.7
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 +10 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/core/primitives/popover/popover.tsx +5 -4
- package/src/core/primitives/tooltip/tooltip.tsx +1 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/ui",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.7",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"sanity",
|
|
6
6
|
"ui",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"@sanity/color": "^3.0.6",
|
|
110
110
|
"@sanity/icons": "^3.5.2",
|
|
111
111
|
"csstype": "^3.1.3",
|
|
112
|
-
"framer-motion": "^11.13.
|
|
112
|
+
"framer-motion": "^11.13.5",
|
|
113
113
|
"react-compiler-runtime": "19.0.0-beta-37ed2a7-20241206",
|
|
114
114
|
"react-refractor": "^2.2.0",
|
|
115
115
|
"use-effect-event": "^1.0.2"
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"@sanity/pkg-utils": "^6.11.15",
|
|
126
126
|
"@sanity/prettier-config": "^1.0.3",
|
|
127
127
|
"@sanity/semantic-release-preset": "^5.0.0",
|
|
128
|
-
"@sanity/ui-workshop": "^2.0.
|
|
128
|
+
"@sanity/ui-workshop": "^2.0.19",
|
|
129
129
|
"@storybook/addon-a11y": "^8.4.7",
|
|
130
130
|
"@storybook/addon-docs": "^8.4.7",
|
|
131
131
|
"@storybook/addon-essentials": "^8.4.7",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"@types/jest-axe": "^3.5.9",
|
|
149
149
|
"@types/node": "^20.12.7",
|
|
150
150
|
"@types/react": "^19.0.1",
|
|
151
|
-
"@types/react-dom": "^19.0.
|
|
151
|
+
"@types/react-dom": "^19.0.2",
|
|
152
152
|
"@types/react-is": "^19.0.0",
|
|
153
153
|
"@types/refractor": "^3.4.1",
|
|
154
154
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
@@ -327,6 +327,11 @@ export const Popover = memo(
|
|
|
327
327
|
middleware,
|
|
328
328
|
placement: placementProp,
|
|
329
329
|
whileElementsMounted: autoUpdate,
|
|
330
|
+
elements: referenceElement
|
|
331
|
+
? {
|
|
332
|
+
reference: referenceElement,
|
|
333
|
+
}
|
|
334
|
+
: undefined,
|
|
330
335
|
})
|
|
331
336
|
|
|
332
337
|
const referenceHidden = middlewareData.hide?.referenceHidden
|
|
@@ -383,10 +388,6 @@ export const Popover = memo(
|
|
|
383
388
|
}
|
|
384
389
|
}, [update, updateRef])
|
|
385
390
|
|
|
386
|
-
useEffect(() => {
|
|
387
|
-
if (referenceElement) refs.setReference(referenceElement)
|
|
388
|
-
}, [referenceElement, refs])
|
|
389
|
-
|
|
390
391
|
if (disabled) {
|
|
391
392
|
return childProp || <></>
|
|
392
393
|
}
|
|
@@ -170,6 +170,7 @@ export const Tooltip = forwardRef(function Tooltip(
|
|
|
170
170
|
middleware,
|
|
171
171
|
placement: placementProp,
|
|
172
172
|
whileElementsMounted: autoUpdate,
|
|
173
|
+
elements: {reference: referenceElement},
|
|
173
174
|
})
|
|
174
175
|
|
|
175
176
|
const arrowX = middlewareData.arrow?.x
|
|
@@ -273,9 +274,6 @@ export const Tooltip = forwardRef(function Tooltip(
|
|
|
273
274
|
if (!content && showTooltip) handleIsOpenChange(false)
|
|
274
275
|
}, [content, handleIsOpenChange, showTooltip])
|
|
275
276
|
|
|
276
|
-
// Update reference
|
|
277
|
-
useEffect(() => refs.setReference(referenceElement), [referenceElement, refs])
|
|
278
|
-
|
|
279
277
|
useEffect(() => {
|
|
280
278
|
// If the user clicks on escape key, close the tooltip.
|
|
281
279
|
if (!showTooltip) return
|