@sanity/ui 3.0.0-static.13 → 3.0.0-static.14

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.
@@ -1679,9 +1679,9 @@ function size(options) {
1679
1679
  }
1680
1680
  };
1681
1681
  }
1682
- const DEFAULT_POPOVER_CARD_ELEMENT = "div", MotionCard$1 = framerMotion.motion.create(Card);
1683
- function PopoverCard(props) {
1684
- const $ = reactCompilerRuntime.c(68), t0 = props;
1682
+ const DEFAULT_POPOVER_LAYER_ELEMENT = "div", MotionLayer$1 = framerMotion.motion.create(Layer);
1683
+ function PopoverLayer(props) {
1684
+ const $ = reactCompilerRuntime.c(67), t0 = props;
1685
1685
  let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, maxWidth, originX, originY, overflow, padding, placement, radius, referenceWidth, rest, shadow, strategy, style, t1, t2, xProp, yProp;
1686
1686
  $[0] !== t0 ? ({
1687
1687
  __unstable_margins: marginsProp,
@@ -1708,56 +1708,54 @@ function PopoverCard(props) {
1708
1708
  y: yProp,
1709
1709
  ...rest
1710
1710
  } = t0, $[0] = t0, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = maxWidth, $[9] = originX, $[10] = originY, $[11] = overflow, $[12] = padding, $[13] = placement, $[14] = radius, $[15] = referenceWidth, $[16] = rest, $[17] = shadow, $[18] = strategy, $[19] = style, $[20] = t1, $[21] = t2, $[22] = xProp, $[23] = yProp) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], maxWidth = $[8], originX = $[9], originY = $[10], overflow = $[11], padding = $[12], placement = $[13], radius = $[14], referenceWidth = $[15], rest = $[16], shadow = $[17], strategy = $[18], style = $[19], t1 = $[20], t2 = $[21], xProp = $[22], yProp = $[23]);
1711
- const as = t1 === void 0 ? DEFAULT_POPOVER_CARD_ELEMENT : t1, tone = t2 === void 0 ? "inherit" : t2, layer = useLayer();
1711
+ const as = t1 === void 0 ? DEFAULT_POPOVER_LAYER_ELEMENT : t1, tone = t2 === void 0 ? "inherit" : t2;
1712
1712
  let t3;
1713
1713
  t3 = marginsProp || DEFAULT_POPOVER_MARGINS;
1714
1714
  const margins = t3, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
1715
1715
  let t4;
1716
- const t5 = layer.zIndex ?? 100, t6 = animate ? "transform" : void 0;
1717
- let t7;
1718
- $[24] !== originX || $[25] !== originY || $[26] !== referenceWidth || $[27] !== strategy || $[28] !== style || $[29] !== t5 || $[30] !== t6 || $[31] !== x || $[32] !== y ? (t7 = {
1716
+ const t5 = animate ? "transform" : void 0;
1717
+ let t6;
1718
+ $[24] !== originX || $[25] !== originY || $[26] !== referenceWidth || $[27] !== style || $[28] !== t5 || $[29] !== x || $[30] !== y ? (t6 = {
1719
1719
  left: x,
1720
1720
  originX,
1721
1721
  originY,
1722
- position: strategy,
1723
1722
  top: y,
1724
1723
  width: referenceWidth,
1725
- zIndex: t5,
1726
- willChange: t6,
1724
+ willChange: t5,
1727
1725
  ...style
1728
- }, $[24] = originX, $[25] = originY, $[26] = referenceWidth, $[27] = strategy, $[28] = style, $[29] = t5, $[30] = t6, $[31] = x, $[32] = y, $[33] = t7) : t7 = $[33], t4 = t7;
1726
+ }, $[24] = originX, $[25] = originY, $[26] = referenceWidth, $[27] = style, $[28] = t5, $[29] = x, $[30] = y, $[31] = t6) : t6 = $[31], t4 = t6;
1729
1727
  const rootStyle = t4;
1730
- let t8;
1731
- const t9 = arrowX !== null ? arrowX : void 0, t10 = arrowY !== null ? arrowY : void 0;
1732
- let t11;
1733
- $[34] !== t10 || $[35] !== t9 ? (t11 = {
1734
- left: t9,
1735
- top: t10,
1728
+ let t7;
1729
+ const t8 = arrowX !== null ? arrowX : void 0, t9 = arrowY !== null ? arrowY : void 0;
1730
+ let t10;
1731
+ $[32] !== t8 || $[33] !== t9 ? (t10 = {
1732
+ left: t8,
1733
+ top: t9,
1736
1734
  right: void 0,
1737
1735
  bottom: void 0
1738
- }, $[34] = t10, $[35] = t9, $[36] = t11) : t11 = $[36], t8 = t11;
1739
- const arrowStyle = t8;
1736
+ }, $[32] = t8, $[33] = t9, $[34] = t10) : t10 = $[34], t7 = t10;
1737
+ const arrowStyle = t7;
1738
+ let t11;
1739
+ $[35] === Symbol.for("react.memo_cache_sentinel") ? (t11 = css.popoverCard(), $[35] = t11) : t11 = $[35];
1740
1740
  let t12;
1741
- $[37] === Symbol.for("react.memo_cache_sentinel") ? (t12 = css.popoverCard(), $[37] = t12) : t12 = $[37];
1741
+ $[36] !== animate ? (t12 = animate ? ["hidden", "initial"] : void 0, $[36] = animate, $[37] = t12) : t12 = $[37];
1742
1742
  let t13;
1743
- $[38] !== animate ? (t13 = animate ? ["hidden", "initial"] : void 0, $[38] = animate, $[39] = t13) : t13 = $[39];
1743
+ $[38] !== animate ? (t13 = animate ? ["visible", "scaleIn"] : void 0, $[38] = animate, $[39] = t13) : t13 = $[39];
1744
1744
  let t14;
1745
- $[40] !== animate ? (t14 = animate ? ["visible", "scaleIn"] : void 0, $[40] = animate, $[41] = t14) : t14 = $[41];
1745
+ $[40] !== animate ? (t14 = animate ? ["hidden", "scaleOut"] : void 0, $[40] = animate, $[41] = t14) : t14 = $[41];
1746
1746
  let t15;
1747
- $[42] !== animate ? (t15 = animate ? ["hidden", "scaleOut"] : void 0, $[42] = animate, $[43] = t15) : t15 = $[43];
1747
+ $[42] !== children || $[43] !== padding ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[42] = children, $[43] = padding, $[44] = t15) : t15 = $[44];
1748
1748
  let t16;
