@sanity/ui 3.3.5 → 3.4.0
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/refractor.js +2 -0
- package/dist/_chunks/refractor.js.map +1 -0
- package/dist/_chunks/tabList.js +25 -26
- package/dist/_chunks/tabList.js.map +1 -0
- package/dist/_chunks/tabList.mjs +21 -22
- package/dist/_chunks/tabList.mjs.map +1 -1
- package/dist/_chunks/theme.d.mts +4 -6
- package/dist/_chunks/theme.d.mts.map +1 -1
- package/dist/_chunks/theme.d.ts +4 -6
- package/dist/_chunks/theme.d.ts.map +1 -1
- package/dist/_chunks/theme.js +3 -1
- package/dist/_chunks/theme.js.map +1 -0
- package/dist/_chunks/theme.mjs +1 -1
- package/dist/_chunks/theme.mjs.map +1 -1
- package/dist/_chunks/useTheme.d.mts +14 -43
- package/dist/_chunks/useTheme.d.mts.map +1 -1
- package/dist/_chunks/useTheme.d.ts +14 -43
- package/dist/_chunks/useTheme.d.ts.map +1 -1
- package/dist/_visual-editing.d.mts +1 -1
- package/dist/_visual-editing.d.ts +1 -1
- package/dist/index.d.mts +34 -10
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +34 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -39
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +36 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -15
package/dist/_chunks/tabList.mjs
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { X as getTheme_v2, Z as createColorTheme$1, a as parseColor$1, c as rgbToHex$1, d as screen$1, f as multiply$1, l as rgbToHsl$1, n as buildTheme, o as hexToRgb$1, r as rgba$1, s as hslToRgb$1, t as getScopedTheme } from "./theme.mjs";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
-
import { ChevronRightIcon, CloseIcon, SpinnerIcon } from "@sanity/icons";
|
|
4
3
|
import { Children, cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useDebugValue, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
5
4
|
import { isValidElementType } from "react-is";
|
|
6
5
|
import { ThemeProvider, css, keyframes, styled, useTheme } from "styled-components";
|
|
7
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { SpinnerIcon } from "@sanity/icons/Spinner";
|
|
8
8
|
import { useEffectEvent } from "use-effect-event";
|
|
9
9
|
import { ResizeObserver } from "@juggle/resize-observer";
|
|
10
10
|
import { arrow, autoPlacement, autoUpdate, detectOverflow, flip, hide, offset, shift, useFloating } from "@floating-ui/react-dom";
|
|
11
11
|
import { AnimatePresence, motion } from "motion/react";
|
|
12
12
|
import { createPortal } from "react-dom";
|
|
13
|
+
import { CloseIcon } from "@sanity/icons/Close";
|
|
14
|
+
import { ChevronRightIcon } from "@sanity/icons/ChevronRight";
|
|
13
15
|
/**
|
|
14
16
|
* @public
|
|
15
17
|
* @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
|
|
@@ -741,7 +743,7 @@ const StyledText = /* @__PURE__ */ styled.div.withConfig({
|
|
|
741
743
|
})(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), TextComponent = forwardRef(function(props, ref) {
|
|
742
744
|
let $ = c(26), align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
743
745
|
$[0] === props ? (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]) : ({accent: t0, align, children: childrenProp, muted: t1, size: t2, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight);
|
|
744
|
-
let accent = t0
|
|
746
|
+
let accent = t0 !== void 0 && t0, muted = t1 !== void 0 && t1, size = t2 === void 0 ? 2 : t2, children = childrenProp;
|
|
745
747
|
if (textOverflow === "ellipsis") {
|
|
746
748
|
let t3;
|
|
747
749
|
$[9] === children ? t3 = $[10] : (t3 = /* @__PURE__ */ jsx(SpanWithTextOverflow, { children }), $[9] = children, $[10] = t3), children = t3;
|
|
@@ -808,7 +810,7 @@ FlexComponent.displayName = "ForwardRef(Flex)";
|
|
|
808
810
|
*/
|
|
809
811
|
const Flex = FlexComponent, rotate = keyframes`from{transform:rotate(0deg);}to{transform:rotate(360deg);}`, StyledSpinner = styled(Text).withConfig({
|
|
810
812
|
displayName: "StyledSpinner",
|
|
811
|
-
componentId: "sc-
|
|
813
|
+
componentId: "sc-6ky9bg-0"
|
|
812
814
|
})`& > span > svg{animation:${rotate} 500ms linear infinite;}`, Spinner = forwardRef(function(props, ref) {
|
|
813
815
|
let $ = c(4), t0;
|
|
814
816
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx(SpinnerIcon, {}), $[0] = t0) : t0 = $[0];
|
|
@@ -958,7 +960,7 @@ const StyledButton = /* @__PURE__ */ styled.button.withConfig({
|
|
|
958
960
|
})`position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;`, ButtonComponent = forwardRef(function(props, ref) {
|
|
959
961
|
let $ = c(87), IconComponent, IconRightComponent, children, disabled, gap, loading, paddingBottomProp, paddingLeftProp, paddingRightProp, paddingTopProp, paddingXProp, paddingYProp, restProps, selected, t0, t1, t2, t3, t4, t5, t6, t7, t8, text, textAlign, textWeight, width;
|
|
960
962
|
$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], gap = $[5], loading = $[6], paddingBottomProp = $[7], paddingLeftProp = $[8], paddingRightProp = $[9], paddingTopProp = $[10], paddingXProp = $[11], paddingYProp = $[12], restProps = $[13], selected = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21], t7 = $[22], t8 = $[23], text = $[24], textAlign = $[25], textWeight = $[26], width = $[27]) : ({children, disabled, fontSize: t0, icon: IconComponent, iconRight: IconRightComponent, justify: t1, loading, mode: t2, padding: t3, paddingX: paddingXProp, paddingY: paddingYProp, paddingTop: paddingTopProp, paddingBottom: paddingBottomProp, paddingLeft: paddingLeftProp, paddingRight: paddingRightProp, radius: t4, selected, gap, space: t5, text, textAlign, textWeight, tone: t6, type: t7, muted: t8, width, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = gap, $[6] = loading, $[7] = paddingBottomProp, $[8] = paddingLeftProp, $[9] = paddingRightProp, $[10] = paddingTopProp, $[11] = paddingXProp, $[12] = paddingYProp, $[13] = restProps, $[14] = selected, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6, $[22] = t7, $[23] = t8, $[24] = text, $[25] = textAlign, $[26] = textWeight, $[27] = width);
|
|
961
|
-
let fontSize = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? "center" : t1, mode = t2 === void 0 ? "default" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, deprecated_space = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, type = t7 === void 0 ? "button" : t7, muted = t8
|
|
963
|
+
let fontSize = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? "center" : t1, mode = t2 === void 0 ? "default" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, deprecated_space = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, type = t7 === void 0 ? "button" : t7, muted = t8 !== void 0 && t8, { button } = useTheme_v2(), t9;
|
|
962
964
|
$[28] === justifyProp ? t9 = $[29] : (t9 = _getArrayProp(justifyProp), $[28] = justifyProp, $[29] = t9);
|
|
963
965
|
let justify = t9, t10;
|
|
964
966
|
$[30] === paddingProp ? t10 = $[31] : (t10 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t10);
|
|
@@ -1077,7 +1079,7 @@ const StyledCard = /* @__PURE__ */ styled(Box).withConfig({
|
|
|
1077
1079
|
})(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), CardComponent = forwardRef(function(props, ref) {
|
|
1078
1080
|
let $ = c(56), asProp, border, borderBottom, borderLeft, borderRight, borderTop, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;
|
|
1079
1081
|
$[0] === props ? (asProp = $[1], border = $[2], borderBottom = $[3], borderLeft = $[4], borderRight = $[5], borderTop = $[6], muted = $[7], pressed = $[8], restProps = $[9], scheme = $[10], selected = $[11], shadow = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16]) : ({__unstable_checkered: t0, __unstable_focusRing: t1, as: asProp, border, borderTop, borderRight, borderBottom, borderLeft, muted, pressed, radius: t2, scheme, selected, shadow, tone: t3, ...restProps} = props, $[0] = props, $[1] = asProp, $[2] = border, $[3] = borderBottom, $[4] = borderLeft, $[5] = borderRight, $[6] = borderTop, $[7] = muted, $[8] = pressed, $[9] = restProps, $[10] = scheme, $[11] = selected, $[12] = shadow, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3);
|
|
1080
|
-
let checkered = t0
|
|
1082
|
+
let checkered = t0 !== void 0 && t0, focusRing = t1 !== void 0 && t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp, t4 = typeof as == "string" ? as : void 0, t5 = rootTheme.scheme, t6;
|
|
1081
1083
|
$[17] === border ? t6 = $[18] : (t6 = _getArrayProp(border), $[17] = border, $[18] = t6);
|
|
1082
1084
|
let t7;
|
|
1083
1085
|
$[19] === borderTop ? t7 = $[20] : (t7 = _getArrayProp(borderTop), $[19] = borderTop, $[20] = t7);
|
|
@@ -1870,7 +1872,7 @@ function calcCurrentWidth(params) {
|
|
|
1870
1872
|
}
|
|
1871
1873
|
function calcMaxWidth(params) {
|
|
1872
1874
|
let { boundaryWidth, currentWidth } = params;
|
|
1873
|
-
if (
|
|
1875
|
+
if (currentWidth !== void 0 || boundaryWidth !== void 0) return Math.min(currentWidth ?? Infinity, (boundaryWidth || Infinity) - 8);
|
|
1874
1876
|
}
|
|
1875
1877
|
const MotionCard$1 = styled(motion.create(Card)).withConfig({
|
|
1876
1878
|
displayName: "MotionCard",
|
|
@@ -1967,7 +1969,7 @@ const ViewportOverlay = () => {
|
|
|
1967
1969
|
let { __unstable_margins: t12, animate: t13, arrow: t14, boundaryElement: t15, children: t16, constrainSize: t17, content: t18, disabled: t19, fallbackPlacements: t20, matchReferenceWidth: t21, floatingBoundary: t22, modal: t23, onActivate, open: t24, overflow: t25, padding: t26, placement: t27, placementStrategy: t28, portal: t29, preventOverflow: t30, radius: t31, referenceBoundary: t32, referenceElement: t33, scheme: t34, shadow: t35, tone: t36, width: t37, zOffset: t38, updateRef: t39, ...t40 } = props;
|
|
1968
1970
|
t0 = t12, t1 = t13, t2 = t14, _boundaryElement = t15, childProp = t16, t3 = t17, content = t18, disabled = t19, _fallbackPlacements = t20, matchReferenceWidth = t21, _floatingBoundary = t22, modal = t23, open = t24, t4 = t25, paddingProp = t26, t5 = t27, t6 = t28, portal = t29, t7 = t30, t8 = t31, _referenceBoundary = t32, referenceElement = t33, scheme = t34, t9 = t35, t10 = t36, t11 = t37, _zOffsetProp = t38, updateRef = t39, restProps = t40, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacements, $[3] = _floatingBoundary, $[4] = _referenceBoundary, $[5] = _zOffsetProp, $[6] = childProp, $[7] = content, $[8] = disabled, $[9] = matchReferenceWidth, $[10] = modal, $[11] = open, $[12] = paddingProp, $[13] = portal, $[14] = referenceElement, $[15] = restProps, $[16] = scheme, $[17] = t0, $[18] = t1, $[19] = t10, $[20] = t11, $[21] = t2, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = t6, $[26] = t7, $[27] = t8, $[28] = t9, $[29] = updateRef;
|
|
1969
1971
|
} else _boundaryElement = $[1], _fallbackPlacements = $[2], _floatingBoundary = $[3], _referenceBoundary = $[4], _zOffsetProp = $[5], childProp = $[6], content = $[7], disabled = $[8], matchReferenceWidth = $[9], modal = $[10], open = $[11], paddingProp = $[12], portal = $[13], referenceElement = $[14], restProps = $[15], scheme = $[16], t0 = $[17], t1 = $[18], t10 = $[19], t11 = $[20], t2 = $[21], t3 = $[22], t4 = $[23], t5 = $[24], t6 = $[25], t7 = $[26], t8 = $[27], t9 = $[28], updateRef = $[29];
|
|
1970
|
-
let margins = t0 === void 0 ? DEFAULT_POPOVER_MARGINS : t0, _animate = t1
|
|
1972
|
+
let margins = t0 === void 0 ? DEFAULT_POPOVER_MARGINS : t0, _animate = t1 !== void 0 && t1, arrowProp = t2 !== void 0 && t2, constrainSize = t3 !== void 0 && t3, overflow = t4 === void 0 ? "hidden" : t4, placementProp = t5 === void 0 ? "bottom" : t5, placementStrategy = t6 === void 0 ? "flip" : t6, preventOverflow = t7 === void 0 || t7, radiusProp = t8 === void 0 ? 3 : t8, shadowProp = t9 === void 0 ? 3 : t9, tone = t10 === void 0 ? "inherit" : t10, widthProp = t11 === void 0 ? "auto" : t11, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacements = _fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"], floatingBoundary = _floatingBoundary ?? props.boundaryElement ?? boundaryElementContext.element, referenceBoundary = _referenceBoundary ?? props.boundaryElement ?? boundaryElementContext.element, zOffsetProp = _zOffsetProp ?? layer.popover.zOffset, animate = !usePrefersReducedMotion() && _animate, boundarySize = useElementSize(boundaryElement)?.border, t12;
|
|
1971
1973
|
$[30] === paddingProp ? t12 = $[31] : (t12 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t12);
|
|
1972
1974
|
let padding = t12, t13;
|
|
1973
1975
|
$[32] === radiusProp ? t13 = $[33] : (t13 = _getArrayProp(radiusProp), $[32] = radiusProp, $[33] = t13);
|
|
@@ -2203,38 +2205,38 @@ StackComponent.displayName = "ForwardRef(Stack)";
|
|
|
2203
2205
|
*/
|
|
2204
2206
|
const Stack = StackComponent, CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, StyledTextInput = /* @__PURE__ */ styled(Card).attrs({ forwardedAs: "span" }).withConfig({
|
|
2205
2207
|
displayName: "StyledTextInput",
|
|
2206
|
-
componentId: "sc-
|
|
2208
|
+
componentId: "sc-ab08rw-0"
|
|
2207
2209
|
})(textInputRootStyle), InputRoot = styled.span.withConfig({
|
|
2208
2210
|
displayName: "InputRoot",
|
|
2209
|
-
componentId: "sc-
|
|
2211
|
+
componentId: "sc-ab08rw-1"
|
|
2210
2212
|
})`flex:1;min-width:0;display:block;position:relative;`, Prefix = styled(Card).attrs({ forwardedAs: "span" }).withConfig({
|
|
2211
2213
|
displayName: "Prefix",
|
|
2212
|
-
componentId: "sc-
|
|
2214
|
+
componentId: "sc-ab08rw-2"
|
|
2213
2215
|
})`border-top-right-radius:0;border-bottom-right-radius:0;& > span{display:block;margin:-1px;}`, Suffix = styled(Card).attrs({ forwardedAs: "span" }).withConfig({
|
|
2214
2216
|
displayName: "Suffix",
|
|
2215
|
-
componentId: "sc-
|
|
2217
|
+
componentId: "sc-ab08rw-3"
|
|
2216
2218
|
})`border-top-left-radius:0;border-bottom-left-radius:0;& > span{display:block;margin:-1px;}`, Input = /* @__PURE__ */ styled.input.withConfig({
|
|
2217
2219
|
displayName: "Input",
|
|
2218
|
-
componentId: "sc-
|
|
2220
|
+
componentId: "sc-ab08rw-4"
|
|
2219
2221
|
})(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled.span.withConfig({
|
|
2220
2222
|
displayName: "Presentation",
|
|
2221
|
-
componentId: "sc-
|
|
2223
|
+
componentId: "sc-ab08rw-5"
|
|
2222
2224
|
})(responsiveRadiusStyle, textInputRepresentationStyle), LeftBox = styled(Box).withConfig({
|
|
2223
2225
|
displayName: "LeftBox",
|
|
2224
|
-
componentId: "sc-
|
|
2226
|
+
componentId: "sc-ab08rw-6"
|
|
2225
2227
|
})`position:absolute;top:0;left:0;`, RightBox = styled(Box).withConfig({
|
|
2226
2228
|
displayName: "RightBox",
|
|
2227
|
-
componentId: "sc-
|
|
2229
|
+
componentId: "sc-ab08rw-7"
|
|
2228
2230
|
})`position:absolute;top:0;right:0;`, RightCard = styled(Card).withConfig({
|
|
2229
2231
|
displayName: "RightCard",
|
|
2230
|
-
componentId: "sc-
|
|
2232
|
+
componentId: "sc-ab08rw-8"
|
|
2231
2233
|
})`background-color:transparent;position:absolute;top:0;right:0;`, TextInputClearButton = /* @__PURE__ */ styled(Button).withConfig({
|
|
2232
2234
|
displayName: "TextInputClearButton",
|
|
2233
|
-
componentId: "sc-
|
|
2235
|
+
componentId: "sc-ab08rw-9"
|
|
2234
2236
|
})({ "&:not([hidden])": { display: "block" } }), TextInput = forwardRef(function(props, forwardedRef) {
|
|
2235
2237
|
let $ = c(93), IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, gap, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
|
|
2236
2238
|
$[0] === props ? (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], gap = $[6], onClear = $[7], prefix = $[8], readOnly = $[9], restProps = $[10], suffix = $[11], t0 = $[12], t1 = $[13], t2 = $[14], t3 = $[15], t4 = $[16], t5 = $[17], t6 = $[18], weight = $[19]) : ({__unstable_disableFocusRing, border: t0, clearButton, disabled: t1, fontSize: t2, gap, icon: IconComponent, iconRight: IconRightComponent, onClear, padding: t3, prefix, radius: t4, readOnly, space: t5, suffix, customValidity, type: t6, weight, ...restProps} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[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] = weight);
|
|
2237
|
-
let border = t0 === void 0
|
|
2239
|
+
let border = t0 === void 0 || t0, disabled = t1 !== void 0 && t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, deprecated_space = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = useRef(null), rootTheme = useRootTheme(), t7;
|
|
2238
2240
|
$[20] === fontSizeProp ? t7 = $[21] : (t7 = _getArrayProp(fontSizeProp), $[20] = fontSizeProp, $[21] = t7);
|
|
2239
2241
|
let fontSize = t7, t8;
|
|
2240
2242
|
$[22] === paddingProp ? t8 = $[23] : (t8 = _getArrayProp(paddingProp), $[22] = paddingProp, $[23] = t8);
|
|
@@ -2536,7 +2538,7 @@ const StyledTooltip = styled(Layer).withConfig({
|
|
|
2536
2538
|
})`pointer-events:none;`, Tooltip = forwardRef(function(props, forwardedRef) {
|
|
2537
2539
|
let $ = c(137), boundaryElementContext = useBoundaryElement(), { layer } = useTheme_v2(), _boundaryElement, _fallbackPlacementsProp, _zOffset, childProp, content, delay, disabled, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5;
|
|
2538
2540
|
$[0] === props ? (_boundaryElement = $[1], _fallbackPlacementsProp = $[2], _zOffset = $[3], childProp = $[4], content = $[5], delay = $[6], disabled = $[7], portalProp = $[8], restProps = $[9], scheme = $[10], t0 = $[11], t1 = $[12], t2 = $[13], t3 = $[14], t4 = $[15], t5 = $[16]) : ({animate: t0, arrow: t1, boundaryElement: _boundaryElement, children: childProp, content, disabled, fallbackPlacements: _fallbackPlacementsProp, padding: t2, placement: t3, portal: portalProp, radius: t4, scheme, shadow: t5, zOffset: _zOffset, delay, ...restProps} = props, $[0] = props, $[1] = _boundaryElement, $[2] = _fallbackPlacementsProp, $[3] = _zOffset, $[4] = childProp, $[5] = content, $[6] = delay, $[7] = disabled, $[8] = portalProp, $[9] = restProps, $[10] = scheme, $[11] = t0, $[12] = t1, $[13] = t2, $[14] = t3, $[15] = t4, $[16] = t5);
|
|
2539
|
-
let _animate = t0
|
|
2541
|
+
let _animate = t0 !== void 0 && t0, arrowProp = t1 !== void 0 && t1, padding = t2 === void 0 ? 2 : t2, placementProp = t3 === void 0 ? "bottom" : t3, radius = t4 === void 0 ? 2 : t4, shadow = t5 === void 0 ? 2 : t5, boundaryElement = _boundaryElement ?? boundaryElementContext?.element, fallbackPlacementsProp = _fallbackPlacementsProp ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"], zOffset = _zOffset ?? layer.tooltip.zOffset, animate = !usePrefersReducedMotion() && _animate, t6;
|
|
2540
2542
|
$[17] === fallbackPlacementsProp ? t6 = $[18] : (t6 = _getArrayProp(fallbackPlacementsProp), $[17] = fallbackPlacementsProp, $[18] = t6);
|
|
2541
2543
|
let fallbackPlacements = t6, ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), [tooltipMaxWidth, setTooltipMaxWidth] = useState(0), t7;
|
|
2542
2544
|
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], useImperativeHandle(forwardedRef, t7);
|
|
@@ -2811,9 +2813,6 @@ function _isFocusable(element) {
|
|
|
2811
2813
|
function _getFocusableElements(elements) {
|
|
2812
2814
|
return elements.filter(_isFocusable);
|
|
2813
2815
|
}
|
|
2814
|
-
/**
|
|
2815
|
-
* @internal
|
|
2816
|
-
*/
|
|
2817
2816
|
function _getDOMPath(rootElement, el) {
|
|
2818
2817
|
let path = [], e = el;
|
|
2819
2818
|
for (; e !== rootElement;) {
|