@sanity/ui 2.8.21 → 2.8.23
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/index.esm.js +318 -471
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +318 -471
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +318 -471
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/core/components/autocomplete/autocomplete.tsx +31 -42
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +2 -2
- package/src/core/theme/__workshop__/debug/story.tsx +8 -11
package/dist/index.js
CHANGED
|
@@ -150,7 +150,7 @@ function responsiveTextFont(props) {
|
|
|
150
150
|
function useArrayProp(val, defaultVal) {
|
|
151
151
|
const $ = reactCompilerRuntime.c(3);
|
|
152
152
|
let t0;
|
|
153
|
-
$[0] !==
|
|
153
|
+
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val ?? defaultVal)], $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2];
|
|
154
154
|
const [t1, setCache] = react.useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val ?? defaultVal);
|
|
155
155
|
return hash !== cachedHash && setCache([_getArrayProp(val, defaultVal), hash]), cachedVal;
|
|
156
156
|
}
|
|
@@ -184,7 +184,7 @@ function useClickOutside(listener, t0, boundaryElement) {
|
|
|
184
184
|
}
|
|
185
185
|
}, t3 = [element, elementsArg], $[3] = element, $[4] = elementsArg, $[5] = t2, $[6] = t3) : (t2 = $[5], t3 = $[6]), react.useEffect(t2, t3);
|
|
186
186
|
let t4, t5;
|
|
187
|
-
return $[7] !==
|
|
187
|
+
return $[7] !== boundaryElement || $[8] !== elements || $[9] !== listener ? (t4 = () => {
|
|
188
188
|
if (!listener)
|
|
189
189
|
return;
|
|
190
190
|
const handleWindowMouseDown = (evt) => {
|
|
@@ -199,12 +199,12 @@ function useClickOutside(listener, t0, boundaryElement) {
|
|
|
199
199
|
return window.addEventListener("mousedown", handleWindowMouseDown), () => {
|
|
200
200
|
window.removeEventListener("mousedown", handleWindowMouseDown);
|
|
201
201
|
};
|
|
202
|
-
}, t5 = [boundaryElement, listener, elements], $[7] =
|
|
202
|
+
}, t5 = [boundaryElement, listener, elements], $[7] = boundaryElement, $[8] = elements, $[9] = listener, $[10] = t4, $[11] = t5) : (t4 = $[10], t5 = $[11]), react.useEffect(t4, t5), setElement;
|
|
203
203
|
}
|
|
204
204
|
function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
205
205
|
const $ = reactCompilerRuntime.c(8), elementsArg = t0 === void 0 ? _temp$6 : t0;
|
|
206
206
|
let t1;
|
|
207
|
-
$[0] !==
|
|
207
|
+
$[0] !== boundaryElement || $[1] !== elementsArg || $[2] !== listener ? (t1 = (evt) => {
|
|
208
208
|
if (!listener)
|
|
209
209
|
return;
|
|
210
210
|
const target = evt.target;
|
|
@@ -218,7 +218,7 @@ function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
|
218
218
|
if (el && (target === el || el.contains(target)))
|
|
219
219
|
return;
|
|
220
220
|
listener(evt);
|
|
221
|
-
}, $[0] =
|
|
221
|
+
}, $[0] = boundaryElement, $[1] = elementsArg, $[2] = listener, $[3] = t1) : t1 = $[3];
|
|
222
222
|
const onEvent = useEffectEvent.useEffectEvent(t1), hasListener = !!listener;
|
|
223
223
|
let t2, t3;
|
|
224
224
|
$[4] !== hasListener || $[5] !== onEvent ? (t2 = () => {
|
|
@@ -236,9 +236,9 @@ function _temp$6() {
|
|
|
236
236
|
function useCustomValidity(ref, customValidity) {
|
|
237
237
|
const $ = reactCompilerRuntime.c(6);
|
|
238
238
|
let t0;
|
|
239
|
-
$[0] !==
|
|
239
|
+
$[0] !== customValidity || $[1] !== ref.current ? (t0 = () => {
|
|
240
240
|
ref.current?.setCustomValidity(customValidity || "");
|
|
241
|
-
}, $[0] =
|
|
241
|
+
}, $[0] = customValidity, $[1] = ref.current, $[2] = t0) : t0 = $[2];
|
|
242
242
|
let t1;
|
|
243
243
|
$[3] !== customValidity || $[4] !== ref ? (t1 = [customValidity, ref], $[3] = customValidity, $[4] = ref, $[5] = t1) : t1 = $[5], react.useEffect(t0, t1);
|
|
244
244
|
}
|
|
@@ -650,9 +650,9 @@ function ThemeProvider(props) {
|
|
|
650
650
|
return $[8] === Symbol.for("react.memo_cache_sentinel") ? (t22 = /* @__PURE__ */ jsxRuntime.jsx("pre", { children: 'ThemeProvider: no "theme" property provided' }), $[8] = t22) : t22 = $[8], t22;
|
|
651
651
|
}
|
|
652
652
|
let t2;
|
|
653
|
-
$[9] !==
|
|
653
|
+
$[9] !== children || $[10] !== theme$1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(styledComponents.ThemeProvider, { theme: theme$1, children }), $[9] = children, $[10] = theme$1, $[11] = t2) : t2 = $[11];
|
|
654
654
|
let t3;
|
|
655
|
-
return $[12] !==
|
|
655
|
+
return $[12] !== t2 || $[13] !== themeContext ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: themeContext, children: t2 }), $[12] = t2, $[13] = themeContext, $[14] = t3) : t3 = $[14], t3;
|
|
656
656
|
}
|
|
657
657
|
ThemeProvider.displayName = "ThemeProvider";
|
|
658
658
|
function useRootTheme() {
|
|
@@ -668,7 +668,7 @@ function ThemeColorProvider(props) {
|
|
|
668
668
|
tone
|
|
669
669
|
} = props, root = useRootTheme(), t0 = scheme || root.scheme;
|
|
670
670
|
let t1;
|
|
671
|
-
return $[0] !==
|
|
671
|
+
return $[0] !== children || $[1] !== root.theme || $[2] !== t0 || $[3] !== tone ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { scheme: t0, theme: root.theme, tone, children }), $[0] = children, $[1] = root.theme, $[2] = t0, $[3] = tone, $[4] = t1) : t1 = $[4], t1;
|
|
672
672
|
}
|
|
673
673
|
ThemeColorProvider.displayName = "ThemeColorProvider";
|
|
674
674
|
function useTheme() {
|
|
@@ -1461,7 +1461,7 @@ const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAl
|
|
|
1461
1461
|
overflow: clip;
|
|
1462
1462
|
`, Label = react.forwardRef(function(props, ref) {
|
|
1463
1463
|
const $ = reactCompilerRuntime.c(22);
|
|
1464
|
-
let
|
|
1464
|
+
let accent, align, childrenProp, restProps, t0, t1, textOverflow, weight;
|
|
1465
1465
|
$[0] !== props ? ({
|
|
1466
1466
|
accent,
|
|
1467
1467
|
align,
|
|
@@ -1471,7 +1471,7 @@ const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAl
|
|
|
1471
1471
|
textOverflow,
|
|
1472
1472
|
weight,
|
|
1473
1473
|
...restProps
|
|
1474
|
-
} = props, $[0] = props, $[1] =
|
|
1474
|
+
} = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = childrenProp, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = textOverflow, $[8] = weight) : (accent = $[1], align = $[2], childrenProp = $[3], restProps = $[4], t0 = $[5], t1 = $[6], textOverflow = $[7], weight = $[8]);
|
|
1475
1475
|
const muted = t0 === void 0 ? !1 : t0, size2 = t1 === void 0 ? 2 : t1;
|
|
1476
1476
|
let children = childrenProp;
|
|
1477
1477
|
if (textOverflow === "ellipsis") {
|
|
@@ -1483,7 +1483,7 @@ const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAl
|
|
|
1483
1483
|
}
|
|
1484
1484
|
const t2 = useArrayProp(align), t3 = useArrayProp(size2);
|
|
1485
1485
|
let t4;
|
|
1486
|
-
return $[13] !==
|
|
1486
|
+
return $[13] !== accent || $[14] !== children || $[15] !== muted || $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== weight ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Root$C, { "data-ui": "Label", ...restProps, $accent: accent, $align: t2, $muted: muted, $size: t3, $weight: weight, ref, children }), $[13] = accent, $[14] = children, $[15] = muted, $[16] = ref, $[17] = restProps, $[18] = t2, $[19] = t3, $[20] = weight, $[21] = t4) : t4 = $[21], t4;
|
|
1487
1487
|
});
|
|
1488
1488
|
Label.displayName = "ForwardRef(Label)";
|
|
1489
1489
|
const avatarStyle = {
|
|
@@ -1633,7 +1633,7 @@ const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyl
|
|
|
1633
1633
|
color: "inherit"
|
|
1634
1634
|
}), Image = styledComponents.styled.svg(avatarStyle.image), Avatar = react.forwardRef(function(props, ref) {
|
|
1635
1635
|
const $ = reactCompilerRuntime.c(53);
|
|
1636
|
-
let
|
|
1636
|
+
let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, restProps, src, t0, t1, t2, title;
|
|
1637
1637
|
$[0] !== props ? ({
|
|
1638
1638
|
__unstable_hideInnerStroke,
|
|
1639
1639
|
as: asProp,
|
|
@@ -1647,7 +1647,7 @@ const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyl
|
|
|
1647
1647
|
status: t1,
|
|
1648
1648
|
size: t2,
|
|
1649
1649
|
...restProps
|
|
1650
|
-
} = props, $[0] = props, $[1] =
|
|
1650
|
+
} = props, $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = initials, $[6] = onImageLoadError, $[7] = restProps, $[8] = src, $[9] = t0, $[10] = t1, $[11] = t2, $[12] = title) : (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6], restProps = $[7], src = $[8], t0 = $[9], t1 = $[10], t2 = $[11], title = $[12]);
|
|
1651
1651
|
const color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, {
|
|
1652
1652
|
avatar
|
|
1653
1653
|
} = useTheme_v2(), as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div", size2 = useArrayProp(sizeProp), _sizeRem = (avatar.sizes[size2[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = react.useId(), [arrowPosition, setArrowPosition] = react.useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = react.useState(!1), imageId = `avatar-image-${elementId}`;
|
|
@@ -1678,20 +1678,20 @@ const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyl
|
|
|
1678
1678
|
let t11;
|
|
1679
1679
|
$[25] !== color ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Arrow$1, { children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsxRuntime.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 }) }) }), $[25] = color, $[26] = t11) : t11 = $[26];
|
|
1680
1680
|
let t12;
|
|
1681
|
-
$[27] !==
|
|
1681
|
+
$[27] !== __unstable_hideInnerStroke || $[28] !== _radius || $[29] !== _sizeRem || $[30] !== handleImageError || $[31] !== imageFailed || $[32] !== imageId || $[33] !== src ? (t12 = !imageFailed && src && /* @__PURE__ */ jsxRuntime.jsxs(Image, { viewBox: `0 0 ${_sizeRem} ${_sizeRem}`, fill: "none", children: [
|
|
1682
1682
|
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("pattern", { id: imageId, patternContentUnits: "objectBoundingBox", width: "1", height: "1", children: /* @__PURE__ */ jsxRuntime.jsx("image", { href: src, width: "1", height: "1", onError: handleImageError }) }) }),
|
|
1683
1683
|
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: _radius, cy: _radius, r: _radius, fill: `url(#${imageId})` }),
|
|
1684
1684
|
!__unstable_hideInnerStroke && /* @__PURE__ */ jsxRuntime.jsx(BgStroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" }),
|
|
1685
1685
|
/* @__PURE__ */ jsxRuntime.jsx(Stroke, { cx: _radius, cy: _radius, rx: _radius, ry: _radius, vectorEffect: "non-scaling-stroke" })
|
|
1686
|
-
] }), $[27] =
|
|
1686
|
+
] }), $[27] = __unstable_hideInnerStroke, $[28] = _radius, $[29] = _sizeRem, $[30] = handleImageError, $[31] = imageFailed, $[32] = imageId, $[33] = src, $[34] = t12) : t12 = $[34];
|
|
1687
1687
|
let t13;
|
|
1688
|
-
$[35] !== imageFailed || $[36] !==
|
|
1688
|
+
$[35] !== imageFailed || $[36] !== initials || $[37] !== initialsSize || $[38] !== src ? (t13 = (imageFailed || !src) && initials && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(Initials, { children: /* @__PURE__ */ jsxRuntime.jsx(InitialsLabel, { forwardedAs: "span", size: initialsSize, weight: "medium", children: initials }) }) }), $[35] = imageFailed, $[36] = initials, $[37] = initialsSize, $[38] = src, $[39] = t13) : t13 = $[39];
|
|
1689
1689
|
let t14;
|
|
1690
|
-
return $[40] !==
|
|
1690
|
+
return $[40] !== arrowPosition || $[41] !== as || $[42] !== color || $[43] !== ref || $[44] !== restProps || $[45] !== size2 || $[46] !== status || $[47] !== t10 || $[48] !== t11 || $[49] !== t12 || $[50] !== t13 || $[51] !== title ? (t14 = /* @__PURE__ */ jsxRuntime.jsxs(Root$B, { 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: [
|
|
1691
1691
|
t11,
|
|
1692
1692
|
t12,
|
|
1693
1693
|
t13
|
|
1694
|
-
] }), $[40] =
|
|
1694
|
+
] }), $[40] = arrowPosition, $[41] = as, $[42] = color, $[43] = ref, $[44] = restProps, $[45] = size2, $[46] = status, $[47] = t10, $[48] = t11, $[49] = t12, $[50] = t13, $[51] = title, $[52] = t14) : t14 = $[52], t14;
|
|
1695
1695
|
});
|
|
1696
1696
|
Avatar.displayName = "ForwardRef(Avatar)";
|
|
1697
1697
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
@@ -1744,9 +1744,9 @@ const Root$A = styledComponents.styled.div(_responsiveAvatarCounterSizeStyle, _a
|
|
|
1744
1744
|
t1 = t2;
|
|
1745
1745
|
const fontSize2 = t1;
|
|
1746
1746
|
let t3;
|
|
1747
|
-
$[3] !==
|
|
1747
|
+
$[3] !== count || $[4] !== fontSize2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Label, { as: "span", size: fontSize2, weight: "medium", children: count }), $[3] = count, $[4] = fontSize2, $[5] = t3) : t3 = $[5];
|
|
1748
1748
|
let t4;
|
|
1749
|
-
return $[6] !==
|
|
1749
|
+
return $[6] !== ref || $[7] !== size2 || $[8] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Root$A, { $size: size2, "data-ui": "AvatarCounter", ref, children: t3 }), $[6] = ref, $[7] = size2, $[8] = t3, $[9] = t4) : t4 = $[9], t4;
|
|
1750
1750
|
});
|
|
1751
1751
|
AvatarCounter.displayName = "ForwardRef(AvatarCounter)";
|
|
1752
1752
|
const BASE_STYLES = styledComponents.css`
|
|
@@ -1779,13 +1779,13 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
1779
1779
|
}
|
|
1780
1780
|
const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = react.forwardRef(function(props, ref) {
|
|
1781
1781
|
const $ = reactCompilerRuntime.c(15);
|
|
1782
|
-
let
|
|
1782
|
+
let childrenProp, restProps, t0, t1;
|
|
1783
1783
|
$[0] !== props ? ({
|
|
1784
1784
|
children: childrenProp,
|
|
1785
1785
|
maxLength: t0,
|
|
1786
1786
|
size: t1,
|
|
1787
1787
|
...restProps
|
|
1788
|
-
} = props, $[0] = props, $[1] =
|
|
1788
|
+
} = props, $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1) : (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]);
|
|
1789
1789
|
const maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, children = react.Children.toArray(childrenProp).filter(react.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 = Root$z, t2 = "AvatarStack", t3 = len === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: len, size: size2 }) }), t4 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) });
|
|
1790
1790
|
let t5;
|
|
1791
1791
|
$[5] !== size2 ? (t5 = (child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: react.cloneElement(child, {
|
|
@@ -1793,16 +1793,16 @@ const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avata
|
|
|
1793
1793
|
}) }, String(childIndex)), $[5] = size2, $[6] = t5) : t5 = $[6];
|
|
1794
1794
|
const t6 = visibleChildren.map(t5);
|
|
1795
1795
|
let t7;
|
|
1796
|
-
return $[7] !== T0 || $[8] !==
|
|
1796
|
+
return $[7] !== T0 || $[8] !== ref || $[9] !== restProps || $[10] !== size2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs(T0, { "data-ui": t2, ...restProps, ref, $size: size2, children: [
|
|
1797
1797
|
t3,
|
|
1798
1798
|
t4,
|
|
1799
1799
|
t6
|
|
1800
|
-
] }), $[7] = T0, $[8] =
|
|
1800
|
+
] }), $[7] = T0, $[8] = ref, $[9] = restProps, $[10] = size2, $[11] = t3, $[12] = t4, $[13] = t6, $[14] = t7) : t7 = $[14], t7;
|
|
1801
1801
|
});
|
|
1802
1802
|
AvatarStack.displayName = "ForwardRef(AvatarStack)";
|
|
1803
1803
|
const Root$y = styledComponents.styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = react.forwardRef(function(props, ref) {
|
|
1804
1804
|
const $ = reactCompilerRuntime.c(59);
|
|
1805
|
-
let
|
|
1805
|
+
let column, columnEnd, columnStart, flex, height, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, overflow, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, restProps, row, rowEnd, rowStart, sizing, t0, t1, t2, t3;
|
|
1806
1806
|
$[0] !== props ? ({
|
|
1807
1807
|
as: t0,
|
|
1808
1808
|
column,
|
|
@@ -1831,10 +1831,10 @@ const Root$y = styledComponents.styled.div(boxStyle, flexItemStyle, responsiveBo
|
|
|
1831
1831
|
rowEnd,
|
|
1832
1832
|
sizing,
|
|
1833
1833
|
...restProps
|
|
1834
|
-
} = props, $[0] = props, $[1] =
|
|
1834
|
+
} = props, $[0] = props, $[1] = column, $[2] = columnEnd, $[3] = columnStart, $[4] = flex, $[5] = height, $[6] = marginBottom, $[7] = marginLeft, $[8] = marginRight, $[9] = marginTop, $[10] = marginX, $[11] = marginY, $[12] = overflow, $[13] = paddingBottom, $[14] = paddingLeft, $[15] = paddingRight, $[16] = paddingTop, $[17] = paddingX, $[18] = paddingY, $[19] = restProps, $[20] = row, $[21] = rowEnd, $[22] = rowStart, $[23] = sizing, $[24] = t0, $[25] = t1, $[26] = t2, $[27] = t3) : (column = $[1], columnEnd = $[2], columnStart = $[3], flex = $[4], height = $[5], marginBottom = $[6], marginLeft = $[7], marginRight = $[8], marginTop = $[9], marginX = $[10], marginY = $[11], overflow = $[12], paddingBottom = $[13], paddingLeft = $[14], paddingRight = $[15], paddingTop = $[16], paddingX = $[17], paddingY = $[18], restProps = $[19], row = $[20], rowEnd = $[21], rowStart = $[22], sizing = $[23], t0 = $[24], t1 = $[25], t2 = $[26], t3 = $[27]);
|
|
1835
1835
|
const asProp = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, t4 = typeof asProp == "string" ? asProp : void 0, t5 = useArrayProp(column), t6 = useArrayProp(columnStart), t7 = useArrayProp(columnEnd), t8 = useArrayProp(display), t9 = useArrayProp(flex), t10 = useArrayProp(height), t11 = useArrayProp(margin), t12 = useArrayProp(marginX), t13 = useArrayProp(marginY), t14 = useArrayProp(marginTop), t15 = useArrayProp(marginRight), t16 = useArrayProp(marginBottom), t17 = useArrayProp(marginLeft), t18 = useArrayProp(overflow), t19 = useArrayProp(padding), t20 = useArrayProp(paddingX), t21 = useArrayProp(paddingY), t22 = useArrayProp(paddingTop), t23 = useArrayProp(paddingRight), t24 = useArrayProp(paddingBottom), t25 = useArrayProp(paddingLeft), t26 = useArrayProp(row), t27 = useArrayProp(rowStart), t28 = useArrayProp(rowEnd), t29 = useArrayProp(sizing);
|
|
1836
1836
|
let t30;
|
|
1837
|
-
return $[28] !==
|
|
1837
|
+
return $[28] !== asProp || $[29] !== props.children || $[30] !== ref || $[31] !== restProps || $[32] !== t10 || $[33] !== t11 || $[34] !== t12 || $[35] !== t13 || $[36] !== t14 || $[37] !== t15 || $[38] !== t16 || $[39] !== t17 || $[40] !== t18 || $[41] !== t19 || $[42] !== t20 || $[43] !== t21 || $[44] !== t22 || $[45] !== t23 || $[46] !== t24 || $[47] !== t25 || $[48] !== t26 || $[49] !== t27 || $[50] !== t28 || $[51] !== t29 || $[52] !== t4 || $[53] !== t5 || $[54] !== t6 || $[55] !== t7 || $[56] !== t8 || $[57] !== t9 ? (t30 = /* @__PURE__ */ jsxRuntime.jsx(Root$y, { "data-as": t4, "data-ui": "Box", ...restProps, $column: t5, $columnStart: t6, $columnEnd: t7, $display: t8, $flex: t9, $height: t10, $margin: t11, $marginX: t12, $marginY: t13, $marginTop: t14, $marginRight: t15, $marginBottom: t16, $marginLeft: t17, $overflow: t18, $padding: t19, $paddingX: t20, $paddingY: t21, $paddingTop: t22, $paddingRight: t23, $paddingBottom: t24, $paddingLeft: t25, $row: t26, $rowStart: t27, $rowEnd: t28, $sizing: t29, as: asProp, ref, children: props.children }), $[28] = asProp, $[29] = props.children, $[30] = ref, $[31] = restProps, $[32] = t10, $[33] = t11, $[34] = t12, $[35] = t13, $[36] = t14, $[37] = t15, $[38] = t16, $[39] = t17, $[40] = t18, $[41] = t19, $[42] = t20, $[43] = t21, $[44] = t22, $[45] = t23, $[46] = t24, $[47] = t25, $[48] = t26, $[49] = t27, $[50] = t28, $[51] = t29, $[52] = t4, $[53] = t5, $[54] = t6, $[55] = t7, $[56] = t8, $[57] = t9, $[58] = t30) : t30 = $[58], t30;
|
|
1838
1838
|
});
|
|
1839
1839
|
Box.displayName = "ForwardRef(Box)";
|
|
1840
1840
|
function textBaseStyle(props) {
|
|
@@ -1913,7 +1913,7 @@ const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAli
|
|
|
1913
1913
|
overflow: clip;
|
|
1914
1914
|
`, Text = react.forwardRef(function(props, ref) {
|
|
1915
1915
|
const $ = reactCompilerRuntime.c(22);
|
|
1916
|
-
let
|
|
1916
|
+
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
1917
1917
|
$[0] !== props ? ({
|
|
1918
1918
|
accent: t0,
|
|
1919
1919
|
align,
|
|
@@ -1923,7 +1923,7 @@ const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAli
|
|
|
1923
1923
|
textOverflow,
|
|
1924
1924
|
weight,
|
|
1925
1925
|
...restProps
|
|
1926
|
-
} = props, $[0] = props, $[1] =
|
|
1926
|
+
} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight) : (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]);
|
|
1927
1927
|
const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
1928
1928
|
let children = childrenProp;
|
|
1929
1929
|
if (textOverflow === "ellipsis") {
|
|
@@ -1934,7 +1934,7 @@ const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAli
|
|
|
1934
1934
|
let t5;
|
|
1935
1935
|
$[11] !== children ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
|
|
1936
1936
|
let t6;
|
|
1937
|
-
return $[13] !==
|
|
1937
|
+
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$x, { "data-ui": "Text", ...restProps, $accent: accent, $align: t3, $muted: muted, ref, $size: t4, $weight: weight, children: t5 }), $[13] = accent, $[14] = muted, $[15] = ref, $[16] = restProps, $[17] = t3, $[18] = t4, $[19] = t5, $[20] = weight, $[21] = t6) : t6 = $[21], t6;
|
|
1938
1938
|
});
|
|
1939
1939
|
Text.displayName = "ForwardRef(Text)";
|
|
1940
1940
|
function badgeStyle(props) {
|
|
@@ -1954,7 +1954,7 @@ function badgeStyle(props) {
|
|
|
1954
1954
|
}
|
|
1955
1955
|
const Root$w = styledComponents.styled(Box)(responsiveRadiusStyle, badgeStyle), Badge = react.forwardRef(function(props, ref) {
|
|
1956
1956
|
const $ = reactCompilerRuntime.c(17);
|
|
1957
|
-
let t0, t1, t2, t3
|
|
1957
|
+
let children, restProps, t0, t1, t2, t3;
|
|
1958
1958
|
if ($[0] !== props) {
|
|
1959
1959
|
const {
|
|
1960
1960
|
children: t42,
|
|
@@ -1965,19 +1965,19 @@ const Root$w = styledComponents.styled(Box)(responsiveRadiusStyle, badgeStyle),
|
|
|
1965
1965
|
tone: t8,
|
|
1966
1966
|
...t9
|
|
1967
1967
|
} = props;
|
|
1968
|
-
children = t42, t0 = t52, t1 = t62, t2 = t72, t3 = t8, restProps = t9, $[0] = props, $[1] =
|
|
1968
|
+
children = t42, t0 = t52, t1 = t62, t2 = t72, t3 = t8, restProps = t9, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2, $[6] = t3;
|
|
1969
1969
|
} else
|
|
1970
|
-
|
|
1970
|
+
children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5], t3 = $[6];
|
|
1971
1971
|
const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? "full" : t2, tone = t3 === void 0 ? "default" : t3, t4 = useArrayProp(radius), t5 = useArrayProp(padding);
|
|
1972
1972
|
let t6;
|
|
1973
|
-
$[7] !==
|
|
1973
|
+
$[7] !== children || $[8] !== fontSize2 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children }), $[7] = children, $[8] = fontSize2, $[9] = t6) : t6 = $[9];
|
|
1974
1974
|
let t7;
|
|
1975
|
-
return $[10] !==
|
|
1975
|
+
return $[10] !== ref || $[11] !== restProps || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== tone ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Root$w, { "data-ui": "Badge", ...restProps, $tone: tone, $radius: t4, padding: t5, ref, children: t6 }), $[10] = ref, $[11] = restProps, $[12] = t4, $[13] = t5, $[14] = t6, $[15] = tone, $[16] = t7) : t7 = $[16], t7;
|
|
1976
1976
|
});
|
|
1977
1977
|
Badge.displayName = "ForwardRef(Badge)";
|
|
1978
1978
|
const Root$v = styledComponents.styled(Box)(flexItemStyle, responsiveFlexStyle), Flex = react.forwardRef(function(props, ref) {
|
|
1979
1979
|
const $ = reactCompilerRuntime.c(17);
|
|
1980
|
-
let
|
|
1980
|
+
let align, as, gap, justify, restProps, t0, wrap;
|
|
1981
1981
|
$[0] !== props ? ({
|
|
1982
1982
|
align,
|
|
1983
1983
|
as,
|
|
@@ -1986,10 +1986,10 @@ const Root$v = styledComponents.styled(Box)(flexItemStyle, responsiveFlexStyle),
|
|
|
1986
1986
|
justify,
|
|
1987
1987
|
wrap,
|
|
1988
1988
|
...restProps
|
|
1989
|
-
} = props, $[0] = props, $[1] =
|
|
1989
|
+
} = props, $[0] = props, $[1] = align, $[2] = as, $[3] = gap, $[4] = justify, $[5] = restProps, $[6] = t0, $[7] = wrap) : (align = $[1], as = $[2], gap = $[3], justify = $[4], restProps = $[5], t0 = $[6], wrap = $[7]);
|
|
1990
1990
|
const direction = t0 === void 0 ? "row" : t0, t1 = useArrayProp(align), t2 = useArrayProp(direction), t3 = useArrayProp(gap), t4 = useArrayProp(justify), t5 = useArrayProp(wrap);
|
|
1991
1991
|
let t6;
|
|
1992
|
-
return $[8] !==
|
|
1992
|
+
return $[8] !== as || $[9] !== ref || $[10] !== restProps || $[11] !== t1 || $[12] !== t2 || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$v, { "data-ui": "Flex", ...restProps, $align: t1, $direction: t2, $gap: t3, $justify: t4, $wrap: t5, forwardedAs: as, ref }), $[8] = as, $[9] = ref, $[10] = restProps, $[11] = t1, $[12] = t2, $[13] = t3, $[14] = t4, $[15] = t5, $[16] = t6) : t6 = $[16], t6;
|
|
1993
1993
|
});
|
|
1994
1994
|
Flex.displayName = "ForwardRef(Flex)";
|
|
1995
1995
|
const rotate$1 = styledComponents.keyframes`
|
|
@@ -2187,7 +2187,7 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2187
2187
|
box-shadow: inherit;
|
|
2188
2188
|
`, Button = react.forwardRef(function(props, ref) {
|
|
2189
2189
|
const $ = reactCompilerRuntime.c(64);
|
|
2190
|
-
let
|
|
2190
|
+
let IconComponent, IconRightComponent, children, disabled, loading, paddingBottomProp, paddingLeftProp, paddingRightProp, paddingTopProp, paddingXProp, paddingYProp, restProps, selected, t0, t1, t2, t3, t4, t5, t6, t7, t8, text, textAlign, width;
|
|
2191
2191
|
$[0] !== props ? ({
|
|
2192
2192
|
children,
|
|
2193
2193
|
disabled,
|
|
@@ -2214,12 +2214,12 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2214
2214
|
muted: t8,
|
|
2215
2215
|
width,
|
|
2216
2216
|
...restProps
|
|
2217
|
-
} = props, $[0] = props, $[1] =
|
|
2217
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[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] = width) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], loading = $[5], paddingBottomProp = $[6], paddingLeftProp = $[7], paddingRightProp = $[8], paddingTopProp = $[9], paddingXProp = $[10], paddingYProp = $[11], restProps = $[12], selected = $[13], t0 = $[14], t1 = $[15], t2 = $[16], t3 = $[17], t4 = $[18], t5 = $[19], t6 = $[20], t7 = $[21], t8 = $[22], text = $[23], textAlign = $[24], width = $[25]);
|
|
2218
2218
|
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, {
|
|
2219
2219
|
button
|
|
2220
2220
|
} = 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);
|
|
2221
2221
|
let t9, t10;
|
|
2222
|
-
$[26] !== padding || $[27] !==
|
|
2222
|
+
$[26] !== padding || $[27] !== paddingBottom || $[28] !== paddingLeft || $[29] !== paddingRight || $[30] !== paddingTop || $[31] !== paddingX || $[32] !== paddingY ? (t10 = {
|
|
2223
2223
|
padding,
|
|
2224
2224
|
paddingX,
|
|
2225
2225
|
paddingY,
|
|
@@ -2227,12 +2227,12 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2227
2227
|
paddingBottom,
|
|
2228
2228
|
paddingLeft,
|
|
2229
2229
|
paddingRight
|
|
2230
|
-
}, $[26] = padding, $[27] =
|
|
2230
|
+
}, $[26] = padding, $[27] = paddingBottom, $[28] = paddingLeft, $[29] = paddingRight, $[30] = paddingTop, $[31] = paddingX, $[32] = paddingY, $[33] = t10) : t10 = $[33], t9 = t10;
|
|
2231
2231
|
const boxProps = t9, t11 = !!(loading || disabled), t12 = selected ? "" : void 0, t13 = !!(loading || disabled);
|
|
2232
2232
|
let t14;
|
|
2233
2233
|
$[34] !== loading ? (t14 = !!loading && /* @__PURE__ */ jsxRuntime.jsx(LoadingBox, { children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) }), $[34] = loading, $[35] = t14) : t14 = $[35];
|
|
2234
2234
|
let t15;
|
|
2235
|
-
$[36] !== IconComponent || $[37] !==
|
|
2235
|
+
$[36] !== IconComponent || $[37] !== IconRightComponent || $[38] !== boxProps || $[39] !== button || $[40] !== fontSize2 || $[41] !== justify || $[42] !== muted || $[43] !== space || $[44] !== text || $[45] !== textAlign ? (t15 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", justify, gap: space, children: [
|
|
2236
2236
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
2237
2237
|
react.isValidElement(IconComponent) && IconComponent,
|
|
2238
2238
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
@@ -2242,15 +2242,15 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2242
2242
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
2243
2243
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
2244
2244
|
] })
|
|
2245
|
-
] }) }), $[36] = IconComponent, $[37] =
|
|
2245
|
+
] }) }), $[36] = IconComponent, $[37] = IconRightComponent, $[38] = boxProps, $[39] = button, $[40] = fontSize2, $[41] = justify, $[42] = muted, $[43] = space, $[44] = text, $[45] = textAlign, $[46] = t15) : t15 = $[46];
|
|
2246
2246
|
let t16;
|
|
2247
|
-
$[47] !==
|
|
2247
|
+
$[47] !== boxProps || $[48] !== children ? (t16 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children }), $[47] = boxProps, $[48] = children, $[49] = t16) : t16 = $[49];
|
|
2248
2248
|
let t17;
|
|
2249
|
-
return $[50] !==
|
|
2249
|
+
return $[50] !== mode || $[51] !== radius || $[52] !== ref || $[53] !== restProps || $[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== t14 || $[58] !== t15 || $[59] !== t16 || $[60] !== tone || $[61] !== type || $[62] !== width ? (t17 = /* @__PURE__ */ jsxRuntime.jsxs(Root$t, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": t11, "data-selected": t12, disabled: t13, ref, type, $width: width, children: [
|
|
2250
2250
|
t14,
|
|
2251
2251
|
t15,
|
|
2252
2252
|
t16
|
|
2253
|
-
] }), $[50] =
|
|
2253
|
+
] }), $[50] = mode, $[51] = radius, $[52] = ref, $[53] = restProps, $[54] = t11, $[55] = t12, $[56] = t13, $[57] = t14, $[58] = t15, $[59] = t16, $[60] = tone, $[61] = type, $[62] = width, $[63] = t17) : t17 = $[63], t17;
|
|
2254
2254
|
});
|
|
2255
2255
|
Button.displayName = "ForwardRef(Button)";
|
|
2256
2256
|
function cardStyle(props) {
|
|
@@ -2403,7 +2403,7 @@ function cardColorStyle(props) {
|
|
|
2403
2403
|
}
|
|
2404
2404
|
const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = react.forwardRef(function(props, ref) {
|
|
2405
2405
|
const $ = reactCompilerRuntime.c(42);
|
|
2406
|
-
let
|
|
2406
|
+
let asProp, border2, borderBottom2, borderLeft2, borderRight2, borderTop2, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;
|
|
2407
2407
|
$[0] !== props ? ({
|
|
2408
2408
|
__unstable_checkered: t0,
|
|
2409
2409
|
__unstable_focusRing: t1,
|
|
@@ -2421,12 +2421,12 @@ const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRad
|
|
|
2421
2421
|
shadow,
|
|
2422
2422
|
tone: t3,
|
|
2423
2423
|
...restProps
|
|
2424
|
-
} = props, $[0] = props, $[1] =
|
|
2424
|
+
} = props, $[0] = props, $[1] = asProp, $[2] = border2, $[3] = borderBottom2, $[4] = borderLeft2, $[5] = borderRight2, $[6] = borderTop2, $[7] = muted, $[8] = pressed, $[9] = restProps, $[10] = scheme, $[11] = selected, $[12] = shadow, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3) : (asProp = $[1], border2 = $[2], borderBottom2 = $[3], borderLeft2 = $[4], borderRight2 = $[5], borderTop2 = $[6], muted = $[7], pressed = $[8], restProps = $[9], scheme = $[10], selected = $[11], shadow = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16]);
|
|
2425
2425
|
const checkered = t0 === void 0 ? !1 : t0, focusRing = t1 === void 0 ? !1 : t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = ReactIs.isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp, t4 = typeof as == "string" ? as : void 0, t5 = rootTheme.scheme, t6 = useArrayProp(border2), t7 = useArrayProp(borderTop2), t8 = useArrayProp(borderRight2), t9 = useArrayProp(borderBottom2), t10 = useArrayProp(borderLeft2), t11 = useArrayProp(radius), t12 = useArrayProp(shadow), t13 = checkered ? "" : void 0, t14 = pressed ? "" : void 0, t15 = selected ? "" : void 0;
|
|
2426
2426
|
let t16;
|
|
2427
|
-
$[17] !==
|
|
2427
|
+
$[17] !== as || $[18] !== checkered || $[19] !== focusRing || $[20] !== muted || $[21] !== ref || $[22] !== restProps || $[23] !== rootTheme.scheme || $[24] !== selected || $[25] !== t10 || $[26] !== t11 || $[27] !== t12 || $[28] !== t13 || $[29] !== t14 || $[30] !== t15 || $[31] !== t4 || $[32] !== t6 || $[33] !== t7 || $[34] !== t8 || $[35] !== t9 || $[36] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Root$s, { "data-as": t4, "data-scheme": t5, "data-ui": "Card", "data-tone": tone, ...restProps, $border: t6, $borderTop: t7, $borderRight: t8, $borderBottom: t9, $borderLeft: t10, $checkered: checkered, $focusRing: focusRing, $muted: muted, $radius: t11, $shadow: t12, $tone: tone, "data-checkered": t13, "data-pressed": t14, "data-selected": t15, forwardedAs: as, ref, selected }), $[17] = as, $[18] = checkered, $[19] = focusRing, $[20] = muted, $[21] = ref, $[22] = restProps, $[23] = rootTheme.scheme, $[24] = selected, $[25] = t10, $[26] = t11, $[27] = t12, $[28] = t13, $[29] = t14, $[30] = t15, $[31] = t4, $[32] = t6, $[33] = t7, $[34] = t8, $[35] = t9, $[36] = tone, $[37] = t16) : t16 = $[37];
|
|
2428
2428
|
let t17;
|
|
2429
|
-
return $[38] !== scheme || $[39] !==
|
|
2429
|
+
return $[38] !== scheme || $[39] !== t16 || $[40] !== tone ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(ThemeColorProvider, { scheme, tone, children: t16 }), $[38] = scheme, $[39] = t16, $[40] = tone, $[41] = t17) : t17 = $[41], t17;
|
|
2430
2430
|
});
|
|
2431
2431
|
Card.displayName = "ForwardRef(Card)";
|
|
2432
2432
|
function checkboxBaseStyles() {
|
|
@@ -2569,7 +2569,7 @@ function inputElementStyles(props) {
|
|
|
2569
2569
|
}
|
|
2570
2570
|
const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styledComponents.styled.input(inputElementStyles), Checkbox = react.forwardRef(function(props, forwardedRef) {
|
|
2571
2571
|
const $ = reactCompilerRuntime.c(25);
|
|
2572
|
-
let
|
|
2572
|
+
let checked, className, customValidity, disabled, indeterminate, readOnly, restProps, style;
|
|
2573
2573
|
$[0] !== props ? ({
|
|
2574
2574
|
checked,
|
|
2575
2575
|
className,
|
|
@@ -2579,7 +2579,7 @@ const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styled
|
|
|
2579
2579
|
readOnly,
|
|
2580
2580
|
style,
|
|
2581
2581
|
...restProps
|
|
2582
|
-
} = props, $[0] = props, $[1] =
|
|
2582
|
+
} = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = customValidity, $[4] = disabled, $[5] = indeterminate, $[6] = readOnly, $[7] = restProps, $[8] = style) : (checked = $[1], className = $[2], customValidity = $[3], disabled = $[4], indeterminate = $[5], readOnly = $[6], restProps = $[7], style = $[8]);
|
|
2583
2583
|
const ref = react.useRef(null);
|
|
2584
2584
|
let t0;
|
|
2585
2585
|
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[9] = t0) : t0 = $[9], react.useImperativeHandle(forwardedRef, t0);
|
|
@@ -2589,7 +2589,7 @@ const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styled
|
|
|
2589
2589
|
}, t2 = [indeterminate], $[10] = indeterminate, $[11] = t1, $[12] = t2) : (t1 = $[11], t2 = $[12]), react.useEffect(t1, t2), useCustomValidity(ref, customValidity);
|
|
2590
2590
|
const t3 = !disabled && readOnly ? "" : void 0, t4 = customValidity ? "" : void 0, t5 = disabled || readOnly;
|
|
2591
2591
|
let t6;
|
|
2592
|
-
$[13] !==
|
|
2592
|
+
$[13] !== checked || $[14] !== readOnly || $[15] !== restProps || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Input$5, { "data-read-only": t3, "data-error": t4, ...restProps, checked, disabled: t5, type: "checkbox", readOnly, ref }), $[13] = checked, $[14] = readOnly, $[15] = restProps, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6) : t6 = $[19];
|
|
2593
2593
|
let t7;
|
|
2594
2594
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2595
2595
|
/* @__PURE__ */ jsxRuntime.jsx(icons.CheckmarkIcon, {}),
|
|
@@ -2752,27 +2752,27 @@ function codeBaseStyle() {
|
|
|
2752
2752
|
}
|
|
2753
2753
|
const Root$q = styledComponents.styled.pre(codeBaseStyle, responsiveCodeFontStyle), Code = react.forwardRef(function(props, ref) {
|
|
2754
2754
|
const $ = reactCompilerRuntime.c(23);
|
|
2755
|
-
let
|
|
2755
|
+
let children, languageProp, restProps, t0, weight;
|
|
2756
2756
|
$[0] !== props ? ({
|
|
2757
2757
|
children,
|
|
2758
2758
|
language: languageProp,
|
|
2759
2759
|
size: t0,
|
|
2760
2760
|
weight,
|
|
2761
2761
|
...restProps
|
|
2762
|
-
} = props, $[0] = props, $[1] =
|
|
2762
|
+
} = props, $[0] = props, $[1] = children, $[2] = languageProp, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], languageProp = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
|
|
2763
2763
|
const size2 = t0 === void 0 ? 2 : t0, language = typeof languageProp == "string" ? languageProp : void 0;
|
|
2764
2764
|
let t1;
|
|
2765
2765
|
$[6] !== language ? (t1 = language ? Refractor__default.default.hasLanguage(language) : !1, $[6] = language, $[7] = t1) : t1 = $[7];
|
|
2766
2766
|
const registered = t1, t2 = useArrayProp(size2);
|
|
2767
2767
|
let t3;
|
|
2768
|
-
$[8] !==
|
|
2768
|
+
$[8] !== children || $[9] !== language || $[10] !== registered ? (t3 = !(language && registered) && /* @__PURE__ */ jsxRuntime.jsx("code", { children }), $[8] = children, $[9] = language, $[10] = registered, $[11] = t3) : t3 = $[11];
|
|
2769
2769
|
let t4;
|
|
2770
|
-
$[12] !==
|
|
2770
|
+
$[12] !== children || $[13] !== language || $[14] !== registered ? (t4 = language && registered && /* @__PURE__ */ jsxRuntime.jsx(Refractor__default.default, { inline: !0, language, value: String(children) }), $[12] = children, $[13] = language, $[14] = registered, $[15] = t4) : t4 = $[15];
|
|
2771
2771
|
let t5;
|
|
2772
|
-
return $[16] !==
|
|
2772
|
+
return $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== weight ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(Root$q, { "data-ui": "Code", ...restProps, $size: t2, $weight: weight, ref, children: [
|
|
2773
2773
|
t3,
|
|
2774
2774
|
t4
|
|
2775
|
-
] }), $[16] =
|
|
2775
|
+
] }), $[16] = ref, $[17] = restProps, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = weight, $[22] = t5) : t5 = $[22], t5;
|
|
2776
2776
|
});
|
|
2777
2777
|
Code.displayName = "ForwardRef(Code)";
|
|
2778
2778
|
const BASE_STYLE$1 = {
|
|
@@ -2793,20 +2793,20 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2793
2793
|
}
|
|
2794
2794
|
const Root$p = styledComponents.styled(Box)(containerBaseStyle, responsiveContainerWidthStyle), Container = react.forwardRef(function(props, ref) {
|
|
2795
2795
|
const $ = reactCompilerRuntime.c(9);
|
|
2796
|
-
let
|
|
2796
|
+
let as, restProps, t0;
|
|
2797
2797
|
$[0] !== props ? ({
|
|
2798
2798
|
as,
|
|
2799
2799
|
width: t0,
|
|
2800
2800
|
...restProps
|
|
2801
|
-
} = props, $[0] = props, $[1] =
|
|
2801
|
+
} = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
|
|
2802
2802
|
const t1 = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
2803
2803
|
let t2;
|
|
2804
|
-
return $[4] !==
|
|
2804
|
+
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Root$p, { "data-ui": "Container", ...restProps, $width: t1, forwardedAs: as, ref }), $[4] = as, $[5] = ref, $[6] = restProps, $[7] = t1, $[8] = t2) : t2 = $[8], t2;
|
|
2805
2805
|
});
|
|
2806
2806
|
Container.displayName = "ForwardRef(Container)";
|
|
2807
2807
|
const Root$o = styledComponents.styled(Box)(responsiveGridStyle), Grid = react.forwardRef(function(props, ref) {
|
|
2808
2808
|
const $ = reactCompilerRuntime.c(26);
|
|
2809
|
-
let as,
|
|
2809
|
+
let as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, restProps, rows;
|
|
2810
2810
|
$[0] !== props ? ({
|
|
2811
2811
|
as,
|
|
2812
2812
|
autoRows,
|
|
@@ -2819,10 +2819,10 @@ const Root$o = styledComponents.styled(Box)(responsiveGridStyle), Grid = react.f
|
|
|
2819
2819
|
rows,
|
|
2820
2820
|
children,
|
|
2821
2821
|
...restProps
|
|
2822
|
-
} = props, $[0] = props, $[1] = as, $[2] =
|
|
2822
|
+
} = props, $[0] = props, $[1] = as, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = children, $[6] = columns, $[7] = gap, $[8] = gapX, $[9] = gapY, $[10] = restProps, $[11] = rows) : (as = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], children = $[5], columns = $[6], gap = $[7], gapX = $[8], gapY = $[9], restProps = $[10], rows = $[11]);
|
|
2823
2823
|
const t0 = typeof as == "string" ? as : void 0, t1 = useArrayProp(autoRows), t2 = useArrayProp(autoCols), t3 = useArrayProp(autoFlow), t4 = useArrayProp(columns), t5 = useArrayProp(gap), t6 = useArrayProp(gapX), t7 = useArrayProp(gapY), t8 = useArrayProp(rows);
|
|
2824
2824
|
let t9;
|
|
2825
|
-
return $[12] !==
|
|
2825
|
+
return $[12] !== as || $[13] !== children || $[14] !== ref || $[15] !== restProps || $[16] !== t0 || $[17] !== t1 || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Root$o, { "data-as": t0, "data-ui": "Grid", ...restProps, $autoRows: t1, $autoCols: t2, $autoFlow: t3, $columns: t4, $gap: t5, $gapX: t6, $gapY: t7, $rows: t8, forwardedAs: as, ref, children }), $[12] = as, $[13] = children, $[14] = ref, $[15] = restProps, $[16] = t0, $[17] = t1, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = t6, $[23] = t7, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
|
|
2826
2826
|
});
|
|
2827
2827
|
Grid.displayName = "ForwardRef(Grid)";
|
|
2828
2828
|
function headingBaseStyle(props) {
|
|
@@ -2892,7 +2892,7 @@ const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlign
|
|
|
2892
2892
|
overflow: clip;
|
|
2893
2893
|
`, Heading = react.forwardRef(function(props, ref) {
|
|
2894
2894
|
const $ = reactCompilerRuntime.c(22);
|
|
2895
|
-
let
|
|
2895
|
+
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
2896
2896
|
$[0] !== props ? ({
|
|
2897
2897
|
accent: t0,
|
|
2898
2898
|
align,
|
|
@@ -2902,7 +2902,7 @@ const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlign
|
|
|
2902
2902
|
textOverflow,
|
|
2903
2903
|
weight,
|
|
2904
2904
|
...restProps
|
|
2905
|
-
} = props, $[0] = props, $[1] =
|
|
2905
|
+
} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = textOverflow, $[8] = weight) : (align = $[1], childrenProp = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], textOverflow = $[7], weight = $[8]);
|
|
2906
2906
|
const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
2907
2907
|
let children = childrenProp;
|
|
2908
2908
|
if (textOverflow === "ellipsis") {
|
|
@@ -2913,7 +2913,7 @@ const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlign
|
|
|
2913
2913
|
let t5;
|
|
2914
2914
|
$[11] !== children ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
|
|
2915
2915
|
let t6;
|
|
2916
|
-
return $[13] !==
|
|
2916
|
+
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$n, { "data-ui": "Heading", ...restProps, $accent: accent, $align: t3, $muted: muted, $size: t4, $weight: weight, ref, children: t5 }), $[13] = accent, $[14] = muted, $[15] = ref, $[16] = restProps, $[17] = t3, $[18] = t4, $[19] = t5, $[20] = weight, $[21] = t6) : t6 = $[21], t6;
|
|
2917
2917
|
});
|
|
2918
2918
|
Heading.displayName = "ForwardRef(Heading)";
|
|
2919
2919
|
function inlineBaseStyle() {
|
|
@@ -2945,13 +2945,13 @@ function inlineSpaceStyle(props) {
|
|
|
2945
2945
|
}
|
|
2946
2946
|
const Root$m = styledComponents.styled(Box)(inlineBaseStyle, inlineSpaceStyle), Inline = react.forwardRef(function(props, ref) {
|
|
2947
2947
|
const $ = reactCompilerRuntime.c(13);
|
|
2948
|
-
let
|
|
2948
|
+
let as, childrenProp, restProps, space;
|
|
2949
2949
|
$[0] !== props ? ({
|
|
2950
2950
|
as,
|
|
2951
2951
|
children: childrenProp,
|
|
2952
2952
|
space,
|
|
2953
2953
|
...restProps
|
|
2954
|
-
} = props, $[0] = props, $[1] =
|
|
2954
|
+
} = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = restProps, $[4] = space) : (as = $[1], childrenProp = $[2], restProps = $[3], space = $[4]);
|
|
2955
2955
|
let t0, t1;
|
|
2956
2956
|
if ($[5] !== childrenProp) {
|
|
2957
2957
|
let t22;
|
|
@@ -2961,7 +2961,7 @@ const Root$m = styledComponents.styled(Box)(inlineBaseStyle, inlineSpaceStyle),
|
|
|
2961
2961
|
t0 = t1;
|
|
2962
2962
|
const children = t0, t2 = useArrayProp(space);
|
|
2963
2963
|
let t3;
|
|
2964
|
-
return $[8] !==
|
|
2964
|
+
return $[8] !== as || $[9] !== children || $[10] !== restProps || $[11] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Root$m, { "data-ui": "Inline", ...restProps, $space: t2, forwardedAs: as, ref, children }), $[8] = as, $[9] = children, $[10] = restProps, $[11] = t2, $[12] = t3) : t3 = $[12], t3;
|
|
2965
2965
|
});
|
|
2966
2966
|
Inline.displayName = "ForwardRef(Inline)";
|
|
2967
2967
|
function kbdStyle() {
|
|
@@ -2983,21 +2983,21 @@ function kbdStyle() {
|
|
|
2983
2983
|
}
|
|
2984
2984
|
const Root$l = styledComponents.styled.kbd(responsiveRadiusStyle, kbdStyle), KBD = react.forwardRef(function(props, ref) {
|
|
2985
2985
|
const $ = reactCompilerRuntime.c(17);
|
|
2986
|
-
let
|
|
2986
|
+
let children, restProps, t0, t1, t2;
|
|
2987
2987
|
$[0] !== props ? ({
|
|
2988
2988
|
children,
|
|
2989
2989
|
fontSize: t0,
|
|
2990
2990
|
padding: t1,
|
|
2991
2991
|
radius: t2,
|
|
2992
2992
|
...restProps
|
|
2993
|
-
} = props, $[0] = props, $[1] =
|
|
2993
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2) : (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]);
|
|
2994
2994
|
const fontSize2 = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, t3 = useArrayProp(t2 === void 0 ? 2 : t2);
|
|
2995
2995
|
let t4;
|
|
2996
|
-
$[6] !==
|
|
2996
|
+
$[6] !== children || $[7] !== fontSize2 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }), $[6] = children, $[7] = fontSize2, $[8] = t4) : t4 = $[8];
|
|
2997
2997
|
let t5;
|
|
2998
2998
|
$[9] !== padding || $[10] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, children: t4 }), $[9] = padding, $[10] = t4, $[11] = t5) : t5 = $[11];
|
|
2999
2999
|
let t6;
|
|
3000
|
-
return $[12] !==
|
|
3000
|
+
return $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$l, { "data-ui": "KBD", ...restProps, $radius: t3, ref, children: t5 }), $[12] = ref, $[13] = restProps, $[14] = t3, $[15] = t5, $[16] = t6) : t6 = $[16], t6;
|
|
3001
3001
|
});
|
|
3002
3002
|
KBD.displayName = "ForwardRef(KBD)";
|
|
3003
3003
|
const origin = {
|
|
@@ -3121,13 +3121,13 @@ const Root$k = styledComponents.styled.div(({
|
|
|
3121
3121
|
fill: var(--card-bg-color);
|
|
3122
3122
|
`, Arrow = react.forwardRef(function(props, ref) {
|
|
3123
3123
|
const $ = reactCompilerRuntime.c(24);
|
|
3124
|
-
let
|
|
3124
|
+
let h, restProps, t0, w;
|
|
3125
3125
|
$[0] !== props ? ({
|
|
3126
3126
|
width: w,
|
|
3127
3127
|
height: h,
|
|
3128
3128
|
radius: t0,
|
|
3129
3129
|
...restProps
|
|
3130
|
-
} = props, $[0] = props, $[1] =
|
|
3130
|
+
} = props, $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w) : (h = $[1], restProps = $[2], t0 = $[3], w = $[4]);
|
|
3131
3131
|
const radius = t0 === void 0 ? 0 : t0, {
|
|
3132
3132
|
card
|
|
3133
3133
|
} = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, points = [{
|
|
@@ -3157,13 +3157,13 @@ const Root$k = styledComponents.styled.div(({
|
|
|
3157
3157
|
let t5;
|
|
3158
3158
|
$[11] !== fillPath ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(ShapePath, { d: fillPath }), $[11] = fillPath, $[12] = t5) : t5 = $[12];
|
|
3159
3159
|
let t6;
|
|
3160
|
-
$[13] !==
|
|
3160
|
+
$[13] !== t1 || $[14] !== t2 || $[15] !== t4 || $[16] !== t5 || $[17] !== w ? (t6 = /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: w, height: w, viewBox: t1, children: [
|
|
3161
3161
|
t2,
|
|
3162
3162
|
t4,
|
|
3163
3163
|
t5
|
|
3164
|
-
] }), $[13] =
|
|
3164
|
+
] }), $[13] = t1, $[14] = t2, $[15] = t4, $[16] = t5, $[17] = w, $[18] = t6) : t6 = $[18];
|
|
3165
3165
|
let t7;
|
|
3166
|
-
return $[19] !==
|
|
3166
|
+
return $[19] !== ref || $[20] !== restProps || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Root$k, { ...restProps, $w: w, ref, children: t6 }), $[19] = ref, $[20] = restProps, $[21] = t6, $[22] = w, $[23] = t7) : t7 = $[23], t7;
|
|
3167
3167
|
});
|
|
3168
3168
|
Arrow.displayName = "ForwardRef(Arrow)";
|
|
3169
3169
|
const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null);
|
|
@@ -3179,7 +3179,7 @@ function BoundaryElementProvider(props) {
|
|
|
3179
3179
|
}, $[0] = element, $[1] = t1) : t1 = $[1], t0 = t1;
|
|
3180
3180
|
const value = t0;
|
|
3181
3181
|
let t2;
|
|
3182
|
-
return $[2] !==
|
|
3182
|
+
return $[2] !== children || $[3] !== value ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t2) : t2 = $[4], t2;
|
|
3183
3183
|
}
|
|
3184
3184
|
BoundaryElementProvider.displayName = "BoundaryElementProvider";
|
|
3185
3185
|
function isRecord(value) {
|
|
@@ -3217,12 +3217,12 @@ function findMinBreakpoints(media, width) {
|
|
|
3217
3217
|
}
|
|
3218
3218
|
const ElementQuery = react.forwardRef(function(props, forwardedRef) {
|
|
3219
3219
|
const $ = reactCompilerRuntime.c(18), theme2 = useTheme_v2();
|
|
3220
|
-
let _media,
|
|
3220
|
+
let _media, children, restProps;
|
|
3221
3221
|
$[0] !== props ? ({
|
|
3222
3222
|
children,
|
|
3223
3223
|
media: _media,
|
|
3224
3224
|
...restProps
|
|
3225
|
-
} = props, $[0] = props, $[1] = _media, $[2] =
|
|
3225
|
+
} = props, $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
|
|
3226
3226
|
const media = _media ?? theme2.media, [element, setElement] = react.useState(null), elementSize = useElementSize(element);
|
|
3227
3227
|
let t0;
|
|
3228
3228
|
t0 = elementSize?.border.width ?? window.innerWidth;
|
|
@@ -3246,7 +3246,7 @@ const ElementQuery = react.forwardRef(function(props, forwardedRef) {
|
|
|
3246
3246
|
let t5, t6;
|
|
3247
3247
|
$[10] !== element ? (t5 = () => element, t6 = [element], $[10] = element, $[11] = t5, $[12] = t6) : (t5 = $[11], t6 = $[12]), react.useImperativeHandle(forwardedRef, t5, t6);
|
|
3248
3248
|
let t7;
|
|
3249
|
-
return $[13] !==
|
|
3249
|
+
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t7 = /* @__PURE__ */ jsxRuntime.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;
|
|
3250
3250
|
});
|
|
3251
3251
|
ElementQuery.displayName = "ForwardRef(ElementQuery)";
|
|
3252
3252
|
class ErrorBoundary extends react.Component {
|
|
@@ -3403,7 +3403,7 @@ function LayerProvider(props) {
|
|
|
3403
3403
|
}, $[3] = parentRegisterChild, $[4] = setChildLayers, $[5] = t3) : t3 = $[5];
|
|
3404
3404
|
const registerChild = t3;
|
|
3405
3405
|
let t4, t5;
|
|
3406
|
-
$[6] !==
|
|
3406
|
+
$[6] !== level || $[7] !== parentRegisterChild ? (t4 = () => parentRegisterChild?.(level), t5 = [level, parentRegisterChild], $[6] = level, $[7] = parentRegisterChild, $[8] = t4, $[9] = t5) : (t4 = $[8], t5 = $[9]), react.useEffect(t4, t5);
|
|
3407
3407
|
let t6, t7;
|
|
3408
3408
|
$[10] !== isTopLayer || $[11] !== level || $[12] !== registerChild || $[13] !== size2 || $[14] !== zIndex ? (t7 = {
|
|
3409
3409
|
version: 0,
|
|
@@ -3415,21 +3415,21 @@ function LayerProvider(props) {
|
|
|
3415
3415
|
}, $[10] = isTopLayer, $[11] = level, $[12] = registerChild, $[13] = size2, $[14] = zIndex, $[15] = t7) : t7 = $[15], t6 = t7;
|
|
3416
3416
|
const value = t6;
|
|
3417
3417
|
let t8;
|
|
3418
|
-
return $[16] !==
|
|
3418
|
+
return $[16] !== children || $[17] !== value ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(LayerContext.Provider, { value, children }), $[16] = children, $[17] = value, $[18] = t8) : t8 = $[18], t8;
|
|
3419
3419
|
}
|
|
3420
3420
|
LayerProvider.displayName = "LayerProvider";
|
|
3421
3421
|
const Root$j = styledComponents.styled.div({
|
|
3422
3422
|
position: "relative"
|
|
3423
3423
|
}), LayerChildren = react.forwardRef(function(props, forwardedRef) {
|
|
3424
3424
|
const $ = reactCompilerRuntime.c(22);
|
|
3425
|
-
let
|
|
3425
|
+
let children, onActivate, onFocus, restProps, t0;
|
|
3426
3426
|
$[0] !== props ? ({
|
|
3427
3427
|
children,
|
|
3428
3428
|
onActivate,
|
|
3429
3429
|
onFocus,
|
|
3430
3430
|
style: t0,
|
|
3431
3431
|
...restProps
|
|
3432
|
-
} = props, $[0] = props, $[1] =
|
|
3432
|
+
} = props, $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
|
|
3433
3433
|
const style = t0 === void 0 ? EMPTY_RECORD : t0, {
|
|
3434
3434
|
zIndex,
|
|
3435
3435
|
isTopLayer
|
|
@@ -3443,11 +3443,11 @@ const Root$j = styledComponents.styled.div({
|
|
|
3443
3443
|
}), isTopLayerRef.current = isTopLayer;
|
|
3444
3444
|
}, t3 = [isTopLayer, onActivate], $[7] = isTopLayer, $[8] = onActivate, $[9] = t2, $[10] = t3) : (t2 = $[9], t3 = $[10]), react.useEffect(t2, t3);
|
|
3445
3445
|
let t4;
|
|
3446
|
-
$[11] !==
|
|
3446
|
+
$[11] !== isTopLayer || $[12] !== onFocus ? (t4 = (event) => {
|
|
3447
3447
|
onFocus?.(event);
|
|
3448
3448
|
const rootElement = ref.current, target = document.activeElement;
|
|
3449
3449
|
!isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
|
|
3450
|
-
}, $[11] =
|
|
3450
|
+
}, $[11] = isTopLayer, $[12] = onFocus, $[13] = t4) : t4 = $[13];
|
|
3451
3451
|
const handleFocus = t4;
|
|
3452
3452
|
let t5;
|
|
3453
3453
|
$[14] !== style || $[15] !== zIndex ? (t5 = {
|
|
@@ -3455,20 +3455,20 @@ const Root$j = styledComponents.styled.div({
|
|
|
3455
3455
|
zIndex
|
|
3456
3456
|
}, $[14] = style, $[15] = zIndex, $[16] = t5) : t5 = $[16];
|
|
3457
3457
|
let t6;
|
|
3458
|
-
return $[17] !==
|
|
3458
|
+
return $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$j, { ...restProps, "data-ui": "Layer", onFocus: handleFocus, ref, style: t5, children }), $[17] = children, $[18] = handleFocus, $[19] = restProps, $[20] = t5, $[21] = t6) : t6 = $[21], t6;
|
|
3459
3459
|
}), Layer = react.forwardRef(function(props, ref) {
|
|
3460
3460
|
const $ = reactCompilerRuntime.c(11);
|
|
3461
|
-
let
|
|
3461
|
+
let children, restProps, t0;
|
|
3462
3462
|
$[0] !== props ? ({
|
|
3463
3463
|
children,
|
|
3464
3464
|
zOffset: t0,
|
|
3465
3465
|
...restProps
|
|
3466
|
-
} = props, $[0] = props, $[1] =
|
|
3466
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
3467
3467
|
const zOffset = t0 === void 0 ? 1 : t0;
|
|
3468
3468
|
let t1;
|
|
3469
|
-
$[4] !==
|
|
3469
|
+
$[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(LayerChildren, { ...restProps, ref, children }), $[4] = children, $[5] = ref, $[6] = restProps, $[7] = t1) : t1 = $[7];
|
|
3470
3470
|
let t2;
|
|
3471
|
-
return $[8] !==
|
|
3471
|
+
return $[8] !== t1 || $[9] !== zOffset ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: t1 }), $[8] = t1, $[9] = zOffset, $[10] = t2) : t2 = $[10], t2;
|
|
3472
3472
|
});
|
|
3473
3473
|
Layer.displayName = "ForwardRef(Layer)";
|
|
3474
3474
|
const key = "@sanity/ui/context/portal", elementKey = Symbol.for(`${key}/element`);
|
|
@@ -3509,15 +3509,15 @@ function PortalProvider(props) {
|
|
|
3509
3509
|
let t0;
|
|
3510
3510
|
const t1 = boundaryElement || null, t2 = element || fallbackElement;
|
|
3511
3511
|
let t3;
|
|
3512
|
-
$[0] !==
|
|
3512
|
+
$[0] !== elements || $[1] !== t1 || $[2] !== t2 ? (t3 = {
|
|
3513
3513
|
version: 0,
|
|
3514
3514
|
boundaryElement: t1,
|
|
3515
3515
|
element: t2,
|
|
3516
3516
|
elements
|
|
3517
|
-
}, $[0] =
|
|
3517
|
+
}, $[0] = elements, $[1] = t1, $[2] = t2, $[3] = t3) : t3 = $[3], t0 = t3;
|
|
3518
3518
|
const value = t0;
|
|
3519
3519
|
let t4;
|
|
3520
|
-
return $[4] !==
|
|
3520
|
+
return $[4] !== children || $[5] !== value ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(PortalContext.Provider, { value, children }), $[4] = children, $[5] = value, $[6] = t4) : t4 = $[6], t4;
|
|
3521
3521
|
}
|
|
3522
3522
|
function _temp2$1() {
|
|
3523
3523
|
return null;
|
|
@@ -3551,7 +3551,7 @@ const Root$i = styledComponents.styled.div`
|
|
|
3551
3551
|
children
|
|
3552
3552
|
} = props;
|
|
3553
3553
|
let t0;
|
|
3554
|
-
return $[0] !== as || $[1] !==
|
|
3554
|
+
return $[0] !== as || $[1] !== children || $[2] !== ref ? (t0 = /* @__PURE__ */ jsxRuntime.jsx(Root$i, { "aria-hidden": !0, as, "data-ui": "SrOnly", ref, children }), $[0] = as, $[1] = children, $[2] = ref, $[3] = t0) : t0 = $[3], t0;
|
|
3555
3555
|
});
|
|
3556
3556
|
SrOnly.displayName = "ForwardRef(SrOnly)";
|
|
3557
3557
|
const Root$h = styledComponents.styled.div`
|
|
@@ -3562,7 +3562,7 @@ const Root$h = styledComponents.styled.div`
|
|
|
3562
3562
|
right: 0;
|
|
3563
3563
|
`, VirtualList = react.forwardRef(function(props, forwardedRef) {
|
|
3564
3564
|
const $ = reactCompilerRuntime.c(56);
|
|
3565
|
-
let
|
|
3565
|
+
let getItemKey, onChange, renderItem, restProps, t0, t1, t2;
|
|
3566
3566
|
$[0] !== props ? ({
|
|
3567
3567
|
as: t0,
|
|
3568
3568
|
gap: t1,
|
|
@@ -3571,7 +3571,7 @@ const Root$h = styledComponents.styled.div`
|
|
|
3571
3571
|
onChange,
|
|
3572
3572
|
renderItem,
|
|
3573
3573
|
...restProps
|
|
3574
|
-
} = props, $[0] = props, $[1] =
|
|
3574
|
+
} = props, $[0] = props, $[1] = getItemKey, $[2] = onChange, $[3] = renderItem, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2) : (getItemKey = $[1], onChange = $[2], renderItem = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7]);
|
|
3575
3575
|
const as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1;
|
|
3576
3576
|
let t3;
|
|
3577
3577
|
$[8] !== t2 ? (t3 = t2 === void 0 ? [] : t2, $[8] = t2, $[9] = t3) : t3 = $[9];
|
|
@@ -3625,8 +3625,8 @@ const Root$h = styledComponents.styled.div`
|
|
|
3625
3625
|
};
|
|
3626
3626
|
}, t8 = [], $[14] = t7, $[15] = t8) : (t7 = $[14], t8 = $[15]), react.useEffect(t7, t8);
|
|
3627
3627
|
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;
|
|
3628
|
-
let
|
|
3629
|
-
$[16] !==
|
|
3628
|
+
let t10, t9;
|
|
3629
|
+
$[16] !== fromIndex || $[17] !== gap || $[18] !== itemHeight || $[19] !== onChange || $[20] !== scrollHeight || $[21] !== scrollTop || $[22] !== space || $[23] !== toIndex ? (t9 = () => {
|
|
3630
3630
|
onChange && onChange({
|
|
3631
3631
|
fromIndex,
|
|
3632
3632
|
gap: space[gap],
|
|
@@ -3635,7 +3635,7 @@ const Root$h = styledComponents.styled.div`
|
|
|
3635
3635
|
scrollTop,
|
|
3636
3636
|
toIndex
|
|
3637
3637
|
});
|
|
3638
|
-
}, t10 = [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex], $[16] =
|
|
3638
|
+
}, t10 = [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex], $[16] = fromIndex, $[17] = gap, $[18] = itemHeight, $[19] = onChange, $[20] = scrollHeight, $[21] = scrollTop, $[22] = space, $[23] = toIndex, $[24] = t10, $[25] = t9) : (t10 = $[24], t9 = $[25]), react.useEffect(t9, t10);
|
|
3639
3639
|
let t11;
|
|
3640
3640
|
bb0: {
|
|
3641
3641
|
if (!renderItem || items.length === 0) {
|
|
@@ -3651,14 +3651,14 @@ const Root$h = styledComponents.styled.div`
|
|
|
3651
3651
|
break bb0;
|
|
3652
3652
|
}
|
|
3653
3653
|
let t122;
|
|
3654
|
-
if ($[31] !==
|
|
3654
|
+
if ($[31] !== fromIndex || $[32] !== gap || $[33] !== getItemKey || $[34] !== itemHeight || $[35] !== items || $[36] !== renderItem || $[37] !== space || $[38] !== toIndex) {
|
|
3655
3655
|
let t132;
|
|
3656
|
-
$[40] !== fromIndex || $[41] !==
|
|
3656
|
+
$[40] !== fromIndex || $[41] !== gap || $[42] !== getItemKey || $[43] !== itemHeight || $[44] !== renderItem || $[45] !== space ? (t132 = (item, _itemIndex) => {
|
|
3657
3657
|
const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key2 = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
|
|
3658
3658
|
return /* @__PURE__ */ jsxRuntime.jsx(ItemWrapper, { style: {
|
|
3659
3659
|
top: itemIndex * (itemHeight + space[gap])
|
|
3660
3660
|
}, children: node }, key2);
|
|
3661
|
-
}, $[40] = fromIndex, $[41] =
|
|
3661
|
+
}, $[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;
|
|
3662
3662
|
} else
|
|
3663
3663
|
t122 = $[39];
|
|
3664
3664
|
t11 = t122;
|
|
@@ -3670,7 +3670,7 @@ const Root$h = styledComponents.styled.div`
|
|
|
3670
3670
|
}, $[47] = height, $[48] = t13) : t13 = $[48], t12 = t13;
|
|
3671
3671
|
const wrapperStyle = t12;
|
|
3672
3672
|
let t14;
|
|
3673
|
-
$[49] !==
|
|
3673
|
+
$[49] !== children || $[50] !== wrapperStyle ? (t14 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[49] = children, $[50] = wrapperStyle, $[51] = t14) : t14 = $[51];
|
|
3674
3674
|
let t15;
|
|
3675
3675
|
return $[52] !== as || $[53] !== restProps || $[54] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Root$h, { as, "data-ui": "VirtualList", ...restProps, ref, children: t14 }), $[52] = as, $[53] = restProps, $[54] = t14, $[55] = t15) : t15 = $[55], t15;
|
|
3676
3676
|
});
|
|
@@ -3759,7 +3759,7 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion(Card))`
|
|
|
3759
3759
|
}
|
|
3760
3760
|
`, PopoverCard = react.memo(react.forwardRef(function(props, ref) {
|
|
3761
3761
|
const $ = reactCompilerRuntime.c(60);
|
|
3762
|
-
let
|
|
3762
|
+
let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;
|
|
3763
3763
|
$[0] !== props ? ({
|
|
3764
3764
|
__unstable_margins: marginsProp,
|
|
3765
3765
|
animate,
|
|
@@ -3783,7 +3783,7 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion(Card))`
|
|
|
3783
3783
|
x: xProp,
|
|
3784
3784
|
y: yProp,
|
|
3785
3785
|
...restProps
|
|
3786
|
-
} = props, $[0] = props, $[1] =
|
|
3786
|
+
} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[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], arrow = $[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]);
|
|
3787
3787
|
const {
|
|
3788
3788
|
zIndex
|
|
3789
3789
|
} = useLayer();
|
|
@@ -3793,7 +3793,7 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion(Card))`
|
|
|
3793
3793
|
let t1;
|
|
3794
3794
|
const t2 = animate ? "transform" : void 0;
|
|
3795
3795
|
let t3;
|
|
3796
|
-
$[23] !==
|
|
3796
|
+
$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t2 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t3 = {
|
|
3797
3797
|
left: x,
|
|
3798
3798
|
originX,
|
|
3799
3799
|
originY,
|
|
@@ -3803,7 +3803,7 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion(Card))`
|
|
|
3803
3803
|
zIndex,
|
|
3804
3804
|
willChange: t2,
|
|
3805
3805
|
...style
|
|
3806
|
-
}, $[23] =
|
|
3806
|
+
}, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] = t2, $[28] = width, $[29] = x, $[30] = y, $[31] = zIndex, $[32] = t3) : t3 = $[32], t1 = t3;
|
|
3807
3807
|
const rootStyle2 = t1;
|
|
3808
3808
|
let t4;
|
|
3809
3809
|
const t5 = arrowX !== null ? arrowX : void 0, t6 = arrowY !== null ? arrowY : void 0;
|
|
@@ -3818,16 +3818,16 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion(Card))`
|
|
|
3818
3818
|
let t9;
|
|
3819
3819
|
$[36] !== animate ? (t9 = animate ? POPOVER_MOTION_PROPS : {}, $[36] = animate, $[37] = t9) : t9 = $[37];
|
|
3820
3820
|
let t10;
|
|
3821
|
-
$[38] !==
|
|
3821
|
+
$[38] !== children || $[39] !== padding ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[38] = children, $[39] = padding, $[40] = t10) : t10 = $[40];
|
|
3822
3822
|
let t11;
|
|
3823
3823
|
$[41] !== overflow || $[42] !== t10 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, overflow, children: t10 }), $[41] = overflow, $[42] = t10, $[43] = t11) : t11 = $[43];
|
|
3824
3824
|
let t12;
|
|
3825
3825
|
$[44] !== arrow || $[45] !== arrowRef || $[46] !== arrowStyle ? (t12 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[44] = arrow, $[45] = arrowRef, $[46] = arrowStyle, $[47] = t12) : t12 = $[47];
|
|
3826
3826
|
let t13;
|
|
3827
|
-
return $[48] !==
|
|
3827
|
+
return $[48] !== placement || $[49] !== radius || $[50] !== ref || $[51] !== rootStyle2 || $[52] !== scheme || $[53] !== shadow || $[54] !== t11 || $[55] !== t12 || $[56] !== t8 || $[57] !== t9 || $[58] !== tone ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, { "data-ui": "Popover", ...t8, "data-placement": placement, radius, ref, scheme, shadow, sizing: "border", style: rootStyle2, tone, ...t9, children: [
|
|
3828
3828
|
t11,
|
|
3829
3829
|
t12
|
|
3830
|
-
] }), $[48] =
|
|
3830
|
+
] }), $[48] = placement, $[49] = radius, $[50] = ref, $[51] = rootStyle2, $[52] = scheme, $[53] = shadow, $[54] = t11, $[55] = t12, $[56] = t8, $[57] = t9, $[58] = tone, $[59] = t13) : t13 = $[59], t13;
|
|
3831
3831
|
}));
|
|
3832
3832
|
PopoverCard.displayName = "Memo(ForwardRef(PopoverCard))";
|
|
3833
3833
|
const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
@@ -4081,7 +4081,7 @@ function inputElementStyle(props) {
|
|
|
4081
4081
|
}
|
|
4082
4082
|
const Root$g = styledComponents.styled.div(radioBaseStyle), Input$4 = styledComponents.styled.input(inputElementStyle), Radio = react.forwardRef(function(props, forwardedRef) {
|
|
4083
4083
|
const $ = reactCompilerRuntime.c(19);
|
|
4084
|
-
let customValidity, disabled, readOnly, restProps,
|
|
4084
|
+
let className, customValidity, disabled, readOnly, restProps, style;
|
|
4085
4085
|
$[0] !== props ? ({
|
|
4086
4086
|
className,
|
|
4087
4087
|
disabled,
|
|
@@ -4089,13 +4089,13 @@ const Root$g = styledComponents.styled.div(radioBaseStyle), Input$4 = styledComp
|
|
|
4089
4089
|
customValidity,
|
|
4090
4090
|
readOnly,
|
|
4091
4091
|
...restProps
|
|
4092
|
-
} = props, $[0] = props, $[1] =
|
|
4092
|
+
} = props, $[0] = props, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = readOnly, $[5] = restProps, $[6] = style) : (className = $[1], customValidity = $[2], disabled = $[3], readOnly = $[4], restProps = $[5], style = $[6]);
|
|
4093
4093
|
const ref = react.useRef(null);
|
|
4094
4094
|
let t0;
|
|
4095
4095
|
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[7] = t0) : t0 = $[7], react.useImperativeHandle(forwardedRef, t0), useCustomValidity(ref, customValidity);
|
|
4096
4096
|
const t1 = !disabled && readOnly ? "" : void 0, t2 = customValidity ? "" : void 0, t3 = disabled || readOnly;
|
|
4097
4097
|
let t4;
|
|
4098
|
-
$[8] !==
|
|
4098
|
+
$[8] !== readOnly || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Input$4, { "data-read-only": t1, "data-error": t2, ...restProps, disabled: t3, readOnly, ref, type: "radio" }), $[8] = readOnly, $[9] = restProps, $[10] = t1, $[11] = t2, $[12] = t3, $[13] = t4) : t4 = $[13];
|
|
4099
4099
|
let t5;
|
|
4100
4100
|
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", {}), $[14] = t5) : t5 = $[14];
|
|
4101
4101
|
let t6;
|
|
@@ -4249,7 +4249,7 @@ const selectStyle = {
|
|
|
4249
4249
|
iconBox: iconBoxStyle
|
|
4250
4250
|
}, Root$f = styledComponents.styled.div(selectStyle.root), Input$3 = styledComponents.styled.select(selectStyle.input), IconBox = styledComponents.styled(Box)(selectStyle.iconBox), Select = react.forwardRef(function(props, forwardedRef) {
|
|
4251
4251
|
const $ = reactCompilerRuntime.c(29);
|
|
4252
|
-
let
|
|
4252
|
+
let children, customValidity, disabled, readOnly, restProps, t0, t1, t2, t3;
|
|
4253
4253
|
$[0] !== props ? ({
|
|
4254
4254
|
children,
|
|
4255
4255
|
customValidity,
|
|
@@ -4260,13 +4260,13 @@ const selectStyle = {
|
|
|
4260
4260
|
readOnly,
|
|
4261
4261
|
space: t3,
|
|
4262
4262
|
...restProps
|
|
4263
|
-
} = props, $[0] = props, $[1] =
|
|
4263
|
+
} = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = readOnly, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3) : (children = $[1], customValidity = $[2], disabled = $[3], readOnly = $[4], restProps = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9]);
|
|
4264
4264
|
const fontSize2 = t0 === void 0 ? 2 : t0, padding = t1 === void 0 ? 3 : t1, radius = t2 === void 0 ? 2 : t2, space = t3 === void 0 ? 3 : t3, ref = react.useRef(null);
|
|
4265
4265
|
let t4;
|
|
4266
4266
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], react.useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
|
|
4267
4267
|
const t5 = !disabled && readOnly ? "" : void 0, t6 = useArrayProp(fontSize2), t7 = useArrayProp(padding), t8 = useArrayProp(radius), t9 = useArrayProp(space), t10 = disabled || readOnly;
|
|
4268
4268
|
let t11;
|
|
4269
|
-
$[11] !==
|
|
4269
|
+
$[11] !== children || $[12] !== restProps || $[13] !== t10 || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Input$3, { "data-read-only": t5, "data-ui": "Select", ...restProps, $fontSize: t6, $padding: t7, $radius: t8, $space: t9, disabled: t10, ref, children }), $[11] = children, $[12] = restProps, $[13] = t10, $[14] = t5, $[15] = t6, $[16] = t7, $[17] = t8, $[18] = t9, $[19] = t11) : t11 = $[19];
|
|
4270
4270
|
let t12;
|
|
4271
4271
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}), $[20] = t12) : t12 = $[20];
|
|
4272
4272
|
let t13;
|
|
@@ -4304,15 +4304,15 @@ function responsiveStackSpaceStyle(props) {
|
|
|
4304
4304
|
}
|
|
4305
4305
|
const Root$e = styledComponents.styled(Box)(stackBaseStyle, responsiveStackSpaceStyle), Stack = react.forwardRef(function(props, ref) {
|
|
4306
4306
|
const $ = reactCompilerRuntime.c(10);
|
|
4307
|
-
let as,
|
|
4307
|
+
let as, restProps, space;
|
|
4308
4308
|
$[0] !== props ? ({
|
|
4309
4309
|
as,
|
|
4310
4310
|
space,
|
|
4311
4311
|
...restProps
|
|
4312
|
-
} = props, $[0] = props, $[1] = as, $[2] =
|
|
4312
|
+
} = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = space) : (as = $[1], restProps = $[2], space = $[3]);
|
|
4313
4313
|
const t0 = typeof as == "string" ? as : void 0, t1 = useArrayProp(space);
|
|
4314
4314
|
let t2;
|
|
4315
|
-
return $[4] !==
|
|
4315
|
+
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t0 || $[8] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Root$e, { "data-as": t0, "data-ui": "Stack", ...restProps, $space: t1, forwardedAs: as, ref }), $[4] = as, $[5] = ref, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2) : t2 = $[9], t2;
|
|
4316
4316
|
});
|
|
4317
4317
|
Stack.displayName = "ForwardRef(Stack)";
|
|
4318
4318
|
function switchBaseStyles() {
|
|
@@ -4470,7 +4470,7 @@ function switchThumbStyles(props) {
|
|
|
4470
4470
|
}
|
|
4471
4471
|
const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledComponents.styled.input(switchInputStyles), Representation = styledComponents.styled.span(switchRepresentationStyles), Track = styledComponents.styled.span(switchTrackStyles), Thumb = styledComponents.styled.span(switchThumbStyles), Switch = react.forwardRef(function(props, forwardedRef) {
|
|
4472
4472
|
const $ = reactCompilerRuntime.c(26);
|
|
4473
|
-
let
|
|
4473
|
+
let checked, className, disabled, indeterminate, readOnly, restProps, style;
|
|
4474
4474
|
$[0] !== props ? ({
|
|
4475
4475
|
checked,
|
|
4476
4476
|
className,
|
|
@@ -4479,7 +4479,7 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
4479
4479
|
readOnly,
|
|
4480
4480
|
style,
|
|
4481
4481
|
...restProps
|
|
4482
|
-
} = props, $[0] = props, $[1] =
|
|
4482
|
+
} = props, $[0] = props, $[1] = checked, $[2] = className, $[3] = disabled, $[4] = indeterminate, $[5] = readOnly, $[6] = restProps, $[7] = style) : (checked = $[1], className = $[2], disabled = $[3], indeterminate = $[4], readOnly = $[5], restProps = $[6], style = $[7]);
|
|
4483
4483
|
const ref = react.useRef(null);
|
|
4484
4484
|
let t0;
|
|
4485
4485
|
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[8] = t0) : t0 = $[8], react.useImperativeHandle(forwardedRef, t0);
|
|
@@ -4489,7 +4489,7 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
4489
4489
|
}, t2 = [indeterminate], $[9] = indeterminate, $[10] = t1, $[11] = t2) : (t1 = $[10], t2 = $[11]), react.useEffect(t1, t2);
|
|
4490
4490
|
const t3 = !disabled && readOnly ? "" : void 0, t4 = indeterminate !== !0 && checked, t5 = disabled || readOnly;
|
|
4491
4491
|
let t6;
|
|
4492
|
-
$[12] !==
|
|
4492
|
+
$[12] !== restProps || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Input$2, { "data-read-only": t3, ...restProps, checked: t4, disabled: t5, type: "checkbox", ref }), $[12] = restProps, $[13] = t3, $[14] = t4, $[15] = t5, $[16] = t6) : t6 = $[16];
|
|
4493
4493
|
let t7;
|
|
4494
4494
|
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Track, {}), $[17] = t7) : t7 = $[17];
|
|
4495
4495
|
let t8;
|
|
@@ -4511,7 +4511,7 @@ const Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = s
|
|
|
4511
4511
|
position: relative;
|
|
4512
4512
|
`, Input$1 = styledComponents.styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation$1 = styledComponents.styled.div(responsiveRadiusStyle, textInputRepresentationStyle), TextArea = react.forwardRef(function(props, forwardedRef) {
|
|
4513
4513
|
const $ = reactCompilerRuntime.c(29);
|
|
4514
|
-
let t0, t1, t2, t3, t4,
|
|
4514
|
+
let __unstable_disableFocusRing, customValidity, restProps, t0, t1, t2, t3, t4, weight;
|
|
4515
4515
|
$[0] !== props ? ({
|
|
4516
4516
|
border: t0,
|
|
4517
4517
|
customValidity,
|
|
@@ -4522,16 +4522,16 @@ const Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = s
|
|
|
4522
4522
|
weight,
|
|
4523
4523
|
__unstable_disableFocusRing,
|
|
4524
4524
|
...restProps
|
|
4525
|
-
} = props, $[0] = props, $[1] =
|
|
4525
|
+
} = props, $[0] = props, $[1] = __unstable_disableFocusRing, $[2] = customValidity, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4, $[9] = weight) : (__unstable_disableFocusRing = $[1], customValidity = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8], weight = $[9]);
|
|
4526
4526
|
const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize2 = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, ref = react.useRef(null), rootTheme = useRootTheme();
|
|
4527
4527
|
let t5;
|
|
4528
4528
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[10] = t5) : t5 = $[10], react.useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
|
|
4529
4529
|
const t6 = rootTheme.scheme, t7 = rootTheme.tone, t8 = useArrayProp(fontSize2), t9 = useArrayProp(padding), t10 = rootTheme.scheme, t11 = useArrayProp(0);
|
|
4530
4530
|
let t12;
|
|
4531
|
-
$[11] !==
|
|
4531
|
+
$[11] !== disabled || $[12] !== restProps || $[13] !== rootTheme.scheme || $[14] !== rootTheme.tone || $[15] !== t11 || $[16] !== t8 || $[17] !== t9 || $[18] !== weight ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Input$1, { "data-as": "textarea", "data-scheme": t6, "data-tone": t7, ...restProps, $fontSize: t8, $padding: t9, $scheme: t10, $space: t11, $tone: rootTheme.tone, $weight: weight, disabled, ref }), $[11] = disabled, $[12] = restProps, $[13] = rootTheme.scheme, $[14] = rootTheme.tone, $[15] = t11, $[16] = t8, $[17] = t9, $[18] = weight, $[19] = t12) : t12 = $[19];
|
|
4532
4532
|
const t13 = useArrayProp(radius), t14 = border2 ? "" : void 0;
|
|
4533
4533
|
let t15;
|
|
4534
|
-
$[20] !==
|
|
4534
|
+
$[20] !== __unstable_disableFocusRing || $[21] !== rootTheme.scheme || $[22] !== rootTheme.tone || $[23] !== t13 || $[24] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Presentation$1, { $radius: t13, $unstableDisableFocusRing: __unstable_disableFocusRing, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t14, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone }), $[20] = __unstable_disableFocusRing, $[21] = rootTheme.scheme, $[22] = rootTheme.tone, $[23] = t13, $[24] = t14, $[25] = t15) : t15 = $[25];
|
|
4535
4535
|
let t16;
|
|
4536
4536
|
return $[26] !== t12 || $[27] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Root$c, { "data-ui": "TextArea", children: /* @__PURE__ */ jsxRuntime.jsxs(InputRoot$1, { children: [
|
|
4537
4537
|
t12,
|
|
@@ -4587,7 +4587,7 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4587
4587
|
}
|
|
4588
4588
|
}), TextInput = react.forwardRef(function(props, forwardedRef) {
|
|
4589
4589
|
const $ = reactCompilerRuntime.c(86);
|
|
4590
|
-
let
|
|
4590
|
+
let IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
|
|
4591
4591
|
$[0] !== props ? ({
|
|
4592
4592
|
__unstable_disableFocusRing,
|
|
4593
4593
|
border: t0,
|
|
@@ -4607,7 +4607,7 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4607
4607
|
type: t6,
|
|
4608
4608
|
weight,
|
|
4609
4609
|
...restProps
|
|
4610
|
-
} = props, $[0] = props, $[1] =
|
|
4610
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = clearButton, $[5] = customValidity, $[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) : (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], onClear = $[6], prefix = $[7], readOnly = $[8], restProps = $[9], suffix = $[10], t0 = $[11], t1 = $[12], t2 = $[13], t3 = $[14], t4 = $[15], t5 = $[16], t6 = $[17], weight = $[18]);
|
|
4611
4611
|
const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = react.useRef(null), rootTheme = useRootTheme(), fontSize2 = useArrayProp(fontSizeProp), padding = useArrayProp(paddingProp), radius = useArrayProp(radiusProp), space = useArrayProp(spaceProp), $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
|
|
4612
4612
|
let t7;
|
|
4613
4613
|
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], react.useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
@@ -4633,10 +4633,10 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4633
4633
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
4634
4634
|
] }) }), $[29] = $hasClearButton, $[30] = IconRightComponent, $[31] = fontSize2, $[32] = padding, $[33] = t14) : t14 = $[33];
|
|
4635
4635
|
let t15;
|
|
4636
|
-
$[34] !== $hasPrefix || $[35] !==
|
|
4636
|
+
$[34] !== $hasPrefix || $[35] !== $hasSuffix || $[36] !== __unstable_disableFocusRing || $[37] !== radius || $[38] !== rootTheme.scheme || $[39] !== rootTheme.tone || $[40] !== t12 || $[41] !== t13 || $[42] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t12, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
|
|
4637
4637
|
t13,
|
|
4638
4638
|
t14
|
|
4639
|
-
] }), $[34] = $hasPrefix, $[35] =
|
|
4639
|
+
] }), $[34] = $hasPrefix, $[35] = $hasSuffix, $[36] = __unstable_disableFocusRing, $[37] = radius, $[38] = rootTheme.scheme, $[39] = rootTheme.tone, $[40] = t12, $[41] = t13, $[42] = t14, $[43] = t15) : t15 = $[43], t11 = t15;
|
|
4640
4640
|
const presentationNode = t11;
|
|
4641
4641
|
let t16, t17;
|
|
4642
4642
|
if ($[44] !== padding) {
|
|
@@ -4658,25 +4658,25 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4658
4658
|
t20 = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
|
|
4659
4659
|
const clearButtonProps = t20;
|
|
4660
4660
|
let t21, t22;
|
|
4661
|
-
$[50] !==
|
|
4661
|
+
$[50] !== clearButton || $[51] !== clearButtonBoxPadding || $[52] !== clearButtonPadding || $[53] !== clearButtonProps || $[54] !== customValidity || $[55] !== disabled || $[56] !== fontSize2 || $[57] !== handleClearClick || $[58] !== radius || $[59] !== readOnly ? (t22 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[50] = clearButton, $[51] = clearButtonBoxPadding, $[52] = clearButtonPadding, $[53] = clearButtonProps, $[54] = customValidity, $[55] = disabled, $[56] = fontSize2, $[57] = handleClearClick, $[58] = radius, $[59] = readOnly, $[60] = t22) : t22 = $[60], t21 = t22;
|
|
4662
4662
|
const clearButtonNode = t21;
|
|
4663
4663
|
let t23, t24;
|
|
4664
|
-
$[61] !==
|
|
4664
|
+
$[61] !== radius || $[62] !== suffix ? (t24 = suffix && /* @__PURE__ */ jsxRuntime.jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: suffix }) }), $[61] = radius, $[62] = suffix, $[63] = t24) : t24 = $[63], t23 = t24;
|
|
4665
4665
|
const suffixNode = t23, t25 = $hasIconRight || $hasClearButton;
|
|
4666
4666
|
let t26;
|
|
4667
|
-
$[64] !==
|
|
4667
|
+
$[64] !== $hasIcon || $[65] !== disabled || $[66] !== fontSize2 || $[67] !== padding || $[68] !== readOnly || $[69] !== restProps || $[70] !== rootTheme.scheme || $[71] !== rootTheme.tone || $[72] !== space || $[73] !== t25 || $[74] !== type || $[75] !== weight ? (t26 = /* @__PURE__ */ jsxRuntime.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 }), $[64] = $hasIcon, $[65] = disabled, $[66] = fontSize2, $[67] = padding, $[68] = readOnly, $[69] = restProps, $[70] = rootTheme.scheme, $[71] = rootTheme.tone, $[72] = space, $[73] = t25, $[74] = type, $[75] = weight, $[76] = t26) : t26 = $[76];
|
|
4668
4668
|
let t27;
|
|
4669
|
-
$[77] !==
|
|
4669
|
+
$[77] !== clearButtonNode || $[78] !== presentationNode || $[79] !== t26 ? (t27 = /* @__PURE__ */ jsxRuntime.jsxs(InputRoot, { children: [
|
|
4670
4670
|
t26,
|
|
4671
4671
|
presentationNode,
|
|
4672
4672
|
clearButtonNode
|
|
4673
|
-
] }), $[77] =
|
|
4673
|
+
] }), $[77] = clearButtonNode, $[78] = presentationNode, $[79] = t26, $[80] = t27) : t27 = $[80];
|
|
4674
4674
|
let t28;
|
|
4675
|
-
return $[81] !==
|
|
4675
|
+
return $[81] !== prefixNode || $[82] !== rootTheme.tone || $[83] !== suffixNode || $[84] !== t27 ? (t28 = /* @__PURE__ */ jsxRuntime.jsxs(Root$b, { "data-ui": "TextInput", tone: rootTheme.tone, children: [
|
|
4676
4676
|
prefixNode,
|
|
4677
4677
|
t27,
|
|
4678
4678
|
suffixNode
|
|
4679
|
-
] }), $[81] =
|
|
4679
|
+
] }), $[81] = prefixNode, $[82] = rootTheme.tone, $[83] = suffixNode, $[84] = t27, $[85] = t28) : t28 = $[85], t28;
|
|
4680
4680
|
});
|
|
4681
4681
|
TextInput.displayName = "ForwardRef(TextInput)";
|
|
4682
4682
|
function _temp$2(event) {
|
|
@@ -4717,7 +4717,7 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4717
4717
|
}
|
|
4718
4718
|
`, TooltipCard = react.memo(react.forwardRef(function(props, ref) {
|
|
4719
4719
|
const $ = reactCompilerRuntime.c(42);
|
|
4720
|
-
let animate,
|
|
4720
|
+
let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, restProps, scheme, shadow, style;
|
|
4721
4721
|
$[0] !== props ? ({
|
|
4722
4722
|
animate,
|
|
4723
4723
|
arrow,
|
|
@@ -4734,16 +4734,16 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4734
4734
|
shadow,
|
|
4735
4735
|
style,
|
|
4736
4736
|
...restProps
|
|
4737
|
-
} = props, $[0] = props, $[1] = animate, $[2] =
|
|
4737
|
+
} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[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], arrow = $[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]);
|
|
4738
4738
|
let t0;
|
|
4739
4739
|
const t1 = animate ? "transform" : void 0;
|
|
4740
4740
|
let t2;
|
|
4741
|
-
$[16] !== originX || $[17] !== originY || $[18] !==
|
|
4741
|
+
$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t1 ? (t2 = {
|
|
4742
4742
|
originX,
|
|
4743
4743
|
originY,
|
|
4744
4744
|
willChange: t1,
|
|
4745
4745
|
...style
|
|
4746
|
-
}, $[16] = originX, $[17] = originY, $[18] =
|
|
4746
|
+
}, $[16] = originX, $[17] = originY, $[18] = style, $[19] = t1, $[20] = t2) : t2 = $[20], t0 = t2;
|
|
4747
4747
|
const rootStyle2 = t0;
|
|
4748
4748
|
let t3;
|
|
4749
4749
|
const t4 = arrowX !== null ? arrowX : void 0, t5 = arrowY !== null ? arrowY : void 0;
|
|
@@ -4760,10 +4760,10 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4760
4760
|
let t9;
|
|
4761
4761
|
$[26] !== arrow || $[27] !== arrowRef || $[28] !== arrowStyle ? (t9 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[26] = arrow, $[27] = arrowRef, $[28] = arrowStyle, $[29] = t9) : t9 = $[29];
|
|
4762
4762
|
let t10;
|
|
4763
|
-
return $[30] !==
|
|
4763
|
+
return $[30] !== children || $[31] !== padding || $[32] !== placement || $[33] !== radius || $[34] !== ref || $[35] !== rootStyle2 || $[36] !== scheme || $[37] !== shadow || $[38] !== t7 || $[39] !== t8 || $[40] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { "data-ui": "Tooltip__card", ...t7, "data-placement": placement, padding, radius, ref, scheme, shadow, style: rootStyle2, ...t8, children: [
|
|
4764
4764
|
children,
|
|
4765
4765
|
t9
|
|
4766
|
-
] }), $[30] =
|
|
4766
|
+
] }), $[30] = children, $[31] = padding, $[32] = placement, $[33] = radius, $[34] = ref, $[35] = rootStyle2, $[36] = scheme, $[37] = shadow, $[38] = t7, $[39] = t8, $[40] = t9, $[41] = t10) : t10 = $[41], t10;
|
|
4767
4767
|
}));
|
|
4768
4768
|
TooltipCard.displayName = "Memo(ForwardRef(TooltipCard))";
|
|
4769
4769
|
const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
|
|
@@ -4778,17 +4778,17 @@ function TooltipDelayGroupProvider(props) {
|
|
|
4778
4778
|
let t0;
|
|
4779
4779
|
const t1 = isGroupActive ? 1 : openDelay;
|
|
4780
4780
|
let t2;
|
|
4781
|
-
$[0] !==
|
|
4781
|
+
$[0] !== closeDelay || $[1] !== isGroupActive || $[2] !== openTooltipId || $[3] !== setIsGroupActive || $[4] !== setOpenTooltipId || $[5] !== t1 ? (t2 = {
|
|
4782
4782
|
isGroupActive,
|
|
4783
4783
|
setIsGroupActive,
|
|
4784
4784
|
openTooltipId,
|
|
4785
4785
|
setOpenTooltipId,
|
|
4786
4786
|
openDelay: t1,
|
|
4787
4787
|
closeDelay
|
|
4788
|
-
}, $[0] =
|
|
4788
|
+
}, $[0] = closeDelay, $[1] = isGroupActive, $[2] = openTooltipId, $[3] = setIsGroupActive, $[4] = setOpenTooltipId, $[5] = t1, $[6] = t2) : t2 = $[6], t0 = t2;
|
|
4789
4789
|
const value = t0;
|
|
4790
4790
|
let t3;
|
|
4791
|
-
return $[7] !==
|
|
4791
|
+
return $[7] !== children || $[8] !== value ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupContext.Provider, { value, children }), $[7] = children, $[8] = value, $[9] = t3) : t3 = $[9], t3;
|
|
4792
4792
|
}
|
|
4793
4793
|
TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
|
|
4794
4794
|
const Root$a = styledComponents.styled(Layer)`
|
|
@@ -4923,19 +4923,19 @@ function useCloseOnMouseLeave(t0) {
|
|
|
4923
4923
|
showTooltip
|
|
4924
4924
|
} = t0;
|
|
4925
4925
|
let t1;
|
|
4926
|
-
$[0] !==
|
|
4926
|
+
$[0] !== handleIsOpenChange || $[1] !== referenceElement ? (t1 = (target, teardown) => {
|
|
4927
4927
|
referenceElement && (referenceElement === target || target instanceof Node && referenceElement.contains(target) || (handleIsOpenChange(!1), teardown()));
|
|
4928
|
-
}, $[0] =
|
|
4928
|
+
}, $[0] = handleIsOpenChange, $[1] = referenceElement, $[2] = t1) : t1 = $[2];
|
|
4929
4929
|
const onMouseMove = useEffectEvent.useEffectEvent(t1);
|
|
4930
4930
|
let t2, t3;
|
|
4931
|
-
$[3] !==
|
|
4931
|
+
$[3] !== onMouseMove || $[4] !== showTooltip ? (t2 = () => {
|
|
4932
4932
|
if (!showTooltip)
|
|
4933
4933
|
return;
|
|
4934
4934
|
const handleMouseMove = (event) => {
|
|
4935
4935
|
onMouseMove(event.target, () => window.removeEventListener("mousemove", handleMouseMove));
|
|
4936
4936
|
};
|
|
4937
4937
|
return window.addEventListener("mousemove", handleMouseMove), () => window.removeEventListener("mousemove", handleMouseMove);
|
|
4938
|
-
}, t3 = [onMouseMove, showTooltip], $[3] =
|
|
4938
|
+
}, t3 = [onMouseMove, showTooltip], $[3] = onMouseMove, $[4] = showTooltip, $[5] = t2, $[6] = t3) : (t2 = $[5], t3 = $[6]), react.useEffect(t2, t3);
|
|
4939
4939
|
}
|
|
4940
4940
|
const Root$9 = styledComponents.styled.div`
|
|
4941
4941
|
line-height: 0;
|
|
@@ -4977,7 +4977,7 @@ function AutocompleteOption(props) {
|
|
|
4977
4977
|
}, $[3] = handleClick, $[4] = t1) : t1 = $[4];
|
|
4978
4978
|
const handleKeyDown = t1;
|
|
4979
4979
|
let t2;
|
|
4980
|
-
return $[5] !==
|
|
4980
|
+
return $[5] !== children || $[6] !== handleClick || $[7] !== handleKeyDown || $[8] !== id || $[9] !== selected ? (t2 = /* @__PURE__ */ jsxRuntime.jsx("li", { "aria-selected": selected, "data-ui": "AutocompleteOption", id, role: "option", onClick: handleClick, onKeyDown: handleKeyDown, children }), $[5] = children, $[6] = handleClick, $[7] = handleKeyDown, $[8] = id, $[9] = selected, $[10] = t2) : t2 = $[10], t2;
|
|
4981
4981
|
}
|
|
4982
4982
|
function autocompleteReducer(state, msg2) {
|
|
4983
4983
|
return msg2.type === "input/change" ? {
|
|
@@ -5019,17 +5019,15 @@ function autocompleteReducer(state, msg2) {
|
|
|
5019
5019
|
} : state;
|
|
5020
5020
|
}
|
|
5021
5021
|
const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "Home", "End", "PageUp", "PageDown", "Meta", "Tab", "CapsLock"], AUTOCOMPLETE_POPOVER_PLACEMENT = "bottom-start", AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS = ["bottom-start", "top-start"], DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, DEFAULT_FILTER_OPTION = (query, option) => option.value.toLowerCase().indexOf(query.toLowerCase()) > -1, InnerAutocomplete = react.forwardRef(function(props, forwardedRef) {
|
|
5022
|
-
const
|
|
5023
|
-
|
|
5024
|
-
$[0] !== props ? ({
|
|
5025
|
-
border: t0,
|
|
5022
|
+
const {
|
|
5023
|
+
border: border2 = !0,
|
|
5026
5024
|
customValidity,
|
|
5027
5025
|
disabled,
|
|
5028
5026
|
filterOption: filterOptionProp,
|
|
5029
|
-
fontSize:
|
|
5027
|
+
fontSize: fontSize2 = 2,
|
|
5030
5028
|
icon,
|
|
5031
5029
|
id,
|
|
5032
|
-
listBox
|
|
5030
|
+
listBox = EMPTY_RECORD,
|
|
5033
5031
|
loading,
|
|
5034
5032
|
onBlur,
|
|
5035
5033
|
onChange,
|
|
@@ -5039,63 +5037,39 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5039
5037
|
openButton,
|
|
5040
5038
|
openOnFocus,
|
|
5041
5039
|
options: optionsProp,
|
|
5042
|
-
padding:
|
|
5043
|
-
popover
|
|
5040
|
+
padding: paddingProp = 3,
|
|
5041
|
+
popover = EMPTY_RECORD,
|
|
5044
5042
|
prefix,
|
|
5045
|
-
radius
|
|
5043
|
+
radius = 2,
|
|
5046
5044
|
readOnly,
|
|
5047
5045
|
relatedElements,
|
|
5048
5046
|
renderOption: renderOptionProp,
|
|
5049
5047
|
renderPopover,
|
|
5050
|
-
renderValue
|
|
5048
|
+
renderValue = DEFAULT_RENDER_VALUE,
|
|
5051
5049
|
suffix,
|
|
5052
5050
|
value: valueProp,
|
|
5053
5051
|
...restProps
|
|
5054
|
-
} = props,
|
|
5055
|
-
|
|
5056
|
-
let t9;
|
|
5057
|
-
$[30] !== t7 || $[31] !== t8 ? (t9 = {
|
|
5058
|
-
activeValue: t7,
|
|
5052
|
+
} = props, [state, dispatch] = react.useReducer(autocompleteReducer, {
|
|
5053
|
+
activeValue: valueProp || null,
|
|
5059
5054
|
focused: !1,
|
|
5060
5055
|
listFocused: !1,
|
|
5061
5056
|
query: null,
|
|
5062
|
-
value:
|
|
5063
|
-
},
|
|
5064
|
-
const [state, dispatch] = react.useReducer(autocompleteReducer, t9), {
|
|
5057
|
+
value: valueProp || null
|
|
5058
|
+
}), {
|
|
5065
5059
|
activeValue,
|
|
5066
5060
|
focused,
|
|
5067
5061
|
listFocused,
|
|
5068
5062
|
query,
|
|
5069
5063
|
value
|
|
5070
|
-
} = state
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
} = t112;
|
|
5076
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Card, { "data-as": "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, textOverflow: "ellipsis", children: value_0 }) });
|
|
5077
|
-
}, $[33] = paddingProp, $[34] = fontSize2, $[35] = t10) : t10 = $[35];
|
|
5078
|
-
const renderOption = typeof renderOptionProp == "function" ? renderOptionProp : t10, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, [rootElement, setRootElement] = react.useState(null), [resultsPopoverElement, setResultsPopoverElement] = react.useState(null), [inputElement, setInputElement] = react.useState(null), listBoxElementRef = react.useRef(null), listFocusedRef = react.useRef(!1), valueRef = react.useRef(value), valuePropRef = react.useRef(valueProp), [popoverMouseWithin, setPopoverMouseWithin] = react.useState(!1);
|
|
5079
|
-
let t11, t12;
|
|
5080
|
-
$[36] !== inputElement ? (t11 = () => inputElement, t12 = [inputElement], $[36] = inputElement, $[37] = t11, $[38] = t12) : (t11 = $[37], t12 = $[38]), react.useImperativeHandle(forwardedRef, t11, t12);
|
|
5081
|
-
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = useArrayProp(paddingProp);
|
|
5082
|
-
let t13, t14;
|
|
5083
|
-
$[39] !== value || $[40] !== options ? (t14 = value !== null ? options.find((o) => o.value === value) : void 0, $[39] = value, $[40] = options, $[41] = t14) : t14 = $[41], t13 = t14;
|
|
5084
|
-
const currentOption = t13;
|
|
5085
|
-
let t15, t16;
|
|
5086
|
-
if ($[42] !== query || $[43] !== filterOption || $[44] !== options) {
|
|
5087
|
-
let t172;
|
|
5088
|
-
$[46] !== query || $[47] !== filterOption ? (t172 = (option) => query ? filterOption(query, option) : !0, $[46] = query, $[47] = filterOption, $[48] = t172) : t172 = $[48], t16 = options.filter(t172), $[42] = query, $[43] = filterOption, $[44] = options, $[45] = t16;
|
|
5089
|
-
} else
|
|
5090
|
-
t16 = $[45];
|
|
5091
|
-
t15 = t16;
|
|
5092
|
-
const filteredOptions = t15, filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null;
|
|
5093
|
-
let t17;
|
|
5094
|
-
$[49] !== popoverMouseWithin || $[50] !== relatedElements || $[51] !== rootElement || $[52] !== resultsPopoverElement || $[53] !== onQueryChange || $[54] !== onBlur ? (t17 = (event) => {
|
|
5064
|
+
} = state, defaultRenderOption = react.useCallback(({
|
|
5065
|
+
value: value_0
|
|
5066
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(Card, { "data-as": "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, textOverflow: "ellipsis", children: value_0 }) }), [fontSize2, paddingProp]), renderOption = typeof renderOptionProp == "function" ? renderOptionProp : defaultRenderOption, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, rootElementRef = react.useRef(null), resultsPopoverElementRef = react.useRef(null), inputElementRef = react.useRef(null), listBoxElementRef = react.useRef(null), listFocusedRef = react.useRef(!1), valueRef = react.useRef(value), valuePropRef = react.useRef(valueProp), popoverMouseWithinRef = react.useRef(!1);
|
|
5067
|
+
react.useImperativeHandle(forwardedRef, () => inputElementRef.current);
|
|
5068
|
+
const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = useArrayProp(paddingProp), currentOption = react.useMemo(() => value !== null ? options.find((o) => o.value === value) : void 0, [options, value]), filteredOptions = react.useMemo(() => options.filter((option) => query ? filterOption(query, option) : !0), [filterOption, options, query]), filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null, handleRootBlur = react.useCallback((event) => {
|
|
5095
5069
|
setTimeout(() => {
|
|
5096
|
-
if (
|
|
5070
|
+
if (popoverMouseWithinRef.current)
|
|
5097
5071
|
return;
|
|
5098
|
-
const elements = (relatedElements || []).concat(
|
|
5072
|
+
const elements = (relatedElements || []).concat(rootElementRef.current ? [rootElementRef.current] : [], resultsPopoverElementRef.current ? [resultsPopoverElementRef.current] : []);
|
|
5099
5073
|
let focusInside = !1;
|
|
5100
5074
|
if (document.activeElement) {
|
|
5101
5075
|
for (const e of elements)
|
|
@@ -5106,32 +5080,22 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5106
5080
|
}
|
|
5107
5081
|
focusInside === !1 && (dispatch({
|
|
5108
5082
|
type: "root/blur"
|
|
5109
|
-
}),
|
|
5083
|
+
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), onBlur && onBlur(event));
|
|
5110
5084
|
}, 0);
|
|
5111
|
-
},
|
|
5112
|
-
const handleRootBlur = t17;
|
|
5113
|
-
let t18;
|
|
5114
|
-
$[56] === Symbol.for("react.memo_cache_sentinel") ? (t18 = (event_0) => {
|
|
5085
|
+
}, [onBlur, onQueryChange, relatedElements]), handleRootFocus = react.useCallback((event_0) => {
|
|
5115
5086
|
const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = listBoxElement?.contains(focusedElement) || !1;
|
|
5116
5087
|
listFocused_0 !== listFocusedRef.current && (listFocusedRef.current = listFocused_0, dispatch({
|
|
5117
5088
|
type: "root/setListFocused",
|
|
5118
5089
|
listFocused: listFocused_0
|
|
5119
5090
|
}));
|
|
5120
|
-
},
|
|
5121
|
-
const handleRootFocus = t18;
|
|
5122
|
-
let t19;
|
|
5123
|
-
$[57] !== onSelect || $[58] !== onChange || $[59] !== onQueryChange || $[60] !== inputElement ? (t19 = (v) => {
|
|
5091
|
+
}, []), handleOptionSelect = react.useCallback((v) => {
|
|
5124
5092
|
dispatch({
|
|
5125
5093
|
type: "value/change",
|
|
5126
5094
|
value: v
|
|
5127
|
-
}),
|
|
5128
|
-
},
|
|
5129
|
-
const handleOptionSelect = t19;
|
|
5130
|
-
let t20;
|
|
5131
|
-
$[62] !== filteredOptionsLen || $[63] !== filteredOptions || $[64] !== activeValue || $[65] !== onQueryChange || $[66] !== inputElement ? (t20 = (event_1) => {
|
|
5095
|
+
}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
5096
|
+
}, [onChange, onSelect, onQueryChange]), handleRootKeyDown = react.useCallback((event_1) => {
|
|
5132
5097
|
if (event_1.key === "ArrowDown") {
|
|
5133
|
-
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
5134
|
-
return;
|
|
5098
|
+
if (event_1.preventDefault(), !filteredOptionsLen) return;
|
|
5135
5099
|
const activeOption = filteredOptions.find((o_0) => o_0.value === activeValue), activeIndex = activeOption ? filteredOptions.indexOf(activeOption) : -1, nextActiveOption = filteredOptions[(activeIndex + 1) % filteredOptionsLen];
|
|
5136
5100
|
nextActiveOption && dispatch({
|
|
5137
5101
|
type: "root/setActiveValue",
|
|
@@ -5141,8 +5105,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5141
5105
|
return;
|
|
5142
5106
|
}
|
|
5143
5107
|
if (event_1.key === "ArrowUp") {
|
|
5144
|
-
if (event_1.preventDefault(), !filteredOptionsLen)
|
|
5145
|
-
return;
|
|
5108
|
+
if (event_1.preventDefault(), !filteredOptionsLen) return;
|
|
5146
5109
|
const activeOption_0 = filteredOptions.find((o_1) => o_1.value === activeValue), activeIndex_0 = activeOption_0 ? filteredOptions.indexOf(activeOption_0) : -1, nextActiveOption_0 = filteredOptions[activeIndex_0 === -1 ? filteredOptionsLen - 1 : (filteredOptionsLen + activeIndex_0 - 1) % filteredOptionsLen];
|
|
5147
5110
|
nextActiveOption_0 && dispatch({
|
|
5148
5111
|
type: "root/setActiveValue",
|
|
@@ -5154,66 +5117,43 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5154
5117
|
if (event_1.key === "Escape") {
|
|
5155
5118
|
dispatch({
|
|
5156
5119
|
type: "root/escape"
|
|
5157
|
-
}),
|
|
5120
|
+
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
5158
5121
|
return;
|
|
5159
5122
|
}
|
|
5160
5123
|
const target = event_1.target, listEl = listBoxElementRef.current;
|
|
5161
5124
|
if ((listEl === target || listEl?.contains(target)) && !AUTOCOMPLETE_LISTBOX_IGNORE_KEYS.includes(event_1.key)) {
|
|
5162
|
-
|
|
5125
|
+
inputElementRef.current?.focus();
|
|
5163
5126
|
return;
|
|
5164
5127
|
}
|
|
5165
|
-
},
|
|
5166
|
-
const handleRootKeyDown = t20;
|
|
5167
|
-
let t21;
|
|
5168
|
-
$[68] !== onQueryChange ? (t21 = (event_2) => {
|
|
5128
|
+
}, [activeValue, filteredOptions, filteredOptionsLen, onQueryChange]), handleInputChange = react.useCallback((event_2) => {
|
|
5169
5129
|
const nextQuery = event_2.currentTarget.value;
|
|
5170
5130
|
dispatch({
|
|
5171
5131
|
type: "input/change",
|
|
5172
5132
|
query: nextQuery
|
|
5173
5133
|
}), onQueryChange && onQueryChange(nextQuery);
|
|
5174
|
-
},
|
|
5175
|
-
const handleInputChange = t21;
|
|
5176
|
-
let t22;
|
|
5177
|
-
$[70] !== value || $[71] !== renderValue || $[72] !== currentOption ? (t22 = () => {
|
|
5134
|
+
}, [onQueryChange]), dispatchOpen = react.useCallback(() => {
|
|
5178
5135
|
dispatch({
|
|
5179
5136
|
type: "root/open",
|
|
5180
5137
|
query: value ? renderValue(value, currentOption) : ""
|
|
5181
5138
|
});
|
|
5182
|
-
},
|
|
5183
|
-
const dispatchOpen = t22;
|
|
5184
|
-
let t23;
|
|
5185
|
-
$[74] !== focused || $[75] !== onFocus || $[76] !== openOnFocus || $[77] !== dispatchOpen ? (t23 = (event_3) => {
|
|
5139
|
+
}, [currentOption, renderValue, value]), handleInputFocus = react.useCallback((event_3) => {
|
|
5186
5140
|
focused || (dispatch({
|
|
5187
5141
|
type: "input/focus"
|
|
5188
5142
|
}), onFocus && onFocus(event_3), openOnFocus && dispatchOpen());
|
|
5189
|
-
},
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
}, $[79] = t24) : t24 = $[79];
|
|
5195
|
-
const handlePopoverMouseEnter = t24;
|
|
5196
|
-
let t25;
|
|
5197
|
-
$[80] === Symbol.for("react.memo_cache_sentinel") ? (t25 = () => {
|
|
5198
|
-
setPopoverMouseWithin(!1);
|
|
5199
|
-
}, $[80] = t25) : t25 = $[80];
|
|
5200
|
-
const handlePopoverMouseLeave = t25;
|
|
5201
|
-
let t26;
|
|
5202
|
-
$[81] !== onChange || $[82] !== onQueryChange || $[83] !== inputElement ? (t26 = () => {
|
|
5143
|
+
}, [focused, onFocus, openOnFocus, dispatchOpen]), handlePopoverMouseEnter = react.useCallback(() => {
|
|
5144
|
+
popoverMouseWithinRef.current = !0;
|
|
5145
|
+
}, []), handlePopoverMouseLeave = react.useCallback(() => {
|
|
5146
|
+
popoverMouseWithinRef.current = !1;
|
|
5147
|
+
}, []), handleClearButtonClick = react.useCallback(() => {
|
|
5203
5148
|
dispatch({
|
|
5204
5149
|
type: "root/clear"
|
|
5205
|
-
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null),
|
|
5206
|
-
},
|
|
5207
|
-
const handleClearButtonClick = t26;
|
|
5208
|
-
let t27;
|
|
5209
|
-
$[85] === Symbol.for("react.memo_cache_sentinel") ? (t27 = () => {
|
|
5150
|
+
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
5151
|
+
}, [onChange, onQueryChange]), handleClearButtonFocus = react.useCallback(() => {
|
|
5210
5152
|
dispatch({
|
|
5211
5153
|
type: "input/focus"
|
|
5212
5154
|
});
|
|
5213
|
-
},
|
|
5214
|
-
|
|
5215
|
-
let t28, t29;
|
|
5216
|
-
$[86] !== valueProp ? (t28 = () => {
|
|
5155
|
+
}, []);
|
|
5156
|
+
react.useEffect(() => {
|
|
5217
5157
|
if (valueProp !== valuePropRef.current) {
|
|
5218
5158
|
valuePropRef.current = valueProp, valueProp !== void 0 && (dispatch({
|
|
5219
5159
|
type: "value/change",
|
|
@@ -5225,19 +5165,14 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5225
5165
|
type: "value/change",
|
|
5226
5166
|
value: valueProp || null
|
|
5227
5167
|
}));
|
|
5228
|
-
},
|
|
5229
|
-
let t30, t31;
|
|
5230
|
-
$[89] !== focused ? (t30 = () => {
|
|
5168
|
+
}, [valueProp]), react.useEffect(() => {
|
|
5231
5169
|
!focused && valueRef.current && dispatch({
|
|
5232
5170
|
type: "root/setActiveValue",
|
|
5233
5171
|
value: valueRef.current
|
|
5234
5172
|
});
|
|
5235
|
-
},
|
|
5236
|
-
let t32, t33;
|
|
5237
|
-
$[92] !== filteredOptions || $[93] !== activeValue ? (t32 = () => {
|
|
5173
|
+
}, [focused]), react.useEffect(() => {
|
|
5238
5174
|
const listElement = listBoxElementRef.current;
|
|
5239
|
-
if (!listElement)
|
|
5240
|
-
return;
|
|
5175
|
+
if (!listElement) return;
|
|
5241
5176
|
const activeOption_1 = filteredOptions.find((o_2) => o_2.value === activeValue);
|
|
5242
5177
|
if (activeOption_1) {
|
|
5243
5178
|
const activeIndex_1 = filteredOptions.indexOf(activeOption_1), activeItemElement = listElement.childNodes[activeIndex_1];
|
|
@@ -5247,123 +5182,35 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5247
5182
|
focusFirstDescendant(activeItemElement);
|
|
5248
5183
|
}
|
|
5249
5184
|
}
|
|
5250
|
-
},
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
let t352;
|
|
5255
|
-
$[96] === Symbol.for("react.memo_cache_sentinel") ? (t352 = {
|
|
5185
|
+
}, [activeValue, filteredOptions]);
|
|
5186
|
+
const clearButton = react.useMemo(() => {
|
|
5187
|
+
if (!loading && !disabled && value)
|
|
5188
|
+
return {
|
|
5256
5189
|
"aria-label": "Clear",
|
|
5257
5190
|
onFocus: handleClearButtonFocus
|
|
5258
|
-
}
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
}
|
|
5277
|
-
|
|
5278
|
-
t37 = t38;
|
|
5279
|
-
const openButtonPadding = t37;
|
|
5280
|
-
let t39;
|
|
5281
|
-
t39 = typeof openButton == "object" ? openButton : EMPTY_RECORD;
|
|
5282
|
-
const openButtonProps = t39;
|
|
5283
|
-
let t40;
|
|
5284
|
-
$[103] !== dispatchOpen || $[104] !== openButtonProps || $[105] !== inputElement ? (t40 = (event_4) => {
|
|
5285
|
-
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElement?.focus());
|
|
5286
|
-
}, $[103] = dispatchOpen, $[104] = openButtonProps, $[105] = inputElement, $[106] = t40) : t40 = $[106];
|
|
5287
|
-
const handleOpenClick = t40;
|
|
5288
|
-
let t41, t42;
|
|
5289
|
-
$[107] !== disabled || $[108] !== readOnly || $[109] !== openButton || $[110] !== expanded || $[111] !== fontSize2 || $[112] !== openButtonPadding || $[113] !== openButtonProps || $[114] !== handleOpenClick || $[115] !== openButtonBoxPadding ? (t42 = !disabled && !readOnly && openButton ? /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { "aria-label": "Open", disabled: expanded, fontSize: fontSize2, icon: icons.ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, $[107] = disabled, $[108] = readOnly, $[109] = openButton, $[110] = expanded, $[111] = fontSize2, $[112] = openButtonPadding, $[113] = openButtonProps, $[114] = handleOpenClick, $[115] = openButtonBoxPadding, $[116] = t42) : t42 = $[116], t41 = t42;
|
|
5290
|
-
const openButtonNode = t41;
|
|
5291
|
-
let t43;
|
|
5292
|
-
bb1: {
|
|
5293
|
-
if (query === null) {
|
|
5294
|
-
if (value !== null) {
|
|
5295
|
-
let t442;
|
|
5296
|
-
$[117] !== renderValue || $[118] !== value || $[119] !== currentOption ? (t442 = renderValue(value, currentOption), $[117] = renderValue, $[118] = value, $[119] = currentOption, $[120] = t442) : t442 = $[120], t43 = t442;
|
|
5297
|
-
break bb1;
|
|
5298
|
-
}
|
|
5299
|
-
t43 = "";
|
|
5300
|
-
break bb1;
|
|
5301
|
-
}
|
|
5302
|
-
t43 = query;
|
|
5303
|
-
}
|
|
5304
|
-
const inputValue = t43, t44 = loading && AnimatedSpinnerIcon, t45 = suffix || openButtonNode;
|
|
5305
|
-
let t46;
|
|
5306
|
-
$[121] !== restProps || $[122] !== activeItemId || $[123] !== expanded || $[124] !== listBoxId || $[125] !== border2 || $[126] !== clearButton || $[127] !== customValidity || $[128] !== disabled || $[129] !== fontSize2 || $[130] !== icon || $[131] !== t44 || $[132] !== id || $[133] !== handleInputChange || $[134] !== handleClearButtonClick || $[135] !== handleInputFocus || $[136] !== padding || $[137] !== prefix || $[138] !== radius || $[139] !== readOnly || $[140] !== t45 || $[141] !== inputValue ? (t46 = /* @__PURE__ */ jsxRuntime.jsx(TextInput, { ...restProps, "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", border: border2, clearButton, customValidity, disabled, fontSize: fontSize2, icon, iconRight: t44, id, inputMode: "search", onChange: handleInputChange, onClear: handleClearButtonClick, onFocus: handleInputFocus, padding, prefix, radius, readOnly, ref: setInputElement, role: "combobox", spellCheck: !1, suffix: t45, value: inputValue }), $[121] = restProps, $[122] = activeItemId, $[123] = expanded, $[124] = listBoxId, $[125] = border2, $[126] = clearButton, $[127] = customValidity, $[128] = disabled, $[129] = fontSize2, $[130] = icon, $[131] = t44, $[132] = id, $[133] = handleInputChange, $[134] = handleClearButtonClick, $[135] = handleInputFocus, $[136] = padding, $[137] = prefix, $[138] = radius, $[139] = readOnly, $[140] = t45, $[141] = inputValue, $[142] = t46) : t46 = $[142];
|
|
5307
|
-
const input = t46;
|
|
5308
|
-
let t47;
|
|
5309
|
-
$[143] !== listFocused || $[144] !== inputElement ? (t47 = (event_5) => {
|
|
5310
|
-
event_5.key === "Tab" && listFocused && inputElement?.focus();
|
|
5311
|
-
}, $[143] = listFocused, $[144] = inputElement, $[145] = t47) : t47 = $[145];
|
|
5312
|
-
const handleListBoxKeyDown = t47;
|
|
5313
|
-
let t48;
|
|
5314
|
-
bb2: {
|
|
5315
|
-
if (filteredOptions.length === 0) {
|
|
5316
|
-
t48 = null;
|
|
5317
|
-
break bb2;
|
|
5318
|
-
}
|
|
5319
|
-
let t492;
|
|
5320
|
-
if ($[146] !== activeValue || $[147] !== currentOption || $[148] !== id || $[149] !== handleOptionSelect || $[150] !== renderOption || $[151] !== loading || $[152] !== listFocused || $[153] !== filteredOptions) {
|
|
5321
|
-
let t503;
|
|
5322
|
-
$[155] !== activeValue || $[156] !== currentOption || $[157] !== id || $[158] !== handleOptionSelect || $[159] !== renderOption || $[160] !== loading || $[161] !== listFocused ? (t503 = (option_0) => {
|
|
5323
|
-
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
5324
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: react.cloneElement(renderOption(option_0), {
|
|
5325
|
-
disabled: loading,
|
|
5326
|
-
selected: active,
|
|
5327
|
-
tabIndex: listFocused && active ? 0 : -1
|
|
5328
|
-
}) }, option_0.value);
|
|
5329
|
-
}, $[155] = activeValue, $[156] = currentOption, $[157] = id, $[158] = handleOptionSelect, $[159] = renderOption, $[160] = loading, $[161] = listFocused, $[162] = t503) : t503 = $[162], t492 = filteredOptions.map(t503), $[146] = activeValue, $[147] = currentOption, $[148] = id, $[149] = handleOptionSelect, $[150] = renderOption, $[151] = loading, $[152] = listFocused, $[153] = filteredOptions, $[154] = t492;
|
|
5330
|
-
} else
|
|
5331
|
-
t492 = $[154];
|
|
5332
|
-
let t502;
|
|
5333
|
-
$[163] !== listBoxId || $[164] !== t492 ? (t502 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: t492 }), $[163] = listBoxId, $[164] = t492, $[165] = t502) : t502 = $[165];
|
|
5334
|
-
let t51;
|
|
5335
|
-
$[166] !== handleListBoxKeyDown || $[167] !== listBox || $[168] !== t502 ? (t51 = /* @__PURE__ */ jsxRuntime.jsx(ListBox, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: t502 }), $[166] = handleListBoxKeyDown, $[167] = listBox, $[168] = t502, $[169] = t51) : t51 = $[169], t48 = t51;
|
|
5336
|
-
}
|
|
5337
|
-
const content = t48;
|
|
5338
|
-
let t49;
|
|
5339
|
-
bb3: {
|
|
5340
|
-
if (renderPopover) {
|
|
5341
|
-
const t503 = !expanded;
|
|
5342
|
-
let t51;
|
|
5343
|
-
$[170] !== content || $[171] !== t503 || $[172] !== inputElement || $[173] !== resultsPopoverElement || $[174] !== renderPopover ? (t51 = renderPopover({
|
|
5344
|
-
content,
|
|
5345
|
-
hidden: t503,
|
|
5346
|
-
inputElement,
|
|
5347
|
-
onMouseEnter: handlePopoverMouseEnter,
|
|
5348
|
-
onMouseLeave: handlePopoverMouseLeave
|
|
5349
|
-
}, {
|
|
5350
|
-
current: resultsPopoverElement
|
|
5351
|
-
}), $[170] = content, $[171] = t503, $[172] = inputElement, $[173] = resultsPopoverElement, $[174] = renderPopover, $[175] = t51) : t51 = $[175], t49 = t51;
|
|
5352
|
-
break bb3;
|
|
5353
|
-
}
|
|
5354
|
-
if (filteredOptionsLen === 0) {
|
|
5355
|
-
t49 = null;
|
|
5356
|
-
break bb3;
|
|
5357
|
-
}
|
|
5358
|
-
let t502;
|
|
5359
|
-
$[176] !== content || $[177] !== expanded || $[178] !== radius || $[179] !== inputElement || $[180] !== popover ? (t502 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { arrow: !1, constrainSize: !0, content, fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS, matchReferenceWidth: !0, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, open: expanded, overflow: "auto", placement: AUTOCOMPLETE_POPOVER_PLACEMENT, portal: !0, radius, ref: setResultsPopoverElement, referenceElement: inputElement, ...popover }), $[176] = content, $[177] = expanded, $[178] = radius, $[179] = inputElement, $[180] = popover, $[181] = t502) : t502 = $[181], t49 = t502;
|
|
5360
|
-
}
|
|
5361
|
-
const results = t49;
|
|
5362
|
-
let t50;
|
|
5363
|
-
return $[182] !== handleRootBlur || $[183] !== handleRootKeyDown || $[184] !== input || $[185] !== results ? (t50 = /* @__PURE__ */ jsxRuntime.jsxs(Root$9, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: setRootElement, children: [
|
|
5191
|
+
};
|
|
5192
|
+
}, [disabled, handleClearButtonFocus, loading, value]), openButtonBoxPadding = react.useMemo(() => padding.map((v_0) => v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2), [padding]), openButtonPadding = react.useMemo(() => padding.map((v_1) => Math.max(v_1 - 1, 0)), [padding]), openButtonProps = react.useMemo(() => typeof openButton == "object" ? openButton : EMPTY_RECORD, [openButton]), handleOpenClick = react.useCallback((event_4) => {
|
|
5193
|
+
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
5194
|
+
}, [openButtonProps, dispatchOpen]), openButtonNode = react.useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { "aria-label": "Open", disabled: expanded, fontSize: fontSize2, icon: icons.ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, [disabled, expanded, fontSize2, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]), inputValue = react.useMemo(() => query === null ? value !== null ? renderValue(value, currentOption) : "" : query, [currentOption, query, renderValue, value]), input = /* @__PURE__ */ jsxRuntime.jsx(TextInput, { ...restProps, "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", border: border2, clearButton, customValidity, disabled, fontSize: fontSize2, icon, iconRight: loading && AnimatedSpinnerIcon, id, inputMode: "search", onChange: handleInputChange, onClear: handleClearButtonClick, onFocus: handleInputFocus, padding, prefix, radius, readOnly, ref: inputElementRef, role: "combobox", spellCheck: !1, suffix: suffix || openButtonNode, value: inputValue }), handleListBoxKeyDown = react.useCallback((event_5) => {
|
|
5195
|
+
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
5196
|
+
}, [listFocused]), content = react.useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ListBox, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: filteredOptions.map((option_0) => {
|
|
5197
|
+
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
5198
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: react.cloneElement(renderOption(option_0), {
|
|
5199
|
+
disabled: loading,
|
|
5200
|
+
selected: active,
|
|
5201
|
+
tabIndex: listFocused && active ? 0 : -1
|
|
5202
|
+
}) }, option_0.value);
|
|
5203
|
+
}) }) }), [activeValue, currentOption, filteredOptions, handleOptionSelect, handleListBoxKeyDown, id, listBox, listBoxId, listFocused, loading, renderOption]), results = react.useMemo(() => renderPopover ? renderPopover({
|
|
5204
|
+
content,
|
|
5205
|
+
hidden: !expanded,
|
|
5206
|
+
inputElement: inputElementRef.current,
|
|
5207
|
+
onMouseEnter: handlePopoverMouseEnter,
|
|
5208
|
+
onMouseLeave: handlePopoverMouseLeave
|
|
5209
|
+
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(Popover, { arrow: !1, constrainSize: !0, content, fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS, matchReferenceWidth: !0, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, open: expanded, overflow: "auto", placement: AUTOCOMPLETE_POPOVER_PLACEMENT, portal: !0, radius, ref: resultsPopoverElementRef, referenceElement: inputElementRef.current, ...popover }), [content, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, radius, renderPopover]);
|
|
5210
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Root$9, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
|
|
5364
5211
|
input,
|
|
5365
5212
|
results
|
|
5366
|
-
] })
|
|
5213
|
+
] });
|
|
5367
5214
|
});
|
|
5368
5215
|
InnerAutocomplete.displayName = "ForwardRef(Autocomplete)";
|
|
5369
5216
|
const Autocomplete = InnerAutocomplete, Root$8 = styledComponents.styled.ol`
|
|
@@ -5528,24 +5375,24 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5528
5375
|
autoFocus && ref.current && focusFirstDescendant(ref.current);
|
|
5529
5376
|
}, t3 = [autoFocus, ref], $[2] = autoFocus, $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]), react.useEffect(t2, t3);
|
|
5530
5377
|
let t4;
|
|
5531
|
-
$[5] !==
|
|
5378
|
+
$[5] !== boundaryElement || $[6] !== isTopLayer || $[7] !== onClose || $[8] !== portalElement ? (t4 = (event) => {
|
|
5532
5379
|
if (!isTopLayer || !onClose)
|
|
5533
5380
|
return;
|
|
5534
5381
|
const target = document.activeElement;
|
|
5535
5382
|
target && !isTargetWithinScope(boundaryElement, portalElement, target) || event.key === "Escape" && (event.preventDefault(), event.stopPropagation(), onClose());
|
|
5536
|
-
}, $[5] =
|
|
5383
|
+
}, $[5] = boundaryElement, $[6] = isTopLayer, $[7] = onClose, $[8] = portalElement, $[9] = t4) : t4 = $[9], useGlobalKeyDown(t4);
|
|
5537
5384
|
let t5;
|
|
5538
|
-
$[10] !==
|
|
5385
|
+
$[10] !== boundaryElement || $[11] !== isTopLayer || $[12] !== onClickOutside || $[13] !== portalElement ? (t5 = isTopLayer && onClickOutside && ((event_0) => {
|
|
5539
5386
|
const target_0 = event_0.target;
|
|
5540
5387
|
target_0 && !isTargetWithinScope(boundaryElement, portalElement, target_0) || onClickOutside();
|
|
5541
|
-
}), $[10] =
|
|
5388
|
+
}), $[10] = boundaryElement, $[11] = isTopLayer, $[12] = onClickOutside, $[13] = portalElement, $[14] = t5) : t5 = $[14];
|
|
5542
5389
|
let t6;
|
|
5543
5390
|
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => [ref.current], $[15] = t6) : t6 = $[15], useClickOutsideEvent(t5, t6);
|
|
5544
5391
|
let t7;
|
|
5545
|
-
$[16] !==
|
|
5392
|
+
$[16] !== header || $[17] !== labelId || $[18] !== onClose || $[19] !== showCloseButton || $[20] !== showHeader ? (t7 = showHeader && /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "flex-start", padding: 3, children: [
|
|
5546
5393
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsxRuntime.jsx(Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
|
|
5547
5394
|
showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { "aria-label": "Close dialog", disabled: !onClose, icon: icons.CloseIcon, mode: "bleed", onClick: onClose, padding: 2 }) })
|
|
5548
|
-
] }) }), $[16] =
|
|
5395
|
+
] }) }), $[16] = header, $[17] = labelId, $[18] = onClose, $[19] = showCloseButton, $[20] = showHeader, $[21] = t7) : t7 = $[21];
|
|
5549
5396
|
let t8;
|
|
5550
5397
|
$[22] !== children ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { flex: 1, ref: contentRef, tabIndex: -1, children }), $[22] = children, $[23] = t8) : t8 = $[23];
|
|
5551
5398
|
let t9;
|
|
@@ -5559,14 +5406,14 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5559
5406
|
let t11;
|
|
5560
5407
|
$[30] !== radius || $[31] !== scheme || $[32] !== shadow || $[33] !== t10 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(DialogCardRoot, { radius, ref, scheme, shadow, children: t10 }), $[30] = radius, $[31] = scheme, $[32] = shadow, $[33] = t10, $[34] = t11) : t11 = $[34];
|
|
5561
5408
|
let t12;
|
|
5562
|
-
return $[35] !==
|
|
5409
|
+
return $[35] !== t11 || $[36] !== width ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(DialogContainer, { "data-ui": "DialogCard", width, children: t11 }), $[35] = t11, $[36] = width, $[37] = t12) : t12 = $[37], t12;
|
|
5563
5410
|
});
|
|
5564
5411
|
DialogCard.displayName = "ForwardRef(DialogCard)";
|
|
5565
5412
|
const Dialog = react.forwardRef(function(props, ref) {
|
|
5566
5413
|
const $ = reactCompilerRuntime.c(60), dialog = useDialog(), {
|
|
5567
5414
|
layer
|
|
5568
5415
|
} = useTheme_v2();
|
|
5569
|
-
let
|
|
5416
|
+
let _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;
|
|
5570
5417
|
$[0] !== props ? ({
|
|
5571
5418
|
__unstable_autoFocus: t0,
|
|
5572
5419
|
__unstable_hideCloseButton: t1,
|
|
@@ -5589,7 +5436,7 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
5589
5436
|
zOffset: _zOffsetProp,
|
|
5590
5437
|
animate: t6,
|
|
5591
5438
|
...restProps
|
|
5592
|
-
} = props, $[0] = props, $[1] =
|
|
5439
|
+
} = props, $[0] = props, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = children, $[4] = contentRef, $[5] = footer, $[6] = header, $[7] = id, $[8] = onActivate, $[9] = onClickOutside, $[10] = onClose, $[11] = onFocus, $[12] = portalProp, $[13] = restProps, $[14] = scheme, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6) : (_positionProp = $[1], _zOffsetProp = $[2], children = $[3], contentRef = $[4], footer = $[5], header = $[6], id = $[7], onActivate = $[8], onClickOutside = $[9], onClose = $[10], onFocus = $[11], portalProp = $[12], restProps = $[13], scheme = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21]);
|
|
5593
5440
|
const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : t1, cardRadiusProp = t2 === void 0 ? 4 : t2, cardShadow = t3 === void 0 ? 3 : t3, paddingProp = t4 === void 0 ? 3 : t4, widthProp = t5 === void 0 ? 0 : t5, _animate = t6 === void 0 ? !1 : t6, positionProp = _positionProp ?? (dialog.position || "fixed"), zOffsetProp = _zOffsetProp ?? (dialog.zOffset || layer.dialog.zOffset), animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, cardRadius = useArrayProp(cardRadiusProp), padding = useArrayProp(paddingProp), position = useArrayProp(positionProp), width = useArrayProp(widthProp), zOffset = useArrayProp(zOffsetProp), preDivRef = react.useRef(null), postDivRef = react.useRef(null), cardRef = react.useRef(null), focusedElementRef = react.useRef(null);
|
|
5594
5441
|
let t7;
|
|
5595
5442
|
$[22] !== onFocus ? (t7 = (event) => {
|
|
@@ -5625,15 +5472,15 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
5625
5472
|
let t9;
|
|
5626
5473
|
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: preDivRef, tabIndex: 0 }), $[27] = t9) : t9 = $[27];
|
|
5627
5474
|
let t10;
|
|
5628
|
-
$[28] !== autoFocus || $[29] !==
|
|
5475
|
+
$[28] !== autoFocus || $[29] !== cardRadius || $[30] !== cardShadow || $[31] !== children || $[32] !== contentRef || $[33] !== footer || $[34] !== header || $[35] !== hideCloseButton || $[36] !== id || $[37] !== onClickOutside || $[38] !== onClose || $[39] !== portalProp || $[40] !== scheme || $[41] !== width ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(DialogCard, { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, contentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: cardRadius, ref: cardRef, scheme, shadow: cardShadow, width, children }), $[28] = autoFocus, $[29] = cardRadius, $[30] = cardShadow, $[31] = children, $[32] = contentRef, $[33] = footer, $[34] = header, $[35] = hideCloseButton, $[36] = id, $[37] = onClickOutside, $[38] = onClose, $[39] = portalProp, $[40] = scheme, $[41] = width, $[42] = t10) : t10 = $[42];
|
|
5629
5476
|
let t11;
|
|
5630
5477
|
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: postDivRef, tabIndex: 0 }), $[43] = t11) : t11 = $[43];
|
|
5631
5478
|
let t12;
|
|
5632
|
-
$[44] !==
|
|
5479
|
+
$[44] !== animate || $[45] !== handleFocus || $[46] !== handleRootClick || $[47] !== id || $[48] !== labelId || $[49] !== onActivate || $[50] !== padding || $[51] !== position || $[52] !== ref || $[53] !== restProps || $[54] !== t10 || $[55] !== zOffset ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs(Root$7, { ...restProps, $animate: animate, $padding: padding, $position: position, "aria-labelledby": labelId, "aria-modal": !0, "data-ui": "Dialog", id, onActivate, onClick: handleRootClick, onFocus: handleFocus, ref, role: "dialog", zOffset, children: [
|
|
5633
5480
|
t9,
|
|
5634
5481
|
t10,
|
|
5635
5482
|
t11
|
|
5636
|
-
] }), $[44] =
|
|
5483
|
+
] }), $[44] = animate, $[45] = handleFocus, $[46] = handleRootClick, $[47] = id, $[48] = labelId, $[49] = onActivate, $[50] = padding, $[51] = position, $[52] = ref, $[53] = restProps, $[54] = t10, $[55] = zOffset, $[56] = t12) : t12 = $[56];
|
|
5637
5484
|
let t13;
|
|
5638
5485
|
return $[57] !== portalProp || $[58] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: portalProp, children: t12 }), $[57] = portalProp, $[58] = t12, $[59] = t13) : t13 = $[59], t13;
|
|
5639
5486
|
});
|
|
@@ -5652,7 +5499,7 @@ function DialogProvider(props) {
|
|
|
5652
5499
|
}, $[0] = position, $[1] = zOffset, $[2] = t1) : t1 = $[2], t0 = t1;
|
|
5653
5500
|
const contextValue = t0;
|
|
5654
5501
|
let t2;
|
|
5655
|
-
return $[3] !==
|
|
5502
|
+
return $[3] !== children || $[4] !== contextValue ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(DialogContext.Provider, { value: contextValue, children }), $[3] = children, $[4] = contextValue, $[5] = t2) : t2 = $[5], t2;
|
|
5656
5503
|
}
|
|
5657
5504
|
DialogProvider.displayName = "DialogProvider";
|
|
5658
5505
|
const Root$6 = styledComponents.styled.kbd`
|
|
@@ -5668,7 +5515,7 @@ const Root$6 = styledComponents.styled.kbd`
|
|
|
5668
5515
|
}
|
|
5669
5516
|
`, Hotkeys = react.forwardRef(function(props, ref) {
|
|
5670
5517
|
const $ = reactCompilerRuntime.c(24);
|
|
5671
|
-
let
|
|
5518
|
+
let fontSize2, keys, padding, radius, restProps, t0;
|
|
5672
5519
|
$[0] !== props ? ({
|
|
5673
5520
|
fontSize: fontSize2,
|
|
5674
5521
|
keys,
|
|
@@ -5676,22 +5523,22 @@ const Root$6 = styledComponents.styled.kbd`
|
|
|
5676
5523
|
radius,
|
|
5677
5524
|
space: t0,
|
|
5678
5525
|
...restProps
|
|
5679
|
-
} = props, $[0] = props, $[1] =
|
|
5526
|
+
} = props, $[0] = props, $[1] = fontSize2, $[2] = keys, $[3] = padding, $[4] = radius, $[5] = restProps, $[6] = t0) : (fontSize2 = $[1], keys = $[2], padding = $[3], radius = $[4], restProps = $[5], t0 = $[6]);
|
|
5680
5527
|
const space = useArrayProp(t0 === void 0 ? 0.5 : t0);
|
|
5681
5528
|
if (!keys || keys.length === 0) {
|
|
5682
5529
|
let t12;
|
|
5683
5530
|
return $[7] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[7] = t12) : t12 = $[7], t12;
|
|
5684
5531
|
}
|
|
5685
5532
|
let t1;
|
|
5686
|
-
if ($[8] !== fontSize2 || $[9] !==
|
|
5533
|
+
if ($[8] !== fontSize2 || $[9] !== keys || $[10] !== padding || $[11] !== radius) {
|
|
5687
5534
|
let t22;
|
|
5688
|
-
$[13] !== fontSize2 || $[14] !== padding || $[15] !== radius ? (t22 = (key2, i) => /* @__PURE__ */ jsxRuntime.jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i), $[13] = fontSize2, $[14] = padding, $[15] = radius, $[16] = t22) : t22 = $[16], t1 = keys.map(t22), $[8] = fontSize2, $[9] =
|
|
5535
|
+
$[13] !== fontSize2 || $[14] !== padding || $[15] !== radius ? (t22 = (key2, i) => /* @__PURE__ */ jsxRuntime.jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i), $[13] = fontSize2, $[14] = padding, $[15] = radius, $[16] = t22) : t22 = $[16], t1 = keys.map(t22), $[8] = fontSize2, $[9] = keys, $[10] = padding, $[11] = radius, $[12] = t1;
|
|
5689
5536
|
} else
|
|
5690
5537
|
t1 = $[12];
|
|
5691
5538
|
let t2;
|
|
5692
5539
|
$[17] !== space || $[18] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Inline, { as: "span", space, children: t1 }), $[17] = space, $[18] = t1, $[19] = t2) : t2 = $[19];
|
|
5693
5540
|
let t3;
|
|
5694
|
-
return $[20] !==
|
|
5541
|
+
return $[20] !== ref || $[21] !== restProps || $[22] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Root$6, { "data-ui": "Hotkeys", ...restProps, ref, children: t2 }), $[20] = ref, $[21] = restProps, $[22] = t2, $[23] = t3) : t3 = $[23], t3;
|
|
5695
5542
|
});
|
|
5696
5543
|
Hotkeys.displayName = "ForwardRef(Hotkeys)";
|
|
5697
5544
|
const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
|
|
@@ -5837,7 +5684,7 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
5837
5684
|
overflow: auto;
|
|
5838
5685
|
`, Menu = react.forwardRef(function(props, forwardedRef) {
|
|
5839
5686
|
const $ = reactCompilerRuntime.c(50);
|
|
5840
|
-
let
|
|
5687
|
+
let _shouldFocus, children, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
|
|
5841
5688
|
if ($[0] !== props) {
|
|
5842
5689
|
const {
|
|
5843
5690
|
children: t22,
|
|
@@ -5855,9 +5702,9 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
5855
5702
|
space: t122,
|
|
5856
5703
|
...t132
|
|
5857
5704
|
} = props;
|
|
5858
|
-
children = t22, onClickOutside = t32, onEscape = t42, onItemClick = t52, onItemSelect = t62, onKeyDown = t72, originElement = t82, t0 = t92, registerElement = t102, _shouldFocus = t112, t1 = t122, restProps = t132, $[0] = props, $[1] =
|
|
5705
|
+
children = t22, onClickOutside = t32, onEscape = t42, onItemClick = t52, onItemSelect = t62, onKeyDown = t72, originElement = t82, t0 = t92, registerElement = t102, _shouldFocus = t112, t1 = t122, restProps = t132, $[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;
|
|
5859
5706
|
} else
|
|
5860
|
-
|
|
5707
|
+
_shouldFocus = $[1], children = $[2], onClickOutside = $[3], onEscape = $[4], onItemClick = $[5], onItemSelect = $[6], onKeyDown = $[7], originElement = $[8], registerElement = $[9], restProps = $[10], t0 = $[11], t1 = $[12];
|
|
5861
5708
|
const padding = t0 === void 0 ? 1 : t0, space = t1 === void 0 ? 1 : t1, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = react.useRef(null);
|
|
5862
5709
|
let t2;
|
|
5863
5710
|
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[13] = t2) : t2 = $[13], react.useImperativeHandle(forwardedRef, t2);
|
|
@@ -5885,9 +5732,9 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
5885
5732
|
}, $[18] = registerElement, $[19] = t4) : t4 = $[19];
|
|
5886
5733
|
const handleRefChange = t4;
|
|
5887
5734
|
let t5, t6;
|
|
5888
|
-
$[20] !==
|
|
5735
|
+
$[20] !== activeIndex || $[21] !== onItemSelect ? (t5 = () => {
|
|
5889
5736
|
onItemSelect && onItemSelect(activeIndex);
|
|
5890
|
-
}, t6 = [activeIndex, onItemSelect], $[20] =
|
|
5737
|
+
}, t6 = [activeIndex, onItemSelect], $[20] = activeIndex, $[21] = onItemSelect, $[22] = t5, $[23] = t6) : (t5 = $[22], t6 = $[23]), react.useEffect(t5, t6);
|
|
5891
5738
|
let t7;
|
|
5892
5739
|
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => [ref.current], $[24] = t7) : t7 = $[24], useClickOutsideEvent(isTopLayer && onClickOutside, t7);
|
|
5893
5740
|
let t8;
|
|
@@ -5895,7 +5742,7 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
5895
5742
|
isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
|
|
5896
5743
|
}, $[25] = isTopLayer, $[26] = onEscape, $[27] = t8) : t8 = $[27], useGlobalKeyDown(t8);
|
|
5897
5744
|
let t9, t10;
|
|
5898
|
-
$[28] !== activeElement || $[29] !== activeIndex || $[30] !==
|
|
5745
|
+
$[28] !== activeElement || $[29] !== activeIndex || $[30] !== handleItemMouseEnter || $[31] !== handleItemMouseLeave || $[32] !== mount || $[33] !== onClickOutside || $[34] !== onEscape || $[35] !== onItemClick || $[36] !== registerElement ? (t10 = {
|
|
5899
5746
|
version: 0,
|
|
5900
5747
|
activeElement,
|
|
5901
5748
|
activeIndex,
|
|
@@ -5908,14 +5755,14 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
5908
5755
|
registerElement,
|
|
5909
5756
|
onMouseEnter: handleItemMouseEnter,
|
|
5910
5757
|
onMouseLeave: handleItemMouseLeave
|
|
5911
|
-
}, $[28] = activeElement, $[29] = activeIndex, $[30] =
|
|
5758
|
+
}, $[28] = activeElement, $[29] = activeIndex, $[30] = handleItemMouseEnter, $[31] = handleItemMouseLeave, $[32] = mount, $[33] = onClickOutside, $[34] = onEscape, $[35] = onItemClick, $[36] = registerElement, $[37] = t10) : t10 = $[37], t9 = t10;
|
|
5912
5759
|
const value = t9;
|
|
5913
5760
|
let t11;
|
|
5914
|
-
$[38] !==
|
|
5761
|
+
$[38] !== children || $[39] !== space ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { space, children }), $[38] = children, $[39] = space, $[40] = t11) : t11 = $[40];
|
|
5915
5762
|
let t12;
|
|
5916
|
-
$[41] !==
|
|
5763
|
+
$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t11 ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Root$5, { "data-ui": "Menu", ...restProps, onKeyDown: handleKeyDown, padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t11 }), $[41] = handleKeyDown, $[42] = handleRefChange, $[43] = padding, $[44] = restProps, $[45] = t11, $[46] = t12) : t12 = $[46];
|
|
5917
5764
|
let t13;
|
|
5918
|
-
return $[47] !==
|
|
5765
|
+
return $[47] !== t12 || $[48] !== value ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: t12 }), $[47] = t12, $[48] = value, $[49] = t13) : t13 = $[49], t13;
|
|
5919
5766
|
});
|
|
5920
5767
|
Menu.displayName = "ForwardRef(Menu)";
|
|
5921
5768
|
const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
@@ -5983,9 +5830,9 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
5983
5830
|
}, $[16] = buttonElement, $[17] = menuElements, $[18] = t12) : t12 = $[18];
|
|
5984
5831
|
const handleMenuClickOutside = t12;
|
|
5985
5832
|
let t13;
|
|
5986
|
-
$[19] !==
|
|
5833
|
+
$[19] !== buttonElement || $[20] !== disableRestoreFocusOnClose ? (t13 = () => {
|
|
5987
5834
|
setOpen(!1), !disableRestoreFocusOnClose && buttonElement && buttonElement.focus();
|
|
5988
|
-
}, $[19] =
|
|
5835
|
+
}, $[19] = buttonElement, $[20] = disableRestoreFocusOnClose, $[21] = t13) : t13 = $[21];
|
|
5989
5836
|
const handleMenuEscape = t13;
|
|
5990
5837
|
let t14;
|
|
5991
5838
|
$[22] !== menuElements ? (t14 = (event_2) => {
|
|
@@ -5999,15 +5846,15 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
5999
5846
|
}, $[22] = menuElements, $[23] = t14) : t14 = $[23];
|
|
6000
5847
|
const handleBlur = t14;
|
|
6001
5848
|
let t15;
|
|
6002
|
-
$[24] !==
|
|
5849
|
+
$[24] !== buttonElement || $[25] !== disableRestoreFocusOnClose ? (t15 = () => {
|
|
6003
5850
|
setOpen(!1), !disableRestoreFocusOnClose && buttonElement && buttonElement.focus();
|
|
6004
|
-
}, $[24] =
|
|
5851
|
+
}, $[24] = buttonElement, $[25] = disableRestoreFocusOnClose, $[26] = t15) : t15 = $[26];
|
|
6005
5852
|
const handleItemClick = t15;
|
|
6006
5853
|
let t16;
|
|
6007
5854
|
$[27] === Symbol.for("react.memo_cache_sentinel") ? (t16 = (el_1) => (setChildMenuElements((els) => els.concat([el_1])), () => setChildMenuElements((els_0) => els_0.filter((_el) => _el !== el_1))), $[27] = t16) : t16 = $[27];
|
|
6008
5855
|
const registerElement = t16;
|
|
6009
5856
|
let t17;
|
|
6010
|
-
$[28] !==
|
|
5857
|
+
$[28] !== buttonElement || $[29] !== handleBlur || $[30] !== handleItemClick || $[31] !== handleMenuClickOutside || $[32] !== handleMenuEscape || $[33] !== id || $[34] !== menuProp || $[35] !== shouldFocus ? (t17 = menuProp && react.cloneElement(menuProp, {
|
|
6011
5858
|
"aria-labelledby": id,
|
|
6012
5859
|
onBlurCapture: handleBlur,
|
|
6013
5860
|
onClickOutside: handleMenuClickOutside,
|
|
@@ -6016,10 +5863,10 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6016
5863
|
originElement: buttonElement,
|
|
6017
5864
|
registerElement,
|
|
6018
5865
|
shouldFocus
|
|
6019
|
-
}), $[28] =
|
|
5866
|
+
}), $[28] = buttonElement, $[29] = handleBlur, $[30] = handleItemClick, $[31] = handleMenuClickOutside, $[32] = handleMenuEscape, $[33] = id, $[34] = menuProp, $[35] = shouldFocus, $[36] = t17) : t17 = $[36];
|
|
6020
5867
|
const menu = t17;
|
|
6021
5868
|
let t18, t19;
|
|
6022
|
-
$[37] !== buttonProp || $[38] !==
|
|
5869
|
+
$[37] !== buttonProp || $[38] !== handleMouseDown || $[39] !== id || $[40] !== open ? (t19 = buttonProp && react.cloneElement(buttonProp, {
|
|
6023
5870
|
"data-ui": "MenuButton",
|
|
6024
5871
|
id,
|
|
6025
5872
|
onClick: handleButtonClick,
|
|
@@ -6029,14 +5876,14 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6029
5876
|
"aria-expanded": open,
|
|
6030
5877
|
ref: setButtonElement,
|
|
6031
5878
|
selected: buttonProp.props.selected ?? open
|
|
6032
|
-
}), $[37] = buttonProp, $[38] =
|
|
5879
|
+
}), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t19) : t19 = $[41], t18 = t19;
|
|
6033
5880
|
const button = t18;
|
|
6034
5881
|
let t20, t21;
|
|
6035
5882
|
$[42] !== buttonElement ? (t20 = () => buttonElement, t21 = [buttonElement], $[42] = buttonElement, $[43] = t20, $[44] = t21) : (t20 = $[43], t21 = $[44]), react.useImperativeHandle(forwardedRef, t20, t21);
|
|
6036
5883
|
let t22, t23;
|
|
6037
5884
|
$[45] !== popover ? (t23 = popover || {}, $[45] = popover, $[46] = t23) : t23 = $[46];
|
|
6038
5885
|
let t24;
|
|
6039
|
-
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !==
|
|
5886
|
+
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 = {
|
|
6040
5887
|
boundaryElement: deprecated_boundaryElement,
|
|
6041
5888
|
overflow: "auto",
|
|
6042
5889
|
placement: deprecated_placement,
|
|
@@ -6045,12 +5892,12 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6045
5892
|
radius: deprecated_popoverRadius,
|
|
6046
5893
|
scheme: deprecated_popoverScheme,
|
|
6047
5894
|
...t23
|
|
6048
|
-
}, $[47] = deprecated_boundaryElement, $[48] = deprecated_placement, $[49] =
|
|
5895
|
+
}, $[47] = deprecated_boundaryElement, $[48] = deprecated_placement, $[49] = deprecated_popoverRadius, $[50] = deprecated_popoverScheme, $[51] = deprecated_portal, $[52] = deprecated_preventOverflow, $[53] = t23, $[54] = t24) : t24 = $[54], t22 = t24;
|
|
6049
5896
|
const popoverProps = t22;
|
|
6050
5897
|
let t25;
|
|
6051
5898
|
$[55] !== button ? (t25 = button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[55] = button, $[56] = t25) : t25 = $[56];
|
|
6052
5899
|
let t26;
|
|
6053
|
-
return $[57] !==
|
|
5900
|
+
return $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t25 ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: t25 }), $[57] = menu, $[58] = open, $[59] = popoverProps, $[60] = t25, $[61] = t26) : t26 = $[61], t26;
|
|
6054
5901
|
});
|
|
6055
5902
|
MenuButton.displayName = "ForwardRef(MenuButton)";
|
|
6056
5903
|
const MenuDivider = styledComponents.styled.hr`
|
|
@@ -6172,7 +6019,7 @@ function useMenu() {
|
|
|
6172
6019
|
}
|
|
6173
6020
|
function MenuGroup(props) {
|
|
6174
6021
|
const $ = reactCompilerRuntime.c(77);
|
|
6175
|
-
let
|
|
6022
|
+
let IconComponent, children, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
|
|
6176
6023
|
$[0] !== props ? ({
|
|
6177
6024
|
as: t0,
|
|
6178
6025
|
children,
|
|
@@ -6186,7 +6033,7 @@ function MenuGroup(props) {
|
|
|
6186
6033
|
text,
|
|
6187
6034
|
tone: t5,
|
|
6188
6035
|
...restProps
|
|
6189
|
-
} = props, $[0] = props, $[1] =
|
|
6036
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] = onClick, $[4] = popover, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = t4, $[11] = t5, $[12] = text) : (IconComponent = $[1], children = $[2], onClick = $[3], popover = $[4], restProps = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9], t4 = $[10], t5 = $[11], text = $[12]);
|
|
6190
6037
|
const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, menu = useMenu(), {
|
|
6191
6038
|
scheme
|
|
6192
6039
|
} = useRootTheme(), {
|
|
@@ -6241,7 +6088,7 @@ function MenuGroup(props) {
|
|
|
6241
6088
|
return () => cancelAnimationFrame(rafId);
|
|
6242
6089
|
}, t18 = [shouldFocus], $[32] = shouldFocus, $[33] = t17, $[34] = t18) : (t17 = $[33], t18 = $[34]), react.useEffect(t17, t18);
|
|
6243
6090
|
let t19;
|
|
6244
|
-
$[35] !==
|
|
6091
|
+
$[35] !== children || $[36] !== handleChildItemClick || $[37] !== handleMenuKeyDown || $[38] !== onClickOutside || $[39] !== onEscape || $[40] !== registerElement || $[41] !== shouldFocus ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(Menu, { onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), $[35] = children, $[36] = handleChildItemClick, $[37] = handleMenuKeyDown, $[38] = onClickOutside, $[39] = onEscape, $[40] = registerElement, $[41] = shouldFocus, $[42] = t19) : t19 = $[42];
|
|
6245
6092
|
const childMenu = t19;
|
|
6246
6093
|
let t20;
|
|
6247
6094
|
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t20 = (event_2) => {
|
|
@@ -6264,20 +6111,20 @@ function MenuGroup(props) {
|
|
|
6264
6111
|
let t29;
|
|
6265
6112
|
$[51] !== fontSize2 ? (t29 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children: t28 }), $[51] = fontSize2, $[52] = t29) : t29 = $[52];
|
|
6266
6113
|
let t30;
|
|
6267
|
-
$[53] !==
|
|
6114
|
+
$[53] !== padding || $[54] !== space || $[55] !== t26 || $[56] !== t27 || $[57] !== t29 ? (t30 = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: space, padding, children: [
|
|
6268
6115
|
t26,
|
|
6269
6116
|
t27,
|
|
6270
6117
|
t29
|
|
6271
|
-
] }), $[53] =
|
|
6118
|
+
] }), $[53] = padding, $[54] = space, $[55] = t26, $[56] = t27, $[57] = t29, $[58] = t30) : t30 = $[58];
|
|
6272
6119
|
let t31;
|
|
6273
|
-
$[59] !== as || $[60] !==
|
|
6120
|
+
$[59] !== as || $[60] !== handleClick || $[61] !== handleMouseEnter || $[62] !== restProps || $[63] !== scheme || $[64] !== t21 || $[65] !== t22 || $[66] !== t23 || $[67] !== t24 || $[68] !== t25 || $[69] !== t30 || $[70] !== tone ? (t31 = /* @__PURE__ */ jsxRuntime.jsx(Selectable, { "data-as": as, "data-ui": "MenuGroup", forwardedAs: as, ...restProps, "aria-pressed": t21, "data-pressed": t22, "data-selected": t23, $radius: t24, $tone: tone, $scheme: scheme, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, ref: setRootElement, tabIndex: -1, type: t25, children: t30 }), $[59] = as, $[60] = handleClick, $[61] = handleMouseEnter, $[62] = restProps, $[63] = scheme, $[64] = t21, $[65] = t22, $[66] = t23, $[67] = t24, $[68] = t25, $[69] = t30, $[70] = tone, $[71] = t31) : t31 = $[71];
|
|
6274
6121
|
let t32;
|
|
6275
|
-
return $[72] !==
|
|
6122
|
+
return $[72] !== childMenu || $[73] !== open || $[74] !== popover || $[75] !== t31 ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: t31 }), $[72] = childMenu, $[73] = open, $[74] = popover, $[75] = t31, $[76] = t32) : t32 = $[76], t32;
|
|
6276
6123
|
}
|
|
6277
6124
|
MenuGroup.displayName = "MenuGroup";
|
|
6278
6125
|
const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
6279
6126
|
const $ = reactCompilerRuntime.c(74);
|
|
6280
|
-
let
|
|
6127
|
+
let IconComponent, IconRightComponent, children, disabled, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
|
|
6281
6128
|
$[0] !== props ? ({
|
|
6282
6129
|
as: t0,
|
|
6283
6130
|
children,
|
|
@@ -6301,7 +6148,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6301
6148
|
text,
|
|
6302
6149
|
tone: t5,
|
|
6303
6150
|
...restProps
|
|
6304
|
-
} = props, $[0] = props, $[1] =
|
|
6151
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = hotkeys, $[6] = onClick, $[7] = paddingBottom, $[8] = paddingLeft, $[9] = paddingRight, $[10] = paddingTop, $[11] = paddingX, $[12] = paddingY, $[13] = pressed, $[14] = restProps, $[15] = selectedProp, $[16] = t0, $[17] = t1, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = t5, $[22] = text) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], hotkeys = $[5], onClick = $[6], paddingBottom = $[7], paddingLeft = $[8], paddingRight = $[9], paddingTop = $[10], paddingX = $[11], paddingY = $[12], pressed = $[13], restProps = $[14], selectedProp = $[15], t0 = $[16], t1 = $[17], t2 = $[18], t3 = $[19], t4 = $[20], t5 = $[21], text = $[22]);
|
|
6305
6152
|
const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, {
|
|
6306
6153
|
scheme
|
|
6307
6154
|
} = useRootTheme(), menu = useMenu(), {
|
|
@@ -6321,7 +6168,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6321
6168
|
}, $[29] = disabled, $[30] = onClick, $[31] = onItemClick, $[32] = t9) : t9 = $[32];
|
|
6322
6169
|
const handleClick = t9;
|
|
6323
6170
|
let t10, t11;
|
|
6324
|
-
$[33] !== padding || $[34] !==
|
|
6171
|
+
$[33] !== padding || $[34] !== paddingBottom || $[35] !== paddingLeft || $[36] !== paddingRight || $[37] !== paddingTop || $[38] !== paddingX || $[39] !== paddingY ? (t11 = {
|
|
6325
6172
|
padding,
|
|
6326
6173
|
paddingX,
|
|
6327
6174
|
paddingY,
|
|
@@ -6329,7 +6176,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6329
6176
|
paddingRight,
|
|
6330
6177
|
paddingBottom,
|
|
6331
6178
|
paddingLeft
|
|
6332
|
-
}, $[33] = padding, $[34] =
|
|
6179
|
+
}, $[33] = padding, $[34] = paddingBottom, $[35] = paddingLeft, $[36] = paddingRight, $[37] = paddingTop, $[38] = paddingX, $[39] = paddingY, $[40] = t11) : t11 = $[40], t10 = t11;
|
|
6333
6180
|
const paddingProps = t10, t12 = useArrayProp(fontSize2);
|
|
6334
6181
|
let t13;
|
|
6335
6182
|
$[41] !== t12 ? (t13 = t12.map(_temp$1), $[41] = t12, $[42] = t13) : t13 = $[42];
|
|
@@ -6340,7 +6187,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6340
6187
|
}, $[43] = t14) : t14 = $[43];
|
|
6341
6188
|
const setRef = t14, t15 = as === "button" && pressed, t16 = as !== "button" && pressed ? "" : void 0, t17 = active ? "" : void 0, t18 = disabled ? "" : void 0, t19 = useArrayProp(radius), t20 = useArrayProp(0), t21 = disabled ? "default" : tone, t22 = as === "button" ? "button" : void 0;
|
|
6342
6189
|
let t23;
|
|
6343
|
-
$[44] !== IconComponent || $[45] !==
|
|
6190
|
+
$[44] !== IconComponent || $[45] !== IconRightComponent || $[46] !== fontSize2 || $[47] !== hotkeys || $[48] !== hotkeysFontSize || $[49] !== paddingProps || $[50] !== space || $[51] !== text ? (t23 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", gap: space, align: "center", ...paddingProps, children: [
|
|
6344
6191
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
6345
6192
|
react.isValidElement(IconComponent) && IconComponent,
|
|
6346
6193
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
@@ -6354,14 +6201,14 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6354
6201
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
6355
6202
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
6356
6203
|
] })
|
|
6357
|
-
] }), $[44] = IconComponent, $[45] =
|
|
6204
|
+
] }), $[44] = IconComponent, $[45] = IconRightComponent, $[46] = fontSize2, $[47] = hotkeys, $[48] = hotkeysFontSize, $[49] = paddingProps, $[50] = space, $[51] = text, $[52] = t23) : t23 = $[52];
|
|
6358
6205
|
let t24;
|
|
6359
6206
|
$[53] !== children || $[54] !== paddingProps ? (t24 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...paddingProps, children }), $[53] = children, $[54] = paddingProps, $[55] = t24) : t24 = $[55];
|
|
6360
6207
|
let t25;
|
|
6361
|
-
return $[56] !==
|
|
6208
|
+
return $[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 ? (t25 = /* @__PURE__ */ jsxRuntime.jsxs(Selectable, { "data-ui": "MenuItem", ...restProps, "aria-pressed": t15, "data-pressed": t16, "data-selected": t17, "data-disabled": t18, forwardedAs: as, $radius: t19, $padding: t20, $tone: t21, $scheme: scheme, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, role: "menuitem", tabIndex: -1, type: t22, children: [
|
|
6362
6209
|
t23,
|
|
6363
6210
|
t24
|
|
6364
|
-
] }), $[56] =
|
|
6211
|
+
] }), $[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, $[73] = t25) : t25 = $[73], t25;
|
|
6365
6212
|
});
|
|
6366
6213
|
MenuItem.displayName = "ForwardRef(MenuItem)";
|
|
6367
6214
|
function _temp$1(s) {
|
|
@@ -6409,13 +6256,13 @@ const keyframe = styledComponents.keyframes`
|
|
|
6409
6256
|
}
|
|
6410
6257
|
`, Root$4 = styledComponents.styled(Box)(responsiveRadiusStyle, skeletonStyle), Skeleton = react.forwardRef(function(props, ref) {
|
|
6411
6258
|
const $ = reactCompilerRuntime.c(14);
|
|
6412
|
-
let
|
|
6259
|
+
let delay, radius, restProps, t0;
|
|
6413
6260
|
$[0] !== props ? ({
|
|
6414
6261
|
animated: t0,
|
|
6415
6262
|
delay,
|
|
6416
6263
|
radius,
|
|
6417
6264
|
...restProps
|
|
6418
|
-
} = props, $[0] = props, $[1] =
|
|
6265
|
+
} = props, $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0) : (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]);
|
|
6419
6266
|
const animated = t0 === void 0 ? !1 : t0, [visible, setVisible] = react.useState(!delay);
|
|
6420
6267
|
let t1, t2;
|
|
6421
6268
|
$[5] !== delay ? (t1 = () => {
|
|
@@ -6430,7 +6277,7 @@ const keyframe = styledComponents.keyframes`
|
|
|
6430
6277
|
}, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2) : (t1 = $[6], t2 = $[7]), react.useEffect(t1, t2);
|
|
6431
6278
|
const t3 = useArrayProp(radius);
|
|
6432
6279
|
let t4;
|
|
6433
|
-
return $[8] !==
|
|
6280
|
+
return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== visible ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Root$4, { ...restProps, $animated: animated, $radius: t3, $visible: visible, ref }), $[8] = animated, $[9] = ref, $[10] = restProps, $[11] = t3, $[12] = visible, $[13] = t4) : t4 = $[13], t4;
|
|
6434
6281
|
});
|
|
6435
6282
|
Skeleton.displayName = "ForwardRef(Skeleton)";
|
|
6436
6283
|
const Root$3 = styledComponents.styled(Skeleton)((props) => {
|
|
@@ -6449,57 +6296,57 @@ const Root$3 = styledComponents.styled(Skeleton)((props) => {
|
|
|
6449
6296
|
});
|
|
6450
6297
|
}), TextSkeleton = react.forwardRef(function(props, ref) {
|
|
6451
6298
|
const $ = reactCompilerRuntime.c(7);
|
|
6452
|
-
let
|
|
6299
|
+
let restProps, t0;
|
|
6453
6300
|
$[0] !== props ? ({
|
|
6454
6301
|
size: t0,
|
|
6455
6302
|
...restProps
|
|
6456
|
-
} = props, $[0] = props, $[1] =
|
|
6303
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6457
6304
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6458
6305
|
let t1;
|
|
6459
|
-
return $[3] !==
|
|
6306
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "text" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6460
6307
|
});
|
|
6461
6308
|
TextSkeleton.displayName = "ForwardRef(TextSkeleton)";
|
|
6462
6309
|
const LabelSkeleton = react.forwardRef(function(props, ref) {
|
|
6463
6310
|
const $ = reactCompilerRuntime.c(7);
|
|
6464
|
-
let
|
|
6311
|
+
let restProps, t0;
|
|
6465
6312
|
$[0] !== props ? ({
|
|
6466
6313
|
size: t0,
|
|
6467
6314
|
...restProps
|
|
6468
|
-
} = props, $[0] = props, $[1] =
|
|
6315
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6469
6316
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6470
6317
|
let t1;
|
|
6471
|
-
return $[3] !==
|
|
6318
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "label" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6472
6319
|
});
|
|
6473
6320
|
LabelSkeleton.displayName = "ForwardRef(LabelSkeleton)";
|
|
6474
6321
|
const HeadingSkeleton = react.forwardRef(function(props, ref) {
|
|
6475
6322
|
const $ = reactCompilerRuntime.c(7);
|
|
6476
|
-
let
|
|
6323
|
+
let restProps, t0;
|
|
6477
6324
|
$[0] !== props ? ({
|
|
6478
6325
|
size: t0,
|
|
6479
6326
|
...restProps
|
|
6480
|
-
} = props, $[0] = props, $[1] =
|
|
6327
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6481
6328
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6482
6329
|
let t1;
|
|
6483
|
-
return $[3] !==
|
|
6330
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "heading" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6484
6331
|
});
|
|
6485
6332
|
HeadingSkeleton.displayName = "ForwardRef(HeadingSkeleton)";
|
|
6486
6333
|
const CodeSkeleton = react.forwardRef(function(props, ref) {
|
|
6487
6334
|
const $ = reactCompilerRuntime.c(7);
|
|
6488
|
-
let
|
|
6335
|
+
let restProps, t0;
|
|
6489
6336
|
$[0] !== props ? ({
|
|
6490
6337
|
size: t0,
|
|
6491
6338
|
...restProps
|
|
6492
|
-
} = props, $[0] = props, $[1] =
|
|
6339
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6493
6340
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6494
6341
|
let t1;
|
|
6495
|
-
return $[3] !==
|
|
6342
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "code" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6496
6343
|
});
|
|
6497
6344
|
CodeSkeleton.displayName = "ForwardRef(CodeSkeleton)";
|
|
6498
6345
|
const CustomButton = styledComponents.styled(Button)`
|
|
6499
6346
|
max-width: 100%;
|
|
6500
6347
|
`, Tab = react.forwardRef(function(props, forwardedRef) {
|
|
6501
6348
|
const $ = reactCompilerRuntime.c(30);
|
|
6502
|
-
let
|
|
6349
|
+
let focused, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
|
|
6503
6350
|
$[0] !== props ? ({
|
|
6504
6351
|
icon,
|
|
6505
6352
|
id,
|
|
@@ -6511,7 +6358,7 @@ const CustomButton = styledComponents.styled(Button)`
|
|
|
6511
6358
|
padding: t1,
|
|
6512
6359
|
selected,
|
|
6513
6360
|
...restProps
|
|
6514
|
-
} = props, $[0] = props, $[1] =
|
|
6361
|
+
} = props, $[0] = props, $[1] = focused, $[2] = icon, $[3] = id, $[4] = label, $[5] = onClick, $[6] = onFocus, $[7] = restProps, $[8] = selected, $[9] = t0, $[10] = t1) : (focused = $[1], icon = $[2], id = $[3], label = $[4], onClick = $[5], onFocus = $[6], restProps = $[7], selected = $[8], t0 = $[9], t1 = $[10]);
|
|
6515
6362
|
const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = react.useRef(null), focusedRef = react.useRef(!1);
|
|
6516
6363
|
let t2;
|
|
6517
6364
|
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], react.useImperativeHandle(forwardedRef, t2);
|
|
@@ -6531,7 +6378,7 @@ const CustomButton = styledComponents.styled(Button)`
|
|
|
6531
6378
|
}, t6 = [focused], $[15] = focused, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), react.useEffect(t5, t6);
|
|
6532
6379
|
const t7 = selected ? "true" : "false", t8 = selected ? 0 : -1;
|
|
6533
6380
|
let t9;
|
|
6534
|
-
return $[18] !==
|
|
6381
|
+
return $[18] !== fontSize2 || $[19] !== handleFocus || $[20] !== icon || $[21] !== id || $[22] !== label || $[23] !== onClick || $[24] !== padding || $[25] !== restProps || $[26] !== selected || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(CustomButton, { "data-ui": "Tab", ...restProps, "aria-selected": t7, fontSize: fontSize2, icon, id, mode: "bleed", onClick, onBlur: handleBlur, onFocus: handleFocus, padding, ref, role: "tab", selected, tabIndex: t8, text: label, type: "button" }), $[18] = fontSize2, $[19] = handleFocus, $[20] = icon, $[21] = id, $[22] = label, $[23] = onClick, $[24] = padding, $[25] = restProps, $[26] = selected, $[27] = t7, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
|
|
6535
6382
|
});
|
|
6536
6383
|
Tab.displayName = "ForwardRef(Tab)";
|
|
6537
6384
|
const CustomInline = styledComponents.styled(Inline)`
|
|
@@ -6567,19 +6414,19 @@ const CustomInline = styledComponents.styled(Inline)`
|
|
|
6567
6414
|
}, $[8] = numTabs, $[9] = t1) : t1 = $[9];
|
|
6568
6415
|
const handleKeyDown = t1;
|
|
6569
6416
|
let t2;
|
|
6570
|
-
return $[10] !==
|
|
6417
|
+
return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(CustomInline, { "data-ui": "TabList", ...restProps, onKeyDown: handleKeyDown, ref, role: "tablist", children: tabs }), $[10] = handleKeyDown, $[11] = ref, $[12] = restProps, $[13] = tabs, $[14] = t2) : t2 = $[14], t2;
|
|
6571
6418
|
});
|
|
6572
6419
|
TabList.displayName = "ForwardRef(TabList)";
|
|
6573
6420
|
const TabPanel = react.forwardRef(function(props, ref) {
|
|
6574
6421
|
const $ = reactCompilerRuntime.c(9);
|
|
6575
|
-
let
|
|
6422
|
+
let flex, restProps;
|
|
6576
6423
|
$[0] !== props ? ({
|
|
6577
6424
|
flex,
|
|
6578
6425
|
...restProps
|
|
6579
|
-
} = props, $[0] = props, $[1] =
|
|
6426
|
+
} = props, $[0] = props, $[1] = flex, $[2] = restProps) : (flex = $[1], restProps = $[2]);
|
|
6580
6427
|
const t0 = props.tabIndex === void 0 ? 0 : props.tabIndex;
|
|
6581
6428
|
let t1;
|
|
6582
|
-
return $[3] !==
|
|
6429
|
+
return $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "TabPanel", ...restProps, flex, ref, role: "tabpanel", tabIndex: t0, children: props.children }), $[3] = flex, $[4] = props.children, $[5] = ref, $[6] = restProps, $[7] = t0, $[8] = t1) : t1 = $[8], t1;
|
|
6583
6430
|
});
|
|
6584
6431
|
TabPanel.displayName = "ForwardRef(TabPanel)";
|
|
6585
6432
|
const TextBox = styledComponents.styled(Flex)`
|
|
@@ -6644,7 +6491,7 @@ const STATUS_CARD_TONE = {
|
|
|
6644
6491
|
}, Root$2 = styledComponents.styled(Card)(rootStyles);
|
|
6645
6492
|
function Toast(props) {
|
|
6646
6493
|
const $ = reactCompilerRuntime.c(30);
|
|
6647
|
-
let
|
|
6494
|
+
let closable, description, duration, onClose, restProps, status, t0, title;
|
|
6648
6495
|
$[0] !== props ? ({
|
|
6649
6496
|
closable,
|
|
6650
6497
|
description,
|
|
@@ -6654,7 +6501,7 @@ function Toast(props) {
|
|
|
6654
6501
|
title,
|
|
6655
6502
|
status,
|
|
6656
6503
|
...restProps
|
|
6657
|
-
} = props, $[0] = props, $[1] =
|
|
6504
|
+
} = props, $[0] = props, $[1] = closable, $[2] = description, $[3] = duration, $[4] = onClose, $[5] = restProps, $[6] = status, $[7] = t0, $[8] = title) : (closable = $[1], description = $[2], duration = $[3], onClose = $[4], restProps = $[5], status = $[6], t0 = $[7], title = $[8]);
|
|
6658
6505
|
const radius = t0 === void 0 ? 3 : t0, cardTone = status ? STATUS_CARD_TONE[status] : "default", buttonTone = status ? BUTTON_TONE[status] : "default", role = status ? ROLES[status] : "status";
|
|
6659
6506
|
let t1;
|
|
6660
6507
|
$[9] !== title ? (t1 = title && /* @__PURE__ */ jsxRuntime.jsx(Text, { size: 1, weight: "medium", children: title }), $[9] = title, $[10] = t1) : t1 = $[10];
|
|
@@ -6666,16 +6513,16 @@ function Toast(props) {
|
|
|
6666
6513
|
t2
|
|
6667
6514
|
] }) }), $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15];
|
|
6668
6515
|
let t4;
|
|
6669
|
-
$[16] !==
|
|
6516
|
+
$[16] !== buttonTone || $[17] !== closable || $[18] !== onClose ? (t4 = closable && /* @__PURE__ */ jsxRuntime.jsx(Box, { padding: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { as: "button", icon: icons.CloseIcon, mode: "bleed", padding: 2, tone: buttonTone, onClick: onClose, style: {
|
|
6670
6517
|
verticalAlign: "top"
|
|
6671
|
-
} }) }), $[16] =
|
|
6518
|
+
} }) }), $[16] = buttonTone, $[17] = closable, $[18] = onClose, $[19] = t4) : t4 = $[19];
|
|
6672
6519
|
let t5;
|
|
6673
6520
|
$[20] !== t3 || $[21] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { align: "flex-start", children: [
|
|
6674
6521
|
t3,
|
|
6675
6522
|
t4
|
|
6676
6523
|
] }), $[20] = t3, $[21] = t4, $[22] = t5) : t5 = $[22];
|
|
6677
6524
|
let t6;
|
|
6678
|
-
return $[23] !==
|
|
6525
|
+
return $[23] !== cardTone || $[24] !== duration || $[25] !== radius || $[26] !== restProps || $[27] !== role || $[28] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$2, { "data-ui": "Toast", role, ...restProps, marginTop: 3, radius, shadow: 2, tone: cardTone, $duration: duration, children: t5 }), $[23] = cardTone, $[24] = duration, $[25] = radius, $[26] = restProps, $[27] = role, $[28] = t5, $[29] = t6) : t6 = $[29], t6;
|
|
6679
6526
|
}
|
|
6680
6527
|
Toast.displayName = "Toast";
|
|
6681
6528
|
function useMounted() {
|
|
@@ -6792,7 +6639,7 @@ function ToastProvider(props) {
|
|
|
6792
6639
|
toastsRef.current = {};
|
|
6793
6640
|
}, t13 = [], $[10] = t12, $[11] = t13) : (t12 = $[10], t13 = $[11]), react.useEffect(t12, t13);
|
|
6794
6641
|
let t14;
|
|
6795
|
-
$[12] !== mounted || $[13] !==
|
|
6642
|
+
$[12] !== mounted || $[13] !== padding || $[14] !== paddingX || $[15] !== paddingY || $[16] !== prefersReducedMotion || $[17] !== state || $[18] !== variants || $[19] !== zOffset ? (t14 = mounted && /* @__PURE__ */ jsxRuntime.jsx(Root$1, { "data-ui": "ToastProvider", zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(ToastContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(Box, { padding, paddingX, paddingY, children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: !1, children: state.map((t152) => {
|
|
6796
6643
|
const {
|
|
6797
6644
|
dismiss: dismiss_0,
|
|
6798
6645
|
id: id_0,
|
|
@@ -6805,7 +6652,7 @@ function ToastProvider(props) {
|
|
|
6805
6652
|
damping: 30,
|
|
6806
6653
|
stiffness: 400
|
|
6807
6654
|
}, children: /* @__PURE__ */ jsxRuntime.jsx(Toast, { closable: params_0.closable, description: params_0.description, onClose: dismiss_0, status: params_0.status, title: params_0.title, duration: params_0.duration }) }, id_0);
|
|
6808
|
-
}) }) }) }) }), $[12] = mounted, $[13] =
|
|
6655
|
+
}) }) }) }) }), $[12] = mounted, $[13] = padding, $[14] = paddingX, $[15] = paddingY, $[16] = prefersReducedMotion, $[17] = state, $[18] = variants, $[19] = zOffset, $[20] = t14) : t14 = $[20];
|
|
6809
6656
|
let t15;
|
|
6810
6657
|
return $[21] !== children || $[22] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
|
|
6811
6658
|
children,
|
|
@@ -6877,13 +6724,13 @@ function _focusItemElement(el) {
|
|
|
6877
6724
|
}
|
|
6878
6725
|
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null), Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
6879
6726
|
const $ = reactCompilerRuntime.c(37);
|
|
6880
|
-
let
|
|
6727
|
+
let children, onFocus, restProps, t0;
|
|
6881
6728
|
$[0] !== props ? ({
|
|
6882
6729
|
children,
|
|
6883
6730
|
space: t0,
|
|
6884
6731
|
onFocus,
|
|
6885
6732
|
...restProps
|
|
6886
|
-
} = props, $[0] = props, $[1] =
|
|
6733
|
+
} = props, $[0] = props, $[1] = children, $[2] = onFocus, $[3] = restProps, $[4] = t0) : (children = $[1], onFocus = $[2], restProps = $[3], t0 = $[4]);
|
|
6887
6734
|
const space = t0 === void 0 ? 1 : t0, ref = react.useRef(null), [focusedElement, setFocusedElement] = react.useState(null), focusedElementRef = react.useRef(focusedElement);
|
|
6888
6735
|
let t1, t2;
|
|
6889
6736
|
$[5] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[5] = t2) : t2 = $[5], t1 = t2;
|
|
@@ -6937,7 +6784,7 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
6937
6784
|
let t12;
|
|
6938
6785
|
const t13 = focusedElement || itemElements[0] || null;
|
|
6939
6786
|
let t14;
|
|
6940
|
-
$[17] !==
|
|
6787
|
+
$[17] !== space || $[18] !== state || $[19] !== t13 ? (t14 = {
|
|
6941
6788
|
version: 0,
|
|
6942
6789
|
focusedElement: t13,
|
|
6943
6790
|
level: 0,
|
|
@@ -6947,7 +6794,7 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
6947
6794
|
setFocusedElement,
|
|
6948
6795
|
space,
|
|
6949
6796
|
state
|
|
6950
|
-
}, $[17] =
|
|
6797
|
+
}, $[17] = space, $[18] = state, $[19] = t13, $[20] = t14) : t14 = $[20], t12 = t14;
|
|
6951
6798
|
const contextValue = t12;
|
|
6952
6799
|
let t15;
|
|
6953
6800
|
$[21] !== itemElements ? (t15 = (event) => {
|
|
@@ -7026,7 +6873,7 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
7026
6873
|
let t18;
|
|
7027
6874
|
$[26] !== children ? (t18 = [children], $[26] = children, $[27] = t18) : t18 = $[27], react.useEffect(t17, t18);
|
|
7028
6875
|
let t19;
|
|
7029
|
-
$[28] !==
|
|
6876
|
+
$[28] !== children || $[29] !== handleFocus || $[30] !== handleKeyDown || $[31] !== restProps || $[32] !== space ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "data-ui": "Tree", ...restProps, onFocus: handleFocus, onKeyDown: handleKeyDown, ref, role: "tree", space, children }), $[28] = children, $[29] = handleFocus, $[30] = handleKeyDown, $[31] = restProps, $[32] = space, $[33] = t19) : t19 = $[33];
|
|
7030
6877
|
let t20;
|
|
7031
6878
|
return $[34] !== contextValue || $[35] !== t19 ? (t20 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t19 }), $[34] = contextValue, $[35] = t19, $[36] = t20) : t20 = $[36], t20;
|
|
7032
6879
|
}));
|
|
@@ -7131,15 +6978,15 @@ function useTree() {
|
|
|
7131
6978
|
}
|
|
7132
6979
|
const TreeGroup = react.memo(function(props) {
|
|
7133
6980
|
const $ = reactCompilerRuntime.c(9);
|
|
7134
|
-
let
|
|
6981
|
+
let children, restProps, t0;
|
|
7135
6982
|
$[0] !== props ? ({
|
|
7136
6983
|
children,
|
|
7137
6984
|
expanded: t0,
|
|
7138
6985
|
...restProps
|
|
7139
|
-
} = props, $[0] = props, $[1] =
|
|
6986
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
7140
6987
|
const expanded = t0 === void 0 ? !1 : t0, tree = useTree(), t1 = !expanded;
|
|
7141
6988
|
let t2;
|
|
7142
|
-
return $[4] !==
|
|
6989
|
+
return $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.space ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "data-ui": "TreeGroup", ...restProps, hidden: t1, marginTop: tree.space, role: "group", space: tree.space, children }), $[4] = children, $[5] = restProps, $[6] = t1, $[7] = tree.space, $[8] = t2) : t2 = $[8], t2;
|
|
7143
6990
|
}), Root = react.memo(styledComponents.styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styledComponents.styled(Box).attrs({
|
|
7144
6991
|
forwardedAs: "a"
|
|
7145
6992
|
})(treeItemBoxStyle), ToggleArrowText = styledComponents.styled(Text)`
|