@sanity/ui 2.0.0 → 2.0.2

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.d.ts CHANGED
@@ -1859,6 +1859,10 @@ export declare interface PopoverProps
1859
1859
  portal?: boolean | string
1860
1860
  preventOverflow?: boolean
1861
1861
  referenceBoundary?: HTMLElement | null
1862
+ /**
1863
+ * When defined, the popover will be positioned relative to this element.
1864
+ * The children of the popover won't be rendered.
1865
+ */
1862
1866
  referenceElement?: HTMLElement | null
1863
1867
  scheme?: ThemeColorSchemeKey_2
1864
1868
  tone?: CardTone
package/dist/index.esm.js CHANGED
@@ -4227,8 +4227,9 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
4227
4227
  }
4228
4228
  }, [update, updateRef]);
4229
4229
  useEffect(() => {
4230
+ if (child) return;
4230
4231
  refs.setReference(referenceElement || null);
4231
- }, [referenceElement, refs]);
4232
+ }, [referenceElement, refs, child]);
4232
4233
  if (disabled) {
4233
4234
  return childProp || /* @__PURE__ */jsx(Fragment, {});
4234
4235
  }