@sanity/ui 2.10.11 → 2.10.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks-cjs/getTheme_v2.js +41 -41
- package/dist/_chunks-cjs/getTheme_v2.js.map +1 -1
- package/dist/_chunks-es/getTheme_v2.mjs +41 -41
- package/dist/_chunks-es/getTheme_v2.mjs.map +1 -1
- package/dist/_legacy/getTheme_v2.esm.js +41 -41
- package/dist/_legacy/getTheme_v2.esm.js.map +1 -1
- package/dist/index.esm.js +466 -1751
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +466 -1751
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +466 -1751
- package/dist/index.mjs.map +1 -1
- package/dist/theme.esm.js +261 -318
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +261 -318
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +261 -318
- package/dist/theme.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ function rem(pixelValue) {
|
|
|
35
35
|
return pixelValue === 0 ? 0 : `${pixelValue / 16}rem`;
|
|
36
36
|
}
|
|
37
37
|
function _responsive(media, values, callback) {
|
|
38
|
-
return (
|
|
38
|
+
return (values?.map(callback) || []).map((statement, mediaIndex) => mediaIndex === 0 ? statement : {
|
|
39
39
|
[`@media screen and (min-width: ${media[mediaIndex - 1]}px)`]: statement
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -150,8 +150,8 @@ function responsiveTextFont(props) {
|
|
|
150
150
|
function useArrayProp(val, defaultVal) {
|
|
151
151
|
const $ = reactCompilerRuntime.c(3);
|
|
152
152
|
let t0;
|
|
153
|
-
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val
|
|
154
|
-
const [t1, setCache] = react.useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val
|
|
153
|
+
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val ?? defaultVal)], $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2];
|
|
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
|
}
|
|
157
157
|
function _getElements(element, elementsArg) {
|
|
@@ -210,7 +210,7 @@ function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
|
210
210
|
const target = evt.target;
|
|
211
211
|
if (!(target instanceof Node))
|
|
212
212
|
return;
|
|
213
|
-
const resolvedBoundaryElement = boundaryElement
|
|
213
|
+
const resolvedBoundaryElement = boundaryElement?.();
|
|
214
214
|
if (resolvedBoundaryElement && !resolvedBoundaryElement.contains(target))
|
|
215
215
|
return;
|
|
216
216
|
const elements = elementsArg().flat();
|
|
@@ -237,8 +237,7 @@ function useCustomValidity(ref, customValidity) {
|
|
|
237
237
|
const $ = reactCompilerRuntime.c(6);
|
|
238
238
|
let t0;
|
|
239
239
|
$[0] !== customValidity || $[1] !== ref.current ? (t0 = () => {
|
|
240
|
-
|
|
241
|
-
(_a = ref.current) == null || _a.setCustomValidity(customValidity || "");
|
|
240
|
+
ref.current?.setCustomValidity(customValidity || "");
|
|
242
241
|
}, $[0] = customValidity, $[1] = ref.current, $[2] = t0) : t0 = $[2];
|
|
243
242
|
let t1;
|
|
244
243
|
$[3] !== customValidity || $[4] !== ref ? (t1 = [customValidity, ref], $[3] = customValidity, $[4] = ref, $[5] = t1) : t1 = $[5], react.useEffect(t0, t1);
|
|
@@ -299,7 +298,7 @@ var freeze = function(obj) {
|
|
|
299
298
|
var _a;
|
|
300
299
|
if (obj instanceof Element)
|
|
301
300
|
return !0;
|
|
302
|
-
var scope = (_a = obj
|
|
301
|
+
var scope = (_a = obj?.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
303
302
|
return !!(scope && obj instanceof scope.Element);
|
|
304
303
|
}, isReplacedElement = function(target) {
|
|
305
304
|
switch (target.tagName) {
|
|
@@ -575,8 +574,7 @@ function useElementSize(element) {
|
|
|
575
574
|
}, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), react.useEffect(t0, t1), size2;
|
|
576
575
|
}
|
|
577
576
|
function useElementRect(element) {
|
|
578
|
-
|
|
579
|
-
return (elementSize == null ? void 0 : elementSize._contentRect) || null;
|
|
577
|
+
return useElementSize(element)?._contentRect || null;
|
|
580
578
|
}
|
|
581
579
|
function useForwardedRef(ref) {
|
|
582
580
|
const $ = reactCompilerRuntime.c(1), innerRef = react.useRef(null);
|
|
@@ -625,10 +623,9 @@ function createGlobalScopedContext(key2, defaultValue) {
|
|
|
625
623
|
}
|
|
626
624
|
const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
|
|
627
625
|
function ThemeProvider(props) {
|
|
628
|
-
var _a, _b, _c2;
|
|
629
626
|
const $ = reactCompilerRuntime.c(15), parentTheme = react.useContext(ThemeContext), {
|
|
630
627
|
children
|
|
631
|
-
} = props, scheme =
|
|
628
|
+
} = props, scheme = props.scheme ?? (parentTheme?.scheme || "light"), rootTheme = props.theme ?? (parentTheme?.theme || null), tone = props.tone ?? (parentTheme?.tone || "default");
|
|
632
629
|
let t0;
|
|
633
630
|
bb0: {
|
|
634
631
|
if (!rootTheme) {
|
|
@@ -761,11 +758,10 @@ function responsiveBorderStyle() {
|
|
|
761
758
|
return [border, borderTop, borderRight, borderBottom, borderLeft];
|
|
762
759
|
}
|
|
763
760
|
function border(props) {
|
|
764
|
-
var _a, _b;
|
|
765
761
|
const {
|
|
766
762
|
card,
|
|
767
763
|
media
|
|
768
|
-
} = theme.getTheme_v2(props.theme), borderStyle = `${
|
|
764
|
+
} = theme.getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
769
765
|
return _responsive(media, props.$border, (value) => value ? {
|
|
770
766
|
"&&": {
|
|
771
767
|
border: borderStyle
|
|
@@ -777,11 +773,10 @@ function border(props) {
|
|
|
777
773
|
});
|
|
778
774
|
}
|
|
779
775
|
function borderTop(props) {
|
|
780
|
-
var _a, _b;
|
|
781
776
|
const {
|
|
782
777
|
card,
|
|
783
778
|
media
|
|
784
|
-
} = theme.getTheme_v2(props.theme), borderStyle = `${
|
|
779
|
+
} = theme.getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
785
780
|
return _responsive(media, props.$borderTop, (value) => value ? {
|
|
786
781
|
"&&": {
|
|
787
782
|
borderTop: borderStyle
|
|
@@ -793,11 +788,10 @@ function borderTop(props) {
|
|
|
793
788
|
});
|
|
794
789
|
}
|
|
795
790
|
function borderRight(props) {
|
|
796
|
-
var _a, _b;
|
|
797
791
|
const {
|
|
798
792
|
card,
|
|
799
793
|
media
|
|
800
|
-
} = theme.getTheme_v2(props.theme), borderStyle = `${
|
|
794
|
+
} = theme.getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
801
795
|
return _responsive(media, props.$borderRight, (value) => value ? {
|
|
802
796
|
"&&": {
|
|
803
797
|
borderRight: borderStyle
|
|
@@ -809,11 +803,10 @@ function borderRight(props) {
|
|
|
809
803
|
});
|
|
810
804
|
}
|
|
811
805
|
function borderBottom(props) {
|
|
812
|
-
var _a, _b;
|
|
813
806
|
const {
|
|
814
807
|
card,
|
|
815
808
|
media
|
|
816
|
-
} = theme.getTheme_v2(props.theme), borderStyle = `${
|
|
809
|
+
} = theme.getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
817
810
|
return _responsive(media, props.$borderBottom, (value) => value ? {
|
|
818
811
|
"&&": {
|
|
819
812
|
borderBottom: borderStyle
|
|
@@ -825,11 +818,10 @@ function borderBottom(props) {
|
|
|
825
818
|
});
|
|
826
819
|
}
|
|
827
820
|
function borderLeft(props) {
|
|
828
|
-
var _a, _b;
|
|
829
821
|
const {
|
|
830
822
|
card,
|
|
831
823
|
media
|
|
832
|
-
} = theme.getTheme_v2(props.theme), borderStyle = `${
|
|
824
|
+
} = theme.getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
833
825
|
return _responsive(media, props.$borderLeft, (value) => value ? {
|
|
834
826
|
"&&": {
|
|
835
827
|
borderLeft: borderStyle
|
|
@@ -1116,14 +1108,6 @@ function responsiveGridItemColumnEndStyle(props) {
|
|
|
1116
1108
|
gridColumnEnd: columnEnd
|
|
1117
1109
|
}));
|
|
1118
1110
|
}
|
|
1119
|
-
var __defProp$R = Object.defineProperty, __defProps$P = Object.defineProperties, __getOwnPropDescs$P = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$Q = Object.getOwnPropertySymbols, __hasOwnProp$Q = Object.prototype.hasOwnProperty, __propIsEnum$Q = Object.prototype.propertyIsEnumerable, __defNormalProp$R = (obj, key2, value) => key2 in obj ? __defProp$R(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$Q = (a, b) => {
|
|
1120
|
-
for (var prop in b || (b = {}))
|
|
1121
|
-
__hasOwnProp$Q.call(b, prop) && __defNormalProp$R(a, prop, b[prop]);
|
|
1122
|
-
if (__getOwnPropSymbols$Q)
|
|
1123
|
-
for (var prop of __getOwnPropSymbols$Q(b))
|
|
1124
|
-
__propIsEnum$Q.call(b, prop) && __defNormalProp$R(a, prop, b[prop]);
|
|
1125
|
-
return a;
|
|
1126
|
-
}, __spreadProps$P = (a, b) => __defProps$P(a, __getOwnPropDescs$P(b));
|
|
1127
1111
|
function responsiveInputPaddingStyle(props) {
|
|
1128
1112
|
const {
|
|
1129
1113
|
$fontSize,
|
|
@@ -1149,9 +1133,10 @@ function responsiveInputPaddingStyle(props) {
|
|
|
1149
1133
|
});
|
|
1150
1134
|
}
|
|
1151
1135
|
function responsiveInputPaddingIconRightStyle(props) {
|
|
1152
|
-
return responsiveInputPaddingStyle(
|
|
1136
|
+
return responsiveInputPaddingStyle({
|
|
1137
|
+
...props,
|
|
1153
1138
|
$iconRight: !0
|
|
1154
|
-
})
|
|
1139
|
+
});
|
|
1155
1140
|
}
|
|
1156
1141
|
const ROOT_STYLE = styledComponents.css`
|
|
1157
1142
|
&:not([hidden]) {
|
|
@@ -1474,22 +1459,6 @@ function labelBaseStyle(props) {
|
|
|
1474
1459
|
}
|
|
1475
1460
|
`;
|
|
1476
1461
|
}
|
|
1477
|
-
var __defProp$Q = Object.defineProperty, __defProps$O = Object.defineProperties, __getOwnPropDescs$O = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$P = Object.getOwnPropertySymbols, __hasOwnProp$P = Object.prototype.hasOwnProperty, __propIsEnum$P = Object.prototype.propertyIsEnumerable, __defNormalProp$Q = (obj, key2, value) => key2 in obj ? __defProp$Q(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$P = (a, b) => {
|
|
1478
|
-
for (var prop in b || (b = {}))
|
|
1479
|
-
__hasOwnProp$P.call(b, prop) && __defNormalProp$Q(a, prop, b[prop]);
|
|
1480
|
-
if (__getOwnPropSymbols$P)
|
|
1481
|
-
for (var prop of __getOwnPropSymbols$P(b))
|
|
1482
|
-
__propIsEnum$P.call(b, prop) && __defNormalProp$Q(a, prop, b[prop]);
|
|
1483
|
-
return a;
|
|
1484
|
-
}, __spreadProps$O = (a, b) => __defProps$O(a, __getOwnPropDescs$O(b)), __objRest$J = (source, exclude) => {
|
|
1485
|
-
var target = {};
|
|
1486
|
-
for (var prop in source)
|
|
1487
|
-
__hasOwnProp$P.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1488
|
-
if (source != null && __getOwnPropSymbols$P)
|
|
1489
|
-
for (var prop of __getOwnPropSymbols$P(source))
|
|
1490
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$P.call(source, prop) && (target[prop] = source[prop]);
|
|
1491
|
-
return target;
|
|
1492
|
-
};
|
|
1493
1462
|
const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), SpanWithTextOverflow$2 = styledComponents.styled.span`
|
|
1494
1463
|
display: block;
|
|
1495
1464
|
white-space: nowrap;
|
|
@@ -1497,26 +1466,18 @@ const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAl
|
|
|
1497
1466
|
overflow: hidden;
|
|
1498
1467
|
overflow: clip;
|
|
1499
1468
|
`, Label = react.forwardRef(function(props, ref) {
|
|
1500
|
-
var _a;
|
|
1501
1469
|
const $ = reactCompilerRuntime.c(22);
|
|
1502
1470
|
let accent, align, childrenProp, restProps, t0, t1, textOverflow, weight;
|
|
1503
|
-
$[0] !== props ? (
|
|
1471
|
+
$[0] !== props ? ({
|
|
1504
1472
|
accent,
|
|
1505
1473
|
align,
|
|
1506
1474
|
children: childrenProp,
|
|
1507
1475
|
muted: t0,
|
|
1508
1476
|
size: t1,
|
|
1509
1477
|
textOverflow,
|
|
1510
|
-
weight
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
"align",
|
|
1514
|
-
"children",
|
|
1515
|
-
"muted",
|
|
1516
|
-
"size",
|
|
1517
|
-
"textOverflow",
|
|
1518
|
-
"weight"
|
|
1519
|
-
]), $[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]);
|
|
1478
|
+
weight,
|
|
1479
|
+
...restProps
|
|
1480
|
+
} = 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]);
|
|
1520
1481
|
const muted = t0 === void 0 ? !1 : t0, size2 = t1 === void 0 ? 2 : t1;
|
|
1521
1482
|
let children = childrenProp;
|
|
1522
1483
|
if (textOverflow === "ellipsis") {
|
|
@@ -1528,7 +1489,7 @@ const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAl
|
|
|
1528
1489
|
}
|
|
1529
1490
|
const t2 = useArrayProp(align), t3 = useArrayProp(size2);
|
|
1530
1491
|
let t4;
|
|
1531
|
-
return $[13] !== accent || $[14] !== children || $[15] !== muted || $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== weight ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Root$C,
|
|
1492
|
+
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;
|
|
1532
1493
|
});
|
|
1533
1494
|
Label.displayName = "ForwardRef(Label)";
|
|
1534
1495
|
const avatarStyle = {
|
|
@@ -1674,29 +1635,12 @@ function avatarStrokeStyle() {
|
|
|
1674
1635
|
}
|
|
1675
1636
|
};
|
|
1676
1637
|
}
|
|
1677
|
-
var __defProp$P = Object.defineProperty, __defProps$N = Object.defineProperties, __getOwnPropDescs$N = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$O = Object.getOwnPropertySymbols, __hasOwnProp$O = Object.prototype.hasOwnProperty, __propIsEnum$O = Object.prototype.propertyIsEnumerable, __defNormalProp$P = (obj, key2, value) => key2 in obj ? __defProp$P(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$O = (a, b) => {
|
|
1678
|
-
for (var prop in b || (b = {}))
|
|
1679
|
-
__hasOwnProp$O.call(b, prop) && __defNormalProp$P(a, prop, b[prop]);
|
|
1680
|
-
if (__getOwnPropSymbols$O)
|
|
1681
|
-
for (var prop of __getOwnPropSymbols$O(b))
|
|
1682
|
-
__propIsEnum$O.call(b, prop) && __defNormalProp$P(a, prop, b[prop]);
|
|
1683
|
-
return a;
|
|
1684
|
-
}, __spreadProps$N = (a, b) => __defProps$N(a, __getOwnPropDescs$N(b)), __objRest$I = (source, exclude) => {
|
|
1685
|
-
var target = {};
|
|
1686
|
-
for (var prop in source)
|
|
1687
|
-
__hasOwnProp$O.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1688
|
-
if (source != null && __getOwnPropSymbols$O)
|
|
1689
|
-
for (var prop of __getOwnPropSymbols$O(source))
|
|
1690
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$O.call(source, prop) && (target[prop] = source[prop]);
|
|
1691
|
-
return target;
|
|
1692
|
-
};
|
|
1693
1638
|
const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyle.root), Arrow$1 = styledComponents.styled.div(avatarStyle.arrow), BgStroke = styledComponents.styled.ellipse(avatarStyle.bgStroke), Stroke = styledComponents.styled.ellipse(avatarStyle.stroke), Initials = styledComponents.styled.div(avatarStyle.initials), InitialsLabel = styledComponents.styled(Label)({
|
|
1694
1639
|
color: "inherit"
|
|
1695
1640
|
}), Image = styledComponents.styled.svg(avatarStyle.image), Avatar = react.forwardRef(function(props, ref) {
|
|
1696
|
-
var _a;
|
|
1697
1641
|
const $ = reactCompilerRuntime.c(52);
|
|
1698
1642
|
let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, restProps, src, t0, t1, t2, title;
|
|
1699
|
-
$[0] !== props ? (
|
|
1643
|
+
$[0] !== props ? ({
|
|
1700
1644
|
__unstable_hideInnerStroke,
|
|
1701
1645
|
as: asProp,
|
|
1702
1646
|
color: t0,
|
|
@@ -1707,20 +1651,9 @@ const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyl
|
|
|
1707
1651
|
arrowPosition: arrowPositionProp,
|
|
1708
1652
|
animateArrowFrom,
|
|
1709
1653
|
status: t1,
|
|
1710
|
-
size: t2
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
"as",
|
|
1714
|
-
"color",
|
|
1715
|
-
"src",
|
|
1716
|
-
"title",
|
|
1717
|
-
"initials",
|
|
1718
|
-
"onImageLoadError",
|
|
1719
|
-
"arrowPosition",
|
|
1720
|
-
"animateArrowFrom",
|
|
1721
|
-
"status",
|
|
1722
|
-
"size"
|
|
1723
|
-
]), $[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]);
|
|
1654
|
+
size: t2,
|
|
1655
|
+
...restProps
|
|
1656
|
+
} = 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]);
|
|
1724
1657
|
const color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, {
|
|
1725
1658
|
avatar
|
|
1726
1659
|
} = 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}`;
|
|
@@ -1755,11 +1688,11 @@ const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyl
|
|
|
1755
1688
|
let t13;
|
|
1756
1689
|
$[34] !== imageFailed || $[35] !== initials || $[36] !== initialsSize || $[37] !== 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 }) }) }), $[34] = imageFailed, $[35] = initials, $[36] = initialsSize, $[37] = src, $[38] = t13) : t13 = $[38];
|
|
1757
1690
|
let t14;
|
|
1758
|
-
return $[39] !== arrowPosition || $[40] !== as || $[41] !== color || $[42] !== ref || $[43] !== restProps || $[44] !== size2 || $[45] !== status || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== title ? (t14 = /* @__PURE__ */ jsxRuntime.jsxs(Root$B,
|
|
1691
|
+
return $[39] !== arrowPosition || $[40] !== as || $[41] !== color || $[42] !== ref || $[43] !== restProps || $[44] !== size2 || $[45] !== status || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== title ? (t14 = /* @__PURE__ */ 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: [
|
|
1759
1692
|
t11,
|
|
1760
1693
|
t12,
|
|
1761
1694
|
t13
|
|
1762
|
-
] })
|
|
1695
|
+
] }), $[39] = arrowPosition, $[40] = as, $[41] = color, $[42] = ref, $[43] = restProps, $[44] = size2, $[45] = status, $[46] = t10, $[47] = t11, $[48] = t12, $[49] = t13, $[50] = title, $[51] = t14) : t14 = $[51], t14;
|
|
1763
1696
|
});
|
|
1764
1697
|
Avatar.displayName = "ForwardRef(Avatar)";
|
|
1765
1698
|
function _temp$8(s) {
|
|
@@ -1818,22 +1751,6 @@ AvatarCounter.displayName = "ForwardRef(AvatarCounter)";
|
|
|
1818
1751
|
function _temp$7(s) {
|
|
1819
1752
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
1820
1753
|
}
|
|
1821
|
-
var __defProp$O = Object.defineProperty, __defProps$M = Object.defineProperties, __getOwnPropDescs$M = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$N = Object.getOwnPropertySymbols, __hasOwnProp$N = Object.prototype.hasOwnProperty, __propIsEnum$N = Object.prototype.propertyIsEnumerable, __defNormalProp$O = (obj, key2, value) => key2 in obj ? __defProp$O(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$N = (a, b) => {
|
|
1822
|
-
for (var prop in b || (b = {}))
|
|
1823
|
-
__hasOwnProp$N.call(b, prop) && __defNormalProp$O(a, prop, b[prop]);
|
|
1824
|
-
if (__getOwnPropSymbols$N)
|
|
1825
|
-
for (var prop of __getOwnPropSymbols$N(b))
|
|
1826
|
-
__propIsEnum$N.call(b, prop) && __defNormalProp$O(a, prop, b[prop]);
|
|
1827
|
-
return a;
|
|
1828
|
-
}, __spreadProps$M = (a, b) => __defProps$M(a, __getOwnPropDescs$M(b)), __objRest$H = (source, exclude) => {
|
|
1829
|
-
var target = {};
|
|
1830
|
-
for (var prop in source)
|
|
1831
|
-
__hasOwnProp$N.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1832
|
-
if (source != null && __getOwnPropSymbols$N)
|
|
1833
|
-
for (var prop of __getOwnPropSymbols$N(source))
|
|
1834
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$N.call(source, prop) && (target[prop] = source[prop]);
|
|
1835
|
-
return target;
|
|
1836
|
-
};
|
|
1837
1754
|
const BASE_STYLES = styledComponents.css`
|
|
1838
1755
|
white-space: nowrap;
|
|
1839
1756
|
|
|
@@ -1863,18 +1780,14 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
1863
1780
|
});
|
|
1864
1781
|
}
|
|
1865
1782
|
const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = react.forwardRef(function(props, ref) {
|
|
1866
|
-
var _a;
|
|
1867
1783
|
const $ = reactCompilerRuntime.c(15);
|
|
1868
1784
|
let childrenProp, restProps, t0, t1;
|
|
1869
|
-
$[0] !== props ? (
|
|
1785
|
+
$[0] !== props ? ({
|
|
1870
1786
|
children: childrenProp,
|
|
1871
1787
|
maxLength: t0,
|
|
1872
|
-
size: t1
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
"maxLength",
|
|
1876
|
-
"size"
|
|
1877
|
-
]), $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1) : (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]);
|
|
1788
|
+
size: t1,
|
|
1789
|
+
...restProps
|
|
1790
|
+
} = props, $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1) : (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]);
|
|
1878
1791
|
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 }) });
|
|
1879
1792
|
let t5;
|
|
1880
1793
|
$[5] !== size2 ? (t5 = (child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: react.cloneElement(child, {
|
|
@@ -1882,34 +1795,17 @@ const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avata
|
|
|
1882
1795
|
}) }, String(childIndex)), $[5] = size2, $[6] = t5) : t5 = $[6];
|
|
1883
1796
|
const t6 = visibleChildren.map(t5);
|
|
1884
1797
|
let t7;
|
|
1885
|
-
return $[7] !== T0 || $[8] !== ref || $[9] !== restProps || $[10] !== size2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs(T0,
|
|
1798
|
+
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: [
|
|
1886
1799
|
t3,
|
|
1887
1800
|
t4,
|
|
1888
1801
|
t6
|
|
1889
|
-
] })
|
|
1802
|
+
] }), $[7] = T0, $[8] = ref, $[9] = restProps, $[10] = size2, $[11] = t3, $[12] = t4, $[13] = t6, $[14] = t7) : t7 = $[14], t7;
|
|
1890
1803
|
});
|
|
1891
1804
|
AvatarStack.displayName = "ForwardRef(AvatarStack)";
|
|
1892
|
-
var __defProp$N = Object.defineProperty, __defProps$L = Object.defineProperties, __getOwnPropDescs$L = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$M = Object.getOwnPropertySymbols, __hasOwnProp$M = Object.prototype.hasOwnProperty, __propIsEnum$M = Object.prototype.propertyIsEnumerable, __defNormalProp$N = (obj, key2, value) => key2 in obj ? __defProp$N(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$M = (a, b) => {
|
|
1893
|
-
for (var prop in b || (b = {}))
|
|
1894
|
-
__hasOwnProp$M.call(b, prop) && __defNormalProp$N(a, prop, b[prop]);
|
|
1895
|
-
if (__getOwnPropSymbols$M)
|
|
1896
|
-
for (var prop of __getOwnPropSymbols$M(b))
|
|
1897
|
-
__propIsEnum$M.call(b, prop) && __defNormalProp$N(a, prop, b[prop]);
|
|
1898
|
-
return a;
|
|
1899
|
-
}, __spreadProps$L = (a, b) => __defProps$L(a, __getOwnPropDescs$L(b)), __objRest$G = (source, exclude) => {
|
|
1900
|
-
var target = {};
|
|
1901
|
-
for (var prop in source)
|
|
1902
|
-
__hasOwnProp$M.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1903
|
-
if (source != null && __getOwnPropSymbols$M)
|
|
1904
|
-
for (var prop of __getOwnPropSymbols$M(source))
|
|
1905
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$M.call(source, prop) && (target[prop] = source[prop]);
|
|
1906
|
-
return target;
|
|
1907
|
-
};
|
|
1908
1805
|
const Root$y = styledComponents.styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = react.forwardRef(function(props, ref) {
|
|
1909
|
-
var _a;
|
|
1910
1806
|
const $ = reactCompilerRuntime.c(59);
|
|
1911
1807
|
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;
|
|
1912
|
-
$[0] !== props ? (
|
|
1808
|
+
$[0] !== props ? ({
|
|
1913
1809
|
as: t0,
|
|
1914
1810
|
column,
|
|
1915
1811
|
columnStart,
|
|
@@ -1935,38 +1831,12 @@ const Root$y = styledComponents.styled.div(boxStyle, flexItemStyle, responsiveBo
|
|
|
1935
1831
|
row,
|
|
1936
1832
|
rowStart,
|
|
1937
1833
|
rowEnd,
|
|
1938
|
-
sizing
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
"column",
|
|
1942
|
-
"columnStart",
|
|
1943
|
-
"columnEnd",
|
|
1944
|
-
"display",
|
|
1945
|
-
"flex",
|
|
1946
|
-
"height",
|
|
1947
|
-
"margin",
|
|
1948
|
-
"marginX",
|
|
1949
|
-
"marginY",
|
|
1950
|
-
"marginTop",
|
|
1951
|
-
"marginRight",
|
|
1952
|
-
"marginBottom",
|
|
1953
|
-
"marginLeft",
|
|
1954
|
-
"overflow",
|
|
1955
|
-
"padding",
|
|
1956
|
-
"paddingX",
|
|
1957
|
-
"paddingY",
|
|
1958
|
-
"paddingTop",
|
|
1959
|
-
"paddingRight",
|
|
1960
|
-
"paddingBottom",
|
|
1961
|
-
"paddingLeft",
|
|
1962
|
-
"row",
|
|
1963
|
-
"rowStart",
|
|
1964
|
-
"rowEnd",
|
|
1965
|
-
"sizing"
|
|
1966
|
-
]), $[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]);
|
|
1834
|
+
sizing,
|
|
1835
|
+
...restProps
|
|
1836
|
+
} = 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]);
|
|
1967
1837
|
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);
|
|
1968
1838
|
let t30;
|
|
1969
|
-
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,
|
|
1839
|
+
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;
|
|
1970
1840
|
});
|
|
1971
1841
|
Box.displayName = "ForwardRef(Box)";
|
|
1972
1842
|
function textBaseStyle(props) {
|
|
@@ -2037,22 +1907,6 @@ function textBaseStyle(props) {
|
|
|
2037
1907
|
}
|
|
2038
1908
|
`;
|
|
2039
1909
|
}
|
|
2040
|
-
var __defProp$M = Object.defineProperty, __defProps$K = Object.defineProperties, __getOwnPropDescs$K = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$L = Object.getOwnPropertySymbols, __hasOwnProp$L = Object.prototype.hasOwnProperty, __propIsEnum$L = Object.prototype.propertyIsEnumerable, __defNormalProp$M = (obj, key2, value) => key2 in obj ? __defProp$M(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$L = (a, b) => {
|
|
2041
|
-
for (var prop in b || (b = {}))
|
|
2042
|
-
__hasOwnProp$L.call(b, prop) && __defNormalProp$M(a, prop, b[prop]);
|
|
2043
|
-
if (__getOwnPropSymbols$L)
|
|
2044
|
-
for (var prop of __getOwnPropSymbols$L(b))
|
|
2045
|
-
__propIsEnum$L.call(b, prop) && __defNormalProp$M(a, prop, b[prop]);
|
|
2046
|
-
return a;
|
|
2047
|
-
}, __spreadProps$K = (a, b) => __defProps$K(a, __getOwnPropDescs$K(b)), __objRest$F = (source, exclude) => {
|
|
2048
|
-
var target = {};
|
|
2049
|
-
for (var prop in source)
|
|
2050
|
-
__hasOwnProp$L.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2051
|
-
if (source != null && __getOwnPropSymbols$L)
|
|
2052
|
-
for (var prop of __getOwnPropSymbols$L(source))
|
|
2053
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$L.call(source, prop) && (target[prop] = source[prop]);
|
|
2054
|
-
return target;
|
|
2055
|
-
};
|
|
2056
1910
|
const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), SpanWithTextOverflow$1 = styledComponents.styled.span`
|
|
2057
1911
|
display: block;
|
|
2058
1912
|
white-space: nowrap;
|
|
@@ -2060,26 +1914,18 @@ const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAli
|
|
|
2060
1914
|
overflow: hidden;
|
|
2061
1915
|
overflow: clip;
|
|
2062
1916
|
`, Text = react.forwardRef(function(props, ref) {
|
|
2063
|
-
var _a;
|
|
2064
1917
|
const $ = reactCompilerRuntime.c(22);
|
|
2065
1918
|
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
2066
|
-
$[0] !== props ? (
|
|
1919
|
+
$[0] !== props ? ({
|
|
2067
1920
|
accent: t0,
|
|
2068
1921
|
align,
|
|
2069
1922
|
children: childrenProp,
|
|
2070
1923
|
muted: t1,
|
|
2071
1924
|
size: t2,
|
|
2072
1925
|
textOverflow,
|
|
2073
|
-
weight
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
"align",
|
|
2077
|
-
"children",
|
|
2078
|
-
"muted",
|
|
2079
|
-
"size",
|
|
2080
|
-
"textOverflow",
|
|
2081
|
-
"weight"
|
|
2082
|
-
]), $[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]);
|
|
1926
|
+
weight,
|
|
1927
|
+
...restProps
|
|
1928
|
+
} = 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]);
|
|
2083
1929
|
const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
2084
1930
|
let children = childrenProp;
|
|
2085
1931
|
if (textOverflow === "ellipsis") {
|
|
@@ -2090,7 +1936,7 @@ const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAli
|
|
|
2090
1936
|
let t5;
|
|
2091
1937
|
$[11] !== children ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
|
|
2092
1938
|
let t6;
|
|
2093
|
-
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$x,
|
|
1939
|
+
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;
|
|
2094
1940
|
});
|
|
2095
1941
|
Text.displayName = "ForwardRef(Text)";
|
|
2096
1942
|
function badgeStyle(props) {
|
|
@@ -2108,41 +1954,19 @@ function badgeStyle(props) {
|
|
|
2108
1954
|
}
|
|
2109
1955
|
};
|
|
2110
1956
|
}
|
|
2111
|
-
var __defProp$L = Object.defineProperty, __defProps$J = Object.defineProperties, __getOwnPropDescs$J = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$K = Object.getOwnPropertySymbols, __hasOwnProp$K = Object.prototype.hasOwnProperty, __propIsEnum$K = Object.prototype.propertyIsEnumerable, __defNormalProp$L = (obj, key2, value) => key2 in obj ? __defProp$L(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$K = (a, b) => {
|
|
2112
|
-
for (var prop in b || (b = {}))
|
|
2113
|
-
__hasOwnProp$K.call(b, prop) && __defNormalProp$L(a, prop, b[prop]);
|
|
2114
|
-
if (__getOwnPropSymbols$K)
|
|
2115
|
-
for (var prop of __getOwnPropSymbols$K(b))
|
|
2116
|
-
__propIsEnum$K.call(b, prop) && __defNormalProp$L(a, prop, b[prop]);
|
|
2117
|
-
return a;
|
|
2118
|
-
}, __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b)), __objRest$E = (source, exclude) => {
|
|
2119
|
-
var target = {};
|
|
2120
|
-
for (var prop in source)
|
|
2121
|
-
__hasOwnProp$K.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2122
|
-
if (source != null && __getOwnPropSymbols$K)
|
|
2123
|
-
for (var prop of __getOwnPropSymbols$K(source))
|
|
2124
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$K.call(source, prop) && (target[prop] = source[prop]);
|
|
2125
|
-
return target;
|
|
2126
|
-
};
|
|
2127
1957
|
const Root$w = styledComponents.styled(Box)(responsiveRadiusStyle, badgeStyle), Badge = react.forwardRef(function(props, ref) {
|
|
2128
1958
|
const $ = reactCompilerRuntime.c(17);
|
|
2129
1959
|
let children, restProps, t0, t1, t2, t3;
|
|
2130
1960
|
if ($[0] !== props) {
|
|
2131
|
-
const
|
|
1961
|
+
const {
|
|
2132
1962
|
children: t42,
|
|
2133
1963
|
fontSize: t52,
|
|
2134
1964
|
mode: _deprecated_mode,
|
|
2135
1965
|
padding: t62,
|
|
2136
1966
|
radius: t72,
|
|
2137
|
-
tone: t8
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
"fontSize",
|
|
2141
|
-
"mode",
|
|
2142
|
-
"padding",
|
|
2143
|
-
"radius",
|
|
2144
|
-
"tone"
|
|
2145
|
-
]);
|
|
1967
|
+
tone: t8,
|
|
1968
|
+
...t9
|
|
1969
|
+
} = props;
|
|
2146
1970
|
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;
|
|
2147
1971
|
} else
|
|
2148
1972
|
children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5], t3 = $[6];
|
|
@@ -2150,57 +1974,26 @@ const Root$w = styledComponents.styled(Box)(responsiveRadiusStyle, badgeStyle),
|
|
|
2150
1974
|
let t6;
|
|
2151
1975
|
$[7] !== children || $[8] !== fontSize2 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children }), $[7] = children, $[8] = fontSize2, $[9] = t6) : t6 = $[9];
|
|
2152
1976
|
let t7;
|
|
2153
|
-
return $[10] !== ref || $[11] !== restProps || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== tone ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Root$w,
|
|
1977
|
+
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;
|
|
2154
1978
|
});
|
|
2155
1979
|
Badge.displayName = "ForwardRef(Badge)";
|
|
2156
|
-
var __defProp$K = Object.defineProperty, __defProps$I = Object.defineProperties, __getOwnPropDescs$I = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$J = Object.getOwnPropertySymbols, __hasOwnProp$J = Object.prototype.hasOwnProperty, __propIsEnum$J = Object.prototype.propertyIsEnumerable, __defNormalProp$K = (obj, key2, value) => key2 in obj ? __defProp$K(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$J = (a, b) => {
|
|
2157
|
-
for (var prop in b || (b = {}))
|
|
2158
|
-
__hasOwnProp$J.call(b, prop) && __defNormalProp$K(a, prop, b[prop]);
|
|
2159
|
-
if (__getOwnPropSymbols$J)
|
|
2160
|
-
for (var prop of __getOwnPropSymbols$J(b))
|
|
2161
|
-
__propIsEnum$J.call(b, prop) && __defNormalProp$K(a, prop, b[prop]);
|
|
2162
|
-
return a;
|
|
2163
|
-
}, __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b)), __objRest$D = (source, exclude) => {
|
|
2164
|
-
var target = {};
|
|
2165
|
-
for (var prop in source)
|
|
2166
|
-
__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2167
|
-
if (source != null && __getOwnPropSymbols$J)
|
|
2168
|
-
for (var prop of __getOwnPropSymbols$J(source))
|
|
2169
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop) && (target[prop] = source[prop]);
|
|
2170
|
-
return target;
|
|
2171
|
-
};
|
|
2172
1980
|
const Root$v = styledComponents.styled(Box)(flexItemStyle, responsiveFlexStyle), Flex = react.forwardRef(function(props, ref) {
|
|
2173
|
-
var _a;
|
|
2174
1981
|
const $ = reactCompilerRuntime.c(17);
|
|
2175
1982
|
let align, as, gap, justify, restProps, t0, wrap;
|
|
2176
|
-
$[0] !== props ? (
|
|
1983
|
+
$[0] !== props ? ({
|
|
2177
1984
|
align,
|
|
2178
1985
|
as,
|
|
2179
1986
|
direction: t0,
|
|
2180
1987
|
gap,
|
|
2181
1988
|
justify,
|
|
2182
|
-
wrap
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
"as",
|
|
2186
|
-
"direction",
|
|
2187
|
-
"gap",
|
|
2188
|
-
"justify",
|
|
2189
|
-
"wrap"
|
|
2190
|
-
]), $[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]);
|
|
1989
|
+
wrap,
|
|
1990
|
+
...restProps
|
|
1991
|
+
} = 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]);
|
|
2191
1992
|
const direction = t0 === void 0 ? "row" : t0, t1 = useArrayProp(align), t2 = useArrayProp(direction), t3 = useArrayProp(gap), t4 = useArrayProp(justify), t5 = useArrayProp(wrap);
|
|
2192
1993
|
let t6;
|
|
2193
|
-
return $[8] !== as || $[9] !== ref || $[10] !== restProps || $[11] !== t1 || $[12] !== t2 || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$v,
|
|
1994
|
+
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;
|
|
2194
1995
|
});
|
|
2195
1996
|
Flex.displayName = "ForwardRef(Flex)";
|
|
2196
|
-
var __defProp$J = Object.defineProperty, __defProps$H = Object.defineProperties, __getOwnPropDescs$H = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$I = Object.getOwnPropertySymbols, __hasOwnProp$I = Object.prototype.hasOwnProperty, __propIsEnum$I = Object.prototype.propertyIsEnumerable, __defNormalProp$J = (obj, key2, value) => key2 in obj ? __defProp$J(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$I = (a, b) => {
|
|
2197
|
-
for (var prop in b || (b = {}))
|
|
2198
|
-
__hasOwnProp$I.call(b, prop) && __defNormalProp$J(a, prop, b[prop]);
|
|
2199
|
-
if (__getOwnPropSymbols$I)
|
|
2200
|
-
for (var prop of __getOwnPropSymbols$I(b))
|
|
2201
|
-
__propIsEnum$I.call(b, prop) && __defNormalProp$J(a, prop, b[prop]);
|
|
2202
|
-
return a;
|
|
2203
|
-
}, __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
2204
1997
|
const rotate$1 = styledComponents.keyframes`
|
|
2205
1998
|
from {
|
|
2206
1999
|
transform: rotate(0deg);
|
|
@@ -2218,11 +2011,10 @@ const rotate$1 = styledComponents.keyframes`
|
|
|
2218
2011
|
let t0;
|
|
2219
2012
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsxRuntime.jsx(icons.SpinnerIcon, {}), $[0] = t0) : t0 = $[0];
|
|
2220
2013
|
let t1;
|
|
2221
|
-
return $[1] !== props || $[2] !== ref ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$u,
|
|
2014
|
+
return $[1] !== props || $[2] !== ref ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$u, { "data-ui": "Spinner", ...props, ref, children: t0 }), $[1] = props, $[2] = ref, $[3] = t1) : t1 = $[3], t1;
|
|
2222
2015
|
});
|
|
2223
2016
|
Spinner.displayName = "ForwardRef(Spinner)";
|
|
2224
2017
|
function _cardColorStyle(base, color, checkered = !1) {
|
|
2225
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2226
2018
|
return {
|
|
2227
2019
|
// from base
|
|
2228
2020
|
"--card-backdrop-color": base.backdrop,
|
|
@@ -2258,18 +2050,18 @@ function _cardColorStyle(base, color, checkered = !1) {
|
|
|
2258
2050
|
"--card-badge-default-dot-color": color.badge.default.dot,
|
|
2259
2051
|
"--card-badge-default-fg-color": color.badge.default.fg,
|
|
2260
2052
|
"--card-badge-default-icon-color": color.badge.default.icon,
|
|
2261
|
-
"--card-badge-neutral-bg-color":
|
|
2262
|
-
"--card-badge-neutral-dot-color":
|
|
2263
|
-
"--card-badge-neutral-fg-color":
|
|
2264
|
-
"--card-badge-neutral-icon-color":
|
|
2053
|
+
"--card-badge-neutral-bg-color": color.badge.neutral?.bg,
|
|
2054
|
+
"--card-badge-neutral-dot-color": color.badge.neutral?.dot,
|
|
2055
|
+
"--card-badge-neutral-fg-color": color.badge.neutral?.fg,
|
|
2056
|
+
"--card-badge-neutral-icon-color": color.badge.neutral?.icon,
|
|
2265
2057
|
"--card-badge-primary-bg-color": color.badge.primary.bg,
|
|
2266
2058
|
"--card-badge-primary-dot-color": color.badge.primary.dot,
|
|
2267
2059
|
"--card-badge-primary-fg-color": color.badge.primary.fg,
|
|
2268
2060
|
"--card-badge-primary-icon-color": color.badge.primary.icon,
|
|
2269
|
-
"--card-badge-suggest-bg-color":
|
|
2270
|
-
"--card-badge-suggest-dot-color":
|
|
2271
|
-
"--card-badge-suggest-fg-color":
|
|
2272
|
-
"--card-badge-suggest-icon-color":
|
|
2061
|
+
"--card-badge-suggest-bg-color": color.badge.suggest?.bg,
|
|
2062
|
+
"--card-badge-suggest-dot-color": color.badge.suggest?.dot,
|
|
2063
|
+
"--card-badge-suggest-fg-color": color.badge.suggest?.fg,
|
|
2064
|
+
"--card-badge-suggest-icon-color": color.badge.suggest?.icon,
|
|
2273
2065
|
"--card-badge-positive-bg-color": color.badge.positive.bg,
|
|
2274
2066
|
"--card-badge-positive-dot-color": color.badge.positive.dot,
|
|
2275
2067
|
"--card-badge-positive-fg-color": color.badge.positive.fg,
|
|
@@ -2308,7 +2100,7 @@ function buttonBaseStyles(props) {
|
|
|
2308
2100
|
style
|
|
2309
2101
|
} = theme.getTheme_v2(props.theme);
|
|
2310
2102
|
return styledComponents.css`
|
|
2311
|
-
${style
|
|
2103
|
+
${style?.button};
|
|
2312
2104
|
|
|
2313
2105
|
-webkit-font-smoothing: inherit;
|
|
2314
2106
|
appearance: none;
|
|
@@ -2351,7 +2143,6 @@ function combineBoxShadow(...boxShadows) {
|
|
|
2351
2143
|
return boxShadows.filter(Boolean).join(",");
|
|
2352
2144
|
}
|
|
2353
2145
|
function buttonColorStyles(props) {
|
|
2354
|
-
var _a;
|
|
2355
2146
|
const {
|
|
2356
2147
|
$mode
|
|
2357
2148
|
} = props, {
|
|
@@ -2389,24 +2180,8 @@ function buttonColorStyles(props) {
|
|
|
2389
2180
|
},
|
|
2390
2181
|
"&[data-selected]": _cardColorStyle(baseColor, color.pressed)
|
|
2391
2182
|
}
|
|
2392
|
-
},
|
|
2393
|
-
}
|
|
2394
|
-
var __defProp$I = Object.defineProperty, __defProps$G = Object.defineProperties, __getOwnPropDescs$G = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$H = Object.getOwnPropertySymbols, __hasOwnProp$H = Object.prototype.hasOwnProperty, __propIsEnum$H = Object.prototype.propertyIsEnumerable, __defNormalProp$I = (obj, key2, value) => key2 in obj ? __defProp$I(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$H = (a, b) => {
|
|
2395
|
-
for (var prop in b || (b = {}))
|
|
2396
|
-
__hasOwnProp$H.call(b, prop) && __defNormalProp$I(a, prop, b[prop]);
|
|
2397
|
-
if (__getOwnPropSymbols$H)
|
|
2398
|
-
for (var prop of __getOwnPropSymbols$H(b))
|
|
2399
|
-
__propIsEnum$H.call(b, prop) && __defNormalProp$I(a, prop, b[prop]);
|
|
2400
|
-
return a;
|
|
2401
|
-
}, __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b)), __objRest$C = (source, exclude) => {
|
|
2402
|
-
var target = {};
|
|
2403
|
-
for (var prop in source)
|
|
2404
|
-
__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2405
|
-
if (source != null && __getOwnPropSymbols$H)
|
|
2406
|
-
for (var prop of __getOwnPropSymbols$H(source))
|
|
2407
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop) && (target[prop] = source[prop]);
|
|
2408
|
-
return target;
|
|
2409
|
-
};
|
|
2183
|
+
}, style?.button?.root].filter(Boolean);
|
|
2184
|
+
}
|
|
2410
2185
|
const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styledComponents.styled.div`
|
|
2411
2186
|
position: absolute;
|
|
2412
2187
|
top: 0;
|
|
@@ -2421,10 +2196,9 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2421
2196
|
z-index: 1;
|
|
2422
2197
|
box-shadow: inherit;
|
|
2423
2198
|
`, Button = react.forwardRef(function(props, ref) {
|
|
2424
|
-
var _a;
|
|
2425
2199
|
const $ = reactCompilerRuntime.c(64);
|
|
2426
2200
|
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;
|
|
2427
|
-
$[0] !== props ? (
|
|
2201
|
+
$[0] !== props ? ({
|
|
2428
2202
|
children,
|
|
2429
2203
|
disabled,
|
|
2430
2204
|
fontSize: t0,
|
|
@@ -2448,33 +2222,9 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2448
2222
|
tone: t6,
|
|
2449
2223
|
type: t7,
|
|
2450
2224
|
muted: t8,
|
|
2451
|
-
width
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
"disabled",
|
|
2455
|
-
"fontSize",
|
|
2456
|
-
"icon",
|
|
2457
|
-
"iconRight",
|
|
2458
|
-
"justify",
|
|
2459
|
-
"loading",
|
|
2460
|
-
"mode",
|
|
2461
|
-
"padding",
|
|
2462
|
-
"paddingX",
|
|
2463
|
-
"paddingY",
|
|
2464
|
-
"paddingTop",
|
|
2465
|
-
"paddingBottom",
|
|
2466
|
-
"paddingLeft",
|
|
2467
|
-
"paddingRight",
|
|
2468
|
-
"radius",
|
|
2469
|
-
"selected",
|
|
2470
|
-
"space",
|
|
2471
|
-
"text",
|
|
2472
|
-
"textAlign",
|
|
2473
|
-
"tone",
|
|
2474
|
-
"type",
|
|
2475
|
-
"muted",
|
|
2476
|
-
"width"
|
|
2477
|
-
]), $[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]);
|
|
2225
|
+
width,
|
|
2226
|
+
...restProps
|
|
2227
|
+
} = 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]);
|
|
2478
2228
|
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, {
|
|
2479
2229
|
button
|
|
2480
2230
|
} = 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);
|
|
@@ -2492,7 +2242,7 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2492
2242
|
let t14;
|
|
2493
2243
|
$[34] !== loading ? (t14 = !!loading && /* @__PURE__ */ jsxRuntime.jsx(LoadingBox, { children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) }), $[34] = loading, $[35] = t14) : t14 = $[35];
|
|
2494
2244
|
let t15;
|
|
2495
|
-
$[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,
|
|
2245
|
+
$[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: [
|
|
2496
2246
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
2497
2247
|
react.isValidElement(IconComponent) && IconComponent,
|
|
2498
2248
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
@@ -2502,15 +2252,15 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2502
2252
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
2503
2253
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
2504
2254
|
] })
|
|
2505
|
-
] }) })
|
|
2255
|
+
] }) }), $[36] = IconComponent, $[37] = IconRightComponent, $[38] = boxProps, $[39] = button, $[40] = fontSize2, $[41] = justify, $[42] = muted, $[43] = space, $[44] = text, $[45] = textAlign, $[46] = t15) : t15 = $[46];
|
|
2506
2256
|
let t16;
|
|
2507
|
-
$[47] !== boxProps || $[48] !== children ? (t16 = children && /* @__PURE__ */ jsxRuntime.jsx(Box,
|
|
2257
|
+
$[47] !== boxProps || $[48] !== children ? (t16 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children }), $[47] = boxProps, $[48] = children, $[49] = t16) : t16 = $[49];
|
|
2508
2258
|
let t17;
|
|
2509
|
-
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,
|
|
2259
|
+
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: [
|
|
2510
2260
|
t14,
|
|
2511
2261
|
t15,
|
|
2512
2262
|
t16
|
|
2513
|
-
] })
|
|
2263
|
+
] }), $[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;
|
|
2514
2264
|
});
|
|
2515
2265
|
Button.displayName = "ForwardRef(Button)";
|
|
2516
2266
|
function cardStyle(props) {
|
|
@@ -2554,7 +2304,6 @@ function cardBaseStyle(props) {
|
|
|
2554
2304
|
`;
|
|
2555
2305
|
}
|
|
2556
2306
|
function cardColorStyle(props) {
|
|
2557
|
-
var _a;
|
|
2558
2307
|
const {
|
|
2559
2308
|
$checkered,
|
|
2560
2309
|
$focusRing,
|
|
@@ -2659,30 +2408,13 @@ function cardColorStyle(props) {
|
|
|
2659
2408
|
}
|
|
2660
2409
|
}
|
|
2661
2410
|
|
|
2662
|
-
${
|
|
2411
|
+
${style?.card?.root}
|
|
2663
2412
|
`;
|
|
2664
2413
|
}
|
|
2665
|
-
var __defProp$H = Object.defineProperty, __defProps$F = Object.defineProperties, __getOwnPropDescs$F = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$G = Object.getOwnPropertySymbols, __hasOwnProp$G = Object.prototype.hasOwnProperty, __propIsEnum$G = Object.prototype.propertyIsEnumerable, __defNormalProp$H = (obj, key2, value) => key2 in obj ? __defProp$H(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$G = (a, b) => {
|
|
2666
|
-
for (var prop in b || (b = {}))
|
|
2667
|
-
__hasOwnProp$G.call(b, prop) && __defNormalProp$H(a, prop, b[prop]);
|
|
2668
|
-
if (__getOwnPropSymbols$G)
|
|
2669
|
-
for (var prop of __getOwnPropSymbols$G(b))
|
|
2670
|
-
__propIsEnum$G.call(b, prop) && __defNormalProp$H(a, prop, b[prop]);
|
|
2671
|
-
return a;
|
|
2672
|
-
}, __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b)), __objRest$B = (source, exclude) => {
|
|
2673
|
-
var target = {};
|
|
2674
|
-
for (var prop in source)
|
|
2675
|
-
__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2676
|
-
if (source != null && __getOwnPropSymbols$G)
|
|
2677
|
-
for (var prop of __getOwnPropSymbols$G(source))
|
|
2678
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop) && (target[prop] = source[prop]);
|
|
2679
|
-
return target;
|
|
2680
|
-
};
|
|
2681
2414
|
const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = react.forwardRef(function(props, ref) {
|
|
2682
|
-
var _a;
|
|
2683
2415
|
const $ = reactCompilerRuntime.c(42);
|
|
2684
2416
|
let asProp, border2, borderBottom2, borderLeft2, borderRight2, borderTop2, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;
|
|
2685
|
-
$[0] !== props ? (
|
|
2417
|
+
$[0] !== props ? ({
|
|
2686
2418
|
__unstable_checkered: t0,
|
|
2687
2419
|
__unstable_focusRing: t1,
|
|
2688
2420
|
as: asProp,
|
|
@@ -2697,27 +2429,12 @@ const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRad
|
|
|
2697
2429
|
scheme,
|
|
2698
2430
|
selected,
|
|
2699
2431
|
shadow,
|
|
2700
|
-
tone: t3
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
"__unstable_focusRing",
|
|
2704
|
-
"as",
|
|
2705
|
-
"border",
|
|
2706
|
-
"borderTop",
|
|
2707
|
-
"borderRight",
|
|
2708
|
-
"borderBottom",
|
|
2709
|
-
"borderLeft",
|
|
2710
|
-
"muted",
|
|
2711
|
-
"pressed",
|
|
2712
|
-
"radius",
|
|
2713
|
-
"scheme",
|
|
2714
|
-
"selected",
|
|
2715
|
-
"shadow",
|
|
2716
|
-
"tone"
|
|
2717
|
-
]), $[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]);
|
|
2432
|
+
tone: t3,
|
|
2433
|
+
...restProps
|
|
2434
|
+
} = 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]);
|
|
2718
2435
|
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;
|
|
2719
2436
|
let t16;
|
|
2720
|
-
$[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,
|
|
2437
|
+
$[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];
|
|
2721
2438
|
let t17;
|
|
2722
2439
|
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;
|
|
2723
2440
|
});
|
|
@@ -2860,43 +2577,19 @@ function inputElementStyles(props) {
|
|
|
2860
2577
|
}
|
|
2861
2578
|
`;
|
|
2862
2579
|
}
|
|
2863
|
-
var __defProp$G = Object.defineProperty, __defProps$E = Object.defineProperties, __getOwnPropDescs$E = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$F = Object.getOwnPropertySymbols, __hasOwnProp$F = Object.prototype.hasOwnProperty, __propIsEnum$F = Object.prototype.propertyIsEnumerable, __defNormalProp$G = (obj, key2, value) => key2 in obj ? __defProp$G(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$F = (a, b) => {
|
|
2864
|
-
for (var prop in b || (b = {}))
|
|
2865
|
-
__hasOwnProp$F.call(b, prop) && __defNormalProp$G(a, prop, b[prop]);
|
|
2866
|
-
if (__getOwnPropSymbols$F)
|
|
2867
|
-
for (var prop of __getOwnPropSymbols$F(b))
|
|
2868
|
-
__propIsEnum$F.call(b, prop) && __defNormalProp$G(a, prop, b[prop]);
|
|
2869
|
-
return a;
|
|
2870
|
-
}, __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b)), __objRest$A = (source, exclude) => {
|
|
2871
|
-
var target = {};
|
|
2872
|
-
for (var prop in source)
|
|
2873
|
-
__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2874
|
-
if (source != null && __getOwnPropSymbols$F)
|
|
2875
|
-
for (var prop of __getOwnPropSymbols$F(source))
|
|
2876
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop) && (target[prop] = source[prop]);
|
|
2877
|
-
return target;
|
|
2878
|
-
};
|
|
2879
2580
|
const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styledComponents.styled.input(inputElementStyles), Checkbox = react.forwardRef(function(props, forwardedRef) {
|
|
2880
|
-
var _a;
|
|
2881
2581
|
const $ = reactCompilerRuntime.c(25);
|
|
2882
2582
|
let checked, className, customValidity, disabled, indeterminate, readOnly, restProps, style;
|
|
2883
|
-
$[0] !== props ? (
|
|
2583
|
+
$[0] !== props ? ({
|
|
2884
2584
|
checked,
|
|
2885
2585
|
className,
|
|
2886
2586
|
disabled,
|
|
2887
2587
|
indeterminate,
|
|
2888
2588
|
customValidity,
|
|
2889
2589
|
readOnly,
|
|
2890
|
-
style
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
"className",
|
|
2894
|
-
"disabled",
|
|
2895
|
-
"indeterminate",
|
|
2896
|
-
"customValidity",
|
|
2897
|
-
"readOnly",
|
|
2898
|
-
"style"
|
|
2899
|
-
]), $[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]);
|
|
2590
|
+
style,
|
|
2591
|
+
...restProps
|
|
2592
|
+
} = 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]);
|
|
2900
2593
|
const ref = react.useRef(null);
|
|
2901
2594
|
let t0;
|
|
2902
2595
|
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[9] = t0) : t0 = $[9], react.useImperativeHandle(forwardedRef, t0);
|
|
@@ -2906,7 +2599,7 @@ const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styled
|
|
|
2906
2599
|
}, t2 = [indeterminate], $[10] = indeterminate, $[11] = t1, $[12] = t2) : (t1 = $[11], t2 = $[12]), react.useEffect(t1, t2), useCustomValidity(ref, customValidity);
|
|
2907
2600
|
const t3 = !disabled && readOnly ? "" : void 0, t4 = customValidity ? "" : void 0, t5 = disabled || readOnly;
|
|
2908
2601
|
let t6;
|
|
2909
|
-
$[13] !== checked || $[14] !== readOnly || $[15] !== restProps || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Input$5,
|
|
2602
|
+
$[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];
|
|
2910
2603
|
let t7;
|
|
2911
2604
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2912
2605
|
/* @__PURE__ */ jsxRuntime.jsx(icons.CheckmarkIcon, {}),
|
|
@@ -3067,37 +2760,16 @@ function codeBaseStyle() {
|
|
|
3067
2760
|
}
|
|
3068
2761
|
`;
|
|
3069
2762
|
}
|
|
3070
|
-
var __defProp$F = Object.defineProperty, __defProps$D = Object.defineProperties, __getOwnPropDescs$D = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$E = Object.getOwnPropertySymbols, __hasOwnProp$E = Object.prototype.hasOwnProperty, __propIsEnum$E = Object.prototype.propertyIsEnumerable, __defNormalProp$F = (obj, key2, value) => key2 in obj ? __defProp$F(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$E = (a, b) => {
|
|
3071
|
-
for (var prop in b || (b = {}))
|
|
3072
|
-
__hasOwnProp$E.call(b, prop) && __defNormalProp$F(a, prop, b[prop]);
|
|
3073
|
-
if (__getOwnPropSymbols$E)
|
|
3074
|
-
for (var prop of __getOwnPropSymbols$E(b))
|
|
3075
|
-
__propIsEnum$E.call(b, prop) && __defNormalProp$F(a, prop, b[prop]);
|
|
3076
|
-
return a;
|
|
3077
|
-
}, __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b)), __objRest$z = (source, exclude) => {
|
|
3078
|
-
var target = {};
|
|
3079
|
-
for (var prop in source)
|
|
3080
|
-
__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3081
|
-
if (source != null && __getOwnPropSymbols$E)
|
|
3082
|
-
for (var prop of __getOwnPropSymbols$E(source))
|
|
3083
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop) && (target[prop] = source[prop]);
|
|
3084
|
-
return target;
|
|
3085
|
-
};
|
|
3086
2763
|
const Root$q = styledComponents.styled.pre(codeBaseStyle, responsiveCodeFontStyle), Code = react.forwardRef(function(props, ref) {
|
|
3087
|
-
var _a;
|
|
3088
2764
|
const $ = reactCompilerRuntime.c(23);
|
|
3089
2765
|
let children, languageProp, restProps, t0, weight;
|
|
3090
|
-
$[0] !== props ? (
|
|
2766
|
+
$[0] !== props ? ({
|
|
3091
2767
|
children,
|
|
3092
2768
|
language: languageProp,
|
|
3093
2769
|
size: t0,
|
|
3094
|
-
weight
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
"language",
|
|
3098
|
-
"size",
|
|
3099
|
-
"weight"
|
|
3100
|
-
]), $[0] = props, $[1] = children, $[2] = languageProp, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], languageProp = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
|
|
2770
|
+
weight,
|
|
2771
|
+
...restProps
|
|
2772
|
+
} = props, $[0] = props, $[1] = children, $[2] = languageProp, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], languageProp = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
|
|
3101
2773
|
const size2 = t0 === void 0 ? 2 : t0, language = typeof languageProp == "string" ? languageProp : void 0;
|
|
3102
2774
|
let t1;
|
|
3103
2775
|
$[6] !== language ? (t1 = language ? Refractor__default.default.hasLanguage(language) : !1, $[6] = language, $[7] = t1) : t1 = $[7];
|
|
@@ -3107,10 +2779,10 @@ const Root$q = styledComponents.styled.pre(codeBaseStyle, responsiveCodeFontStyl
|
|
|
3107
2779
|
let t4;
|
|
3108
2780
|
$[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];
|
|
3109
2781
|
let t5;
|
|
3110
|
-
return $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== weight ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(Root$q,
|
|
2782
|
+
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: [
|
|
3111
2783
|
t3,
|
|
3112
2784
|
t4
|
|
3113
|
-
] })
|
|
2785
|
+
] }), $[16] = ref, $[17] = restProps, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = weight, $[22] = t5) : t5 = $[22], t5;
|
|
3114
2786
|
});
|
|
3115
2787
|
Code.displayName = "ForwardRef(Code)";
|
|
3116
2788
|
const BASE_STYLE$1 = {
|
|
@@ -3129,59 +2801,23 @@ function responsiveContainerWidthStyle(props) {
|
|
|
3129
2801
|
maxWidth: val === "auto" ? "none" : rem(container[val])
|
|
3130
2802
|
}));
|
|
3131
2803
|
}
|
|
3132
|
-
var __defProp$E = Object.defineProperty, __defProps$C = Object.defineProperties, __getOwnPropDescs$C = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$D = Object.getOwnPropertySymbols, __hasOwnProp$D = Object.prototype.hasOwnProperty, __propIsEnum$D = Object.prototype.propertyIsEnumerable, __defNormalProp$E = (obj, key2, value) => key2 in obj ? __defProp$E(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$D = (a, b) => {
|
|
3133
|
-
for (var prop in b || (b = {}))
|
|
3134
|
-
__hasOwnProp$D.call(b, prop) && __defNormalProp$E(a, prop, b[prop]);
|
|
3135
|
-
if (__getOwnPropSymbols$D)
|
|
3136
|
-
for (var prop of __getOwnPropSymbols$D(b))
|
|
3137
|
-
__propIsEnum$D.call(b, prop) && __defNormalProp$E(a, prop, b[prop]);
|
|
3138
|
-
return a;
|
|
3139
|
-
}, __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b)), __objRest$y = (source, exclude) => {
|
|
3140
|
-
var target = {};
|
|
3141
|
-
for (var prop in source)
|
|
3142
|
-
__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3143
|
-
if (source != null && __getOwnPropSymbols$D)
|
|
3144
|
-
for (var prop of __getOwnPropSymbols$D(source))
|
|
3145
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop) && (target[prop] = source[prop]);
|
|
3146
|
-
return target;
|
|
3147
|
-
};
|
|
3148
2804
|
const Root$p = styledComponents.styled(Box)(containerBaseStyle, responsiveContainerWidthStyle), Container = react.forwardRef(function(props, ref) {
|
|
3149
|
-
var _a;
|
|
3150
2805
|
const $ = reactCompilerRuntime.c(9);
|
|
3151
2806
|
let as, restProps, t0;
|
|
3152
|
-
$[0] !== props ? (
|
|
2807
|
+
$[0] !== props ? ({
|
|
3153
2808
|
as,
|
|
3154
|
-
width: t0
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
"width"
|
|
3158
|
-
]), $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
|
|
2809
|
+
width: t0,
|
|
2810
|
+
...restProps
|
|
2811
|
+
} = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
|
|
3159
2812
|
const t1 = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
3160
2813
|
let t2;
|
|
3161
|
-
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Root$p,
|
|
2814
|
+
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;
|
|
3162
2815
|
});
|
|
3163
2816
|
Container.displayName = "ForwardRef(Container)";
|
|
3164
|
-
var __defProp$D = Object.defineProperty, __defProps$B = Object.defineProperties, __getOwnPropDescs$B = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$C = Object.getOwnPropertySymbols, __hasOwnProp$C = Object.prototype.hasOwnProperty, __propIsEnum$C = Object.prototype.propertyIsEnumerable, __defNormalProp$D = (obj, key2, value) => key2 in obj ? __defProp$D(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$C = (a, b) => {
|
|
3165
|
-
for (var prop in b || (b = {}))
|
|
3166
|
-
__hasOwnProp$C.call(b, prop) && __defNormalProp$D(a, prop, b[prop]);
|
|
3167
|
-
if (__getOwnPropSymbols$C)
|
|
3168
|
-
for (var prop of __getOwnPropSymbols$C(b))
|
|
3169
|
-
__propIsEnum$C.call(b, prop) && __defNormalProp$D(a, prop, b[prop]);
|
|
3170
|
-
return a;
|
|
3171
|
-
}, __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b)), __objRest$x = (source, exclude) => {
|
|
3172
|
-
var target = {};
|
|
3173
|
-
for (var prop in source)
|
|
3174
|
-
__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3175
|
-
if (source != null && __getOwnPropSymbols$C)
|
|
3176
|
-
for (var prop of __getOwnPropSymbols$C(source))
|
|
3177
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop) && (target[prop] = source[prop]);
|
|
3178
|
-
return target;
|
|
3179
|
-
};
|
|
3180
2817
|
const Root$o = styledComponents.styled(Box)(responsiveGridStyle), Grid = react.forwardRef(function(props, ref) {
|
|
3181
|
-
var _a;
|
|
3182
2818
|
const $ = reactCompilerRuntime.c(26);
|
|
3183
2819
|
let as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, restProps, rows;
|
|
3184
|
-
$[0] !== props ? (
|
|
2820
|
+
$[0] !== props ? ({
|
|
3185
2821
|
as,
|
|
3186
2822
|
autoRows,
|
|
3187
2823
|
autoCols,
|
|
@@ -3191,22 +2827,12 @@ const Root$o = styledComponents.styled(Box)(responsiveGridStyle), Grid = react.f
|
|
|
3191
2827
|
gapX,
|
|
3192
2828
|
gapY,
|
|
3193
2829
|
rows,
|
|
3194
|
-
children
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
"autoRows",
|
|
3198
|
-
"autoCols",
|
|
3199
|
-
"autoFlow",
|
|
3200
|
-
"columns",
|
|
3201
|
-
"gap",
|
|
3202
|
-
"gapX",
|
|
3203
|
-
"gapY",
|
|
3204
|
-
"rows",
|
|
3205
|
-
"children"
|
|
3206
|
-
]), $[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]);
|
|
2830
|
+
children,
|
|
2831
|
+
...restProps
|
|
2832
|
+
} = 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]);
|
|
3207
2833
|
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);
|
|
3208
2834
|
let t9;
|
|
3209
|
-
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,
|
|
2835
|
+
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;
|
|
3210
2836
|
});
|
|
3211
2837
|
Grid.displayName = "ForwardRef(Grid)";
|
|
3212
2838
|
function headingBaseStyle(props) {
|
|
@@ -3268,22 +2894,6 @@ function headingBaseStyle(props) {
|
|
|
3268
2894
|
}
|
|
3269
2895
|
`;
|
|
3270
2896
|
}
|
|
3271
|
-
var __defProp$C = Object.defineProperty, __defProps$A = Object.defineProperties, __getOwnPropDescs$A = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$B = Object.getOwnPropertySymbols, __hasOwnProp$B = Object.prototype.hasOwnProperty, __propIsEnum$B = Object.prototype.propertyIsEnumerable, __defNormalProp$C = (obj, key2, value) => key2 in obj ? __defProp$C(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$B = (a, b) => {
|
|
3272
|
-
for (var prop in b || (b = {}))
|
|
3273
|
-
__hasOwnProp$B.call(b, prop) && __defNormalProp$C(a, prop, b[prop]);
|
|
3274
|
-
if (__getOwnPropSymbols$B)
|
|
3275
|
-
for (var prop of __getOwnPropSymbols$B(b))
|
|
3276
|
-
__propIsEnum$B.call(b, prop) && __defNormalProp$C(a, prop, b[prop]);
|
|
3277
|
-
return a;
|
|
3278
|
-
}, __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b)), __objRest$w = (source, exclude) => {
|
|
3279
|
-
var target = {};
|
|
3280
|
-
for (var prop in source)
|
|
3281
|
-
__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3282
|
-
if (source != null && __getOwnPropSymbols$B)
|
|
3283
|
-
for (var prop of __getOwnPropSymbols$B(source))
|
|
3284
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop) && (target[prop] = source[prop]);
|
|
3285
|
-
return target;
|
|
3286
|
-
};
|
|
3287
2897
|
const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), SpanWithTextOverflow = styledComponents.styled.span`
|
|
3288
2898
|
display: block;
|
|
3289
2899
|
white-space: nowrap;
|
|
@@ -3291,26 +2901,18 @@ const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlign
|
|
|
3291
2901
|
overflow: hidden;
|
|
3292
2902
|
overflow: clip;
|
|
3293
2903
|
`, Heading = react.forwardRef(function(props, ref) {
|
|
3294
|
-
var _a;
|
|
3295
2904
|
const $ = reactCompilerRuntime.c(22);
|
|
3296
2905
|
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
3297
|
-
$[0] !== props ? (
|
|
2906
|
+
$[0] !== props ? ({
|
|
3298
2907
|
accent: t0,
|
|
3299
2908
|
align,
|
|
3300
2909
|
children: childrenProp,
|
|
3301
2910
|
muted: t1,
|
|
3302
2911
|
size: t2,
|
|
3303
2912
|
textOverflow,
|
|
3304
|
-
weight
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
"align",
|
|
3308
|
-
"children",
|
|
3309
|
-
"muted",
|
|
3310
|
-
"size",
|
|
3311
|
-
"textOverflow",
|
|
3312
|
-
"weight"
|
|
3313
|
-
]), $[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]);
|
|
2913
|
+
weight,
|
|
2914
|
+
...restProps
|
|
2915
|
+
} = 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]);
|
|
3314
2916
|
const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
3315
2917
|
let children = childrenProp;
|
|
3316
2918
|
if (textOverflow === "ellipsis") {
|
|
@@ -3321,7 +2923,7 @@ const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlign
|
|
|
3321
2923
|
let t5;
|
|
3322
2924
|
$[11] !== children ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
|
|
3323
2925
|
let t6;
|
|
3324
|
-
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$n,
|
|
2926
|
+
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;
|
|
3325
2927
|
});
|
|
3326
2928
|
Heading.displayName = "ForwardRef(Heading)";
|
|
3327
2929
|
function inlineBaseStyle() {
|
|
@@ -3351,61 +2953,25 @@ function inlineSpaceStyle(props) {
|
|
|
3351
2953
|
};
|
|
3352
2954
|
});
|
|
3353
2955
|
}
|
|
3354
|
-
var __defProp$B = Object.defineProperty, __defProps$z = Object.defineProperties, __getOwnPropDescs$z = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$A = Object.getOwnPropertySymbols, __hasOwnProp$A = Object.prototype.hasOwnProperty, __propIsEnum$A = Object.prototype.propertyIsEnumerable, __defNormalProp$B = (obj, key2, value) => key2 in obj ? __defProp$B(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$A = (a, b) => {
|
|
3355
|
-
for (var prop in b || (b = {}))
|
|
3356
|
-
__hasOwnProp$A.call(b, prop) && __defNormalProp$B(a, prop, b[prop]);
|
|
3357
|
-
if (__getOwnPropSymbols$A)
|
|
3358
|
-
for (var prop of __getOwnPropSymbols$A(b))
|
|
3359
|
-
__propIsEnum$A.call(b, prop) && __defNormalProp$B(a, prop, b[prop]);
|
|
3360
|
-
return a;
|
|
3361
|
-
}, __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b)), __objRest$v = (source, exclude) => {
|
|
3362
|
-
var target = {};
|
|
3363
|
-
for (var prop in source)
|
|
3364
|
-
__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3365
|
-
if (source != null && __getOwnPropSymbols$A)
|
|
3366
|
-
for (var prop of __getOwnPropSymbols$A(source))
|
|
3367
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop) && (target[prop] = source[prop]);
|
|
3368
|
-
return target;
|
|
3369
|
-
};
|
|
3370
2956
|
const Root$m = styledComponents.styled(Box)(inlineBaseStyle, inlineSpaceStyle), Inline = react.forwardRef(function(props, ref) {
|
|
3371
|
-
var _a;
|
|
3372
2957
|
const $ = reactCompilerRuntime.c(12);
|
|
3373
2958
|
let as, childrenProp, restProps, space;
|
|
3374
|
-
$[0] !== props ? (
|
|
2959
|
+
$[0] !== props ? ({
|
|
3375
2960
|
as,
|
|
3376
2961
|
children: childrenProp,
|
|
3377
|
-
space
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
"children",
|
|
3381
|
-
"space"
|
|
3382
|
-
]), $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = restProps, $[4] = space) : (as = $[1], childrenProp = $[2], restProps = $[3], space = $[4]);
|
|
2962
|
+
space,
|
|
2963
|
+
...restProps
|
|
2964
|
+
} = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = restProps, $[4] = space) : (as = $[1], childrenProp = $[2], restProps = $[3], space = $[4]);
|
|
3383
2965
|
let t0, t1;
|
|
3384
2966
|
$[5] !== childrenProp ? (t1 = react.Children.map(childrenProp, _temp$6), $[5] = childrenProp, $[6] = t1) : t1 = $[6], t0 = t1;
|
|
3385
2967
|
const children = t0, t2 = useArrayProp(space);
|
|
3386
2968
|
let t3;
|
|
3387
|
-
return $[7] !== as || $[8] !== children || $[9] !== restProps || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Root$m,
|
|
2969
|
+
return $[7] !== as || $[8] !== children || $[9] !== restProps || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Root$m, { "data-ui": "Inline", ...restProps, $space: t2, forwardedAs: as, ref, children }), $[7] = as, $[8] = children, $[9] = restProps, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
|
|
3388
2970
|
});
|
|
3389
2971
|
Inline.displayName = "ForwardRef(Inline)";
|
|
3390
2972
|
function _temp$6(child) {
|
|
3391
2973
|
return child && /* @__PURE__ */ jsxRuntime.jsx("div", { children: child });
|
|
3392
2974
|
}
|
|
3393
|
-
var __defProp$A = Object.defineProperty, __defProps$y = Object.defineProperties, __getOwnPropDescs$y = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$z = Object.getOwnPropertySymbols, __hasOwnProp$z = Object.prototype.hasOwnProperty, __propIsEnum$z = Object.prototype.propertyIsEnumerable, __defNormalProp$A = (obj, key2, value) => key2 in obj ? __defProp$A(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$z = (a, b) => {
|
|
3394
|
-
for (var prop in b || (b = {}))
|
|
3395
|
-
__hasOwnProp$z.call(b, prop) && __defNormalProp$A(a, prop, b[prop]);
|
|
3396
|
-
if (__getOwnPropSymbols$z)
|
|
3397
|
-
for (var prop of __getOwnPropSymbols$z(b))
|
|
3398
|
-
__propIsEnum$z.call(b, prop) && __defNormalProp$A(a, prop, b[prop]);
|
|
3399
|
-
return a;
|
|
3400
|
-
}, __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b)), __objRest$u = (source, exclude) => {
|
|
3401
|
-
var target = {};
|
|
3402
|
-
for (var prop in source)
|
|
3403
|
-
__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3404
|
-
if (source != null && __getOwnPropSymbols$z)
|
|
3405
|
-
for (var prop of __getOwnPropSymbols$z(source))
|
|
3406
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop) && (target[prop] = source[prop]);
|
|
3407
|
-
return target;
|
|
3408
|
-
};
|
|
3409
2975
|
function kbdStyle() {
|
|
3410
2976
|
return styledComponents.css`
|
|
3411
2977
|
--card-bg-color: var(--card-kbd-bg-color);
|
|
@@ -3424,27 +2990,22 @@ function kbdStyle() {
|
|
|
3424
2990
|
`;
|
|
3425
2991
|
}
|
|
3426
2992
|
const Root$l = styledComponents.styled.kbd(responsiveRadiusStyle, kbdStyle), KBD = react.forwardRef(function(props, ref) {
|
|
3427
|
-
var _a;
|
|
3428
2993
|
const $ = reactCompilerRuntime.c(17);
|
|
3429
2994
|
let children, restProps, t0, t1, t2;
|
|
3430
|
-
$[0] !== props ? (
|
|
2995
|
+
$[0] !== props ? ({
|
|
3431
2996
|
children,
|
|
3432
2997
|
fontSize: t0,
|
|
3433
2998
|
padding: t1,
|
|
3434
|
-
radius: t2
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
"fontSize",
|
|
3438
|
-
"padding",
|
|
3439
|
-
"radius"
|
|
3440
|
-
]), $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2) : (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]);
|
|
2999
|
+
radius: t2,
|
|
3000
|
+
...restProps
|
|
3001
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2) : (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]);
|
|
3441
3002
|
const fontSize2 = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, t3 = useArrayProp(t2 === void 0 ? 2 : t2);
|
|
3442
3003
|
let t4;
|
|
3443
3004
|
$[6] !== children || $[7] !== fontSize2 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }), $[6] = children, $[7] = fontSize2, $[8] = t4) : t4 = $[8];
|
|
3444
3005
|
let t5;
|
|
3445
3006
|
$[9] !== padding || $[10] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, children: t4 }), $[9] = padding, $[10] = t4, $[11] = t5) : t5 = $[11];
|
|
3446
3007
|
let t6;
|
|
3447
|
-
return $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$l,
|
|
3008
|
+
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;
|
|
3448
3009
|
});
|
|
3449
3010
|
KBD.displayName = "ForwardRef(KBD)";
|
|
3450
3011
|
const origin = {
|
|
@@ -3454,8 +3015,7 @@ const origin = {
|
|
|
3454
3015
|
placement,
|
|
3455
3016
|
rects
|
|
3456
3017
|
}) {
|
|
3457
|
-
|
|
3458
|
-
const [side] = placement.split("-"), floatingWidth = rects.floating.width, floatingHeight = rects.floating.height, shiftX = ((_a = middlewareData.shift) == null ? void 0 : _a.x) || 0, shiftY = ((_b = middlewareData.shift) == null ? void 0 : _b.y) || 0;
|
|
3018
|
+
const [side] = placement.split("-"), floatingWidth = rects.floating.width, floatingHeight = rects.floating.height, shiftX = middlewareData.shift?.x || 0, shiftY = middlewareData.shift?.y || 0;
|
|
3459
3019
|
if (floatingWidth <= 0 || floatingHeight <= 0)
|
|
3460
3020
|
return {};
|
|
3461
3021
|
const isVerticalPlacement = ["bottom", "top"].includes(side), {
|
|
@@ -3479,14 +3039,6 @@ const origin = {
|
|
|
3479
3039
|
function clamp(num, min, max) {
|
|
3480
3040
|
return Math.min(Math.max(num, min), max);
|
|
3481
3041
|
}
|
|
3482
|
-
var __defProp$z = Object.defineProperty, __getOwnPropSymbols$y = Object.getOwnPropertySymbols, __hasOwnProp$y = Object.prototype.hasOwnProperty, __propIsEnum$y = Object.prototype.propertyIsEnumerable, __defNormalProp$z = (obj, key2, value) => key2 in obj ? __defProp$z(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$y = (a, b) => {
|
|
3483
|
-
for (var prop in b || (b = {}))
|
|
3484
|
-
__hasOwnProp$y.call(b, prop) && __defNormalProp$z(a, prop, b[prop]);
|
|
3485
|
-
if (__getOwnPropSymbols$y)
|
|
3486
|
-
for (var prop of __getOwnPropSymbols$y(b))
|
|
3487
|
-
__propIsEnum$y.call(b, prop) && __defNormalProp$z(a, prop, b[prop]);
|
|
3488
|
-
return a;
|
|
3489
|
-
};
|
|
3490
3042
|
function moveTowardsLength(movingPoint, targetPoint, amount) {
|
|
3491
3043
|
const width = targetPoint.x - movingPoint.x, height = targetPoint.y - movingPoint.y, distance = Math.sqrt(width * width + height * height);
|
|
3492
3044
|
return moveTowardsFractional(movingPoint, targetPoint, Math.min(1, amount / distance));
|
|
@@ -3503,40 +3055,26 @@ function getRoundedCommands(points) {
|
|
|
3503
3055
|
const point = points[i], prevPoint = points[i - 1], nextPoint = points[i + 1];
|
|
3504
3056
|
if (prevPoint && point.radius) {
|
|
3505
3057
|
const curveStart = moveTowardsLength(point, prevPoint, point.radius), curveEnd = moveTowardsLength(point, nextPoint, point.radius), startControl = moveTowardsFractional(curveStart, point, 0.5), endControl = moveTowardsFractional(point, curveEnd, 0.5);
|
|
3506
|
-
cmds.push(
|
|
3507
|
-
type: "point"
|
|
3508
|
-
|
|
3058
|
+
cmds.push({
|
|
3059
|
+
type: "point",
|
|
3060
|
+
...curveStart
|
|
3061
|
+
}), cmds.push({
|
|
3509
3062
|
type: "curve",
|
|
3510
3063
|
curveEnd,
|
|
3511
3064
|
startControl,
|
|
3512
3065
|
endControl
|
|
3513
3066
|
});
|
|
3514
3067
|
} else
|
|
3515
|
-
cmds.push(
|
|
3516
|
-
type: "point"
|
|
3517
|
-
|
|
3068
|
+
cmds.push({
|
|
3069
|
+
type: "point",
|
|
3070
|
+
...point
|
|
3071
|
+
});
|
|
3518
3072
|
}
|
|
3519
3073
|
return cmds;
|
|
3520
3074
|
}
|
|
3521
3075
|
function compileCommands(cmds) {
|
|
3522
3076
|
return cmds.map((n, idx) => n.type === "point" ? `${idx === 0 ? "M" : "L"} ${n.x} ${n.y}` : n.type === "curve" ? `C ${n.startControl.x} ${n.startControl.y} ${n.endControl.x} ${n.endControl.y} ${n.curveEnd.x} ${n.curveEnd.y}` : "").join(" ");
|
|
3523
3077
|
}
|
|
3524
|
-
var __defProp$y = Object.defineProperty, __defProps$x = Object.defineProperties, __getOwnPropDescs$x = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$x = Object.getOwnPropertySymbols, __hasOwnProp$x = Object.prototype.hasOwnProperty, __propIsEnum$x = Object.prototype.propertyIsEnumerable, __defNormalProp$y = (obj, key2, value) => key2 in obj ? __defProp$y(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$x = (a, b) => {
|
|
3525
|
-
for (var prop in b || (b = {}))
|
|
3526
|
-
__hasOwnProp$x.call(b, prop) && __defNormalProp$y(a, prop, b[prop]);
|
|
3527
|
-
if (__getOwnPropSymbols$x)
|
|
3528
|
-
for (var prop of __getOwnPropSymbols$x(b))
|
|
3529
|
-
__propIsEnum$x.call(b, prop) && __defNormalProp$y(a, prop, b[prop]);
|
|
3530
|
-
return a;
|
|
3531
|
-
}, __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b)), __objRest$t = (source, exclude) => {
|
|
3532
|
-
var target = {};
|
|
3533
|
-
for (var prop in source)
|
|
3534
|
-
__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3535
|
-
if (source != null && __getOwnPropSymbols$x)
|
|
3536
|
-
for (var prop of __getOwnPropSymbols$x(source))
|
|
3537
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop) && (target[prop] = source[prop]);
|
|
3538
|
-
return target;
|
|
3539
|
-
};
|
|
3540
3078
|
const Root$k = styledComponents.styled.div(({
|
|
3541
3079
|
$w: w
|
|
3542
3080
|
}) => styledComponents.css`
|
|
@@ -3590,18 +3128,14 @@ const Root$k = styledComponents.styled.div(({
|
|
|
3590
3128
|
`, ShapePath = styledComponents.styled.path`
|
|
3591
3129
|
fill: var(--card-bg-color);
|
|
3592
3130
|
`, Arrow = react.forwardRef(function(props, ref) {
|
|
3593
|
-
var _a;
|
|
3594
3131
|
const $ = reactCompilerRuntime.c(24);
|
|
3595
3132
|
let h, restProps, t0, w;
|
|
3596
|
-
$[0] !== props ? (
|
|
3133
|
+
$[0] !== props ? ({
|
|
3597
3134
|
width: w,
|
|
3598
3135
|
height: h,
|
|
3599
|
-
radius: t0
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
"height",
|
|
3603
|
-
"radius"
|
|
3604
|
-
]), $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w) : (h = $[1], restProps = $[2], t0 = $[3], w = $[4]);
|
|
3136
|
+
radius: t0,
|
|
3137
|
+
...restProps
|
|
3138
|
+
} = props, $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w) : (h = $[1], restProps = $[2], t0 = $[3], w = $[4]);
|
|
3605
3139
|
const radius = t0 === void 0 ? 0 : t0, {
|
|
3606
3140
|
card
|
|
3607
3141
|
} = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, points = [{
|
|
@@ -3637,7 +3171,7 @@ const Root$k = styledComponents.styled.div(({
|
|
|
3637
3171
|
t5
|
|
3638
3172
|
] }), $[13] = t1, $[14] = t2, $[15] = t4, $[16] = t5, $[17] = w, $[18] = t6) : t6 = $[18];
|
|
3639
3173
|
let t7;
|
|
3640
|
-
return $[19] !== ref || $[20] !== restProps || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Root$k,
|
|
3174
|
+
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;
|
|
3641
3175
|
});
|
|
3642
3176
|
Arrow.displayName = "ForwardRef(Arrow)";
|
|
3643
3177
|
const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null);
|
|
@@ -3689,36 +3223,17 @@ function findMinBreakpoints(media, width) {
|
|
|
3689
3223
|
media[i] <= width && ret.push(i);
|
|
3690
3224
|
return ret;
|
|
3691
3225
|
}
|
|
3692
|
-
var __defProp$x = Object.defineProperty, __defProps$w = Object.defineProperties, __getOwnPropDescs$w = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$w = Object.getOwnPropertySymbols, __hasOwnProp$w = Object.prototype.hasOwnProperty, __propIsEnum$w = Object.prototype.propertyIsEnumerable, __defNormalProp$x = (obj, key2, value) => key2 in obj ? __defProp$x(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$w = (a, b) => {
|
|
3693
|
-
for (var prop in b || (b = {}))
|
|
3694
|
-
__hasOwnProp$w.call(b, prop) && __defNormalProp$x(a, prop, b[prop]);
|
|
3695
|
-
if (__getOwnPropSymbols$w)
|
|
3696
|
-
for (var prop of __getOwnPropSymbols$w(b))
|
|
3697
|
-
__propIsEnum$w.call(b, prop) && __defNormalProp$x(a, prop, b[prop]);
|
|
3698
|
-
return a;
|
|
3699
|
-
}, __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b)), __objRest$s = (source, exclude) => {
|
|
3700
|
-
var target = {};
|
|
3701
|
-
for (var prop in source)
|
|
3702
|
-
__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3703
|
-
if (source != null && __getOwnPropSymbols$w)
|
|
3704
|
-
for (var prop of __getOwnPropSymbols$w(source))
|
|
3705
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop) && (target[prop] = source[prop]);
|
|
3706
|
-
return target;
|
|
3707
|
-
};
|
|
3708
3226
|
const ElementQuery = react.forwardRef(function(props, forwardedRef) {
|
|
3709
|
-
var _a, _b;
|
|
3710
3227
|
const $ = reactCompilerRuntime.c(18), theme2 = useTheme_v2();
|
|
3711
3228
|
let _media, children, restProps;
|
|
3712
|
-
$[0] !== props ? (
|
|
3229
|
+
$[0] !== props ? ({
|
|
3713
3230
|
children,
|
|
3714
|
-
media: _media
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
]), $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
|
|
3719
|
-
const media = _media != null ? _media : theme2.media, [element, setElement] = react.useState(null), elementSize = useElementSize(element);
|
|
3231
|
+
media: _media,
|
|
3232
|
+
...restProps
|
|
3233
|
+
} = props, $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
|
|
3234
|
+
const media = _media ?? theme2.media, [element, setElement] = react.useState(null), elementSize = useElementSize(element);
|
|
3720
3235
|
let t0;
|
|
3721
|
-
t0 =
|
|
3236
|
+
t0 = elementSize?.border.width ?? window.innerWidth;
|
|
3722
3237
|
const width = t0;
|
|
3723
3238
|
let t1, t2;
|
|
3724
3239
|
if ($[4] !== media || $[5] !== width) {
|
|
@@ -3739,16 +3254,13 @@ const ElementQuery = react.forwardRef(function(props, forwardedRef) {
|
|
|
3739
3254
|
let t5, t6;
|
|
3740
3255
|
$[10] !== element ? (t5 = () => element, t6 = [element], $[10] = element, $[11] = t5, $[12] = t6) : (t5 = $[11], t6 = $[12]), react.useImperativeHandle(forwardedRef, t5, t6);
|
|
3741
3256
|
let t7;
|
|
3742
|
-
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t7 = /* @__PURE__ */ jsxRuntime.jsx("div",
|
|
3257
|
+
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;
|
|
3743
3258
|
});
|
|
3744
3259
|
ElementQuery.displayName = "ForwardRef(ElementQuery)";
|
|
3745
|
-
var __defProp$w = Object.defineProperty, __defNormalProp$w = (obj, key2, value) => key2 in obj ? __defProp$w(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __publicField = (obj, key2, value) => __defNormalProp$w(obj, key2 + "", value);
|
|
3746
3260
|
class ErrorBoundary extends react.Component {
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
});
|
|
3751
|
-
}
|
|
3261
|
+
state = {
|
|
3262
|
+
error: null
|
|
3263
|
+
};
|
|
3752
3264
|
static getDerivedStateFromError(error) {
|
|
3753
3265
|
return {
|
|
3754
3266
|
error
|
|
@@ -3765,7 +3277,7 @@ class ErrorBoundary extends react.Component {
|
|
|
3765
3277
|
error
|
|
3766
3278
|
} = this.state;
|
|
3767
3279
|
if (error) {
|
|
3768
|
-
const message = typeof
|
|
3280
|
+
const message = typeof error?.message == "string" ? error.message : "Error";
|
|
3769
3281
|
return /* @__PURE__ */ jsxRuntime.jsx(Code, { children: message });
|
|
3770
3282
|
}
|
|
3771
3283
|
return this.props.children;
|
|
@@ -3843,7 +3355,7 @@ function attemptFocus(element) {
|
|
|
3843
3355
|
return !1;
|
|
3844
3356
|
try {
|
|
3845
3357
|
element.focus();
|
|
3846
|
-
} catch
|
|
3358
|
+
} catch {
|
|
3847
3359
|
}
|
|
3848
3360
|
return document.activeElement === element;
|
|
3849
3361
|
}
|
|
@@ -3868,45 +3380,38 @@ function _isScrollable(el) {
|
|
|
3868
3380
|
const style = window.getComputedStyle(el);
|
|
3869
3381
|
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
3870
3382
|
}
|
|
3871
|
-
var __defProp$v = Object.defineProperty, __defProps$v = Object.defineProperties, __getOwnPropDescs$v = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$v = Object.getOwnPropertySymbols, __hasOwnProp$v = Object.prototype.hasOwnProperty, __propIsEnum$v = Object.prototype.propertyIsEnumerable, __defNormalProp$v = (obj, key2, value) => key2 in obj ? __defProp$v(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$v = (a, b) => {
|
|
3872
|
-
for (var prop in b || (b = {}))
|
|
3873
|
-
__hasOwnProp$v.call(b, prop) && __defNormalProp$v(a, prop, b[prop]);
|
|
3874
|
-
if (__getOwnPropSymbols$v)
|
|
3875
|
-
for (var prop of __getOwnPropSymbols$v(b))
|
|
3876
|
-
__propIsEnum$v.call(b, prop) && __defNormalProp$v(a, prop, b[prop]);
|
|
3877
|
-
return a;
|
|
3878
|
-
}, __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
|
|
3879
3383
|
function LayerProvider(props) {
|
|
3880
|
-
var _a;
|
|
3881
3384
|
const $ = reactCompilerRuntime.c(19), {
|
|
3882
3385
|
children,
|
|
3883
3386
|
zOffset: t0
|
|
3884
3387
|
} = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = react.useContext(LayerContext);
|
|
3885
3388
|
let t1;
|
|
3886
3389
|
$[0] !== parentContextValue ? (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1) : t1 = $[1];
|
|
3887
|
-
const parent = t1, parentRegisterChild = parent
|
|
3390
|
+
const parent = t1, parentRegisterChild = parent?.registerChild, level = (parent?.level ?? 0) + 1, zOffset = useArrayProp(zOffsetProp), maxMediaIndex = zOffset.length - 1, mediaIndex = Math.min(useMediaIndex(), maxMediaIndex), zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex];
|
|
3888
3391
|
let t2;
|
|
3889
3392
|
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t2 = {}, $[2] = t2) : t2 = $[2];
|
|
3890
3393
|
const [, setChildLayers] = react.useState(t2), [size2, setSize] = react.useState(0), isTopLayer = size2 === 0;
|
|
3891
3394
|
let t3;
|
|
3892
3395
|
$[3] !== parentRegisterChild || $[4] !== setChildLayers ? (t3 = (childLevel) => {
|
|
3893
|
-
const parentDispose = parentRegisterChild
|
|
3396
|
+
const parentDispose = parentRegisterChild?.(childLevel);
|
|
3894
3397
|
return childLevel !== void 0 ? setChildLayers((state) => {
|
|
3895
|
-
|
|
3896
|
-
|
|
3398
|
+
const prevLen = state[childLevel] ?? 0, nextState = {
|
|
3399
|
+
...state,
|
|
3897
3400
|
[childLevel]: prevLen + 1
|
|
3898
|
-
}
|
|
3401
|
+
};
|
|
3899
3402
|
return setSize(Object.keys(nextState).length), nextState;
|
|
3900
3403
|
}) : setSize(_temp$5), () => {
|
|
3901
3404
|
childLevel !== void 0 ? setChildLayers((state_0) => {
|
|
3902
|
-
const nextState_0 =
|
|
3405
|
+
const nextState_0 = {
|
|
3406
|
+
...state_0
|
|
3407
|
+
};
|
|
3903
3408
|
return nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel] = nextState_0[childLevel] - 1, nextState_0;
|
|
3904
|
-
}) : setSize(_temp2$3), parentDispose
|
|
3409
|
+
}) : setSize(_temp2$3), parentDispose?.();
|
|
3905
3410
|
};
|
|
3906
3411
|
}, $[3] = parentRegisterChild, $[4] = setChildLayers, $[5] = t3) : t3 = $[5];
|
|
3907
3412
|
const registerChild = t3;
|
|
3908
3413
|
let t4, t5;
|
|
3909
|
-
$[6] !== level || $[7] !== parentRegisterChild ? (t4 = () => parentRegisterChild
|
|
3414
|
+
$[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);
|
|
3910
3415
|
let t6, t7;
|
|
3911
3416
|
$[10] !== isTopLayer || $[11] !== level || $[12] !== registerChild || $[13] !== size2 || $[14] !== zIndex ? (t7 = {
|
|
3912
3417
|
version: 0,
|
|
@@ -3927,39 +3432,18 @@ function _temp$5(v) {
|
|
|
3927
3432
|
return v + 1;
|
|
3928
3433
|
}
|
|
3929
3434
|
LayerProvider.displayName = "LayerProvider";
|
|
3930
|
-
var __defProp$u = Object.defineProperty, __defProps$u = Object.defineProperties, __getOwnPropDescs$u = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$u = Object.getOwnPropertySymbols, __hasOwnProp$u = Object.prototype.hasOwnProperty, __propIsEnum$u = Object.prototype.propertyIsEnumerable, __defNormalProp$u = (obj, key2, value) => key2 in obj ? __defProp$u(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$u = (a, b) => {
|
|
3931
|
-
for (var prop in b || (b = {}))
|
|
3932
|
-
__hasOwnProp$u.call(b, prop) && __defNormalProp$u(a, prop, b[prop]);
|
|
3933
|
-
if (__getOwnPropSymbols$u)
|
|
3934
|
-
for (var prop of __getOwnPropSymbols$u(b))
|
|
3935
|
-
__propIsEnum$u.call(b, prop) && __defNormalProp$u(a, prop, b[prop]);
|
|
3936
|
-
return a;
|
|
3937
|
-
}, __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b)), __objRest$r = (source, exclude) => {
|
|
3938
|
-
var target = {};
|
|
3939
|
-
for (var prop in source)
|
|
3940
|
-
__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3941
|
-
if (source != null && __getOwnPropSymbols$u)
|
|
3942
|
-
for (var prop of __getOwnPropSymbols$u(source))
|
|
3943
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop) && (target[prop] = source[prop]);
|
|
3944
|
-
return target;
|
|
3945
|
-
};
|
|
3946
3435
|
const Root$j = styledComponents.styled.div({
|
|
3947
3436
|
position: "relative"
|
|
3948
3437
|
}), LayerChildren = react.forwardRef(function(props, forwardedRef) {
|
|
3949
|
-
var _a;
|
|
3950
3438
|
const $ = reactCompilerRuntime.c(22);
|
|
3951
3439
|
let children, onActivate, onFocus, restProps, t0;
|
|
3952
|
-
$[0] !== props ? (
|
|
3440
|
+
$[0] !== props ? ({
|
|
3953
3441
|
children,
|
|
3954
3442
|
onActivate,
|
|
3955
3443
|
onFocus,
|
|
3956
|
-
style: t0
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
"onActivate",
|
|
3960
|
-
"onFocus",
|
|
3961
|
-
"style"
|
|
3962
|
-
]), $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
|
|
3444
|
+
style: t0,
|
|
3445
|
+
...restProps
|
|
3446
|
+
} = props, $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
|
|
3963
3447
|
const style = t0 === void 0 ? EMPTY_RECORD : t0, {
|
|
3964
3448
|
zIndex,
|
|
3965
3449
|
isTopLayer
|
|
@@ -3968,37 +3452,35 @@ const Root$j = styledComponents.styled.div({
|
|
|
3968
3452
|
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[6] = t1) : t1 = $[6], react.useImperativeHandle(forwardedRef, t1);
|
|
3969
3453
|
let t2, t3;
|
|
3970
3454
|
$[7] !== isTopLayer || $[8] !== onActivate ? (t2 = () => {
|
|
3971
|
-
isTopLayerRef.current !== isTopLayer && isTopLayer &&
|
|
3455
|
+
isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({
|
|
3972
3456
|
activeElement: lastFocusedRef.current
|
|
3973
|
-
})
|
|
3457
|
+
}), isTopLayerRef.current = isTopLayer;
|
|
3974
3458
|
}, t3 = [isTopLayer, onActivate], $[7] = isTopLayer, $[8] = onActivate, $[9] = t2, $[10] = t3) : (t2 = $[9], t3 = $[10]), react.useEffect(t2, t3);
|
|
3975
3459
|
let t4;
|
|
3976
3460
|
$[11] !== isTopLayer || $[12] !== onFocus ? (t4 = (event) => {
|
|
3977
|
-
onFocus
|
|
3461
|
+
onFocus?.(event);
|
|
3978
3462
|
const rootElement = ref.current, target = document.activeElement;
|
|
3979
3463
|
!isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
|
|
3980
3464
|
}, $[11] = isTopLayer, $[12] = onFocus, $[13] = t4) : t4 = $[13];
|
|
3981
3465
|
const handleFocus = t4;
|
|
3982
3466
|
let t5;
|
|
3983
|
-
$[14] !== style || $[15] !== zIndex ? (t5 =
|
|
3467
|
+
$[14] !== style || $[15] !== zIndex ? (t5 = {
|
|
3468
|
+
...style,
|
|
3984
3469
|
zIndex
|
|
3985
|
-
}
|
|
3470
|
+
}, $[14] = style, $[15] = zIndex, $[16] = t5) : t5 = $[16];
|
|
3986
3471
|
let t6;
|
|
3987
|
-
return $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$j,
|
|
3472
|
+
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;
|
|
3988
3473
|
}), Layer = react.forwardRef(function(props, ref) {
|
|
3989
|
-
var _a;
|
|
3990
3474
|
const $ = reactCompilerRuntime.c(11);
|
|
3991
3475
|
let children, restProps, t0;
|
|
3992
|
-
$[0] !== props ? (
|
|
3476
|
+
$[0] !== props ? ({
|
|
3993
3477
|
children,
|
|
3994
|
-
zOffset: t0
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
"zOffset"
|
|
3998
|
-
]), $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
3478
|
+
zOffset: t0,
|
|
3479
|
+
...restProps
|
|
3480
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
3999
3481
|
const zOffset = t0 === void 0 ? 1 : t0;
|
|
4000
3482
|
let t1;
|
|
4001
|
-
$[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(LayerChildren,
|
|
3483
|
+
$[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(LayerChildren, { ...restProps, ref, children }), $[4] = children, $[5] = ref, $[6] = restProps, $[7] = t1) : t1 = $[7];
|
|
4002
3484
|
let t2;
|
|
4003
3485
|
return $[8] !== t1 || $[9] !== zOffset ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: t1 }), $[8] = t1, $[9] = zOffset, $[10] = t2) : t2 = $[10], t2;
|
|
4004
3486
|
});
|
|
@@ -4021,11 +3503,10 @@ function usePortal() {
|
|
|
4021
3503
|
return value;
|
|
4022
3504
|
}
|
|
4023
3505
|
function Portal(props) {
|
|
4024
|
-
var _a;
|
|
4025
3506
|
const $ = reactCompilerRuntime.c(3), {
|
|
4026
3507
|
children,
|
|
4027
3508
|
__unstable_name: name
|
|
4028
|
-
} = props, portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) ||
|
|
3509
|
+
} = props, portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) || portal.elements?.default;
|
|
4029
3510
|
if (!portalElement)
|
|
4030
3511
|
return null;
|
|
4031
3512
|
let t0;
|
|
@@ -4087,22 +3568,6 @@ const Root$i = styledComponents.styled.div`
|
|
|
4087
3568
|
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;
|
|
4088
3569
|
});
|
|
4089
3570
|
SrOnly.displayName = "ForwardRef(SrOnly)";
|
|
4090
|
-
var __defProp$t = Object.defineProperty, __defProps$t = Object.defineProperties, __getOwnPropDescs$t = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$t = Object.getOwnPropertySymbols, __hasOwnProp$t = Object.prototype.hasOwnProperty, __propIsEnum$t = Object.prototype.propertyIsEnumerable, __defNormalProp$t = (obj, key2, value) => key2 in obj ? __defProp$t(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$t = (a, b) => {
|
|
4091
|
-
for (var prop in b || (b = {}))
|
|
4092
|
-
__hasOwnProp$t.call(b, prop) && __defNormalProp$t(a, prop, b[prop]);
|
|
4093
|
-
if (__getOwnPropSymbols$t)
|
|
4094
|
-
for (var prop of __getOwnPropSymbols$t(b))
|
|
4095
|
-
__propIsEnum$t.call(b, prop) && __defNormalProp$t(a, prop, b[prop]);
|
|
4096
|
-
return a;
|
|
4097
|
-
}, __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b)), __objRest$q = (source, exclude) => {
|
|
4098
|
-
var target = {};
|
|
4099
|
-
for (var prop in source)
|
|
4100
|
-
__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4101
|
-
if (source != null && __getOwnPropSymbols$t)
|
|
4102
|
-
for (var prop of __getOwnPropSymbols$t(source))
|
|
4103
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop) && (target[prop] = source[prop]);
|
|
4104
|
-
return target;
|
|
4105
|
-
};
|
|
4106
3571
|
const Root$h = styledComponents.styled.div`
|
|
4107
3572
|
position: relative;
|
|
4108
3573
|
`, ItemWrapper = styledComponents.styled.div`
|
|
@@ -4110,24 +3575,17 @@ const Root$h = styledComponents.styled.div`
|
|
|
4110
3575
|
left: 0;
|
|
4111
3576
|
right: 0;
|
|
4112
3577
|
`, VirtualList = react.forwardRef(function(props, forwardedRef) {
|
|
4113
|
-
var _a;
|
|
4114
3578
|
const $ = reactCompilerRuntime.c(56);
|
|
4115
3579
|
let getItemKey, onChange, renderItem, restProps, t0, t1, t2;
|
|
4116
|
-
$[0] !== props ? (
|
|
3580
|
+
$[0] !== props ? ({
|
|
4117
3581
|
as: t0,
|
|
4118
3582
|
gap: t1,
|
|
4119
3583
|
getItemKey,
|
|
4120
3584
|
items: t2,
|
|
4121
3585
|
onChange,
|
|
4122
|
-
renderItem
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
"gap",
|
|
4126
|
-
"getItemKey",
|
|
4127
|
-
"items",
|
|
4128
|
-
"onChange",
|
|
4129
|
-
"renderItem"
|
|
4130
|
-
]), $[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]);
|
|
3586
|
+
renderItem,
|
|
3587
|
+
...restProps
|
|
3588
|
+
} = 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]);
|
|
4131
3589
|
const as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1;
|
|
4132
3590
|
let t3;
|
|
4133
3591
|
$[8] !== t2 ? (t3 = t2 === void 0 ? [] : t2, $[8] = t2, $[9] = t3) : t3 = $[9];
|
|
@@ -4228,7 +3686,7 @@ const Root$h = styledComponents.styled.div`
|
|
|
4228
3686
|
let t14;
|
|
4229
3687
|
$[49] !== children || $[50] !== wrapperStyle ? (t14 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[49] = children, $[50] = wrapperStyle, $[51] = t14) : t14 = $[51];
|
|
4230
3688
|
let t15;
|
|
4231
|
-
return $[52] !== as || $[53] !== restProps || $[54] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Root$h,
|
|
3689
|
+
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;
|
|
4232
3690
|
});
|
|
4233
3691
|
VirtualList.displayName = "ForwardRef(VirtualList)";
|
|
4234
3692
|
const DEFAULT_POPOVER_DISTANCE = 4, DEFAULT_POPOVER_PADDING = 4, DEFAULT_POPOVER_ARROW_WIDTH = 19, DEFAULT_POPOVER_ARROW_HEIGHT = 8, DEFAULT_POPOVER_ARROW_RADIUS = 2, DEFAULT_POPOVER_MARGINS = [0, 0, 0, 0], DEFAULT_FALLBACK_PLACEMENTS$1 = {
|
|
@@ -4300,24 +3758,8 @@ function calcMaxWidth(params) {
|
|
|
4300
3758
|
currentWidth
|
|
4301
3759
|
} = params;
|
|
4302
3760
|
if (!(currentWidth === void 0 && boundaryWidth === void 0))
|
|
4303
|
-
return Math.min(currentWidth
|
|
4304
|
-
}
|
|
4305
|
-
var __defProp$s = Object.defineProperty, __defProps$s = Object.defineProperties, __getOwnPropDescs$s = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$s = Object.getOwnPropertySymbols, __hasOwnProp$s = Object.prototype.hasOwnProperty, __propIsEnum$s = Object.prototype.propertyIsEnumerable, __defNormalProp$s = (obj, key2, value) => key2 in obj ? __defProp$s(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$s = (a, b) => {
|
|
4306
|
-
for (var prop in b || (b = {}))
|
|
4307
|
-
__hasOwnProp$s.call(b, prop) && __defNormalProp$s(a, prop, b[prop]);
|
|
4308
|
-
if (__getOwnPropSymbols$s)
|
|
4309
|
-
for (var prop of __getOwnPropSymbols$s(b))
|
|
4310
|
-
__propIsEnum$s.call(b, prop) && __defNormalProp$s(a, prop, b[prop]);
|
|
4311
|
-
return a;
|
|
4312
|
-
}, __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b)), __objRest$p = (source, exclude) => {
|
|
4313
|
-
var target = {};
|
|
4314
|
-
for (var prop in source)
|
|
4315
|
-
__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4316
|
-
if (source != null && __getOwnPropSymbols$s)
|
|
4317
|
-
for (var prop of __getOwnPropSymbols$s(source))
|
|
4318
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop) && (target[prop] = source[prop]);
|
|
4319
|
-
return target;
|
|
4320
|
-
};
|
|
3761
|
+
return Math.min(currentWidth ?? 1 / 0, (boundaryWidth || 1 / 0) - DEFAULT_POPOVER_PADDING * 2);
|
|
3762
|
+
}
|
|
4321
3763
|
const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
4322
3764
|
&:not([hidden]) {
|
|
4323
3765
|
display: flex;
|
|
@@ -4330,10 +3772,9 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
|
4330
3772
|
will-change: opacity;
|
|
4331
3773
|
}
|
|
4332
3774
|
`, PopoverCard = react.memo(react.forwardRef(function(props, ref) {
|
|
4333
|
-
var _a;
|
|
4334
3775
|
const $ = reactCompilerRuntime.c(60);
|
|
4335
3776
|
let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;
|
|
4336
|
-
$[0] !== props ? (
|
|
3777
|
+
$[0] !== props ? ({
|
|
4337
3778
|
__unstable_margins: marginsProp,
|
|
4338
3779
|
animate,
|
|
4339
3780
|
arrow,
|
|
@@ -4354,40 +3795,19 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
|
4354
3795
|
tone,
|
|
4355
3796
|
width,
|
|
4356
3797
|
x: xProp,
|
|
4357
|
-
y: yProp
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
"animate",
|
|
4361
|
-
"arrow",
|
|
4362
|
-
"arrowRef",
|
|
4363
|
-
"arrowX",
|
|
4364
|
-
"arrowY",
|
|
4365
|
-
"children",
|
|
4366
|
-
"padding",
|
|
4367
|
-
"placement",
|
|
4368
|
-
"originX",
|
|
4369
|
-
"originY",
|
|
4370
|
-
"overflow",
|
|
4371
|
-
"radius",
|
|
4372
|
-
"scheme",
|
|
4373
|
-
"shadow",
|
|
4374
|
-
"strategy",
|
|
4375
|
-
"style",
|
|
4376
|
-
"tone",
|
|
4377
|
-
"width",
|
|
4378
|
-
"x",
|
|
4379
|
-
"y"
|
|
4380
|
-
]), $[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]);
|
|
3798
|
+
y: yProp,
|
|
3799
|
+
...restProps
|
|
3800
|
+
} = 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]);
|
|
4381
3801
|
const {
|
|
4382
3802
|
zIndex
|
|
4383
3803
|
} = useLayer();
|
|
4384
3804
|
let t0;
|
|
4385
3805
|
t0 = marginsProp || DEFAULT_POPOVER_MARGINS;
|
|
4386
|
-
const margins = t0, x = (xProp
|
|
3806
|
+
const margins = t0, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
|
|
4387
3807
|
let t1;
|
|
4388
3808
|
const t2 = animate ? "transform" : void 0;
|
|
4389
3809
|
let t3;
|
|
4390
|
-
$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t2 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t3 =
|
|
3810
|
+
$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t2 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t3 = {
|
|
4391
3811
|
left: x,
|
|
4392
3812
|
originX,
|
|
4393
3813
|
originY,
|
|
@@ -4395,8 +3815,9 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
|
4395
3815
|
top: y,
|
|
4396
3816
|
width,
|
|
4397
3817
|
zIndex,
|
|
4398
|
-
willChange: t2
|
|
4399
|
-
|
|
3818
|
+
willChange: t2,
|
|
3819
|
+
...style
|
|
3820
|
+
}, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] = t2, $[28] = width, $[29] = x, $[30] = y, $[31] = zIndex, $[32] = t3) : t3 = $[32], t1 = t3;
|
|
4400
3821
|
const rootStyle2 = t1;
|
|
4401
3822
|
let t4;
|
|
4402
3823
|
const t5 = arrowX !== null ? arrowX : void 0, t6 = arrowY !== null ? arrowY : void 0;
|
|
@@ -4417,34 +3838,17 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
|
4417
3838
|
let t12;
|
|
4418
3839
|
$[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];
|
|
4419
3840
|
let t13;
|
|
4420
|
-
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,
|
|
3841
|
+
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: [
|
|
4421
3842
|
t11,
|
|
4422
3843
|
t12
|
|
4423
|
-
] })
|
|
3844
|
+
] }), $[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;
|
|
4424
3845
|
}));
|
|
4425
3846
|
PopoverCard.displayName = "Memo(ForwardRef(PopoverCard))";
|
|
4426
|
-
var __defProp$r = Object.defineProperty, __defProps$r = Object.defineProperties, __getOwnPropDescs$r = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$r = Object.getOwnPropertySymbols, __hasOwnProp$r = Object.prototype.hasOwnProperty, __propIsEnum$r = Object.prototype.propertyIsEnumerable, __defNormalProp$r = (obj, key2, value) => key2 in obj ? __defProp$r(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$r = (a, b) => {
|
|
4427
|
-
for (var prop in b || (b = {}))
|
|
4428
|
-
__hasOwnProp$r.call(b, prop) && __defNormalProp$r(a, prop, b[prop]);
|
|
4429
|
-
if (__getOwnPropSymbols$r)
|
|
4430
|
-
for (var prop of __getOwnPropSymbols$r(b))
|
|
4431
|
-
__propIsEnum$r.call(b, prop) && __defNormalProp$r(a, prop, b[prop]);
|
|
4432
|
-
return a;
|
|
4433
|
-
}, __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b)), __objRest$o = (source, exclude) => {
|
|
4434
|
-
var target = {};
|
|
4435
|
-
for (var prop in source)
|
|
4436
|
-
__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4437
|
-
if (source != null && __getOwnPropSymbols$r)
|
|
4438
|
-
for (var prop of __getOwnPropSymbols$r(source))
|
|
4439
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop) && (target[prop] = source[prop]);
|
|
4440
|
-
return target;
|
|
4441
|
-
};
|
|
4442
3847
|
const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
4443
|
-
var _a, _b, _c, _d, _f, _g, _h, _i, _j, _k;
|
|
4444
3848
|
const {
|
|
4445
3849
|
container,
|
|
4446
3850
|
layer
|
|
4447
|
-
} = useTheme_v2(), boundaryElementContext = useBoundaryElement(),
|
|
3851
|
+
} = useTheme_v2(), boundaryElementContext = useBoundaryElement(), {
|
|
4448
3852
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
4449
3853
|
animate: _animate = !1,
|
|
4450
3854
|
arrow: arrowProp = !1,
|
|
@@ -4453,9 +3857,10 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
4453
3857
|
constrainSize = !1,
|
|
4454
3858
|
content,
|
|
4455
3859
|
disabled,
|
|
4456
|
-
fallbackPlacements =
|
|
3860
|
+
fallbackPlacements = props.fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"],
|
|
4457
3861
|
matchReferenceWidth,
|
|
4458
|
-
floatingBoundary =
|
|
3862
|
+
floatingBoundary = props.boundaryElement ?? boundaryElementContext.element,
|
|
3863
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4459
3864
|
onActivate,
|
|
4460
3865
|
open,
|
|
4461
3866
|
overflow = "hidden",
|
|
@@ -4464,46 +3869,18 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
4464
3869
|
portal,
|
|
4465
3870
|
preventOverflow = !0,
|
|
4466
3871
|
radius: radiusProp = 3,
|
|
4467
|
-
referenceBoundary =
|
|
3872
|
+
referenceBoundary = props.boundaryElement ?? boundaryElementContext.element,
|
|
4468
3873
|
referenceElement,
|
|
4469
3874
|
scheme,
|
|
4470
3875
|
shadow: shadowProp = 3,
|
|
4471
3876
|
tone = "inherit",
|
|
4472
3877
|
width: widthProp = "auto",
|
|
4473
3878
|
zOffset: zOffsetProp = layer.popover.zOffset,
|
|
4474
|
-
updateRef
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
"animate",
|
|
4478
|
-
"arrow",
|
|
4479
|
-
"boundaryElement",
|
|
4480
|
-
"children",
|
|
4481
|
-
"constrainSize",
|
|
4482
|
-
"content",
|
|
4483
|
-
"disabled",
|
|
4484
|
-
"fallbackPlacements",
|
|
4485
|
-
"matchReferenceWidth",
|
|
4486
|
-
"floatingBoundary",
|
|
4487
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4488
|
-
"onActivate",
|
|
4489
|
-
"open",
|
|
4490
|
-
"overflow",
|
|
4491
|
-
"padding",
|
|
4492
|
-
"placement",
|
|
4493
|
-
"portal",
|
|
4494
|
-
"preventOverflow",
|
|
4495
|
-
"radius",
|
|
4496
|
-
"referenceBoundary",
|
|
4497
|
-
"referenceElement",
|
|
4498
|
-
"scheme",
|
|
4499
|
-
"shadow",
|
|
4500
|
-
"tone",
|
|
4501
|
-
"width",
|
|
4502
|
-
"zOffset",
|
|
4503
|
-
"updateRef"
|
|
4504
|
-
]), animate = usePrefersReducedMotion() ? !1 : _animate, boundarySize = (_f = useElementSize(boundaryElement)) == null ? void 0 : _f.border, padding = useArrayProp(paddingProp), radius = useArrayProp(radiusProp), shadow = useArrayProp(shadowProp), widthArrayProp = useArrayProp(widthProp), zOffset = useArrayProp(zOffsetProp), ref = react.useRef(null), arrowRef = react.useRef(null), rootBoundary = "viewport";
|
|
3879
|
+
updateRef,
|
|
3880
|
+
...restProps
|
|
3881
|
+
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, boundarySize = useElementSize(boundaryElement)?.border, padding = useArrayProp(paddingProp), radius = useArrayProp(radiusProp), shadow = useArrayProp(shadowProp), widthArrayProp = useArrayProp(widthProp), zOffset = useArrayProp(zOffsetProp), ref = react.useRef(null), arrowRef = react.useRef(null), rootBoundary = "viewport";
|
|
4505
3882
|
react.useImperativeHandle(forwardedRef, () => ref.current);
|
|
4506
|
-
const mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize
|
|
3883
|
+
const mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize?.width : void 0, width = calcCurrentWidth({
|
|
4507
3884
|
container,
|
|
4508
3885
|
mediaIndex,
|
|
4509
3886
|
width: widthArrayProp
|
|
@@ -4543,7 +3920,7 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
4543
3920
|
}) {
|
|
4544
3921
|
referenceWidthRef.current = referenceWidth_0;
|
|
4545
3922
|
const _currentWidth = widthRef.current, _maxWidth = maxWidthRef.current;
|
|
4546
|
-
matchReferenceWidth ? elements.floating.style.width = `${referenceWidth_0}px` : _currentWidth !== void 0 && (elements.floating.style.width = `${_currentWidth}px`), constrainSize && (elements.floating.style.maxWidth = `${Math.min(availableWidth, _maxWidth
|
|
3923
|
+
matchReferenceWidth ? elements.floating.style.width = `${referenceWidth_0}px` : _currentWidth !== void 0 && (elements.floating.style.width = `${_currentWidth}px`), constrainSize && (elements.floating.style.maxWidth = `${Math.min(availableWidth, _maxWidth ?? 1 / 0)}px`, elements.floating.style.maxHeight = `${availableHeight}px`);
|
|
4547
3924
|
},
|
|
4548
3925
|
boundaryElement: floatingBoundary || void 0,
|
|
4549
3926
|
constrainSize,
|
|
@@ -4577,7 +3954,7 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
4577
3954
|
elements: referenceElement ? {
|
|
4578
3955
|
reference: referenceElement
|
|
4579
3956
|
} : void 0
|
|
4580
|
-
}), referenceHidden =
|
|
3957
|
+
}), referenceHidden = middlewareData.hide?.referenceHidden, arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, setArrow = react.useCallback((arrowEl) => {
|
|
4581
3958
|
arrowRef.current = arrowEl;
|
|
4582
3959
|
}, []), setFloating = react.useCallback((node) => {
|
|
4583
3960
|
ref.current = node, refs.setFloating(node);
|
|
@@ -4592,7 +3969,7 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
4592
3969
|
updateRef && (typeof updateRef == "function" ? updateRef(update) : updateRef && (updateRef.current = update));
|
|
4593
3970
|
}, [update, updateRef]), disabled)
|
|
4594
3971
|
return childProp || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
4595
|
-
const popover = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(PopoverCard,
|
|
3972
|
+
const popover = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...restProps, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, hidden: referenceHidden, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, tone, width: matchReferenceWidth ? referenceWidthRef.current : width, x, y, children: content }) }), children = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover);
|
|
4596
3973
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4597
3974
|
animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
|
|
4598
3975
|
child
|
|
@@ -4600,9 +3977,8 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
4600
3977
|
}));
|
|
4601
3978
|
Popover.displayName = "Memo(ForwardRef(Popover))";
|
|
4602
3979
|
function getElementRef(element) {
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
return mayWarn ? element.ref : (getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
|
|
3980
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3981
|
+
return mayWarn ? element.ref : (getter = Object.getOwnPropertyDescriptor(element, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning, mayWarn ? element.props.ref : element.props.ref || element.ref);
|
|
4606
3982
|
}
|
|
4607
3983
|
function radioBaseStyle() {
|
|
4608
3984
|
return styledComponents.css`
|
|
@@ -4718,45 +4094,23 @@ function inputElementStyle(props) {
|
|
|
4718
4094
|
}
|
|
4719
4095
|
`;
|
|
4720
4096
|
}
|
|
4721
|
-
var __defProp$q = Object.defineProperty, __defProps$q = Object.defineProperties, __getOwnPropDescs$q = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$q = Object.getOwnPropertySymbols, __hasOwnProp$q = Object.prototype.hasOwnProperty, __propIsEnum$q = Object.prototype.propertyIsEnumerable, __defNormalProp$q = (obj, key2, value) => key2 in obj ? __defProp$q(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$q = (a, b) => {
|
|
4722
|
-
for (var prop in b || (b = {}))
|
|
4723
|
-
__hasOwnProp$q.call(b, prop) && __defNormalProp$q(a, prop, b[prop]);
|
|
4724
|
-
if (__getOwnPropSymbols$q)
|
|
4725
|
-
for (var prop of __getOwnPropSymbols$q(b))
|
|
4726
|
-
__propIsEnum$q.call(b, prop) && __defNormalProp$q(a, prop, b[prop]);
|
|
4727
|
-
return a;
|
|
4728
|
-
}, __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b)), __objRest$n = (source, exclude) => {
|
|
4729
|
-
var target = {};
|
|
4730
|
-
for (var prop in source)
|
|
4731
|
-
__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4732
|
-
if (source != null && __getOwnPropSymbols$q)
|
|
4733
|
-
for (var prop of __getOwnPropSymbols$q(source))
|
|
4734
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop) && (target[prop] = source[prop]);
|
|
4735
|
-
return target;
|
|
4736
|
-
};
|
|
4737
4097
|
const Root$g = styledComponents.styled.div(radioBaseStyle), Input$4 = styledComponents.styled.input(inputElementStyle), Radio = react.forwardRef(function(props, forwardedRef) {
|
|
4738
|
-
var _a;
|
|
4739
4098
|
const $ = reactCompilerRuntime.c(19);
|
|
4740
4099
|
let className, customValidity, disabled, readOnly, restProps, style;
|
|
4741
|
-
$[0] !== props ? (
|
|
4100
|
+
$[0] !== props ? ({
|
|
4742
4101
|
className,
|
|
4743
4102
|
disabled,
|
|
4744
4103
|
style,
|
|
4745
4104
|
customValidity,
|
|
4746
|
-
readOnly
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
"disabled",
|
|
4750
|
-
"style",
|
|
4751
|
-
"customValidity",
|
|
4752
|
-
"readOnly"
|
|
4753
|
-
]), $[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]);
|
|
4105
|
+
readOnly,
|
|
4106
|
+
...restProps
|
|
4107
|
+
} = 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]);
|
|
4754
4108
|
const ref = react.useRef(null);
|
|
4755
4109
|
let t0;
|
|
4756
4110
|
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[7] = t0) : t0 = $[7], react.useImperativeHandle(forwardedRef, t0), useCustomValidity(ref, customValidity);
|
|
4757
4111
|
const t1 = !disabled && readOnly ? "" : void 0, t2 = customValidity ? "" : void 0, t3 = disabled || readOnly;
|
|
4758
4112
|
let t4;
|
|
4759
|
-
$[8] !== readOnly || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Input$4,
|
|
4113
|
+
$[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];
|
|
4760
4114
|
let t5;
|
|
4761
4115
|
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", {}), $[14] = t5) : t5 = $[14];
|
|
4762
4116
|
let t6;
|
|
@@ -4908,28 +4262,10 @@ const selectStyle = {
|
|
|
4908
4262
|
root: rootStyle,
|
|
4909
4263
|
input: inputStyle,
|
|
4910
4264
|
iconBox: iconBoxStyle
|
|
4911
|
-
}
|
|
4912
|
-
var __defProp$p = Object.defineProperty, __defProps$p = Object.defineProperties, __getOwnPropDescs$p = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$p = Object.getOwnPropertySymbols, __hasOwnProp$p = Object.prototype.hasOwnProperty, __propIsEnum$p = Object.prototype.propertyIsEnumerable, __defNormalProp$p = (obj, key2, value) => key2 in obj ? __defProp$p(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$p = (a, b) => {
|
|
4913
|
-
for (var prop in b || (b = {}))
|
|
4914
|
-
__hasOwnProp$p.call(b, prop) && __defNormalProp$p(a, prop, b[prop]);
|
|
4915
|
-
if (__getOwnPropSymbols$p)
|
|
4916
|
-
for (var prop of __getOwnPropSymbols$p(b))
|
|
4917
|
-
__propIsEnum$p.call(b, prop) && __defNormalProp$p(a, prop, b[prop]);
|
|
4918
|
-
return a;
|
|
4919
|
-
}, __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b)), __objRest$m = (source, exclude) => {
|
|
4920
|
-
var target = {};
|
|
4921
|
-
for (var prop in source)
|
|
4922
|
-
__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4923
|
-
if (source != null && __getOwnPropSymbols$p)
|
|
4924
|
-
for (var prop of __getOwnPropSymbols$p(source))
|
|
4925
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop) && (target[prop] = source[prop]);
|
|
4926
|
-
return target;
|
|
4927
|
-
};
|
|
4928
|
-
const 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) {
|
|
4929
|
-
var _a;
|
|
4265
|
+
}, 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) {
|
|
4930
4266
|
const $ = reactCompilerRuntime.c(29);
|
|
4931
4267
|
let children, customValidity, disabled, readOnly, restProps, t0, t1, t2, t3;
|
|
4932
|
-
$[0] !== props ? (
|
|
4268
|
+
$[0] !== props ? ({
|
|
4933
4269
|
children,
|
|
4934
4270
|
customValidity,
|
|
4935
4271
|
disabled,
|
|
@@ -4937,23 +4273,15 @@ const Root$f = styledComponents.styled.div(selectStyle.root), Input$3 = styledCo
|
|
|
4937
4273
|
padding: t1,
|
|
4938
4274
|
radius: t2,
|
|
4939
4275
|
readOnly,
|
|
4940
|
-
space: t3
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
"customValidity",
|
|
4944
|
-
"disabled",
|
|
4945
|
-
"fontSize",
|
|
4946
|
-
"padding",
|
|
4947
|
-
"radius",
|
|
4948
|
-
"readOnly",
|
|
4949
|
-
"space"
|
|
4950
|
-
]), $[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]);
|
|
4276
|
+
space: t3,
|
|
4277
|
+
...restProps
|
|
4278
|
+
} = 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]);
|
|
4951
4279
|
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);
|
|
4952
4280
|
let t4;
|
|
4953
4281
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], react.useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
|
|
4954
4282
|
const t5 = !disabled && readOnly ? "" : void 0, t6 = useArrayProp(fontSize2), t7 = useArrayProp(padding), t8 = useArrayProp(radius), t9 = useArrayProp(space), t10 = disabled || readOnly;
|
|
4955
4283
|
let t11;
|
|
4956
|
-
$[11] !== children || $[12] !== restProps || $[13] !== t10 || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Input$3,
|
|
4284
|
+
$[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];
|
|
4957
4285
|
let t12;
|
|
4958
4286
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}), $[20] = t12) : t12 = $[20];
|
|
4959
4287
|
let t13;
|
|
@@ -4989,36 +4317,17 @@ function responsiveStackSpaceStyle(props) {
|
|
|
4989
4317
|
gridGap: rem(space[spaceIndex])
|
|
4990
4318
|
}));
|
|
4991
4319
|
}
|
|
4992
|
-
var __defProp$o = Object.defineProperty, __defProps$o = Object.defineProperties, __getOwnPropDescs$o = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$o = Object.getOwnPropertySymbols, __hasOwnProp$o = Object.prototype.hasOwnProperty, __propIsEnum$o = Object.prototype.propertyIsEnumerable, __defNormalProp$o = (obj, key2, value) => key2 in obj ? __defProp$o(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$o = (a, b) => {
|
|
4993
|
-
for (var prop in b || (b = {}))
|
|
4994
|
-
__hasOwnProp$o.call(b, prop) && __defNormalProp$o(a, prop, b[prop]);
|
|
4995
|
-
if (__getOwnPropSymbols$o)
|
|
4996
|
-
for (var prop of __getOwnPropSymbols$o(b))
|
|
4997
|
-
__propIsEnum$o.call(b, prop) && __defNormalProp$o(a, prop, b[prop]);
|
|
4998
|
-
return a;
|
|
4999
|
-
}, __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b)), __objRest$l = (source, exclude) => {
|
|
5000
|
-
var target = {};
|
|
5001
|
-
for (var prop in source)
|
|
5002
|
-
__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5003
|
-
if (source != null && __getOwnPropSymbols$o)
|
|
5004
|
-
for (var prop of __getOwnPropSymbols$o(source))
|
|
5005
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop) && (target[prop] = source[prop]);
|
|
5006
|
-
return target;
|
|
5007
|
-
};
|
|
5008
4320
|
const Root$e = styledComponents.styled(Box)(stackBaseStyle, responsiveStackSpaceStyle), Stack = react.forwardRef(function(props, ref) {
|
|
5009
|
-
var _a;
|
|
5010
4321
|
const $ = reactCompilerRuntime.c(10);
|
|
5011
4322
|
let as, restProps, space;
|
|
5012
|
-
$[0] !== props ? (
|
|
4323
|
+
$[0] !== props ? ({
|
|
5013
4324
|
as,
|
|
5014
|
-
space
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
"space"
|
|
5018
|
-
]), $[0] = props, $[1] = as, $[2] = restProps, $[3] = space) : (as = $[1], restProps = $[2], space = $[3]);
|
|
4325
|
+
space,
|
|
4326
|
+
...restProps
|
|
4327
|
+
} = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = space) : (as = $[1], restProps = $[2], space = $[3]);
|
|
5019
4328
|
const t0 = typeof as == "string" ? as : void 0, t1 = useArrayProp(space);
|
|
5020
4329
|
let t2;
|
|
5021
|
-
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t0 || $[8] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Root$e,
|
|
4330
|
+
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;
|
|
5022
4331
|
});
|
|
5023
4332
|
Stack.displayName = "ForwardRef(Stack)";
|
|
5024
4333
|
function switchBaseStyles() {
|
|
@@ -5174,41 +4483,18 @@ function switchThumbStyles(props) {
|
|
|
5174
4483
|
`}
|
|
5175
4484
|
`;
|
|
5176
4485
|
}
|
|
5177
|
-
var __defProp$n = Object.defineProperty, __defProps$n = Object.defineProperties, __getOwnPropDescs$n = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$n = Object.getOwnPropertySymbols, __hasOwnProp$n = Object.prototype.hasOwnProperty, __propIsEnum$n = Object.prototype.propertyIsEnumerable, __defNormalProp$n = (obj, key2, value) => key2 in obj ? __defProp$n(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$n = (a, b) => {
|
|
5178
|
-
for (var prop in b || (b = {}))
|
|
5179
|
-
__hasOwnProp$n.call(b, prop) && __defNormalProp$n(a, prop, b[prop]);
|
|
5180
|
-
if (__getOwnPropSymbols$n)
|
|
5181
|
-
for (var prop of __getOwnPropSymbols$n(b))
|
|
5182
|
-
__propIsEnum$n.call(b, prop) && __defNormalProp$n(a, prop, b[prop]);
|
|
5183
|
-
return a;
|
|
5184
|
-
}, __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b)), __objRest$k = (source, exclude) => {
|
|
5185
|
-
var target = {};
|
|
5186
|
-
for (var prop in source)
|
|
5187
|
-
__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5188
|
-
if (source != null && __getOwnPropSymbols$n)
|
|
5189
|
-
for (var prop of __getOwnPropSymbols$n(source))
|
|
5190
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop) && (target[prop] = source[prop]);
|
|
5191
|
-
return target;
|
|
5192
|
-
};
|
|
5193
4486
|
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) {
|
|
5194
|
-
var _a;
|
|
5195
4487
|
const $ = reactCompilerRuntime.c(26);
|
|
5196
4488
|
let checked, className, disabled, indeterminate, readOnly, restProps, style;
|
|
5197
|
-
$[0] !== props ? (
|
|
4489
|
+
$[0] !== props ? ({
|
|
5198
4490
|
checked,
|
|
5199
4491
|
className,
|
|
5200
4492
|
disabled,
|
|
5201
4493
|
indeterminate,
|
|
5202
4494
|
readOnly,
|
|
5203
|
-
style
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
"className",
|
|
5207
|
-
"disabled",
|
|
5208
|
-
"indeterminate",
|
|
5209
|
-
"readOnly",
|
|
5210
|
-
"style"
|
|
5211
|
-
]), $[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]);
|
|
4495
|
+
style,
|
|
4496
|
+
...restProps
|
|
4497
|
+
} = 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]);
|
|
5212
4498
|
const ref = react.useRef(null);
|
|
5213
4499
|
let t0;
|
|
5214
4500
|
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[8] = t0) : t0 = $[8], react.useImperativeHandle(forwardedRef, t0);
|
|
@@ -5218,7 +4504,7 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
5218
4504
|
}, t2 = [indeterminate], $[9] = indeterminate, $[10] = t1, $[11] = t2) : (t1 = $[10], t2 = $[11]), react.useEffect(t1, t2);
|
|
5219
4505
|
const t3 = !disabled && readOnly ? "" : void 0, t4 = indeterminate !== !0 && checked, t5 = disabled || readOnly;
|
|
5220
4506
|
let t6;
|
|
5221
|
-
$[12] !== restProps || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Input$2,
|
|
4507
|
+
$[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];
|
|
5222
4508
|
let t7;
|
|
5223
4509
|
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Track, {}), $[17] = t7) : t7 = $[17];
|
|
5224
4510
|
let t8;
|
|
@@ -5233,32 +4519,15 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
5233
4519
|
] }), $[21] = className, $[22] = style, $[23] = t6, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
|
|
5234
4520
|
});
|
|
5235
4521
|
Switch.displayName = "ForwardRef(Switch)";
|
|
5236
|
-
var __defProp$m = Object.defineProperty, __defProps$m = Object.defineProperties, __getOwnPropDescs$m = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$m = Object.getOwnPropertySymbols, __hasOwnProp$m = Object.prototype.hasOwnProperty, __propIsEnum$m = Object.prototype.propertyIsEnumerable, __defNormalProp$m = (obj, key2, value) => key2 in obj ? __defProp$m(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$m = (a, b) => {
|
|
5237
|
-
for (var prop in b || (b = {}))
|
|
5238
|
-
__hasOwnProp$m.call(b, prop) && __defNormalProp$m(a, prop, b[prop]);
|
|
5239
|
-
if (__getOwnPropSymbols$m)
|
|
5240
|
-
for (var prop of __getOwnPropSymbols$m(b))
|
|
5241
|
-
__propIsEnum$m.call(b, prop) && __defNormalProp$m(a, prop, b[prop]);
|
|
5242
|
-
return a;
|
|
5243
|
-
}, __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b)), __objRest$j = (source, exclude) => {
|
|
5244
|
-
var target = {};
|
|
5245
|
-
for (var prop in source)
|
|
5246
|
-
__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5247
|
-
if (source != null && __getOwnPropSymbols$m)
|
|
5248
|
-
for (var prop of __getOwnPropSymbols$m(source))
|
|
5249
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop) && (target[prop] = source[prop]);
|
|
5250
|
-
return target;
|
|
5251
|
-
};
|
|
5252
4522
|
const Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = styledComponents.styled.span`
|
|
5253
4523
|
flex: 1;
|
|
5254
4524
|
min-width: 0;
|
|
5255
4525
|
display: block;
|
|
5256
4526
|
position: relative;
|
|
5257
4527
|
`, Input$1 = styledComponents.styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation$1 = styledComponents.styled.div(responsiveRadiusStyle, textInputRepresentationStyle), TextArea = react.forwardRef(function(props, forwardedRef) {
|
|
5258
|
-
var _a;
|
|
5259
4528
|
const $ = reactCompilerRuntime.c(29);
|
|
5260
4529
|
let __unstable_disableFocusRing, customValidity, restProps, t0, t1, t2, t3, t4, weight;
|
|
5261
|
-
$[0] !== props ? (
|
|
4530
|
+
$[0] !== props ? ({
|
|
5262
4531
|
border: t0,
|
|
5263
4532
|
customValidity,
|
|
5264
4533
|
disabled: t1,
|
|
@@ -5266,23 +4535,15 @@ const Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = s
|
|
|
5266
4535
|
padding: t3,
|
|
5267
4536
|
radius: t4,
|
|
5268
4537
|
weight,
|
|
5269
|
-
__unstable_disableFocusRing
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
"customValidity",
|
|
5273
|
-
"disabled",
|
|
5274
|
-
"fontSize",
|
|
5275
|
-
"padding",
|
|
5276
|
-
"radius",
|
|
5277
|
-
"weight",
|
|
5278
|
-
"__unstable_disableFocusRing"
|
|
5279
|
-
]), $[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]);
|
|
4538
|
+
__unstable_disableFocusRing,
|
|
4539
|
+
...restProps
|
|
4540
|
+
} = 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]);
|
|
5280
4541
|
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();
|
|
5281
4542
|
let t5;
|
|
5282
4543
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[10] = t5) : t5 = $[10], react.useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
|
|
5283
4544
|
const t6 = rootTheme.scheme, t7 = rootTheme.tone, t8 = useArrayProp(fontSize2), t9 = useArrayProp(padding), t10 = rootTheme.scheme, t11 = useArrayProp(0);
|
|
5284
4545
|
let t12;
|
|
5285
|
-
$[11] !== disabled || $[12] !== restProps || $[13] !== rootTheme.scheme || $[14] !== rootTheme.tone || $[15] !== t11 || $[16] !== t8 || $[17] !== t9 || $[18] !== weight ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Input$1,
|
|
4546
|
+
$[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];
|
|
5286
4547
|
const t13 = useArrayProp(radius), t14 = border2 ? "" : void 0;
|
|
5287
4548
|
let t15;
|
|
5288
4549
|
$[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];
|
|
@@ -5293,22 +4554,6 @@ const Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = s
|
|
|
5293
4554
|
] }) }), $[26] = t12, $[27] = t15, $[28] = t16) : t16 = $[28], t16;
|
|
5294
4555
|
});
|
|
5295
4556
|
TextArea.displayName = "ForwardRef(TextArea)";
|
|
5296
|
-
var __defProp$l = Object.defineProperty, __defProps$l = Object.defineProperties, __getOwnPropDescs$l = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$l = Object.getOwnPropertySymbols, __hasOwnProp$l = Object.prototype.hasOwnProperty, __propIsEnum$l = Object.prototype.propertyIsEnumerable, __defNormalProp$l = (obj, key2, value) => key2 in obj ? __defProp$l(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$l = (a, b) => {
|
|
5297
|
-
for (var prop in b || (b = {}))
|
|
5298
|
-
__hasOwnProp$l.call(b, prop) && __defNormalProp$l(a, prop, b[prop]);
|
|
5299
|
-
if (__getOwnPropSymbols$l)
|
|
5300
|
-
for (var prop of __getOwnPropSymbols$l(b))
|
|
5301
|
-
__propIsEnum$l.call(b, prop) && __defNormalProp$l(a, prop, b[prop]);
|
|
5302
|
-
return a;
|
|
5303
|
-
}, __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b)), __objRest$i = (source, exclude) => {
|
|
5304
|
-
var target = {};
|
|
5305
|
-
for (var prop in source)
|
|
5306
|
-
__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5307
|
-
if (source != null && __getOwnPropSymbols$l)
|
|
5308
|
-
for (var prop of __getOwnPropSymbols$l(source))
|
|
5309
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop) && (target[prop] = source[prop]);
|
|
5310
|
-
return target;
|
|
5311
|
-
};
|
|
5312
4557
|
const CLEAR_BUTTON_BOX_STYLE = {
|
|
5313
4558
|
zIndex: 2
|
|
5314
4559
|
}, Root$b = styledComponents.styled(Card).attrs({
|
|
@@ -5356,10 +4601,9 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
5356
4601
|
display: "block"
|
|
5357
4602
|
}
|
|
5358
4603
|
}), TextInput = react.forwardRef(function(props, forwardedRef) {
|
|
5359
|
-
var _a;
|
|
5360
4604
|
const $ = reactCompilerRuntime.c(84);
|
|
5361
4605
|
let IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
|
|
5362
|
-
$[0] !== props ? (
|
|
4606
|
+
$[0] !== props ? ({
|
|
5363
4607
|
__unstable_disableFocusRing,
|
|
5364
4608
|
border: t0,
|
|
5365
4609
|
clearButton,
|
|
@@ -5376,34 +4620,16 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
5376
4620
|
suffix,
|
|
5377
4621
|
customValidity,
|
|
5378
4622
|
type: t6,
|
|
5379
|
-
weight
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
"border",
|
|
5383
|
-
"clearButton",
|
|
5384
|
-
"disabled",
|
|
5385
|
-
"fontSize",
|
|
5386
|
-
"icon",
|
|
5387
|
-
"iconRight",
|
|
5388
|
-
"onClear",
|
|
5389
|
-
"padding",
|
|
5390
|
-
"prefix",
|
|
5391
|
-
"radius",
|
|
5392
|
-
"readOnly",
|
|
5393
|
-
"space",
|
|
5394
|
-
"suffix",
|
|
5395
|
-
"customValidity",
|
|
5396
|
-
"type",
|
|
5397
|
-
"weight"
|
|
5398
|
-
]), $[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]);
|
|
4623
|
+
weight,
|
|
4624
|
+
...restProps
|
|
4625
|
+
} = 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]);
|
|
5399
4626
|
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;
|
|
5400
4627
|
let t7;
|
|
5401
4628
|
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], react.useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
5402
4629
|
const handleClearMouseDown = _temp$3;
|
|
5403
4630
|
let t8;
|
|
5404
4631
|
$[20] !== onClear ? (t8 = (event_0) => {
|
|
5405
|
-
|
|
5406
|
-
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), (_a2 = ref.current) == null || _a2.focus();
|
|
4632
|
+
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
|
|
5407
4633
|
}, $[20] = onClear, $[21] = t8) : t8 = $[21];
|
|
5408
4634
|
const handleClearClick = t8;
|
|
5409
4635
|
let t9, t10;
|
|
@@ -5437,13 +4663,13 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
5437
4663
|
t20 = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
|
|
5438
4664
|
const clearButtonProps = t20;
|
|
5439
4665
|
let t21, t22;
|
|
5440
|
-
$[48] !== clearButton || $[49] !== clearButtonBoxPadding || $[50] !== clearButtonPadding || $[51] !== clearButtonProps || $[52] !== customValidity || $[53] !== disabled || $[54] !== fontSize2 || $[55] !== handleClearClick || $[56] !== radius || $[57] !== readOnly ? (t22 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(TextInputClearButton,
|
|
4666
|
+
$[48] !== clearButton || $[49] !== clearButtonBoxPadding || $[50] !== clearButtonPadding || $[51] !== clearButtonProps || $[52] !== customValidity || $[53] !== disabled || $[54] !== fontSize2 || $[55] !== handleClearClick || $[56] !== radius || $[57] !== readOnly ? (t22 = !disabled && !readOnly && clearButton && /* @__PURE__ */ 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 }) }), $[48] = clearButton, $[49] = clearButtonBoxPadding, $[50] = clearButtonPadding, $[51] = clearButtonProps, $[52] = customValidity, $[53] = disabled, $[54] = fontSize2, $[55] = handleClearClick, $[56] = radius, $[57] = readOnly, $[58] = t22) : t22 = $[58], t21 = t22;
|
|
5441
4667
|
const clearButtonNode = t21;
|
|
5442
4668
|
let t23, t24;
|
|
5443
4669
|
$[59] !== radius || $[60] !== 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 }) }), $[59] = radius, $[60] = suffix, $[61] = t24) : t24 = $[61], t23 = t24;
|
|
5444
4670
|
const suffixNode = t23, t25 = $hasIconRight || $hasClearButton;
|
|
5445
4671
|
let t26;
|
|
5446
|
-
$[62] !== $hasIcon || $[63] !== disabled || $[64] !== fontSize2 || $[65] !== padding || $[66] !== readOnly || $[67] !== restProps || $[68] !== rootTheme.scheme || $[69] !== rootTheme.tone || $[70] !== space || $[71] !== t25 || $[72] !== type || $[73] !== weight ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(Input,
|
|
4672
|
+
$[62] !== $hasIcon || $[63] !== disabled || $[64] !== fontSize2 || $[65] !== padding || $[66] !== readOnly || $[67] !== restProps || $[68] !== rootTheme.scheme || $[69] !== rootTheme.tone || $[70] !== space || $[71] !== t25 || $[72] !== type || $[73] !== weight ? (t26 = /* @__PURE__ */ 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 }), $[62] = $hasIcon, $[63] = disabled, $[64] = fontSize2, $[65] = padding, $[66] = readOnly, $[67] = restProps, $[68] = rootTheme.scheme, $[69] = rootTheme.tone, $[70] = space, $[71] = t25, $[72] = type, $[73] = weight, $[74] = t26) : t26 = $[74];
|
|
5447
4673
|
let t27;
|
|
5448
4674
|
$[75] !== clearButtonNode || $[76] !== presentationNode || $[77] !== t26 ? (t27 = /* @__PURE__ */ jsxRuntime.jsxs(InputRoot, { children: [
|
|
5449
4675
|
t26,
|
|
@@ -5495,33 +4721,15 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
5495
4721
|
right: ["right-end", "right-start", "left", "top", "bottom"],
|
|
5496
4722
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
5497
4723
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
5498
|
-
}
|
|
5499
|
-
var __defProp$k = Object.defineProperty, __defProps$k = Object.defineProperties, __getOwnPropDescs$k = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$k = Object.getOwnPropertySymbols, __hasOwnProp$k = Object.prototype.hasOwnProperty, __propIsEnum$k = Object.prototype.propertyIsEnumerable, __defNormalProp$k = (obj, key2, value) => key2 in obj ? __defProp$k(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$k = (a, b) => {
|
|
5500
|
-
for (var prop in b || (b = {}))
|
|
5501
|
-
__hasOwnProp$k.call(b, prop) && __defNormalProp$k(a, prop, b[prop]);
|
|
5502
|
-
if (__getOwnPropSymbols$k)
|
|
5503
|
-
for (var prop of __getOwnPropSymbols$k(b))
|
|
5504
|
-
__propIsEnum$k.call(b, prop) && __defNormalProp$k(a, prop, b[prop]);
|
|
5505
|
-
return a;
|
|
5506
|
-
}, __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b)), __objRest$h = (source, exclude) => {
|
|
5507
|
-
var target = {};
|
|
5508
|
-
for (var prop in source)
|
|
5509
|
-
__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5510
|
-
if (source != null && __getOwnPropSymbols$k)
|
|
5511
|
-
for (var prop of __getOwnPropSymbols$k(source))
|
|
5512
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop) && (target[prop] = source[prop]);
|
|
5513
|
-
return target;
|
|
5514
|
-
};
|
|
5515
|
-
const MotionCard = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
4724
|
+
}, MotionCard = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
5516
4725
|
& > * {
|
|
5517
4726
|
opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
|
|
5518
4727
|
will-change: opacity;
|
|
5519
4728
|
}
|
|
5520
4729
|
`, TooltipCard = react.memo(react.forwardRef(function(props, ref) {
|
|
5521
|
-
var _a;
|
|
5522
4730
|
const $ = reactCompilerRuntime.c(42);
|
|
5523
4731
|
let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, restProps, scheme, shadow, style;
|
|
5524
|
-
$[0] !== props ? (
|
|
4732
|
+
$[0] !== props ? ({
|
|
5525
4733
|
animate,
|
|
5526
4734
|
arrow,
|
|
5527
4735
|
arrowRef,
|
|
@@ -5535,31 +4743,18 @@ const MotionCard = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
|
5535
4743
|
radius,
|
|
5536
4744
|
scheme,
|
|
5537
4745
|
shadow,
|
|
5538
|
-
style
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
"arrow",
|
|
5542
|
-
"arrowRef",
|
|
5543
|
-
"arrowX",
|
|
5544
|
-
"arrowY",
|
|
5545
|
-
"children",
|
|
5546
|
-
"originX",
|
|
5547
|
-
"originY",
|
|
5548
|
-
"padding",
|
|
5549
|
-
"placement",
|
|
5550
|
-
"radius",
|
|
5551
|
-
"scheme",
|
|
5552
|
-
"shadow",
|
|
5553
|
-
"style"
|
|
5554
|
-
]), $[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]);
|
|
4746
|
+
style,
|
|
4747
|
+
...restProps
|
|
4748
|
+
} = 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]);
|
|
5555
4749
|
let t0;
|
|
5556
4750
|
const t1 = animate ? "transform" : void 0;
|
|
5557
4751
|
let t2;
|
|
5558
|
-
$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t1 ? (t2 =
|
|
4752
|
+
$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t1 ? (t2 = {
|
|
5559
4753
|
originX,
|
|
5560
4754
|
originY,
|
|
5561
|
-
willChange: t1
|
|
5562
|
-
|
|
4755
|
+
willChange: t1,
|
|
4756
|
+
...style
|
|
4757
|
+
}, $[16] = originX, $[17] = originY, $[18] = style, $[19] = t1, $[20] = t2) : t2 = $[20], t0 = t2;
|
|
5563
4758
|
const rootStyle2 = t0;
|
|
5564
4759
|
let t3;
|
|
5565
4760
|
const t4 = arrowX !== null ? arrowX : void 0, t5 = arrowY !== null ? arrowY : void 0;
|
|
@@ -5576,10 +4771,10 @@ const MotionCard = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
|
5576
4771
|
let t9;
|
|
5577
4772
|
$[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];
|
|
5578
4773
|
let t10;
|
|
5579
|
-
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,
|
|
4774
|
+
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: [
|
|
5580
4775
|
children,
|
|
5581
4776
|
t9
|
|
5582
|
-
] })
|
|
4777
|
+
] }), $[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;
|
|
5583
4778
|
}));
|
|
5584
4779
|
TooltipCard.displayName = "Memo(ForwardRef(TooltipCard))";
|
|
5585
4780
|
const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
|
|
@@ -5590,7 +4785,7 @@ function TooltipDelayGroupProvider(props) {
|
|
|
5590
4785
|
const $ = reactCompilerRuntime.c(10), {
|
|
5591
4786
|
children,
|
|
5592
4787
|
delay
|
|
5593
|
-
} = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay :
|
|
4788
|
+
} = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0;
|
|
5594
4789
|
let t0;
|
|
5595
4790
|
const t1 = isGroupActive ? 1 : openDelay;
|
|
5596
4791
|
let t2;
|
|
@@ -5607,36 +4802,19 @@ function TooltipDelayGroupProvider(props) {
|
|
|
5607
4802
|
return $[7] !== children || $[8] !== value ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupContext.Provider, { value, children }), $[7] = children, $[8] = value, $[9] = t3) : t3 = $[9], t3;
|
|
5608
4803
|
}
|
|
5609
4804
|
TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
|
|
5610
|
-
var __defProp$j = Object.defineProperty, __defProps$j = Object.defineProperties, __getOwnPropDescs$j = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$j = Object.getOwnPropertySymbols, __hasOwnProp$j = Object.prototype.hasOwnProperty, __propIsEnum$j = Object.prototype.propertyIsEnumerable, __defNormalProp$j = (obj, key2, value) => key2 in obj ? __defProp$j(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$j = (a, b) => {
|
|
5611
|
-
for (var prop in b || (b = {}))
|
|
5612
|
-
__hasOwnProp$j.call(b, prop) && __defNormalProp$j(a, prop, b[prop]);
|
|
5613
|
-
if (__getOwnPropSymbols$j)
|
|
5614
|
-
for (var prop of __getOwnPropSymbols$j(b))
|
|
5615
|
-
__propIsEnum$j.call(b, prop) && __defNormalProp$j(a, prop, b[prop]);
|
|
5616
|
-
return a;
|
|
5617
|
-
}, __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b)), __objRest$g = (source, exclude) => {
|
|
5618
|
-
var target = {};
|
|
5619
|
-
for (var prop in source)
|
|
5620
|
-
__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5621
|
-
if (source != null && __getOwnPropSymbols$j)
|
|
5622
|
-
for (var prop of __getOwnPropSymbols$j(source))
|
|
5623
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop) && (target[prop] = source[prop]);
|
|
5624
|
-
return target;
|
|
5625
|
-
};
|
|
5626
4805
|
const Root$a = styledComponents.styled(Layer)`
|
|
5627
4806
|
pointer-events: none;
|
|
5628
4807
|
`, Tooltip = react.forwardRef(function(props, forwardedRef) {
|
|
5629
|
-
var _a, _b, _d, _e, _f, _g, _h;
|
|
5630
4808
|
const boundaryElementContext = useBoundaryElement(), {
|
|
5631
4809
|
layer
|
|
5632
|
-
} = useTheme_v2(),
|
|
4810
|
+
} = useTheme_v2(), {
|
|
5633
4811
|
animate: _animate = !1,
|
|
5634
4812
|
arrow: arrowProp = !1,
|
|
5635
|
-
boundaryElement = boundaryElementContext
|
|
4813
|
+
boundaryElement = boundaryElementContext?.element,
|
|
5636
4814
|
children: childProp,
|
|
5637
4815
|
content,
|
|
5638
4816
|
disabled,
|
|
5639
|
-
fallbackPlacements: fallbackPlacementsProp =
|
|
4817
|
+
fallbackPlacements: fallbackPlacementsProp = props.fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"],
|
|
5640
4818
|
padding = 2,
|
|
5641
4819
|
placement: placementProp = "bottom",
|
|
5642
4820
|
portal: portalProp,
|
|
@@ -5644,26 +4822,11 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
5644
4822
|
scheme,
|
|
5645
4823
|
shadow = 2,
|
|
5646
4824
|
zOffset = layer.tooltip.zOffset,
|
|
5647
|
-
delay
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
"arrow",
|
|
5651
|
-
"boundaryElement",
|
|
5652
|
-
"children",
|
|
5653
|
-
"content",
|
|
5654
|
-
"disabled",
|
|
5655
|
-
"fallbackPlacements",
|
|
5656
|
-
"padding",
|
|
5657
|
-
"placement",
|
|
5658
|
-
"portal",
|
|
5659
|
-
"radius",
|
|
5660
|
-
"scheme",
|
|
5661
|
-
"shadow",
|
|
5662
|
-
"zOffset",
|
|
5663
|
-
"delay"
|
|
5664
|
-
]), animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = react.useRef(null), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = react.useState(0);
|
|
4825
|
+
delay,
|
|
4826
|
+
...restProps
|
|
4827
|
+
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = react.useRef(null), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = react.useState(0);
|
|
5665
4828
|
react.useImperativeHandle(forwardedRef, () => ref.current);
|
|
5666
|
-
const portal = usePortal(), portalElement = typeof portalProp == "string" ?
|
|
4829
|
+
const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element, middleware = react.useMemo(() => {
|
|
5667
4830
|
const ret = [];
|
|
5668
4831
|
return ret.push(reactDom$1.flip({
|
|
5669
4832
|
boundary: boundaryElement || void 0,
|
|
@@ -5693,7 +4856,7 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
5693
4856
|
elements: {
|
|
5694
4857
|
reference: referenceElement
|
|
5695
4858
|
}
|
|
5696
|
-
}), arrowX =
|
|
4859
|
+
}), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, tooltipId = react.useId(), [isOpen, setIsOpen] = useDelayedState(!1), delayGroupContext = useTooltipDelayGroup(), showTooltip = isOpen || delayGroupContext?.openTooltipId === tooltipId, isInsideGroup = delayGroupContext !== null, openDelayProp = typeof delay == "number" ? delay : delay?.open || 0, closeDelayProp = typeof delay == "number" ? delay : delay?.close || 0, openDelay = isInsideGroup ? delayGroupContext.openDelay : openDelayProp, closeDelay = isInsideGroup ? delayGroupContext.closeDelay : closeDelayProp, handleIsOpenChange = react.useCallback((open, immediate) => {
|
|
5697
4860
|
if (isInsideGroup)
|
|
5698
4861
|
if (open) {
|
|
5699
4862
|
const groupedOpenDelay = immediate ? 0 : openDelay;
|
|
@@ -5705,24 +4868,18 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
5705
4868
|
else
|
|
5706
4869
|
setIsOpen(open, immediate ? 0 : open ? openDelay : closeDelay);
|
|
5707
4870
|
}, [isInsideGroup, delayGroupContext, openDelay, tooltipId, closeDelay, setIsOpen]), handleBlur = react.useCallback((e) => {
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
handleIsOpenChange(!1, !0),
|
|
5713
|
-
}, [childProp
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
handleIsOpenChange(!
|
|
5719
|
-
}, [childProp
|
|
5720
|
-
var _a2, _b2;
|
|
5721
|
-
handleIsOpenChange(!0), (_b2 = (_a2 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a2.onMouseEnter) == null || _b2.call(_a2, e_3);
|
|
5722
|
-
}, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]), handleMouseLeave = react.useCallback((e_4) => {
|
|
5723
|
-
var _a2, _b2;
|
|
5724
|
-
handleIsOpenChange(!1), (_b2 = (_a2 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a2.onMouseLeave) == null || _b2.call(_a2, e_4);
|
|
5725
|
-
}, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]);
|
|
4871
|
+
handleIsOpenChange(!1), childProp?.props?.onBlur?.(e);
|
|
4872
|
+
}, [childProp?.props, handleIsOpenChange]), handleClick = react.useCallback((e_0) => {
|
|
4873
|
+
handleIsOpenChange(!1, !0), childProp?.props.onClick?.(e_0);
|
|
4874
|
+
}, [childProp?.props, handleIsOpenChange]), handleContextMenu = react.useCallback((e_1) => {
|
|
4875
|
+
handleIsOpenChange(!1, !0), childProp?.props.onContextMenu?.(e_1);
|
|
4876
|
+
}, [childProp?.props, handleIsOpenChange]), handleFocus = react.useCallback((e_2) => {
|
|
4877
|
+
handleIsOpenChange(!0), childProp?.props?.onFocus?.(e_2);
|
|
4878
|
+
}, [childProp?.props, handleIsOpenChange]), handleMouseEnter = react.useCallback((e_3) => {
|
|
4879
|
+
handleIsOpenChange(!0), childProp?.props?.onMouseEnter?.(e_3);
|
|
4880
|
+
}, [childProp?.props, handleIsOpenChange]), handleMouseLeave = react.useCallback((e_4) => {
|
|
4881
|
+
handleIsOpenChange(!1), childProp?.props?.onMouseLeave?.(e_4);
|
|
4882
|
+
}, [childProp?.props, handleIsOpenChange]);
|
|
5726
4883
|
useCloseOnMouseLeave({
|
|
5727
4884
|
handleIsOpenChange,
|
|
5728
4885
|
referenceElement,
|
|
@@ -5740,7 +4897,7 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
5740
4897
|
window.removeEventListener("keydown", handleWindowKeyDown);
|
|
5741
4898
|
};
|
|
5742
4899
|
}, [handleIsOpenChange, showTooltip]), react.useLayoutEffect(() => {
|
|
5743
|
-
const availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [],
|
|
4900
|
+
const availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [], portalElement?.offsetWidth || document.body.offsetWidth];
|
|
5744
4901
|
setTooltipMaxWidth(Math.min(...availableWidths) - DEFAULT_TOOLTIP_PADDING * 2);
|
|
5745
4902
|
}, [boundaryElement, portalElement]);
|
|
5746
4903
|
const setArrow = react.useCallback((arrowEl) => {
|
|
@@ -5748,7 +4905,7 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
5748
4905
|
}, [update]), setFloating = react.useCallback((node) => {
|
|
5749
4906
|
ref.current = node, refs.setFloating(node);
|
|
5750
4907
|
}, [refs]), childRef = react.useRef(null);
|
|
5751
|
-
react.useImperativeHandle(childProp
|
|
4908
|
+
react.useImperativeHandle(childProp?.ref, () => childRef.current);
|
|
5752
4909
|
const child = react.useMemo(() => childProp ? react.cloneElement(childProp, {
|
|
5753
4910
|
onBlur: handleBlur,
|
|
5754
4911
|
onFocus: handleFocus,
|
|
@@ -5763,9 +4920,10 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
5763
4920
|
return setReferenceElement(childRef.current), () => setReferenceElement(null);
|
|
5764
4921
|
}, [child]), !child) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
5765
4922
|
if (disabled) return child;
|
|
5766
|
-
const tooltip = /* @__PURE__ */ jsxRuntime.jsx(Root$a,
|
|
4923
|
+
const tooltip = /* @__PURE__ */ jsxRuntime.jsx(Root$a, { "data-ui": "Tooltip", ...restProps, ref: setFloating, style: {
|
|
4924
|
+
...floatingStyles,
|
|
5767
4925
|
maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
|
|
5768
|
-
}
|
|
4926
|
+
}, zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, { ...restProps, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, originX, originY, padding, placement, radius, ref: setFloating, scheme, shadow, children: content }) }), children = showTooltip && (portalProp ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: tooltip }) : tooltip);
|
|
5769
4927
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5770
4928
|
animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
|
|
5771
4929
|
child
|
|
@@ -5835,63 +4993,47 @@ function AutocompleteOption(props) {
|
|
|
5835
4993
|
let t2;
|
|
5836
4994
|
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;
|
|
5837
4995
|
}
|
|
5838
|
-
var __defProp$i = Object.defineProperty, __defProps$i = Object.defineProperties, __getOwnPropDescs$i = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$i = Object.getOwnPropertySymbols, __hasOwnProp$i = Object.prototype.hasOwnProperty, __propIsEnum$i = Object.prototype.propertyIsEnumerable, __defNormalProp$i = (obj, key2, value) => key2 in obj ? __defProp$i(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$i = (a, b) => {
|
|
5839
|
-
for (var prop in b || (b = {}))
|
|
5840
|
-
__hasOwnProp$i.call(b, prop) && __defNormalProp$i(a, prop, b[prop]);
|
|
5841
|
-
if (__getOwnPropSymbols$i)
|
|
5842
|
-
for (var prop of __getOwnPropSymbols$i(b))
|
|
5843
|
-
__propIsEnum$i.call(b, prop) && __defNormalProp$i(a, prop, b[prop]);
|
|
5844
|
-
return a;
|
|
5845
|
-
}, __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
5846
4996
|
function autocompleteReducer(state, msg2) {
|
|
5847
|
-
return msg2.type === "input/change" ?
|
|
4997
|
+
return msg2.type === "input/change" ? {
|
|
4998
|
+
...state,
|
|
5848
4999
|
activeValue: null,
|
|
5849
5000
|
focused: !0,
|
|
5850
5001
|
query: msg2.query
|
|
5851
|
-
}
|
|
5002
|
+
} : msg2.type === "input/focus" ? {
|
|
5003
|
+
...state,
|
|
5852
5004
|
focused: !0
|
|
5853
|
-
}
|
|
5005
|
+
} : msg2.type === "root/blur" ? {
|
|
5006
|
+
...state,
|
|
5854
5007
|
focused: !1,
|
|
5855
5008
|
query: null
|
|
5856
|
-
}
|
|
5009
|
+
} : msg2.type === "root/clear" ? {
|
|
5010
|
+
...state,
|
|
5857
5011
|
activeValue: null,
|
|
5858
5012
|
query: null,
|
|
5859
5013
|
value: null
|
|
5860
|
-
}
|
|
5014
|
+
} : msg2.type === "root/escape" ? {
|
|
5015
|
+
...state,
|
|
5861
5016
|
focused: !1,
|
|
5862
5017
|
query: null
|
|
5863
|
-
}
|
|
5018
|
+
} : msg2.type === "root/open" ? {
|
|
5019
|
+
...state,
|
|
5864
5020
|
query: state.query || msg2.query
|
|
5865
|
-
}
|
|
5021
|
+
} : msg2.type === "root/setActiveValue" ? {
|
|
5022
|
+
...state,
|
|
5866
5023
|
activeValue: msg2.value,
|
|
5867
5024
|
listFocused: msg2.listFocused || state.listFocused
|
|
5868
|
-
}
|
|
5025
|
+
} : msg2.type === "root/setListFocused" ? {
|
|
5026
|
+
...state,
|
|
5869
5027
|
listFocused: msg2.listFocused
|
|
5870
|
-
}
|
|
5028
|
+
} : msg2.type === "value/change" ? {
|
|
5029
|
+
...state,
|
|
5871
5030
|
activeValue: msg2.value,
|
|
5872
5031
|
query: null,
|
|
5873
5032
|
value: msg2.value
|
|
5874
|
-
}
|
|
5875
|
-
}
|
|
5876
|
-
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"]
|
|
5877
|
-
|
|
5878
|
-
for (var prop in b || (b = {}))
|
|
5879
|
-
__hasOwnProp$h.call(b, prop) && __defNormalProp$h(a, prop, b[prop]);
|
|
5880
|
-
if (__getOwnPropSymbols$h)
|
|
5881
|
-
for (var prop of __getOwnPropSymbols$h(b))
|
|
5882
|
-
__propIsEnum$h.call(b, prop) && __defNormalProp$h(a, prop, b[prop]);
|
|
5883
|
-
return a;
|
|
5884
|
-
}, __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b)), __objRest$f = (source, exclude) => {
|
|
5885
|
-
var target = {};
|
|
5886
|
-
for (var prop in source)
|
|
5887
|
-
__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5888
|
-
if (source != null && __getOwnPropSymbols$h)
|
|
5889
|
-
for (var prop of __getOwnPropSymbols$h(source))
|
|
5890
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop) && (target[prop] = source[prop]);
|
|
5891
|
-
return target;
|
|
5892
|
-
};
|
|
5893
|
-
const 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) {
|
|
5894
|
-
const _a = props, {
|
|
5033
|
+
} : state;
|
|
5034
|
+
}
|
|
5035
|
+
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) {
|
|
5036
|
+
const {
|
|
5895
5037
|
border: border2 = !0,
|
|
5896
5038
|
customValidity,
|
|
5897
5039
|
disabled,
|
|
@@ -5919,37 +5061,9 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
5919
5061
|
renderPopover,
|
|
5920
5062
|
renderValue = DEFAULT_RENDER_VALUE,
|
|
5921
5063
|
suffix,
|
|
5922
|
-
value: valueProp
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
"customValidity",
|
|
5926
|
-
"disabled",
|
|
5927
|
-
"filterOption",
|
|
5928
|
-
"fontSize",
|
|
5929
|
-
"icon",
|
|
5930
|
-
"id",
|
|
5931
|
-
"listBox",
|
|
5932
|
-
"loading",
|
|
5933
|
-
"onBlur",
|
|
5934
|
-
"onChange",
|
|
5935
|
-
"onFocus",
|
|
5936
|
-
"onQueryChange",
|
|
5937
|
-
"onSelect",
|
|
5938
|
-
"openButton",
|
|
5939
|
-
"openOnFocus",
|
|
5940
|
-
"options",
|
|
5941
|
-
"padding",
|
|
5942
|
-
"popover",
|
|
5943
|
-
"prefix",
|
|
5944
|
-
"radius",
|
|
5945
|
-
"readOnly",
|
|
5946
|
-
"relatedElements",
|
|
5947
|
-
"renderOption",
|
|
5948
|
-
"renderPopover",
|
|
5949
|
-
"renderValue",
|
|
5950
|
-
"suffix",
|
|
5951
|
-
"value"
|
|
5952
|
-
]), [state, dispatch] = react.useReducer(autocompleteReducer, {
|
|
5064
|
+
value: valueProp,
|
|
5065
|
+
...restProps
|
|
5066
|
+
} = props, [state, dispatch] = react.useReducer(autocompleteReducer, {
|
|
5953
5067
|
activeValue: valueProp || null,
|
|
5954
5068
|
focused: !1,
|
|
5955
5069
|
listFocused: !1,
|
|
@@ -5983,19 +5097,17 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
5983
5097
|
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), onBlur && onBlur(event));
|
|
5984
5098
|
}, 0);
|
|
5985
5099
|
}, [onBlur, onQueryChange, relatedElements]), handleRootFocus = react.useCallback((event_0) => {
|
|
5986
|
-
const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 =
|
|
5100
|
+
const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = listBoxElement?.contains(focusedElement) || !1;
|
|
5987
5101
|
listFocused_0 !== listFocusedRef.current && (listFocusedRef.current = listFocused_0, dispatch({
|
|
5988
5102
|
type: "root/setListFocused",
|
|
5989
5103
|
listFocused: listFocused_0
|
|
5990
5104
|
}));
|
|
5991
5105
|
}, []), handleOptionSelect = react.useCallback((v) => {
|
|
5992
|
-
var _a2;
|
|
5993
5106
|
dispatch({
|
|
5994
5107
|
type: "value/change",
|
|
5995
5108
|
value: v
|
|
5996
|
-
}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null),
|
|
5109
|
+
}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
5997
5110
|
}, [onChange, onSelect, onQueryChange]), handleRootKeyDown = react.useCallback((event_1) => {
|
|
5998
|
-
var _a2, _b;
|
|
5999
5111
|
if (event_1.key === "ArrowDown") {
|
|
6000
5112
|
if (event_1.preventDefault(), !filteredOptionsLen) return;
|
|
6001
5113
|
const activeOption = filteredOptions.find((o_0) => o_0.value === activeValue), activeIndex = activeOption ? filteredOptions.indexOf(activeOption) : -1, nextActiveOption = filteredOptions[(activeIndex + 1) % filteredOptionsLen];
|
|
@@ -6019,12 +5131,12 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
6019
5131
|
if (event_1.key === "Escape") {
|
|
6020
5132
|
dispatch({
|
|
6021
5133
|
type: "root/escape"
|
|
6022
|
-
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null),
|
|
5134
|
+
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
6023
5135
|
return;
|
|
6024
5136
|
}
|
|
6025
5137
|
const target = event_1.target, listEl = listBoxElementRef.current;
|
|
6026
|
-
if ((listEl === target || listEl
|
|
6027
|
-
|
|
5138
|
+
if ((listEl === target || listEl?.contains(target)) && !AUTOCOMPLETE_LISTBOX_IGNORE_KEYS.includes(event_1.key)) {
|
|
5139
|
+
inputElementRef.current?.focus();
|
|
6028
5140
|
return;
|
|
6029
5141
|
}
|
|
6030
5142
|
}, [activeValue, filteredOptions, filteredOptionsLen, onQueryChange]), handleInputChange = react.useCallback((event_2) => {
|
|
@@ -6047,10 +5159,9 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
6047
5159
|
}, []), handlePopoverMouseLeave = react.useCallback(() => {
|
|
6048
5160
|
popoverMouseWithinRef.current = !1;
|
|
6049
5161
|
}, []), handleClearButtonClick = react.useCallback(() => {
|
|
6050
|
-
var _a2;
|
|
6051
5162
|
dispatch({
|
|
6052
5163
|
type: "root/clear"
|
|
6053
|
-
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null),
|
|
5164
|
+
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
6054
5165
|
}, [onChange, onQueryChange]), handleClearButtonFocus = react.useCallback(() => {
|
|
6055
5166
|
dispatch({
|
|
6056
5167
|
type: "input/focus"
|
|
@@ -6093,21 +5204,17 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
6093
5204
|
onFocus: handleClearButtonFocus
|
|
6094
5205
|
};
|
|
6095
5206
|
}, [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) => {
|
|
6096
|
-
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() =>
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
}, [openButtonProps, dispatchOpen]), openButtonNode = react.useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsxRuntime.jsx(Button, __spreadProps$h(__spreadValues$h({ "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, __spreadProps$h(__spreadValues$h({}, 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) => {
|
|
6101
|
-
var _a2;
|
|
6102
|
-
event_5.key === "Tab" && listFocused && ((_a2 = inputElementRef.current) == null || _a2.focus());
|
|
6103
|
-
}, [listFocused]), content = react.useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ListBox, __spreadProps$h(__spreadValues$h({ "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) => {
|
|
5207
|
+
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
5208
|
+
}, [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) => {
|
|
5209
|
+
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
5210
|
+
}, [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) => {
|
|
6104
5211
|
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
6105
5212
|
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), {
|
|
6106
5213
|
disabled: loading,
|
|
6107
5214
|
selected: active,
|
|
6108
5215
|
tabIndex: listFocused && active ? 0 : -1
|
|
6109
5216
|
}) }, option_0.value);
|
|
6110
|
-
}) }) })
|
|
5217
|
+
}) }) }), [activeValue, currentOption, filteredOptions, handleOptionSelect, handleListBoxKeyDown, id, listBox, listBoxId, listFocused, loading, renderOption]), results = react.useMemo(() => renderPopover ? renderPopover({
|
|
6111
5218
|
content,
|
|
6112
5219
|
hidden: !expanded,
|
|
6113
5220
|
inputElement: inputElementRef.current,
|
|
@@ -6115,7 +5222,7 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
6115
5222
|
onMouseLeave: handlePopoverMouseLeave
|
|
6116
5223
|
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
6117
5224
|
Popover,
|
|
6118
|
-
|
|
5225
|
+
{
|
|
6119
5226
|
arrow: !1,
|
|
6120
5227
|
constrainSize: !0,
|
|
6121
5228
|
content,
|
|
@@ -6129,8 +5236,9 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
6129
5236
|
portal: !0,
|
|
6130
5237
|
radius,
|
|
6131
5238
|
ref: resultsPopoverElementRef,
|
|
6132
|
-
referenceElement: inputElementRef.current
|
|
6133
|
-
|
|
5239
|
+
referenceElement: inputElementRef.current,
|
|
5240
|
+
...popover
|
|
5241
|
+
}
|
|
6134
5242
|
), [content, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, radius, renderPopover]);
|
|
6135
5243
|
return /* @__PURE__ */ jsxRuntime.jsxs(Root$9, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
|
|
6136
5244
|
input,
|
|
@@ -6149,35 +5257,14 @@ const Autocomplete = InnerAutocomplete, Root$8 = styledComponents.styled.ol`
|
|
|
6149
5257
|
`, ExpandButton = styledComponents.styled(Button)`
|
|
6150
5258
|
appearance: none;
|
|
6151
5259
|
margin: -4px;
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
for (var prop in b || (b = {}))
|
|
6155
|
-
__hasOwnProp$g.call(b, prop) && __defNormalProp$g(a, prop, b[prop]);
|
|
6156
|
-
if (__getOwnPropSymbols$g)
|
|
6157
|
-
for (var prop of __getOwnPropSymbols$g(b))
|
|
6158
|
-
__propIsEnum$g.call(b, prop) && __defNormalProp$g(a, prop, b[prop]);
|
|
6159
|
-
return a;
|
|
6160
|
-
}, __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b)), __objRest$e = (source, exclude) => {
|
|
6161
|
-
var target = {};
|
|
6162
|
-
for (var prop in source)
|
|
6163
|
-
__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6164
|
-
if (source != null && __getOwnPropSymbols$g)
|
|
6165
|
-
for (var prop of __getOwnPropSymbols$g(source))
|
|
6166
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop) && (target[prop] = source[prop]);
|
|
6167
|
-
return target;
|
|
6168
|
-
};
|
|
6169
|
-
const Breadcrumbs = react.forwardRef(function(props, ref) {
|
|
6170
|
-
const _a = props, {
|
|
5260
|
+
`, Breadcrumbs = react.forwardRef(function(props, ref) {
|
|
5261
|
+
const {
|
|
6171
5262
|
children,
|
|
6172
5263
|
maxLength,
|
|
6173
5264
|
separator,
|
|
6174
|
-
space: spaceRaw = 2
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
"maxLength",
|
|
6178
|
-
"separator",
|
|
6179
|
-
"space"
|
|
6180
|
-
]), space = useArrayProp(spaceRaw), [open, setOpen] = react.useState(!1), expandElementRef = react.useRef(null), popoverElementRef = react.useRef(null), collapse = react.useCallback(() => setOpen(!1), []), expand = react.useCallback(() => setOpen(!0), []);
|
|
5265
|
+
space: spaceRaw = 2,
|
|
5266
|
+
...restProps
|
|
5267
|
+
} = props, space = useArrayProp(spaceRaw), [open, setOpen] = react.useState(!1), expandElementRef = react.useRef(null), popoverElementRef = react.useRef(null), collapse = react.useCallback(() => setOpen(!1), []), expand = react.useCallback(() => setOpen(!0), []);
|
|
6181
5268
|
useClickOutsideEvent(collapse, () => [expandElementRef.current, popoverElementRef.current]);
|
|
6182
5269
|
const rawItems = react.useMemo(() => react.Children.toArray(children).filter(react.isValidElement), [children]), items = react.useMemo(() => {
|
|
6183
5270
|
const len = rawItems.length;
|
|
@@ -6187,10 +5274,10 @@ const Breadcrumbs = react.forwardRef(function(props, ref) {
|
|
|
6187
5274
|
}
|
|
6188
5275
|
return rawItems;
|
|
6189
5276
|
}, [collapse, expand, maxLength, open, rawItems, space]);
|
|
6190
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Root$8,
|
|
5277
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root$8, { "data-ui": "Breadcrumbs", ...restProps, ref, children: items.map((item, itemIndex) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
|
|
6191
5278
|
itemIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": !0, as: "li", paddingX: space, children: separator || /* @__PURE__ */ jsxRuntime.jsx(Text, { muted: !0, children: "/" }) }),
|
|
6192
5279
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { as: "li", children: item })
|
|
6193
|
-
] }, itemIndex)) })
|
|
5280
|
+
] }, itemIndex)) });
|
|
6194
5281
|
});
|
|
6195
5282
|
Breadcrumbs.displayName = "ForwardRef(Breadcrumbs)";
|
|
6196
5283
|
function dialogStyle({
|
|
@@ -6257,22 +5344,6 @@ const DialogContext = createGlobalScopedContext("@sanity/ui/context/dialog", {
|
|
|
6257
5344
|
function useDialog() {
|
|
6258
5345
|
return react.useContext(DialogContext);
|
|
6259
5346
|
}
|
|
6260
|
-
var __defProp$f = Object.defineProperty, __defProps$f = Object.defineProperties, __getOwnPropDescs$f = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$f = Object.getOwnPropertySymbols, __hasOwnProp$f = Object.prototype.hasOwnProperty, __propIsEnum$f = Object.prototype.propertyIsEnumerable, __defNormalProp$f = (obj, key2, value) => key2 in obj ? __defProp$f(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$f = (a, b) => {
|
|
6261
|
-
for (var prop in b || (b = {}))
|
|
6262
|
-
__hasOwnProp$f.call(b, prop) && __defNormalProp$f(a, prop, b[prop]);
|
|
6263
|
-
if (__getOwnPropSymbols$f)
|
|
6264
|
-
for (var prop of __getOwnPropSymbols$f(b))
|
|
6265
|
-
__propIsEnum$f.call(b, prop) && __defNormalProp$f(a, prop, b[prop]);
|
|
6266
|
-
return a;
|
|
6267
|
-
}, __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b)), __objRest$d = (source, exclude) => {
|
|
6268
|
-
var target = {};
|
|
6269
|
-
for (var prop in source)
|
|
6270
|
-
__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6271
|
-
if (source != null && __getOwnPropSymbols$f)
|
|
6272
|
-
for (var prop of __getOwnPropSymbols$f(source))
|
|
6273
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop) && (target[prop] = source[prop]);
|
|
6274
|
-
return target;
|
|
6275
|
-
};
|
|
6276
5347
|
function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
6277
5348
|
return !boundaryElement || !portalElement ? !0 : containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
|
|
6278
5349
|
}
|
|
@@ -6310,7 +5381,6 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
6310
5381
|
position: relative;
|
|
6311
5382
|
z-index: 3;
|
|
6312
5383
|
`, DialogCard = react.forwardRef(function(props, forwardedRef) {
|
|
6313
|
-
var _a;
|
|
6314
5384
|
const $ = reactCompilerRuntime.c(38), {
|
|
6315
5385
|
__unstable_autoFocus: autoFocus,
|
|
6316
5386
|
__unstable_hideCloseButton: hideCloseButton,
|
|
@@ -6326,7 +5396,7 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
6326
5396
|
scheme,
|
|
6327
5397
|
shadow: shadowProp,
|
|
6328
5398
|
width: widthProp
|
|
6329
|
-
} = props, portal = usePortal(), portalElement = portalProp ?
|
|
5399
|
+
} = props, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, radius = useArrayProp(radiusProp), shadow = useArrayProp(shadowProp), width = useArrayProp(widthProp), ref = react.useRef(null), contentRef = react.useRef(null), layer = useLayer(), {
|
|
6330
5400
|
isTopLayer
|
|
6331
5401
|
} = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton;
|
|
6332
5402
|
let t0;
|
|
@@ -6373,12 +5443,11 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
6373
5443
|
});
|
|
6374
5444
|
DialogCard.displayName = "ForwardRef(DialogCard)";
|
|
6375
5445
|
const Dialog = react.forwardRef(function(props, ref) {
|
|
6376
|
-
var _a, _b;
|
|
6377
5446
|
const $ = reactCompilerRuntime.c(60), dialog = useDialog(), {
|
|
6378
5447
|
layer
|
|
6379
5448
|
} = useTheme_v2();
|
|
6380
5449
|
let _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;
|
|
6381
|
-
$[0] !== props ? (
|
|
5450
|
+
$[0] !== props ? ({
|
|
6382
5451
|
__unstable_autoFocus: t0,
|
|
6383
5452
|
__unstable_hideCloseButton: t1,
|
|
6384
5453
|
cardRadius: t2,
|
|
@@ -6398,33 +5467,13 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
6398
5467
|
scheme,
|
|
6399
5468
|
width: t5,
|
|
6400
5469
|
zOffset: _zOffsetProp,
|
|
6401
|
-
animate: t6
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
"cardRadius",
|
|
6406
|
-
"cardShadow",
|
|
6407
|
-
"children",
|
|
6408
|
-
"contentRef",
|
|
6409
|
-
"footer",
|
|
6410
|
-
"header",
|
|
6411
|
-
"id",
|
|
6412
|
-
"onActivate",
|
|
6413
|
-
"onClickOutside",
|
|
6414
|
-
"onClose",
|
|
6415
|
-
"onFocus",
|
|
6416
|
-
"padding",
|
|
6417
|
-
"portal",
|
|
6418
|
-
"position",
|
|
6419
|
-
"scheme",
|
|
6420
|
-
"width",
|
|
6421
|
-
"zOffset",
|
|
6422
|
-
"animate"
|
|
6423
|
-
]), $[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]);
|
|
6424
|
-
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 != null ? _positionProp : dialog.position || "fixed", zOffsetProp = _zOffsetProp != null ? _zOffsetProp : dialog.zOffset || layer.dialog.zOffset, animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? ((_b = portal.elements) == null ? void 0 : _b[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);
|
|
5470
|
+
animate: t6,
|
|
5471
|
+
...restProps
|
|
5472
|
+
} = 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]);
|
|
5473
|
+
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);
|
|
6425
5474
|
let t7;
|
|
6426
5475
|
$[22] !== onFocus ? (t7 = (event) => {
|
|
6427
|
-
onFocus
|
|
5476
|
+
onFocus?.(event);
|
|
6428
5477
|
const target = event.target, cardElement = cardRef.current;
|
|
6429
5478
|
if (cardElement && target === preDivRef.current) {
|
|
6430
5479
|
focusLastDescendant(cardElement);
|
|
@@ -6460,11 +5509,11 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
6460
5509
|
let t11;
|
|
6461
5510
|
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: postDivRef, tabIndex: 0 }), $[43] = t11) : t11 = $[43];
|
|
6462
5511
|
let t12;
|
|
6463
|
-
$[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,
|
|
5512
|
+
$[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: [
|
|
6464
5513
|
t9,
|
|
6465
5514
|
t10,
|
|
6466
5515
|
t11
|
|
6467
|
-
] })
|
|
5516
|
+
] }), $[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];
|
|
6468
5517
|
let t13;
|
|
6469
5518
|
return $[57] !== portalProp || $[58] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: portalProp, children: t12 }), $[57] = portalProp, $[58] = t12, $[59] = t13) : t13 = $[59], t13;
|
|
6470
5519
|
});
|
|
@@ -6486,22 +5535,6 @@ function DialogProvider(props) {
|
|
|
6486
5535
|
return $[3] !== children || $[4] !== contextValue ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(DialogContext.Provider, { value: contextValue, children }), $[3] = children, $[4] = contextValue, $[5] = t2) : t2 = $[5], t2;
|
|
6487
5536
|
}
|
|
6488
5537
|
DialogProvider.displayName = "DialogProvider";
|
|
6489
|
-
var __defProp$e = Object.defineProperty, __defProps$e = Object.defineProperties, __getOwnPropDescs$e = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$e = Object.getOwnPropertySymbols, __hasOwnProp$e = Object.prototype.hasOwnProperty, __propIsEnum$e = Object.prototype.propertyIsEnumerable, __defNormalProp$e = (obj, key2, value) => key2 in obj ? __defProp$e(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$e = (a, b) => {
|
|
6490
|
-
for (var prop in b || (b = {}))
|
|
6491
|
-
__hasOwnProp$e.call(b, prop) && __defNormalProp$e(a, prop, b[prop]);
|
|
6492
|
-
if (__getOwnPropSymbols$e)
|
|
6493
|
-
for (var prop of __getOwnPropSymbols$e(b))
|
|
6494
|
-
__propIsEnum$e.call(b, prop) && __defNormalProp$e(a, prop, b[prop]);
|
|
6495
|
-
return a;
|
|
6496
|
-
}, __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b)), __objRest$c = (source, exclude) => {
|
|
6497
|
-
var target = {};
|
|
6498
|
-
for (var prop in source)
|
|
6499
|
-
__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6500
|
-
if (source != null && __getOwnPropSymbols$e)
|
|
6501
|
-
for (var prop of __getOwnPropSymbols$e(source))
|
|
6502
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop) && (target[prop] = source[prop]);
|
|
6503
|
-
return target;
|
|
6504
|
-
};
|
|
6505
5538
|
const Root$6 = styledComponents.styled.kbd`
|
|
6506
5539
|
font: inherit;
|
|
6507
5540
|
padding: 1px;
|
|
@@ -6514,22 +5547,16 @@ const Root$6 = styledComponents.styled.kbd`
|
|
|
6514
5547
|
display: block;
|
|
6515
5548
|
}
|
|
6516
5549
|
`, Hotkeys = react.forwardRef(function(props, ref) {
|
|
6517
|
-
var _a;
|
|
6518
5550
|
const $ = reactCompilerRuntime.c(24);
|
|
6519
5551
|
let fontSize2, keys, padding, radius, restProps, t0;
|
|
6520
|
-
$[0] !== props ? (
|
|
5552
|
+
$[0] !== props ? ({
|
|
6521
5553
|
fontSize: fontSize2,
|
|
6522
5554
|
keys,
|
|
6523
5555
|
padding,
|
|
6524
5556
|
radius,
|
|
6525
|
-
space: t0
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
"keys",
|
|
6529
|
-
"padding",
|
|
6530
|
-
"radius",
|
|
6531
|
-
"space"
|
|
6532
|
-
]), $[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]);
|
|
5557
|
+
space: t0,
|
|
5558
|
+
...restProps
|
|
5559
|
+
} = 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]);
|
|
6533
5560
|
const space = useArrayProp(t0 === void 0 ? 0.5 : t0);
|
|
6534
5561
|
if (!keys || keys.length === 0) {
|
|
6535
5562
|
let t12;
|
|
@@ -6544,7 +5571,7 @@ const Root$6 = styledComponents.styled.kbd`
|
|
|
6544
5571
|
let t2;
|
|
6545
5572
|
$[17] !== space || $[18] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Inline, { as: "span", space, children: t1 }), $[17] = space, $[18] = t1, $[19] = t2) : t2 = $[19];
|
|
6546
5573
|
let t3;
|
|
6547
|
-
return $[20] !== ref || $[21] !== restProps || $[22] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Root$6,
|
|
5574
|
+
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;
|
|
6548
5575
|
});
|
|
6549
5576
|
Hotkeys.displayName = "ForwardRef(Hotkeys)";
|
|
6550
5577
|
const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
|
|
@@ -6651,8 +5678,7 @@ function useMenuController(props) {
|
|
|
6651
5678
|
const element_0 = event_0.currentTarget, currentIndex_3 = elementsRef.current.indexOf(element_0);
|
|
6652
5679
|
setActiveIndex(currentIndex_3);
|
|
6653
5680
|
}, [setActiveIndex]), handleItemMouseLeave = react.useCallback(() => {
|
|
6654
|
-
|
|
6655
|
-
setActiveIndex(-2), (_a = rootElementRef.current) == null || _a.focus();
|
|
5681
|
+
setActiveIndex(-2), rootElementRef.current?.focus();
|
|
6656
5682
|
}, [rootElementRef, setActiveIndex]);
|
|
6657
5683
|
return react.useEffect(() => {
|
|
6658
5684
|
if (!mounted) return;
|
|
@@ -6674,8 +5700,7 @@ function useMenuController(props) {
|
|
|
6674
5700
|
}
|
|
6675
5701
|
return;
|
|
6676
5702
|
}
|
|
6677
|
-
|
|
6678
|
-
element_1 == null || element_1.focus();
|
|
5703
|
+
(elementsRef.current[activeIndex] || null)?.focus();
|
|
6679
5704
|
});
|
|
6680
5705
|
return () => cancelAnimationFrame(rafId);
|
|
6681
5706
|
}, [activeIndex, mounted, setActiveIndex, shouldFocus]), {
|
|
@@ -6687,22 +5712,6 @@ function useMenuController(props) {
|
|
|
6687
5712
|
mount
|
|
6688
5713
|
};
|
|
6689
5714
|
}
|
|
6690
|
-
var __defProp$d = Object.defineProperty, __defProps$d = Object.defineProperties, __getOwnPropDescs$d = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$d = Object.getOwnPropertySymbols, __hasOwnProp$d = Object.prototype.hasOwnProperty, __propIsEnum$d = Object.prototype.propertyIsEnumerable, __defNormalProp$d = (obj, key2, value) => key2 in obj ? __defProp$d(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$d = (a, b) => {
|
|
6691
|
-
for (var prop in b || (b = {}))
|
|
6692
|
-
__hasOwnProp$d.call(b, prop) && __defNormalProp$d(a, prop, b[prop]);
|
|
6693
|
-
if (__getOwnPropSymbols$d)
|
|
6694
|
-
for (var prop of __getOwnPropSymbols$d(b))
|
|
6695
|
-
__propIsEnum$d.call(b, prop) && __defNormalProp$d(a, prop, b[prop]);
|
|
6696
|
-
return a;
|
|
6697
|
-
}, __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b)), __objRest$b = (source, exclude) => {
|
|
6698
|
-
var target = {};
|
|
6699
|
-
for (var prop in source)
|
|
6700
|
-
__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6701
|
-
if (source != null && __getOwnPropSymbols$d)
|
|
6702
|
-
for (var prop of __getOwnPropSymbols$d(source))
|
|
6703
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop) && (target[prop] = source[prop]);
|
|
6704
|
-
return target;
|
|
6705
|
-
};
|
|
6706
5715
|
const Root$5 = styledComponents.styled(Box)`
|
|
6707
5716
|
outline: none;
|
|
6708
5717
|
overflow: auto;
|
|
@@ -6710,7 +5719,7 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
6710
5719
|
const $ = reactCompilerRuntime.c(50);
|
|
6711
5720
|
let _shouldFocus, children, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
|
|
6712
5721
|
if ($[0] !== props) {
|
|
6713
|
-
const
|
|
5722
|
+
const {
|
|
6714
5723
|
children: t22,
|
|
6715
5724
|
focusFirst,
|
|
6716
5725
|
focusLast,
|
|
@@ -6723,26 +5732,13 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
6723
5732
|
padding: t92,
|
|
6724
5733
|
registerElement: t102,
|
|
6725
5734
|
shouldFocus: t112,
|
|
6726
|
-
space: t122
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
"focusFirst",
|
|
6730
|
-
"focusLast",
|
|
6731
|
-
"onClickOutside",
|
|
6732
|
-
"onEscape",
|
|
6733
|
-
"onItemClick",
|
|
6734
|
-
"onItemSelect",
|
|
6735
|
-
"onKeyDown",
|
|
6736
|
-
"originElement",
|
|
6737
|
-
"padding",
|
|
6738
|
-
"registerElement",
|
|
6739
|
-
"shouldFocus",
|
|
6740
|
-
"space"
|
|
6741
|
-
]);
|
|
5735
|
+
space: t122,
|
|
5736
|
+
...t132
|
|
5737
|
+
} = props;
|
|
6742
5738
|
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;
|
|
6743
5739
|
} else
|
|
6744
5740
|
_shouldFocus = $[1], children = $[2], onClickOutside = $[3], onEscape = $[4], onItemClick = $[5], onItemSelect = $[6], onKeyDown = $[7], originElement = $[8], registerElement = $[9], restProps = $[10], t0 = $[11], t1 = $[12];
|
|
6745
|
-
const padding = t0 === void 0 ? 1 : t0, space = t1 === void 0 ? 1 : t1, shouldFocus = _shouldFocus
|
|
5741
|
+
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);
|
|
6746
5742
|
let t2;
|
|
6747
5743
|
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[13] = t2) : t2 = $[13], react.useImperativeHandle(forwardedRef, t2);
|
|
6748
5744
|
const {
|
|
@@ -6797,21 +5793,12 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
6797
5793
|
let t11;
|
|
6798
5794
|
$[38] !== children || $[39] !== space ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { space, children }), $[38] = children, $[39] = space, $[40] = t11) : t11 = $[40];
|
|
6799
5795
|
let t12;
|
|
6800
|
-
$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t11 ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Root$5,
|
|
5796
|
+
$[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];
|
|
6801
5797
|
let t13;
|
|
6802
5798
|
return $[47] !== t12 || $[48] !== value ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: t12 }), $[47] = t12, $[48] = value, $[49] = t13) : t13 = $[49], t13;
|
|
6803
5799
|
});
|
|
6804
5800
|
Menu.displayName = "ForwardRef(Menu)";
|
|
6805
|
-
var __defProp$c = Object.defineProperty, __defProps$c = Object.defineProperties, __getOwnPropDescs$c = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$c = Object.getOwnPropertySymbols, __hasOwnProp$c = Object.prototype.hasOwnProperty, __propIsEnum$c = Object.prototype.propertyIsEnumerable, __defNormalProp$c = (obj, key2, value) => key2 in obj ? __defProp$c(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$c = (a, b) => {
|
|
6806
|
-
for (var prop in b || (b = {}))
|
|
6807
|
-
__hasOwnProp$c.call(b, prop) && __defNormalProp$c(a, prop, b[prop]);
|
|
6808
|
-
if (__getOwnPropSymbols$c)
|
|
6809
|
-
for (var prop of __getOwnPropSymbols$c(b))
|
|
6810
|
-
__propIsEnum$c.call(b, prop) && __defNormalProp$c(a, prop, b[prop]);
|
|
6811
|
-
return a;
|
|
6812
|
-
}, __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
6813
5801
|
const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
6814
|
-
var _a;
|
|
6815
5802
|
const $ = reactCompilerRuntime.c(62), {
|
|
6816
5803
|
__unstable_disableRestoreFocusOnClose: t0,
|
|
6817
5804
|
boundaryElement: deprecated_boundaryElement,
|
|
@@ -6921,7 +5908,7 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6921
5908
|
"aria-haspopup": !0,
|
|
6922
5909
|
"aria-expanded": open,
|
|
6923
5910
|
ref: setButtonElement,
|
|
6924
|
-
selected:
|
|
5911
|
+
selected: buttonProp.props.selected ?? open
|
|
6925
5912
|
}), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t19) : t19 = $[41], t18 = t19;
|
|
6926
5913
|
const button = t18;
|
|
6927
5914
|
let t20, t21;
|
|
@@ -6929,20 +5916,21 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
6929
5916
|
let t22, t23;
|
|
6930
5917
|
$[45] !== popover ? (t23 = popover || {}, $[45] = popover, $[46] = t23) : t23 = $[46];
|
|
6931
5918
|
let t24;
|
|
6932
|
-
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 =
|
|
5919
|
+
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 = {
|
|
6933
5920
|
boundaryElement: deprecated_boundaryElement,
|
|
6934
5921
|
overflow: "auto",
|
|
6935
5922
|
placement: deprecated_placement,
|
|
6936
5923
|
portal: deprecated_portal,
|
|
6937
5924
|
preventOverflow: deprecated_preventOverflow,
|
|
6938
5925
|
radius: deprecated_popoverRadius,
|
|
6939
|
-
scheme: deprecated_popoverScheme
|
|
6940
|
-
|
|
5926
|
+
scheme: deprecated_popoverScheme,
|
|
5927
|
+
...t23
|
|
5928
|
+
}, $[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;
|
|
6941
5929
|
const popoverProps = t22;
|
|
6942
5930
|
let t25;
|
|
6943
5931
|
$[55] !== button ? (t25 = button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[55] = button, $[56] = t25) : t25 = $[56];
|
|
6944
5932
|
let t26;
|
|
6945
|
-
return $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t25 ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(Popover,
|
|
5933
|
+
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;
|
|
6946
5934
|
});
|
|
6947
5935
|
MenuButton.displayName = "ForwardRef(MenuButton)";
|
|
6948
5936
|
function _temp$2(v) {
|
|
@@ -6979,7 +5967,6 @@ function selectableBaseStyle() {
|
|
|
6979
5967
|
`;
|
|
6980
5968
|
}
|
|
6981
5969
|
function selectableColorStyle(props) {
|
|
6982
|
-
var _a;
|
|
6983
5970
|
const {
|
|
6984
5971
|
$tone
|
|
6985
5972
|
} = props, {
|
|
@@ -7053,7 +6040,7 @@ function selectableColorStyle(props) {
|
|
|
7053
6040
|
}
|
|
7054
6041
|
}
|
|
7055
6042
|
|
|
7056
|
-
${
|
|
6043
|
+
${style?.card?.root}
|
|
7057
6044
|
`;
|
|
7058
6045
|
}
|
|
7059
6046
|
const Selectable = styledComponents.styled(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
|
|
@@ -7066,27 +6053,10 @@ function useMenu() {
|
|
|
7066
6053
|
throw new Error("useMenu(): the context value is not compatible");
|
|
7067
6054
|
return value;
|
|
7068
6055
|
}
|
|
7069
|
-
var __defProp$b = Object.defineProperty, __defProps$b = Object.defineProperties, __getOwnPropDescs$b = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$b = Object.getOwnPropertySymbols, __hasOwnProp$b = Object.prototype.hasOwnProperty, __propIsEnum$b = Object.prototype.propertyIsEnumerable, __defNormalProp$b = (obj, key2, value) => key2 in obj ? __defProp$b(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$b = (a, b) => {
|
|
7070
|
-
for (var prop in b || (b = {}))
|
|
7071
|
-
__hasOwnProp$b.call(b, prop) && __defNormalProp$b(a, prop, b[prop]);
|
|
7072
|
-
if (__getOwnPropSymbols$b)
|
|
7073
|
-
for (var prop of __getOwnPropSymbols$b(b))
|
|
7074
|
-
__propIsEnum$b.call(b, prop) && __defNormalProp$b(a, prop, b[prop]);
|
|
7075
|
-
return a;
|
|
7076
|
-
}, __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b)), __objRest$a = (source, exclude) => {
|
|
7077
|
-
var target = {};
|
|
7078
|
-
for (var prop in source)
|
|
7079
|
-
__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7080
|
-
if (source != null && __getOwnPropSymbols$b)
|
|
7081
|
-
for (var prop of __getOwnPropSymbols$b(source))
|
|
7082
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop) && (target[prop] = source[prop]);
|
|
7083
|
-
return target;
|
|
7084
|
-
};
|
|
7085
6056
|
function MenuGroup(props) {
|
|
7086
|
-
var _a;
|
|
7087
6057
|
const $ = reactCompilerRuntime.c(77);
|
|
7088
6058
|
let IconComponent, children, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
|
|
7089
|
-
$[0] !== props ? (
|
|
6059
|
+
$[0] !== props ? ({
|
|
7090
6060
|
as: t0,
|
|
7091
6061
|
children,
|
|
7092
6062
|
fontSize: t1,
|
|
@@ -7097,20 +6067,9 @@ function MenuGroup(props) {
|
|
|
7097
6067
|
radius: t3,
|
|
7098
6068
|
space: t4,
|
|
7099
6069
|
text,
|
|
7100
|
-
tone: t5
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
"children",
|
|
7104
|
-
"fontSize",
|
|
7105
|
-
"icon",
|
|
7106
|
-
"onClick",
|
|
7107
|
-
"padding",
|
|
7108
|
-
"popover",
|
|
7109
|
-
"radius",
|
|
7110
|
-
"space",
|
|
7111
|
-
"text",
|
|
7112
|
-
"tone"
|
|
7113
|
-
]), $[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]);
|
|
6070
|
+
tone: t5,
|
|
6071
|
+
...restProps
|
|
6072
|
+
} = 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]);
|
|
7114
6073
|
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(), {
|
|
7115
6074
|
scheme
|
|
7116
6075
|
} = useRootTheme(), {
|
|
@@ -7121,7 +6080,7 @@ function MenuGroup(props) {
|
|
|
7121
6080
|
onItemClick,
|
|
7122
6081
|
onItemMouseEnter: _onItemMouseEnter,
|
|
7123
6082
|
registerElement
|
|
7124
|
-
} = menu, onItemMouseEnter = _onItemMouseEnter
|
|
6083
|
+
} = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onMouseEnter, [rootElement, setRootElement] = react.useState(null), [open, setOpen] = react.useState(!1), [shouldFocus, setShouldFocus] = react.useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = react.useState(!1);
|
|
7125
6084
|
let t6;
|
|
7126
6085
|
$[13] !== onItemMouseEnter ? (t6 = (event) => {
|
|
7127
6086
|
setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
|
|
@@ -7130,18 +6089,18 @@ function MenuGroup(props) {
|
|
|
7130
6089
|
let t7;
|
|
7131
6090
|
$[15] !== rootElement ? (t7 = (event_0) => {
|
|
7132
6091
|
event_0.key === "ArrowLeft" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
|
|
7133
|
-
rootElement
|
|
6092
|
+
rootElement?.focus();
|
|
7134
6093
|
}));
|
|
7135
6094
|
}, $[15] = rootElement, $[16] = t7) : t7 = $[16];
|
|
7136
6095
|
const handleMenuKeyDown = t7;
|
|
7137
6096
|
let t8;
|
|
7138
6097
|
$[17] !== onClick ? (t8 = (event_1) => {
|
|
7139
|
-
onClick
|
|
6098
|
+
onClick?.(event_1), setShouldFocus("first"), setOpen(!0);
|
|
7140
6099
|
}, $[17] = onClick, $[18] = t8) : t8 = $[18];
|
|
7141
6100
|
const handleClick = t8;
|
|
7142
6101
|
let t9;
|
|
7143
6102
|
$[19] !== onItemClick ? (t9 = () => {
|
|
7144
|
-
setOpen(!1), onItemClick
|
|
6103
|
+
setOpen(!1), onItemClick?.();
|
|
7145
6104
|
}, $[19] = onItemClick, $[20] = t9) : t9 = $[20];
|
|
7146
6105
|
const handleChildItemClick = t9;
|
|
7147
6106
|
let t10;
|
|
@@ -7194,32 +6153,15 @@ function MenuGroup(props) {
|
|
|
7194
6153
|
t29
|
|
7195
6154
|
] }), $[53] = padding, $[54] = space, $[55] = t26, $[56] = t27, $[57] = t29, $[58] = t30) : t30 = $[58];
|
|
7196
6155
|
let t31;
|
|
7197
|
-
$[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,
|
|
6156
|
+
$[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];
|
|
7198
6157
|
let t32;
|
|
7199
|
-
return $[72] !== childMenu || $[73] !== open || $[74] !== popover || $[75] !== t31 ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(Popover,
|
|
6158
|
+
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;
|
|
7200
6159
|
}
|
|
7201
6160
|
MenuGroup.displayName = "MenuGroup";
|
|
7202
|
-
var __defProp$a = Object.defineProperty, __defProps$a = Object.defineProperties, __getOwnPropDescs$a = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$a = Object.getOwnPropertySymbols, __hasOwnProp$a = Object.prototype.hasOwnProperty, __propIsEnum$a = Object.prototype.propertyIsEnumerable, __defNormalProp$a = (obj, key2, value) => key2 in obj ? __defProp$a(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$a = (a, b) => {
|
|
7203
|
-
for (var prop in b || (b = {}))
|
|
7204
|
-
__hasOwnProp$a.call(b, prop) && __defNormalProp$a(a, prop, b[prop]);
|
|
7205
|
-
if (__getOwnPropSymbols$a)
|
|
7206
|
-
for (var prop of __getOwnPropSymbols$a(b))
|
|
7207
|
-
__propIsEnum$a.call(b, prop) && __defNormalProp$a(a, prop, b[prop]);
|
|
7208
|
-
return a;
|
|
7209
|
-
}, __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b)), __objRest$9 = (source, exclude) => {
|
|
7210
|
-
var target = {};
|
|
7211
|
-
for (var prop in source)
|
|
7212
|
-
__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7213
|
-
if (source != null && __getOwnPropSymbols$a)
|
|
7214
|
-
for (var prop of __getOwnPropSymbols$a(source))
|
|
7215
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop) && (target[prop] = source[prop]);
|
|
7216
|
-
return target;
|
|
7217
|
-
};
|
|
7218
6161
|
const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
7219
|
-
var _a;
|
|
7220
6162
|
const $ = reactCompilerRuntime.c(74);
|
|
7221
6163
|
let IconComponent, IconRightComponent, children, disabled, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
|
|
7222
|
-
$[0] !== props ? (
|
|
6164
|
+
$[0] !== props ? ({
|
|
7223
6165
|
as: t0,
|
|
7224
6166
|
children,
|
|
7225
6167
|
disabled,
|
|
@@ -7240,30 +6182,9 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
7240
6182
|
selected: selectedProp,
|
|
7241
6183
|
space: t4,
|
|
7242
6184
|
text,
|
|
7243
|
-
tone: t5
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
"children",
|
|
7247
|
-
"disabled",
|
|
7248
|
-
"fontSize",
|
|
7249
|
-
"hotkeys",
|
|
7250
|
-
"icon",
|
|
7251
|
-
"iconRight",
|
|
7252
|
-
"onClick",
|
|
7253
|
-
"padding",
|
|
7254
|
-
"paddingX",
|
|
7255
|
-
"paddingY",
|
|
7256
|
-
"paddingTop",
|
|
7257
|
-
"paddingRight",
|
|
7258
|
-
"paddingBottom",
|
|
7259
|
-
"paddingLeft",
|
|
7260
|
-
"pressed",
|
|
7261
|
-
"radius",
|
|
7262
|
-
"selected",
|
|
7263
|
-
"space",
|
|
7264
|
-
"text",
|
|
7265
|
-
"tone"
|
|
7266
|
-
]), $[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]);
|
|
6185
|
+
tone: t5,
|
|
6186
|
+
...restProps
|
|
6187
|
+
} = 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]);
|
|
7267
6188
|
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, {
|
|
7268
6189
|
scheme
|
|
7269
6190
|
} = useRootTheme(), menu = useMenu(), {
|
|
@@ -7272,7 +6193,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
7272
6193
|
onItemClick,
|
|
7273
6194
|
onItemMouseEnter: _onItemMouseEnter,
|
|
7274
6195
|
onItemMouseLeave: _onItemMouseLeave
|
|
7275
|
-
} = menu, onItemMouseEnter = _onItemMouseEnter
|
|
6196
|
+
} = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onMouseEnter, onItemMouseLeave = _onItemMouseLeave ?? menu.onMouseLeave, [rootElement, setRootElement] = react.useState(null), active = !!activeElement && activeElement === rootElement, ref = react.useRef(null);
|
|
7276
6197
|
let t6;
|
|
7277
6198
|
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[23] = t6) : t6 = $[23], react.useImperativeHandle(forwardedRef, t6);
|
|
7278
6199
|
let t7, t8;
|
|
@@ -7302,7 +6223,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
7302
6223
|
}, $[43] = t14) : t14 = $[43];
|
|
7303
6224
|
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;
|
|
7304
6225
|
let t23;
|
|
7305
|
-
$[44] !== IconComponent || $[45] !== IconRightComponent || $[46] !== fontSize2 || $[47] !== hotkeys || $[48] !== hotkeysFontSize || $[49] !== paddingProps || $[50] !== space || $[51] !== text ? (t23 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex,
|
|
6226
|
+
$[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: [
|
|
7306
6227
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
7307
6228
|
react.isValidElement(IconComponent) && IconComponent,
|
|
7308
6229
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
@@ -7316,14 +6237,14 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
7316
6237
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
7317
6238
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
7318
6239
|
] })
|
|
7319
|
-
] })
|
|
6240
|
+
] }), $[44] = IconComponent, $[45] = IconRightComponent, $[46] = fontSize2, $[47] = hotkeys, $[48] = hotkeysFontSize, $[49] = paddingProps, $[50] = space, $[51] = text, $[52] = t23) : t23 = $[52];
|
|
7320
6241
|
let t24;
|
|
7321
|
-
$[53] !== children || $[54] !== paddingProps ? (t24 = children && /* @__PURE__ */ jsxRuntime.jsx(Box,
|
|
6242
|
+
$[53] !== children || $[54] !== paddingProps ? (t24 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...paddingProps, children }), $[53] = children, $[54] = paddingProps, $[55] = t24) : t24 = $[55];
|
|
7322
6243
|
let t25;
|
|
7323
|
-
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,
|
|
6244
|
+
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", role: "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, tabIndex: -1, type: t22, children: [
|
|
7324
6245
|
t23,
|
|
7325
6246
|
t24
|
|
7326
|
-
] })
|
|
6247
|
+
] }), $[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;
|
|
7327
6248
|
});
|
|
7328
6249
|
MenuItem.displayName = "ForwardRef(MenuItem)";
|
|
7329
6250
|
function _temp$1(s) {
|
|
@@ -7369,36 +6290,15 @@ const keyframe = styledComponents.keyframes`
|
|
|
7369
6290
|
@media screen and (prefers-reduced-motion: reduce) {
|
|
7370
6291
|
background-color: var(--card-skeleton-color-from);
|
|
7371
6292
|
}
|
|
7372
|
-
|
|
7373
|
-
var __defProp$9 = Object.defineProperty, __defProps$9 = Object.defineProperties, __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$9 = Object.getOwnPropertySymbols, __hasOwnProp$9 = Object.prototype.hasOwnProperty, __propIsEnum$9 = Object.prototype.propertyIsEnumerable, __defNormalProp$9 = (obj, key2, value) => key2 in obj ? __defProp$9(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$9 = (a, b) => {
|
|
7374
|
-
for (var prop in b || (b = {}))
|
|
7375
|
-
__hasOwnProp$9.call(b, prop) && __defNormalProp$9(a, prop, b[prop]);
|
|
7376
|
-
if (__getOwnPropSymbols$9)
|
|
7377
|
-
for (var prop of __getOwnPropSymbols$9(b))
|
|
7378
|
-
__propIsEnum$9.call(b, prop) && __defNormalProp$9(a, prop, b[prop]);
|
|
7379
|
-
return a;
|
|
7380
|
-
}, __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b)), __objRest$8 = (source, exclude) => {
|
|
7381
|
-
var target = {};
|
|
7382
|
-
for (var prop in source)
|
|
7383
|
-
__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7384
|
-
if (source != null && __getOwnPropSymbols$9)
|
|
7385
|
-
for (var prop of __getOwnPropSymbols$9(source))
|
|
7386
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop) && (target[prop] = source[prop]);
|
|
7387
|
-
return target;
|
|
7388
|
-
};
|
|
7389
|
-
const Root$4 = styledComponents.styled(Box)(responsiveRadiusStyle, skeletonStyle), Skeleton = react.forwardRef(function(props, ref) {
|
|
7390
|
-
var _a;
|
|
6293
|
+
`, Root$4 = styledComponents.styled(Box)(responsiveRadiusStyle, skeletonStyle), Skeleton = react.forwardRef(function(props, ref) {
|
|
7391
6294
|
const $ = reactCompilerRuntime.c(14);
|
|
7392
6295
|
let delay, radius, restProps, t0;
|
|
7393
|
-
$[0] !== props ? (
|
|
6296
|
+
$[0] !== props ? ({
|
|
7394
6297
|
animated: t0,
|
|
7395
6298
|
delay,
|
|
7396
|
-
radius
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
"delay",
|
|
7400
|
-
"radius"
|
|
7401
|
-
]), $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0) : (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]);
|
|
6299
|
+
radius,
|
|
6300
|
+
...restProps
|
|
6301
|
+
} = props, $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0) : (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]);
|
|
7402
6302
|
const animated = t0 === void 0 ? !1 : t0, [visible, setVisible] = react.useState(!delay);
|
|
7403
6303
|
let t1, t2;
|
|
7404
6304
|
$[5] !== delay ? (t1 = () => {
|
|
@@ -7413,25 +6313,9 @@ const Root$4 = styledComponents.styled(Box)(responsiveRadiusStyle, skeletonStyle
|
|
|
7413
6313
|
}, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2) : (t1 = $[6], t2 = $[7]), react.useEffect(t1, t2);
|
|
7414
6314
|
const t3 = useArrayProp(radius);
|
|
7415
6315
|
let t4;
|
|
7416
|
-
return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== visible ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Root$4,
|
|
6316
|
+
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;
|
|
7417
6317
|
});
|
|
7418
6318
|
Skeleton.displayName = "ForwardRef(Skeleton)";
|
|
7419
|
-
var __defProp$8 = Object.defineProperty, __defProps$8 = Object.defineProperties, __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$8 = Object.getOwnPropertySymbols, __hasOwnProp$8 = Object.prototype.hasOwnProperty, __propIsEnum$8 = Object.prototype.propertyIsEnumerable, __defNormalProp$8 = (obj, key2, value) => key2 in obj ? __defProp$8(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$8 = (a, b) => {
|
|
7420
|
-
for (var prop in b || (b = {}))
|
|
7421
|
-
__hasOwnProp$8.call(b, prop) && __defNormalProp$8(a, prop, b[prop]);
|
|
7422
|
-
if (__getOwnPropSymbols$8)
|
|
7423
|
-
for (var prop of __getOwnPropSymbols$8(b))
|
|
7424
|
-
__propIsEnum$8.call(b, prop) && __defNormalProp$8(a, prop, b[prop]);
|
|
7425
|
-
return a;
|
|
7426
|
-
}, __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b)), __objRest$7 = (source, exclude) => {
|
|
7427
|
-
var target = {};
|
|
7428
|
-
for (var prop in source)
|
|
7429
|
-
__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7430
|
-
if (source != null && __getOwnPropSymbols$8)
|
|
7431
|
-
for (var prop of __getOwnPropSymbols$8(source))
|
|
7432
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop) && (target[prop] = source[prop]);
|
|
7433
|
-
return target;
|
|
7434
|
-
};
|
|
7435
6319
|
const Root$3 = styledComponents.styled(Skeleton)((props) => {
|
|
7436
6320
|
const {
|
|
7437
6321
|
$size,
|
|
@@ -7447,84 +6331,59 @@ const Root$3 = styledComponents.styled(Skeleton)((props) => {
|
|
|
7447
6331
|
};
|
|
7448
6332
|
});
|
|
7449
6333
|
}), TextSkeleton = react.forwardRef(function(props, ref) {
|
|
7450
|
-
var _a;
|
|
7451
6334
|
const $ = reactCompilerRuntime.c(7);
|
|
7452
6335
|
let restProps, t0;
|
|
7453
|
-
$[0] !== props ? (
|
|
7454
|
-
size: t0
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6336
|
+
$[0] !== props ? ({
|
|
6337
|
+
size: t0,
|
|
6338
|
+
...restProps
|
|
6339
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
7458
6340
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
7459
6341
|
let t1;
|
|
7460
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3,
|
|
6342
|
+
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;
|
|
7461
6343
|
});
|
|
7462
6344
|
TextSkeleton.displayName = "ForwardRef(TextSkeleton)";
|
|
7463
6345
|
const LabelSkeleton = react.forwardRef(function(props, ref) {
|
|
7464
|
-
var _a;
|
|
7465
6346
|
const $ = reactCompilerRuntime.c(7);
|
|
7466
6347
|
let restProps, t0;
|
|
7467
|
-
$[0] !== props ? (
|
|
7468
|
-
size: t0
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6348
|
+
$[0] !== props ? ({
|
|
6349
|
+
size: t0,
|
|
6350
|
+
...restProps
|
|
6351
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
7472
6352
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
7473
6353
|
let t1;
|
|
7474
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3,
|
|
6354
|
+
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;
|
|
7475
6355
|
});
|
|
7476
6356
|
LabelSkeleton.displayName = "ForwardRef(LabelSkeleton)";
|
|
7477
6357
|
const HeadingSkeleton = react.forwardRef(function(props, ref) {
|
|
7478
|
-
var _a;
|
|
7479
6358
|
const $ = reactCompilerRuntime.c(7);
|
|
7480
6359
|
let restProps, t0;
|
|
7481
|
-
$[0] !== props ? (
|
|
7482
|
-
size: t0
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6360
|
+
$[0] !== props ? ({
|
|
6361
|
+
size: t0,
|
|
6362
|
+
...restProps
|
|
6363
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
7486
6364
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
7487
6365
|
let t1;
|
|
7488
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3,
|
|
6366
|
+
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;
|
|
7489
6367
|
});
|
|
7490
6368
|
HeadingSkeleton.displayName = "ForwardRef(HeadingSkeleton)";
|
|
7491
6369
|
const CodeSkeleton = react.forwardRef(function(props, ref) {
|
|
7492
|
-
var _a;
|
|
7493
6370
|
const $ = reactCompilerRuntime.c(7);
|
|
7494
6371
|
let restProps, t0;
|
|
7495
|
-
$[0] !== props ? (
|
|
7496
|
-
size: t0
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6372
|
+
$[0] !== props ? ({
|
|
6373
|
+
size: t0,
|
|
6374
|
+
...restProps
|
|
6375
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
7500
6376
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
7501
6377
|
let t1;
|
|
7502
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3,
|
|
6378
|
+
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;
|
|
7503
6379
|
});
|
|
7504
6380
|
CodeSkeleton.displayName = "ForwardRef(CodeSkeleton)";
|
|
7505
|
-
var __defProp$7 = Object.defineProperty, __defProps$7 = Object.defineProperties, __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$7 = Object.getOwnPropertySymbols, __hasOwnProp$7 = Object.prototype.hasOwnProperty, __propIsEnum$7 = Object.prototype.propertyIsEnumerable, __defNormalProp$7 = (obj, key2, value) => key2 in obj ? __defProp$7(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$7 = (a, b) => {
|
|
7506
|
-
for (var prop in b || (b = {}))
|
|
7507
|
-
__hasOwnProp$7.call(b, prop) && __defNormalProp$7(a, prop, b[prop]);
|
|
7508
|
-
if (__getOwnPropSymbols$7)
|
|
7509
|
-
for (var prop of __getOwnPropSymbols$7(b))
|
|
7510
|
-
__propIsEnum$7.call(b, prop) && __defNormalProp$7(a, prop, b[prop]);
|
|
7511
|
-
return a;
|
|
7512
|
-
}, __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b)), __objRest$6 = (source, exclude) => {
|
|
7513
|
-
var target = {};
|
|
7514
|
-
for (var prop in source)
|
|
7515
|
-
__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7516
|
-
if (source != null && __getOwnPropSymbols$7)
|
|
7517
|
-
for (var prop of __getOwnPropSymbols$7(source))
|
|
7518
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop) && (target[prop] = source[prop]);
|
|
7519
|
-
return target;
|
|
7520
|
-
};
|
|
7521
6381
|
const CustomButton = styledComponents.styled(Button)`
|
|
7522
6382
|
max-width: 100%;
|
|
7523
6383
|
`, Tab = react.forwardRef(function(props, forwardedRef) {
|
|
7524
|
-
var _a;
|
|
7525
6384
|
const $ = reactCompilerRuntime.c(30);
|
|
7526
6385
|
let focused, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
|
|
7527
|
-
$[0] !== props ? (
|
|
6386
|
+
$[0] !== props ? ({
|
|
7528
6387
|
icon,
|
|
7529
6388
|
id,
|
|
7530
6389
|
focused,
|
|
@@ -7533,18 +6392,9 @@ const CustomButton = styledComponents.styled(Button)`
|
|
|
7533
6392
|
onClick,
|
|
7534
6393
|
onFocus,
|
|
7535
6394
|
padding: t1,
|
|
7536
|
-
selected
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
"id",
|
|
7540
|
-
"focused",
|
|
7541
|
-
"fontSize",
|
|
7542
|
-
"label",
|
|
7543
|
-
"onClick",
|
|
7544
|
-
"onFocus",
|
|
7545
|
-
"padding",
|
|
7546
|
-
"selected"
|
|
7547
|
-
]), $[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]);
|
|
6395
|
+
selected,
|
|
6396
|
+
...restProps
|
|
6397
|
+
} = 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]);
|
|
7548
6398
|
const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = react.useRef(null), focusedRef = react.useRef(!1);
|
|
7549
6399
|
let t2;
|
|
7550
6400
|
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], react.useImperativeHandle(forwardedRef, t2);
|
|
@@ -7564,25 +6414,9 @@ const CustomButton = styledComponents.styled(Button)`
|
|
|
7564
6414
|
}, t6 = [focused], $[15] = focused, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), react.useEffect(t5, t6);
|
|
7565
6415
|
const t7 = selected ? "true" : "false", t8 = selected ? 0 : -1;
|
|
7566
6416
|
let t9;
|
|
7567
|
-
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,
|
|
6417
|
+
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;
|
|
7568
6418
|
});
|
|
7569
6419
|
Tab.displayName = "ForwardRef(Tab)";
|
|
7570
|
-
var __defProp$6 = Object.defineProperty, __defProps$6 = Object.defineProperties, __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$6 = Object.getOwnPropertySymbols, __hasOwnProp$6 = Object.prototype.hasOwnProperty, __propIsEnum$6 = Object.prototype.propertyIsEnumerable, __defNormalProp$6 = (obj, key2, value) => key2 in obj ? __defProp$6(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$6 = (a, b) => {
|
|
7571
|
-
for (var prop in b || (b = {}))
|
|
7572
|
-
__hasOwnProp$6.call(b, prop) && __defNormalProp$6(a, prop, b[prop]);
|
|
7573
|
-
if (__getOwnPropSymbols$6)
|
|
7574
|
-
for (var prop of __getOwnPropSymbols$6(b))
|
|
7575
|
-
__propIsEnum$6.call(b, prop) && __defNormalProp$6(a, prop, b[prop]);
|
|
7576
|
-
return a;
|
|
7577
|
-
}, __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b)), __objRest$5 = (source, exclude) => {
|
|
7578
|
-
var target = {};
|
|
7579
|
-
for (var prop in source)
|
|
7580
|
-
__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7581
|
-
if (source != null && __getOwnPropSymbols$6)
|
|
7582
|
-
for (var prop of __getOwnPropSymbols$6(source))
|
|
7583
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop) && (target[prop] = source[prop]);
|
|
7584
|
-
return target;
|
|
7585
|
-
};
|
|
7586
6420
|
const CustomInline = styledComponents.styled(Inline)`
|
|
7587
6421
|
& > div {
|
|
7588
6422
|
display: inline-block;
|
|
@@ -7591,14 +6425,12 @@ const CustomInline = styledComponents.styled(Inline)`
|
|
|
7591
6425
|
box-sizing: border-box;
|
|
7592
6426
|
}
|
|
7593
6427
|
`, TabList = react.forwardRef(function(props, ref) {
|
|
7594
|
-
var _a;
|
|
7595
6428
|
const $ = reactCompilerRuntime.c(15);
|
|
7596
6429
|
let childrenProp, restProps;
|
|
7597
|
-
$[0] !== props ? (
|
|
7598
|
-
children: childrenProp
|
|
7599
|
-
|
|
7600
|
-
|
|
7601
|
-
]), $[0] = props, $[1] = childrenProp, $[2] = restProps) : (childrenProp = $[1], restProps = $[2]);
|
|
6430
|
+
$[0] !== props ? ({
|
|
6431
|
+
children: childrenProp,
|
|
6432
|
+
...restProps
|
|
6433
|
+
} = props, $[0] = props, $[1] = childrenProp, $[2] = restProps) : (childrenProp = $[1], restProps = $[2]);
|
|
7602
6434
|
const [focusedIndex, setFocusedIndex] = react.useState(-1);
|
|
7603
6435
|
let t0;
|
|
7604
6436
|
if ($[3] !== childrenProp || $[4] !== focusedIndex) {
|
|
@@ -7618,37 +6450,19 @@ const CustomInline = styledComponents.styled(Inline)`
|
|
|
7618
6450
|
}, $[8] = numTabs, $[9] = t1) : t1 = $[9];
|
|
7619
6451
|
const handleKeyDown = t1;
|
|
7620
6452
|
let t2;
|
|
7621
|
-
return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(CustomInline,
|
|
6453
|
+
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;
|
|
7622
6454
|
});
|
|
7623
6455
|
TabList.displayName = "ForwardRef(TabList)";
|
|
7624
|
-
var __defProp$5 = Object.defineProperty, __defProps$5 = Object.defineProperties, __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$5 = Object.getOwnPropertySymbols, __hasOwnProp$5 = Object.prototype.hasOwnProperty, __propIsEnum$5 = Object.prototype.propertyIsEnumerable, __defNormalProp$5 = (obj, key2, value) => key2 in obj ? __defProp$5(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$5 = (a, b) => {
|
|
7625
|
-
for (var prop in b || (b = {}))
|
|
7626
|
-
__hasOwnProp$5.call(b, prop) && __defNormalProp$5(a, prop, b[prop]);
|
|
7627
|
-
if (__getOwnPropSymbols$5)
|
|
7628
|
-
for (var prop of __getOwnPropSymbols$5(b))
|
|
7629
|
-
__propIsEnum$5.call(b, prop) && __defNormalProp$5(a, prop, b[prop]);
|
|
7630
|
-
return a;
|
|
7631
|
-
}, __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b)), __objRest$4 = (source, exclude) => {
|
|
7632
|
-
var target = {};
|
|
7633
|
-
for (var prop in source)
|
|
7634
|
-
__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7635
|
-
if (source != null && __getOwnPropSymbols$5)
|
|
7636
|
-
for (var prop of __getOwnPropSymbols$5(source))
|
|
7637
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop) && (target[prop] = source[prop]);
|
|
7638
|
-
return target;
|
|
7639
|
-
};
|
|
7640
6456
|
const TabPanel = react.forwardRef(function(props, ref) {
|
|
7641
|
-
var _a;
|
|
7642
6457
|
const $ = reactCompilerRuntime.c(9);
|
|
7643
6458
|
let flex, restProps;
|
|
7644
|
-
$[0] !== props ? (
|
|
7645
|
-
flex
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
]), $[0] = props, $[1] = flex, $[2] = restProps) : (flex = $[1], restProps = $[2]);
|
|
6459
|
+
$[0] !== props ? ({
|
|
6460
|
+
flex,
|
|
6461
|
+
...restProps
|
|
6462
|
+
} = props, $[0] = props, $[1] = flex, $[2] = restProps) : (flex = $[1], restProps = $[2]);
|
|
7649
6463
|
const t0 = props.tabIndex === void 0 ? 0 : props.tabIndex;
|
|
7650
6464
|
let t1;
|
|
7651
|
-
return $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Box,
|
|
6465
|
+
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;
|
|
7652
6466
|
});
|
|
7653
6467
|
TabPanel.displayName = "ForwardRef(TabPanel)";
|
|
7654
6468
|
const TextBox = styledComponents.styled(Flex)`
|
|
@@ -7695,22 +6509,6 @@ function rootStyles(props) {
|
|
|
7695
6509
|
}
|
|
7696
6510
|
`;
|
|
7697
6511
|
}
|
|
7698
|
-
var __defProp$4 = Object.defineProperty, __defProps$4 = Object.defineProperties, __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$4 = Object.getOwnPropertySymbols, __hasOwnProp$4 = Object.prototype.hasOwnProperty, __propIsEnum$4 = Object.prototype.propertyIsEnumerable, __defNormalProp$4 = (obj, key2, value) => key2 in obj ? __defProp$4(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$4 = (a, b) => {
|
|
7699
|
-
for (var prop in b || (b = {}))
|
|
7700
|
-
__hasOwnProp$4.call(b, prop) && __defNormalProp$4(a, prop, b[prop]);
|
|
7701
|
-
if (__getOwnPropSymbols$4)
|
|
7702
|
-
for (var prop of __getOwnPropSymbols$4(b))
|
|
7703
|
-
__propIsEnum$4.call(b, prop) && __defNormalProp$4(a, prop, b[prop]);
|
|
7704
|
-
return a;
|
|
7705
|
-
}, __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b)), __objRest$3 = (source, exclude) => {
|
|
7706
|
-
var target = {};
|
|
7707
|
-
for (var prop in source)
|
|
7708
|
-
__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7709
|
-
if (source != null && __getOwnPropSymbols$4)
|
|
7710
|
-
for (var prop of __getOwnPropSymbols$4(source))
|
|
7711
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop) && (target[prop] = source[prop]);
|
|
7712
|
-
return target;
|
|
7713
|
-
};
|
|
7714
6512
|
const STATUS_CARD_TONE = {
|
|
7715
6513
|
error: "critical",
|
|
7716
6514
|
warning: "caution",
|
|
@@ -7728,26 +6526,18 @@ const STATUS_CARD_TONE = {
|
|
|
7728
6526
|
info: "alert"
|
|
7729
6527
|
}, Root$2 = styledComponents.styled(Card)(rootStyles);
|
|
7730
6528
|
function Toast(props) {
|
|
7731
|
-
var _a;
|
|
7732
6529
|
const $ = reactCompilerRuntime.c(30);
|
|
7733
6530
|
let closable, description, duration, onClose, restProps, status, t0, title;
|
|
7734
|
-
$[0] !== props ? (
|
|
6531
|
+
$[0] !== props ? ({
|
|
7735
6532
|
closable,
|
|
7736
6533
|
description,
|
|
7737
6534
|
duration,
|
|
7738
6535
|
onClose,
|
|
7739
6536
|
radius: t0,
|
|
7740
6537
|
title,
|
|
7741
|
-
status
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
"description",
|
|
7745
|
-
"duration",
|
|
7746
|
-
"onClose",
|
|
7747
|
-
"radius",
|
|
7748
|
-
"title",
|
|
7749
|
-
"status"
|
|
7750
|
-
]), $[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]);
|
|
6538
|
+
status,
|
|
6539
|
+
...restProps
|
|
6540
|
+
} = 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]);
|
|
7751
6541
|
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";
|
|
7752
6542
|
let t1;
|
|
7753
6543
|
$[9] !== title ? (t1 = title && /* @__PURE__ */ jsxRuntime.jsx(Text, { size: 1, weight: "medium", children: title }), $[9] = title, $[10] = t1) : t1 = $[10];
|
|
@@ -7768,7 +6558,7 @@ function Toast(props) {
|
|
|
7768
6558
|
t4
|
|
7769
6559
|
] }), $[20] = t3, $[21] = t4, $[22] = t5) : t5 = $[22];
|
|
7770
6560
|
let t6;
|
|
7771
|
-
return $[23] !== cardTone || $[24] !== duration || $[25] !== radius || $[26] !== restProps || $[27] !== role || $[28] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$2,
|
|
6561
|
+
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;
|
|
7772
6562
|
}
|
|
7773
6563
|
Toast.displayName = "Toast";
|
|
7774
6564
|
function useMounted() {
|
|
@@ -7786,14 +6576,6 @@ let toastId = 0;
|
|
|
7786
6576
|
function generateToastId() {
|
|
7787
6577
|
return String(toastId++);
|
|
7788
6578
|
}
|
|
7789
|
-
var __defProp$3 = Object.defineProperty, __defProps$3 = Object.defineProperties, __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$3 = Object.getOwnPropertySymbols, __hasOwnProp$3 = Object.prototype.hasOwnProperty, __propIsEnum$3 = Object.prototype.propertyIsEnumerable, __defNormalProp$3 = (obj, key2, value) => key2 in obj ? __defProp$3(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$3 = (a, b) => {
|
|
7790
|
-
for (var prop in b || (b = {}))
|
|
7791
|
-
__hasOwnProp$3.call(b, prop) && __defNormalProp$3(a, prop, b[prop]);
|
|
7792
|
-
if (__getOwnPropSymbols$3)
|
|
7793
|
-
for (var prop of __getOwnPropSymbols$3(b))
|
|
7794
|
-
__propIsEnum$3.call(b, prop) && __defNormalProp$3(a, prop, b[prop]);
|
|
7795
|
-
return a;
|
|
7796
|
-
}, __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
7797
6579
|
const Root$1 = styledComponents.styled(Layer)`
|
|
7798
6580
|
position: fixed;
|
|
7799
6581
|
top: 0;
|
|
@@ -7860,8 +6642,7 @@ function ToastProvider(props) {
|
|
|
7860
6642
|
version: 0,
|
|
7861
6643
|
push: (params) => {
|
|
7862
6644
|
const setState = (state_0) => react.startTransition(() => _setState(state_0)), id = params.id || generateToastId(), duration = params.duration || 5e3, dismiss = () => {
|
|
7863
|
-
|
|
7864
|
-
const timeoutId = (_a = toastsRef.current[id]) == null ? void 0 : _a.timeoutId;
|
|
6645
|
+
const timeoutId = toastsRef.current[id]?.timeoutId;
|
|
7865
6646
|
setState((prevState) => {
|
|
7866
6647
|
const idx = prevState.findIndex((t) => t.id === id);
|
|
7867
6648
|
if (idx > -1) {
|
|
@@ -7874,9 +6655,10 @@ function ToastProvider(props) {
|
|
|
7874
6655
|
return setState((prevState_0) => prevState_0.filter((t_0) => t_0.id !== id).concat([{
|
|
7875
6656
|
dismiss,
|
|
7876
6657
|
id,
|
|
7877
|
-
params:
|
|
6658
|
+
params: {
|
|
6659
|
+
...params,
|
|
7878
6660
|
duration
|
|
7879
|
-
}
|
|
6661
|
+
}
|
|
7880
6662
|
}])), toastsRef.current[id] && (clearTimeout(toastsRef.current[id].timeoutId), delete toastsRef.current[id]), toastsRef.current[id] = {
|
|
7881
6663
|
timeoutId: setTimeout(dismiss, duration)
|
|
7882
6664
|
}, id;
|
|
@@ -7922,7 +6704,6 @@ function useToast() {
|
|
|
7922
6704
|
return value;
|
|
7923
6705
|
}
|
|
7924
6706
|
function _findPrevItemElement(state, itemElements, focusedElement) {
|
|
7925
|
-
var _a;
|
|
7926
6707
|
const idx = itemElements.indexOf(focusedElement), els = itemElements.slice(0, idx), len = els.length;
|
|
7927
6708
|
for (let i = len - 1; i >= 0; i -= 1) {
|
|
7928
6709
|
const itemKey = els[i].getAttribute("data-tree-key");
|
|
@@ -7935,7 +6716,7 @@ function _findPrevItemElement(state, itemElements, focusedElement) {
|
|
|
7935
6716
|
for (let j = 0; j < segments.length; j += 1) {
|
|
7936
6717
|
p.push(segments[j]);
|
|
7937
6718
|
const k = p.join("/");
|
|
7938
|
-
if (!
|
|
6719
|
+
if (!state[k]?.expanded) {
|
|
7939
6720
|
expanded = !1;
|
|
7940
6721
|
break;
|
|
7941
6722
|
}
|
|
@@ -7946,7 +6727,6 @@ function _findPrevItemElement(state, itemElements, focusedElement) {
|
|
|
7946
6727
|
return null;
|
|
7947
6728
|
}
|
|
7948
6729
|
function _findNextItemElement(state, itemElements, focusedElement) {
|
|
7949
|
-
var _a;
|
|
7950
6730
|
const idx = itemElements.indexOf(focusedElement), els = itemElements.slice(idx), len = itemElements.length;
|
|
7951
6731
|
for (let i = 1; i < len; i += 1) {
|
|
7952
6732
|
if (!els[i])
|
|
@@ -7961,7 +6741,7 @@ function _findNextItemElement(state, itemElements, focusedElement) {
|
|
|
7961
6741
|
for (let j = 0; j < segments.length; j += 1) {
|
|
7962
6742
|
p.push(segments[j]);
|
|
7963
6743
|
const k = p.join("/");
|
|
7964
|
-
if (!
|
|
6744
|
+
if (!state[k]?.expanded) {
|
|
7965
6745
|
expanded = !1;
|
|
7966
6746
|
break;
|
|
7967
6747
|
}
|
|
@@ -7977,36 +6757,15 @@ function _focusItemElement(el) {
|
|
|
7977
6757
|
firstChild && firstChild instanceof HTMLElement && firstChild.focus();
|
|
7978
6758
|
}
|
|
7979
6759
|
}
|
|
7980
|
-
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null)
|
|
7981
|
-
var __defProp$2 = Object.defineProperty, __defProps$2 = Object.defineProperties, __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$2 = Object.getOwnPropertySymbols, __hasOwnProp$2 = Object.prototype.hasOwnProperty, __propIsEnum$2 = Object.prototype.propertyIsEnumerable, __defNormalProp$2 = (obj, key2, value) => key2 in obj ? __defProp$2(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$2 = (a, b) => {
|
|
7982
|
-
for (var prop in b || (b = {}))
|
|
7983
|
-
__hasOwnProp$2.call(b, prop) && __defNormalProp$2(a, prop, b[prop]);
|
|
7984
|
-
if (__getOwnPropSymbols$2)
|
|
7985
|
-
for (var prop of __getOwnPropSymbols$2(b))
|
|
7986
|
-
__propIsEnum$2.call(b, prop) && __defNormalProp$2(a, prop, b[prop]);
|
|
7987
|
-
return a;
|
|
7988
|
-
}, __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b)), __objRest$2 = (source, exclude) => {
|
|
7989
|
-
var target = {};
|
|
7990
|
-
for (var prop in source)
|
|
7991
|
-
__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7992
|
-
if (source != null && __getOwnPropSymbols$2)
|
|
7993
|
-
for (var prop of __getOwnPropSymbols$2(source))
|
|
7994
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop) && (target[prop] = source[prop]);
|
|
7995
|
-
return target;
|
|
7996
|
-
};
|
|
7997
|
-
const Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
7998
|
-
var _a;
|
|
6760
|
+
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null), Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
7999
6761
|
const $ = reactCompilerRuntime.c(37);
|
|
8000
6762
|
let children, onFocus, restProps, t0;
|
|
8001
|
-
$[0] !== props ? (
|
|
6763
|
+
$[0] !== props ? ({
|
|
8002
6764
|
children,
|
|
8003
6765
|
space: t0,
|
|
8004
|
-
onFocus
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
"space",
|
|
8008
|
-
"onFocus"
|
|
8009
|
-
]), $[0] = props, $[1] = children, $[2] = onFocus, $[3] = restProps, $[4] = t0) : (children = $[1], onFocus = $[2], restProps = $[3], t0 = $[4]);
|
|
6766
|
+
onFocus,
|
|
6767
|
+
...restProps
|
|
6768
|
+
} = props, $[0] = props, $[1] = children, $[2] = onFocus, $[3] = restProps, $[4] = t0) : (children = $[1], onFocus = $[2], restProps = $[3], t0 = $[4]);
|
|
8010
6769
|
const space = t0 === void 0 ? 1 : t0, ref = react.useRef(null), [focusedElement, setFocusedElement] = react.useState(null), focusedElementRef = react.useRef(focusedElement);
|
|
8011
6770
|
let t1, t2;
|
|
8012
6771
|
$[5] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[5] = t2) : t2 = $[5], t1 = t2;
|
|
@@ -8028,14 +6787,17 @@ const Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
8028
6787
|
stateRef.current = state;
|
|
8029
6788
|
}, t9 = [state], $[12] = state, $[13] = t8, $[14] = t9) : (t8 = $[13], t9 = $[14]), react.useEffect(t8, t9);
|
|
8030
6789
|
let t10;
|
|
8031
|
-
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) =>
|
|
6790
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) => ({
|
|
6791
|
+
...s,
|
|
8032
6792
|
[path_0]: {
|
|
8033
6793
|
element,
|
|
8034
6794
|
expanded
|
|
8035
6795
|
}
|
|
8036
6796
|
})), selected && setFocusedElement(element), () => {
|
|
8037
6797
|
setState((s_0) => {
|
|
8038
|
-
const newState =
|
|
6798
|
+
const newState = {
|
|
6799
|
+
...s_0
|
|
6800
|
+
};
|
|
8039
6801
|
return delete newState[path_0], newState;
|
|
8040
6802
|
});
|
|
8041
6803
|
}), $[15] = t10) : t10 = $[15];
|
|
@@ -8044,11 +6806,13 @@ const Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
8044
6806
|
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (path_1, expanded_0) => {
|
|
8045
6807
|
setState((s_1) => {
|
|
8046
6808
|
const itemState = s_1[path_1];
|
|
8047
|
-
return itemState ?
|
|
8048
|
-
|
|
6809
|
+
return itemState ? {
|
|
6810
|
+
...s_1,
|
|
6811
|
+
[path_1]: {
|
|
6812
|
+
...itemState,
|
|
8049
6813
|
expanded: expanded_0
|
|
8050
|
-
}
|
|
8051
|
-
}
|
|
6814
|
+
}
|
|
6815
|
+
} : s_1;
|
|
8052
6816
|
});
|
|
8053
6817
|
}, $[16] = t11) : t11 = $[16];
|
|
8054
6818
|
const setExpanded = t11;
|
|
@@ -8069,7 +6833,6 @@ const Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
8069
6833
|
const contextValue = t12;
|
|
8070
6834
|
let t15;
|
|
8071
6835
|
$[21] !== itemElements ? (t15 = (event) => {
|
|
8072
|
-
var _a2;
|
|
8073
6836
|
if (focusedElementRef.current) {
|
|
8074
6837
|
if (event.key === "ArrowDown") {
|
|
8075
6838
|
event.preventDefault();
|
|
@@ -8094,11 +6857,13 @@ const Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
8094
6857
|
if (itemState_0.expanded)
|
|
8095
6858
|
setState((s_2) => {
|
|
8096
6859
|
const itemState_1 = s_2[itemKey];
|
|
8097
|
-
return itemState_1 ?
|
|
8098
|
-
|
|
6860
|
+
return itemState_1 ? {
|
|
6861
|
+
...s_2,
|
|
6862
|
+
[itemKey]: {
|
|
6863
|
+
...itemState_1,
|
|
8099
6864
|
expanded: !1
|
|
8100
|
-
}
|
|
8101
|
-
}
|
|
6865
|
+
}
|
|
6866
|
+
} : s_2;
|
|
8102
6867
|
});
|
|
8103
6868
|
else {
|
|
8104
6869
|
const itemPath = itemKey.split("/");
|
|
@@ -8113,13 +6878,15 @@ const Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
8113
6878
|
const focusedKey = focusedElementRef.current.getAttribute("data-tree-key");
|
|
8114
6879
|
if (!focusedKey)
|
|
8115
6880
|
return;
|
|
8116
|
-
|
|
6881
|
+
stateRef.current[focusedKey]?.expanded || setState((s_3) => {
|
|
8117
6882
|
const itemState_2 = s_3[focusedKey];
|
|
8118
|
-
return itemState_2 ?
|
|
8119
|
-
|
|
6883
|
+
return itemState_2 ? {
|
|
6884
|
+
...s_3,
|
|
6885
|
+
[focusedKey]: {
|
|
6886
|
+
...itemState_2,
|
|
8120
6887
|
expanded: !0
|
|
8121
|
-
}
|
|
8122
|
-
}
|
|
6888
|
+
}
|
|
6889
|
+
} : s_3;
|
|
8123
6890
|
});
|
|
8124
6891
|
return;
|
|
8125
6892
|
}
|
|
@@ -8128,7 +6895,7 @@ const Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
8128
6895
|
const handleKeyDown = t15;
|
|
8129
6896
|
let t16;
|
|
8130
6897
|
$[23] !== onFocus ? (t16 = (event_0) => {
|
|
8131
|
-
setFocusedElement(event_0.target), onFocus
|
|
6898
|
+
setFocusedElement(event_0.target), onFocus?.(event_0);
|
|
8132
6899
|
}, $[23] = onFocus, $[24] = t16) : t16 = $[24];
|
|
8133
6900
|
const handleFocus = t16;
|
|
8134
6901
|
let t17;
|
|
@@ -8141,7 +6908,7 @@ const Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
8141
6908
|
let t18;
|
|
8142
6909
|
$[26] !== children ? (t18 = [children], $[26] = children, $[27] = t18) : t18 = $[27], react.useEffect(t17, t18);
|
|
8143
6910
|
let t19;
|
|
8144
|
-
$[28] !== children || $[29] !== handleFocus || $[30] !== handleKeyDown || $[31] !== restProps || $[32] !== space ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(Stack,
|
|
6911
|
+
$[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];
|
|
8145
6912
|
let t20;
|
|
8146
6913
|
return $[34] !== contextValue || $[35] !== t19 ? (t20 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t19 }), $[34] = contextValue, $[35] = t19, $[36] = t20) : t20 = $[36], t20;
|
|
8147
6914
|
}));
|
|
@@ -8244,61 +7011,25 @@ function useTree() {
|
|
|
8244
7011
|
throw new Error("Tree: missing context value");
|
|
8245
7012
|
return tree;
|
|
8246
7013
|
}
|
|
8247
|
-
var __defProp$1 = Object.defineProperty, __defProps$1 = Object.defineProperties, __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors, __getOwnPropSymbols$1 = Object.getOwnPropertySymbols, __hasOwnProp$1 = Object.prototype.hasOwnProperty, __propIsEnum$1 = Object.prototype.propertyIsEnumerable, __defNormalProp$1 = (obj, key2, value) => key2 in obj ? __defProp$1(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues$1 = (a, b) => {
|
|
8248
|
-
for (var prop in b || (b = {}))
|
|
8249
|
-
__hasOwnProp$1.call(b, prop) && __defNormalProp$1(a, prop, b[prop]);
|
|
8250
|
-
if (__getOwnPropSymbols$1)
|
|
8251
|
-
for (var prop of __getOwnPropSymbols$1(b))
|
|
8252
|
-
__propIsEnum$1.call(b, prop) && __defNormalProp$1(a, prop, b[prop]);
|
|
8253
|
-
return a;
|
|
8254
|
-
}, __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)), __objRest$1 = (source, exclude) => {
|
|
8255
|
-
var target = {};
|
|
8256
|
-
for (var prop in source)
|
|
8257
|
-
__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
8258
|
-
if (source != null && __getOwnPropSymbols$1)
|
|
8259
|
-
for (var prop of __getOwnPropSymbols$1(source))
|
|
8260
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop) && (target[prop] = source[prop]);
|
|
8261
|
-
return target;
|
|
8262
|
-
};
|
|
8263
7014
|
const TreeGroup = react.memo(function(props) {
|
|
8264
|
-
var _a;
|
|
8265
7015
|
const $ = reactCompilerRuntime.c(9);
|
|
8266
7016
|
let children, restProps, t0;
|
|
8267
|
-
$[0] !== props ? (
|
|
7017
|
+
$[0] !== props ? ({
|
|
8268
7018
|
children,
|
|
8269
|
-
expanded: t0
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
"expanded"
|
|
8273
|
-
]), $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
7019
|
+
expanded: t0,
|
|
7020
|
+
...restProps
|
|
7021
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
8274
7022
|
const expanded = t0 === void 0 ? !1 : t0, tree = useTree(), t1 = !expanded;
|
|
8275
7023
|
let t2;
|
|
8276
|
-
return $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.space ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Stack,
|
|
8277
|
-
})
|
|
8278
|
-
var __defProp = Object.defineProperty, __defProps = Object.defineProperties, __getOwnPropDescs = Object.getOwnPropertyDescriptors, __getOwnPropSymbols = Object.getOwnPropertySymbols, __hasOwnProp = Object.prototype.hasOwnProperty, __propIsEnum = Object.prototype.propertyIsEnumerable, __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value, __spreadValues = (a, b) => {
|
|
8279
|
-
for (var prop in b || (b = {}))
|
|
8280
|
-
__hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
|
|
8281
|
-
if (__getOwnPropSymbols)
|
|
8282
|
-
for (var prop of __getOwnPropSymbols(b))
|
|
8283
|
-
__propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
|
|
8284
|
-
return a;
|
|
8285
|
-
}, __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)), __objRest = (source, exclude) => {
|
|
8286
|
-
var target = {};
|
|
8287
|
-
for (var prop in source)
|
|
8288
|
-
__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
8289
|
-
if (source != null && __getOwnPropSymbols)
|
|
8290
|
-
for (var prop of __getOwnPropSymbols(source))
|
|
8291
|
-
exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop) && (target[prop] = source[prop]);
|
|
8292
|
-
return target;
|
|
8293
|
-
};
|
|
8294
|
-
const Root = react.memo(styledComponents.styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styledComponents.styled(Box).attrs({
|
|
7024
|
+
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;
|
|
7025
|
+
}), Root = react.memo(styledComponents.styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styledComponents.styled(Box).attrs({
|
|
8295
7026
|
forwardedAs: "a"
|
|
8296
7027
|
})(treeItemBoxStyle), ToggleArrowText = styledComponents.styled(Text)`
|
|
8297
7028
|
& > svg {
|
|
8298
7029
|
transition: transform 100ms;
|
|
8299
7030
|
}
|
|
8300
7031
|
`, TreeItem = react.memo(function(props) {
|
|
8301
|
-
const
|
|
7032
|
+
const {
|
|
8302
7033
|
children,
|
|
8303
7034
|
expanded: expandedProp = !1,
|
|
8304
7035
|
fontSize: fontSize2 = 1,
|
|
@@ -8312,28 +7043,15 @@ const Root = react.memo(styledComponents.styled.li(treeItemRootStyle, treeItemRo
|
|
|
8312
7043
|
selected = !1,
|
|
8313
7044
|
space = 2,
|
|
8314
7045
|
text,
|
|
8315
|
-
weight
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
"expanded",
|
|
8319
|
-
"fontSize",
|
|
8320
|
-
"href",
|
|
8321
|
-
"icon",
|
|
8322
|
-
"id",
|
|
8323
|
-
"linkAs",
|
|
8324
|
-
"muted",
|
|
8325
|
-
"onClick",
|
|
8326
|
-
"padding",
|
|
8327
|
-
"selected",
|
|
8328
|
-
"space",
|
|
8329
|
-
"text",
|
|
8330
|
-
"weight"
|
|
8331
|
-
]), rootRef = react.useRef(null), treeitemRef = react.useRef(null), tree = useTree(), {
|
|
7046
|
+
weight,
|
|
7047
|
+
...restProps
|
|
7048
|
+
} = props, rootRef = react.useRef(null), treeitemRef = react.useRef(null), tree = useTree(), {
|
|
8332
7049
|
path,
|
|
8333
7050
|
registerItem,
|
|
8334
7051
|
setExpanded,
|
|
8335
7052
|
setFocusedElement
|
|
8336
|
-
} = tree, _id = react.useId(), id = idProp || _id, itemPath = react.useMemo(() => path.concat([id || ""]), [id, path]), itemKey = itemPath.join("/"), itemState = tree.state[itemKey], focused = tree.focusedElement === rootRef.current, expanded =
|
|
7053
|
+
} = tree, _id = react.useId(), id = idProp || _id, itemPath = react.useMemo(() => path.concat([id || ""]), [id, path]), itemKey = itemPath.join("/"), itemState = tree.state[itemKey], focused = tree.focusedElement === rootRef.current, expanded = itemState?.expanded === void 0 ? expandedProp : itemState?.expanded || !1, tabIndex = tree.focusedElement && tree.focusedElement === rootRef.current ? 0 : -1, contextValue = react.useMemo(() => ({
|
|
7054
|
+
...tree,
|
|
8337
7055
|
level: tree.level + 1,
|
|
8338
7056
|
path: itemPath
|
|
8339
7057
|
}), [itemPath, tree]), handleClick = react.useCallback((event) => {
|
|
@@ -8341,10 +7059,7 @@ const Root = react.memo(styledComponents.styled.li(treeItemRootStyle, treeItemRo
|
|
|
8341
7059
|
const target = event.target;
|
|
8342
7060
|
target instanceof HTMLElement && (target.getAttribute("data-ui") === "TreeItem" || target.closest('[data-ui="TreeItem__box"]')) && (event.stopPropagation(), setExpanded(itemKey, !expanded), setFocusedElement(rootRef.current));
|
|
8343
7061
|
}, [expanded, itemKey, onClick, setExpanded, setFocusedElement]), handleKeyDown = react.useCallback((event_0) => {
|
|
8344
|
-
|
|
8345
|
-
const el = treeitemRef.current || rootRef.current;
|
|
8346
|
-
el == null || el.click();
|
|
8347
|
-
}
|
|
7062
|
+
focused && event_0.key === "Enter" && (treeitemRef.current || rootRef.current)?.click();
|
|
8348
7063
|
}, [focused]);
|
|
8349
7064
|
react.useEffect(() => {
|
|
8350
7065
|
if (rootRef.current)
|
|
@@ -8362,13 +7077,13 @@ const Root = react.memo(styledComponents.styled.li(treeItemRootStyle, treeItemRo
|
|
|
8362
7077
|
] }),
|
|
8363
7078
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { muted, size: fontSize2, textOverflow: "ellipsis", weight, children: text }) })
|
|
8364
7079
|
] });
|
|
8365
|
-
return href ? /* @__PURE__ */ jsxRuntime.jsxs(Root,
|
|
7080
|
+
return href ? /* @__PURE__ */ jsxRuntime.jsxs(Root, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...restProps, onClick: handleClick, ref: rootRef, role: "none", children: [
|
|
8366
7081
|
/* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, "aria-expanded": expanded, as: linkAs, "data-ui": "TreeItem__box", href, ref: treeitemRef, role: "treeitem", tabIndex, children: content }),
|
|
8367
7082
|
/* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { hidden: !expanded, children }) })
|
|
8368
|
-
] })
|
|
7083
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(Root, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...restProps, "aria-expanded": expanded, onClick: handleClick, onKeyDown: handleKeyDown, ref: rootRef, role: "treeitem", tabIndex, children: [
|
|
8369
7084
|
/* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, as: "div", "data-ui": "TreeItem__box", children: content }),
|
|
8370
7085
|
/* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { expanded, children }) })
|
|
8371
|
-
] })
|
|
7086
|
+
] });
|
|
8372
7087
|
});
|
|
8373
7088
|
TreeItem.displayName = "Memo(TreeItem)";
|
|
8374
7089
|
exports.Arrow = Arrow;
|