@sanity/ui 3.0.7 → 3.0.9
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 +219 -285
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +220 -286
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/index.js +69 -71
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -71
- package/dist/index.mjs.map +1 -1
- package/package.json +16 -16
- package/src/core/global.ts +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { buildTheme, createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1, getTheme_v2, getScopedTheme } from "@sanity/ui/theme";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { c } from "react-compiler-runtime";
|
|
4
|
-
import { useState, useEffect, useDebugValue, useSyncExternalStore, createContext, useContext, forwardRef, useId, Children, isValidElement, cloneElement, useRef, useImperativeHandle, lazy, Suspense,
|
|
4
|
+
import { useState, useEffect, useDebugValue, useSyncExternalStore, createContext, useContext, forwardRef, useId, Children, isValidElement, cloneElement, useRef, useImperativeHandle, lazy, Suspense, useMemo, memo, useCallback, useLayoutEffect } from "react";
|
|
5
5
|
import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, styled, keyframes } from "styled-components";
|
|
6
6
|
import ReactIs, { isValidElementType } from "react-is";
|
|
7
7
|
import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon } from "@sanity/icons";
|
|
@@ -237,13 +237,11 @@ function _temp$9() {
|
|
|
237
237
|
return EMPTY_ARRAY;
|
|
238
238
|
}
|
|
239
239
|
function useCustomValidity(ref, customValidity) {
|
|
240
|
-
const $ = c(
|
|
241
|
-
let t0;
|
|
242
|
-
$[0] !== customValidity || $[1] !== ref
|
|
240
|
+
const $ = c(4);
|
|
241
|
+
let t0, t1;
|
|
242
|
+
$[0] !== customValidity || $[1] !== ref ? (t0 = () => {
|
|
243
243
|
ref.current?.setCustomValidity(customValidity || "");
|
|
244
|
-
}, $[0] = customValidity, $[1] = ref
|
|
245
|
-
let t1;
|
|
246
|
-
$[3] !== customValidity || $[4] !== ref ? (t1 = [customValidity, ref], $[3] = customValidity, $[4] = ref, $[5] = t1) : t1 = $[5], useEffect(t0, t1);
|
|
244
|
+
}, t1 = [customValidity, ref], $[0] = customValidity, $[1] = ref, $[2] = t0, $[3] = t1) : (t0 = $[2], t1 = $[3]), useEffect(t0, t1);
|
|
247
245
|
}
|
|
248
246
|
const _ResizeObserver = typeof document < "u" && typeof window < "u" && window.ResizeObserver ? window.ResizeObserver : ResizeObserver, _elementSizeObserver = _createElementSizeObserver();
|
|
249
247
|
function _createElementRectValueListener() {
|
|
@@ -444,8 +442,8 @@ function useMediaIndex() {
|
|
|
444
442
|
const $ = c(2), {
|
|
445
443
|
media
|
|
446
444
|
} = useTheme_v2();
|
|
447
|
-
let t0
|
|
448
|
-
$[0] !== media ? (
|
|
445
|
+
let t0;
|
|
446
|
+
$[0] !== media ? (t0 = _createMediaStore(media), $[0] = media, $[1] = t0) : t0 = $[1];
|
|
449
447
|
const store = t0;
|
|
450
448
|
return useSyncExternalStore(store.subscribe, store.getSnapshot, getServerSnapshot);
|
|
451
449
|
}
|
|
@@ -1402,26 +1400,26 @@ const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1402
1400
|
setImageFailed(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
|
|
1403
1401
|
}, $[20] = onImageLoadError, $[21] = t7) : t7 = $[21];
|
|
1404
1402
|
const handleImageError = t7;
|
|
1405
|
-
let t8
|
|
1406
|
-
$[22] !== size2 ? (
|
|
1407
|
-
const initialsSize = t8,
|
|
1403
|
+
let t8;
|
|
1404
|
+
$[22] !== size2 ? (t8 = size2.map(_temp$6), $[22] = size2, $[23] = t8) : t8 = $[23];
|
|
1405
|
+
const initialsSize = t8, t9 = typeof as == "string" ? as : void 0;
|
|
1406
|
+
let t10;
|
|
1407
|
+
$[24] !== color ? (t10 = /* @__PURE__ */ jsx(Arrow$1, { children: /* @__PURE__ */ jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[24] = color, $[25] = t10) : t10 = $[25];
|
|
1408
1408
|
let t11;
|
|
1409
|
-
$[
|
|
1410
|
-
let t12;
|
|
1411
|
-
$[26] !== __unstable_hideInnerStroke || $[27] !== _radius || $[28] !== _sizeRem || $[29] !== handleImageError || $[30] !== imageFailed || $[31] !== imageId || $[32] !== src ? (t12 = !imageFailed && src && /* @__PURE__ */ jsxs(AvatarImage, { viewBox: `0 0 ${_sizeRem} ${_sizeRem}`, fill: "none", children: [
|
|
1409
|
+
$[26] !== __unstable_hideInnerStroke || $[27] !== _radius || $[28] !== _sizeRem || $[29] !== handleImageError || $[30] !== imageFailed || $[31] !== imageId || $[32] !== src ? (t11 = !imageFailed && src && /* @__PURE__ */ jsxs(AvatarImage, { viewBox: `0 0 ${_sizeRem} ${_sizeRem}`, fill: "none", children: [
|
|
1412
1410
|
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: imageId, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ jsx("image", { href: src, width: "1", height: "1", onError: handleImageError }) }) }),
|
|
1413
1411
|
/* @__PURE__ */ jsx("circle", { cx: _radius, cy: _radius, r: _radius, fill: `url(#${imageId})` }),
|
|
1414
1412
|
!__unstable_hideInnerStroke && /* @__PURE__ */ jsx(BgStroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" }),
|
|
1415
1413
|
/* @__PURE__ */ jsx(Stroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" })
|
|
1416
|
-
] }), $[26] = __unstable_hideInnerStroke, $[27] = _radius, $[28] = _sizeRem, $[29] = handleImageError, $[30] = imageFailed, $[31] = imageId, $[32] = src, $[33] =
|
|
1414
|
+
] }), $[26] = __unstable_hideInnerStroke, $[27] = _radius, $[28] = _sizeRem, $[29] = handleImageError, $[30] = imageFailed, $[31] = imageId, $[32] = src, $[33] = t11) : t11 = $[33];
|
|
1415
|
+
let t12;
|
|
1416
|
+
$[34] !== imageFailed || $[35] !== initials || $[36] !== initialsSize || $[37] !== src ? (t12 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Initials, { children: /* @__PURE__ */ jsx(InitialsLabel, { forwardedAs: "span", size: initialsSize, weight: "medium", children: initials }) }) }), $[34] = imageFailed, $[35] = initials, $[36] = initialsSize, $[37] = src, $[38] = t12) : t12 = $[38];
|
|
1417
1417
|
let t13;
|
|
1418
|
-
$[
|
|
1419
|
-
|
|
1420
|
-
return $[39] !== arrowPosition || $[40] !== as || $[41] !== color || $[42] !== ref || $[43] !== restProps || $[44] !== size2 || $[45] !== status || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== title ? (t14 = /* @__PURE__ */ jsxs(StyledAvatar, { as, "data-as": t10, "data-ui": "Avatar", ...restProps, $color: color, $size: size2, "aria-label": title, "data-arrow-position": arrowPosition, "data-status": status, ref, title, children: [
|
|
1418
|
+
return $[39] !== arrowPosition || $[40] !== as || $[41] !== color || $[42] !== ref || $[43] !== restProps || $[44] !== size2 || $[45] !== status || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t9 || $[50] !== title ? (t13 = /* @__PURE__ */ jsxs(StyledAvatar, { as, "data-as": t9, "data-ui": "Avatar", ...restProps, $color: color, $size: size2, "aria-label": title, "data-arrow-position": arrowPosition, "data-status": status, ref, title, children: [
|
|
1419
|
+
t10,
|
|
1421
1420
|
t11,
|
|
1422
|
-
t12
|
|
1423
|
-
|
|
1424
|
-
] }), $[39] = arrowPosition, $[40] = as, $[41] = color, $[42] = ref, $[43] = restProps, $[44] = size2, $[45] = status, $[46] = t10, $[47] = t11, $[48] = t12, $[49] = t13, $[50] = title, $[51] = t14) : t14 = $[51], t14;
|
|
1421
|
+
t12
|
|
1422
|
+
] }), $[39] = arrowPosition, $[40] = as, $[41] = color, $[42] = ref, $[43] = restProps, $[44] = size2, $[45] = status, $[46] = t10, $[47] = t11, $[48] = t12, $[49] = t9, $[50] = title, $[51] = t13) : t13 = $[51], t13;
|
|
1425
1423
|
});
|
|
1426
1424
|
Avatar.displayName = "ForwardRef(Avatar)";
|
|
1427
1425
|
function _temp$6(s) {
|
|
@@ -1471,13 +1469,13 @@ const StyledAvatarCounter = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1471
1469
|
count,
|
|
1472
1470
|
size: t0
|
|
1473
1471
|
} = props, size2 = useArrayProp(t0 === void 0 ? 1 : t0);
|
|
1474
|
-
let t1
|
|
1475
|
-
$[0] !== size2 ? (
|
|
1472
|
+
let t1;
|
|
1473
|
+
$[0] !== size2 ? (t1 = size2.map(_temp$5), $[0] = size2, $[1] = t1) : t1 = $[1];
|
|
1476
1474
|
const fontSize2 = t1;
|
|
1475
|
+
let t2;
|
|
1476
|
+
$[2] !== count || $[3] !== fontSize2 ? (t2 = /* @__PURE__ */ jsx(Label, { as: "span", size: fontSize2, weight: "medium", children: count }), $[2] = count, $[3] = fontSize2, $[4] = t2) : t2 = $[4];
|
|
1477
1477
|
let t3;
|
|
1478
|
-
$[
|
|
1479
|
-
let t4;
|
|
1480
|
-
return $[5] !== ref || $[6] !== size2 || $[7] !== t3 ? (t4 = /* @__PURE__ */ jsx(StyledAvatarCounter, { $size: size2, "data-ui": "AvatarCounter", ref, children: t3 }), $[5] = ref, $[6] = size2, $[7] = t3, $[8] = t4) : t4 = $[8], t4;
|
|
1478
|
+
return $[5] !== ref || $[6] !== size2 || $[7] !== t2 ? (t3 = /* @__PURE__ */ jsx(StyledAvatarCounter, { $size: size2, "data-ui": "AvatarCounter", ref, children: t2 }), $[5] = ref, $[6] = size2, $[7] = t2, $[8] = t3) : t3 = $[8], t3;
|
|
1481
1479
|
});
|
|
1482
1480
|
AvatarCounter.displayName = "ForwardRef(AvatarCounter)";
|
|
1483
1481
|
function _temp$5(s) {
|
|
@@ -1515,7 +1513,7 @@ const StyledAvatarStack = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1515
1513
|
displayName: "StyledAvatarStack",
|
|
1516
1514
|
componentId: "sc-cysmbb-0"
|
|
1517
1515
|
})(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = forwardRef(function(props, ref) {
|
|
1518
|
-
const $ = c(
|
|
1516
|
+
const $ = c(22);
|
|
1519
1517
|
let childrenProp, restProps, t0, t1;
|
|
1520
1518
|
$[0] !== props ? ({
|
|
1521
1519
|
children: childrenProp,
|
|
@@ -1523,18 +1521,22 @@ const StyledAvatarStack = /* @__PURE__ */ styled.div.withConfig({
|
|
|
1523
1521
|
size: t1,
|
|
1524
1522
|
...restProps
|
|
1525
1523
|
} = props, $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1) : (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]);
|
|
1526
|
-
const maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = StyledAvatarStack, t2 = "AvatarStack"
|
|
1524
|
+
const maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = StyledAvatarStack, t2 = "AvatarStack";
|
|
1525
|
+
let t3;
|
|
1526
|
+
$[5] !== len || $[6] !== size2 ? (t3 = len === 0 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: len, size: size2 }) }), $[5] = len, $[6] = size2, $[7] = t3) : t3 = $[7];
|
|
1527
|
+
let t4;
|
|
1528
|
+
$[8] !== extraCount || $[9] !== len || $[10] !== size2 ? (t4 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: extraCount, size: size2 }) }), $[8] = extraCount, $[9] = len, $[10] = size2, $[11] = t4) : t4 = $[11];
|
|
1527
1529
|
let t5;
|
|
1528
|
-
$[
|
|
1530
|
+
$[12] !== size2 ? (t5 = (child, childIndex) => /* @__PURE__ */ jsx("div", { children: cloneElement(child, {
|
|
1529
1531
|
size: size2
|
|
1530
|
-
}) }, String(childIndex)), $[
|
|
1532
|
+
}) }, String(childIndex)), $[12] = size2, $[13] = t5) : t5 = $[13];
|
|
1531
1533
|
const t6 = visibleChildren.map(t5);
|
|
1532
1534
|
let t7;
|
|
1533
|
-
return $[
|
|
1535
|
+
return $[14] !== T0 || $[15] !== ref || $[16] !== restProps || $[17] !== size2 || $[18] !== t3 || $[19] !== t4 || $[20] !== t6 ? (t7 = /* @__PURE__ */ jsxs(T0, { "data-ui": t2, ...restProps, ref, $size: size2, children: [
|
|
1534
1536
|
t3,
|
|
1535
1537
|
t4,
|
|
1536
1538
|
t6
|
|
1537
|
-
] }), $[
|
|
1539
|
+
] }), $[14] = T0, $[15] = ref, $[16] = restProps, $[17] = size2, $[18] = t3, $[19] = t4, $[20] = t6, $[21] = t7) : t7 = $[21], t7;
|
|
1538
1540
|
});
|
|
1539
1541
|
AvatarStack.displayName = "ForwardRef(AvatarStack)";
|
|
1540
1542
|
const StyledBox = /* @__PURE__ */ styled.div.withConfig({
|
|
@@ -1962,8 +1964,8 @@ const StyledButton = /* @__PURE__ */ styled.button.withConfig({
|
|
|
1962
1964
|
const fontSize2 = 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, spaceProp = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, type = t7 === void 0 ? "button" : t7, muted = t8 === void 0 ? !1 : t8, {
|
|
1963
1965
|
button
|
|
1964
1966
|
} = useTheme_v2(), justify = useArrayProp(justifyProp), padding = useArrayProp(paddingProp), paddingX = useArrayProp(paddingXProp), paddingY = useArrayProp(paddingYProp), paddingTop = useArrayProp(paddingTopProp), paddingBottom = useArrayProp(paddingBottomProp), paddingLeft = useArrayProp(paddingLeftProp), paddingRight = useArrayProp(paddingRightProp), radius = useArrayProp(radiusProp), space = useArrayProp(spaceProp);
|
|
1965
|
-
let t9
|
|
1966
|
-
$[27] !== padding || $[28] !== paddingBottom || $[29] !== paddingLeft || $[30] !== paddingRight || $[31] !== paddingTop || $[32] !== paddingX || $[33] !== paddingY ? (
|
|
1967
|
+
let t9;
|
|
1968
|
+
$[27] !== padding || $[28] !== paddingBottom || $[29] !== paddingLeft || $[30] !== paddingRight || $[31] !== paddingTop || $[32] !== paddingX || $[33] !== paddingY ? (t9 = {
|
|
1967
1969
|
padding,
|
|
1968
1970
|
paddingX,
|
|
1969
1971
|
paddingY,
|
|
@@ -1971,12 +1973,12 @@ const StyledButton = /* @__PURE__ */ styled.button.withConfig({
|
|
|
1971
1973
|
paddingBottom,
|
|
1972
1974
|
paddingLeft,
|
|
1973
1975
|
paddingRight
|
|
1974
|
-
}, $[27] = padding, $[28] = paddingBottom, $[29] = paddingLeft, $[30] = paddingRight, $[31] = paddingTop, $[32] = paddingX, $[33] = paddingY, $[34] =
|
|
1975
|
-
const boxProps = t9,
|
|
1976
|
+
}, $[27] = padding, $[28] = paddingBottom, $[29] = paddingLeft, $[30] = paddingRight, $[31] = paddingTop, $[32] = paddingX, $[33] = paddingY, $[34] = t9) : t9 = $[34];
|
|
1977
|
+
const boxProps = t9, t10 = !!(loading || disabled), t11 = selected ? "" : void 0, t12 = !!(loading || disabled);
|
|
1978
|
+
let t13;
|
|
1979
|
+
$[35] !== loading ? (t13 = !!loading && /* @__PURE__ */ jsx(LoadingBox, { children: /* @__PURE__ */ jsx(Spinner, {}) }), $[35] = loading, $[36] = t13) : t13 = $[36];
|
|
1976
1980
|
let t14;
|
|
1977
|
-
$[
|
|
1978
|
-
let t15;
|
|
1979
|
-
$[37] !== IconComponent || $[38] !== IconRightComponent || $[39] !== boxProps || $[40] !== button || $[41] !== fontSize2 || $[42] !== justify || $[43] !== muted || $[44] !== space || $[45] !== text || $[46] !== textAlign || $[47] !== textWeight ? (t15 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxs(Flex, { as: "span", justify, gap: space, children: [
|
|
1981
|
+
$[37] !== IconComponent || $[38] !== IconRightComponent || $[39] !== boxProps || $[40] !== button || $[41] !== fontSize2 || $[42] !== justify || $[43] !== muted || $[44] !== space || $[45] !== text || $[46] !== textAlign || $[47] !== textWeight ? (t14 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxs(Flex, { as: "span", justify, gap: space, children: [
|
|
1980
1982
|
IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
|
|
1981
1983
|
isValidElement(IconComponent) && IconComponent,
|
|
1982
1984
|
isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
|
|
@@ -1986,15 +1988,15 @@ const StyledButton = /* @__PURE__ */ styled.button.withConfig({
|
|
|
1986
1988
|
isValidElement(IconRightComponent) && IconRightComponent,
|
|
1987
1989
|
isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
|
|
1988
1990
|
] })
|
|
1989
|
-
] }) }), $[37] = IconComponent, $[38] = IconRightComponent, $[39] = boxProps, $[40] = button, $[41] = fontSize2, $[42] = justify, $[43] = muted, $[44] = space, $[45] = text, $[46] = textAlign, $[47] = textWeight, $[48] =
|
|
1991
|
+
] }) }), $[37] = IconComponent, $[38] = IconRightComponent, $[39] = boxProps, $[40] = button, $[41] = fontSize2, $[42] = justify, $[43] = muted, $[44] = space, $[45] = text, $[46] = textAlign, $[47] = textWeight, $[48] = t14) : t14 = $[48];
|
|
1992
|
+
let t15;
|
|
1993
|
+
$[49] !== boxProps || $[50] !== children ? (t15 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children }), $[49] = boxProps, $[50] = children, $[51] = t15) : t15 = $[51];
|
|
1990
1994
|
let t16;
|
|
1991
|
-
$[
|
|
1992
|
-
|
|
1993
|
-
return $[52] !== mode || $[53] !== radius || $[54] !== ref || $[55] !== restProps || $[56] !== t11 || $[57] !== t12 || $[58] !== t13 || $[59] !== t14 || $[60] !== t15 || $[61] !== t16 || $[62] !== tone || $[63] !== type || $[64] !== width ? (t17 = /* @__PURE__ */ jsxs(StyledButton, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": t11, "data-selected": t12, disabled: t13, ref, type, $width: width, children: [
|
|
1995
|
+
return $[52] !== mode || $[53] !== radius || $[54] !== ref || $[55] !== restProps || $[56] !== t10 || $[57] !== t11 || $[58] !== t12 || $[59] !== t13 || $[60] !== t14 || $[61] !== t15 || $[62] !== tone || $[63] !== type || $[64] !== width ? (t16 = /* @__PURE__ */ jsxs(StyledButton, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": t10, "data-selected": t11, disabled: t12, ref, type, $width: width, children: [
|
|
1996
|
+
t13,
|
|
1994
1997
|
t14,
|
|
1995
|
-
t15
|
|
1996
|
-
|
|
1997
|
-
] }), $[52] = mode, $[53] = radius, $[54] = ref, $[55] = restProps, $[56] = t11, $[57] = t12, $[58] = t13, $[59] = t14, $[60] = t15, $[61] = t16, $[62] = tone, $[63] = type, $[64] = width, $[65] = t17) : t17 = $[65], t17;
|
|
1998
|
+
t15
|
|
1999
|
+
] }), $[52] = mode, $[53] = radius, $[54] = ref, $[55] = restProps, $[56] = t10, $[57] = t11, $[58] = t12, $[59] = t13, $[60] = t14, $[61] = t15, $[62] = tone, $[63] = type, $[64] = width, $[65] = t16) : t16 = $[65], t16;
|
|
1998
2000
|
});
|
|
1999
2001
|
Button.displayName = "ForwardRef(Button)";
|
|
2000
2002
|
function cardStyle(props) {
|
|
@@ -2710,11 +2712,11 @@ const StyledInline = /* @__PURE__ */ styled(Box).withConfig({
|
|
|
2710
2712
|
space,
|
|
2711
2713
|
...restProps
|
|
2712
2714
|
} = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = restProps, $[4] = space) : (as = $[1], childrenProp = $[2], restProps = $[3], space = $[4]);
|
|
2713
|
-
let t0
|
|
2714
|
-
$[5] !== childrenProp ? (
|
|
2715
|
-
const children = t0,
|
|
2716
|
-
let
|
|
2717
|
-
return $[7] !== as || $[8] !== children || $[9] !== restProps || $[10] !==
|
|
2715
|
+
let t0;
|
|
2716
|
+
$[5] !== childrenProp ? (t0 = Children.map(childrenProp, _temp$4), $[5] = childrenProp, $[6] = t0) : t0 = $[6];
|
|
2717
|
+
const children = t0, t1 = useArrayProp(space), t2 = ref;
|
|
2718
|
+
let t3;
|
|
2719
|
+
return $[7] !== as || $[8] !== children || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 ? (t3 = /* @__PURE__ */ jsx(StyledInline, { "data-ui": "Inline", ...restProps, $space: t1, forwardedAs: as, ref: t2, children }), $[7] = as, $[8] = children, $[9] = restProps, $[10] = t1, $[11] = t2, $[12] = t3) : t3 = $[12], t3;
|
|
2718
2720
|
});
|
|
2719
2721
|
Inline.displayName = "ForwardRef(Inline)";
|
|
2720
2722
|
function _temp$4(child) {
|
|
@@ -2936,14 +2938,14 @@ function BoundaryElementProvider(props) {
|
|
|
2936
2938
|
children,
|
|
2937
2939
|
element
|
|
2938
2940
|
} = props;
|
|
2939
|
-
let t0
|
|
2940
|
-
$[0] !== element ? (
|
|
2941
|
+
let t0;
|
|
2942
|
+
$[0] !== element ? (t0 = {
|
|
2941
2943
|
version: 0,
|
|
2942
2944
|
element
|
|
2943
|
-
}, $[0] = element, $[1] =
|
|
2945
|
+
}, $[0] = element, $[1] = t0) : t0 = $[1];
|
|
2944
2946
|
const value = t0;
|
|
2945
|
-
let
|
|
2946
|
-
return $[2] !== children || $[3] !== value ? (
|
|
2947
|
+
let t1;
|
|
2948
|
+
return $[2] !== children || $[3] !== value ? (t1 = /* @__PURE__ */ jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t1) : t1 = $[4], t1;
|
|
2947
2949
|
}
|
|
2948
2950
|
BoundaryElementProvider.displayName = "BoundaryElementProvider";
|
|
2949
2951
|
function isRecord(value) {
|
|
@@ -2987,30 +2989,25 @@ const ElementQuery = forwardRef(function(props, forwardedRef) {
|
|
|
2987
2989
|
media: _media,
|
|
2988
2990
|
...restProps
|
|
2989
2991
|
} = props, $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
|
|
2990
|
-
const media = _media ?? theme.media, [element, setElement] = useState(null),
|
|
2992
|
+
const media = _media ?? theme.media, [element, setElement] = useState(null), width = useElementSize(element)?.border.width ?? window.innerWidth;
|
|
2991
2993
|
let t0;
|
|
2992
|
-
t0 = elementSize?.border.width ?? window.innerWidth;
|
|
2993
|
-
const width = t0;
|
|
2994
|
-
let t1, t2;
|
|
2995
2994
|
if ($[4] !== media || $[5] !== width) {
|
|
2996
2995
|
const eq = findMaxBreakpoints(media, width);
|
|
2997
|
-
|
|
2996
|
+
t0 = eq.length ? eq.join(" ") : void 0, $[4] = media, $[5] = width, $[6] = t0;
|
|
2998
2997
|
} else
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
let t3, t4;
|
|
2998
|
+
t0 = $[6];
|
|
2999
|
+
const max = t0;
|
|
3000
|
+
let t1;
|
|
3003
3001
|
if ($[7] !== media || $[8] !== width) {
|
|
3004
3002
|
const eq_0 = findMinBreakpoints(media, width);
|
|
3005
|
-
|
|
3003
|
+
t1 = eq_0.length ? eq_0.join(" ") : void 0, $[7] = media, $[8] = width, $[9] = t1;
|
|
3006
3004
|
} else
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t7 = /* @__PURE__ */ jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[13] = children, $[14] = max, $[15] = min, $[16] = restProps, $[17] = t7) : t7 = $[17], t7;
|
|
3005
|
+
t1 = $[9];
|
|
3006
|
+
const min = t1;
|
|
3007
|
+
let t2, t3;
|
|
3008
|
+
$[10] !== element ? (t2 = () => element, t3 = [element], $[10] = element, $[11] = t2, $[12] = t3) : (t2 = $[11], t3 = $[12]), useImperativeHandle(forwardedRef, t2, t3);
|
|
3009
|
+
let t4;
|
|
3010
|
+
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t4 = /* @__PURE__ */ jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[13] = children, $[14] = max, $[15] = min, $[16] = restProps, $[17] = t4) : t4 = $[17], t4;
|
|
3014
3011
|
});
|
|
3015
3012
|
ElementQuery.displayName = "ForwardRef(ElementQuery)";
|
|
3016
3013
|
function getLayerContext(contextValue) {
|
|
@@ -3055,18 +3052,18 @@ function LayerProvider(props) {
|
|
|
3055
3052
|
const registerChild = t3;
|
|
3056
3053
|
let t4, t5;
|
|
3057
3054
|
$[6] !== level || $[7] !== parentRegisterChild ? (t4 = () => parentRegisterChild?.(level), t5 = [level, parentRegisterChild], $[6] = level, $[7] = parentRegisterChild, $[8] = t4, $[9] = t5) : (t4 = $[8], t5 = $[9]), useEffect(t4, t5);
|
|
3058
|
-
let t6
|
|
3059
|
-
$[10] !== isTopLayer || $[11] !== level || $[12] !== registerChild || $[13] !== size2 || $[14] !== zIndex ? (
|
|
3055
|
+
let t6;
|
|
3056
|
+
$[10] !== isTopLayer || $[11] !== level || $[12] !== registerChild || $[13] !== size2 || $[14] !== zIndex ? (t6 = {
|
|
3060
3057
|
version: 0,
|
|
3061
3058
|
isTopLayer,
|
|
3062
3059
|
level,
|
|
3063
3060
|
registerChild,
|
|
3064
3061
|
size: size2,
|
|
3065
3062
|
zIndex
|
|
3066
|
-
}, $[10] = isTopLayer, $[11] = level, $[12] = registerChild, $[13] = size2, $[14] = zIndex, $[15] =
|
|
3063
|
+
}, $[10] = isTopLayer, $[11] = level, $[12] = registerChild, $[13] = size2, $[14] = zIndex, $[15] = t6) : t6 = $[15];
|
|
3067
3064
|
const value = t6;
|
|
3068
|
-
let
|
|
3069
|
-
return $[16] !== children || $[17] !== value ? (
|
|
3065
|
+
let t7;
|
|
3066
|
+
return $[16] !== children || $[17] !== value ? (t7 = /* @__PURE__ */ jsx(LayerContext.Provider, { value, children }), $[16] = children, $[17] = value, $[18] = t7) : t7 = $[18], t7;
|
|
3070
3067
|
}
|
|
3071
3068
|
function _temp2$2(v_0) {
|
|
3072
3069
|
return v_0 - 1;
|
|
@@ -3177,19 +3174,17 @@ function PortalProvider(props) {
|
|
|
3177
3174
|
children,
|
|
3178
3175
|
element,
|
|
3179
3176
|
__unstable_elements: elementsProp
|
|
3180
|
-
} = props, elements = useUnique(elementsProp), fallbackElement = useSyncExternalStore(emptySubscribe, _temp$2, _temp2$1);
|
|
3181
|
-
let
|
|
3182
|
-
|
|
3183
|
-
let t3;
|
|
3184
|
-
$[0] !== elements || $[1] !== t1 || $[2] !== t2 ? (t3 = {
|
|
3177
|
+
} = props, elements = useUnique(elementsProp), fallbackElement = useSyncExternalStore(emptySubscribe, _temp$2, _temp2$1), t0 = boundaryElement || null, t1 = element || fallbackElement;
|
|
3178
|
+
let t2;
|
|
3179
|
+
$[0] !== elements || $[1] !== t0 || $[2] !== t1 ? (t2 = {
|
|
3185
3180
|
version: 0,
|
|
3186
|
-
boundaryElement:
|
|
3187
|
-
element:
|
|
3181
|
+
boundaryElement: t0,
|
|
3182
|
+
element: t1,
|
|
3188
3183
|
elements
|
|
3189
|
-
}, $[0] = elements, $[1] =
|
|
3190
|
-
const value =
|
|
3191
|
-
let
|
|
3192
|
-
return $[4] !== children || $[5] !== value ? (
|
|
3184
|
+
}, $[0] = elements, $[1] = t0, $[2] = t1, $[3] = t2) : t2 = $[3];
|
|
3185
|
+
const value = t2;
|
|
3186
|
+
let t3;
|
|
3187
|
+
return $[4] !== children || $[5] !== value ? (t3 = /* @__PURE__ */ jsx(PortalContext.Provider, { value, children }), $[4] = children, $[5] = value, $[6] = t3) : t3 = $[6], t3;
|
|
3193
3188
|
}
|
|
3194
3189
|
function _temp2$1() {
|
|
3195
3190
|
return null;
|
|
@@ -3229,42 +3224,26 @@ const StyledVirtualList = styled.div.withConfig({
|
|
|
3229
3224
|
displayName: "ItemWrapper",
|
|
3230
3225
|
componentId: "sc-dlqsj4-1"
|
|
3231
3226
|
})`position:absolute;left:0;right:0;`, VirtualList = forwardRef(function(props, forwardedRef) {
|
|
3232
|
-
const
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
as: t0,
|
|
3236
|
-
gap: t1,
|
|
3227
|
+
const {
|
|
3228
|
+
as = "div",
|
|
3229
|
+
gap = 0,
|
|
3237
3230
|
getItemKey,
|
|
3238
|
-
items
|
|
3231
|
+
items = [],
|
|
3239
3232
|
onChange,
|
|
3240
3233
|
renderItem,
|
|
3241
3234
|
...restProps
|
|
3242
|
-
} = props,
|
|
3243
|
-
const as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1;
|
|
3244
|
-
let t3;
|
|
3245
|
-
$[8] !== t2 ? (t3 = t2 === void 0 ? [] : t2, $[8] = t2, $[9] = t3) : t3 = $[9];
|
|
3246
|
-
const items = t3, {
|
|
3235
|
+
} = props, {
|
|
3247
3236
|
space
|
|
3248
3237
|
} = useTheme_v2(), ref = useRef(null), wrapperRef = useRef(null), [scrollTop, setScrollTop] = useState(0), [scrollHeight, setScrollHeight] = useState(0), [itemHeight, setItemHeight] = useState(-1);
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
let t5;
|
|
3252
|
-
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => {
|
|
3253
|
-
if (!wrapperRef.current)
|
|
3254
|
-
return;
|
|
3238
|
+
useImperativeHandle(forwardedRef, () => ref.current), useEffect(() => {
|
|
3239
|
+
if (!wrapperRef.current) return;
|
|
3255
3240
|
const firstElement = wrapperRef.current.firstChild;
|
|
3256
3241
|
firstElement instanceof HTMLElement && setItemHeight(firstElement.offsetHeight);
|
|
3257
|
-
},
|
|
3258
|
-
|
|
3259
|
-
$[12] !== renderItem ? (t6 = [renderItem], $[12] = renderItem, $[13] = t6) : t6 = $[13], useEffect(t5, t6);
|
|
3260
|
-
let t7, t8;
|
|
3261
|
-
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => {
|
|
3262
|
-
if (!ref.current)
|
|
3263
|
-
return;
|
|
3242
|
+
}, [renderItem]), useEffect(() => {
|
|
3243
|
+
if (!ref.current) return;
|
|
3264
3244
|
const scrollEl = findScrollable(ref.current.parentNode);
|
|
3265
3245
|
if (scrollEl) {
|
|
3266
|
-
if (!(scrollEl instanceof HTMLElement))
|
|
3267
|
-
return;
|
|
3246
|
+
if (!(scrollEl instanceof HTMLElement)) return;
|
|
3268
3247
|
const handleScroll = () => {
|
|
3269
3248
|
setScrollTop(scrollEl.scrollTop);
|
|
3270
3249
|
};
|
|
@@ -3288,10 +3267,9 @@ const StyledVirtualList = styled.div.withConfig({
|
|
|
3288
3267
|
}), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
|
|
3289
3268
|
window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
|
|
3290
3269
|
};
|
|
3291
|
-
},
|
|
3270
|
+
}, []);
|
|
3292
3271
|
const len = items.length, height = itemHeight ? len * (itemHeight + space[gap]) - space[gap] : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
|
|
3293
|
-
|
|
3294
|
-
$[16] !== fromIndex || $[17] !== gap || $[18] !== itemHeight || $[19] !== onChange || $[20] !== scrollHeight || $[21] !== scrollTop || $[22] !== space || $[23] !== toIndex ? (t9 = () => {
|
|
3272
|
+
useEffect(() => {
|
|
3295
3273
|
onChange && onChange({
|
|
3296
3274
|
fromIndex,
|
|
3297
3275
|
gap: space[gap],
|
|
@@ -3300,43 +3278,16 @@ const StyledVirtualList = styled.div.withConfig({
|
|
|
3300
3278
|
scrollTop,
|
|
3301
3279
|
toIndex
|
|
3302
3280
|
});
|
|
3303
|
-
},
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
if (itemHeight === -1) {
|
|
3311
|
-
let t123;
|
|
3312
|
-
$[26] !== items[0] || $[27] !== renderItem ? (t123 = renderItem(items[0]), $[26] = items[0], $[27] = renderItem, $[28] = t123) : t123 = $[28];
|
|
3313
|
-
let t132;
|
|
3314
|
-
$[29] !== t123 ? (t132 = [/* @__PURE__ */ jsx(ItemWrapper, { children: t123 }, 0)], $[29] = t123, $[30] = t132) : t132 = $[30], t11 = t132;
|
|
3315
|
-
break bb0;
|
|
3316
|
-
}
|
|
3317
|
-
let t122;
|
|
3318
|
-
if ($[31] !== fromIndex || $[32] !== gap || $[33] !== getItemKey || $[34] !== itemHeight || $[35] !== items || $[36] !== renderItem || $[37] !== space || $[38] !== toIndex) {
|
|
3319
|
-
let t132;
|
|
3320
|
-
$[40] !== fromIndex || $[41] !== gap || $[42] !== getItemKey || $[43] !== itemHeight || $[44] !== renderItem || $[45] !== space ? (t132 = (item, _itemIndex) => {
|
|
3321
|
-
const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
|
|
3322
|
-
return /* @__PURE__ */ jsx(ItemWrapper, { style: {
|
|
3323
|
-
top: itemIndex * (itemHeight + space[gap])
|
|
3324
|
-
}, children: node }, key2);
|
|
3325
|
-
}, $[40] = fromIndex, $[41] = gap, $[42] = getItemKey, $[43] = itemHeight, $[44] = renderItem, $[45] = space, $[46] = t132) : t132 = $[46], t122 = items.slice(fromIndex, toIndex).map(t132), $[31] = fromIndex, $[32] = gap, $[33] = getItemKey, $[34] = itemHeight, $[35] = items, $[36] = renderItem, $[37] = space, $[38] = toIndex, $[39] = t122;
|
|
3326
|
-
} else
|
|
3327
|
-
t122 = $[39];
|
|
3328
|
-
t11 = t122;
|
|
3329
|
-
}
|
|
3330
|
-
const children = t11;
|
|
3331
|
-
let t12, t13;
|
|
3332
|
-
$[47] !== height ? (t13 = {
|
|
3281
|
+
}, [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex]);
|
|
3282
|
+
const children = useMemo(() => !renderItem || items.length === 0 ? null : itemHeight === -1 ? [/* @__PURE__ */ jsx(ItemWrapper, { children: renderItem(items[0]) }, 0)] : items.slice(fromIndex, toIndex).map((item, _itemIndex) => {
|
|
3283
|
+
const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
|
|
3284
|
+
return /* @__PURE__ */ jsx(ItemWrapper, { style: {
|
|
3285
|
+
top: itemIndex * (itemHeight + space[gap])
|
|
3286
|
+
}, children: node }, key2);
|
|
3287
|
+
}), [fromIndex, gap, getItemKey, itemHeight, items, renderItem, space, toIndex]), wrapperStyle = useMemo(() => ({
|
|
3333
3288
|
height
|
|
3334
|
-
},
|
|
3335
|
-
|
|
3336
|
-
let t14;
|
|
3337
|
-
$[49] !== children || $[50] !== wrapperStyle ? (t14 = /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[49] = children, $[50] = wrapperStyle, $[51] = t14) : t14 = $[51];
|
|
3338
|
-
let t15;
|
|
3339
|
-
return $[52] !== as || $[53] !== restProps || $[54] !== t14 ? (t15 = /* @__PURE__ */ jsx(StyledVirtualList, { as, "data-ui": "VirtualList", ...restProps, ref, children: t14 }), $[52] = as, $[53] = restProps, $[54] = t14, $[55] = t15) : t15 = $[55], t15;
|
|
3289
|
+
}), [height]);
|
|
3290
|
+
return /* @__PURE__ */ jsx(StyledVirtualList, { as, "data-ui": "VirtualList", ...restProps, ref, children: /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: wrapperStyle, children }) });
|
|
3340
3291
|
});
|
|
3341
3292
|
VirtualList.displayName = "ForwardRef(VirtualList)";
|
|
3342
3293
|
function findScrollable(parentNode) {
|
|
@@ -3455,14 +3406,9 @@ const MotionCard$1 = styled(motion.create(Card)).withConfig({
|
|
|
3455
3406
|
} = props, $[0] = props, $[1] = animate, $[2] = arrow2, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = restProps, $[15] = scheme, $[16] = shadow, $[17] = strategy, $[18] = style, $[19] = tone, $[20] = width, $[21] = xProp, $[22] = yProp) : (animate = $[1], arrow2 = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], restProps = $[14], scheme = $[15], shadow = $[16], strategy = $[17], style = $[18], tone = $[19], width = $[20], xProp = $[21], yProp = $[22]);
|
|
3456
3407
|
const {
|
|
3457
3408
|
zIndex
|
|
3458
|
-
} = useLayer();
|
|
3459
|
-
let t0;
|
|
3460
|
-
t0 = marginsProp || DEFAULT_POPOVER_MARGINS;
|
|
3461
|
-
const margins = t0, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
|
|
3409
|
+
} = useLayer(), margins = marginsProp || DEFAULT_POPOVER_MARGINS, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0], t0 = animate ? "transform" : void 0;
|
|
3462
3410
|
let t1;
|
|
3463
|
-
|
|
3464
|
-
let t3;
|
|
3465
|
-
$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t2 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t3 = {
|
|
3411
|
+
$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t0 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t1 = {
|
|
3466
3412
|
left: x,
|
|
3467
3413
|
originX,
|
|
3468
3414
|
originY,
|
|
@@ -3470,37 +3416,35 @@ const MotionCard$1 = styled(motion.create(Card)).withConfig({
|
|
|
3470
3416
|
top: y,
|
|
3471
3417
|
width,
|
|
3472
3418
|
zIndex,
|
|
3473
|
-
willChange:
|
|
3419
|
+
willChange: t0,
|
|
3474
3420
|
...style
|
|
3475
|
-
}, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] =
|
|
3476
|
-
const rootStyle2 = t1;
|
|
3421
|
+
}, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] = t0, $[28] = width, $[29] = x, $[30] = y, $[31] = zIndex, $[32] = t1) : t1 = $[32];
|
|
3422
|
+
const rootStyle2 = t1, t2 = arrowX !== null ? arrowX : void 0, t3 = arrowY !== null ? arrowY : void 0;
|
|
3477
3423
|
let t4;
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
left: t5,
|
|
3482
|
-
top: t6,
|
|
3424
|
+
$[33] !== t2 || $[34] !== t3 ? (t4 = {
|
|
3425
|
+
left: t2,
|
|
3426
|
+
top: t3,
|
|
3483
3427
|
right: void 0,
|
|
3484
3428
|
bottom: void 0
|
|
3485
|
-
}, $[33] =
|
|
3486
|
-
const arrowStyle = t4,
|
|
3429
|
+
}, $[33] = t2, $[34] = t3, $[35] = t4) : t4 = $[35];
|
|
3430
|
+
const arrowStyle = t4, t5 = restProps;
|
|
3431
|
+
let t6;
|
|
3432
|
+
$[36] !== animate ? (t6 = animate ? ["hidden", "initial"] : void 0, $[36] = animate, $[37] = t6) : t6 = $[37];
|
|
3433
|
+
let t7;
|
|
3434
|
+
$[38] !== animate ? (t7 = animate ? ["visible", "scaleIn"] : void 0, $[38] = animate, $[39] = t7) : t7 = $[39];
|
|
3435
|
+
let t8;
|
|
3436
|
+
$[40] !== animate ? (t8 = animate ? ["hidden", "scaleOut"] : void 0, $[40] = animate, $[41] = t8) : t8 = $[41];
|
|
3487
3437
|
let t9;
|
|
3488
|
-
$[
|
|
3438
|
+
$[42] !== children || $[43] !== padding ? (t9 = /* @__PURE__ */ jsx(Flex, { direction: "column", flex: 1, padding, children }), $[42] = children, $[43] = padding, $[44] = t9) : t9 = $[44];
|
|
3489
3439
|
let t10;
|
|
3490
|
-
$[
|
|
3440
|
+
$[45] !== overflow || $[46] !== t9 ? (t10 = /* @__PURE__ */ jsx(MotionFlex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, overflow, variants: POPOVER_MOTION_PROPS.children, transition: POPOVER_MOTION_PROPS.transition, children: t9 }), $[45] = overflow, $[46] = t9, $[47] = t10) : t10 = $[47];
|
|
3491
3441
|
let t11;
|
|
3492
|
-
$[
|
|
3442
|
+
$[48] !== arrow2 || $[49] !== arrowRef || $[50] !== arrowStyle ? (t11 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[48] = arrow2, $[49] = arrowRef, $[50] = arrowStyle, $[51] = t11) : t11 = $[51];
|
|
3493
3443
|
let t12;
|
|
3494
|
-
$[
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
$[48] !== arrow2 || $[49] !== arrowRef || $[50] !== arrowStyle ? (t14 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[48] = arrow2, $[49] = arrowRef, $[50] = arrowStyle, $[51] = t14) : t14 = $[51];
|
|
3499
|
-
let t15;
|
|
3500
|
-
return $[52] !== placement || $[53] !== radius || $[54] !== ref || $[55] !== rootStyle2 || $[56] !== scheme || $[57] !== shadow || $[58] !== t10 || $[59] !== t11 || $[60] !== t13 || $[61] !== t14 || $[62] !== t8 || $[63] !== t9 || $[64] !== tone ? (t15 = /* @__PURE__ */ jsxs(MotionCard$1, { "data-ui": "Popover", ...t8, "data-placement": placement, radius, ref, scheme, shadow, sizing: "border", style: rootStyle2, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t9, animate: t10, exit: t11, children: [
|
|
3501
|
-
t13,
|
|
3502
|
-
t14
|
|
3503
|
-
] }), $[52] = placement, $[53] = radius, $[54] = ref, $[55] = rootStyle2, $[56] = scheme, $[57] = shadow, $[58] = t10, $[59] = t11, $[60] = t13, $[61] = t14, $[62] = t8, $[63] = t9, $[64] = tone, $[65] = t15) : t15 = $[65], t15;
|
|
3444
|
+
return $[52] !== placement || $[53] !== radius || $[54] !== ref || $[55] !== rootStyle2 || $[56] !== scheme || $[57] !== shadow || $[58] !== t10 || $[59] !== t11 || $[60] !== t5 || $[61] !== t6 || $[62] !== t7 || $[63] !== t8 || $[64] !== tone ? (t12 = /* @__PURE__ */ jsxs(MotionCard$1, { "data-ui": "Popover", ...t5, "data-placement": placement, radius, ref, scheme, shadow, sizing: "border", style: rootStyle2, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t6, animate: t7, exit: t8, children: [
|
|
3445
|
+
t10,
|
|
3446
|
+
t11
|
|
3447
|
+
] }), $[52] = placement, $[53] = radius, $[54] = ref, $[55] = rootStyle2, $[56] = scheme, $[57] = shadow, $[58] = t10, $[59] = t11, $[60] = t5, $[61] = t6, $[62] = t7, $[63] = t8, $[64] = tone, $[65] = t12) : t12 = $[65], t12;
|
|
3504
3448
|
}));
|
|
3505
3449
|
PopoverCard.displayName = "Memo(ForwardRef(PopoverCard))";
|
|
3506
3450
|
const ViewportOverlay = () => {
|
|
@@ -4340,56 +4284,51 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4340
4284
|
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
|
|
4341
4285
|
}, $[20] = onClear, $[21] = t8) : t8 = $[21];
|
|
4342
4286
|
const handleClearClick = t8;
|
|
4343
|
-
let t9
|
|
4344
|
-
$[22] !== prefix || $[23] !== radius ? (
|
|
4345
|
-
const prefixNode = t9;
|
|
4287
|
+
let t9;
|
|
4288
|
+
$[22] !== prefix || $[23] !== radius ? (t9 = prefix && /* @__PURE__ */ jsx(Prefix, { borderTop: !0, borderLeft: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: prefix }) }), $[22] = prefix, $[23] = radius, $[24] = t9) : t9 = $[24];
|
|
4289
|
+
const prefixNode = t9, t10 = border2 ? "" : void 0;
|
|
4346
4290
|
let t11;
|
|
4347
|
-
|
|
4348
|
-
let t13;
|
|
4349
|
-
$[25] !== IconComponent || $[26] !== fontSize2 || $[27] !== padding ? (t13 = IconComponent && /* @__PURE__ */ jsx(LeftBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
|
|
4291
|
+
$[25] !== IconComponent || $[26] !== fontSize2 || $[27] !== padding ? (t11 = IconComponent && /* @__PURE__ */ jsx(LeftBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
|
|
4350
4292
|
isValidElement(IconComponent) && IconComponent,
|
|
4351
4293
|
isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
|
|
4352
|
-
] }) }), $[25] = IconComponent, $[26] = fontSize2, $[27] = padding, $[28] =
|
|
4353
|
-
let
|
|
4354
|
-
$[29] !== $hasClearButton || $[30] !== IconRightComponent || $[31] !== fontSize2 || $[32] !== padding ? (
|
|
4294
|
+
] }) }), $[25] = IconComponent, $[26] = fontSize2, $[27] = padding, $[28] = t11) : t11 = $[28];
|
|
4295
|
+
let t12;
|
|
4296
|
+
$[29] !== $hasClearButton || $[30] !== IconRightComponent || $[31] !== fontSize2 || $[32] !== padding ? (t12 = !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsx(RightBox, { padding, children: /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
|
|
4355
4297
|
isValidElement(IconRightComponent) && IconRightComponent,
|
|
4356
4298
|
isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
|
|
4357
|
-
] }) }), $[29] = $hasClearButton, $[30] = IconRightComponent, $[31] = fontSize2, $[32] = padding, $[33] =
|
|
4299
|
+
] }) }), $[29] = $hasClearButton, $[30] = IconRightComponent, $[31] = fontSize2, $[32] = padding, $[33] = t12) : t12 = $[33];
|
|
4300
|
+
let t13;
|
|
4301
|
+
$[34] !== $hasPrefix || $[35] !== $hasSuffix || $[36] !== __unstable_disableFocusRing || $[37] !== radius || $[38] !== rootTheme.scheme || $[39] !== rootTheme.tone || $[40] !== t10 || $[41] !== t11 || $[42] !== t12 ? (t13 = /* @__PURE__ */ jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t10, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
|
|
4302
|
+
t11,
|
|
4303
|
+
t12
|
|
4304
|
+
] }), $[34] = $hasPrefix, $[35] = $hasSuffix, $[36] = __unstable_disableFocusRing, $[37] = radius, $[38] = rootTheme.scheme, $[39] = rootTheme.tone, $[40] = t10, $[41] = t11, $[42] = t12, $[43] = t13) : t13 = $[43];
|
|
4305
|
+
const presentationNode = t13;
|
|
4306
|
+
let t14;
|
|
4307
|
+
$[44] !== padding ? (t14 = padding.map(_temp2), $[44] = padding, $[45] = t14) : t14 = $[45];
|
|
4308
|
+
const clearButtonBoxPadding = t14;
|
|
4358
4309
|
let t15;
|
|
4359
|
-
$[
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
] }), $[
|
|
4363
|
-
const
|
|
4364
|
-
let
|
|
4365
|
-
$[
|
|
4366
|
-
const
|
|
4367
|
-
let
|
|
4368
|
-
$[
|
|
4369
|
-
const clearButtonPadding = t18;
|
|
4310
|
+
$[46] !== padding ? (t15 = padding.map(_temp3), $[46] = padding, $[47] = t15) : t15 = $[47];
|
|
4311
|
+
const clearButtonPadding = t15, clearButtonProps = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
|
|
4312
|
+
let t16;
|
|
4313
|
+
$[48] !== clearButton || $[49] !== clearButtonBoxPadding || $[50] !== clearButtonPadding || $[51] !== clearButtonProps || $[52] !== customValidity || $[53] !== disabled || $[54] !== fontSize2 || $[55] !== handleClearClick || $[56] !== radius || $[57] !== readOnly ? (t16 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[48] = clearButton, $[49] = clearButtonBoxPadding, $[50] = clearButtonPadding, $[51] = clearButtonProps, $[52] = customValidity, $[53] = disabled, $[54] = fontSize2, $[55] = handleClearClick, $[56] = radius, $[57] = readOnly, $[58] = t16) : t16 = $[58];
|
|
4314
|
+
const clearButtonNode = t16;
|
|
4315
|
+
let t17;
|
|
4316
|
+
$[59] !== radius || $[60] !== suffix ? (t17 = suffix && /* @__PURE__ */ jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: suffix }) }), $[59] = radius, $[60] = suffix, $[61] = t17) : t17 = $[61];
|
|
4317
|
+
const suffixNode = t17, t18 = $hasIconRight || $hasClearButton;
|
|
4318
|
+
let t19;
|
|
4319
|
+
$[62] !== $hasIcon || $[63] !== disabled || $[64] !== fontSize2 || $[65] !== padding || $[66] !== readOnly || $[67] !== restProps || $[68] !== rootTheme.scheme || $[69] !== rootTheme.tone || $[70] !== space || $[71] !== t18 || $[72] !== type || $[73] !== weight ? (t19 = /* @__PURE__ */ jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: t18, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }), $[62] = $hasIcon, $[63] = disabled, $[64] = fontSize2, $[65] = padding, $[66] = readOnly, $[67] = restProps, $[68] = rootTheme.scheme, $[69] = rootTheme.tone, $[70] = space, $[71] = t18, $[72] = type, $[73] = weight, $[74] = t19) : t19 = $[74];
|
|
4370
4320
|
let t20;
|
|
4371
|
-
t20 =
|
|
4372
|
-
|
|
4373
|
-
let t21, t22;
|
|
4374
|
-
$[48] !== clearButton || $[49] !== clearButtonBoxPadding || $[50] !== clearButtonPadding || $[51] !== clearButtonProps || $[52] !== customValidity || $[53] !== disabled || $[54] !== fontSize2 || $[55] !== handleClearClick || $[56] !== radius || $[57] !== readOnly ? (t22 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[48] = clearButton, $[49] = clearButtonBoxPadding, $[50] = clearButtonPadding, $[51] = clearButtonProps, $[52] = customValidity, $[53] = disabled, $[54] = fontSize2, $[55] = handleClearClick, $[56] = radius, $[57] = readOnly, $[58] = t22) : t22 = $[58], t21 = t22;
|
|
4375
|
-
const clearButtonNode = t21;
|
|
4376
|
-
let t23, t24;
|
|
4377
|
-
$[59] !== radius || $[60] !== suffix ? (t24 = suffix && /* @__PURE__ */ jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: suffix }) }), $[59] = radius, $[60] = suffix, $[61] = t24) : t24 = $[61], t23 = t24;
|
|
4378
|
-
const suffixNode = t23, t25 = $hasIconRight || $hasClearButton;
|
|
4379
|
-
let t26;
|
|
4380
|
-
$[62] !== $hasIcon || $[63] !== disabled || $[64] !== fontSize2 || $[65] !== padding || $[66] !== readOnly || $[67] !== restProps || $[68] !== rootTheme.scheme || $[69] !== rootTheme.tone || $[70] !== space || $[71] !== t25 || $[72] !== type || $[73] !== weight ? (t26 = /* @__PURE__ */ jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: t25, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }), $[62] = $hasIcon, $[63] = disabled, $[64] = fontSize2, $[65] = padding, $[66] = readOnly, $[67] = restProps, $[68] = rootTheme.scheme, $[69] = rootTheme.tone, $[70] = space, $[71] = t25, $[72] = type, $[73] = weight, $[74] = t26) : t26 = $[74];
|
|
4381
|
-
let t27;
|
|
4382
|
-
$[75] !== clearButtonNode || $[76] !== presentationNode || $[77] !== t26 ? (t27 = /* @__PURE__ */ jsxs(InputRoot, { children: [
|
|
4383
|
-
t26,
|
|
4321
|
+
$[75] !== clearButtonNode || $[76] !== presentationNode || $[77] !== t19 ? (t20 = /* @__PURE__ */ jsxs(InputRoot, { children: [
|
|
4322
|
+
t19,
|
|
4384
4323
|
presentationNode,
|
|
4385
4324
|
clearButtonNode
|
|
4386
|
-
] }), $[75] = clearButtonNode, $[76] = presentationNode, $[77] =
|
|
4387
|
-
let
|
|
4388
|
-
return $[79] !== prefixNode || $[80] !== rootTheme.tone || $[81] !== suffixNode || $[82] !==
|
|
4325
|
+
] }), $[75] = clearButtonNode, $[76] = presentationNode, $[77] = t19, $[78] = t20) : t20 = $[78];
|
|
4326
|
+
let t21;
|
|
4327
|
+
return $[79] !== prefixNode || $[80] !== rootTheme.tone || $[81] !== suffixNode || $[82] !== t20 ? (t21 = /* @__PURE__ */ jsxs(StyledTextInput, { "data-ui": "TextInput", tone: rootTheme.tone, children: [
|
|
4389
4328
|
prefixNode,
|
|
4390
|
-
|
|
4329
|
+
t20,
|
|
4391
4330
|
suffixNode
|
|
4392
|
-
] }), $[79] = prefixNode, $[80] = rootTheme.tone, $[81] = suffixNode, $[82] =
|
|
4331
|
+
] }), $[79] = prefixNode, $[80] = rootTheme.tone, $[81] = suffixNode, $[82] = t20, $[83] = t21) : t21 = $[83], t21;
|
|
4393
4332
|
});
|
|
4394
4333
|
TextInput.displayName = "ForwardRef(TextInput)";
|
|
4395
4334
|
function _temp$1(event) {
|
|
@@ -4452,39 +4391,36 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4452
4391
|
style,
|
|
4453
4392
|
...restProps
|
|
4454
4393
|
} = props, $[0] = props, $[1] = animate, $[2] = arrow2, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = restProps, $[13] = scheme, $[14] = shadow, $[15] = style) : (animate = $[1], arrow2 = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], restProps = $[12], scheme = $[13], shadow = $[14], style = $[15]);
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t1 ? (t2 = {
|
|
4394
|
+
const t0 = animate ? "transform" : void 0;
|
|
4395
|
+
let t1;
|
|
4396
|
+
$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t0 ? (t1 = {
|
|
4459
4397
|
originX,
|
|
4460
4398
|
originY,
|
|
4461
|
-
willChange:
|
|
4399
|
+
willChange: t0,
|
|
4462
4400
|
...style
|
|
4463
|
-
}, $[16] = originX, $[17] = originY, $[18] = style, $[19] =
|
|
4464
|
-
const rootStyle2 =
|
|
4465
|
-
let
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
left: t4,
|
|
4470
|
-
top: t5,
|
|
4401
|
+
}, $[16] = originX, $[17] = originY, $[18] = style, $[19] = t0, $[20] = t1) : t1 = $[20];
|
|
4402
|
+
const rootStyle2 = t1, t2 = arrowX !== null ? arrowX : void 0, t3 = arrowY !== null ? arrowY : void 0;
|
|
4403
|
+
let t4;
|
|
4404
|
+
$[21] !== t2 || $[22] !== t3 ? (t4 = {
|
|
4405
|
+
left: t2,
|
|
4406
|
+
top: t3,
|
|
4471
4407
|
right: void 0,
|
|
4472
4408
|
bottom: void 0
|
|
4473
|
-
}, $[21] =
|
|
4474
|
-
const arrowStyle =
|
|
4409
|
+
}, $[21] = t2, $[22] = t3, $[23] = t4) : t4 = $[23];
|
|
4410
|
+
const arrowStyle = t4, t5 = restProps;
|
|
4411
|
+
let t6;
|
|
4412
|
+
$[24] !== animate ? (t6 = animate ? ["hidden", "initial"] : void 0, $[24] = animate, $[25] = t6) : t6 = $[25];
|
|
4413
|
+
let t7;
|
|
4414
|
+
$[26] !== animate ? (t7 = animate ? ["visible", "scaleIn"] : void 0, $[26] = animate, $[27] = t7) : t7 = $[27];
|
|
4475
4415
|
let t8;
|
|
4476
|
-
$[
|
|
4416
|
+
$[28] !== animate ? (t8 = animate ? ["hidden", "scaleOut"] : void 0, $[28] = animate, $[29] = t8) : t8 = $[29];
|
|
4477
4417
|
let t9;
|
|
4478
|
-
$[
|
|
4418
|
+
$[30] !== arrow2 || $[31] !== arrowRef || $[32] !== arrowStyle ? (t9 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[30] = arrow2, $[31] = arrowRef, $[32] = arrowStyle, $[33] = t9) : t9 = $[33];
|
|
4479
4419
|
let t10;
|
|
4480
|
-
$[
|
|
4481
|
-
let t11;
|
|
4482
|
-
$[30] !== arrow2 || $[31] !== arrowRef || $[32] !== arrowStyle ? (t11 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[30] = arrow2, $[31] = arrowRef, $[32] = arrowStyle, $[33] = t11) : t11 = $[33];
|
|
4483
|
-
let t12;
|
|
4484
|
-
return $[34] !== children || $[35] !== padding || $[36] !== placement || $[37] !== radius || $[38] !== ref || $[39] !== rootStyle2 || $[40] !== scheme || $[41] !== shadow || $[42] !== t10 || $[43] !== t11 || $[44] !== t7 || $[45] !== t8 || $[46] !== t9 ? (t12 = /* @__PURE__ */ jsxs(MotionCard, { "data-ui": "Tooltip__card", ...t7, "data-placement": placement, padding, radius, ref, scheme, shadow, style: rootStyle2, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t8, animate: t9, exit: t10, children: [
|
|
4420
|
+
return $[34] !== children || $[35] !== padding || $[36] !== placement || $[37] !== radius || $[38] !== ref || $[39] !== rootStyle2 || $[40] !== scheme || $[41] !== shadow || $[42] !== t5 || $[43] !== t6 || $[44] !== t7 || $[45] !== t8 || $[46] !== t9 ? (t10 = /* @__PURE__ */ jsxs(MotionCard, { "data-ui": "Tooltip__card", ...t5, "data-placement": placement, padding, radius, ref, scheme, shadow, style: rootStyle2, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t6, animate: t7, exit: t8, children: [
|
|
4485
4421
|
children,
|
|
4486
|
-
|
|
4487
|
-
] }), $[34] = children, $[35] = padding, $[36] = placement, $[37] = radius, $[38] = ref, $[39] = rootStyle2, $[40] = scheme, $[41] = shadow, $[42] =
|
|
4422
|
+
t9
|
|
4423
|
+
] }), $[34] = children, $[35] = padding, $[36] = placement, $[37] = radius, $[38] = ref, $[39] = rootStyle2, $[40] = scheme, $[41] = shadow, $[42] = t5, $[43] = t6, $[44] = t7, $[45] = t8, $[46] = t9, $[47] = t10) : t10 = $[47], t10;
|
|
4488
4424
|
}));
|
|
4489
4425
|
TooltipCard.displayName = "Memo(ForwardRef(TooltipCard))";
|
|
4490
4426
|
const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
|
|
@@ -4492,20 +4428,18 @@ function TooltipDelayGroupProvider(props) {
|
|
|
4492
4428
|
const $ = c(9), {
|
|
4493
4429
|
children,
|
|
4494
4430
|
delay
|
|
4495
|
-
} = 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;
|
|
4496
|
-
let
|
|
4497
|
-
|
|
4498
|
-
let t2;
|
|
4499
|
-
$[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t1 ? (t2 = {
|
|
4431
|
+
} = 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, t0 = isGroupActive ? 1 : openDelay;
|
|
4432
|
+
let t1;
|
|
4433
|
+
$[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t0 ? (t1 = {
|
|
4500
4434
|
setIsGroupActive,
|
|
4501
4435
|
openTooltipId,
|
|
4502
4436
|
setOpenTooltipId,
|
|
4503
|
-
openDelay:
|
|
4437
|
+
openDelay: t0,
|
|
4504
4438
|
closeDelay
|
|
4505
|
-
}, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] =
|
|
4506
|
-
const value =
|
|
4507
|
-
let
|
|
4508
|
-
return $[6] !== children || $[7] !== value ? (
|
|
4439
|
+
}, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t0, $[5] = t1) : t1 = $[5];
|
|
4440
|
+
const value = t1;
|
|
4441
|
+
let t2;
|
|
4442
|
+
return $[6] !== children || $[7] !== value ? (t2 = /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t2) : t2 = $[8], t2;
|
|
4509
4443
|
}
|
|
4510
4444
|
TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
|
|
4511
4445
|
function useTooltipDelayGroup() {
|
|
@@ -4856,9 +4790,9 @@ const StyledMenu = styled(Box).withConfig({
|
|
|
4856
4790
|
registerElement: t102,
|
|
4857
4791
|
shouldFocus: t112,
|
|
4858
4792
|
space: t122,
|
|
4859
|
-
...
|
|
4793
|
+
...t13
|
|
4860
4794
|
} = props;
|
|
4861
|
-
children = t22, onClickOutside = t32, onEscape = t42, onItemClick = t52, onItemSelect = t62, onKeyDown = t72, originElement = t82, t0 = t92, registerElement = t102, _shouldFocus = t112, t1 = t122, restProps =
|
|
4795
|
+
children = t22, onClickOutside = t32, onEscape = t42, onItemClick = t52, onItemSelect = t62, onKeyDown = t72, originElement = t82, t0 = t92, registerElement = t102, _shouldFocus = t112, t1 = t122, restProps = t13, $[0] = props, $[1] = _shouldFocus, $[2] = children, $[3] = onClickOutside, $[4] = onEscape, $[5] = onItemClick, $[6] = onItemSelect, $[7] = onKeyDown, $[8] = originElement, $[9] = registerElement, $[10] = restProps, $[11] = t0, $[12] = t1;
|
|
4862
4796
|
} else
|
|
4863
4797
|
_shouldFocus = $[1], children = $[2], onClickOutside = $[3], onEscape = $[4], onItemClick = $[5], onItemSelect = $[6], onKeyDown = $[7], originElement = $[8], registerElement = $[9], restProps = $[10], t0 = $[11], t1 = $[12];
|
|
4864
4798
|
const padding = t0 === void 0 ? 1 : t0, space = t1 === void 0 ? 1 : t1, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = useRef(null);
|
|
@@ -4897,8 +4831,8 @@ const StyledMenu = styled(Box).withConfig({
|
|
|
4897
4831
|
$[25] !== isTopLayer || $[26] !== onEscape ? (t8 = (event) => {
|
|
4898
4832
|
isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
|
|
4899
4833
|
}, $[25] = isTopLayer, $[26] = onEscape, $[27] = t8) : t8 = $[27], useGlobalKeyDown(t8);
|
|
4900
|
-
let t9
|
|
4901
|
-
$[28] !== activeElement || $[29] !== activeIndex || $[30] !== handleItemMouseEnter || $[31] !== handleItemMouseLeave || $[32] !== mount || $[33] !== onClickOutside || $[34] !== onEscape || $[35] !== onItemClick || $[36] !== registerElement ? (
|
|
4834
|
+
let t9;
|
|
4835
|
+
$[28] !== activeElement || $[29] !== activeIndex || $[30] !== handleItemMouseEnter || $[31] !== handleItemMouseLeave || $[32] !== mount || $[33] !== onClickOutside || $[34] !== onEscape || $[35] !== onItemClick || $[36] !== registerElement ? (t9 = {
|
|
4902
4836
|
version: 0,
|
|
4903
4837
|
activeElement,
|
|
4904
4838
|
activeIndex,
|
|
@@ -4911,14 +4845,14 @@ const StyledMenu = styled(Box).withConfig({
|
|
|
4911
4845
|
registerElement,
|
|
4912
4846
|
onMouseEnter: handleItemMouseEnter,
|
|
4913
4847
|
onMouseLeave: handleItemMouseLeave
|
|
4914
|
-
}, $[28] = activeElement, $[29] = activeIndex, $[30] = handleItemMouseEnter, $[31] = handleItemMouseLeave, $[32] = mount, $[33] = onClickOutside, $[34] = onEscape, $[35] = onItemClick, $[36] = registerElement, $[37] =
|
|
4848
|
+
}, $[28] = activeElement, $[29] = activeIndex, $[30] = handleItemMouseEnter, $[31] = handleItemMouseLeave, $[32] = mount, $[33] = onClickOutside, $[34] = onEscape, $[35] = onItemClick, $[36] = registerElement, $[37] = t9) : t9 = $[37];
|
|
4915
4849
|
const value = t9;
|
|
4850
|
+
let t10;
|
|
4851
|
+
$[38] !== children || $[39] !== space ? (t10 = /* @__PURE__ */ jsx(Stack, { space, children }), $[38] = children, $[39] = space, $[40] = t10) : t10 = $[40];
|
|
4916
4852
|
let t11;
|
|
4917
|
-
$[
|
|
4853
|
+
$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t10 ? (t11 = /* @__PURE__ */ jsx(StyledMenu, { "data-ui": "Menu", ...restProps, onKeyDown: handleKeyDown, padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t10 }), $[41] = handleKeyDown, $[42] = handleRefChange, $[43] = padding, $[44] = restProps, $[45] = t10, $[46] = t11) : t11 = $[46];
|
|
4918
4854
|
let t12;
|
|
4919
|
-
|
|
4920
|
-
let t13;
|
|
4921
|
-
return $[47] !== t12 || $[48] !== value ? (t13 = /* @__PURE__ */ jsx(MenuContext.Provider, { value, children: t12 }), $[47] = t12, $[48] = value, $[49] = t13) : t13 = $[49], t13;
|
|
4855
|
+
return $[47] !== t11 || $[48] !== value ? (t12 = /* @__PURE__ */ jsx(MenuContext.Provider, { value, children: t11 }), $[47] = t11, $[48] = value, $[49] = t12) : t12 = $[49], t12;
|
|
4922
4856
|
});
|
|
4923
4857
|
Menu.displayName = "ForwardRef(Menu)";
|
|
4924
4858
|
const MenuDivider = styled.hr.withConfig({
|
|
@@ -5190,8 +5124,8 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
|
|
|
5190
5124
|
disabled || (onClick && onClick(event), onItemClick && onItemClick());
|
|
5191
5125
|
}, $[29] = disabled, $[30] = onClick, $[31] = onItemClick, $[32] = t9) : t9 = $[32];
|
|
5192
5126
|
const handleClick = t9;
|
|
5193
|
-
let t10
|
|
5194
|
-
$[33] !== padding || $[34] !== paddingBottom || $[35] !== paddingLeft || $[36] !== paddingRight || $[37] !== paddingTop || $[38] !== paddingX || $[39] !== paddingY ? (
|
|
5127
|
+
let t10;
|
|
5128
|
+
$[33] !== padding || $[34] !== paddingBottom || $[35] !== paddingLeft || $[36] !== paddingRight || $[37] !== paddingTop || $[38] !== paddingX || $[39] !== paddingY ? (t10 = {
|
|
5195
5129
|
padding,
|
|
5196
5130
|
paddingX,
|
|
5197
5131
|
paddingY,
|
|
@@ -5199,18 +5133,18 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
|
|
|
5199
5133
|
paddingRight,
|
|
5200
5134
|
paddingBottom,
|
|
5201
5135
|
paddingLeft
|
|
5202
|
-
}, $[33] = padding, $[34] = paddingBottom, $[35] = paddingLeft, $[36] = paddingRight, $[37] = paddingTop, $[38] = paddingX, $[39] = paddingY, $[40] =
|
|
5203
|
-
const paddingProps = t10,
|
|
5136
|
+
}, $[33] = padding, $[34] = paddingBottom, $[35] = paddingLeft, $[36] = paddingRight, $[37] = paddingTop, $[38] = paddingX, $[39] = paddingY, $[40] = t10) : t10 = $[40];
|
|
5137
|
+
const paddingProps = t10, t11 = useArrayProp(fontSize2);
|
|
5138
|
+
let t12;
|
|
5139
|
+
$[41] !== t11 ? (t12 = t11.map(_temp), $[41] = t11, $[42] = t12) : t12 = $[42];
|
|
5140
|
+
const hotkeysFontSize = t12;
|
|
5204
5141
|
let t13;
|
|
5205
|
-
$[
|
|
5206
|
-
const hotkeysFontSize = t13;
|
|
5207
|
-
let t14;
|
|
5208
|
-
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t14 = (el) => {
|
|
5142
|
+
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t13 = (el) => {
|
|
5209
5143
|
ref.current = el, setRootElement(el);
|
|
5210
|
-
}, $[43] =
|
|
5211
|
-
const setRef =
|
|
5212
|
-
let
|
|
5213
|
-
$[44] !== IconComponent || $[45] !== IconRightComponent || $[46] !== fontSize2 || $[47] !== hotkeys || $[48] !== hotkeysFontSize || $[49] !== paddingProps || $[50] !== space || $[51] !== text ? (
|
|
5144
|
+
}, $[43] = t13) : t13 = $[43];
|
|
5145
|
+
const setRef = t13, t14 = as !== "button" && pressed ? "" : void 0, t15 = active ? "" : void 0, t16 = disabled ? "" : void 0, t17 = useArrayProp(radius), t18 = useArrayProp(0), t19 = disabled ? "default" : tone, t20 = as === "button" ? "button" : void 0;
|
|
5146
|
+
let t21;
|
|
5147
|
+
$[44] !== IconComponent || $[45] !== IconRightComponent || $[46] !== fontSize2 || $[47] !== hotkeys || $[48] !== hotkeysFontSize || $[49] !== paddingProps || $[50] !== space || $[51] !== text ? (t21 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxs(Flex, { as: "span", gap: space, align: "center", ...paddingProps, children: [
|
|
5214
5148
|
IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
|
|
5215
5149
|
isValidElement(IconComponent) && IconComponent,
|
|
5216
5150
|
isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
|
|
@@ -5224,14 +5158,14 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
|
|
|
5224
5158
|
isValidElement(IconRightComponent) && IconRightComponent,
|
|
5225
5159
|
isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
|
|
5226
5160
|
] })
|
|
5227
|
-
] }), $[44] = IconComponent, $[45] = IconRightComponent, $[46] = fontSize2, $[47] = hotkeys, $[48] = hotkeysFontSize, $[49] = paddingProps, $[50] = space, $[51] = text, $[52] =
|
|
5161
|
+
] }), $[44] = IconComponent, $[45] = IconRightComponent, $[46] = fontSize2, $[47] = hotkeys, $[48] = hotkeysFontSize, $[49] = paddingProps, $[50] = space, $[51] = text, $[52] = t21) : t21 = $[52];
|
|
5162
|
+
let t22;
|
|
5163
|
+
$[53] !== children || $[54] !== paddingProps ? (t22 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...paddingProps, children }), $[53] = children, $[54] = paddingProps, $[55] = t22) : t22 = $[55];
|
|
5228
5164
|
let t23;
|
|
5229
|
-
$[
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
t23
|
|
5234
|
-
] }), $[56] = as, $[57] = disabled, $[58] = handleClick, $[59] = onItemMouseEnter, $[60] = onItemMouseLeave, $[61] = restProps, $[62] = scheme, $[63] = t15, $[64] = t16, $[65] = t17, $[66] = t18, $[67] = t19, $[68] = t20, $[69] = t21, $[70] = t22, $[71] = t23, $[72] = t24) : t24 = $[72], t24;
|
|
5165
|
+
return $[56] !== as || $[57] !== disabled || $[58] !== handleClick || $[59] !== onItemMouseEnter || $[60] !== onItemMouseLeave || $[61] !== restProps || $[62] !== scheme || $[63] !== t14 || $[64] !== t15 || $[65] !== t16 || $[66] !== t17 || $[67] !== t18 || $[68] !== t19 || $[69] !== t20 || $[70] !== t21 || $[71] !== t22 ? (t23 = /* @__PURE__ */ jsxs(Selectable, { "data-ui": "MenuItem", role: "menuitem", ...restProps, "data-pressed": t14, "data-selected": t15, "data-disabled": t16, forwardedAs: as, $radius: t17, $padding: t18, $tone: t19, $scheme: scheme, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, tabIndex: -1, type: t20, children: [
|
|
5166
|
+
t21,
|
|
5167
|
+
t22
|
|
5168
|
+
] }), $[56] = as, $[57] = disabled, $[58] = handleClick, $[59] = onItemMouseEnter, $[60] = onItemMouseLeave, $[61] = restProps, $[62] = scheme, $[63] = t14, $[64] = t15, $[65] = t16, $[66] = t17, $[67] = t18, $[68] = t19, $[69] = t20, $[70] = t21, $[71] = t22, $[72] = t23) : t23 = $[72], t23;
|
|
5235
5169
|
});
|
|
5236
5170
|
MenuItem.displayName = "ForwardRef(MenuItem)";
|
|
5237
5171
|
function _temp(s) {
|