@sanity/ui 3.0.0-static.5 → 3.0.0-static.6
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.js +10 -6
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +10 -6
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +10 -10
- package/dist/_visual-editing.d.ts +10 -10
- package/dist/cli.js +1 -1
- package/dist/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/css/primitives/_input/__workshop__/index.ts +1 -1
- package/src/ui/components/autocomplete/__workshop__/index.ts +1 -1
- package/src/ui/components/dialog/dialog.tsx +3 -4
- package/src/ui/constants.ts +6 -0
- package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +0 -2
- package/src/ui/primitives/code/code.tsx +1 -1
- package/src/ui/primitives/popover/popover.tsx +5 -75
- package/src/ui/primitives/textInput/textInput.tsx +1 -1
- package/src/ui/primitives/tooltip/tooltip.tsx +2 -3
|
@@ -142,6 +142,10 @@ const createColorTheme = createColorTheme$1, hexToRgb = hexToRgb$1, hslToRgb = h
|
|
|
142
142
|
visualDuration: 0.2,
|
|
143
143
|
bounce: 0.25
|
|
144
144
|
}
|
|
145
|
+
}, Z_OFFSETS = {
|
|
146
|
+
dialog: 600,
|
|
147
|
+
popover: 400,
|
|
148
|
+
tooltip: 200
|
|
145
149
|
};
|
|
146
150
|
function _isEnterToClickElement(element) {
|
|
147
151
|
return isHTMLAnchorElement(element) || isHTMLButtonElement(element);
|
|
@@ -950,7 +954,7 @@ const LazyRefractor = lazy(() => import("./refractor.mjs")), Code = forwardRef(f
|
|
|
950
954
|
weight,
|
|
951
955
|
...restProps
|
|
952
956
|
} = props, $[0] = props, $[1] = children, $[2] = className, $[3] = languageProp, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = weight) : (children = $[1], className = $[2], languageProp = $[3], restProps = $[4], t0 = $[5], t1 = $[6], weight = $[7]);
|
|
953
|
-
const As = t0 === void 0 ? "pre" : t0, size2 = t1 === void 0 ?
|
|
957
|
+
const As = t0 === void 0 ? "pre" : t0, size2 = t1 === void 0 ? 2 : t1, language = typeof languageProp == "string" ? languageProp : void 0;
|
|
954
958
|
let t2;
|
|
955
959
|
$[8] !== className || $[9] !== size2 || $[10] !== weight ? (t2 = composeClassNames(className, code({
|
|
956
960
|
size: size2,
|
|
@@ -1786,6 +1790,7 @@ const ViewportOverlay = () => {
|
|
|
1786
1790
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
1787
1791
|
animate: _animate = !1,
|
|
1788
1792
|
arrow: arrowProp = !1,
|
|
1793
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1789
1794
|
boundaryElement = boundaryElementContext.element,
|
|
1790
1795
|
children: childProp,
|
|
1791
1796
|
constrainSize = !1,
|
|
@@ -1811,7 +1816,7 @@ const ViewportOverlay = () => {
|
|
|
1811
1816
|
tone = "inherit",
|
|
1812
1817
|
width: widthProp = "auto",
|
|
1813
1818
|
// zOffset: zOffsetProp = layer.popover.zOffset,
|
|
1814
|
-
zOffset: zOffsetProp,
|
|
1819
|
+
zOffset: zOffsetProp = Z_OFFSETS.popover,
|
|
1815
1820
|
updateRef,
|
|
1816
1821
|
...restProps
|
|
1817
1822
|
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, zOffset = useArrayProp(zOffsetProp), ref = useRef(null), arrowRef = useRef(null), rootBoundary = "viewport";
|
|
@@ -2127,7 +2132,7 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
2127
2132
|
__unstable_disableFocusRing = t72, t0 = t82, className = t92, clearButton = t102, t1 = t112, t2 = t122, gap = t132, IconComponent = t142, IconRightComponent = t152, onClear = t162, t3 = t172, prefix = t182, t4 = t192, readOnly = t202, t5 = t212, suffix = t222, customValidity = t232, t6 = t242, width = t252, restProps = t262, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = className, $[5] = clearButton, $[6] = customValidity, $[7] = gap, $[8] = onClear, $[9] = prefix, $[10] = readOnly, $[11] = restProps, $[12] = suffix, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = width;
|
|
2128
2133
|
} else
|
|
2129
2134
|
IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6], gap = $[7], onClear = $[8], prefix = $[9], readOnly = $[10], restProps = $[11], suffix = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], t5 = $[18], t6 = $[19], width = $[20];
|
|
2130
|
-
const border = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize = t2 === void 0 ?
|
|
2135
|
+
const border = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, space = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = useRef(null), paddingArray = useArrayProp(padding), withClearButton = !!clearButton;
|
|
2131
2136
|
let t7;
|
|
2132
2137
|
$[21] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[21] = t7) : t7 = $[21], useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
2133
2138
|
const handleClearMouseDown = _temp;
|
|
@@ -2328,8 +2333,6 @@ function useTooltipDelayGroup() {
|
|
|
2328
2333
|
}
|
|
2329
2334
|
const Tooltip = forwardRef(function(props, forwardedRef) {
|
|
2330
2335
|
const boundaryElementContext = useBoundaryElement(), {
|
|
2331
|
-
layer
|
|
2332
|
-
} = useTheme_v2(), {
|
|
2333
2336
|
animate: _animate = !1,
|
|
2334
2337
|
arrow: arrowProp = !1,
|
|
2335
2338
|
boundaryElement = boundaryElementContext?.element,
|
|
@@ -2345,7 +2348,7 @@ const Tooltip = forwardRef(function(props, forwardedRef) {
|
|
|
2345
2348
|
radius = 3,
|
|
2346
2349
|
scheme,
|
|
2347
2350
|
shadow = 2,
|
|
2348
|
-
zOffset =
|
|
2351
|
+
zOffset = Z_OFFSETS.tooltip,
|
|
2349
2352
|
tone,
|
|
2350
2353
|
...restProps
|
|
2351
2354
|
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = useState(0);
|
|
@@ -3096,6 +3099,7 @@ export {
|
|
|
3096
3099
|
TooltipDelayGroupContext,
|
|
3097
3100
|
TooltipDelayGroupProvider,
|
|
3098
3101
|
VirtualList,
|
|
3102
|
+
Z_OFFSETS,
|
|
3099
3103
|
_ResizeObserver,
|
|
3100
3104
|
_elementSizeObserver,
|
|
3101
3105
|
_getArrayProp,
|