@sanity/ui 2.16.21 → 2.16.22
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 +6 -6
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +1 -1
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/core/components/toast/toast.tsx +1 -1
- package/src/core/components/toast/toastProvider.tsx +1 -1
- package/src/core/constants.ts +2 -2
- package/src/core/primitives/popover/popover.tsx +1 -1
- package/src/core/primitives/popover/popoverCard.tsx +1 -1
- package/src/core/primitives/tooltip/tooltip.tsx +1 -1
- package/src/core/primitives/tooltip/tooltipCard.tsx +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), react = require("react"), styledComponents = require("styled-components"), ReactIs = require("react-is"), icons = require("@sanity/icons"), reactDom$1 = require("@floating-ui/react-dom"),
|
|
2
|
+
var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), react = require("react"), styledComponents = require("styled-components"), ReactIs = require("react-is"), icons = require("@sanity/icons"), reactDom$1 = require("@floating-ui/react-dom"), react$1 = require("motion/react"), resizeObserver = require("@juggle/resize-observer"), reactDom = require("react-dom"), useEffectEvent = require("use-effect-event");
|
|
3
3
|
function _interopDefaultCompat(e) {
|
|
4
4
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
5
5
|
}
|
|
@@ -3418,10 +3418,10 @@ function calcMaxWidth(params) {
|
|
|
3418
3418
|
if (!(currentWidth === void 0 && boundaryWidth === void 0))
|
|
3419
3419
|
return Math.min(currentWidth ?? 1 / 0, (boundaryWidth || 1 / 0) - DEFAULT_POPOVER_PADDING * 2);
|
|
3420
3420
|
}
|
|
3421
|
-
const MotionCard$1 = styledComponents.styled(
|
|
3421
|
+
const MotionCard$1 = styledComponents.styled(react$1.motion.create(Card)).withConfig({
|
|
3422
3422
|
displayName: "MotionCard",
|
|
3423
3423
|
componentId: "sc-ihg31s-0"
|
|
3424
|
-
})`&:not([hidden]){display:flex;}flex-direction:column;width:max-content;min-width:min-content;will-change:transform;`, MotionFlex = styledComponents.styled(
|
|
3424
|
+
})`&:not([hidden]){display:flex;}flex-direction:column;width:max-content;min-width:min-content;will-change:transform;`, MotionFlex = styledComponents.styled(react$1.motion.create(Flex)).withConfig({
|
|
3425
3425
|
displayName: "MotionFlex",
|
|
3426
3426
|
componentId: "sc-ihg31s-1"
|
|
3427
3427
|
})`will-change:opacity;`, PopoverCard = react.memo(react.forwardRef(function(props, ref) {
|
|
@@ -3638,7 +3638,7 @@ const ViewportOverlay = () => {
|
|
|
3638
3638
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...restProps, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, hidden: referenceHidden, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, tone, width: matchReferenceWidth ? referenceWidthRef.current : width, x, y, children: content })
|
|
3639
3639
|
] }), children = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover);
|
|
3640
3640
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3641
|
-
animate ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3641
|
+
animate ? /* @__PURE__ */ jsxRuntime.jsx(react$1.AnimatePresence, { children }) : children,
|
|
3642
3642
|
child
|
|
3643
3643
|
] });
|
|
3644
3644
|
}));
|
|
@@ -4415,7 +4415,7 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4415
4415
|
right: ["right-end", "right-start", "left", "top", "bottom"],
|
|
4416
4416
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
4417
4417
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
4418
|
-
}, MotionCard = styledComponents.styled(
|
|
4418
|
+
}, MotionCard = styledComponents.styled(react$1.motion.create(Card)).withConfig({
|
|
4419
4419
|
displayName: "MotionCard",
|
|
4420
4420
|
componentId: "sc-1xn138w-0"
|
|
4421
4421
|
})`will-change:transform;`, TooltipCard = react.memo(react.forwardRef(function(props, ref) {
|
|
@@ -4615,7 +4615,7 @@ const StyledTooltip = styledComponents.styled(Layer).withConfig({
|
|
|
4615
4615
|
maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
|
|
4616
4616
|
}, zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, { ...restProps, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, children: content }) }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: tooltip }) : tooltip);
|
|
4617
4617
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4618
|
-
animate ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4618
|
+
animate ? /* @__PURE__ */ jsxRuntime.jsx(react$1.AnimatePresence, { children }) : children,
|
|
4619
4619
|
child
|
|
4620
4620
|
] });
|
|
4621
4621
|
});
|