1749
- $[44] !== children || $[45] !== padding ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[44] = children, $[45] = padding, $[46] = t16) : t16 = $[46];
1749
+ $[45] !== maxWidth || $[46] !== overflow || $[47] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, maxWidth, overflow, children: t15 }), $[45] = maxWidth, $[46] = overflow, $[47] = t15, $[48] = t16) : t16 = $[48];
1750
1750
  let t17;
1751
- $[47] !== maxWidth || $[48] !== overflow || $[49] !== t16 ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, maxWidth, overflow, children: t16 }), $[47] = maxWidth, $[48] = overflow, $[49] = t16, $[50] = t17) : t17 = $[50];
1751
+ $[49] !== arrow || $[50] !== arrowRef || $[51] !== arrowStyle ? (t17 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[49] = arrow, $[50] = arrowRef, $[51] = arrowStyle, $[52] = t17) : t17 = $[52];
1752
1752
  let t18;
1753
- $[51] !== arrow || $[52] !== arrowRef || $[53] !== arrowStyle ? (t18 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[51] = arrow, $[52] = arrowRef, $[53] = arrowStyle, $[54] = t18) : t18 = $[54];
1754
- let t19;
1755
- return $[55] !== as || $[56] !== placement || $[57] !== radius || $[58] !== rest || $[59] !== rootStyle || $[60] !== shadow || $[61] !== t13 || $[62] !== t14 || $[63] !== t15 || $[64] !== t17 || $[65] !== t18 || $[66] !== tone ? (t19 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, { className: t12, "data-ui": "Popover", ...rest, as, "data-context-tone": tone, "data-placement": placement, direction: "column", display: "flex", radius, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t13, animate: t14, exit: t15, children: [
1756
- t17,
1757
- t18
1758
- ] }), $[55] = as, $[56] = placement, $[57] = radius, $[58] = rest, $[59] = rootStyle, $[60] = shadow, $[61] = t13, $[62] = t14, $[63] = t15, $[64] = t17, $[65] = t18, $[66] = tone, $[67] = t19) : t19 = $[67], t19;
1753
+ return $[53] !== as || $[54] !== placement || $[55] !== radius || $[56] !== rest || $[57] !== rootStyle || $[58] !== shadow || $[59] !== strategy || $[60] !== t12 || $[61] !== t13 || $[62] !== t14 || $[63] !== t16 || $[64] !== t17 || $[65] !== tone ? (t18 = /* @__PURE__ */ jsxRuntime.jsxs(MotionLayer$1, { className: t11, "data-ui": "Popover", ...rest, as, "data-context-tone": tone, "data-placement": placement, direction: "column", display: "flex", position: strategy, radius, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t12, animate: t13, exit: t14, children: [
1754
+ t16,
1755
+ t17
1756
+ ] }), $[53] = as, $[54] = placement, $[55] = radius, $[56] = rest, $[57] = rootStyle, $[58] = shadow, $[59] = strategy, $[60] = t12, $[61] = t13, $[62] = t14, $[63] = t16, $[64] = t17, $[65] = tone, $[66] = t18) : t18 = $[66], t18;
1759
1757
  }
