@sanity/ui 3.0.0-static.32 → 3.0.0-static.33
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/_chunks-cjs/_visual-editing.cjs +6 -3
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +7 -4
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/_visual-editing.d.cts +10 -0
- package/dist/_visual-editing.d.ts +10 -0
- package/dist/css/index.cjs +1 -1
- package/dist/css/index.cjs.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/css/index.js +1 -1
- package/dist/css/index.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/core/Root.tsx +2 -2
- package/src/core/primitives/popover/popover.tsx +30 -8
- package/src/css/primitives/root/root.css.ts +1 -1
- package/src/css/primitives/root/root.ts +1 -1
- package/dist/css/layers.css +0 -4
- package/dist/css/primitives/popover/popover.css +0 -4
package/dist/index.d.cts
CHANGED
|
@@ -1857,6 +1857,16 @@ export declare type PopoverOwnProps = Omit<LayerOwnProps, 'maxWidth'> & {
|
|
|
1857
1857
|
modal?: boolean
|
|
1858
1858
|
open?: boolean
|
|
1859
1859
|
placement?: Placement
|
|
1860
|
+
/**
|
|
1861
|
+
* When 'flip' (default), the placement is determined from the initial placement and the
|
|
1862
|
+
* fallback placements in order. Whichever fits in the viewport first.
|
|
1863
|
+
*
|
|
1864
|
+
* When 'autoPlacement', the initial placement and all fallback placements are evaluated
|
|
1865
|
+
* and the placement with the most viewport space available.
|
|
1866
|
+
*
|
|
1867
|
+
* Option is only relevant if either `constrainSize` or `preventOverflow` is `true`
|
|
1868
|
+
*/
|
|
1869
|
+
placementStrategy?: 'flip' | 'autoPlacement'
|
|
1860
1870
|
/** Whether or not to render the popover in a portal element. */
|
|
1861
1871
|
portal?: boolean | string
|
|
1862
1872
|
preventOverflow?: boolean
|
package/dist/index.d.ts
CHANGED
|
@@ -1857,6 +1857,16 @@ export declare type PopoverOwnProps = Omit<LayerOwnProps, 'maxWidth'> & {
|
|
|
1857
1857
|
modal?: boolean
|
|
1858
1858
|
open?: boolean
|
|
1859
1859
|
placement?: Placement
|
|
1860
|
+
/**
|
|
1861
|
+
* When 'flip' (default), the placement is determined from the initial placement and the
|
|
1862
|
+
* fallback placements in order. Whichever fits in the viewport first.
|
|
1863
|
+
*
|
|
1864
|
+
* When 'autoPlacement', the initial placement and all fallback placements are evaluated
|
|
1865
|
+
* and the placement with the most viewport space available.
|
|
1866
|
+
*
|
|
1867
|
+
* Option is only relevant if either `constrainSize` or `preventOverflow` is `true`
|
|
1868
|
+
*/
|
|
1869
|
+
placementStrategy?: 'flip' | 'autoPlacement'
|
|
1860
1870
|
/** Whether or not to render the popover in a portal element. */
|
|
1861
1871
|
portal?: boolean | string
|
|
1862
1872
|
preventOverflow?: boolean
|
package/dist/index.js
CHANGED
|
@@ -2255,7 +2255,7 @@ function Root(props) {
|
|
|
2255
2255
|
tone: t4,
|
|
2256
2256
|
...rest
|
|
2257
2257
|
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = forwardedRef, $[4] = height, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3, $[9] = t4) : (children = $[1], className = $[2], forwardedRef = $[3], height = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8], t4 = $[9]);
|
|
2258
|
-
const as = t1 === void 0 ? DEFAULT_ROOT_ELEMENT : t1, overflow = t2 === void 0 ? "hidden" : t2, scheme = t3 === void 0 ? "light" : t3, tone = t4 === void 0 ? "
|
|
2258
|
+
const as = t1 === void 0 ? DEFAULT_ROOT_ELEMENT : t1, overflow = t2 === void 0 ? "hidden" : t2, scheme = t3 === void 0 ? "light" : t3, tone = t4 === void 0 ? "default" : t4, ref = useRef(null);
|
|
2259
2259
|
let t5;
|
|
2260
2260
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[10] = t5) : t5 = $[10], useImperativeHandle(forwardedRef, t5);
|
|
2261
2261
|
const [portalElement, setPortalElement] = useState(null), [boundaryElement, setBoundaryElement] = useState(null);
|