1760
- PopoverCard.displayName = "PopoverCard";
1758
+ PopoverLayer.displayName = "PopoverCard";
1761
1759
  const DEFAULT_POPOVER_ELEMENT = "div";
1762
1760
  function ViewportOverlay() {
1763
1761
  const $ = reactCompilerRuntime.c(2), {
@@ -1872,9 +1870,9 @@ function Popover(props) {
1872
1870
  updateRef && (typeof updateRef == "function" ? updateRef(update) : updateRef && (updateRef.current = update));
1873
1871
  }, [update, updateRef]), disabled)
1874
1872
  return childProp || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
1875
- const popover = /* @__PURE__ */ jsxRuntime.jsxs(LayerProvider, { zOffset, children: [
1873
+ const popover = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1876
1874
  modal && /* @__PURE__ */ jsxRuntime.jsx(ViewportOverlay, {}),
1877
- /* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...rest, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, hidden: referenceHidden, maxWidth: widthProp, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, x, y, children: content })
1875
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverLayer, { ...rest, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, hidden: referenceHidden, maxWidth: widthProp, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, x, y, zOffset, children: content })
1878
1876
  ] }), children = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: tone === "inherit" ? card?.tone ?? "default" : tone, scheme: scheme ?? "light", children: popover }) }) : popover);
1879
1877
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1880
1878
  animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
@@ -2233,8 +2231,32 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
2233
2231
  right: ["right-end", "right-start", "left", "top", "bottom"],
2234
2232
  "right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
2235
2233
  "right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
2236
- }, DEFAULT_TOOLTIP_CARD_ELEMENT = "div", MotionCard = framerMotion.motion.create(Card);
2237
- function TooltipCard(props) {
2234
+ }, TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
2235
+ function TooltipDelayGroupProvider(props) {
2236
+ const $ = reactCompilerRuntime.c(9), {
2237
+ children,
2238
+ delay
2239
+ } = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0;
2240
+ let t0;
2241
+ const t1 = isGroupActive ? 1 : openDelay;
2242
+ let t2;
2243
+ $[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t1 ? (t2 = {
2244
+ setIsGroupActive,
2245
+ openTooltipId,
2246
+ setOpenTooltipId,
2247
+ openDelay: t1,
2248
+ closeDelay
2249
+ }, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t1, $[5] = t2) : t2 = $[5], t0 = t2;
2250
+ const value = t0;
2251
+ let t3;
2252
+ return $[6] !== children || $[7] !== value ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t3) : t3 = $[8], t3;
2253
+ }
2254
+ TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
2255
+ function useTooltipDelayGroup() {
2256
+ return react.useContext(TooltipDelayGroupContext);
2257
+ }
2258
+ const DEFAULT_TOOLTIP_LAYER_ELEMENT = "div", MotionLayer = framerMotion.motion.create(Layer);
2259
+ function TooltipLayer(props) {
2238
2260
  const $ = reactCompilerRuntime.c(53), t0 = props;
2239
2261
  let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, rest, scheme, shadow, style, t1, t2;
2240
2262
  $[0] !== t0 ? ({
@@ -2256,7 +2278,7 @@ function TooltipCard(props) {
2256
2278
  tone: t2,
2257
2279
  ...rest
2258
2280
  } = t0, $[0] = t0, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = rest, $[13] = scheme, $[14] = shadow, $[15] = style, $[16] = t1, $[17] = t2) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], rest = $[12], scheme = $[13], shadow = $[14], style = $[15], t1 = $[16], t2 = $[17]);
2259
- const as = t1 === void 0 ? DEFAULT_TOOLTIP_CARD_ELEMENT : t1, tone = t2 === void 0 ? "inherit" : t2;
2281
+ const as = t1 === void 0 ? DEFAULT_TOOLTIP_LAYER_ELEMENT : t1, tone = t2 === void 0 ? "inherit" : t2;
2260
2282
  let t3;
2261
2283
  const t4 = animate ? "transform" : void 0;
2262
2284
  let t5;
@@ -2289,36 +2311,12 @@ function TooltipCard(props) {
2289
2311
  let t15;
2290
2312
  $[33] !== arrow || $[34] !== arrowRef || $[35] !== arrowStyle ? (t15 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[33] = arrow, $[34] = arrowRef, $[35] = arrowStyle, $[36] = t15) : t15 = $[36];
2291
2313
  let t16;
2292
- return $[37] !== as || $[38] !== children || $[39] !== padding || $[40] !== placement || $[41] !== radius || $[42] !== rest || $[43] !== rootStyle || $[44] !== scheme || $[45] !== shadow || $[46] !== t11 || $[47] !== t12 || $[48] !== t13 || $[49] !== t14 || $[50] !== t15 || $[51] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { "data-ui": "Tooltip__card", ...rest, as, className: t10, "data-animate": t11, "data-placement": placement, padding, radius, scheme, shadow, style: rootStyle, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t12, animate: t13, exit: t14, tone, children: [
2314
+ return $[37] !== as || $[38] !== children || $[39] !== padding || $[40] !== placement || $[41] !== radius || $[42] !== rest || $[43] !== rootStyle || $[44] !== scheme || $[45] !== shadow || $[46] !== t11 || $[47] !== t12 || $[48] !== t13 || $[49] !== t14 || $[50] !== t15 || $[51] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsxs(MotionLayer, { "data-ui": "Tooltip__card", ...rest, as, className: t10, "data-animate": t11, "data-placement": placement, padding, radius, scheme, shadow, style: rootStyle, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t12, animate: t13, exit: t14, tone, children: [
2293
2315
  children,
2294
2316
  t15
2295
2317
  ] }), $[37] = as, $[38] = children, $[39] = padding, $[40] = placement, $[41] = radius, $[42] = rest, $[43] = rootStyle, $[44] = scheme, $[45] = shadow, $[46] = t11, $[47] = t12, $[48] = t13, $[49] = t14, $[50] = t15, $[51] = tone, $[52] = t16) : t16 = $[52], t16;
2296
2318
  }
2297
- TooltipCard.displayName = "TooltipCard";
2298
- const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
2299
- function TooltipDelayGroupProvider(props) {
2300
- const $ = reactCompilerRuntime.c(9), {
2301
- children,
2302
- delay
2303
- } = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0;
2304
- let t0;
2305
- const t1 = isGroupActive ? 1 : openDelay;
2306
- let t2;
2307
- $[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t1 ? (t2 = {
2308
- setIsGroupActive,
2309
- openTooltipId,
2310
- setOpenTooltipId,
2311
- openDelay: t1,
2312
- closeDelay
2313
- }, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t1, $[5] = t2) : t2 = $[5], t0 = t2;
2314
- const value = t0;
2315
- let t3;
2316
- return $[6] !== children || $[7] !== value ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t3) : t3 = $[8], t3;
2317
- }
2318
- TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
2319
- function useTooltipDelayGroup() {
2320
- return react.useContext(TooltipDelayGroupContext);
2321
- }
2319
+ TooltipLayer.displayName = "TooltipLayer";
2322
2320
  const DEFAULT_TOOLTIP_ELEMENT = "div";
2323
2321
  function Tooltip(props) {
2324
2322
  const boundaryElementContext = useBoundaryElement(), {
@@ -2437,10 +2435,10 @@ function Tooltip(props) {
2437
2435
  }) : null, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave]);
2438
2436
  if (react.useImperativeHandle(childProp ? getElementRef(childProp) : null, () => referenceElement, [referenceElement]), !child) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
2439
2437
  if (disabled) return child;
2440
- const node_0 = /* @__PURE__ */ jsxRuntime.jsx(Layer, { "data-ui": "Tooltip", className: css.composeClassNames(className, css.tooltip()), ref: setFloating, style: {
2438
+ const node_0 = /* @__PURE__ */ jsxRuntime.jsx(TooltipLayer, { "data-ui": "Tooltip", ...rest, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, className: css.composeClassNames(className, css.tooltip()), originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, style: {
2441
2439
  ...floatingStyles,
2442
2440
  maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
2443
- }, zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, { ...rest, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, as, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, tone, children: content }) }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: tone === "inherit" ? card?.tone ?? "default" : tone, scheme: scheme ?? "light", children: node_0 }) }) : node_0);
2441
+ }, tone, zOffset, children: content }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: tone === "inherit" ? card?.tone ?? "default" : tone, scheme: scheme ?? "light", children: node_0 }) }) : node_0);
2444
2442
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2445
2443
  animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
2446
2444
  child