@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.esm.js
CHANGED
|
@@ -41,7 +41,7 @@ function rem(pixelValue) {
|
|
|
41
41
|
return pixelValue === 0 ? 0 : `${pixelValue / 16}rem`;
|
|
42
42
|
}
|
|
43
43
|
function _responsive(media, values, callback) {
|
|
44
|
-
return (
|
|
44
|
+
return (values?.map(callback) || []).map((statement, mediaIndex) => mediaIndex === 0 ? statement : {
|
|
45
45
|
[`@media screen and (min-width: ${media[mediaIndex - 1]}px)`]: statement
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -156,8 +156,8 @@ function responsiveTextFont(props) {
|
|
|
156
156
|
function useArrayProp(val, defaultVal) {
|
|
157
157
|
const $ = c(3);
|
|
158
158
|
let t0;
|
|
159
|
-
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val
|
|
160
|
-
const [t1, setCache] = useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val
|
|
159
|
+
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val ?? defaultVal)], $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2];
|
|
160
|
+
const [t1, setCache] = useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val ?? defaultVal);
|
|
161
161
|
return hash !== cachedHash && setCache([_getArrayProp(val, defaultVal), hash]), cachedVal;
|
|
162
162
|
}
|
|
163
163
|
function _getElements(element, elementsArg) {
|
|
@@ -216,7 +216,7 @@ function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
|
216
216
|
const target = evt.target;
|
|
217
217
|
if (!(target instanceof Node))
|
|
218
218
|
return;
|
|
219
|
-
const resolvedBoundaryElement = boundaryElement
|
|
219
|
+
const resolvedBoundaryElement = boundaryElement?.();
|
|
220
220
|
if (resolvedBoundaryElement && !resolvedBoundaryElement.contains(target))
|
|
221
221
|
return;
|
|
222
222
|
const elements = elementsArg().flat();
|
|
@@ -243,8 +243,7 @@ function useCustomValidity(ref, customValidity) {
|
|
|
243
243
|
const $ = c(6);
|
|
244
244
|
let t0;
|
|
245
245
|
$[0] !== customValidity || $[1] !== ref.current ? (t0 = () => {
|
|
246
|
-
|
|
247
|
-
(_a = ref.current) == null || _a.setCustomValidity(customValidity || "");
|
|
246
|
+
ref.current?.setCustomValidity(customValidity || "");
|
|
248
247
|
}, $[0] = customValidity, $[1] = ref.current, $[2] = t0) : t0 = $[2];
|
|
249
248
|
let t1;
|
|
250
249
|
$[3] !== customValidity || $[4] !== ref ? (t1 = [customValidity, ref], $[3] = customValidity, $[4] = ref, $[5] = t1) : t1 = $[5], useEffect(t0, t1);
|
|
@@ -305,7 +304,7 @@ var freeze = function(obj) {
|
|
|
305
304
|
var _a;
|
|
306
305
|
if (obj instanceof Element)
|
|
307
306
|
return !0;
|
|
308
|
-
var scope = (_a = obj
|
|
307
|
+
var scope = (_a = obj?.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
309
308
|
return !!(scope && obj instanceof scope.Element);
|
|
310
309
|
}, isReplacedElement = function(target) {
|
|
311
310
|
switch (target.tagName) {
|
|
@@ -581,8 +580,7 @@ function useElementSize(element) {
|
|
|
581
580
|
}, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1), size2;
|
|
582
581
|
}
|
|
583
582
|
function useElementRect(element) {
|
|
584
|
-
|
|
585
|
-
return (elementSize == null ? void 0 : elementSize._contentRect) || null;
|
|
583
|
+
return useElementSize(element)?._contentRect || null;
|
|
586
584
|
}
|
|
587
585
|
function useForwardedRef(ref) {
|
|
588
586
|
const $ = c(1), innerRef = useRef(null);
|
|
@@ -631,10 +629,9 @@ function createGlobalScopedContext(key2, defaultValue) {
|
|
|
631
629
|
}
|
|
632
630
|
const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
|
|
633
631
|
function ThemeProvider(props) {
|
|
634
|
-
var _a, _b, _c2;
|
|
635
632
|
const $ = c(15), parentTheme = useContext(ThemeContext), {
|
|
636
633
|
children
|
|
637
|
-
} = props, scheme =
|
|
634
|
+
} = props, scheme = props.scheme ?? (parentTheme?.scheme || "light"), rootTheme = props.theme ?? (parentTheme?.theme || null), tone = props.tone ?? (parentTheme?.tone || "default");
|
|
638
635
|
let t0;
|
|
639
636
|
bb0: {
|
|
640
637
|
if (!rootTheme) {
|
|
@@ -767,11 +764,10 @@ function responsiveBorderStyle() {
|
|
|
767
764
|
return [border, borderTop, borderRight, borderBottom, borderLeft];
|
|
768
765
|
}
|
|
769
766
|
function border(props) {
|
|
770
|
-
var _a, _b;
|
|
771
767
|
const {
|
|
772
768
|
card,
|
|
773
769
|
media
|
|
774
|
-
} = getTheme_v2(props.theme), borderStyle = `${
|
|
770
|
+
} = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
775
771
|
return _responsive(media, props.$border, (value) => value ? {
|
|
776
772
|
"&&": {
|
|
777
773
|
border: borderStyle
|
|
@@ -783,11 +779,10 @@ function border(props) {
|
|
|
783
779
|
});
|
|
784
780
|
}
|
|
785
781
|
function borderTop(props) {
|
|
786
|
-
var _a, _b;
|
|
787
782
|
const {
|
|
788
783
|
card,
|
|
789
784
|
media
|
|
790
|
-
} = getTheme_v2(props.theme), borderStyle = `${
|
|
785
|
+
} = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
791
786
|
return _responsive(media, props.$borderTop, (value) => value ? {
|
|
792
787
|
"&&": {
|
|
793
788
|
borderTop: borderStyle
|
|
@@ -799,11 +794,10 @@ function borderTop(props) {
|
|
|
799
794
|
});
|
|
800
795
|
}
|
|
801
796
|
function borderRight(props) {
|
|
802
|
-
var _a, _b;
|
|
803
797
|
const {
|
|
804
798
|
card,
|
|
805
799
|
media
|
|
806
|
-
} = getTheme_v2(props.theme), borderStyle = `${
|
|
800
|
+
} = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
807
801
|
return _responsive(media, props.$borderRight, (value) => value ? {
|
|
808
802
|
"&&": {
|
|
809
803
|
borderRight: borderStyle
|
|
@@ -815,11 +809,10 @@ function borderRight(props) {
|
|
|
815
809
|
});
|
|
816
810
|
}
|
|
817
811
|
function borderBottom(props) {
|
|
818
|
-
var _a, _b;
|
|
819
812
|
const {
|
|
820
813
|
card,
|
|
821
814
|
media
|
|
822
|
-
} = getTheme_v2(props.theme), borderStyle = `${
|
|
815
|
+
} = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
823
816
|
return _responsive(media, props.$borderBottom, (value) => value ? {
|
|
824
817
|
"&&": {
|
|
825
818
|
borderBottom: borderStyle
|
|
@@ -831,11 +824,10 @@ function borderBottom(props) {
|
|
|
831
824
|
});
|
|
832
825
|
}
|
|
833
826
|
function borderLeft(props) {
|
|
834
|
-
var _a, _b;
|
|
835
827
|
const {
|
|
836
828
|
card,
|
|
837
829
|
media
|
|
838
|
-
} = getTheme_v2(props.theme), borderStyle = `${
|
|
830
|
+
} = getTheme_v2(props.theme), borderStyle = `${card.border?.width ?? 1}px solid var(--card-border-color)`;
|
|
839
831
|
return _responsive(media, props.$borderLeft, (value) => value ? {
|
|
840
832
|
"&&": {
|
|
841
833
|
borderLeft: borderStyle
|
|
@@ -1122,14 +1114,6 @@ function responsiveGridItemColumnEndStyle(props) {
|
|
|
1122
1114
|
gridColumnEnd: columnEnd
|
|
1123
1115
|
}));
|
|
1124
1116
|
}
|
|
1125
|
-
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) => {
|
|
1126
|
-
for (var prop in b || (b = {}))
|
|
1127
|
-
__hasOwnProp$Q.call(b, prop) && __defNormalProp$R(a, prop, b[prop]);
|
|
1128
|
-
if (__getOwnPropSymbols$Q)
|
|
1129
|
-
for (var prop of __getOwnPropSymbols$Q(b))
|
|
1130
|
-
__propIsEnum$Q.call(b, prop) && __defNormalProp$R(a, prop, b[prop]);
|
|
1131
|
-
return a;
|
|
1132
|
-
}, __spreadProps$P = (a, b) => __defProps$P(a, __getOwnPropDescs$P(b));
|
|
1133
1117
|
function responsiveInputPaddingStyle(props) {
|
|
1134
1118
|
const {
|
|
1135
1119
|
$fontSize,
|
|
@@ -1155,9 +1139,10 @@ function responsiveInputPaddingStyle(props) {
|
|
|
1155
1139
|
});
|
|
1156
1140
|
}
|
|
1157
1141
|
function responsiveInputPaddingIconRightStyle(props) {
|
|
1158
|
-
return responsiveInputPaddingStyle(
|
|
1142
|
+
return responsiveInputPaddingStyle({
|
|
1143
|
+
...props,
|
|
1159
1144
|
$iconRight: !0
|
|
1160
|
-
})
|
|
1145
|
+
});
|
|
1161
1146
|
}
|
|
1162
1147
|
const ROOT_STYLE = css`
|
|
1163
1148
|
&:not([hidden]) {
|
|
@@ -1480,22 +1465,6 @@ function labelBaseStyle(props) {
|
|
|
1480
1465
|
}
|
|
1481
1466
|
`;
|
|
1482
1467
|
}
|
|
1483
|
-
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) => {
|
|
1484
|
-
for (var prop in b || (b = {}))
|
|
1485
|
-
__hasOwnProp$P.call(b, prop) && __defNormalProp$Q(a, prop, b[prop]);
|
|
1486
|
-
if (__getOwnPropSymbols$P)
|
|
1487
|
-
for (var prop of __getOwnPropSymbols$P(b))
|
|
1488
|
-
__propIsEnum$P.call(b, prop) && __defNormalProp$Q(a, prop, b[prop]);
|
|
1489
|
-
return a;
|
|
1490
|
-
}, __spreadProps$O = (a, b) => __defProps$O(a, __getOwnPropDescs$O(b)), __objRest$J = (source, exclude) => {
|
|
1491
|
-
var target = {};
|
|
1492
|
-
for (var prop in source)
|
|
1493
|
-
__hasOwnProp$P.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1494
|
-
if (source != null && __getOwnPropSymbols$P)
|
|
1495
|
-
for (var prop of __getOwnPropSymbols$P(source))
|
|
1496
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$P.call(source, prop) && (target[prop] = source[prop]);
|
|
1497
|
-
return target;
|
|
1498
|
-
};
|
|
1499
1468
|
const Root$C = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), SpanWithTextOverflow$2 = styled.span`
|
|
1500
1469
|
display: block;
|
|
1501
1470
|
white-space: nowrap;
|
|
@@ -1503,26 +1472,18 @@ const Root$C = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBa
|
|
|
1503
1472
|
overflow: hidden;
|
|
1504
1473
|
overflow: clip;
|
|
1505
1474
|
`, Label = forwardRef(function(props, ref) {
|
|
1506
|
-
var _a;
|
|
1507
1475
|
const $ = c(22);
|
|
1508
1476
|
let accent, align, childrenProp, restProps, t0, t1, textOverflow, weight;
|
|
1509
|
-
$[0] !== props ? (
|
|
1477
|
+
$[0] !== props ? ({
|
|
1510
1478
|
accent,
|
|
1511
1479
|
align,
|
|
1512
1480
|
children: childrenProp,
|
|
1513
1481
|
muted: t0,
|
|
1514
1482
|
size: t1,
|
|
1515
1483
|
textOverflow,
|
|
1516
|
-
weight
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
"align",
|
|
1520
|
-
"children",
|
|
1521
|
-
"muted",
|
|
1522
|
-
"size",
|
|
1523
|
-
"textOverflow",
|
|
1524
|
-
"weight"
|
|
1525
|
-
]), $[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]);
|
|
1484
|
+
weight,
|
|
1485
|
+
...restProps
|
|
1486
|
+
} = 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]);
|
|
1526
1487
|
const muted = t0 === void 0 ? !1 : t0, size2 = t1 === void 0 ? 2 : t1;
|
|
1527
1488
|
let children = childrenProp;
|
|
1528
1489
|
if (textOverflow === "ellipsis") {
|
|
@@ -1534,7 +1495,7 @@ const Root$C = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBa
|
|
|
1534
1495
|
}
|
|
1535
1496
|
const t2 = useArrayProp(align), t3 = useArrayProp(size2);
|
|
1536
1497
|
let t4;
|
|
1537
|
-
return $[13] !== accent || $[14] !== children || $[15] !== muted || $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== weight ? (t4 = /* @__PURE__ */ jsx(Root$C,
|
|
1498
|
+
return $[13] !== accent || $[14] !== children || $[15] !== muted || $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== weight ? (t4 = /* @__PURE__ */ 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;
|
|
1538
1499
|
});
|
|
1539
1500
|
Label.displayName = "ForwardRef(Label)";
|
|
1540
1501
|
const avatarStyle = {
|
|
@@ -1680,29 +1641,12 @@ function avatarStrokeStyle() {
|
|
|
1680
1641
|
}
|
|
1681
1642
|
};
|
|
1682
1643
|
}
|
|
1683
|
-
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) => {
|
|
1684
|
-
for (var prop in b || (b = {}))
|
|
1685
|
-
__hasOwnProp$O.call(b, prop) && __defNormalProp$P(a, prop, b[prop]);
|
|
1686
|
-
if (__getOwnPropSymbols$O)
|
|
1687
|
-
for (var prop of __getOwnPropSymbols$O(b))
|
|
1688
|
-
__propIsEnum$O.call(b, prop) && __defNormalProp$P(a, prop, b[prop]);
|
|
1689
|
-
return a;
|
|
1690
|
-
}, __spreadProps$N = (a, b) => __defProps$N(a, __getOwnPropDescs$N(b)), __objRest$I = (source, exclude) => {
|
|
1691
|
-
var target = {};
|
|
1692
|
-
for (var prop in source)
|
|
1693
|
-
__hasOwnProp$O.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1694
|
-
if (source != null && __getOwnPropSymbols$O)
|
|
1695
|
-
for (var prop of __getOwnPropSymbols$O(source))
|
|
1696
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$O.call(source, prop) && (target[prop] = source[prop]);
|
|
1697
|
-
return target;
|
|
1698
|
-
};
|
|
1699
1644
|
const Root$B = styled.div(responsiveAvatarSizeStyle, avatarStyle.root), Arrow$1 = styled.div(avatarStyle.arrow), BgStroke = styled.ellipse(avatarStyle.bgStroke), Stroke = styled.ellipse(avatarStyle.stroke), Initials = styled.div(avatarStyle.initials), InitialsLabel = styled(Label)({
|
|
1700
1645
|
color: "inherit"
|
|
1701
1646
|
}), Image = styled.svg(avatarStyle.image), Avatar = forwardRef(function(props, ref) {
|
|
1702
|
-
var _a;
|
|
1703
1647
|
const $ = c(52);
|
|
1704
1648
|
let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, restProps, src, t0, t1, t2, title;
|
|
1705
|
-
$[0] !== props ? (
|
|
1649
|
+
$[0] !== props ? ({
|
|
1706
1650
|
__unstable_hideInnerStroke,
|
|
1707
1651
|
as: asProp,
|
|
1708
1652
|
color: t0,
|
|
@@ -1713,20 +1657,9 @@ const Root$B = styled.div(responsiveAvatarSizeStyle, avatarStyle.root), Arrow$1
|
|
|
1713
1657
|
arrowPosition: arrowPositionProp,
|
|
1714
1658
|
animateArrowFrom,
|
|
1715
1659
|
status: t1,
|
|
1716
|
-
size: t2
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
"as",
|
|
1720
|
-
"color",
|
|
1721
|
-
"src",
|
|
1722
|
-
"title",
|
|
1723
|
-
"initials",
|
|
1724
|
-
"onImageLoadError",
|
|
1725
|
-
"arrowPosition",
|
|
1726
|
-
"animateArrowFrom",
|
|
1727
|
-
"status",
|
|
1728
|
-
"size"
|
|
1729
|
-
]), $[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]);
|
|
1660
|
+
size: t2,
|
|
1661
|
+
...restProps
|
|
1662
|
+
} = 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]);
|
|
1730
1663
|
const color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, {
|
|
1731
1664
|
avatar
|
|
1732
1665
|
} = useTheme_v2(), as = ReactIs.isValidElementType(asProp) ? asProp : "div", size2 = useArrayProp(sizeProp), _sizeRem = (avatar.sizes[size2[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = useId(), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = useState(!1), imageId = `avatar-image-${elementId}`;
|
|
@@ -1761,11 +1694,11 @@ const Root$B = styled.div(responsiveAvatarSizeStyle, avatarStyle.root), Arrow$1
|
|
|
1761
1694
|
let t13;
|
|
1762
1695
|
$[34] !== imageFailed || $[35] !== initials || $[36] !== initialsSize || $[37] !== src ? (t13 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Initials, { children: /* @__PURE__ */ jsx(InitialsLabel, { forwardedAs: "span", size: initialsSize, weight: "medium", children: initials }) }) }), $[34] = imageFailed, $[35] = initials, $[36] = initialsSize, $[37] = src, $[38] = t13) : t13 = $[38];
|
|
1763
1696
|
let t14;
|
|
1764
|
-
return $[39] !== arrowPosition || $[40] !== as || $[41] !== color || $[42] !== ref || $[43] !== restProps || $[44] !== size2 || $[45] !== status || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== title ? (t14 = /* @__PURE__ */ jsxs(Root$B,
|
|
1697
|
+
return $[39] !== arrowPosition || $[40] !== as || $[41] !== color || $[42] !== ref || $[43] !== restProps || $[44] !== size2 || $[45] !== status || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== title ? (t14 = /* @__PURE__ */ jsxs(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: [
|
|
1765
1698
|
t11,
|
|
1766
1699
|
t12,
|
|
1767
1700
|
t13
|
|
1768
|
-
] })
|
|
1701
|
+
] }), $[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;
|
|
1769
1702
|
});
|
|
1770
1703
|
Avatar.displayName = "ForwardRef(Avatar)";
|
|
1771
1704
|
function _temp$8(s) {
|
|
@@ -1824,22 +1757,6 @@ AvatarCounter.displayName = "ForwardRef(AvatarCounter)";
|
|
|
1824
1757
|
function _temp$7(s) {
|
|
1825
1758
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
1826
1759
|
}
|
|
1827
|
-
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) => {
|
|
1828
|
-
for (var prop in b || (b = {}))
|
|
1829
|
-
__hasOwnProp$N.call(b, prop) && __defNormalProp$O(a, prop, b[prop]);
|
|
1830
|
-
if (__getOwnPropSymbols$N)
|
|
1831
|
-
for (var prop of __getOwnPropSymbols$N(b))
|
|
1832
|
-
__propIsEnum$N.call(b, prop) && __defNormalProp$O(a, prop, b[prop]);
|
|
1833
|
-
return a;
|
|
1834
|
-
}, __spreadProps$M = (a, b) => __defProps$M(a, __getOwnPropDescs$M(b)), __objRest$H = (source, exclude) => {
|
|
1835
|
-
var target = {};
|
|
1836
|
-
for (var prop in source)
|
|
1837
|
-
__hasOwnProp$N.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1838
|
-
if (source != null && __getOwnPropSymbols$N)
|
|
1839
|
-
for (var prop of __getOwnPropSymbols$N(source))
|
|
1840
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$N.call(source, prop) && (target[prop] = source[prop]);
|
|
1841
|
-
return target;
|
|
1842
|
-
};
|
|
1843
1760
|
const BASE_STYLES = css`
|
|
1844
1761
|
white-space: nowrap;
|
|
1845
1762
|
|
|
@@ -1869,18 +1786,14 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
1869
1786
|
});
|
|
1870
1787
|
}
|
|
1871
1788
|
const Root$z = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = forwardRef(function(props, ref) {
|
|
1872
|
-
var _a;
|
|
1873
1789
|
const $ = c(15);
|
|
1874
1790
|
let childrenProp, restProps, t0, t1;
|
|
1875
|
-
$[0] !== props ? (
|
|
1791
|
+
$[0] !== props ? ({
|
|
1876
1792
|
children: childrenProp,
|
|
1877
1793
|
maxLength: t0,
|
|
1878
|
-
size: t1
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
"maxLength",
|
|
1882
|
-
"size"
|
|
1883
|
-
]), $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1) : (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]);
|
|
1794
|
+
size: t1,
|
|
1795
|
+
...restProps
|
|
1796
|
+
} = props, $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1) : (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]);
|
|
1884
1797
|
const maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = Root$z, t2 = "AvatarStack", t3 = len === 0 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: len, size: size2 }) }), t4 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(AvatarCounter, { count: extraCount, size: size2 }) });
|
|
1885
1798
|
let t5;
|
|
1886
1799
|
$[5] !== size2 ? (t5 = (child, childIndex) => /* @__PURE__ */ jsx("div", { children: cloneElement(child, {
|
|
@@ -1888,34 +1801,17 @@ const Root$z = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), Ava
|
|
|
1888
1801
|
}) }, String(childIndex)), $[5] = size2, $[6] = t5) : t5 = $[6];
|
|
1889
1802
|
const t6 = visibleChildren.map(t5);
|
|
1890
1803
|
let t7;
|
|
1891
|
-
return $[7] !== T0 || $[8] !== ref || $[9] !== restProps || $[10] !== size2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t6 ? (t7 = /* @__PURE__ */ jsxs(T0,
|
|
1804
|
+
return $[7] !== T0 || $[8] !== ref || $[9] !== restProps || $[10] !== size2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t6 ? (t7 = /* @__PURE__ */ jsxs(T0, { "data-ui": t2, ...restProps, ref, $size: size2, children: [
|
|
1892
1805
|
t3,
|
|
1893
1806
|
t4,
|
|
1894
1807
|
t6
|
|
1895
|
-
] })
|
|
1808
|
+
] }), $[7] = T0, $[8] = ref, $[9] = restProps, $[10] = size2, $[11] = t3, $[12] = t4, $[13] = t6, $[14] = t7) : t7 = $[14], t7;
|
|
1896
1809
|
});
|
|
1897
1810
|
AvatarStack.displayName = "ForwardRef(AvatarStack)";
|
|
1898
|
-
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) => {
|
|
1899
|
-
for (var prop in b || (b = {}))
|
|
1900
|
-
__hasOwnProp$M.call(b, prop) && __defNormalProp$N(a, prop, b[prop]);
|
|
1901
|
-
if (__getOwnPropSymbols$M)
|
|
1902
|
-
for (var prop of __getOwnPropSymbols$M(b))
|
|
1903
|
-
__propIsEnum$M.call(b, prop) && __defNormalProp$N(a, prop, b[prop]);
|
|
1904
|
-
return a;
|
|
1905
|
-
}, __spreadProps$L = (a, b) => __defProps$L(a, __getOwnPropDescs$L(b)), __objRest$G = (source, exclude) => {
|
|
1906
|
-
var target = {};
|
|
1907
|
-
for (var prop in source)
|
|
1908
|
-
__hasOwnProp$M.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1909
|
-
if (source != null && __getOwnPropSymbols$M)
|
|
1910
|
-
for (var prop of __getOwnPropSymbols$M(source))
|
|
1911
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$M.call(source, prop) && (target[prop] = source[prop]);
|
|
1912
|
-
return target;
|
|
1913
|
-
};
|
|
1914
1811
|
const Root$y = styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = forwardRef(function(props, ref) {
|
|
1915
|
-
var _a;
|
|
1916
1812
|
const $ = c(59);
|
|
1917
1813
|
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;
|
|
1918
|
-
$[0] !== props ? (
|
|
1814
|
+
$[0] !== props ? ({
|
|
1919
1815
|
as: t0,
|
|
1920
1816
|
column,
|
|
1921
1817
|
columnStart,
|
|
@@ -1941,38 +1837,12 @@ const Root$y = styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiv
|
|
|
1941
1837
|
row,
|
|
1942
1838
|
rowStart,
|
|
1943
1839
|
rowEnd,
|
|
1944
|
-
sizing
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
"column",
|
|
1948
|
-
"columnStart",
|
|
1949
|
-
"columnEnd",
|
|
1950
|
-
"display",
|
|
1951
|
-
"flex",
|
|
1952
|
-
"height",
|
|
1953
|
-
"margin",
|
|
1954
|
-
"marginX",
|
|
1955
|
-
"marginY",
|
|
1956
|
-
"marginTop",
|
|
1957
|
-
"marginRight",
|
|
1958
|
-
"marginBottom",
|
|
1959
|
-
"marginLeft",
|
|
1960
|
-
"overflow",
|
|
1961
|
-
"padding",
|
|
1962
|
-
"paddingX",
|
|
1963
|
-
"paddingY",
|
|
1964
|
-
"paddingTop",
|
|
1965
|
-
"paddingRight",
|
|
1966
|
-
"paddingBottom",
|
|
1967
|
-
"paddingLeft",
|
|
1968
|
-
"row",
|
|
1969
|
-
"rowStart",
|
|
1970
|
-
"rowEnd",
|
|
1971
|
-
"sizing"
|
|
1972
|
-
]), $[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]);
|
|
1840
|
+
sizing,
|
|
1841
|
+
...restProps
|
|
1842
|
+
} = 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]);
|
|
1973
1843
|
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);
|
|
1974
1844
|
let t30;
|
|
1975
|
-
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__ */ jsx(Root$y,
|
|
1845
|
+
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__ */ 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;
|
|
1976
1846
|
});
|
|
1977
1847
|
Box.displayName = "ForwardRef(Box)";
|
|
1978
1848
|
function textBaseStyle(props) {
|
|
@@ -2043,22 +1913,6 @@ function textBaseStyle(props) {
|
|
|
2043
1913
|
}
|
|
2044
1914
|
`;
|
|
2045
1915
|
}
|
|
2046
|
-
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) => {
|
|
2047
|
-
for (var prop in b || (b = {}))
|
|
2048
|
-
__hasOwnProp$L.call(b, prop) && __defNormalProp$M(a, prop, b[prop]);
|
|
2049
|
-
if (__getOwnPropSymbols$L)
|
|
2050
|
-
for (var prop of __getOwnPropSymbols$L(b))
|
|
2051
|
-
__propIsEnum$L.call(b, prop) && __defNormalProp$M(a, prop, b[prop]);
|
|
2052
|
-
return a;
|
|
2053
|
-
}, __spreadProps$K = (a, b) => __defProps$K(a, __getOwnPropDescs$K(b)), __objRest$F = (source, exclude) => {
|
|
2054
|
-
var target = {};
|
|
2055
|
-
for (var prop in source)
|
|
2056
|
-
__hasOwnProp$L.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2057
|
-
if (source != null && __getOwnPropSymbols$L)
|
|
2058
|
-
for (var prop of __getOwnPropSymbols$L(source))
|
|
2059
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$L.call(source, prop) && (target[prop] = source[prop]);
|
|
2060
|
-
return target;
|
|
2061
|
-
};
|
|
2062
1916
|
const Root$x = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), SpanWithTextOverflow$1 = styled.span`
|
|
2063
1917
|
display: block;
|
|
2064
1918
|
white-space: nowrap;
|
|
@@ -2066,26 +1920,18 @@ const Root$x = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBase
|
|
|
2066
1920
|
overflow: hidden;
|
|
2067
1921
|
overflow: clip;
|
|
2068
1922
|
`, Text = forwardRef(function(props, ref) {
|
|
2069
|
-
var _a;
|
|
2070
1923
|
const $ = c(22);
|
|
2071
1924
|
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
2072
|
-
$[0] !== props ? (
|
|
1925
|
+
$[0] !== props ? ({
|
|
2073
1926
|
accent: t0,
|
|
2074
1927
|
align,
|
|
2075
1928
|
children: childrenProp,
|
|
2076
1929
|
muted: t1,
|
|
2077
1930
|
size: t2,
|
|
2078
1931
|
textOverflow,
|
|
2079
|
-
weight
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
"align",
|
|
2083
|
-
"children",
|
|
2084
|
-
"muted",
|
|
2085
|
-
"size",
|
|
2086
|
-
"textOverflow",
|
|
2087
|
-
"weight"
|
|
2088
|
-
]), $[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]);
|
|
1932
|
+
weight,
|
|
1933
|
+
...restProps
|
|
1934
|
+
} = 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]);
|
|
2089
1935
|
const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
2090
1936
|
let children = childrenProp;
|
|
2091
1937
|
if (textOverflow === "ellipsis") {
|
|
@@ -2096,7 +1942,7 @@ const Root$x = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBase
|
|
|
2096
1942
|
let t5;
|
|
2097
1943
|
$[11] !== children ? (t5 = /* @__PURE__ */ jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
|
|
2098
1944
|
let t6;
|
|
2099
|
-
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsx(Root$x,
|
|
1945
|
+
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ 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;
|
|
2100
1946
|
});
|
|
2101
1947
|
Text.displayName = "ForwardRef(Text)";
|
|
2102
1948
|
function badgeStyle(props) {
|
|
@@ -2114,41 +1960,19 @@ function badgeStyle(props) {
|
|
|
2114
1960
|
}
|
|
2115
1961
|
};
|
|
2116
1962
|
}
|
|
2117
|
-
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) => {
|
|
2118
|
-
for (var prop in b || (b = {}))
|
|
2119
|
-
__hasOwnProp$K.call(b, prop) && __defNormalProp$L(a, prop, b[prop]);
|
|
2120
|
-
if (__getOwnPropSymbols$K)
|
|
2121
|
-
for (var prop of __getOwnPropSymbols$K(b))
|
|
2122
|
-
__propIsEnum$K.call(b, prop) && __defNormalProp$L(a, prop, b[prop]);
|
|
2123
|
-
return a;
|
|
2124
|
-
}, __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b)), __objRest$E = (source, exclude) => {
|
|
2125
|
-
var target = {};
|
|
2126
|
-
for (var prop in source)
|
|
2127
|
-
__hasOwnProp$K.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2128
|
-
if (source != null && __getOwnPropSymbols$K)
|
|
2129
|
-
for (var prop of __getOwnPropSymbols$K(source))
|
|
2130
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$K.call(source, prop) && (target[prop] = source[prop]);
|
|
2131
|
-
return target;
|
|
2132
|
-
};
|
|
2133
1963
|
const Root$w = styled(Box)(responsiveRadiusStyle, badgeStyle), Badge = forwardRef(function(props, ref) {
|
|
2134
1964
|
const $ = c(17);
|
|
2135
1965
|
let children, restProps, t0, t1, t2, t3;
|
|
2136
1966
|
if ($[0] !== props) {
|
|
2137
|
-
const
|
|
1967
|
+
const {
|
|
2138
1968
|
children: t42,
|
|
2139
1969
|
fontSize: t52,
|
|
2140
1970
|
mode: _deprecated_mode,
|
|
2141
1971
|
padding: t62,
|
|
2142
1972
|
radius: t72,
|
|
2143
|
-
tone: t8
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
"fontSize",
|
|
2147
|
-
"mode",
|
|
2148
|
-
"padding",
|
|
2149
|
-
"radius",
|
|
2150
|
-
"tone"
|
|
2151
|
-
]);
|
|
1973
|
+
tone: t8,
|
|
1974
|
+
...t9
|
|
1975
|
+
} = props;
|
|
2152
1976
|
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;
|
|
2153
1977
|
} else
|
|
2154
1978
|
children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5], t3 = $[6];
|
|
@@ -2156,57 +1980,26 @@ const Root$w = styled(Box)(responsiveRadiusStyle, badgeStyle), Badge = forwardRe
|
|
|
2156
1980
|
let t6;
|
|
2157
1981
|
$[7] !== children || $[8] !== fontSize2 ? (t6 = /* @__PURE__ */ jsx(Text, { size: fontSize2, children }), $[7] = children, $[8] = fontSize2, $[9] = t6) : t6 = $[9];
|
|
2158
1982
|
let t7;
|
|
2159
|
-
return $[10] !== ref || $[11] !== restProps || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== tone ? (t7 = /* @__PURE__ */ jsx(Root$w,
|
|
1983
|
+
return $[10] !== ref || $[11] !== restProps || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== tone ? (t7 = /* @__PURE__ */ 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;
|
|
2160
1984
|
});
|
|
2161
1985
|
Badge.displayName = "ForwardRef(Badge)";
|
|
2162
|
-
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) => {
|
|
2163
|
-
for (var prop in b || (b = {}))
|
|
2164
|
-
__hasOwnProp$J.call(b, prop) && __defNormalProp$K(a, prop, b[prop]);
|
|
2165
|
-
if (__getOwnPropSymbols$J)
|
|
2166
|
-
for (var prop of __getOwnPropSymbols$J(b))
|
|
2167
|
-
__propIsEnum$J.call(b, prop) && __defNormalProp$K(a, prop, b[prop]);
|
|
2168
|
-
return a;
|
|
2169
|
-
}, __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b)), __objRest$D = (source, exclude) => {
|
|
2170
|
-
var target = {};
|
|
2171
|
-
for (var prop in source)
|
|
2172
|
-
__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2173
|
-
if (source != null && __getOwnPropSymbols$J)
|
|
2174
|
-
for (var prop of __getOwnPropSymbols$J(source))
|
|
2175
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop) && (target[prop] = source[prop]);
|
|
2176
|
-
return target;
|
|
2177
|
-
};
|
|
2178
1986
|
const Root$v = styled(Box)(flexItemStyle, responsiveFlexStyle), Flex = forwardRef(function(props, ref) {
|
|
2179
|
-
var _a;
|
|
2180
1987
|
const $ = c(17);
|
|
2181
1988
|
let align, as, gap, justify, restProps, t0, wrap;
|
|
2182
|
-
$[0] !== props ? (
|
|
1989
|
+
$[0] !== props ? ({
|
|
2183
1990
|
align,
|
|
2184
1991
|
as,
|
|
2185
1992
|
direction: t0,
|
|
2186
1993
|
gap,
|
|
2187
1994
|
justify,
|
|
2188
|
-
wrap
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
"as",
|
|
2192
|
-
"direction",
|
|
2193
|
-
"gap",
|
|
2194
|
-
"justify",
|
|
2195
|
-
"wrap"
|
|
2196
|
-
]), $[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]);
|
|
1995
|
+
wrap,
|
|
1996
|
+
...restProps
|
|
1997
|
+
} = 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]);
|
|
2197
1998
|
const direction = t0 === void 0 ? "row" : t0, t1 = useArrayProp(align), t2 = useArrayProp(direction), t3 = useArrayProp(gap), t4 = useArrayProp(justify), t5 = useArrayProp(wrap);
|
|
2198
1999
|
let t6;
|
|
2199
|
-
return $[8] !== as || $[9] !== ref || $[10] !== restProps || $[11] !== t1 || $[12] !== t2 || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsx(Root$v,
|
|
2000
|
+
return $[8] !== as || $[9] !== ref || $[10] !== restProps || $[11] !== t1 || $[12] !== t2 || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ 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;
|
|
2200
2001
|
});
|
|
2201
2002
|
Flex.displayName = "ForwardRef(Flex)";
|
|
2202
|
-
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) => {
|
|
2203
|
-
for (var prop in b || (b = {}))
|
|
2204
|
-
__hasOwnProp$I.call(b, prop) && __defNormalProp$J(a, prop, b[prop]);
|
|
2205
|
-
if (__getOwnPropSymbols$I)
|
|
2206
|
-
for (var prop of __getOwnPropSymbols$I(b))
|
|
2207
|
-
__propIsEnum$I.call(b, prop) && __defNormalProp$J(a, prop, b[prop]);
|
|
2208
|
-
return a;
|
|
2209
|
-
}, __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
2210
2003
|
const rotate$1 = keyframes`
|
|
2211
2004
|
from {
|
|
2212
2005
|
transform: rotate(0deg);
|
|
@@ -2224,11 +2017,10 @@ const rotate$1 = keyframes`
|
|
|
2224
2017
|
let t0;
|
|
2225
2018
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx(SpinnerIcon, {}), $[0] = t0) : t0 = $[0];
|
|
2226
2019
|
let t1;
|
|
2227
|
-
return $[1] !== props || $[2] !== ref ? (t1 = /* @__PURE__ */ jsx(Root$u,
|
|
2020
|
+
return $[1] !== props || $[2] !== ref ? (t1 = /* @__PURE__ */ jsx(Root$u, { "data-ui": "Spinner", ...props, ref, children: t0 }), $[1] = props, $[2] = ref, $[3] = t1) : t1 = $[3], t1;
|
|
2228
2021
|
});
|
|
2229
2022
|
Spinner.displayName = "ForwardRef(Spinner)";
|
|
2230
2023
|
function _cardColorStyle(base, color, checkered = !1) {
|
|
2231
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2232
2024
|
return {
|
|
2233
2025
|
// from base
|
|
2234
2026
|
"--card-backdrop-color": base.backdrop,
|
|
@@ -2264,18 +2056,18 @@ function _cardColorStyle(base, color, checkered = !1) {
|
|
|
2264
2056
|
"--card-badge-default-dot-color": color.badge.default.dot,
|
|
2265
2057
|
"--card-badge-default-fg-color": color.badge.default.fg,
|
|
2266
2058
|
"--card-badge-default-icon-color": color.badge.default.icon,
|
|
2267
|
-
"--card-badge-neutral-bg-color":
|
|
2268
|
-
"--card-badge-neutral-dot-color":
|
|
2269
|
-
"--card-badge-neutral-fg-color":
|
|
2270
|
-
"--card-badge-neutral-icon-color":
|
|
2059
|
+
"--card-badge-neutral-bg-color": color.badge.neutral?.bg,
|
|
2060
|
+
"--card-badge-neutral-dot-color": color.badge.neutral?.dot,
|
|
2061
|
+
"--card-badge-neutral-fg-color": color.badge.neutral?.fg,
|
|
2062
|
+
"--card-badge-neutral-icon-color": color.badge.neutral?.icon,
|
|
2271
2063
|
"--card-badge-primary-bg-color": color.badge.primary.bg,
|
|
2272
2064
|
"--card-badge-primary-dot-color": color.badge.primary.dot,
|
|
2273
2065
|
"--card-badge-primary-fg-color": color.badge.primary.fg,
|
|
2274
2066
|
"--card-badge-primary-icon-color": color.badge.primary.icon,
|
|
2275
|
-
"--card-badge-suggest-bg-color":
|
|
2276
|
-
"--card-badge-suggest-dot-color":
|
|
2277
|
-
"--card-badge-suggest-fg-color":
|
|
2278
|
-
"--card-badge-suggest-icon-color":
|
|
2067
|
+
"--card-badge-suggest-bg-color": color.badge.suggest?.bg,
|
|
2068
|
+
"--card-badge-suggest-dot-color": color.badge.suggest?.dot,
|
|
2069
|
+
"--card-badge-suggest-fg-color": color.badge.suggest?.fg,
|
|
2070
|
+
"--card-badge-suggest-icon-color": color.badge.suggest?.icon,
|
|
2279
2071
|
"--card-badge-positive-bg-color": color.badge.positive.bg,
|
|
2280
2072
|
"--card-badge-positive-dot-color": color.badge.positive.dot,
|
|
2281
2073
|
"--card-badge-positive-fg-color": color.badge.positive.fg,
|
|
@@ -2314,7 +2106,7 @@ function buttonBaseStyles(props) {
|
|
|
2314
2106
|
style
|
|
2315
2107
|
} = getTheme_v2(props.theme);
|
|
2316
2108
|
return css`
|
|
2317
|
-
${style
|
|
2109
|
+
${style?.button};
|
|
2318
2110
|
|
|
2319
2111
|
-webkit-font-smoothing: inherit;
|
|
2320
2112
|
appearance: none;
|
|
@@ -2357,7 +2149,6 @@ function combineBoxShadow(...boxShadows) {
|
|
|
2357
2149
|
return boxShadows.filter(Boolean).join(",");
|
|
2358
2150
|
}
|
|
2359
2151
|
function buttonColorStyles(props) {
|
|
2360
|
-
var _a;
|
|
2361
2152
|
const {
|
|
2362
2153
|
$mode
|
|
2363
2154
|
} = props, {
|
|
@@ -2395,24 +2186,8 @@ function buttonColorStyles(props) {
|
|
|
2395
2186
|
},
|
|
2396
2187
|
"&[data-selected]": _cardColorStyle(baseColor, color.pressed)
|
|
2397
2188
|
}
|
|
2398
|
-
},
|
|
2399
|
-
}
|
|
2400
|
-
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) => {
|
|
2401
|
-
for (var prop in b || (b = {}))
|
|
2402
|
-
__hasOwnProp$H.call(b, prop) && __defNormalProp$I(a, prop, b[prop]);
|
|
2403
|
-
if (__getOwnPropSymbols$H)
|
|
2404
|
-
for (var prop of __getOwnPropSymbols$H(b))
|
|
2405
|
-
__propIsEnum$H.call(b, prop) && __defNormalProp$I(a, prop, b[prop]);
|
|
2406
|
-
return a;
|
|
2407
|
-
}, __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b)), __objRest$C = (source, exclude) => {
|
|
2408
|
-
var target = {};
|
|
2409
|
-
for (var prop in source)
|
|
2410
|
-
__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2411
|
-
if (source != null && __getOwnPropSymbols$H)
|
|
2412
|
-
for (var prop of __getOwnPropSymbols$H(source))
|
|
2413
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop) && (target[prop] = source[prop]);
|
|
2414
|
-
return target;
|
|
2415
|
-
};
|
|
2189
|
+
}, style?.button?.root].filter(Boolean);
|
|
2190
|
+
}
|
|
2416
2191
|
const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styled.div`
|
|
2417
2192
|
position: absolute;
|
|
2418
2193
|
top: 0;
|
|
@@ -2427,10 +2202,9 @@ const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColo
|
|
|
2427
2202
|
z-index: 1;
|
|
2428
2203
|
box-shadow: inherit;
|
|
2429
2204
|
`, Button = forwardRef(function(props, ref) {
|
|
2430
|
-
var _a;
|
|
2431
2205
|
const $ = c(64);
|
|
2432
2206
|
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;
|
|
2433
|
-
$[0] !== props ? (
|
|
2207
|
+
$[0] !== props ? ({
|
|
2434
2208
|
children,
|
|
2435
2209
|
disabled,
|
|
2436
2210
|
fontSize: t0,
|
|
@@ -2454,33 +2228,9 @@ const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColo
|
|
|
2454
2228
|
tone: t6,
|
|
2455
2229
|
type: t7,
|
|
2456
2230
|
muted: t8,
|
|
2457
|
-
width
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
"disabled",
|
|
2461
|
-
"fontSize",
|
|
2462
|
-
"icon",
|
|
2463
|
-
"iconRight",
|
|
2464
|
-
"justify",
|
|
2465
|
-
"loading",
|
|
2466
|
-
"mode",
|
|
2467
|
-
"padding",
|
|
2468
|
-
"paddingX",
|
|
2469
|
-
"paddingY",
|
|
2470
|
-
"paddingTop",
|
|
2471
|
-
"paddingBottom",
|
|
2472
|
-
"paddingLeft",
|
|
2473
|
-
"paddingRight",
|
|
2474
|
-
"radius",
|
|
2475
|
-
"selected",
|
|
2476
|
-
"space",
|
|
2477
|
-
"text",
|
|
2478
|
-
"textAlign",
|
|
2479
|
-
"tone",
|
|
2480
|
-
"type",
|
|
2481
|
-
"muted",
|
|
2482
|
-
"width"
|
|
2483
|
-
]), $[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]);
|
|
2231
|
+
width,
|
|
2232
|
+
...restProps
|
|
2233
|
+
} = 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]);
|
|
2484
2234
|
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, {
|
|
2485
2235
|
button
|
|
2486
2236
|
} = 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);
|
|
@@ -2498,7 +2248,7 @@ const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColo
|
|
|
2498
2248
|
let t14;
|
|
2499
2249
|
$[34] !== loading ? (t14 = !!loading && /* @__PURE__ */ jsx(LoadingBox, { children: /* @__PURE__ */ jsx(Spinner, {}) }), $[34] = loading, $[35] = t14) : t14 = $[35];
|
|
2500
2250
|
let t15;
|
|
2501
|
-
$[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__ */ jsx(Box,
|
|
2251
|
+
$[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__ */ jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxs(Flex, { as: "span", justify, gap: space, children: [
|
|
2502
2252
|
IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
|
|
2503
2253
|
isValidElement(IconComponent) && IconComponent,
|
|
2504
2254
|
isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
|
|
@@ -2508,15 +2258,15 @@ const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColo
|
|
|
2508
2258
|
isValidElement(IconRightComponent) && IconRightComponent,
|
|
2509
2259
|
isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
|
|
2510
2260
|
] })
|
|
2511
|
-
] }) })
|
|
2261
|
+
] }) }), $[36] = IconComponent, $[37] = IconRightComponent, $[38] = boxProps, $[39] = button, $[40] = fontSize2, $[41] = justify, $[42] = muted, $[43] = space, $[44] = text, $[45] = textAlign, $[46] = t15) : t15 = $[46];
|
|
2512
2262
|
let t16;
|
|
2513
|
-
$[47] !== boxProps || $[48] !== children ? (t16 = children && /* @__PURE__ */ jsx(Box,
|
|
2263
|
+
$[47] !== boxProps || $[48] !== children ? (t16 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...boxProps, children }), $[47] = boxProps, $[48] = children, $[49] = t16) : t16 = $[49];
|
|
2514
2264
|
let t17;
|
|
2515
|
-
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__ */ jsxs(Root$t,
|
|
2265
|
+
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__ */ 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: [
|
|
2516
2266
|
t14,
|
|
2517
2267
|
t15,
|
|
2518
2268
|
t16
|
|
2519
|
-
] })
|
|
2269
|
+
] }), $[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;
|
|
2520
2270
|
});
|
|
2521
2271
|
Button.displayName = "ForwardRef(Button)";
|
|
2522
2272
|
function cardStyle(props) {
|
|
@@ -2560,7 +2310,6 @@ function cardBaseStyle(props) {
|
|
|
2560
2310
|
`;
|
|
2561
2311
|
}
|
|
2562
2312
|
function cardColorStyle(props) {
|
|
2563
|
-
var _a;
|
|
2564
2313
|
const {
|
|
2565
2314
|
$checkered,
|
|
2566
2315
|
$focusRing,
|
|
@@ -2665,30 +2414,13 @@ function cardColorStyle(props) {
|
|
|
2665
2414
|
}
|
|
2666
2415
|
}
|
|
2667
2416
|
|
|
2668
|
-
${
|
|
2417
|
+
${style?.card?.root}
|
|
2669
2418
|
`;
|
|
2670
2419
|
}
|
|
2671
|
-
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) => {
|
|
2672
|
-
for (var prop in b || (b = {}))
|
|
2673
|
-
__hasOwnProp$G.call(b, prop) && __defNormalProp$H(a, prop, b[prop]);
|
|
2674
|
-
if (__getOwnPropSymbols$G)
|
|
2675
|
-
for (var prop of __getOwnPropSymbols$G(b))
|
|
2676
|
-
__propIsEnum$G.call(b, prop) && __defNormalProp$H(a, prop, b[prop]);
|
|
2677
|
-
return a;
|
|
2678
|
-
}, __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b)), __objRest$B = (source, exclude) => {
|
|
2679
|
-
var target = {};
|
|
2680
|
-
for (var prop in source)
|
|
2681
|
-
__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2682
|
-
if (source != null && __getOwnPropSymbols$G)
|
|
2683
|
-
for (var prop of __getOwnPropSymbols$G(source))
|
|
2684
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop) && (target[prop] = source[prop]);
|
|
2685
|
-
return target;
|
|
2686
|
-
};
|
|
2687
2420
|
const Root$s = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = forwardRef(function(props, ref) {
|
|
2688
|
-
var _a;
|
|
2689
2421
|
const $ = c(42);
|
|
2690
2422
|
let asProp, border2, borderBottom2, borderLeft2, borderRight2, borderTop2, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;
|
|
2691
|
-
$[0] !== props ? (
|
|
2423
|
+
$[0] !== props ? ({
|
|
2692
2424
|
__unstable_checkered: t0,
|
|
2693
2425
|
__unstable_focusRing: t1,
|
|
2694
2426
|
as: asProp,
|
|
@@ -2703,27 +2435,12 @@ const Root$s = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, respons
|
|
|
2703
2435
|
scheme,
|
|
2704
2436
|
selected,
|
|
2705
2437
|
shadow,
|
|
2706
|
-
tone: t3
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
"__unstable_focusRing",
|
|
2710
|
-
"as",
|
|
2711
|
-
"border",
|
|
2712
|
-
"borderTop",
|
|
2713
|
-
"borderRight",
|
|
2714
|
-
"borderBottom",
|
|
2715
|
-
"borderLeft",
|
|
2716
|
-
"muted",
|
|
2717
|
-
"pressed",
|
|
2718
|
-
"radius",
|
|
2719
|
-
"scheme",
|
|
2720
|
-
"selected",
|
|
2721
|
-
"shadow",
|
|
2722
|
-
"tone"
|
|
2723
|
-
]), $[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]);
|
|
2438
|
+
tone: t3,
|
|
2439
|
+
...restProps
|
|
2440
|
+
} = 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]);
|
|
2724
2441
|
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 = 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;
|
|
2725
2442
|
let t16;
|
|
2726
|
-
$[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__ */ jsx(Root$s,
|
|
2443
|
+
$[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__ */ 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];
|
|
2727
2444
|
let t17;
|
|
2728
2445
|
return $[38] !== scheme || $[39] !== t16 || $[40] !== tone ? (t17 = /* @__PURE__ */ jsx(ThemeColorProvider, { scheme, tone, children: t16 }), $[38] = scheme, $[39] = t16, $[40] = tone, $[41] = t17) : t17 = $[41], t17;
|
|
2729
2446
|
});
|
|
@@ -2866,43 +2583,19 @@ function inputElementStyles(props) {
|
|
|
2866
2583
|
}
|
|
2867
2584
|
`;
|
|
2868
2585
|
}
|
|
2869
|
-
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) => {
|
|
2870
|
-
for (var prop in b || (b = {}))
|
|
2871
|
-
__hasOwnProp$F.call(b, prop) && __defNormalProp$G(a, prop, b[prop]);
|
|
2872
|
-
if (__getOwnPropSymbols$F)
|
|
2873
|
-
for (var prop of __getOwnPropSymbols$F(b))
|
|
2874
|
-
__propIsEnum$F.call(b, prop) && __defNormalProp$G(a, prop, b[prop]);
|
|
2875
|
-
return a;
|
|
2876
|
-
}, __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b)), __objRest$A = (source, exclude) => {
|
|
2877
|
-
var target = {};
|
|
2878
|
-
for (var prop in source)
|
|
2879
|
-
__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2880
|
-
if (source != null && __getOwnPropSymbols$F)
|
|
2881
|
-
for (var prop of __getOwnPropSymbols$F(source))
|
|
2882
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop) && (target[prop] = source[prop]);
|
|
2883
|
-
return target;
|
|
2884
|
-
};
|
|
2885
2586
|
const Root$r = styled.div(checkboxBaseStyles), Input$5 = styled.input(inputElementStyles), Checkbox = forwardRef(function(props, forwardedRef) {
|
|
2886
|
-
var _a;
|
|
2887
2587
|
const $ = c(25);
|
|
2888
2588
|
let checked, className, customValidity, disabled, indeterminate, readOnly, restProps, style;
|
|
2889
|
-
$[0] !== props ? (
|
|
2589
|
+
$[0] !== props ? ({
|
|
2890
2590
|
checked,
|
|
2891
2591
|
className,
|
|
2892
2592
|
disabled,
|
|
2893
2593
|
indeterminate,
|
|
2894
2594
|
customValidity,
|
|
2895
2595
|
readOnly,
|
|
2896
|
-
style
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
"className",
|
|
2900
|
-
"disabled",
|
|
2901
|
-
"indeterminate",
|
|
2902
|
-
"customValidity",
|
|
2903
|
-
"readOnly",
|
|
2904
|
-
"style"
|
|
2905
|
-
]), $[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]);
|
|
2596
|
+
style,
|
|
2597
|
+
...restProps
|
|
2598
|
+
} = 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]);
|
|
2906
2599
|
const ref = useRef(null);
|
|
2907
2600
|
let t0;
|
|
2908
2601
|
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[9] = t0) : t0 = $[9], useImperativeHandle(forwardedRef, t0);
|
|
@@ -2912,7 +2605,7 @@ const Root$r = styled.div(checkboxBaseStyles), Input$5 = styled.input(inputEleme
|
|
|
2912
2605
|
}, t2 = [indeterminate], $[10] = indeterminate, $[11] = t1, $[12] = t2) : (t1 = $[11], t2 = $[12]), useEffect(t1, t2), useCustomValidity(ref, customValidity);
|
|
2913
2606
|
const t3 = !disabled && readOnly ? "" : void 0, t4 = customValidity ? "" : void 0, t5 = disabled || readOnly;
|
|
2914
2607
|
let t6;
|
|
2915
|
-
$[13] !== checked || $[14] !== readOnly || $[15] !== restProps || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsx(Input$5,
|
|
2608
|
+
$[13] !== checked || $[14] !== readOnly || $[15] !== restProps || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ 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];
|
|
2916
2609
|
let t7;
|
|
2917
2610
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxs("span", { children: [
|
|
2918
2611
|
/* @__PURE__ */ jsx(CheckmarkIcon, {}),
|
|
@@ -3073,37 +2766,16 @@ function codeBaseStyle() {
|
|
|
3073
2766
|
}
|
|
3074
2767
|
`;
|
|
3075
2768
|
}
|
|
3076
|
-
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) => {
|
|
3077
|
-
for (var prop in b || (b = {}))
|
|
3078
|
-
__hasOwnProp$E.call(b, prop) && __defNormalProp$F(a, prop, b[prop]);
|
|
3079
|
-
if (__getOwnPropSymbols$E)
|
|
3080
|
-
for (var prop of __getOwnPropSymbols$E(b))
|
|
3081
|
-
__propIsEnum$E.call(b, prop) && __defNormalProp$F(a, prop, b[prop]);
|
|
3082
|
-
return a;
|
|
3083
|
-
}, __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b)), __objRest$z = (source, exclude) => {
|
|
3084
|
-
var target = {};
|
|
3085
|
-
for (var prop in source)
|
|
3086
|
-
__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3087
|
-
if (source != null && __getOwnPropSymbols$E)
|
|
3088
|
-
for (var prop of __getOwnPropSymbols$E(source))
|
|
3089
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop) && (target[prop] = source[prop]);
|
|
3090
|
-
return target;
|
|
3091
|
-
};
|
|
3092
2769
|
const Root$q = styled.pre(codeBaseStyle, responsiveCodeFontStyle), Code = forwardRef(function(props, ref) {
|
|
3093
|
-
var _a;
|
|
3094
2770
|
const $ = c(23);
|
|
3095
2771
|
let children, languageProp, restProps, t0, weight;
|
|
3096
|
-
$[0] !== props ? (
|
|
2772
|
+
$[0] !== props ? ({
|
|
3097
2773
|
children,
|
|
3098
2774
|
language: languageProp,
|
|
3099
2775
|
size: t0,
|
|
3100
|
-
weight
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
"language",
|
|
3104
|
-
"size",
|
|
3105
|
-
"weight"
|
|
3106
|
-
]), $[0] = props, $[1] = children, $[2] = languageProp, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], languageProp = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
|
|
2776
|
+
weight,
|
|
2777
|
+
...restProps
|
|
2778
|
+
} = props, $[0] = props, $[1] = children, $[2] = languageProp, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], languageProp = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
|
|
3107
2779
|
const size2 = t0 === void 0 ? 2 : t0, language = typeof languageProp == "string" ? languageProp : void 0;
|
|
3108
2780
|
let t1;
|
|
3109
2781
|
$[6] !== language ? (t1 = language ? Refractor.hasLanguage(language) : !1, $[6] = language, $[7] = t1) : t1 = $[7];
|
|
@@ -3113,10 +2785,10 @@ const Root$q = styled.pre(codeBaseStyle, responsiveCodeFontStyle), Code = forwar
|
|
|
3113
2785
|
let t4;
|
|
3114
2786
|
$[12] !== children || $[13] !== language || $[14] !== registered ? (t4 = language && registered && /* @__PURE__ */ jsx(Refractor, { inline: !0, language, value: String(children) }), $[12] = children, $[13] = language, $[14] = registered, $[15] = t4) : t4 = $[15];
|
|
3115
2787
|
let t5;
|
|
3116
|
-
return $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== weight ? (t5 = /* @__PURE__ */ jsxs(Root$q,
|
|
2788
|
+
return $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== weight ? (t5 = /* @__PURE__ */ jsxs(Root$q, { "data-ui": "Code", ...restProps, $size: t2, $weight: weight, ref, children: [
|
|
3117
2789
|
t3,
|
|
3118
2790
|
t4
|
|
3119
|
-
] })
|
|
2791
|
+
] }), $[16] = ref, $[17] = restProps, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = weight, $[22] = t5) : t5 = $[22], t5;
|
|
3120
2792
|
});
|
|
3121
2793
|
Code.displayName = "ForwardRef(Code)";
|
|
3122
2794
|
const BASE_STYLE$1 = {
|
|
@@ -3135,59 +2807,23 @@ function responsiveContainerWidthStyle(props) {
|
|
|
3135
2807
|
maxWidth: val === "auto" ? "none" : rem(container[val])
|
|
3136
2808
|
}));
|
|
3137
2809
|
}
|
|
3138
|
-
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) => {
|
|
3139
|
-
for (var prop in b || (b = {}))
|
|
3140
|
-
__hasOwnProp$D.call(b, prop) && __defNormalProp$E(a, prop, b[prop]);
|
|
3141
|
-
if (__getOwnPropSymbols$D)
|
|
3142
|
-
for (var prop of __getOwnPropSymbols$D(b))
|
|
3143
|
-
__propIsEnum$D.call(b, prop) && __defNormalProp$E(a, prop, b[prop]);
|
|
3144
|
-
return a;
|
|
3145
|
-
}, __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b)), __objRest$y = (source, exclude) => {
|
|
3146
|
-
var target = {};
|
|
3147
|
-
for (var prop in source)
|
|
3148
|
-
__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3149
|
-
if (source != null && __getOwnPropSymbols$D)
|
|
3150
|
-
for (var prop of __getOwnPropSymbols$D(source))
|
|
3151
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop) && (target[prop] = source[prop]);
|
|
3152
|
-
return target;
|
|
3153
|
-
};
|
|
3154
2810
|
const Root$p = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle), Container = forwardRef(function(props, ref) {
|
|
3155
|
-
var _a;
|
|
3156
2811
|
const $ = c(9);
|
|
3157
2812
|
let as, restProps, t0;
|
|
3158
|
-
$[0] !== props ? (
|
|
2813
|
+
$[0] !== props ? ({
|
|
3159
2814
|
as,
|
|
3160
|
-
width: t0
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
"width"
|
|
3164
|
-
]), $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
|
|
2815
|
+
width: t0,
|
|
2816
|
+
...restProps
|
|
2817
|
+
} = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
|
|
3165
2818
|
const t1 = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
3166
2819
|
let t2;
|
|
3167
|
-
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t1 ? (t2 = /* @__PURE__ */ jsx(Root$p,
|
|
2820
|
+
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t1 ? (t2 = /* @__PURE__ */ 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;
|
|
3168
2821
|
});
|
|
3169
2822
|
Container.displayName = "ForwardRef(Container)";
|
|
3170
|
-
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) => {
|
|
3171
|
-
for (var prop in b || (b = {}))
|
|
3172
|
-
__hasOwnProp$C.call(b, prop) && __defNormalProp$D(a, prop, b[prop]);
|
|
3173
|
-
if (__getOwnPropSymbols$C)
|
|
3174
|
-
for (var prop of __getOwnPropSymbols$C(b))
|
|
3175
|
-
__propIsEnum$C.call(b, prop) && __defNormalProp$D(a, prop, b[prop]);
|
|
3176
|
-
return a;
|
|
3177
|
-
}, __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b)), __objRest$x = (source, exclude) => {
|
|
3178
|
-
var target = {};
|
|
3179
|
-
for (var prop in source)
|
|
3180
|
-
__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3181
|
-
if (source != null && __getOwnPropSymbols$C)
|
|
3182
|
-
for (var prop of __getOwnPropSymbols$C(source))
|
|
3183
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop) && (target[prop] = source[prop]);
|
|
3184
|
-
return target;
|
|
3185
|
-
};
|
|
3186
2823
|
const Root$o = styled(Box)(responsiveGridStyle), Grid = forwardRef(function(props, ref) {
|
|
3187
|
-
var _a;
|
|
3188
2824
|
const $ = c(26);
|
|
3189
2825
|
let as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, restProps, rows;
|
|
3190
|
-
$[0] !== props ? (
|
|
2826
|
+
$[0] !== props ? ({
|
|
3191
2827
|
as,
|
|
3192
2828
|
autoRows,
|
|
3193
2829
|
autoCols,
|
|
@@ -3197,22 +2833,12 @@ const Root$o = styled(Box)(responsiveGridStyle), Grid = forwardRef(function(prop
|
|
|
3197
2833
|
gapX,
|
|
3198
2834
|
gapY,
|
|
3199
2835
|
rows,
|
|
3200
|
-
children
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
"autoRows",
|
|
3204
|
-
"autoCols",
|
|
3205
|
-
"autoFlow",
|
|
3206
|
-
"columns",
|
|
3207
|
-
"gap",
|
|
3208
|
-
"gapX",
|
|
3209
|
-
"gapY",
|
|
3210
|
-
"rows",
|
|
3211
|
-
"children"
|
|
3212
|
-
]), $[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]);
|
|
2836
|
+
children,
|
|
2837
|
+
...restProps
|
|
2838
|
+
} = 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]);
|
|
3213
2839
|
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);
|
|
3214
2840
|
let t9;
|
|
3215
|
-
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__ */ jsx(Root$o,
|
|
2841
|
+
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__ */ 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;
|
|
3216
2842
|
});
|
|
3217
2843
|
Grid.displayName = "ForwardRef(Grid)";
|
|
3218
2844
|
function headingBaseStyle(props) {
|
|
@@ -3274,22 +2900,6 @@ function headingBaseStyle(props) {
|
|
|
3274
2900
|
}
|
|
3275
2901
|
`;
|
|
3276
2902
|
}
|
|
3277
|
-
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) => {
|
|
3278
|
-
for (var prop in b || (b = {}))
|
|
3279
|
-
__hasOwnProp$B.call(b, prop) && __defNormalProp$C(a, prop, b[prop]);
|
|
3280
|
-
if (__getOwnPropSymbols$B)
|
|
3281
|
-
for (var prop of __getOwnPropSymbols$B(b))
|
|
3282
|
-
__propIsEnum$B.call(b, prop) && __defNormalProp$C(a, prop, b[prop]);
|
|
3283
|
-
return a;
|
|
3284
|
-
}, __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b)), __objRest$w = (source, exclude) => {
|
|
3285
|
-
var target = {};
|
|
3286
|
-
for (var prop in source)
|
|
3287
|
-
__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3288
|
-
if (source != null && __getOwnPropSymbols$B)
|
|
3289
|
-
for (var prop of __getOwnPropSymbols$B(source))
|
|
3290
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop) && (target[prop] = source[prop]);
|
|
3291
|
-
return target;
|
|
3292
|
-
};
|
|
3293
2903
|
const Root$n = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), SpanWithTextOverflow = styled.span`
|
|
3294
2904
|
display: block;
|
|
3295
2905
|
white-space: nowrap;
|
|
@@ -3297,26 +2907,18 @@ const Root$n = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsive
|
|
|
3297
2907
|
overflow: hidden;
|
|
3298
2908
|
overflow: clip;
|
|
3299
2909
|
`, Heading = forwardRef(function(props, ref) {
|
|
3300
|
-
var _a;
|
|
3301
2910
|
const $ = c(22);
|
|
3302
2911
|
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
3303
|
-
$[0] !== props ? (
|
|
2912
|
+
$[0] !== props ? ({
|
|
3304
2913
|
accent: t0,
|
|
3305
2914
|
align,
|
|
3306
2915
|
children: childrenProp,
|
|
3307
2916
|
muted: t1,
|
|
3308
2917
|
size: t2,
|
|
3309
2918
|
textOverflow,
|
|
3310
|
-
weight
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
"align",
|
|
3314
|
-
"children",
|
|
3315
|
-
"muted",
|
|
3316
|
-
"size",
|
|
3317
|
-
"textOverflow",
|
|
3318
|
-
"weight"
|
|
3319
|
-
]), $[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]);
|
|
2919
|
+
weight,
|
|
2920
|
+
...restProps
|
|
2921
|
+
} = 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]);
|
|
3320
2922
|
const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
3321
2923
|
let children = childrenProp;
|
|
3322
2924
|
if (textOverflow === "ellipsis") {
|
|
@@ -3327,7 +2929,7 @@ const Root$n = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsive
|
|
|
3327
2929
|
let t5;
|
|
3328
2930
|
$[11] !== children ? (t5 = /* @__PURE__ */ jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
|
|
3329
2931
|
let t6;
|
|
3330
|
-
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsx(Root$n,
|
|
2932
|
+
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ 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;
|
|
3331
2933
|
});
|
|
3332
2934
|
Heading.displayName = "ForwardRef(Heading)";
|
|
3333
2935
|
function inlineBaseStyle() {
|
|
@@ -3357,61 +2959,25 @@ function inlineSpaceStyle(props) {
|
|
|
3357
2959
|
};
|
|
3358
2960
|
});
|
|
3359
2961
|
}
|
|
3360
|
-
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) => {
|
|
3361
|
-
for (var prop in b || (b = {}))
|
|
3362
|
-
__hasOwnProp$A.call(b, prop) && __defNormalProp$B(a, prop, b[prop]);
|
|
3363
|
-
if (__getOwnPropSymbols$A)
|
|
3364
|
-
for (var prop of __getOwnPropSymbols$A(b))
|
|
3365
|
-
__propIsEnum$A.call(b, prop) && __defNormalProp$B(a, prop, b[prop]);
|
|
3366
|
-
return a;
|
|
3367
|
-
}, __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b)), __objRest$v = (source, exclude) => {
|
|
3368
|
-
var target = {};
|
|
3369
|
-
for (var prop in source)
|
|
3370
|
-
__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3371
|
-
if (source != null && __getOwnPropSymbols$A)
|
|
3372
|
-
for (var prop of __getOwnPropSymbols$A(source))
|
|
3373
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop) && (target[prop] = source[prop]);
|
|
3374
|
-
return target;
|
|
3375
|
-
};
|
|
3376
2962
|
const Root$m = styled(Box)(inlineBaseStyle, inlineSpaceStyle), Inline = forwardRef(function(props, ref) {
|
|
3377
|
-
var _a;
|
|
3378
2963
|
const $ = c(12);
|
|
3379
2964
|
let as, childrenProp, restProps, space;
|
|
3380
|
-
$[0] !== props ? (
|
|
2965
|
+
$[0] !== props ? ({
|
|
3381
2966
|
as,
|
|
3382
2967
|
children: childrenProp,
|
|
3383
|
-
space
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
"children",
|
|
3387
|
-
"space"
|
|
3388
|
-
]), $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = restProps, $[4] = space) : (as = $[1], childrenProp = $[2], restProps = $[3], space = $[4]);
|
|
2968
|
+
space,
|
|
2969
|
+
...restProps
|
|
2970
|
+
} = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = restProps, $[4] = space) : (as = $[1], childrenProp = $[2], restProps = $[3], space = $[4]);
|
|
3389
2971
|
let t0, t1;
|
|
3390
2972
|
$[5] !== childrenProp ? (t1 = Children.map(childrenProp, _temp$6), $[5] = childrenProp, $[6] = t1) : t1 = $[6], t0 = t1;
|
|
3391
2973
|
const children = t0, t2 = useArrayProp(space);
|
|
3392
2974
|
let t3;
|
|
3393
|
-
return $[7] !== as || $[8] !== children || $[9] !== restProps || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsx(Root$m,
|
|
2975
|
+
return $[7] !== as || $[8] !== children || $[9] !== restProps || $[10] !== t2 ? (t3 = /* @__PURE__ */ 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;
|
|
3394
2976
|
});
|
|
3395
2977
|
Inline.displayName = "ForwardRef(Inline)";
|
|
3396
2978
|
function _temp$6(child) {
|
|
3397
2979
|
return child && /* @__PURE__ */ jsx("div", { children: child });
|
|
3398
2980
|
}
|
|
3399
|
-
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) => {
|
|
3400
|
-
for (var prop in b || (b = {}))
|
|
3401
|
-
__hasOwnProp$z.call(b, prop) && __defNormalProp$A(a, prop, b[prop]);
|
|
3402
|
-
if (__getOwnPropSymbols$z)
|
|
3403
|
-
for (var prop of __getOwnPropSymbols$z(b))
|
|
3404
|
-
__propIsEnum$z.call(b, prop) && __defNormalProp$A(a, prop, b[prop]);
|
|
3405
|
-
return a;
|
|
3406
|
-
}, __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b)), __objRest$u = (source, exclude) => {
|
|
3407
|
-
var target = {};
|
|
3408
|
-
for (var prop in source)
|
|
3409
|
-
__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3410
|
-
if (source != null && __getOwnPropSymbols$z)
|
|
3411
|
-
for (var prop of __getOwnPropSymbols$z(source))
|
|
3412
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop) && (target[prop] = source[prop]);
|
|
3413
|
-
return target;
|
|
3414
|
-
};
|
|
3415
2981
|
function kbdStyle() {
|
|
3416
2982
|
return css`
|
|
3417
2983
|
--card-bg-color: var(--card-kbd-bg-color);
|
|
@@ -3430,27 +2996,22 @@ function kbdStyle() {
|
|
|
3430
2996
|
`;
|
|
3431
2997
|
}
|
|
3432
2998
|
const Root$l = styled.kbd(responsiveRadiusStyle, kbdStyle), KBD = forwardRef(function(props, ref) {
|
|
3433
|
-
var _a;
|
|
3434
2999
|
const $ = c(17);
|
|
3435
3000
|
let children, restProps, t0, t1, t2;
|
|
3436
|
-
$[0] !== props ? (
|
|
3001
|
+
$[0] !== props ? ({
|
|
3437
3002
|
children,
|
|
3438
3003
|
fontSize: t0,
|
|
3439
3004
|
padding: t1,
|
|
3440
|
-
radius: t2
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
"fontSize",
|
|
3444
|
-
"padding",
|
|
3445
|
-
"radius"
|
|
3446
|
-
]), $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2) : (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]);
|
|
3005
|
+
radius: t2,
|
|
3006
|
+
...restProps
|
|
3007
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2) : (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]);
|
|
3447
3008
|
const fontSize2 = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, t3 = useArrayProp(t2 === void 0 ? 2 : t2);
|
|
3448
3009
|
let t4;
|
|
3449
3010
|
$[6] !== children || $[7] !== fontSize2 ? (t4 = /* @__PURE__ */ jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }), $[6] = children, $[7] = fontSize2, $[8] = t4) : t4 = $[8];
|
|
3450
3011
|
let t5;
|
|
3451
3012
|
$[9] !== padding || $[10] !== t4 ? (t5 = /* @__PURE__ */ jsx(Box, { as: "span", padding, children: t4 }), $[9] = padding, $[10] = t4, $[11] = t5) : t5 = $[11];
|
|
3452
3013
|
let t6;
|
|
3453
|
-
return $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsx(Root$l,
|
|
3014
|
+
return $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t5 ? (t6 = /* @__PURE__ */ 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;
|
|
3454
3015
|
});
|
|
3455
3016
|
KBD.displayName = "ForwardRef(KBD)";
|
|
3456
3017
|
const origin = {
|
|
@@ -3460,8 +3021,7 @@ const origin = {
|
|
|
3460
3021
|
placement,
|
|
3461
3022
|
rects
|
|
3462
3023
|
}) {
|
|
3463
|
-
|
|
3464
|
-
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;
|
|
3024
|
+
const [side] = placement.split("-"), floatingWidth = rects.floating.width, floatingHeight = rects.floating.height, shiftX = middlewareData.shift?.x || 0, shiftY = middlewareData.shift?.y || 0;
|
|
3465
3025
|
if (floatingWidth <= 0 || floatingHeight <= 0)
|
|
3466
3026
|
return {};
|
|
3467
3027
|
const isVerticalPlacement = ["bottom", "top"].includes(side), {
|
|
@@ -3485,14 +3045,6 @@ const origin = {
|
|
|
3485
3045
|
function clamp(num, min, max) {
|
|
3486
3046
|
return Math.min(Math.max(num, min), max);
|
|
3487
3047
|
}
|
|
3488
|
-
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) => {
|
|
3489
|
-
for (var prop in b || (b = {}))
|
|
3490
|
-
__hasOwnProp$y.call(b, prop) && __defNormalProp$z(a, prop, b[prop]);
|
|
3491
|
-
if (__getOwnPropSymbols$y)
|
|
3492
|
-
for (var prop of __getOwnPropSymbols$y(b))
|
|
3493
|
-
__propIsEnum$y.call(b, prop) && __defNormalProp$z(a, prop, b[prop]);
|
|
3494
|
-
return a;
|
|
3495
|
-
};
|
|
3496
3048
|
function moveTowardsLength(movingPoint, targetPoint, amount) {
|
|
3497
3049
|
const width = targetPoint.x - movingPoint.x, height = targetPoint.y - movingPoint.y, distance = Math.sqrt(width * width + height * height);
|
|
3498
3050
|
return moveTowardsFractional(movingPoint, targetPoint, Math.min(1, amount / distance));
|
|
@@ -3509,40 +3061,26 @@ function getRoundedCommands(points) {
|
|
|
3509
3061
|
const point = points[i], prevPoint = points[i - 1], nextPoint = points[i + 1];
|
|
3510
3062
|
if (prevPoint && point.radius) {
|
|
3511
3063
|
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);
|
|
3512
|
-
cmds.push(
|
|
3513
|
-
type: "point"
|
|
3514
|
-
|
|
3064
|
+
cmds.push({
|
|
3065
|
+
type: "point",
|
|
3066
|
+
...curveStart
|
|
3067
|
+
}), cmds.push({
|
|
3515
3068
|
type: "curve",
|
|
3516
3069
|
curveEnd,
|
|
3517
3070
|
startControl,
|
|
3518
3071
|
endControl
|
|
3519
3072
|
});
|
|
3520
3073
|
} else
|
|
3521
|
-
cmds.push(
|
|
3522
|
-
type: "point"
|
|
3523
|
-
|
|
3074
|
+
cmds.push({
|
|
3075
|
+
type: "point",
|
|
3076
|
+
...point
|
|
3077
|
+
});
|
|
3524
3078
|
}
|
|
3525
3079
|
return cmds;
|
|
3526
3080
|
}
|
|
3527
3081
|
function compileCommands(cmds) {
|
|
3528
3082
|
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(" ");
|
|
3529
3083
|
}
|
|
3530
|
-
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) => {
|
|
3531
|
-
for (var prop in b || (b = {}))
|
|
3532
|
-
__hasOwnProp$x.call(b, prop) && __defNormalProp$y(a, prop, b[prop]);
|
|
3533
|
-
if (__getOwnPropSymbols$x)
|
|
3534
|
-
for (var prop of __getOwnPropSymbols$x(b))
|
|
3535
|
-
__propIsEnum$x.call(b, prop) && __defNormalProp$y(a, prop, b[prop]);
|
|
3536
|
-
return a;
|
|
3537
|
-
}, __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b)), __objRest$t = (source, exclude) => {
|
|
3538
|
-
var target = {};
|
|
3539
|
-
for (var prop in source)
|
|
3540
|
-
__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3541
|
-
if (source != null && __getOwnPropSymbols$x)
|
|
3542
|
-
for (var prop of __getOwnPropSymbols$x(source))
|
|
3543
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop) && (target[prop] = source[prop]);
|
|
3544
|
-
return target;
|
|
3545
|
-
};
|
|
3546
3084
|
const Root$k = styled.div(({
|
|
3547
3085
|
$w: w
|
|
3548
3086
|
}) => css`
|
|
@@ -3596,18 +3134,14 @@ const Root$k = styled.div(({
|
|
|
3596
3134
|
`, ShapePath = styled.path`
|
|
3597
3135
|
fill: var(--card-bg-color);
|
|
3598
3136
|
`, Arrow = forwardRef(function(props, ref) {
|
|
3599
|
-
var _a;
|
|
3600
3137
|
const $ = c(24);
|
|
3601
3138
|
let h, restProps, t0, w;
|
|
3602
|
-
$[0] !== props ? (
|
|
3139
|
+
$[0] !== props ? ({
|
|
3603
3140
|
width: w,
|
|
3604
3141
|
height: h,
|
|
3605
|
-
radius: t0
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
"height",
|
|
3609
|
-
"radius"
|
|
3610
|
-
]), $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w) : (h = $[1], restProps = $[2], t0 = $[3], w = $[4]);
|
|
3142
|
+
radius: t0,
|
|
3143
|
+
...restProps
|
|
3144
|
+
} = props, $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w) : (h = $[1], restProps = $[2], t0 = $[3], w = $[4]);
|
|
3611
3145
|
const radius = t0 === void 0 ? 0 : t0, {
|
|
3612
3146
|
card
|
|
3613
3147
|
} = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, points = [{
|
|
@@ -3643,7 +3177,7 @@ const Root$k = styled.div(({
|
|
|
3643
3177
|
t5
|
|
3644
3178
|
] }), $[13] = t1, $[14] = t2, $[15] = t4, $[16] = t5, $[17] = w, $[18] = t6) : t6 = $[18];
|
|
3645
3179
|
let t7;
|
|
3646
|
-
return $[19] !== ref || $[20] !== restProps || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsx(Root$k,
|
|
3180
|
+
return $[19] !== ref || $[20] !== restProps || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsx(Root$k, { ...restProps, $w: w, ref, children: t6 }), $[19] = ref, $[20] = restProps, $[21] = t6, $[22] = w, $[23] = t7) : t7 = $[23], t7;
|
|
3647
3181
|
});
|
|
3648
3182
|
Arrow.displayName = "ForwardRef(Arrow)";
|
|
3649
3183
|
const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null);
|
|
@@ -3695,36 +3229,17 @@ function findMinBreakpoints(media, width) {
|
|
|
3695
3229
|
media[i] <= width && ret.push(i);
|
|
3696
3230
|
return ret;
|
|
3697
3231
|
}
|
|
3698
|
-
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) => {
|
|
3699
|
-
for (var prop in b || (b = {}))
|
|
3700
|
-
__hasOwnProp$w.call(b, prop) && __defNormalProp$x(a, prop, b[prop]);
|
|
3701
|
-
if (__getOwnPropSymbols$w)
|
|
3702
|
-
for (var prop of __getOwnPropSymbols$w(b))
|
|
3703
|
-
__propIsEnum$w.call(b, prop) && __defNormalProp$x(a, prop, b[prop]);
|
|
3704
|
-
return a;
|
|
3705
|
-
}, __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b)), __objRest$s = (source, exclude) => {
|
|
3706
|
-
var target = {};
|
|
3707
|
-
for (var prop in source)
|
|
3708
|
-
__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3709
|
-
if (source != null && __getOwnPropSymbols$w)
|
|
3710
|
-
for (var prop of __getOwnPropSymbols$w(source))
|
|
3711
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop) && (target[prop] = source[prop]);
|
|
3712
|
-
return target;
|
|
3713
|
-
};
|
|
3714
3232
|
const ElementQuery = forwardRef(function(props, forwardedRef) {
|
|
3715
|
-
var _a, _b;
|
|
3716
3233
|
const $ = c(18), theme = useTheme_v2();
|
|
3717
3234
|
let _media, children, restProps;
|
|
3718
|
-
$[0] !== props ? (
|
|
3235
|
+
$[0] !== props ? ({
|
|
3719
3236
|
children,
|
|
3720
|
-
media: _media
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
]), $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
|
|
3725
|
-
const media = _media != null ? _media : theme.media, [element, setElement] = useState(null), elementSize = useElementSize(element);
|
|
3237
|
+
media: _media,
|
|
3238
|
+
...restProps
|
|
3239
|
+
} = props, $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
|
|
3240
|
+
const media = _media ?? theme.media, [element, setElement] = useState(null), elementSize = useElementSize(element);
|
|
3726
3241
|
let t0;
|
|
3727
|
-
t0 =
|
|
3242
|
+
t0 = elementSize?.border.width ?? window.innerWidth;
|
|
3728
3243
|
const width = t0;
|
|
3729
3244
|
let t1, t2;
|
|
3730
3245
|
if ($[4] !== media || $[5] !== width) {
|
|
@@ -3745,16 +3260,13 @@ const ElementQuery = forwardRef(function(props, forwardedRef) {
|
|
|
3745
3260
|
let t5, t6;
|
|
3746
3261
|
$[10] !== element ? (t5 = () => element, t6 = [element], $[10] = element, $[11] = t5, $[12] = t6) : (t5 = $[11], t6 = $[12]), useImperativeHandle(forwardedRef, t5, t6);
|
|
3747
3262
|
let t7;
|
|
3748
|
-
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t7 = /* @__PURE__ */ jsx("div",
|
|
3263
|
+
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t7 = /* @__PURE__ */ jsx("div", { "data-ui": "ElementQuery", ...restProps, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[13] = children, $[14] = max, $[15] = min, $[16] = restProps, $[17] = t7) : t7 = $[17], t7;
|
|
3749
3264
|
});
|
|
3750
3265
|
ElementQuery.displayName = "ForwardRef(ElementQuery)";
|
|
3751
|
-
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);
|
|
3752
3266
|
class ErrorBoundary extends Component {
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
});
|
|
3757
|
-
}
|
|
3267
|
+
state = {
|
|
3268
|
+
error: null
|
|
3269
|
+
};
|
|
3758
3270
|
static getDerivedStateFromError(error) {
|
|
3759
3271
|
return {
|
|
3760
3272
|
error
|
|
@@ -3771,7 +3283,7 @@ class ErrorBoundary extends Component {
|
|
|
3771
3283
|
error
|
|
3772
3284
|
} = this.state;
|
|
3773
3285
|
if (error) {
|
|
3774
|
-
const message = typeof
|
|
3286
|
+
const message = typeof error?.message == "string" ? error.message : "Error";
|
|
3775
3287
|
return /* @__PURE__ */ jsx(Code, { children: message });
|
|
3776
3288
|
}
|
|
3777
3289
|
return this.props.children;
|
|
@@ -3849,7 +3361,7 @@ function attemptFocus(element) {
|
|
|
3849
3361
|
return !1;
|
|
3850
3362
|
try {
|
|
3851
3363
|
element.focus();
|
|
3852
|
-
} catch
|
|
3364
|
+
} catch {
|
|
3853
3365
|
}
|
|
3854
3366
|
return document.activeElement === element;
|
|
3855
3367
|
}
|
|
@@ -3874,45 +3386,38 @@ function _isScrollable(el) {
|
|
|
3874
3386
|
const style = window.getComputedStyle(el);
|
|
3875
3387
|
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
3876
3388
|
}
|
|
3877
|
-
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) => {
|
|
3878
|
-
for (var prop in b || (b = {}))
|
|
3879
|
-
__hasOwnProp$v.call(b, prop) && __defNormalProp$v(a, prop, b[prop]);
|
|
3880
|
-
if (__getOwnPropSymbols$v)
|
|
3881
|
-
for (var prop of __getOwnPropSymbols$v(b))
|
|
3882
|
-
__propIsEnum$v.call(b, prop) && __defNormalProp$v(a, prop, b[prop]);
|
|
3883
|
-
return a;
|
|
3884
|
-
}, __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
|
|
3885
3389
|
function LayerProvider(props) {
|
|
3886
|
-
var _a;
|
|
3887
3390
|
const $ = c(19), {
|
|
3888
3391
|
children,
|
|
3889
3392
|
zOffset: t0
|
|
3890
3393
|
} = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = useContext(LayerContext);
|
|
3891
3394
|
let t1;
|
|
3892
3395
|
$[0] !== parentContextValue ? (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1) : t1 = $[1];
|
|
3893
|
-
const parent = t1, parentRegisterChild = parent
|
|
3396
|
+
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];
|
|
3894
3397
|
let t2;
|
|
3895
3398
|
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t2 = {}, $[2] = t2) : t2 = $[2];
|
|
3896
3399
|
const [, setChildLayers] = useState(t2), [size2, setSize] = useState(0), isTopLayer = size2 === 0;
|
|
3897
3400
|
let t3;
|
|
3898
3401
|
$[3] !== parentRegisterChild || $[4] !== setChildLayers ? (t3 = (childLevel) => {
|
|
3899
|
-
const parentDispose = parentRegisterChild
|
|
3402
|
+
const parentDispose = parentRegisterChild?.(childLevel);
|
|
3900
3403
|
return childLevel !== void 0 ? setChildLayers((state) => {
|
|
3901
|
-
|
|
3902
|
-
|
|
3404
|
+
const prevLen = state[childLevel] ?? 0, nextState = {
|
|
3405
|
+
...state,
|
|
3903
3406
|
[childLevel]: prevLen + 1
|
|
3904
|
-
}
|
|
3407
|
+
};
|
|
3905
3408
|
return setSize(Object.keys(nextState).length), nextState;
|
|
3906
3409
|
}) : setSize(_temp$5), () => {
|
|
3907
3410
|
childLevel !== void 0 ? setChildLayers((state_0) => {
|
|
3908
|
-
const nextState_0 =
|
|
3411
|
+
const nextState_0 = {
|
|
3412
|
+
...state_0
|
|
3413
|
+
};
|
|
3909
3414
|
return nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel] = nextState_0[childLevel] - 1, nextState_0;
|
|
3910
|
-
}) : setSize(_temp2$3), parentDispose
|
|
3415
|
+
}) : setSize(_temp2$3), parentDispose?.();
|
|
3911
3416
|
};
|
|
3912
3417
|
}, $[3] = parentRegisterChild, $[4] = setChildLayers, $[5] = t3) : t3 = $[5];
|
|
3913
3418
|
const registerChild = t3;
|
|
3914
3419
|
let t4, t5;
|
|
3915
|
-
$[6] !== level || $[7] !== parentRegisterChild ? (t4 = () => parentRegisterChild
|
|
3420
|
+
$[6] !== level || $[7] !== parentRegisterChild ? (t4 = () => parentRegisterChild?.(level), t5 = [level, parentRegisterChild], $[6] = level, $[7] = parentRegisterChild, $[8] = t4, $[9] = t5) : (t4 = $[8], t5 = $[9]), useEffect(t4, t5);
|
|
3916
3421
|
let t6, t7;
|
|
3917
3422
|
$[10] !== isTopLayer || $[11] !== level || $[12] !== registerChild || $[13] !== size2 || $[14] !== zIndex ? (t7 = {
|
|
3918
3423
|
version: 0,
|
|
@@ -3933,39 +3438,18 @@ function _temp$5(v) {
|
|
|
3933
3438
|
return v + 1;
|
|
3934
3439
|
}
|
|
3935
3440
|
LayerProvider.displayName = "LayerProvider";
|
|
3936
|
-
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) => {
|
|
3937
|
-
for (var prop in b || (b = {}))
|
|
3938
|
-
__hasOwnProp$u.call(b, prop) && __defNormalProp$u(a, prop, b[prop]);
|
|
3939
|
-
if (__getOwnPropSymbols$u)
|
|
3940
|
-
for (var prop of __getOwnPropSymbols$u(b))
|
|
3941
|
-
__propIsEnum$u.call(b, prop) && __defNormalProp$u(a, prop, b[prop]);
|
|
3942
|
-
return a;
|
|
3943
|
-
}, __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b)), __objRest$r = (source, exclude) => {
|
|
3944
|
-
var target = {};
|
|
3945
|
-
for (var prop in source)
|
|
3946
|
-
__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3947
|
-
if (source != null && __getOwnPropSymbols$u)
|
|
3948
|
-
for (var prop of __getOwnPropSymbols$u(source))
|
|
3949
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop) && (target[prop] = source[prop]);
|
|
3950
|
-
return target;
|
|
3951
|
-
};
|
|
3952
3441
|
const Root$j = styled.div({
|
|
3953
3442
|
position: "relative"
|
|
3954
3443
|
}), LayerChildren = forwardRef(function(props, forwardedRef) {
|
|
3955
|
-
var _a;
|
|
3956
3444
|
const $ = c(22);
|
|
3957
3445
|
let children, onActivate, onFocus, restProps, t0;
|
|
3958
|
-
$[0] !== props ? (
|
|
3446
|
+
$[0] !== props ? ({
|
|
3959
3447
|
children,
|
|
3960
3448
|
onActivate,
|
|
3961
3449
|
onFocus,
|
|
3962
|
-
style: t0
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
"onActivate",
|
|
3966
|
-
"onFocus",
|
|
3967
|
-
"style"
|
|
3968
|
-
]), $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
|
|
3450
|
+
style: t0,
|
|
3451
|
+
...restProps
|
|
3452
|
+
} = props, $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
|
|
3969
3453
|
const style = t0 === void 0 ? EMPTY_RECORD : t0, {
|
|
3970
3454
|
zIndex,
|
|
3971
3455
|
isTopLayer
|
|
@@ -3974,37 +3458,35 @@ const Root$j = styled.div({
|
|
|
3974
3458
|
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[6] = t1) : t1 = $[6], useImperativeHandle(forwardedRef, t1);
|
|
3975
3459
|
let t2, t3;
|
|
3976
3460
|
$[7] !== isTopLayer || $[8] !== onActivate ? (t2 = () => {
|
|
3977
|
-
isTopLayerRef.current !== isTopLayer && isTopLayer &&
|
|
3461
|
+
isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate?.({
|
|
3978
3462
|
activeElement: lastFocusedRef.current
|
|
3979
|
-
})
|
|
3463
|
+
}), isTopLayerRef.current = isTopLayer;
|
|
3980
3464
|
}, t3 = [isTopLayer, onActivate], $[7] = isTopLayer, $[8] = onActivate, $[9] = t2, $[10] = t3) : (t2 = $[9], t3 = $[10]), useEffect(t2, t3);
|
|
3981
3465
|
let t4;
|
|
3982
3466
|
$[11] !== isTopLayer || $[12] !== onFocus ? (t4 = (event) => {
|
|
3983
|
-
onFocus
|
|
3467
|
+
onFocus?.(event);
|
|
3984
3468
|
const rootElement = ref.current, target = document.activeElement;
|
|
3985
3469
|
!isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
|
|
3986
3470
|
}, $[11] = isTopLayer, $[12] = onFocus, $[13] = t4) : t4 = $[13];
|
|
3987
3471
|
const handleFocus = t4;
|
|
3988
3472
|
let t5;
|
|
3989
|
-
$[14] !== style || $[15] !== zIndex ? (t5 =
|
|
3473
|
+
$[14] !== style || $[15] !== zIndex ? (t5 = {
|
|
3474
|
+
...style,
|
|
3990
3475
|
zIndex
|
|
3991
|
-
}
|
|
3476
|
+
}, $[14] = style, $[15] = zIndex, $[16] = t5) : t5 = $[16];
|
|
3992
3477
|
let t6;
|
|
3993
|
-
return $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsx(Root$j,
|
|
3478
|
+
return $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ 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;
|
|
3994
3479
|
}), Layer = forwardRef(function(props, ref) {
|
|
3995
|
-
var _a;
|
|
3996
3480
|
const $ = c(11);
|
|
3997
3481
|
let children, restProps, t0;
|
|
3998
|
-
$[0] !== props ? (
|
|
3482
|
+
$[0] !== props ? ({
|
|
3999
3483
|
children,
|
|
4000
|
-
zOffset: t0
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
"zOffset"
|
|
4004
|
-
]), $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
3484
|
+
zOffset: t0,
|
|
3485
|
+
...restProps
|
|
3486
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
4005
3487
|
const zOffset = t0 === void 0 ? 1 : t0;
|
|
4006
3488
|
let t1;
|
|
4007
|
-
$[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsx(LayerChildren,
|
|
3489
|
+
$[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsx(LayerChildren, { ...restProps, ref, children }), $[4] = children, $[5] = ref, $[6] = restProps, $[7] = t1) : t1 = $[7];
|
|
4008
3490
|
let t2;
|
|
4009
3491
|
return $[8] !== t1 || $[9] !== zOffset ? (t2 = /* @__PURE__ */ jsx(LayerProvider, { zOffset, children: t1 }), $[8] = t1, $[9] = zOffset, $[10] = t2) : t2 = $[10], t2;
|
|
4010
3492
|
});
|
|
@@ -4027,11 +3509,10 @@ function usePortal() {
|
|
|
4027
3509
|
return value;
|
|
4028
3510
|
}
|
|
4029
3511
|
function Portal(props) {
|
|
4030
|
-
var _a;
|
|
4031
3512
|
const $ = c(3), {
|
|
4032
3513
|
children,
|
|
4033
3514
|
__unstable_name: name
|
|
4034
|
-
} = props, portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) ||
|
|
3515
|
+
} = props, portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) || portal.elements?.default;
|
|
4035
3516
|
if (!portalElement)
|
|
4036
3517
|
return null;
|
|
4037
3518
|
let t0;
|
|
@@ -4093,22 +3574,6 @@ const Root$i = styled.div`
|
|
|
4093
3574
|
return $[0] !== as || $[1] !== children || $[2] !== ref ? (t0 = /* @__PURE__ */ jsx(Root$i, { "aria-hidden": !0, as, "data-ui": "SrOnly", ref, children }), $[0] = as, $[1] = children, $[2] = ref, $[3] = t0) : t0 = $[3], t0;
|
|
4094
3575
|
});
|
|
4095
3576
|
SrOnly.displayName = "ForwardRef(SrOnly)";
|
|
4096
|
-
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) => {
|
|
4097
|
-
for (var prop in b || (b = {}))
|
|
4098
|
-
__hasOwnProp$t.call(b, prop) && __defNormalProp$t(a, prop, b[prop]);
|
|
4099
|
-
if (__getOwnPropSymbols$t)
|
|
4100
|
-
for (var prop of __getOwnPropSymbols$t(b))
|
|
4101
|
-
__propIsEnum$t.call(b, prop) && __defNormalProp$t(a, prop, b[prop]);
|
|
4102
|
-
return a;
|
|
4103
|
-
}, __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b)), __objRest$q = (source, exclude) => {
|
|
4104
|
-
var target = {};
|
|
4105
|
-
for (var prop in source)
|
|
4106
|
-
__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4107
|
-
if (source != null && __getOwnPropSymbols$t)
|
|
4108
|
-
for (var prop of __getOwnPropSymbols$t(source))
|
|
4109
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop) && (target[prop] = source[prop]);
|
|
4110
|
-
return target;
|
|
4111
|
-
};
|
|
4112
3577
|
const Root$h = styled.div`
|
|
4113
3578
|
position: relative;
|
|
4114
3579
|
`, ItemWrapper = styled.div`
|
|
@@ -4116,24 +3581,17 @@ const Root$h = styled.div`
|
|
|
4116
3581
|
left: 0;
|
|
4117
3582
|
right: 0;
|
|
4118
3583
|
`, VirtualList = forwardRef(function(props, forwardedRef) {
|
|
4119
|
-
var _a;
|
|
4120
3584
|
const $ = c(56);
|
|
4121
3585
|
let getItemKey, onChange, renderItem, restProps, t0, t1, t2;
|
|
4122
|
-
$[0] !== props ? (
|
|
3586
|
+
$[0] !== props ? ({
|
|
4123
3587
|
as: t0,
|
|
4124
3588
|
gap: t1,
|
|
4125
3589
|
getItemKey,
|
|
4126
3590
|
items: t2,
|
|
4127
3591
|
onChange,
|
|
4128
|
-
renderItem
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
"gap",
|
|
4132
|
-
"getItemKey",
|
|
4133
|
-
"items",
|
|
4134
|
-
"onChange",
|
|
4135
|
-
"renderItem"
|
|
4136
|
-
]), $[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]);
|
|
3592
|
+
renderItem,
|
|
3593
|
+
...restProps
|
|
3594
|
+
} = 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]);
|
|
4137
3595
|
const as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1;
|
|
4138
3596
|
let t3;
|
|
4139
3597
|
$[8] !== t2 ? (t3 = t2 === void 0 ? [] : t2, $[8] = t2, $[9] = t3) : t3 = $[9];
|
|
@@ -4234,7 +3692,7 @@ const Root$h = styled.div`
|
|
|
4234
3692
|
let t14;
|
|
4235
3693
|
$[49] !== children || $[50] !== wrapperStyle ? (t14 = /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[49] = children, $[50] = wrapperStyle, $[51] = t14) : t14 = $[51];
|
|
4236
3694
|
let t15;
|
|
4237
|
-
return $[52] !== as || $[53] !== restProps || $[54] !== t14 ? (t15 = /* @__PURE__ */ jsx(Root$h,
|
|
3695
|
+
return $[52] !== as || $[53] !== restProps || $[54] !== t14 ? (t15 = /* @__PURE__ */ jsx(Root$h, { as, "data-ui": "VirtualList", ...restProps, ref, children: t14 }), $[52] = as, $[53] = restProps, $[54] = t14, $[55] = t15) : t15 = $[55], t15;
|
|
4238
3696
|
});
|
|
4239
3697
|
VirtualList.displayName = "ForwardRef(VirtualList)";
|
|
4240
3698
|
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 = {
|
|
@@ -4306,24 +3764,8 @@ function calcMaxWidth(params) {
|
|
|
4306
3764
|
currentWidth
|
|
4307
3765
|
} = params;
|
|
4308
3766
|
if (!(currentWidth === void 0 && boundaryWidth === void 0))
|
|
4309
|
-
return Math.min(currentWidth
|
|
4310
|
-
}
|
|
4311
|
-
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) => {
|
|
4312
|
-
for (var prop in b || (b = {}))
|
|
4313
|
-
__hasOwnProp$s.call(b, prop) && __defNormalProp$s(a, prop, b[prop]);
|
|
4314
|
-
if (__getOwnPropSymbols$s)
|
|
4315
|
-
for (var prop of __getOwnPropSymbols$s(b))
|
|
4316
|
-
__propIsEnum$s.call(b, prop) && __defNormalProp$s(a, prop, b[prop]);
|
|
4317
|
-
return a;
|
|
4318
|
-
}, __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b)), __objRest$p = (source, exclude) => {
|
|
4319
|
-
var target = {};
|
|
4320
|
-
for (var prop in source)
|
|
4321
|
-
__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4322
|
-
if (source != null && __getOwnPropSymbols$s)
|
|
4323
|
-
for (var prop of __getOwnPropSymbols$s(source))
|
|
4324
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop) && (target[prop] = source[prop]);
|
|
4325
|
-
return target;
|
|
4326
|
-
};
|
|
3767
|
+
return Math.min(currentWidth ?? 1 / 0, (boundaryWidth || 1 / 0) - DEFAULT_POPOVER_PADDING * 2);
|
|
3768
|
+
}
|
|
4327
3769
|
const MotionCard$1 = styled(motion.create(Card))`
|
|
4328
3770
|
&:not([hidden]) {
|
|
4329
3771
|
display: flex;
|
|
@@ -4336,10 +3778,9 @@ const MotionCard$1 = styled(motion.create(Card))`
|
|
|
4336
3778
|
will-change: opacity;
|
|
4337
3779
|
}
|
|
4338
3780
|
`, PopoverCard = memo(forwardRef(function(props, ref) {
|
|
4339
|
-
var _a;
|
|
4340
3781
|
const $ = c(60);
|
|
4341
3782
|
let animate, arrow2, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;
|
|
4342
|
-
$[0] !== props ? (
|
|
3783
|
+
$[0] !== props ? ({
|
|
4343
3784
|
__unstable_margins: marginsProp,
|
|
4344
3785
|
animate,
|
|
4345
3786
|
arrow: arrow2,
|
|
@@ -4360,40 +3801,19 @@ const MotionCard$1 = styled(motion.create(Card))`
|
|
|
4360
3801
|
tone,
|
|
4361
3802
|
width,
|
|
4362
3803
|
x: xProp,
|
|
4363
|
-
y: yProp
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
"animate",
|
|
4367
|
-
"arrow",
|
|
4368
|
-
"arrowRef",
|
|
4369
|
-
"arrowX",
|
|
4370
|
-
"arrowY",
|
|
4371
|
-
"children",
|
|
4372
|
-
"padding",
|
|
4373
|
-
"placement",
|
|
4374
|
-
"originX",
|
|
4375
|
-
"originY",
|
|
4376
|
-
"overflow",
|
|
4377
|
-
"radius",
|
|
4378
|
-
"scheme",
|
|
4379
|
-
"shadow",
|
|
4380
|
-
"strategy",
|
|
4381
|
-
"style",
|
|
4382
|
-
"tone",
|
|
4383
|
-
"width",
|
|
4384
|
-
"x",
|
|
4385
|
-
"y"
|
|
4386
|
-
]), $[0] = props, $[1] = animate, $[2] = arrow2, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = restProps, $[15] = scheme, $[16] = shadow, $[17] = strategy, $[18] = style, $[19] = tone, $[20] = width, $[21] = xProp, $[22] = yProp) : (animate = $[1], arrow2 = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], restProps = $[14], scheme = $[15], shadow = $[16], strategy = $[17], style = $[18], tone = $[19], width = $[20], xProp = $[21], yProp = $[22]);
|
|
3804
|
+
y: yProp,
|
|
3805
|
+
...restProps
|
|
3806
|
+
} = props, $[0] = props, $[1] = animate, $[2] = arrow2, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = restProps, $[15] = scheme, $[16] = shadow, $[17] = strategy, $[18] = style, $[19] = tone, $[20] = width, $[21] = xProp, $[22] = yProp) : (animate = $[1], arrow2 = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], restProps = $[14], scheme = $[15], shadow = $[16], strategy = $[17], style = $[18], tone = $[19], width = $[20], xProp = $[21], yProp = $[22]);
|
|
4387
3807
|
const {
|
|
4388
3808
|
zIndex
|
|
4389
3809
|
} = useLayer();
|
|
4390
3810
|
let t0;
|
|
4391
3811
|
t0 = marginsProp || DEFAULT_POPOVER_MARGINS;
|
|
4392
|
-
const margins = t0, x = (xProp
|
|
3812
|
+
const margins = t0, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
|
|
4393
3813
|
let t1;
|
|
4394
3814
|
const t2 = animate ? "transform" : void 0;
|
|
4395
3815
|
let t3;
|
|
4396
|
-
$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t2 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t3 =
|
|
3816
|
+
$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t2 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t3 = {
|
|
4397
3817
|
left: x,
|
|
4398
3818
|
originX,
|
|
4399
3819
|
originY,
|
|
@@ -4401,8 +3821,9 @@ const MotionCard$1 = styled(motion.create(Card))`
|
|
|
4401
3821
|
top: y,
|
|
4402
3822
|
width,
|
|
4403
3823
|
zIndex,
|
|
4404
|
-
willChange: t2
|
|
4405
|
-
|
|
3824
|
+
willChange: t2,
|
|
3825
|
+
...style
|
|
3826
|
+
}, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] = t2, $[28] = width, $[29] = x, $[30] = y, $[31] = zIndex, $[32] = t3) : t3 = $[32], t1 = t3;
|
|
4406
3827
|
const rootStyle2 = t1;
|
|
4407
3828
|
let t4;
|
|
4408
3829
|
const t5 = arrowX !== null ? arrowX : void 0, t6 = arrowY !== null ? arrowY : void 0;
|
|
@@ -4423,34 +3844,17 @@ const MotionCard$1 = styled(motion.create(Card))`
|
|
|
4423
3844
|
let t12;
|
|
4424
3845
|
$[44] !== arrow2 || $[45] !== arrowRef || $[46] !== arrowStyle ? (t12 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[44] = arrow2, $[45] = arrowRef, $[46] = arrowStyle, $[47] = t12) : t12 = $[47];
|
|
4425
3846
|
let t13;
|
|
4426
|
-
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__ */ jsxs(MotionCard$1,
|
|
3847
|
+
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__ */ jsxs(MotionCard$1, { "data-ui": "Popover", ...t8, "data-placement": placement, radius, ref, scheme, shadow, sizing: "border", style: rootStyle2, tone, ...t9, children: [
|
|
4427
3848
|
t11,
|
|
4428
3849
|
t12
|
|
4429
|
-
] })
|
|
3850
|
+
] }), $[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;
|
|
4430
3851
|
}));
|
|
4431
3852
|
PopoverCard.displayName = "Memo(ForwardRef(PopoverCard))";
|
|
4432
|
-
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) => {
|
|
4433
|
-
for (var prop in b || (b = {}))
|
|
4434
|
-
__hasOwnProp$r.call(b, prop) && __defNormalProp$r(a, prop, b[prop]);
|
|
4435
|
-
if (__getOwnPropSymbols$r)
|
|
4436
|
-
for (var prop of __getOwnPropSymbols$r(b))
|
|
4437
|
-
__propIsEnum$r.call(b, prop) && __defNormalProp$r(a, prop, b[prop]);
|
|
4438
|
-
return a;
|
|
4439
|
-
}, __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b)), __objRest$o = (source, exclude) => {
|
|
4440
|
-
var target = {};
|
|
4441
|
-
for (var prop in source)
|
|
4442
|
-
__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4443
|
-
if (source != null && __getOwnPropSymbols$r)
|
|
4444
|
-
for (var prop of __getOwnPropSymbols$r(source))
|
|
4445
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop) && (target[prop] = source[prop]);
|
|
4446
|
-
return target;
|
|
4447
|
-
};
|
|
4448
3853
|
const Popover = memo(forwardRef(function(props, forwardedRef) {
|
|
4449
|
-
var _a, _b, _c, _d, _f, _g, _h, _i, _j, _k;
|
|
4450
3854
|
const {
|
|
4451
3855
|
container,
|
|
4452
3856
|
layer
|
|
4453
|
-
} = useTheme_v2(), boundaryElementContext = useBoundaryElement(),
|
|
3857
|
+
} = useTheme_v2(), boundaryElementContext = useBoundaryElement(), {
|
|
4454
3858
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
4455
3859
|
animate: _animate = !1,
|
|
4456
3860
|
arrow: arrowProp = !1,
|
|
@@ -4459,9 +3863,10 @@ const Popover = memo(forwardRef(function(props, forwardedRef) {
|
|
|
4459
3863
|
constrainSize = !1,
|
|
4460
3864
|
content,
|
|
4461
3865
|
disabled,
|
|
4462
|
-
fallbackPlacements =
|
|
3866
|
+
fallbackPlacements = props.fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"],
|
|
4463
3867
|
matchReferenceWidth,
|
|
4464
|
-
floatingBoundary =
|
|
3868
|
+
floatingBoundary = props.boundaryElement ?? boundaryElementContext.element,
|
|
3869
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4465
3870
|
onActivate,
|
|
4466
3871
|
open,
|
|
4467
3872
|
overflow = "hidden",
|
|
@@ -4470,46 +3875,18 @@ const Popover = memo(forwardRef(function(props, forwardedRef) {
|
|
|
4470
3875
|
portal,
|
|
4471
3876
|
preventOverflow = !0,
|
|
4472
3877
|
radius: radiusProp = 3,
|
|
4473
|
-
referenceBoundary =
|
|
3878
|
+
referenceBoundary = props.boundaryElement ?? boundaryElementContext.element,
|
|
4474
3879
|
referenceElement,
|
|
4475
3880
|
scheme,
|
|
4476
3881
|
shadow: shadowProp = 3,
|
|
4477
3882
|
tone = "inherit",
|
|
4478
3883
|
width: widthProp = "auto",
|
|
4479
3884
|
zOffset: zOffsetProp = layer.popover.zOffset,
|
|
4480
|
-
updateRef
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
"animate",
|
|
4484
|
-
"arrow",
|
|
4485
|
-
"boundaryElement",
|
|
4486
|
-
"children",
|
|
4487
|
-
"constrainSize",
|
|
4488
|
-
"content",
|
|
4489
|
-
"disabled",
|
|
4490
|
-
"fallbackPlacements",
|
|
4491
|
-
"matchReferenceWidth",
|
|
4492
|
-
"floatingBoundary",
|
|
4493
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4494
|
-
"onActivate",
|
|
4495
|
-
"open",
|
|
4496
|
-
"overflow",
|
|
4497
|
-
"padding",
|
|
4498
|
-
"placement",
|
|
4499
|
-
"portal",
|
|
4500
|
-
"preventOverflow",
|
|
4501
|
-
"radius",
|
|
4502
|
-
"referenceBoundary",
|
|
4503
|
-
"referenceElement",
|
|
4504
|
-
"scheme",
|
|
4505
|
-
"shadow",
|
|
4506
|
-
"tone",
|
|
4507
|
-
"width",
|
|
4508
|
-
"zOffset",
|
|
4509
|
-
"updateRef"
|
|
4510
|
-
]), 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 = useRef(null), arrowRef = useRef(null), rootBoundary = "viewport";
|
|
3885
|
+
updateRef,
|
|
3886
|
+
...restProps
|
|
3887
|
+
} = 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 = useRef(null), arrowRef = useRef(null), rootBoundary = "viewport";
|
|
4511
3888
|
useImperativeHandle(forwardedRef, () => ref.current);
|
|
4512
|
-
const mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize
|
|
3889
|
+
const mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize?.width : void 0, width = calcCurrentWidth({
|
|
4513
3890
|
container,
|
|
4514
3891
|
mediaIndex,
|
|
4515
3892
|
width: widthArrayProp
|
|
@@ -4549,7 +3926,7 @@ const Popover = memo(forwardRef(function(props, forwardedRef) {
|
|
|
4549
3926
|
}) {
|
|
4550
3927
|
referenceWidthRef.current = referenceWidth_0;
|
|
4551
3928
|
const _currentWidth = widthRef.current, _maxWidth = maxWidthRef.current;
|
|
4552
|
-
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
|
|
3929
|
+
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`);
|
|
4553
3930
|
},
|
|
4554
3931
|
boundaryElement: floatingBoundary || void 0,
|
|
4555
3932
|
constrainSize,
|
|
@@ -4583,7 +3960,7 @@ const Popover = memo(forwardRef(function(props, forwardedRef) {
|
|
|
4583
3960
|
elements: referenceElement ? {
|
|
4584
3961
|
reference: referenceElement
|
|
4585
3962
|
} : void 0
|
|
4586
|
-
}), referenceHidden =
|
|
3963
|
+
}), 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 = useCallback((arrowEl) => {
|
|
4587
3964
|
arrowRef.current = arrowEl;
|
|
4588
3965
|
}, []), setFloating = useCallback((node) => {
|
|
4589
3966
|
ref.current = node, refs.setFloating(node);
|
|
@@ -4598,7 +3975,7 @@ const Popover = memo(forwardRef(function(props, forwardedRef) {
|
|
|
4598
3975
|
updateRef && (typeof updateRef == "function" ? updateRef(update) : updateRef && (updateRef.current = update));
|
|
4599
3976
|
}, [update, updateRef]), disabled)
|
|
4600
3977
|
return childProp || /* @__PURE__ */ jsx(Fragment, {});
|
|
4601
|
-
const popover = /* @__PURE__ */ jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsx(PopoverCard,
|
|
3978
|
+
const popover = /* @__PURE__ */ jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ 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__ */ jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover);
|
|
4602
3979
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4603
3980
|
animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children,
|
|
4604
3981
|
child
|
|
@@ -4606,9 +3983,8 @@ const Popover = memo(forwardRef(function(props, forwardedRef) {
|
|
|
4606
3983
|
}));
|
|
4607
3984
|
Popover.displayName = "Memo(ForwardRef(Popover))";
|
|
4608
3985
|
function getElementRef(element) {
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
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);
|
|
3986
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3987
|
+
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);
|
|
4612
3988
|
}
|
|
4613
3989
|
function radioBaseStyle() {
|
|
4614
3990
|
return css`
|
|
@@ -4724,45 +4100,23 @@ function inputElementStyle(props) {
|
|
|
4724
4100
|
}
|
|
4725
4101
|
`;
|
|
4726
4102
|
}
|
|
4727
|
-
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) => {
|
|
4728
|
-
for (var prop in b || (b = {}))
|
|
4729
|
-
__hasOwnProp$q.call(b, prop) && __defNormalProp$q(a, prop, b[prop]);
|
|
4730
|
-
if (__getOwnPropSymbols$q)
|
|
4731
|
-
for (var prop of __getOwnPropSymbols$q(b))
|
|
4732
|
-
__propIsEnum$q.call(b, prop) && __defNormalProp$q(a, prop, b[prop]);
|
|
4733
|
-
return a;
|
|
4734
|
-
}, __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b)), __objRest$n = (source, exclude) => {
|
|
4735
|
-
var target = {};
|
|
4736
|
-
for (var prop in source)
|
|
4737
|
-
__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4738
|
-
if (source != null && __getOwnPropSymbols$q)
|
|
4739
|
-
for (var prop of __getOwnPropSymbols$q(source))
|
|
4740
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop) && (target[prop] = source[prop]);
|
|
4741
|
-
return target;
|
|
4742
|
-
};
|
|
4743
4103
|
const Root$g = styled.div(radioBaseStyle), Input$4 = styled.input(inputElementStyle), Radio = forwardRef(function(props, forwardedRef) {
|
|
4744
|
-
var _a;
|
|
4745
4104
|
const $ = c(19);
|
|
4746
4105
|
let className, customValidity, disabled, readOnly, restProps, style;
|
|
4747
|
-
$[0] !== props ? (
|
|
4106
|
+
$[0] !== props ? ({
|
|
4748
4107
|
className,
|
|
4749
4108
|
disabled,
|
|
4750
4109
|
style,
|
|
4751
4110
|
customValidity,
|
|
4752
|
-
readOnly
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
"disabled",
|
|
4756
|
-
"style",
|
|
4757
|
-
"customValidity",
|
|
4758
|
-
"readOnly"
|
|
4759
|
-
]), $[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]);
|
|
4111
|
+
readOnly,
|
|
4112
|
+
...restProps
|
|
4113
|
+
} = 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]);
|
|
4760
4114
|
const ref = useRef(null);
|
|
4761
4115
|
let t0;
|
|
4762
4116
|
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[7] = t0) : t0 = $[7], useImperativeHandle(forwardedRef, t0), useCustomValidity(ref, customValidity);
|
|
4763
4117
|
const t1 = !disabled && readOnly ? "" : void 0, t2 = customValidity ? "" : void 0, t3 = disabled || readOnly;
|
|
4764
4118
|
let t4;
|
|
4765
|
-
$[8] !== readOnly || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsx(Input$4,
|
|
4119
|
+
$[8] !== readOnly || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ 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];
|
|
4766
4120
|
let t5;
|
|
4767
4121
|
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t5 = /* @__PURE__ */ jsx("span", {}), $[14] = t5) : t5 = $[14];
|
|
4768
4122
|
let t6;
|
|
@@ -4914,28 +4268,10 @@ const selectStyle = {
|
|
|
4914
4268
|
root: rootStyle,
|
|
4915
4269
|
input: inputStyle,
|
|
4916
4270
|
iconBox: iconBoxStyle
|
|
4917
|
-
}
|
|
4918
|
-
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) => {
|
|
4919
|
-
for (var prop in b || (b = {}))
|
|
4920
|
-
__hasOwnProp$p.call(b, prop) && __defNormalProp$p(a, prop, b[prop]);
|
|
4921
|
-
if (__getOwnPropSymbols$p)
|
|
4922
|
-
for (var prop of __getOwnPropSymbols$p(b))
|
|
4923
|
-
__propIsEnum$p.call(b, prop) && __defNormalProp$p(a, prop, b[prop]);
|
|
4924
|
-
return a;
|
|
4925
|
-
}, __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b)), __objRest$m = (source, exclude) => {
|
|
4926
|
-
var target = {};
|
|
4927
|
-
for (var prop in source)
|
|
4928
|
-
__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4929
|
-
if (source != null && __getOwnPropSymbols$p)
|
|
4930
|
-
for (var prop of __getOwnPropSymbols$p(source))
|
|
4931
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop) && (target[prop] = source[prop]);
|
|
4932
|
-
return target;
|
|
4933
|
-
};
|
|
4934
|
-
const Root$f = styled.div(selectStyle.root), Input$3 = styled.select(selectStyle.input), IconBox = styled(Box)(selectStyle.iconBox), Select = forwardRef(function(props, forwardedRef) {
|
|
4935
|
-
var _a;
|
|
4271
|
+
}, Root$f = styled.div(selectStyle.root), Input$3 = styled.select(selectStyle.input), IconBox = styled(Box)(selectStyle.iconBox), Select = forwardRef(function(props, forwardedRef) {
|
|
4936
4272
|
const $ = c(29);
|
|
4937
4273
|
let children, customValidity, disabled, readOnly, restProps, t0, t1, t2, t3;
|
|
4938
|
-
$[0] !== props ? (
|
|
4274
|
+
$[0] !== props ? ({
|
|
4939
4275
|
children,
|
|
4940
4276
|
customValidity,
|
|
4941
4277
|
disabled,
|
|
@@ -4943,23 +4279,15 @@ const Root$f = styled.div(selectStyle.root), Input$3 = styled.select(selectStyle
|
|
|
4943
4279
|
padding: t1,
|
|
4944
4280
|
radius: t2,
|
|
4945
4281
|
readOnly,
|
|
4946
|
-
space: t3
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
"customValidity",
|
|
4950
|
-
"disabled",
|
|
4951
|
-
"fontSize",
|
|
4952
|
-
"padding",
|
|
4953
|
-
"radius",
|
|
4954
|
-
"readOnly",
|
|
4955
|
-
"space"
|
|
4956
|
-
]), $[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]);
|
|
4282
|
+
space: t3,
|
|
4283
|
+
...restProps
|
|
4284
|
+
} = 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]);
|
|
4957
4285
|
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 = useRef(null);
|
|
4958
4286
|
let t4;
|
|
4959
4287
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
|
|
4960
4288
|
const t5 = !disabled && readOnly ? "" : void 0, t6 = useArrayProp(fontSize2), t7 = useArrayProp(padding), t8 = useArrayProp(radius), t9 = useArrayProp(space), t10 = disabled || readOnly;
|
|
4961
4289
|
let t11;
|
|
4962
|
-
$[11] !== children || $[12] !== restProps || $[13] !== t10 || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9 ? (t11 = /* @__PURE__ */ jsx(Input$3,
|
|
4290
|
+
$[11] !== children || $[12] !== restProps || $[13] !== t10 || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9 ? (t11 = /* @__PURE__ */ 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];
|
|
4963
4291
|
let t12;
|
|
4964
4292
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[20] = t12) : t12 = $[20];
|
|
4965
4293
|
let t13;
|
|
@@ -4995,36 +4323,17 @@ function responsiveStackSpaceStyle(props) {
|
|
|
4995
4323
|
gridGap: rem(space[spaceIndex])
|
|
4996
4324
|
}));
|
|
4997
4325
|
}
|
|
4998
|
-
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) => {
|
|
4999
|
-
for (var prop in b || (b = {}))
|
|
5000
|
-
__hasOwnProp$o.call(b, prop) && __defNormalProp$o(a, prop, b[prop]);
|
|
5001
|
-
if (__getOwnPropSymbols$o)
|
|
5002
|
-
for (var prop of __getOwnPropSymbols$o(b))
|
|
5003
|
-
__propIsEnum$o.call(b, prop) && __defNormalProp$o(a, prop, b[prop]);
|
|
5004
|
-
return a;
|
|
5005
|
-
}, __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b)), __objRest$l = (source, exclude) => {
|
|
5006
|
-
var target = {};
|
|
5007
|
-
for (var prop in source)
|
|
5008
|
-
__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5009
|
-
if (source != null && __getOwnPropSymbols$o)
|
|
5010
|
-
for (var prop of __getOwnPropSymbols$o(source))
|
|
5011
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop) && (target[prop] = source[prop]);
|
|
5012
|
-
return target;
|
|
5013
|
-
};
|
|
5014
4326
|
const Root$e = styled(Box)(stackBaseStyle, responsiveStackSpaceStyle), Stack = forwardRef(function(props, ref) {
|
|
5015
|
-
var _a;
|
|
5016
4327
|
const $ = c(10);
|
|
5017
4328
|
let as, restProps, space;
|
|
5018
|
-
$[0] !== props ? (
|
|
4329
|
+
$[0] !== props ? ({
|
|
5019
4330
|
as,
|
|
5020
|
-
space
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
"space"
|
|
5024
|
-
]), $[0] = props, $[1] = as, $[2] = restProps, $[3] = space) : (as = $[1], restProps = $[2], space = $[3]);
|
|
4331
|
+
space,
|
|
4332
|
+
...restProps
|
|
4333
|
+
} = props, $[0] = props, $[1] = as, $[2] = restProps, $[3] = space) : (as = $[1], restProps = $[2], space = $[3]);
|
|
5025
4334
|
const t0 = typeof as == "string" ? as : void 0, t1 = useArrayProp(space);
|
|
5026
4335
|
let t2;
|
|
5027
|
-
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t0 || $[8] !== t1 ? (t2 = /* @__PURE__ */ jsx(Root$e,
|
|
4336
|
+
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t0 || $[8] !== t1 ? (t2 = /* @__PURE__ */ 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;
|
|
5028
4337
|
});
|
|
5029
4338
|
Stack.displayName = "ForwardRef(Stack)";
|
|
5030
4339
|
function switchBaseStyles() {
|
|
@@ -5180,41 +4489,18 @@ function switchThumbStyles(props) {
|
|
|
5180
4489
|
`}
|
|
5181
4490
|
`;
|
|
5182
4491
|
}
|
|
5183
|
-
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) => {
|
|
5184
|
-
for (var prop in b || (b = {}))
|
|
5185
|
-
__hasOwnProp$n.call(b, prop) && __defNormalProp$n(a, prop, b[prop]);
|
|
5186
|
-
if (__getOwnPropSymbols$n)
|
|
5187
|
-
for (var prop of __getOwnPropSymbols$n(b))
|
|
5188
|
-
__propIsEnum$n.call(b, prop) && __defNormalProp$n(a, prop, b[prop]);
|
|
5189
|
-
return a;
|
|
5190
|
-
}, __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b)), __objRest$k = (source, exclude) => {
|
|
5191
|
-
var target = {};
|
|
5192
|
-
for (var prop in source)
|
|
5193
|
-
__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5194
|
-
if (source != null && __getOwnPropSymbols$n)
|
|
5195
|
-
for (var prop of __getOwnPropSymbols$n(source))
|
|
5196
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop) && (target[prop] = source[prop]);
|
|
5197
|
-
return target;
|
|
5198
|
-
};
|
|
5199
4492
|
const Root$d = styled.span(switchBaseStyles), Input$2 = styled.input(switchInputStyles), Representation = styled.span(switchRepresentationStyles), Track = styled.span(switchTrackStyles), Thumb = styled.span(switchThumbStyles), Switch = forwardRef(function(props, forwardedRef) {
|
|
5200
|
-
var _a;
|
|
5201
4493
|
const $ = c(26);
|
|
5202
4494
|
let checked, className, disabled, indeterminate, readOnly, restProps, style;
|
|
5203
|
-
$[0] !== props ? (
|
|
4495
|
+
$[0] !== props ? ({
|
|
5204
4496
|
checked,
|
|
5205
4497
|
className,
|
|
5206
4498
|
disabled,
|
|
5207
4499
|
indeterminate,
|
|
5208
4500
|
readOnly,
|
|
5209
|
-
style
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
"className",
|
|
5213
|
-
"disabled",
|
|
5214
|
-
"indeterminate",
|
|
5215
|
-
"readOnly",
|
|
5216
|
-
"style"
|
|
5217
|
-
]), $[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]);
|
|
4501
|
+
style,
|
|
4502
|
+
...restProps
|
|
4503
|
+
} = 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]);
|
|
5218
4504
|
const ref = useRef(null);
|
|
5219
4505
|
let t0;
|
|
5220
4506
|
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[8] = t0) : t0 = $[8], useImperativeHandle(forwardedRef, t0);
|
|
@@ -5224,7 +4510,7 @@ const Root$d = styled.span(switchBaseStyles), Input$2 = styled.input(switchInput
|
|
|
5224
4510
|
}, t2 = [indeterminate], $[9] = indeterminate, $[10] = t1, $[11] = t2) : (t1 = $[10], t2 = $[11]), useEffect(t1, t2);
|
|
5225
4511
|
const t3 = !disabled && readOnly ? "" : void 0, t4 = indeterminate !== !0 && checked, t5 = disabled || readOnly;
|
|
5226
4512
|
let t6;
|
|
5227
|
-
$[12] !== restProps || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsx(Input$2,
|
|
4513
|
+
$[12] !== restProps || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ 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];
|
|
5228
4514
|
let t7;
|
|
5229
4515
|
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsx(Track, {}), $[17] = t7) : t7 = $[17];
|
|
5230
4516
|
let t8;
|
|
@@ -5239,32 +4525,15 @@ const Root$d = styled.span(switchBaseStyles), Input$2 = styled.input(switchInput
|
|
|
5239
4525
|
] }), $[21] = className, $[22] = style, $[23] = t6, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
|
|
5240
4526
|
});
|
|
5241
4527
|
Switch.displayName = "ForwardRef(Switch)";
|
|
5242
|
-
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) => {
|
|
5243
|
-
for (var prop in b || (b = {}))
|
|
5244
|
-
__hasOwnProp$m.call(b, prop) && __defNormalProp$m(a, prop, b[prop]);
|
|
5245
|
-
if (__getOwnPropSymbols$m)
|
|
5246
|
-
for (var prop of __getOwnPropSymbols$m(b))
|
|
5247
|
-
__propIsEnum$m.call(b, prop) && __defNormalProp$m(a, prop, b[prop]);
|
|
5248
|
-
return a;
|
|
5249
|
-
}, __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b)), __objRest$j = (source, exclude) => {
|
|
5250
|
-
var target = {};
|
|
5251
|
-
for (var prop in source)
|
|
5252
|
-
__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5253
|
-
if (source != null && __getOwnPropSymbols$m)
|
|
5254
|
-
for (var prop of __getOwnPropSymbols$m(source))
|
|
5255
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop) && (target[prop] = source[prop]);
|
|
5256
|
-
return target;
|
|
5257
|
-
};
|
|
5258
4528
|
const Root$c = styled.span(textInputRootStyle), InputRoot$1 = styled.span`
|
|
5259
4529
|
flex: 1;
|
|
5260
4530
|
min-width: 0;
|
|
5261
4531
|
display: block;
|
|
5262
4532
|
position: relative;
|
|
5263
4533
|
`, Input$1 = styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation$1 = styled.div(responsiveRadiusStyle, textInputRepresentationStyle), TextArea = forwardRef(function(props, forwardedRef) {
|
|
5264
|
-
var _a;
|
|
5265
4534
|
const $ = c(29);
|
|
5266
4535
|
let __unstable_disableFocusRing, customValidity, restProps, t0, t1, t2, t3, t4, weight;
|
|
5267
|
-
$[0] !== props ? (
|
|
4536
|
+
$[0] !== props ? ({
|
|
5268
4537
|
border: t0,
|
|
5269
4538
|
customValidity,
|
|
5270
4539
|
disabled: t1,
|
|
@@ -5272,23 +4541,15 @@ const Root$c = styled.span(textInputRootStyle), InputRoot$1 = styled.span`
|
|
|
5272
4541
|
padding: t3,
|
|
5273
4542
|
radius: t4,
|
|
5274
4543
|
weight,
|
|
5275
|
-
__unstable_disableFocusRing
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
"customValidity",
|
|
5279
|
-
"disabled",
|
|
5280
|
-
"fontSize",
|
|
5281
|
-
"padding",
|
|
5282
|
-
"radius",
|
|
5283
|
-
"weight",
|
|
5284
|
-
"__unstable_disableFocusRing"
|
|
5285
|
-
]), $[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]);
|
|
4544
|
+
__unstable_disableFocusRing,
|
|
4545
|
+
...restProps
|
|
4546
|
+
} = 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]);
|
|
5286
4547
|
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 = useRef(null), rootTheme = useRootTheme();
|
|
5287
4548
|
let t5;
|
|
5288
4549
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[10] = t5) : t5 = $[10], useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
|
|
5289
4550
|
const t6 = rootTheme.scheme, t7 = rootTheme.tone, t8 = useArrayProp(fontSize2), t9 = useArrayProp(padding), t10 = rootTheme.scheme, t11 = useArrayProp(0);
|
|
5290
4551
|
let t12;
|
|
5291
|
-
$[11] !== disabled || $[12] !== restProps || $[13] !== rootTheme.scheme || $[14] !== rootTheme.tone || $[15] !== t11 || $[16] !== t8 || $[17] !== t9 || $[18] !== weight ? (t12 = /* @__PURE__ */ jsx(Input$1,
|
|
4552
|
+
$[11] !== disabled || $[12] !== restProps || $[13] !== rootTheme.scheme || $[14] !== rootTheme.tone || $[15] !== t11 || $[16] !== t8 || $[17] !== t9 || $[18] !== weight ? (t12 = /* @__PURE__ */ 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];
|
|
5292
4553
|
const t13 = useArrayProp(radius), t14 = border2 ? "" : void 0;
|
|
5293
4554
|
let t15;
|
|
5294
4555
|
$[20] !== __unstable_disableFocusRing || $[21] !== rootTheme.scheme || $[22] !== rootTheme.tone || $[23] !== t13 || $[24] !== t14 ? (t15 = /* @__PURE__ */ 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];
|
|
@@ -5299,22 +4560,6 @@ const Root$c = styled.span(textInputRootStyle), InputRoot$1 = styled.span`
|
|
|
5299
4560
|
] }) }), $[26] = t12, $[27] = t15, $[28] = t16) : t16 = $[28], t16;
|
|
5300
4561
|
});
|
|
5301
4562
|
TextArea.displayName = "ForwardRef(TextArea)";
|
|
5302
|
-
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) => {
|
|
5303
|
-
for (var prop in b || (b = {}))
|
|
5304
|
-
__hasOwnProp$l.call(b, prop) && __defNormalProp$l(a, prop, b[prop]);
|
|
5305
|
-
if (__getOwnPropSymbols$l)
|
|
5306
|
-
for (var prop of __getOwnPropSymbols$l(b))
|
|
5307
|
-
__propIsEnum$l.call(b, prop) && __defNormalProp$l(a, prop, b[prop]);
|
|
5308
|
-
return a;
|
|
5309
|
-
}, __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b)), __objRest$i = (source, exclude) => {
|
|
5310
|
-
var target = {};
|
|
5311
|
-
for (var prop in source)
|
|
5312
|
-
__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5313
|
-
if (source != null && __getOwnPropSymbols$l)
|
|
5314
|
-
for (var prop of __getOwnPropSymbols$l(source))
|
|
5315
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop) && (target[prop] = source[prop]);
|
|
5316
|
-
return target;
|
|
5317
|
-
};
|
|
5318
4563
|
const CLEAR_BUTTON_BOX_STYLE = {
|
|
5319
4564
|
zIndex: 2
|
|
5320
4565
|
}, Root$b = styled(Card).attrs({
|
|
@@ -5362,10 +4607,9 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
5362
4607
|
display: "block"
|
|
5363
4608
|
}
|
|
5364
4609
|
}), TextInput = forwardRef(function(props, forwardedRef) {
|
|
5365
|
-
var _a;
|
|
5366
4610
|
const $ = c(84);
|
|
5367
4611
|
let IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
|
|
5368
|
-
$[0] !== props ? (
|
|
4612
|
+
$[0] !== props ? ({
|
|
5369
4613
|
__unstable_disableFocusRing,
|
|
5370
4614
|
border: t0,
|
|
5371
4615
|
clearButton,
|
|
@@ -5382,34 +4626,16 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
5382
4626
|
suffix,
|
|
5383
4627
|
customValidity,
|
|
5384
4628
|
type: t6,
|
|
5385
|
-
weight
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
"border",
|
|
5389
|
-
"clearButton",
|
|
5390
|
-
"disabled",
|
|
5391
|
-
"fontSize",
|
|
5392
|
-
"icon",
|
|
5393
|
-
"iconRight",
|
|
5394
|
-
"onClear",
|
|
5395
|
-
"padding",
|
|
5396
|
-
"prefix",
|
|
5397
|
-
"radius",
|
|
5398
|
-
"readOnly",
|
|
5399
|
-
"space",
|
|
5400
|
-
"suffix",
|
|
5401
|
-
"customValidity",
|
|
5402
|
-
"type",
|
|
5403
|
-
"weight"
|
|
5404
|
-
]), $[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]);
|
|
4629
|
+
weight,
|
|
4630
|
+
...restProps
|
|
4631
|
+
} = 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]);
|
|
5405
4632
|
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 = 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;
|
|
5406
4633
|
let t7;
|
|
5407
4634
|
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
5408
4635
|
const handleClearMouseDown = _temp$3;
|
|
5409
4636
|
let t8;
|
|
5410
4637
|
$[20] !== onClear ? (t8 = (event_0) => {
|
|
5411
|
-
|
|
5412
|
-
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), (_a2 = ref.current) == null || _a2.focus();
|
|
4638
|
+
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
|
|
5413
4639
|
}, $[20] = onClear, $[21] = t8) : t8 = $[21];
|
|
5414
4640
|
const handleClearClick = t8;
|
|
5415
4641
|
let t9, t10;
|
|
@@ -5443,13 +4669,13 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
5443
4669
|
t20 = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
|
|
5444
4670
|
const clearButtonProps = t20;
|
|
5445
4671
|
let t21, t22;
|
|
5446
|
-
$[48] !== clearButton || $[49] !== clearButtonBoxPadding || $[50] !== clearButtonPadding || $[51] !== clearButtonProps || $[52] !== customValidity || $[53] !== disabled || $[54] !== fontSize2 || $[55] !== handleClearClick || $[56] !== radius || $[57] !== readOnly ? (t22 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsx(TextInputClearButton,
|
|
4672
|
+
$[48] !== clearButton || $[49] !== clearButtonBoxPadding || $[50] !== clearButtonPadding || $[51] !== clearButtonProps || $[52] !== customValidity || $[53] !== disabled || $[54] !== fontSize2 || $[55] !== handleClearClick || $[56] !== radius || $[57] !== readOnly ? (t22 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[48] = clearButton, $[49] = clearButtonBoxPadding, $[50] = clearButtonPadding, $[51] = clearButtonProps, $[52] = customValidity, $[53] = disabled, $[54] = fontSize2, $[55] = handleClearClick, $[56] = radius, $[57] = readOnly, $[58] = t22) : t22 = $[58], t21 = t22;
|
|
5447
4673
|
const clearButtonNode = t21;
|
|
5448
4674
|
let t23, t24;
|
|
5449
4675
|
$[59] !== radius || $[60] !== suffix ? (t24 = suffix && /* @__PURE__ */ jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsx("span", { children: suffix }) }), $[59] = radius, $[60] = suffix, $[61] = t24) : t24 = $[61], t23 = t24;
|
|
5450
4676
|
const suffixNode = t23, t25 = $hasIconRight || $hasClearButton;
|
|
5451
4677
|
let t26;
|
|
5452
|
-
$[62] !== $hasIcon || $[63] !== disabled || $[64] !== fontSize2 || $[65] !== padding || $[66] !== readOnly || $[67] !== restProps || $[68] !== rootTheme.scheme || $[69] !== rootTheme.tone || $[70] !== space || $[71] !== t25 || $[72] !== type || $[73] !== weight ? (t26 = /* @__PURE__ */ jsx(Input,
|
|
4678
|
+
$[62] !== $hasIcon || $[63] !== disabled || $[64] !== fontSize2 || $[65] !== padding || $[66] !== readOnly || $[67] !== restProps || $[68] !== rootTheme.scheme || $[69] !== rootTheme.tone || $[70] !== space || $[71] !== t25 || $[72] !== type || $[73] !== weight ? (t26 = /* @__PURE__ */ jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: t25, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }), $[62] = $hasIcon, $[63] = disabled, $[64] = fontSize2, $[65] = padding, $[66] = readOnly, $[67] = restProps, $[68] = rootTheme.scheme, $[69] = rootTheme.tone, $[70] = space, $[71] = t25, $[72] = type, $[73] = weight, $[74] = t26) : t26 = $[74];
|
|
5453
4679
|
let t27;
|
|
5454
4680
|
$[75] !== clearButtonNode || $[76] !== presentationNode || $[77] !== t26 ? (t27 = /* @__PURE__ */ jsxs(InputRoot, { children: [
|
|
5455
4681
|
t26,
|
|
@@ -5501,33 +4727,15 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
5501
4727
|
right: ["right-end", "right-start", "left", "top", "bottom"],
|
|
5502
4728
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
5503
4729
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
5504
|
-
}
|
|
5505
|
-
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) => {
|
|
5506
|
-
for (var prop in b || (b = {}))
|
|
5507
|
-
__hasOwnProp$k.call(b, prop) && __defNormalProp$k(a, prop, b[prop]);
|
|
5508
|
-
if (__getOwnPropSymbols$k)
|
|
5509
|
-
for (var prop of __getOwnPropSymbols$k(b))
|
|
5510
|
-
__propIsEnum$k.call(b, prop) && __defNormalProp$k(a, prop, b[prop]);
|
|
5511
|
-
return a;
|
|
5512
|
-
}, __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b)), __objRest$h = (source, exclude) => {
|
|
5513
|
-
var target = {};
|
|
5514
|
-
for (var prop in source)
|
|
5515
|
-
__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5516
|
-
if (source != null && __getOwnPropSymbols$k)
|
|
5517
|
-
for (var prop of __getOwnPropSymbols$k(source))
|
|
5518
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop) && (target[prop] = source[prop]);
|
|
5519
|
-
return target;
|
|
5520
|
-
};
|
|
5521
|
-
const MotionCard = styled(motion.create(Card))`
|
|
4730
|
+
}, MotionCard = styled(motion.create(Card))`
|
|
5522
4731
|
& > * {
|
|
5523
4732
|
opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
|
|
5524
4733
|
will-change: opacity;
|
|
5525
4734
|
}
|
|
5526
4735
|
`, TooltipCard = memo(forwardRef(function(props, ref) {
|
|
5527
|
-
var _a;
|
|
5528
4736
|
const $ = c(42);
|
|
5529
4737
|
let animate, arrow2, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, restProps, scheme, shadow, style;
|
|
5530
|
-
$[0] !== props ? (
|
|
4738
|
+
$[0] !== props ? ({
|
|
5531
4739
|
animate,
|
|
5532
4740
|
arrow: arrow2,
|
|
5533
4741
|
arrowRef,
|
|
@@ -5541,31 +4749,18 @@ const MotionCard = styled(motion.create(Card))`
|
|
|
5541
4749
|
radius,
|
|
5542
4750
|
scheme,
|
|
5543
4751
|
shadow,
|
|
5544
|
-
style
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
"arrow",
|
|
5548
|
-
"arrowRef",
|
|
5549
|
-
"arrowX",
|
|
5550
|
-
"arrowY",
|
|
5551
|
-
"children",
|
|
5552
|
-
"originX",
|
|
5553
|
-
"originY",
|
|
5554
|
-
"padding",
|
|
5555
|
-
"placement",
|
|
5556
|
-
"radius",
|
|
5557
|
-
"scheme",
|
|
5558
|
-
"shadow",
|
|
5559
|
-
"style"
|
|
5560
|
-
]), $[0] = props, $[1] = animate, $[2] = arrow2, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = restProps, $[13] = scheme, $[14] = shadow, $[15] = style) : (animate = $[1], arrow2 = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], restProps = $[12], scheme = $[13], shadow = $[14], style = $[15]);
|
|
4752
|
+
style,
|
|
4753
|
+
...restProps
|
|
4754
|
+
} = props, $[0] = props, $[1] = animate, $[2] = arrow2, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = restProps, $[13] = scheme, $[14] = shadow, $[15] = style) : (animate = $[1], arrow2 = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], restProps = $[12], scheme = $[13], shadow = $[14], style = $[15]);
|
|
5561
4755
|
let t0;
|
|
5562
4756
|
const t1 = animate ? "transform" : void 0;
|
|
5563
4757
|
let t2;
|
|
5564
|
-
$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t1 ? (t2 =
|
|
4758
|
+
$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t1 ? (t2 = {
|
|
5565
4759
|
originX,
|
|
5566
4760
|
originY,
|
|
5567
|
-
willChange: t1
|
|
5568
|
-
|
|
4761
|
+
willChange: t1,
|
|
4762
|
+
...style
|
|
4763
|
+
}, $[16] = originX, $[17] = originY, $[18] = style, $[19] = t1, $[20] = t2) : t2 = $[20], t0 = t2;
|
|
5569
4764
|
const rootStyle2 = t0;
|
|
5570
4765
|
let t3;
|
|
5571
4766
|
const t4 = arrowX !== null ? arrowX : void 0, t5 = arrowY !== null ? arrowY : void 0;
|
|
@@ -5582,10 +4777,10 @@ const MotionCard = styled(motion.create(Card))`
|
|
|
5582
4777
|
let t9;
|
|
5583
4778
|
$[26] !== arrow2 || $[27] !== arrowRef || $[28] !== arrowStyle ? (t9 = arrow2 && /* @__PURE__ */ jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[26] = arrow2, $[27] = arrowRef, $[28] = arrowStyle, $[29] = t9) : t9 = $[29];
|
|
5584
4779
|
let t10;
|
|
5585
|
-
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__ */ jsxs(MotionCard,
|
|
4780
|
+
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__ */ jsxs(MotionCard, { "data-ui": "Tooltip__card", ...t7, "data-placement": placement, padding, radius, ref, scheme, shadow, style: rootStyle2, ...t8, children: [
|
|
5586
4781
|
children,
|
|
5587
4782
|
t9
|
|
5588
|
-
] })
|
|
4783
|
+
] }), $[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;
|
|
5589
4784
|
}));
|
|
5590
4785
|
TooltipCard.displayName = "Memo(ForwardRef(TooltipCard))";
|
|
5591
4786
|
const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
|
|
@@ -5596,7 +4791,7 @@ function TooltipDelayGroupProvider(props) {
|
|
|
5596
4791
|
const $ = c(10), {
|
|
5597
4792
|
children,
|
|
5598
4793
|
delay
|
|
5599
|
-
} = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay :
|
|
4794
|
+
} = 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;
|
|
5600
4795
|
let t0;
|
|
5601
4796
|
const t1 = isGroupActive ? 1 : openDelay;
|
|
5602
4797
|
let t2;
|
|
@@ -5613,36 +4808,19 @@ function TooltipDelayGroupProvider(props) {
|
|
|
5613
4808
|
return $[7] !== children || $[8] !== value ? (t3 = /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, { value, children }), $[7] = children, $[8] = value, $[9] = t3) : t3 = $[9], t3;
|
|
5614
4809
|
}
|
|
5615
4810
|
TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
|
|
5616
|
-
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) => {
|
|
5617
|
-
for (var prop in b || (b = {}))
|
|
5618
|
-
__hasOwnProp$j.call(b, prop) && __defNormalProp$j(a, prop, b[prop]);
|
|
5619
|
-
if (__getOwnPropSymbols$j)
|
|
5620
|
-
for (var prop of __getOwnPropSymbols$j(b))
|
|
5621
|
-
__propIsEnum$j.call(b, prop) && __defNormalProp$j(a, prop, b[prop]);
|
|
5622
|
-
return a;
|
|
5623
|
-
}, __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b)), __objRest$g = (source, exclude) => {
|
|
5624
|
-
var target = {};
|
|
5625
|
-
for (var prop in source)
|
|
5626
|
-
__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5627
|
-
if (source != null && __getOwnPropSymbols$j)
|
|
5628
|
-
for (var prop of __getOwnPropSymbols$j(source))
|
|
5629
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop) && (target[prop] = source[prop]);
|
|
5630
|
-
return target;
|
|
5631
|
-
};
|
|
5632
4811
|
const Root$a = styled(Layer)`
|
|
5633
4812
|
pointer-events: none;
|
|
5634
4813
|
`, Tooltip = forwardRef(function(props, forwardedRef) {
|
|
5635
|
-
var _a, _b, _d, _e, _f, _g, _h;
|
|
5636
4814
|
const boundaryElementContext = useBoundaryElement(), {
|
|
5637
4815
|
layer
|
|
5638
|
-
} = useTheme_v2(),
|
|
4816
|
+
} = useTheme_v2(), {
|
|
5639
4817
|
animate: _animate = !1,
|
|
5640
4818
|
arrow: arrowProp = !1,
|
|
5641
|
-
boundaryElement = boundaryElementContext
|
|
4819
|
+
boundaryElement = boundaryElementContext?.element,
|
|
5642
4820
|
children: childProp,
|
|
5643
4821
|
content,
|
|
5644
4822
|
disabled,
|
|
5645
|
-
fallbackPlacements: fallbackPlacementsProp =
|
|
4823
|
+
fallbackPlacements: fallbackPlacementsProp = props.fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS[props.placement ?? "bottom"],
|
|
5646
4824
|
padding = 2,
|
|
5647
4825
|
placement: placementProp = "bottom",
|
|
5648
4826
|
portal: portalProp,
|
|
@@ -5650,26 +4828,11 @@ const Root$a = styled(Layer)`
|
|
|
5650
4828
|
scheme,
|
|
5651
4829
|
shadow = 2,
|
|
5652
4830
|
zOffset = layer.tooltip.zOffset,
|
|
5653
|
-
delay
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
"arrow",
|
|
5657
|
-
"boundaryElement",
|
|
5658
|
-
"children",
|
|
5659
|
-
"content",
|
|
5660
|
-
"disabled",
|
|
5661
|
-
"fallbackPlacements",
|
|
5662
|
-
"padding",
|
|
5663
|
-
"placement",
|
|
5664
|
-
"portal",
|
|
5665
|
-
"radius",
|
|
5666
|
-
"scheme",
|
|
5667
|
-
"shadow",
|
|
5668
|
-
"zOffset",
|
|
5669
|
-
"delay"
|
|
5670
|
-
]), animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = useState(0);
|
|
4831
|
+
delay,
|
|
4832
|
+
...restProps
|
|
4833
|
+
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = useRef(null), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = useState(0);
|
|
5671
4834
|
useImperativeHandle(forwardedRef, () => ref.current);
|
|
5672
|
-
const portal = usePortal(), portalElement = typeof portalProp == "string" ?
|
|
4835
|
+
const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements?.[portalProp] || null : portal.element, middleware = useMemo(() => {
|
|
5673
4836
|
const ret = [];
|
|
5674
4837
|
return ret.push(flip({
|
|
5675
4838
|
boundary: boundaryElement || void 0,
|
|
@@ -5699,7 +4862,7 @@ const Root$a = styled(Layer)`
|
|
|
5699
4862
|
elements: {
|
|
5700
4863
|
reference: referenceElement
|
|
5701
4864
|
}
|
|
5702
|
-
}), arrowX =
|
|
4865
|
+
}), arrowX = middlewareData.arrow?.x, arrowY = middlewareData.arrow?.y, originX = middlewareData["@sanity/ui/origin"]?.originX, originY = middlewareData["@sanity/ui/origin"]?.originY, tooltipId = 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 = useCallback((open, immediate) => {
|
|
5703
4866
|
if (isInsideGroup)
|
|
5704
4867
|
if (open) {
|
|
5705
4868
|
const groupedOpenDelay = immediate ? 0 : openDelay;
|
|
@@ -5711,24 +4874,18 @@ const Root$a = styled(Layer)`
|
|
|
5711
4874
|
else
|
|
5712
4875
|
setIsOpen(open, immediate ? 0 : open ? openDelay : closeDelay);
|
|
5713
4876
|
}, [isInsideGroup, delayGroupContext, openDelay, tooltipId, closeDelay, setIsOpen]), handleBlur = useCallback((e) => {
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
handleIsOpenChange(!1, !0),
|
|
5719
|
-
}, [childProp
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
handleIsOpenChange(!
|
|
5725
|
-
}, [childProp
|
|
5726
|
-
var _a2, _b2;
|
|
5727
|
-
handleIsOpenChange(!0), (_b2 = (_a2 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a2.onMouseEnter) == null || _b2.call(_a2, e_3);
|
|
5728
|
-
}, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]), handleMouseLeave = useCallback((e_4) => {
|
|
5729
|
-
var _a2, _b2;
|
|
5730
|
-
handleIsOpenChange(!1), (_b2 = (_a2 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a2.onMouseLeave) == null || _b2.call(_a2, e_4);
|
|
5731
|
-
}, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]);
|
|
4877
|
+
handleIsOpenChange(!1), childProp?.props?.onBlur?.(e);
|
|
4878
|
+
}, [childProp?.props, handleIsOpenChange]), handleClick = useCallback((e_0) => {
|
|
4879
|
+
handleIsOpenChange(!1, !0), childProp?.props.onClick?.(e_0);
|
|
4880
|
+
}, [childProp?.props, handleIsOpenChange]), handleContextMenu = useCallback((e_1) => {
|
|
4881
|
+
handleIsOpenChange(!1, !0), childProp?.props.onContextMenu?.(e_1);
|
|
4882
|
+
}, [childProp?.props, handleIsOpenChange]), handleFocus = useCallback((e_2) => {
|
|
4883
|
+
handleIsOpenChange(!0), childProp?.props?.onFocus?.(e_2);
|
|
4884
|
+
}, [childProp?.props, handleIsOpenChange]), handleMouseEnter = useCallback((e_3) => {
|
|
4885
|
+
handleIsOpenChange(!0), childProp?.props?.onMouseEnter?.(e_3);
|
|
4886
|
+
}, [childProp?.props, handleIsOpenChange]), handleMouseLeave = useCallback((e_4) => {
|
|
4887
|
+
handleIsOpenChange(!1), childProp?.props?.onMouseLeave?.(e_4);
|
|
4888
|
+
}, [childProp?.props, handleIsOpenChange]);
|
|
5732
4889
|
useCloseOnMouseLeave({
|
|
5733
4890
|
handleIsOpenChange,
|
|
5734
4891
|
referenceElement,
|
|
@@ -5746,7 +4903,7 @@ const Root$a = styled(Layer)`
|
|
|
5746
4903
|
window.removeEventListener("keydown", handleWindowKeyDown);
|
|
5747
4904
|
};
|
|
5748
4905
|
}, [handleIsOpenChange, showTooltip]), useLayoutEffect(() => {
|
|
5749
|
-
const availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [],
|
|
4906
|
+
const availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [], portalElement?.offsetWidth || document.body.offsetWidth];
|
|
5750
4907
|
setTooltipMaxWidth(Math.min(...availableWidths) - DEFAULT_TOOLTIP_PADDING * 2);
|
|
5751
4908
|
}, [boundaryElement, portalElement]);
|
|
5752
4909
|
const setArrow = useCallback((arrowEl) => {
|
|
@@ -5754,7 +4911,7 @@ const Root$a = styled(Layer)`
|
|
|
5754
4911
|
}, [update]), setFloating = useCallback((node) => {
|
|
5755
4912
|
ref.current = node, refs.setFloating(node);
|
|
5756
4913
|
}, [refs]), childRef = useRef(null);
|
|
5757
|
-
useImperativeHandle(childProp
|
|
4914
|
+
useImperativeHandle(childProp?.ref, () => childRef.current);
|
|
5758
4915
|
const child = useMemo(() => childProp ? cloneElement(childProp, {
|
|
5759
4916
|
onBlur: handleBlur,
|
|
5760
4917
|
onFocus: handleFocus,
|
|
@@ -5769,9 +4926,10 @@ const Root$a = styled(Layer)`
|
|
|
5769
4926
|
return setReferenceElement(childRef.current), () => setReferenceElement(null);
|
|
5770
4927
|
}, [child]), !child) return /* @__PURE__ */ jsx(Fragment, {});
|
|
5771
4928
|
if (disabled) return child;
|
|
5772
|
-
const tooltip = /* @__PURE__ */ jsx(Root$a,
|
|
4929
|
+
const tooltip = /* @__PURE__ */ jsx(Root$a, { "data-ui": "Tooltip", ...restProps, ref: setFloating, style: {
|
|
4930
|
+
...floatingStyles,
|
|
5773
4931
|
maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
|
|
5774
|
-
}
|
|
4932
|
+
}, zOffset, children: /* @__PURE__ */ 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__ */ jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: tooltip }) : tooltip);
|
|
5775
4933
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5776
4934
|
animate ? /* @__PURE__ */ jsx(AnimatePresence, { children }) : children,
|
|
5777
4935
|
child
|
|
@@ -5841,63 +4999,47 @@ function AutocompleteOption(props) {
|
|
|
5841
4999
|
let t2;
|
|
5842
5000
|
return $[5] !== children || $[6] !== handleClick || $[7] !== handleKeyDown || $[8] !== id || $[9] !== selected ? (t2 = /* @__PURE__ */ 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;
|
|
5843
5001
|
}
|
|
5844
|
-
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) => {
|
|
5845
|
-
for (var prop in b || (b = {}))
|
|
5846
|
-
__hasOwnProp$i.call(b, prop) && __defNormalProp$i(a, prop, b[prop]);
|
|
5847
|
-
if (__getOwnPropSymbols$i)
|
|
5848
|
-
for (var prop of __getOwnPropSymbols$i(b))
|
|
5849
|
-
__propIsEnum$i.call(b, prop) && __defNormalProp$i(a, prop, b[prop]);
|
|
5850
|
-
return a;
|
|
5851
|
-
}, __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
5852
5002
|
function autocompleteReducer(state, msg2) {
|
|
5853
|
-
return msg2.type === "input/change" ?
|
|
5003
|
+
return msg2.type === "input/change" ? {
|
|
5004
|
+
...state,
|
|
5854
5005
|
activeValue: null,
|
|
5855
5006
|
focused: !0,
|
|
5856
5007
|
query: msg2.query
|
|
5857
|
-
}
|
|
5008
|
+
} : msg2.type === "input/focus" ? {
|
|
5009
|
+
...state,
|
|
5858
5010
|
focused: !0
|
|
5859
|
-
}
|
|
5011
|
+
} : msg2.type === "root/blur" ? {
|
|
5012
|
+
...state,
|
|
5860
5013
|
focused: !1,
|
|
5861
5014
|
query: null
|
|
5862
|
-
}
|
|
5015
|
+
} : msg2.type === "root/clear" ? {
|
|
5016
|
+
...state,
|
|
5863
5017
|
activeValue: null,
|
|
5864
5018
|
query: null,
|
|
5865
5019
|
value: null
|
|
5866
|
-
}
|
|
5020
|
+
} : msg2.type === "root/escape" ? {
|
|
5021
|
+
...state,
|
|
5867
5022
|
focused: !1,
|
|
5868
5023
|
query: null
|
|
5869
|
-
}
|
|
5024
|
+
} : msg2.type === "root/open" ? {
|
|
5025
|
+
...state,
|
|
5870
5026
|
query: state.query || msg2.query
|
|
5871
|
-
}
|
|
5027
|
+
} : msg2.type === "root/setActiveValue" ? {
|
|
5028
|
+
...state,
|
|
5872
5029
|
activeValue: msg2.value,
|
|
5873
5030
|
listFocused: msg2.listFocused || state.listFocused
|
|
5874
|
-
}
|
|
5031
|
+
} : msg2.type === "root/setListFocused" ? {
|
|
5032
|
+
...state,
|
|
5875
5033
|
listFocused: msg2.listFocused
|
|
5876
|
-
}
|
|
5034
|
+
} : msg2.type === "value/change" ? {
|
|
5035
|
+
...state,
|
|
5877
5036
|
activeValue: msg2.value,
|
|
5878
5037
|
query: null,
|
|
5879
5038
|
value: msg2.value
|
|
5880
|
-
}
|
|
5881
|
-
}
|
|
5882
|
-
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"]
|
|
5883
|
-
|
|
5884
|
-
for (var prop in b || (b = {}))
|
|
5885
|
-
__hasOwnProp$h.call(b, prop) && __defNormalProp$h(a, prop, b[prop]);
|
|
5886
|
-
if (__getOwnPropSymbols$h)
|
|
5887
|
-
for (var prop of __getOwnPropSymbols$h(b))
|
|
5888
|
-
__propIsEnum$h.call(b, prop) && __defNormalProp$h(a, prop, b[prop]);
|
|
5889
|
-
return a;
|
|
5890
|
-
}, __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b)), __objRest$f = (source, exclude) => {
|
|
5891
|
-
var target = {};
|
|
5892
|
-
for (var prop in source)
|
|
5893
|
-
__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5894
|
-
if (source != null && __getOwnPropSymbols$h)
|
|
5895
|
-
for (var prop of __getOwnPropSymbols$h(source))
|
|
5896
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop) && (target[prop] = source[prop]);
|
|
5897
|
-
return target;
|
|
5898
|
-
};
|
|
5899
|
-
const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, DEFAULT_FILTER_OPTION = (query, option) => option.value.toLowerCase().indexOf(query.toLowerCase()) > -1, InnerAutocomplete = forwardRef(function(props, forwardedRef) {
|
|
5900
|
-
const _a = props, {
|
|
5039
|
+
} : state;
|
|
5040
|
+
}
|
|
5041
|
+
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 = forwardRef(function(props, forwardedRef) {
|
|
5042
|
+
const {
|
|
5901
5043
|
border: border2 = !0,
|
|
5902
5044
|
customValidity,
|
|
5903
5045
|
disabled,
|
|
@@ -5925,37 +5067,9 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
5925
5067
|
renderPopover,
|
|
5926
5068
|
renderValue = DEFAULT_RENDER_VALUE,
|
|
5927
5069
|
suffix,
|
|
5928
|
-
value: valueProp
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
"customValidity",
|
|
5932
|
-
"disabled",
|
|
5933
|
-
"filterOption",
|
|
5934
|
-
"fontSize",
|
|
5935
|
-
"icon",
|
|
5936
|
-
"id",
|
|
5937
|
-
"listBox",
|
|
5938
|
-
"loading",
|
|
5939
|
-
"onBlur",
|
|
5940
|
-
"onChange",
|
|
5941
|
-
"onFocus",
|
|
5942
|
-
"onQueryChange",
|
|
5943
|
-
"onSelect",
|
|
5944
|
-
"openButton",
|
|
5945
|
-
"openOnFocus",
|
|
5946
|
-
"options",
|
|
5947
|
-
"padding",
|
|
5948
|
-
"popover",
|
|
5949
|
-
"prefix",
|
|
5950
|
-
"radius",
|
|
5951
|
-
"readOnly",
|
|
5952
|
-
"relatedElements",
|
|
5953
|
-
"renderOption",
|
|
5954
|
-
"renderPopover",
|
|
5955
|
-
"renderValue",
|
|
5956
|
-
"suffix",
|
|
5957
|
-
"value"
|
|
5958
|
-
]), [state, dispatch] = useReducer(autocompleteReducer, {
|
|
5070
|
+
value: valueProp,
|
|
5071
|
+
...restProps
|
|
5072
|
+
} = props, [state, dispatch] = useReducer(autocompleteReducer, {
|
|
5959
5073
|
activeValue: valueProp || null,
|
|
5960
5074
|
focused: !1,
|
|
5961
5075
|
listFocused: !1,
|
|
@@ -5989,19 +5103,17 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
5989
5103
|
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), onBlur && onBlur(event));
|
|
5990
5104
|
}, 0);
|
|
5991
5105
|
}, [onBlur, onQueryChange, relatedElements]), handleRootFocus = useCallback((event_0) => {
|
|
5992
|
-
const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 =
|
|
5106
|
+
const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = listBoxElement?.contains(focusedElement) || !1;
|
|
5993
5107
|
listFocused_0 !== listFocusedRef.current && (listFocusedRef.current = listFocused_0, dispatch({
|
|
5994
5108
|
type: "root/setListFocused",
|
|
5995
5109
|
listFocused: listFocused_0
|
|
5996
5110
|
}));
|
|
5997
5111
|
}, []), handleOptionSelect = useCallback((v) => {
|
|
5998
|
-
var _a2;
|
|
5999
5112
|
dispatch({
|
|
6000
5113
|
type: "value/change",
|
|
6001
5114
|
value: v
|
|
6002
|
-
}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null),
|
|
5115
|
+
}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
6003
5116
|
}, [onChange, onSelect, onQueryChange]), handleRootKeyDown = useCallback((event_1) => {
|
|
6004
|
-
var _a2, _b;
|
|
6005
5117
|
if (event_1.key === "ArrowDown") {
|
|
6006
5118
|
if (event_1.preventDefault(), !filteredOptionsLen) return;
|
|
6007
5119
|
const activeOption = filteredOptions.find((o_0) => o_0.value === activeValue), activeIndex = activeOption ? filteredOptions.indexOf(activeOption) : -1, nextActiveOption = filteredOptions[(activeIndex + 1) % filteredOptionsLen];
|
|
@@ -6025,12 +5137,12 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
6025
5137
|
if (event_1.key === "Escape") {
|
|
6026
5138
|
dispatch({
|
|
6027
5139
|
type: "root/escape"
|
|
6028
|
-
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null),
|
|
5140
|
+
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
6029
5141
|
return;
|
|
6030
5142
|
}
|
|
6031
5143
|
const target = event_1.target, listEl = listBoxElementRef.current;
|
|
6032
|
-
if ((listEl === target || listEl
|
|
6033
|
-
|
|
5144
|
+
if ((listEl === target || listEl?.contains(target)) && !AUTOCOMPLETE_LISTBOX_IGNORE_KEYS.includes(event_1.key)) {
|
|
5145
|
+
inputElementRef.current?.focus();
|
|
6034
5146
|
return;
|
|
6035
5147
|
}
|
|
6036
5148
|
}, [activeValue, filteredOptions, filteredOptionsLen, onQueryChange]), handleInputChange = useCallback((event_2) => {
|
|
@@ -6053,10 +5165,9 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
6053
5165
|
}, []), handlePopoverMouseLeave = useCallback(() => {
|
|
6054
5166
|
popoverMouseWithinRef.current = !1;
|
|
6055
5167
|
}, []), handleClearButtonClick = useCallback(() => {
|
|
6056
|
-
var _a2;
|
|
6057
5168
|
dispatch({
|
|
6058
5169
|
type: "root/clear"
|
|
6059
|
-
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null),
|
|
5170
|
+
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
|
|
6060
5171
|
}, [onChange, onQueryChange]), handleClearButtonFocus = useCallback(() => {
|
|
6061
5172
|
dispatch({
|
|
6062
5173
|
type: "input/focus"
|
|
@@ -6099,21 +5210,17 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
6099
5210
|
onFocus: handleClearButtonFocus
|
|
6100
5211
|
};
|
|
6101
5212
|
}, [disabled, handleClearButtonFocus, loading, value]), openButtonBoxPadding = useMemo(() => padding.map((v_0) => v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2), [padding]), openButtonPadding = useMemo(() => padding.map((v_1) => Math.max(v_1 - 1, 0)), [padding]), openButtonProps = useMemo(() => typeof openButton == "object" ? openButton : EMPTY_RECORD, [openButton]), handleOpenClick = useCallback((event_4) => {
|
|
6102
|
-
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() =>
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
}, [openButtonProps, dispatchOpen]), openButtonNode = useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsx(Button, __spreadProps$h(__spreadValues$h({ "aria-label": "Open", disabled: expanded, fontSize: fontSize2, icon: ChevronDownIcon, mode: "bleed", padding: openButtonPadding }, openButtonProps), { onClick: handleOpenClick })) }) : void 0, [disabled, expanded, fontSize2, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]), inputValue = useMemo(() => query === null ? value !== null ? renderValue(value, currentOption) : "" : query, [currentOption, query, renderValue, value]), input = /* @__PURE__ */ 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 = useCallback((event_5) => {
|
|
6107
|
-
var _a2;
|
|
6108
|
-
event_5.key === "Tab" && listFocused && ((_a2 = inputElementRef.current) == null || _a2.focus());
|
|
6109
|
-
}, [listFocused]), content = useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsx(ListBox, __spreadProps$h(__spreadValues$h({ "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1 }, listBox), { tabIndex: -1, children: /* @__PURE__ */ jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: filteredOptions.map((option_0) => {
|
|
5213
|
+
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
|
|
5214
|
+
}, [openButtonProps, dispatchOpen]), openButtonNode = useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsx(Button, { "aria-label": "Open", disabled: expanded, fontSize: fontSize2, icon: ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, [disabled, expanded, fontSize2, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]), inputValue = useMemo(() => query === null ? value !== null ? renderValue(value, currentOption) : "" : query, [currentOption, query, renderValue, value]), input = /* @__PURE__ */ 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 = useCallback((event_5) => {
|
|
5215
|
+
event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
|
|
5216
|
+
}, [listFocused]), content = useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsx(ListBox, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: /* @__PURE__ */ jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: filteredOptions.map((option_0) => {
|
|
6110
5217
|
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
6111
5218
|
return /* @__PURE__ */ jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: cloneElement(renderOption(option_0), {
|
|
6112
5219
|
disabled: loading,
|
|
6113
5220
|
selected: active,
|
|
6114
5221
|
tabIndex: listFocused && active ? 0 : -1
|
|
6115
5222
|
}) }, option_0.value);
|
|
6116
|
-
}) }) })
|
|
5223
|
+
}) }) }), [activeValue, currentOption, filteredOptions, handleOptionSelect, handleListBoxKeyDown, id, listBox, listBoxId, listFocused, loading, renderOption]), results = useMemo(() => renderPopover ? renderPopover({
|
|
6117
5224
|
content,
|
|
6118
5225
|
hidden: !expanded,
|
|
6119
5226
|
inputElement: inputElementRef.current,
|
|
@@ -6121,7 +5228,7 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
6121
5228
|
onMouseLeave: handlePopoverMouseLeave
|
|
6122
5229
|
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsx(
|
|
6123
5230
|
Popover,
|
|
6124
|
-
|
|
5231
|
+
{
|
|
6125
5232
|
arrow: !1,
|
|
6126
5233
|
constrainSize: !0,
|
|
6127
5234
|
content,
|
|
@@ -6135,8 +5242,9 @@ const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, D
|
|
|
6135
5242
|
portal: !0,
|
|
6136
5243
|
radius,
|
|
6137
5244
|
ref: resultsPopoverElementRef,
|
|
6138
|
-
referenceElement: inputElementRef.current
|
|
6139
|
-
|
|
5245
|
+
referenceElement: inputElementRef.current,
|
|
5246
|
+
...popover
|
|
5247
|
+
}
|
|
6140
5248
|
), [content, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, radius, renderPopover]);
|
|
6141
5249
|
return /* @__PURE__ */ jsxs(Root$9, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
|
|
6142
5250
|
input,
|
|
@@ -6155,35 +5263,14 @@ const Autocomplete = InnerAutocomplete, Root$8 = styled.ol`
|
|
|
6155
5263
|
`, ExpandButton = styled(Button)`
|
|
6156
5264
|
appearance: none;
|
|
6157
5265
|
margin: -4px;
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
for (var prop in b || (b = {}))
|
|
6161
|
-
__hasOwnProp$g.call(b, prop) && __defNormalProp$g(a, prop, b[prop]);
|
|
6162
|
-
if (__getOwnPropSymbols$g)
|
|
6163
|
-
for (var prop of __getOwnPropSymbols$g(b))
|
|
6164
|
-
__propIsEnum$g.call(b, prop) && __defNormalProp$g(a, prop, b[prop]);
|
|
6165
|
-
return a;
|
|
6166
|
-
}, __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b)), __objRest$e = (source, exclude) => {
|
|
6167
|
-
var target = {};
|
|
6168
|
-
for (var prop in source)
|
|
6169
|
-
__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6170
|
-
if (source != null && __getOwnPropSymbols$g)
|
|
6171
|
-
for (var prop of __getOwnPropSymbols$g(source))
|
|
6172
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop) && (target[prop] = source[prop]);
|
|
6173
|
-
return target;
|
|
6174
|
-
};
|
|
6175
|
-
const Breadcrumbs = forwardRef(function(props, ref) {
|
|
6176
|
-
const _a = props, {
|
|
5266
|
+
`, Breadcrumbs = forwardRef(function(props, ref) {
|
|
5267
|
+
const {
|
|
6177
5268
|
children,
|
|
6178
5269
|
maxLength,
|
|
6179
5270
|
separator,
|
|
6180
|
-
space: spaceRaw = 2
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
"maxLength",
|
|
6184
|
-
"separator",
|
|
6185
|
-
"space"
|
|
6186
|
-
]), space = useArrayProp(spaceRaw), [open, setOpen] = useState(!1), expandElementRef = useRef(null), popoverElementRef = useRef(null), collapse = useCallback(() => setOpen(!1), []), expand = useCallback(() => setOpen(!0), []);
|
|
5271
|
+
space: spaceRaw = 2,
|
|
5272
|
+
...restProps
|
|
5273
|
+
} = props, space = useArrayProp(spaceRaw), [open, setOpen] = useState(!1), expandElementRef = useRef(null), popoverElementRef = useRef(null), collapse = useCallback(() => setOpen(!1), []), expand = useCallback(() => setOpen(!0), []);
|
|
6187
5274
|
useClickOutsideEvent(collapse, () => [expandElementRef.current, popoverElementRef.current]);
|
|
6188
5275
|
const rawItems = useMemo(() => Children.toArray(children).filter(isValidElement), [children]), items = useMemo(() => {
|
|
6189
5276
|
const len = rawItems.length;
|
|
@@ -6193,10 +5280,10 @@ const Breadcrumbs = forwardRef(function(props, ref) {
|
|
|
6193
5280
|
}
|
|
6194
5281
|
return rawItems;
|
|
6195
5282
|
}, [collapse, expand, maxLength, open, rawItems, space]);
|
|
6196
|
-
return /* @__PURE__ */ jsx(Root$8,
|
|
5283
|
+
return /* @__PURE__ */ jsx(Root$8, { "data-ui": "Breadcrumbs", ...restProps, ref, children: items.map((item, itemIndex) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
6197
5284
|
itemIndex > 0 && /* @__PURE__ */ jsx(Box, { "aria-hidden": !0, as: "li", paddingX: space, children: separator || /* @__PURE__ */ jsx(Text, { muted: !0, children: "/" }) }),
|
|
6198
5285
|
/* @__PURE__ */ jsx(Box, { as: "li", children: item })
|
|
6199
|
-
] }, itemIndex)) })
|
|
5286
|
+
] }, itemIndex)) });
|
|
6200
5287
|
});
|
|
6201
5288
|
Breadcrumbs.displayName = "ForwardRef(Breadcrumbs)";
|
|
6202
5289
|
function dialogStyle({
|
|
@@ -6263,22 +5350,6 @@ const DialogContext = createGlobalScopedContext("@sanity/ui/context/dialog", {
|
|
|
6263
5350
|
function useDialog() {
|
|
6264
5351
|
return useContext(DialogContext);
|
|
6265
5352
|
}
|
|
6266
|
-
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) => {
|
|
6267
|
-
for (var prop in b || (b = {}))
|
|
6268
|
-
__hasOwnProp$f.call(b, prop) && __defNormalProp$f(a, prop, b[prop]);
|
|
6269
|
-
if (__getOwnPropSymbols$f)
|
|
6270
|
-
for (var prop of __getOwnPropSymbols$f(b))
|
|
6271
|
-
__propIsEnum$f.call(b, prop) && __defNormalProp$f(a, prop, b[prop]);
|
|
6272
|
-
return a;
|
|
6273
|
-
}, __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b)), __objRest$d = (source, exclude) => {
|
|
6274
|
-
var target = {};
|
|
6275
|
-
for (var prop in source)
|
|
6276
|
-
__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6277
|
-
if (source != null && __getOwnPropSymbols$f)
|
|
6278
|
-
for (var prop of __getOwnPropSymbols$f(source))
|
|
6279
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop) && (target[prop] = source[prop]);
|
|
6280
|
-
return target;
|
|
6281
|
-
};
|
|
6282
5353
|
function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
6283
5354
|
return !boundaryElement || !portalElement ? !0 : containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
|
|
6284
5355
|
}
|
|
@@ -6316,7 +5387,6 @@ const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDial
|
|
|
6316
5387
|
position: relative;
|
|
6317
5388
|
z-index: 3;
|
|
6318
5389
|
`, DialogCard = forwardRef(function(props, forwardedRef) {
|
|
6319
|
-
var _a;
|
|
6320
5390
|
const $ = c(38), {
|
|
6321
5391
|
__unstable_autoFocus: autoFocus,
|
|
6322
5392
|
__unstable_hideCloseButton: hideCloseButton,
|
|
@@ -6332,7 +5402,7 @@ const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDial
|
|
|
6332
5402
|
scheme,
|
|
6333
5403
|
shadow: shadowProp,
|
|
6334
5404
|
width: widthProp
|
|
6335
|
-
} = props, portal = usePortal(), portalElement = portalProp ?
|
|
5405
|
+
} = props, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, radius = useArrayProp(radiusProp), shadow = useArrayProp(shadowProp), width = useArrayProp(widthProp), ref = useRef(null), contentRef = useRef(null), layer = useLayer(), {
|
|
6336
5406
|
isTopLayer
|
|
6337
5407
|
} = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton;
|
|
6338
5408
|
let t0;
|
|
@@ -6379,12 +5449,11 @@ const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDial
|
|
|
6379
5449
|
});
|
|
6380
5450
|
DialogCard.displayName = "ForwardRef(DialogCard)";
|
|
6381
5451
|
const Dialog = forwardRef(function(props, ref) {
|
|
6382
|
-
var _a, _b;
|
|
6383
5452
|
const $ = c(60), dialog = useDialog(), {
|
|
6384
5453
|
layer
|
|
6385
5454
|
} = useTheme_v2();
|
|
6386
5455
|
let _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;
|
|
6387
|
-
$[0] !== props ? (
|
|
5456
|
+
$[0] !== props ? ({
|
|
6388
5457
|
__unstable_autoFocus: t0,
|
|
6389
5458
|
__unstable_hideCloseButton: t1,
|
|
6390
5459
|
cardRadius: t2,
|
|
@@ -6404,33 +5473,13 @@ const Dialog = forwardRef(function(props, ref) {
|
|
|
6404
5473
|
scheme,
|
|
6405
5474
|
width: t5,
|
|
6406
5475
|
zOffset: _zOffsetProp,
|
|
6407
|
-
animate: t6
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
"cardRadius",
|
|
6412
|
-
"cardShadow",
|
|
6413
|
-
"children",
|
|
6414
|
-
"contentRef",
|
|
6415
|
-
"footer",
|
|
6416
|
-
"header",
|
|
6417
|
-
"id",
|
|
6418
|
-
"onActivate",
|
|
6419
|
-
"onClickOutside",
|
|
6420
|
-
"onClose",
|
|
6421
|
-
"onFocus",
|
|
6422
|
-
"padding",
|
|
6423
|
-
"portal",
|
|
6424
|
-
"position",
|
|
6425
|
-
"scheme",
|
|
6426
|
-
"width",
|
|
6427
|
-
"zOffset",
|
|
6428
|
-
"animate"
|
|
6429
|
-
]), $[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]);
|
|
6430
|
-
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 = useRef(null), postDivRef = useRef(null), cardRef = useRef(null), focusedElementRef = useRef(null);
|
|
5476
|
+
animate: t6,
|
|
5477
|
+
...restProps
|
|
5478
|
+
} = 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]);
|
|
5479
|
+
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 = useRef(null), postDivRef = useRef(null), cardRef = useRef(null), focusedElementRef = useRef(null);
|
|
6431
5480
|
let t7;
|
|
6432
5481
|
$[22] !== onFocus ? (t7 = (event) => {
|
|
6433
|
-
onFocus
|
|
5482
|
+
onFocus?.(event);
|
|
6434
5483
|
const target = event.target, cardElement = cardRef.current;
|
|
6435
5484
|
if (cardElement && target === preDivRef.current) {
|
|
6436
5485
|
focusLastDescendant(cardElement);
|
|
@@ -6466,11 +5515,11 @@ const Dialog = forwardRef(function(props, ref) {
|
|
|
6466
5515
|
let t11;
|
|
6467
5516
|
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsx("div", { ref: postDivRef, tabIndex: 0 }), $[43] = t11) : t11 = $[43];
|
|
6468
5517
|
let t12;
|
|
6469
|
-
$[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__ */ jsxs(Root$7,
|
|
5518
|
+
$[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__ */ 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: [
|
|
6470
5519
|
t9,
|
|
6471
5520
|
t10,
|
|
6472
5521
|
t11
|
|
6473
|
-
] })
|
|
5522
|
+
] }), $[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];
|
|
6474
5523
|
let t13;
|
|
6475
5524
|
return $[57] !== portalProp || $[58] !== t12 ? (t13 = /* @__PURE__ */ jsx(Portal, { __unstable_name: portalProp, children: t12 }), $[57] = portalProp, $[58] = t12, $[59] = t13) : t13 = $[59], t13;
|
|
6476
5525
|
});
|
|
@@ -6492,22 +5541,6 @@ function DialogProvider(props) {
|
|
|
6492
5541
|
return $[3] !== children || $[4] !== contextValue ? (t2 = /* @__PURE__ */ jsx(DialogContext.Provider, { value: contextValue, children }), $[3] = children, $[4] = contextValue, $[5] = t2) : t2 = $[5], t2;
|
|
6493
5542
|
}
|
|
6494
5543
|
DialogProvider.displayName = "DialogProvider";
|
|
6495
|
-
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) => {
|
|
6496
|
-
for (var prop in b || (b = {}))
|
|
6497
|
-
__hasOwnProp$e.call(b, prop) && __defNormalProp$e(a, prop, b[prop]);
|
|
6498
|
-
if (__getOwnPropSymbols$e)
|
|
6499
|
-
for (var prop of __getOwnPropSymbols$e(b))
|
|
6500
|
-
__propIsEnum$e.call(b, prop) && __defNormalProp$e(a, prop, b[prop]);
|
|
6501
|
-
return a;
|
|
6502
|
-
}, __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b)), __objRest$c = (source, exclude) => {
|
|
6503
|
-
var target = {};
|
|
6504
|
-
for (var prop in source)
|
|
6505
|
-
__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6506
|
-
if (source != null && __getOwnPropSymbols$e)
|
|
6507
|
-
for (var prop of __getOwnPropSymbols$e(source))
|
|
6508
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop) && (target[prop] = source[prop]);
|
|
6509
|
-
return target;
|
|
6510
|
-
};
|
|
6511
5544
|
const Root$6 = styled.kbd`
|
|
6512
5545
|
font: inherit;
|
|
6513
5546
|
padding: 1px;
|
|
@@ -6520,22 +5553,16 @@ const Root$6 = styled.kbd`
|
|
|
6520
5553
|
display: block;
|
|
6521
5554
|
}
|
|
6522
5555
|
`, Hotkeys = forwardRef(function(props, ref) {
|
|
6523
|
-
var _a;
|
|
6524
5556
|
const $ = c(24);
|
|
6525
5557
|
let fontSize2, keys, padding, radius, restProps, t0;
|
|
6526
|
-
$[0] !== props ? (
|
|
5558
|
+
$[0] !== props ? ({
|
|
6527
5559
|
fontSize: fontSize2,
|
|
6528
5560
|
keys,
|
|
6529
5561
|
padding,
|
|
6530
5562
|
radius,
|
|
6531
|
-
space: t0
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
"keys",
|
|
6535
|
-
"padding",
|
|
6536
|
-
"radius",
|
|
6537
|
-
"space"
|
|
6538
|
-
]), $[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]);
|
|
5563
|
+
space: t0,
|
|
5564
|
+
...restProps
|
|
5565
|
+
} = 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]);
|
|
6539
5566
|
const space = useArrayProp(t0 === void 0 ? 0.5 : t0);
|
|
6540
5567
|
if (!keys || keys.length === 0) {
|
|
6541
5568
|
let t12;
|
|
@@ -6550,7 +5577,7 @@ const Root$6 = styled.kbd`
|
|
|
6550
5577
|
let t2;
|
|
6551
5578
|
$[17] !== space || $[18] !== t1 ? (t2 = /* @__PURE__ */ jsx(Inline, { as: "span", space, children: t1 }), $[17] = space, $[18] = t1, $[19] = t2) : t2 = $[19];
|
|
6552
5579
|
let t3;
|
|
6553
|
-
return $[20] !== ref || $[21] !== restProps || $[22] !== t2 ? (t3 = /* @__PURE__ */ jsx(Root$6,
|
|
5580
|
+
return $[20] !== ref || $[21] !== restProps || $[22] !== t2 ? (t3 = /* @__PURE__ */ jsx(Root$6, { "data-ui": "Hotkeys", ...restProps, ref, children: t2 }), $[20] = ref, $[21] = restProps, $[22] = t2, $[23] = t3) : t3 = $[23], t3;
|
|
6554
5581
|
});
|
|
6555
5582
|
Hotkeys.displayName = "ForwardRef(Hotkeys)";
|
|
6556
5583
|
const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
|
|
@@ -6657,8 +5684,7 @@ function useMenuController(props) {
|
|
|
6657
5684
|
const element_0 = event_0.currentTarget, currentIndex_3 = elementsRef.current.indexOf(element_0);
|
|
6658
5685
|
setActiveIndex(currentIndex_3);
|
|
6659
5686
|
}, [setActiveIndex]), handleItemMouseLeave = useCallback(() => {
|
|
6660
|
-
|
|
6661
|
-
setActiveIndex(-2), (_a = rootElementRef.current) == null || _a.focus();
|
|
5687
|
+
setActiveIndex(-2), rootElementRef.current?.focus();
|
|
6662
5688
|
}, [rootElementRef, setActiveIndex]);
|
|
6663
5689
|
return useEffect(() => {
|
|
6664
5690
|
if (!mounted) return;
|
|
@@ -6680,8 +5706,7 @@ function useMenuController(props) {
|
|
|
6680
5706
|
}
|
|
6681
5707
|
return;
|
|
6682
5708
|
}
|
|
6683
|
-
|
|
6684
|
-
element_1 == null || element_1.focus();
|
|
5709
|
+
(elementsRef.current[activeIndex] || null)?.focus();
|
|
6685
5710
|
});
|
|
6686
5711
|
return () => cancelAnimationFrame(rafId);
|
|
6687
5712
|
}, [activeIndex, mounted, setActiveIndex, shouldFocus]), {
|
|
@@ -6693,22 +5718,6 @@ function useMenuController(props) {
|
|
|
6693
5718
|
mount
|
|
6694
5719
|
};
|
|
6695
5720
|
}
|
|
6696
|
-
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) => {
|
|
6697
|
-
for (var prop in b || (b = {}))
|
|
6698
|
-
__hasOwnProp$d.call(b, prop) && __defNormalProp$d(a, prop, b[prop]);
|
|
6699
|
-
if (__getOwnPropSymbols$d)
|
|
6700
|
-
for (var prop of __getOwnPropSymbols$d(b))
|
|
6701
|
-
__propIsEnum$d.call(b, prop) && __defNormalProp$d(a, prop, b[prop]);
|
|
6702
|
-
return a;
|
|
6703
|
-
}, __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b)), __objRest$b = (source, exclude) => {
|
|
6704
|
-
var target = {};
|
|
6705
|
-
for (var prop in source)
|
|
6706
|
-
__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6707
|
-
if (source != null && __getOwnPropSymbols$d)
|
|
6708
|
-
for (var prop of __getOwnPropSymbols$d(source))
|
|
6709
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop) && (target[prop] = source[prop]);
|
|
6710
|
-
return target;
|
|
6711
|
-
};
|
|
6712
5721
|
const Root$5 = styled(Box)`
|
|
6713
5722
|
outline: none;
|
|
6714
5723
|
overflow: auto;
|
|
@@ -6716,7 +5725,7 @@ const Root$5 = styled(Box)`
|
|
|
6716
5725
|
const $ = c(50);
|
|
6717
5726
|
let _shouldFocus, children, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
|
|
6718
5727
|
if ($[0] !== props) {
|
|
6719
|
-
const
|
|
5728
|
+
const {
|
|
6720
5729
|
children: t22,
|
|
6721
5730
|
focusFirst,
|
|
6722
5731
|
focusLast,
|
|
@@ -6729,26 +5738,13 @@ const Root$5 = styled(Box)`
|
|
|
6729
5738
|
padding: t92,
|
|
6730
5739
|
registerElement: t102,
|
|
6731
5740
|
shouldFocus: t112,
|
|
6732
|
-
space: t122
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
"focusFirst",
|
|
6736
|
-
"focusLast",
|
|
6737
|
-
"onClickOutside",
|
|
6738
|
-
"onEscape",
|
|
6739
|
-
"onItemClick",
|
|
6740
|
-
"onItemSelect",
|
|
6741
|
-
"onKeyDown",
|
|
6742
|
-
"originElement",
|
|
6743
|
-
"padding",
|
|
6744
|
-
"registerElement",
|
|
6745
|
-
"shouldFocus",
|
|
6746
|
-
"space"
|
|
6747
|
-
]);
|
|
5741
|
+
space: t122,
|
|
5742
|
+
...t132
|
|
5743
|
+
} = props;
|
|
6748
5744
|
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;
|
|
6749
5745
|
} else
|
|
6750
5746
|
_shouldFocus = $[1], children = $[2], onClickOutside = $[3], onEscape = $[4], onItemClick = $[5], onItemSelect = $[6], onKeyDown = $[7], originElement = $[8], registerElement = $[9], restProps = $[10], t0 = $[11], t1 = $[12];
|
|
6751
|
-
const padding = t0 === void 0 ? 1 : t0, space = t1 === void 0 ? 1 : t1, shouldFocus = _shouldFocus
|
|
5747
|
+
const padding = t0 === void 0 ? 1 : t0, space = t1 === void 0 ? 1 : t1, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = useRef(null);
|
|
6752
5748
|
let t2;
|
|
6753
5749
|
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[13] = t2) : t2 = $[13], useImperativeHandle(forwardedRef, t2);
|
|
6754
5750
|
const {
|
|
@@ -6803,21 +5799,12 @@ const Root$5 = styled(Box)`
|
|
|
6803
5799
|
let t11;
|
|
6804
5800
|
$[38] !== children || $[39] !== space ? (t11 = /* @__PURE__ */ jsx(Stack, { space, children }), $[38] = children, $[39] = space, $[40] = t11) : t11 = $[40];
|
|
6805
5801
|
let t12;
|
|
6806
|
-
$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t11 ? (t12 = /* @__PURE__ */ jsx(Root$5,
|
|
5802
|
+
$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t11 ? (t12 = /* @__PURE__ */ 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];
|
|
6807
5803
|
let t13;
|
|
6808
5804
|
return $[47] !== t12 || $[48] !== value ? (t13 = /* @__PURE__ */ jsx(MenuContext.Provider, { value, children: t12 }), $[47] = t12, $[48] = value, $[49] = t13) : t13 = $[49], t13;
|
|
6809
5805
|
});
|
|
6810
5806
|
Menu.displayName = "ForwardRef(Menu)";
|
|
6811
|
-
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) => {
|
|
6812
|
-
for (var prop in b || (b = {}))
|
|
6813
|
-
__hasOwnProp$c.call(b, prop) && __defNormalProp$c(a, prop, b[prop]);
|
|
6814
|
-
if (__getOwnPropSymbols$c)
|
|
6815
|
-
for (var prop of __getOwnPropSymbols$c(b))
|
|
6816
|
-
__propIsEnum$c.call(b, prop) && __defNormalProp$c(a, prop, b[prop]);
|
|
6817
|
-
return a;
|
|
6818
|
-
}, __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
6819
5807
|
const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
6820
|
-
var _a;
|
|
6821
5808
|
const $ = c(62), {
|
|
6822
5809
|
__unstable_disableRestoreFocusOnClose: t0,
|
|
6823
5810
|
boundaryElement: deprecated_boundaryElement,
|
|
@@ -6927,7 +5914,7 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
6927
5914
|
"aria-haspopup": !0,
|
|
6928
5915
|
"aria-expanded": open,
|
|
6929
5916
|
ref: setButtonElement,
|
|
6930
|
-
selected:
|
|
5917
|
+
selected: buttonProp.props.selected ?? open
|
|
6931
5918
|
}), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t19) : t19 = $[41], t18 = t19;
|
|
6932
5919
|
const button = t18;
|
|
6933
5920
|
let t20, t21;
|
|
@@ -6935,20 +5922,21 @@ const MenuButton = forwardRef(function(props, forwardedRef) {
|
|
|
6935
5922
|
let t22, t23;
|
|
6936
5923
|
$[45] !== popover ? (t23 = popover || {}, $[45] = popover, $[46] = t23) : t23 = $[46];
|
|
6937
5924
|
let t24;
|
|
6938
|
-
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 =
|
|
5925
|
+
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 = {
|
|
6939
5926
|
boundaryElement: deprecated_boundaryElement,
|
|
6940
5927
|
overflow: "auto",
|
|
6941
5928
|
placement: deprecated_placement,
|
|
6942
5929
|
portal: deprecated_portal,
|
|
6943
5930
|
preventOverflow: deprecated_preventOverflow,
|
|
6944
5931
|
radius: deprecated_popoverRadius,
|
|
6945
|
-
scheme: deprecated_popoverScheme
|
|
6946
|
-
|
|
5932
|
+
scheme: deprecated_popoverScheme,
|
|
5933
|
+
...t23
|
|
5934
|
+
}, $[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;
|
|
6947
5935
|
const popoverProps = t22;
|
|
6948
5936
|
let t25;
|
|
6949
5937
|
$[55] !== button ? (t25 = button || /* @__PURE__ */ jsx(Fragment, {}), $[55] = button, $[56] = t25) : t25 = $[56];
|
|
6950
5938
|
let t26;
|
|
6951
|
-
return $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t25 ? (t26 = /* @__PURE__ */ jsx(Popover,
|
|
5939
|
+
return $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t25 ? (t26 = /* @__PURE__ */ 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;
|
|
6952
5940
|
});
|
|
6953
5941
|
MenuButton.displayName = "ForwardRef(MenuButton)";
|
|
6954
5942
|
function _temp$2(v) {
|
|
@@ -6985,7 +5973,6 @@ function selectableBaseStyle() {
|
|
|
6985
5973
|
`;
|
|
6986
5974
|
}
|
|
6987
5975
|
function selectableColorStyle(props) {
|
|
6988
|
-
var _a;
|
|
6989
5976
|
const {
|
|
6990
5977
|
$tone
|
|
6991
5978
|
} = props, {
|
|
@@ -7059,7 +6046,7 @@ function selectableColorStyle(props) {
|
|
|
7059
6046
|
}
|
|
7060
6047
|
}
|
|
7061
6048
|
|
|
7062
|
-
${
|
|
6049
|
+
${style?.card?.root}
|
|
7063
6050
|
`;
|
|
7064
6051
|
}
|
|
7065
6052
|
const Selectable = styled(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
|
|
@@ -7072,27 +6059,10 @@ function useMenu() {
|
|
|
7072
6059
|
throw new Error("useMenu(): the context value is not compatible");
|
|
7073
6060
|
return value;
|
|
7074
6061
|
}
|
|
7075
|
-
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) => {
|
|
7076
|
-
for (var prop in b || (b = {}))
|
|
7077
|
-
__hasOwnProp$b.call(b, prop) && __defNormalProp$b(a, prop, b[prop]);
|
|
7078
|
-
if (__getOwnPropSymbols$b)
|
|
7079
|
-
for (var prop of __getOwnPropSymbols$b(b))
|
|
7080
|
-
__propIsEnum$b.call(b, prop) && __defNormalProp$b(a, prop, b[prop]);
|
|
7081
|
-
return a;
|
|
7082
|
-
}, __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b)), __objRest$a = (source, exclude) => {
|
|
7083
|
-
var target = {};
|
|
7084
|
-
for (var prop in source)
|
|
7085
|
-
__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7086
|
-
if (source != null && __getOwnPropSymbols$b)
|
|
7087
|
-
for (var prop of __getOwnPropSymbols$b(source))
|
|
7088
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop) && (target[prop] = source[prop]);
|
|
7089
|
-
return target;
|
|
7090
|
-
};
|
|
7091
6062
|
function MenuGroup(props) {
|
|
7092
|
-
var _a;
|
|
7093
6063
|
const $ = c(77);
|
|
7094
6064
|
let IconComponent, children, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
|
|
7095
|
-
$[0] !== props ? (
|
|
6065
|
+
$[0] !== props ? ({
|
|
7096
6066
|
as: t0,
|
|
7097
6067
|
children,
|
|
7098
6068
|
fontSize: t1,
|
|
@@ -7103,20 +6073,9 @@ function MenuGroup(props) {
|
|
|
7103
6073
|
radius: t3,
|
|
7104
6074
|
space: t4,
|
|
7105
6075
|
text,
|
|
7106
|
-
tone: t5
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
"children",
|
|
7110
|
-
"fontSize",
|
|
7111
|
-
"icon",
|
|
7112
|
-
"onClick",
|
|
7113
|
-
"padding",
|
|
7114
|
-
"popover",
|
|
7115
|
-
"radius",
|
|
7116
|
-
"space",
|
|
7117
|
-
"text",
|
|
7118
|
-
"tone"
|
|
7119
|
-
]), $[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]);
|
|
6076
|
+
tone: t5,
|
|
6077
|
+
...restProps
|
|
6078
|
+
} = 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]);
|
|
7120
6079
|
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(), {
|
|
7121
6080
|
scheme
|
|
7122
6081
|
} = useRootTheme(), {
|
|
@@ -7127,7 +6086,7 @@ function MenuGroup(props) {
|
|
|
7127
6086
|
onItemClick,
|
|
7128
6087
|
onItemMouseEnter: _onItemMouseEnter,
|
|
7129
6088
|
registerElement
|
|
7130
|
-
} = menu, onItemMouseEnter = _onItemMouseEnter
|
|
6089
|
+
} = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onMouseEnter, [rootElement, setRootElement] = useState(null), [open, setOpen] = useState(!1), [shouldFocus, setShouldFocus] = useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = useState(!1);
|
|
7131
6090
|
let t6;
|
|
7132
6091
|
$[13] !== onItemMouseEnter ? (t6 = (event) => {
|
|
7133
6092
|
setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
|
|
@@ -7136,18 +6095,18 @@ function MenuGroup(props) {
|
|
|
7136
6095
|
let t7;
|
|
7137
6096
|
$[15] !== rootElement ? (t7 = (event_0) => {
|
|
7138
6097
|
event_0.key === "ArrowLeft" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
|
|
7139
|
-
rootElement
|
|
6098
|
+
rootElement?.focus();
|
|
7140
6099
|
}));
|
|
7141
6100
|
}, $[15] = rootElement, $[16] = t7) : t7 = $[16];
|
|
7142
6101
|
const handleMenuKeyDown = t7;
|
|
7143
6102
|
let t8;
|
|
7144
6103
|
$[17] !== onClick ? (t8 = (event_1) => {
|
|
7145
|
-
onClick
|
|
6104
|
+
onClick?.(event_1), setShouldFocus("first"), setOpen(!0);
|
|
7146
6105
|
}, $[17] = onClick, $[18] = t8) : t8 = $[18];
|
|
7147
6106
|
const handleClick = t8;
|
|
7148
6107
|
let t9;
|
|
7149
6108
|
$[19] !== onItemClick ? (t9 = () => {
|
|
7150
|
-
setOpen(!1), onItemClick
|
|
6109
|
+
setOpen(!1), onItemClick?.();
|
|
7151
6110
|
}, $[19] = onItemClick, $[20] = t9) : t9 = $[20];
|
|
7152
6111
|
const handleChildItemClick = t9;
|
|
7153
6112
|
let t10;
|
|
@@ -7200,32 +6159,15 @@ function MenuGroup(props) {
|
|
|
7200
6159
|
t29
|
|
7201
6160
|
] }), $[53] = padding, $[54] = space, $[55] = t26, $[56] = t27, $[57] = t29, $[58] = t30) : t30 = $[58];
|
|
7202
6161
|
let t31;
|
|
7203
|
-
$[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__ */ jsx(Selectable,
|
|
6162
|
+
$[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__ */ 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];
|
|
7204
6163
|
let t32;
|
|
7205
|
-
return $[72] !== childMenu || $[73] !== open || $[74] !== popover || $[75] !== t31 ? (t32 = /* @__PURE__ */ jsx(Popover,
|
|
6164
|
+
return $[72] !== childMenu || $[73] !== open || $[74] !== popover || $[75] !== t31 ? (t32 = /* @__PURE__ */ 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;
|
|
7206
6165
|
}
|
|
7207
6166
|
MenuGroup.displayName = "MenuGroup";
|
|
7208
|
-
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) => {
|
|
7209
|
-
for (var prop in b || (b = {}))
|
|
7210
|
-
__hasOwnProp$a.call(b, prop) && __defNormalProp$a(a, prop, b[prop]);
|
|
7211
|
-
if (__getOwnPropSymbols$a)
|
|
7212
|
-
for (var prop of __getOwnPropSymbols$a(b))
|
|
7213
|
-
__propIsEnum$a.call(b, prop) && __defNormalProp$a(a, prop, b[prop]);
|
|
7214
|
-
return a;
|
|
7215
|
-
}, __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b)), __objRest$9 = (source, exclude) => {
|
|
7216
|
-
var target = {};
|
|
7217
|
-
for (var prop in source)
|
|
7218
|
-
__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7219
|
-
if (source != null && __getOwnPropSymbols$a)
|
|
7220
|
-
for (var prop of __getOwnPropSymbols$a(source))
|
|
7221
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop) && (target[prop] = source[prop]);
|
|
7222
|
-
return target;
|
|
7223
|
-
};
|
|
7224
6167
|
const MenuItem = forwardRef(function(props, forwardedRef) {
|
|
7225
|
-
var _a;
|
|
7226
6168
|
const $ = c(74);
|
|
7227
6169
|
let IconComponent, IconRightComponent, children, disabled, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
|
|
7228
|
-
$[0] !== props ? (
|
|
6170
|
+
$[0] !== props ? ({
|
|
7229
6171
|
as: t0,
|
|
7230
6172
|
children,
|
|
7231
6173
|
disabled,
|
|
@@ -7246,30 +6188,9 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
|
|
|
7246
6188
|
selected: selectedProp,
|
|
7247
6189
|
space: t4,
|
|
7248
6190
|
text,
|
|
7249
|
-
tone: t5
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
"children",
|
|
7253
|
-
"disabled",
|
|
7254
|
-
"fontSize",
|
|
7255
|
-
"hotkeys",
|
|
7256
|
-
"icon",
|
|
7257
|
-
"iconRight",
|
|
7258
|
-
"onClick",
|
|
7259
|
-
"padding",
|
|
7260
|
-
"paddingX",
|
|
7261
|
-
"paddingY",
|
|
7262
|
-
"paddingTop",
|
|
7263
|
-
"paddingRight",
|
|
7264
|
-
"paddingBottom",
|
|
7265
|
-
"paddingLeft",
|
|
7266
|
-
"pressed",
|
|
7267
|
-
"radius",
|
|
7268
|
-
"selected",
|
|
7269
|
-
"space",
|
|
7270
|
-
"text",
|
|
7271
|
-
"tone"
|
|
7272
|
-
]), $[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]);
|
|
6191
|
+
tone: t5,
|
|
6192
|
+
...restProps
|
|
6193
|
+
} = 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]);
|
|
7273
6194
|
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, {
|
|
7274
6195
|
scheme
|
|
7275
6196
|
} = useRootTheme(), menu = useMenu(), {
|
|
@@ -7278,7 +6199,7 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
|
|
|
7278
6199
|
onItemClick,
|
|
7279
6200
|
onItemMouseEnter: _onItemMouseEnter,
|
|
7280
6201
|
onItemMouseLeave: _onItemMouseLeave
|
|
7281
|
-
} = menu, onItemMouseEnter = _onItemMouseEnter
|
|
6202
|
+
} = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onMouseEnter, onItemMouseLeave = _onItemMouseLeave ?? menu.onMouseLeave, [rootElement, setRootElement] = useState(null), active = !!activeElement && activeElement === rootElement, ref = useRef(null);
|
|
7282
6203
|
let t6;
|
|
7283
6204
|
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[23] = t6) : t6 = $[23], useImperativeHandle(forwardedRef, t6);
|
|
7284
6205
|
let t7, t8;
|
|
@@ -7308,7 +6229,7 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
|
|
|
7308
6229
|
}, $[43] = t14) : t14 = $[43];
|
|
7309
6230
|
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;
|
|
7310
6231
|
let t23;
|
|
7311
|
-
$[44] !== IconComponent || $[45] !== IconRightComponent || $[46] !== fontSize2 || $[47] !== hotkeys || $[48] !== hotkeysFontSize || $[49] !== paddingProps || $[50] !== space || $[51] !== text ? (t23 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxs(Flex,
|
|
6232
|
+
$[44] !== IconComponent || $[45] !== IconRightComponent || $[46] !== fontSize2 || $[47] !== hotkeys || $[48] !== hotkeysFontSize || $[49] !== paddingProps || $[50] !== space || $[51] !== text ? (t23 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxs(Flex, { as: "span", gap: space, align: "center", ...paddingProps, children: [
|
|
7312
6233
|
IconComponent && /* @__PURE__ */ jsxs(Text, { size: fontSize2, children: [
|
|
7313
6234
|
isValidElement(IconComponent) && IconComponent,
|
|
7314
6235
|
isValidElementType(IconComponent) && /* @__PURE__ */ jsx(IconComponent, {})
|
|
@@ -7322,14 +6243,14 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
|
|
|
7322
6243
|
isValidElement(IconRightComponent) && IconRightComponent,
|
|
7323
6244
|
isValidElementType(IconRightComponent) && /* @__PURE__ */ jsx(IconRightComponent, {})
|
|
7324
6245
|
] })
|
|
7325
|
-
] })
|
|
6246
|
+
] }), $[44] = IconComponent, $[45] = IconRightComponent, $[46] = fontSize2, $[47] = hotkeys, $[48] = hotkeysFontSize, $[49] = paddingProps, $[50] = space, $[51] = text, $[52] = t23) : t23 = $[52];
|
|
7326
6247
|
let t24;
|
|
7327
|
-
$[53] !== children || $[54] !== paddingProps ? (t24 = children && /* @__PURE__ */ jsx(Box,
|
|
6248
|
+
$[53] !== children || $[54] !== paddingProps ? (t24 = children && /* @__PURE__ */ jsx(Box, { as: "span", ...paddingProps, children }), $[53] = children, $[54] = paddingProps, $[55] = t24) : t24 = $[55];
|
|
7328
6249
|
let t25;
|
|
7329
|
-
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__ */ jsxs(Selectable,
|
|
6250
|
+
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__ */ 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: [
|
|
7330
6251
|
t23,
|
|
7331
6252
|
t24
|
|
7332
|
-
] })
|
|
6253
|
+
] }), $[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;
|
|
7333
6254
|
});
|
|
7334
6255
|
MenuItem.displayName = "ForwardRef(MenuItem)";
|
|
7335
6256
|
function _temp$1(s) {
|
|
@@ -7375,36 +6296,15 @@ const keyframe = keyframes`
|
|
|
7375
6296
|
@media screen and (prefers-reduced-motion: reduce) {
|
|
7376
6297
|
background-color: var(--card-skeleton-color-from);
|
|
7377
6298
|
}
|
|
7378
|
-
|
|
7379
|
-
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) => {
|
|
7380
|
-
for (var prop in b || (b = {}))
|
|
7381
|
-
__hasOwnProp$9.call(b, prop) && __defNormalProp$9(a, prop, b[prop]);
|
|
7382
|
-
if (__getOwnPropSymbols$9)
|
|
7383
|
-
for (var prop of __getOwnPropSymbols$9(b))
|
|
7384
|
-
__propIsEnum$9.call(b, prop) && __defNormalProp$9(a, prop, b[prop]);
|
|
7385
|
-
return a;
|
|
7386
|
-
}, __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b)), __objRest$8 = (source, exclude) => {
|
|
7387
|
-
var target = {};
|
|
7388
|
-
for (var prop in source)
|
|
7389
|
-
__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7390
|
-
if (source != null && __getOwnPropSymbols$9)
|
|
7391
|
-
for (var prop of __getOwnPropSymbols$9(source))
|
|
7392
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop) && (target[prop] = source[prop]);
|
|
7393
|
-
return target;
|
|
7394
|
-
};
|
|
7395
|
-
const Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle), Skeleton = forwardRef(function(props, ref) {
|
|
7396
|
-
var _a;
|
|
6299
|
+
`, Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle), Skeleton = forwardRef(function(props, ref) {
|
|
7397
6300
|
const $ = c(14);
|
|
7398
6301
|
let delay, radius, restProps, t0;
|
|
7399
|
-
$[0] !== props ? (
|
|
6302
|
+
$[0] !== props ? ({
|
|
7400
6303
|
animated: t0,
|
|
7401
6304
|
delay,
|
|
7402
|
-
radius
|
|
7403
|
-
|
|
7404
|
-
|
|
7405
|
-
"delay",
|
|
7406
|
-
"radius"
|
|
7407
|
-
]), $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0) : (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]);
|
|
6305
|
+
radius,
|
|
6306
|
+
...restProps
|
|
6307
|
+
} = props, $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0) : (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]);
|
|
7408
6308
|
const animated = t0 === void 0 ? !1 : t0, [visible, setVisible] = useState(!delay);
|
|
7409
6309
|
let t1, t2;
|
|
7410
6310
|
$[5] !== delay ? (t1 = () => {
|
|
@@ -7419,25 +6319,9 @@ const Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle), Skeleton = for
|
|
|
7419
6319
|
}, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2) : (t1 = $[6], t2 = $[7]), useEffect(t1, t2);
|
|
7420
6320
|
const t3 = useArrayProp(radius);
|
|
7421
6321
|
let t4;
|
|
7422
|
-
return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== visible ? (t4 = /* @__PURE__ */ jsx(Root$4,
|
|
6322
|
+
return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== visible ? (t4 = /* @__PURE__ */ 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;
|
|
7423
6323
|
});
|
|
7424
6324
|
Skeleton.displayName = "ForwardRef(Skeleton)";
|
|
7425
|
-
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) => {
|
|
7426
|
-
for (var prop in b || (b = {}))
|
|
7427
|
-
__hasOwnProp$8.call(b, prop) && __defNormalProp$8(a, prop, b[prop]);
|
|
7428
|
-
if (__getOwnPropSymbols$8)
|
|
7429
|
-
for (var prop of __getOwnPropSymbols$8(b))
|
|
7430
|
-
__propIsEnum$8.call(b, prop) && __defNormalProp$8(a, prop, b[prop]);
|
|
7431
|
-
return a;
|
|
7432
|
-
}, __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b)), __objRest$7 = (source, exclude) => {
|
|
7433
|
-
var target = {};
|
|
7434
|
-
for (var prop in source)
|
|
7435
|
-
__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7436
|
-
if (source != null && __getOwnPropSymbols$8)
|
|
7437
|
-
for (var prop of __getOwnPropSymbols$8(source))
|
|
7438
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop) && (target[prop] = source[prop]);
|
|
7439
|
-
return target;
|
|
7440
|
-
};
|
|
7441
6325
|
const Root$3 = styled(Skeleton)((props) => {
|
|
7442
6326
|
const {
|
|
7443
6327
|
$size,
|
|
@@ -7453,84 +6337,59 @@ const Root$3 = styled(Skeleton)((props) => {
|
|
|
7453
6337
|
};
|
|
7454
6338
|
});
|
|
7455
6339
|
}), TextSkeleton = forwardRef(function(props, ref) {
|
|
7456
|
-
var _a;
|
|
7457
6340
|
const $ = c(7);
|
|
7458
6341
|
let restProps, t0;
|
|
7459
|
-
$[0] !== props ? (
|
|
7460
|
-
size: t0
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6342
|
+
$[0] !== props ? ({
|
|
6343
|
+
size: t0,
|
|
6344
|
+
...restProps
|
|
6345
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
7464
6346
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
7465
6347
|
let t1;
|
|
7466
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(Root$3,
|
|
6348
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "text" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
7467
6349
|
});
|
|
7468
6350
|
TextSkeleton.displayName = "ForwardRef(TextSkeleton)";
|
|
7469
6351
|
const LabelSkeleton = forwardRef(function(props, ref) {
|
|
7470
|
-
var _a;
|
|
7471
6352
|
const $ = c(7);
|
|
7472
6353
|
let restProps, t0;
|
|
7473
|
-
$[0] !== props ? (
|
|
7474
|
-
size: t0
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6354
|
+
$[0] !== props ? ({
|
|
6355
|
+
size: t0,
|
|
6356
|
+
...restProps
|
|
6357
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
7478
6358
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
7479
6359
|
let t1;
|
|
7480
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(Root$3,
|
|
6360
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "label" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
7481
6361
|
});
|
|
7482
6362
|
LabelSkeleton.displayName = "ForwardRef(LabelSkeleton)";
|
|
7483
6363
|
const HeadingSkeleton = forwardRef(function(props, ref) {
|
|
7484
|
-
var _a;
|
|
7485
6364
|
const $ = c(7);
|
|
7486
6365
|
let restProps, t0;
|
|
7487
|
-
$[0] !== props ? (
|
|
7488
|
-
size: t0
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6366
|
+
$[0] !== props ? ({
|
|
6367
|
+
size: t0,
|
|
6368
|
+
...restProps
|
|
6369
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
7492
6370
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
7493
6371
|
let t1;
|
|
7494
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(Root$3,
|
|
6372
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "heading" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
7495
6373
|
});
|
|
7496
6374
|
HeadingSkeleton.displayName = "ForwardRef(HeadingSkeleton)";
|
|
7497
6375
|
const CodeSkeleton = forwardRef(function(props, ref) {
|
|
7498
|
-
var _a;
|
|
7499
6376
|
const $ = c(7);
|
|
7500
6377
|
let restProps, t0;
|
|
7501
|
-
$[0] !== props ? (
|
|
7502
|
-
size: t0
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6378
|
+
$[0] !== props ? ({
|
|
6379
|
+
size: t0,
|
|
6380
|
+
...restProps
|
|
6381
|
+
} = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
7506
6382
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
7507
6383
|
let t1;
|
|
7508
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(Root$3,
|
|
6384
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsx(Root$3, { ...restProps, $size, ref, $style: "code" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
7509
6385
|
});
|
|
7510
6386
|
CodeSkeleton.displayName = "ForwardRef(CodeSkeleton)";
|
|
7511
|
-
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) => {
|
|
7512
|
-
for (var prop in b || (b = {}))
|
|
7513
|
-
__hasOwnProp$7.call(b, prop) && __defNormalProp$7(a, prop, b[prop]);
|
|
7514
|
-
if (__getOwnPropSymbols$7)
|
|
7515
|
-
for (var prop of __getOwnPropSymbols$7(b))
|
|
7516
|
-
__propIsEnum$7.call(b, prop) && __defNormalProp$7(a, prop, b[prop]);
|
|
7517
|
-
return a;
|
|
7518
|
-
}, __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b)), __objRest$6 = (source, exclude) => {
|
|
7519
|
-
var target = {};
|
|
7520
|
-
for (var prop in source)
|
|
7521
|
-
__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7522
|
-
if (source != null && __getOwnPropSymbols$7)
|
|
7523
|
-
for (var prop of __getOwnPropSymbols$7(source))
|
|
7524
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop) && (target[prop] = source[prop]);
|
|
7525
|
-
return target;
|
|
7526
|
-
};
|
|
7527
6387
|
const CustomButton = styled(Button)`
|
|
7528
6388
|
max-width: 100%;
|
|
7529
6389
|
`, Tab = forwardRef(function(props, forwardedRef) {
|
|
7530
|
-
var _a;
|
|
7531
6390
|
const $ = c(30);
|
|
7532
6391
|
let focused, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
|
|
7533
|
-
$[0] !== props ? (
|
|
6392
|
+
$[0] !== props ? ({
|
|
7534
6393
|
icon,
|
|
7535
6394
|
id,
|
|
7536
6395
|
focused,
|
|
@@ -7539,18 +6398,9 @@ const CustomButton = styled(Button)`
|
|
|
7539
6398
|
onClick,
|
|
7540
6399
|
onFocus,
|
|
7541
6400
|
padding: t1,
|
|
7542
|
-
selected
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
"id",
|
|
7546
|
-
"focused",
|
|
7547
|
-
"fontSize",
|
|
7548
|
-
"label",
|
|
7549
|
-
"onClick",
|
|
7550
|
-
"onFocus",
|
|
7551
|
-
"padding",
|
|
7552
|
-
"selected"
|
|
7553
|
-
]), $[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]);
|
|
6401
|
+
selected,
|
|
6402
|
+
...restProps
|
|
6403
|
+
} = 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]);
|
|
7554
6404
|
const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = useRef(null), focusedRef = useRef(!1);
|
|
7555
6405
|
let t2;
|
|
7556
6406
|
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], useImperativeHandle(forwardedRef, t2);
|
|
@@ -7570,25 +6420,9 @@ const CustomButton = styled(Button)`
|
|
|
7570
6420
|
}, t6 = [focused], $[15] = focused, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), useEffect(t5, t6);
|
|
7571
6421
|
const t7 = selected ? "true" : "false", t8 = selected ? 0 : -1;
|
|
7572
6422
|
let t9;
|
|
7573
|
-
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__ */ jsx(CustomButton,
|
|
6423
|
+
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__ */ 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;
|
|
7574
6424
|
});
|
|
7575
6425
|
Tab.displayName = "ForwardRef(Tab)";
|
|
7576
|
-
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) => {
|
|
7577
|
-
for (var prop in b || (b = {}))
|
|
7578
|
-
__hasOwnProp$6.call(b, prop) && __defNormalProp$6(a, prop, b[prop]);
|
|
7579
|
-
if (__getOwnPropSymbols$6)
|
|
7580
|
-
for (var prop of __getOwnPropSymbols$6(b))
|
|
7581
|
-
__propIsEnum$6.call(b, prop) && __defNormalProp$6(a, prop, b[prop]);
|
|
7582
|
-
return a;
|
|
7583
|
-
}, __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b)), __objRest$5 = (source, exclude) => {
|
|
7584
|
-
var target = {};
|
|
7585
|
-
for (var prop in source)
|
|
7586
|
-
__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7587
|
-
if (source != null && __getOwnPropSymbols$6)
|
|
7588
|
-
for (var prop of __getOwnPropSymbols$6(source))
|
|
7589
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop) && (target[prop] = source[prop]);
|
|
7590
|
-
return target;
|
|
7591
|
-
};
|
|
7592
6426
|
const CustomInline = styled(Inline)`
|
|
7593
6427
|
& > div {
|
|
7594
6428
|
display: inline-block;
|
|
@@ -7597,14 +6431,12 @@ const CustomInline = styled(Inline)`
|
|
|
7597
6431
|
box-sizing: border-box;
|
|
7598
6432
|
}
|
|
7599
6433
|
`, TabList = forwardRef(function(props, ref) {
|
|
7600
|
-
var _a;
|
|
7601
6434
|
const $ = c(15);
|
|
7602
6435
|
let childrenProp, restProps;
|
|
7603
|
-
$[0] !== props ? (
|
|
7604
|
-
children: childrenProp
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
]), $[0] = props, $[1] = childrenProp, $[2] = restProps) : (childrenProp = $[1], restProps = $[2]);
|
|
6436
|
+
$[0] !== props ? ({
|
|
6437
|
+
children: childrenProp,
|
|
6438
|
+
...restProps
|
|
6439
|
+
} = props, $[0] = props, $[1] = childrenProp, $[2] = restProps) : (childrenProp = $[1], restProps = $[2]);
|
|
7608
6440
|
const [focusedIndex, setFocusedIndex] = useState(-1);
|
|
7609
6441
|
let t0;
|
|
7610
6442
|
if ($[3] !== childrenProp || $[4] !== focusedIndex) {
|
|
@@ -7624,37 +6456,19 @@ const CustomInline = styled(Inline)`
|
|
|
7624
6456
|
}, $[8] = numTabs, $[9] = t1) : t1 = $[9];
|
|
7625
6457
|
const handleKeyDown = t1;
|
|
7626
6458
|
let t2;
|
|
7627
|
-
return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ jsx(CustomInline,
|
|
6459
|
+
return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ 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;
|
|
7628
6460
|
});
|
|
7629
6461
|
TabList.displayName = "ForwardRef(TabList)";
|
|
7630
|
-
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) => {
|
|
7631
|
-
for (var prop in b || (b = {}))
|
|
7632
|
-
__hasOwnProp$5.call(b, prop) && __defNormalProp$5(a, prop, b[prop]);
|
|
7633
|
-
if (__getOwnPropSymbols$5)
|
|
7634
|
-
for (var prop of __getOwnPropSymbols$5(b))
|
|
7635
|
-
__propIsEnum$5.call(b, prop) && __defNormalProp$5(a, prop, b[prop]);
|
|
7636
|
-
return a;
|
|
7637
|
-
}, __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b)), __objRest$4 = (source, exclude) => {
|
|
7638
|
-
var target = {};
|
|
7639
|
-
for (var prop in source)
|
|
7640
|
-
__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7641
|
-
if (source != null && __getOwnPropSymbols$5)
|
|
7642
|
-
for (var prop of __getOwnPropSymbols$5(source))
|
|
7643
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop) && (target[prop] = source[prop]);
|
|
7644
|
-
return target;
|
|
7645
|
-
};
|
|
7646
6462
|
const TabPanel = forwardRef(function(props, ref) {
|
|
7647
|
-
var _a;
|
|
7648
6463
|
const $ = c(9);
|
|
7649
6464
|
let flex, restProps;
|
|
7650
|
-
$[0] !== props ? (
|
|
7651
|
-
flex
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
]), $[0] = props, $[1] = flex, $[2] = restProps) : (flex = $[1], restProps = $[2]);
|
|
6465
|
+
$[0] !== props ? ({
|
|
6466
|
+
flex,
|
|
6467
|
+
...restProps
|
|
6468
|
+
} = props, $[0] = props, $[1] = flex, $[2] = restProps) : (flex = $[1], restProps = $[2]);
|
|
7655
6469
|
const t0 = props.tabIndex === void 0 ? 0 : props.tabIndex;
|
|
7656
6470
|
let t1;
|
|
7657
|
-
return $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsx(Box,
|
|
6471
|
+
return $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ 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;
|
|
7658
6472
|
});
|
|
7659
6473
|
TabPanel.displayName = "ForwardRef(TabPanel)";
|
|
7660
6474
|
const TextBox = styled(Flex)`
|
|
@@ -7701,22 +6515,6 @@ function rootStyles(props) {
|
|
|
7701
6515
|
}
|
|
7702
6516
|
`;
|
|
7703
6517
|
}
|
|
7704
|
-
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) => {
|
|
7705
|
-
for (var prop in b || (b = {}))
|
|
7706
|
-
__hasOwnProp$4.call(b, prop) && __defNormalProp$4(a, prop, b[prop]);
|
|
7707
|
-
if (__getOwnPropSymbols$4)
|
|
7708
|
-
for (var prop of __getOwnPropSymbols$4(b))
|
|
7709
|
-
__propIsEnum$4.call(b, prop) && __defNormalProp$4(a, prop, b[prop]);
|
|
7710
|
-
return a;
|
|
7711
|
-
}, __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b)), __objRest$3 = (source, exclude) => {
|
|
7712
|
-
var target = {};
|
|
7713
|
-
for (var prop in source)
|
|
7714
|
-
__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7715
|
-
if (source != null && __getOwnPropSymbols$4)
|
|
7716
|
-
for (var prop of __getOwnPropSymbols$4(source))
|
|
7717
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop) && (target[prop] = source[prop]);
|
|
7718
|
-
return target;
|
|
7719
|
-
};
|
|
7720
6518
|
const STATUS_CARD_TONE = {
|
|
7721
6519
|
error: "critical",
|
|
7722
6520
|
warning: "caution",
|
|
@@ -7734,26 +6532,18 @@ const STATUS_CARD_TONE = {
|
|
|
7734
6532
|
info: "alert"
|
|
7735
6533
|
}, Root$2 = styled(Card)(rootStyles);
|
|
7736
6534
|
function Toast(props) {
|
|
7737
|
-
var _a;
|
|
7738
6535
|
const $ = c(30);
|
|
7739
6536
|
let closable, description, duration, onClose, restProps, status, t0, title;
|
|
7740
|
-
$[0] !== props ? (
|
|
6537
|
+
$[0] !== props ? ({
|
|
7741
6538
|
closable,
|
|
7742
6539
|
description,
|
|
7743
6540
|
duration,
|
|
7744
6541
|
onClose,
|
|
7745
6542
|
radius: t0,
|
|
7746
6543
|
title,
|
|
7747
|
-
status
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
"description",
|
|
7751
|
-
"duration",
|
|
7752
|
-
"onClose",
|
|
7753
|
-
"radius",
|
|
7754
|
-
"title",
|
|
7755
|
-
"status"
|
|
7756
|
-
]), $[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]);
|
|
6544
|
+
status,
|
|
6545
|
+
...restProps
|
|
6546
|
+
} = 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]);
|
|
7757
6547
|
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";
|
|
7758
6548
|
let t1;
|
|
7759
6549
|
$[9] !== title ? (t1 = title && /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", children: title }), $[9] = title, $[10] = t1) : t1 = $[10];
|
|
@@ -7774,7 +6564,7 @@ function Toast(props) {
|
|
|
7774
6564
|
t4
|
|
7775
6565
|
] }), $[20] = t3, $[21] = t4, $[22] = t5) : t5 = $[22];
|
|
7776
6566
|
let t6;
|
|
7777
|
-
return $[23] !== cardTone || $[24] !== duration || $[25] !== radius || $[26] !== restProps || $[27] !== role || $[28] !== t5 ? (t6 = /* @__PURE__ */ jsx(Root$2,
|
|
6567
|
+
return $[23] !== cardTone || $[24] !== duration || $[25] !== radius || $[26] !== restProps || $[27] !== role || $[28] !== t5 ? (t6 = /* @__PURE__ */ 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;
|
|
7778
6568
|
}
|
|
7779
6569
|
Toast.displayName = "Toast";
|
|
7780
6570
|
function useMounted() {
|
|
@@ -7792,14 +6582,6 @@ let toastId = 0;
|
|
|
7792
6582
|
function generateToastId() {
|
|
7793
6583
|
return String(toastId++);
|
|
7794
6584
|
}
|
|
7795
|
-
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) => {
|
|
7796
|
-
for (var prop in b || (b = {}))
|
|
7797
|
-
__hasOwnProp$3.call(b, prop) && __defNormalProp$3(a, prop, b[prop]);
|
|
7798
|
-
if (__getOwnPropSymbols$3)
|
|
7799
|
-
for (var prop of __getOwnPropSymbols$3(b))
|
|
7800
|
-
__propIsEnum$3.call(b, prop) && __defNormalProp$3(a, prop, b[prop]);
|
|
7801
|
-
return a;
|
|
7802
|
-
}, __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
7803
6585
|
const Root$1 = styled(Layer)`
|
|
7804
6586
|
position: fixed;
|
|
7805
6587
|
top: 0;
|
|
@@ -7866,8 +6648,7 @@ function ToastProvider(props) {
|
|
|
7866
6648
|
version: 0,
|
|
7867
6649
|
push: (params) => {
|
|
7868
6650
|
const setState = (state_0) => startTransition(() => _setState(state_0)), id = params.id || generateToastId(), duration = params.duration || 5e3, dismiss = () => {
|
|
7869
|
-
|
|
7870
|
-
const timeoutId = (_a = toastsRef.current[id]) == null ? void 0 : _a.timeoutId;
|
|
6651
|
+
const timeoutId = toastsRef.current[id]?.timeoutId;
|
|
7871
6652
|
setState((prevState) => {
|
|
7872
6653
|
const idx = prevState.findIndex((t) => t.id === id);
|
|
7873
6654
|
if (idx > -1) {
|
|
@@ -7880,9 +6661,10 @@ function ToastProvider(props) {
|
|
|
7880
6661
|
return setState((prevState_0) => prevState_0.filter((t_0) => t_0.id !== id).concat([{
|
|
7881
6662
|
dismiss,
|
|
7882
6663
|
id,
|
|
7883
|
-
params:
|
|
6664
|
+
params: {
|
|
6665
|
+
...params,
|
|
7884
6666
|
duration
|
|
7885
|
-
}
|
|
6667
|
+
}
|
|
7886
6668
|
}])), toastsRef.current[id] && (clearTimeout(toastsRef.current[id].timeoutId), delete toastsRef.current[id]), toastsRef.current[id] = {
|
|
7887
6669
|
timeoutId: setTimeout(dismiss, duration)
|
|
7888
6670
|
}, id;
|
|
@@ -7928,7 +6710,6 @@ function useToast() {
|
|
|
7928
6710
|
return value;
|
|
7929
6711
|
}
|
|
7930
6712
|
function _findPrevItemElement(state, itemElements, focusedElement) {
|
|
7931
|
-
var _a;
|
|
7932
6713
|
const idx = itemElements.indexOf(focusedElement), els = itemElements.slice(0, idx), len = els.length;
|
|
7933
6714
|
for (let i = len - 1; i >= 0; i -= 1) {
|
|
7934
6715
|
const itemKey = els[i].getAttribute("data-tree-key");
|
|
@@ -7941,7 +6722,7 @@ function _findPrevItemElement(state, itemElements, focusedElement) {
|
|
|
7941
6722
|
for (let j = 0; j < segments.length; j += 1) {
|
|
7942
6723
|
p.push(segments[j]);
|
|
7943
6724
|
const k = p.join("/");
|
|
7944
|
-
if (!
|
|
6725
|
+
if (!state[k]?.expanded) {
|
|
7945
6726
|
expanded = !1;
|
|
7946
6727
|
break;
|
|
7947
6728
|
}
|
|
@@ -7952,7 +6733,6 @@ function _findPrevItemElement(state, itemElements, focusedElement) {
|
|
|
7952
6733
|
return null;
|
|
7953
6734
|
}
|
|
7954
6735
|
function _findNextItemElement(state, itemElements, focusedElement) {
|
|
7955
|
-
var _a;
|
|
7956
6736
|
const idx = itemElements.indexOf(focusedElement), els = itemElements.slice(idx), len = itemElements.length;
|
|
7957
6737
|
for (let i = 1; i < len; i += 1) {
|
|
7958
6738
|
if (!els[i])
|
|
@@ -7967,7 +6747,7 @@ function _findNextItemElement(state, itemElements, focusedElement) {
|
|
|
7967
6747
|
for (let j = 0; j < segments.length; j += 1) {
|
|
7968
6748
|
p.push(segments[j]);
|
|
7969
6749
|
const k = p.join("/");
|
|
7970
|
-
if (!
|
|
6750
|
+
if (!state[k]?.expanded) {
|
|
7971
6751
|
expanded = !1;
|
|
7972
6752
|
break;
|
|
7973
6753
|
}
|
|
@@ -7983,36 +6763,15 @@ function _focusItemElement(el) {
|
|
|
7983
6763
|
firstChild && firstChild instanceof HTMLElement && firstChild.focus();
|
|
7984
6764
|
}
|
|
7985
6765
|
}
|
|
7986
|
-
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null)
|
|
7987
|
-
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) => {
|
|
7988
|
-
for (var prop in b || (b = {}))
|
|
7989
|
-
__hasOwnProp$2.call(b, prop) && __defNormalProp$2(a, prop, b[prop]);
|
|
7990
|
-
if (__getOwnPropSymbols$2)
|
|
7991
|
-
for (var prop of __getOwnPropSymbols$2(b))
|
|
7992
|
-
__propIsEnum$2.call(b, prop) && __defNormalProp$2(a, prop, b[prop]);
|
|
7993
|
-
return a;
|
|
7994
|
-
}, __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b)), __objRest$2 = (source, exclude) => {
|
|
7995
|
-
var target = {};
|
|
7996
|
-
for (var prop in source)
|
|
7997
|
-
__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7998
|
-
if (source != null && __getOwnPropSymbols$2)
|
|
7999
|
-
for (var prop of __getOwnPropSymbols$2(source))
|
|
8000
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop) && (target[prop] = source[prop]);
|
|
8001
|
-
return target;
|
|
8002
|
-
};
|
|
8003
|
-
const Tree = memo(forwardRef(function(props, forwardedRef) {
|
|
8004
|
-
var _a;
|
|
6766
|
+
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null), Tree = memo(forwardRef(function(props, forwardedRef) {
|
|
8005
6767
|
const $ = c(37);
|
|
8006
6768
|
let children, onFocus, restProps, t0;
|
|
8007
|
-
$[0] !== props ? (
|
|
6769
|
+
$[0] !== props ? ({
|
|
8008
6770
|
children,
|
|
8009
6771
|
space: t0,
|
|
8010
|
-
onFocus
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
"space",
|
|
8014
|
-
"onFocus"
|
|
8015
|
-
]), $[0] = props, $[1] = children, $[2] = onFocus, $[3] = restProps, $[4] = t0) : (children = $[1], onFocus = $[2], restProps = $[3], t0 = $[4]);
|
|
6772
|
+
onFocus,
|
|
6773
|
+
...restProps
|
|
6774
|
+
} = props, $[0] = props, $[1] = children, $[2] = onFocus, $[3] = restProps, $[4] = t0) : (children = $[1], onFocus = $[2], restProps = $[3], t0 = $[4]);
|
|
8016
6775
|
const space = t0 === void 0 ? 1 : t0, ref = useRef(null), [focusedElement, setFocusedElement] = useState(null), focusedElementRef = useRef(focusedElement);
|
|
8017
6776
|
let t1, t2;
|
|
8018
6777
|
$[5] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[5] = t2) : t2 = $[5], t1 = t2;
|
|
@@ -8034,14 +6793,17 @@ const Tree = memo(forwardRef(function(props, forwardedRef) {
|
|
|
8034
6793
|
stateRef.current = state;
|
|
8035
6794
|
}, t9 = [state], $[12] = state, $[13] = t8, $[14] = t9) : (t8 = $[13], t9 = $[14]), useEffect(t8, t9);
|
|
8036
6795
|
let t10;
|
|
8037
|
-
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) =>
|
|
6796
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) => ({
|
|
6797
|
+
...s,
|
|
8038
6798
|
[path_0]: {
|
|
8039
6799
|
element,
|
|
8040
6800
|
expanded
|
|
8041
6801
|
}
|
|
8042
6802
|
})), selected && setFocusedElement(element), () => {
|
|
8043
6803
|
setState((s_0) => {
|
|
8044
|
-
const newState =
|
|
6804
|
+
const newState = {
|
|
6805
|
+
...s_0
|
|
6806
|
+
};
|
|
8045
6807
|
return delete newState[path_0], newState;
|
|
8046
6808
|
});
|
|
8047
6809
|
}), $[15] = t10) : t10 = $[15];
|
|
@@ -8050,11 +6812,13 @@ const Tree = memo(forwardRef(function(props, forwardedRef) {
|
|
|
8050
6812
|
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (path_1, expanded_0) => {
|
|
8051
6813
|
setState((s_1) => {
|
|
8052
6814
|
const itemState = s_1[path_1];
|
|
8053
|
-
return itemState ?
|
|
8054
|
-
|
|
6815
|
+
return itemState ? {
|
|
6816
|
+
...s_1,
|
|
6817
|
+
[path_1]: {
|
|
6818
|
+
...itemState,
|
|
8055
6819
|
expanded: expanded_0
|
|
8056
|
-
}
|
|
8057
|
-
}
|
|
6820
|
+
}
|
|
6821
|
+
} : s_1;
|
|
8058
6822
|
});
|
|
8059
6823
|
}, $[16] = t11) : t11 = $[16];
|
|
8060
6824
|
const setExpanded = t11;
|
|
@@ -8075,7 +6839,6 @@ const Tree = memo(forwardRef(function(props, forwardedRef) {
|
|
|
8075
6839
|
const contextValue = t12;
|
|
8076
6840
|
let t15;
|
|
8077
6841
|
$[21] !== itemElements ? (t15 = (event) => {
|
|
8078
|
-
var _a2;
|
|
8079
6842
|
if (focusedElementRef.current) {
|
|
8080
6843
|
if (event.key === "ArrowDown") {
|
|
8081
6844
|
event.preventDefault();
|
|
@@ -8100,11 +6863,13 @@ const Tree = memo(forwardRef(function(props, forwardedRef) {
|
|
|
8100
6863
|
if (itemState_0.expanded)
|
|
8101
6864
|
setState((s_2) => {
|
|
8102
6865
|
const itemState_1 = s_2[itemKey];
|
|
8103
|
-
return itemState_1 ?
|
|
8104
|
-
|
|
6866
|
+
return itemState_1 ? {
|
|
6867
|
+
...s_2,
|
|
6868
|
+
[itemKey]: {
|
|
6869
|
+
...itemState_1,
|
|
8105
6870
|
expanded: !1
|
|
8106
|
-
}
|
|
8107
|
-
}
|
|
6871
|
+
}
|
|
6872
|
+
} : s_2;
|
|
8108
6873
|
});
|
|
8109
6874
|
else {
|
|
8110
6875
|
const itemPath = itemKey.split("/");
|
|
@@ -8119,13 +6884,15 @@ const Tree = memo(forwardRef(function(props, forwardedRef) {
|
|
|
8119
6884
|
const focusedKey = focusedElementRef.current.getAttribute("data-tree-key");
|
|
8120
6885
|
if (!focusedKey)
|
|
8121
6886
|
return;
|
|
8122
|
-
|
|
6887
|
+
stateRef.current[focusedKey]?.expanded || setState((s_3) => {
|
|
8123
6888
|
const itemState_2 = s_3[focusedKey];
|
|
8124
|
-
return itemState_2 ?
|
|
8125
|
-
|
|
6889
|
+
return itemState_2 ? {
|
|
6890
|
+
...s_3,
|
|
6891
|
+
[focusedKey]: {
|
|
6892
|
+
...itemState_2,
|
|
8126
6893
|
expanded: !0
|
|
8127
|
-
}
|
|
8128
|
-
}
|
|
6894
|
+
}
|
|
6895
|
+
} : s_3;
|
|
8129
6896
|
});
|
|
8130
6897
|
return;
|
|
8131
6898
|
}
|
|
@@ -8134,7 +6901,7 @@ const Tree = memo(forwardRef(function(props, forwardedRef) {
|
|
|
8134
6901
|
const handleKeyDown = t15;
|
|
8135
6902
|
let t16;
|
|
8136
6903
|
$[23] !== onFocus ? (t16 = (event_0) => {
|
|
8137
|
-
setFocusedElement(event_0.target), onFocus
|
|
6904
|
+
setFocusedElement(event_0.target), onFocus?.(event_0);
|
|
8138
6905
|
}, $[23] = onFocus, $[24] = t16) : t16 = $[24];
|
|
8139
6906
|
const handleFocus = t16;
|
|
8140
6907
|
let t17;
|
|
@@ -8147,7 +6914,7 @@ const Tree = memo(forwardRef(function(props, forwardedRef) {
|
|
|
8147
6914
|
let t18;
|
|
8148
6915
|
$[26] !== children ? (t18 = [children], $[26] = children, $[27] = t18) : t18 = $[27], useEffect(t17, t18);
|
|
8149
6916
|
let t19;
|
|
8150
|
-
$[28] !== children || $[29] !== handleFocus || $[30] !== handleKeyDown || $[31] !== restProps || $[32] !== space ? (t19 = /* @__PURE__ */ jsx(Stack,
|
|
6917
|
+
$[28] !== children || $[29] !== handleFocus || $[30] !== handleKeyDown || $[31] !== restProps || $[32] !== space ? (t19 = /* @__PURE__ */ 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];
|
|
8151
6918
|
let t20;
|
|
8152
6919
|
return $[34] !== contextValue || $[35] !== t19 ? (t20 = /* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: t19 }), $[34] = contextValue, $[35] = t19, $[36] = t20) : t20 = $[36], t20;
|
|
8153
6920
|
}));
|
|
@@ -8250,61 +7017,25 @@ function useTree() {
|
|
|
8250
7017
|
throw new Error("Tree: missing context value");
|
|
8251
7018
|
return tree;
|
|
8252
7019
|
}
|
|
8253
|
-
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) => {
|
|
8254
|
-
for (var prop in b || (b = {}))
|
|
8255
|
-
__hasOwnProp$1.call(b, prop) && __defNormalProp$1(a, prop, b[prop]);
|
|
8256
|
-
if (__getOwnPropSymbols$1)
|
|
8257
|
-
for (var prop of __getOwnPropSymbols$1(b))
|
|
8258
|
-
__propIsEnum$1.call(b, prop) && __defNormalProp$1(a, prop, b[prop]);
|
|
8259
|
-
return a;
|
|
8260
|
-
}, __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)), __objRest$1 = (source, exclude) => {
|
|
8261
|
-
var target = {};
|
|
8262
|
-
for (var prop in source)
|
|
8263
|
-
__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
8264
|
-
if (source != null && __getOwnPropSymbols$1)
|
|
8265
|
-
for (var prop of __getOwnPropSymbols$1(source))
|
|
8266
|
-
exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop) && (target[prop] = source[prop]);
|
|
8267
|
-
return target;
|
|
8268
|
-
};
|
|
8269
7020
|
const TreeGroup = memo(function(props) {
|
|
8270
|
-
var _a;
|
|
8271
7021
|
const $ = c(9);
|
|
8272
7022
|
let children, restProps, t0;
|
|
8273
|
-
$[0] !== props ? (
|
|
7023
|
+
$[0] !== props ? ({
|
|
8274
7024
|
children,
|
|
8275
|
-
expanded: t0
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
"expanded"
|
|
8279
|
-
]), $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
7025
|
+
expanded: t0,
|
|
7026
|
+
...restProps
|
|
7027
|
+
} = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
8280
7028
|
const expanded = t0 === void 0 ? !1 : t0, tree = useTree(), t1 = !expanded;
|
|
8281
7029
|
let t2;
|
|
8282
|
-
return $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.space ? (t2 = /* @__PURE__ */ jsx(Stack,
|
|
8283
|
-
})
|
|
8284
|
-
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) => {
|
|
8285
|
-
for (var prop in b || (b = {}))
|
|
8286
|
-
__hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
|
|
8287
|
-
if (__getOwnPropSymbols)
|
|
8288
|
-
for (var prop of __getOwnPropSymbols(b))
|
|
8289
|
-
__propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
|
|
8290
|
-
return a;
|
|
8291
|
-
}, __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)), __objRest = (source, exclude) => {
|
|
8292
|
-
var target = {};
|
|
8293
|
-
for (var prop in source)
|
|
8294
|
-
__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
8295
|
-
if (source != null && __getOwnPropSymbols)
|
|
8296
|
-
for (var prop of __getOwnPropSymbols(source))
|
|
8297
|
-
exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop) && (target[prop] = source[prop]);
|
|
8298
|
-
return target;
|
|
8299
|
-
};
|
|
8300
|
-
const Root = memo(styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styled(Box).attrs({
|
|
7030
|
+
return $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.space ? (t2 = /* @__PURE__ */ 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;
|
|
7031
|
+
}), Root = memo(styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styled(Box).attrs({
|
|
8301
7032
|
forwardedAs: "a"
|
|
8302
7033
|
})(treeItemBoxStyle), ToggleArrowText = styled(Text)`
|
|
8303
7034
|
& > svg {
|
|
8304
7035
|
transition: transform 100ms;
|
|
8305
7036
|
}
|
|
8306
7037
|
`, TreeItem = memo(function(props) {
|
|
8307
|
-
const
|
|
7038
|
+
const {
|
|
8308
7039
|
children,
|
|
8309
7040
|
expanded: expandedProp = !1,
|
|
8310
7041
|
fontSize: fontSize2 = 1,
|
|
@@ -8318,28 +7049,15 @@ const Root = memo(styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeIte
|
|
|
8318
7049
|
selected = !1,
|
|
8319
7050
|
space = 2,
|
|
8320
7051
|
text,
|
|
8321
|
-
weight
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
"expanded",
|
|
8325
|
-
"fontSize",
|
|
8326
|
-
"href",
|
|
8327
|
-
"icon",
|
|
8328
|
-
"id",
|
|
8329
|
-
"linkAs",
|
|
8330
|
-
"muted",
|
|
8331
|
-
"onClick",
|
|
8332
|
-
"padding",
|
|
8333
|
-
"selected",
|
|
8334
|
-
"space",
|
|
8335
|
-
"text",
|
|
8336
|
-
"weight"
|
|
8337
|
-
]), rootRef = useRef(null), treeitemRef = useRef(null), tree = useTree(), {
|
|
7052
|
+
weight,
|
|
7053
|
+
...restProps
|
|
7054
|
+
} = props, rootRef = useRef(null), treeitemRef = useRef(null), tree = useTree(), {
|
|
8338
7055
|
path,
|
|
8339
7056
|
registerItem,
|
|
8340
7057
|
setExpanded,
|
|
8341
7058
|
setFocusedElement
|
|
8342
|
-
} = tree, _id = useId(), id = idProp || _id, itemPath = useMemo(() => path.concat([id || ""]), [id, path]), itemKey = itemPath.join("/"), itemState = tree.state[itemKey], focused = tree.focusedElement === rootRef.current, expanded =
|
|
7059
|
+
} = tree, _id = useId(), id = idProp || _id, itemPath = 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 = useMemo(() => ({
|
|
7060
|
+
...tree,
|
|
8343
7061
|
level: tree.level + 1,
|
|
8344
7062
|
path: itemPath
|
|
8345
7063
|
}), [itemPath, tree]), handleClick = useCallback((event) => {
|
|
@@ -8347,10 +7065,7 @@ const Root = memo(styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeIte
|
|
|
8347
7065
|
const target = event.target;
|
|
8348
7066
|
target instanceof HTMLElement && (target.getAttribute("data-ui") === "TreeItem" || target.closest('[data-ui="TreeItem__box"]')) && (event.stopPropagation(), setExpanded(itemKey, !expanded), setFocusedElement(rootRef.current));
|
|
8349
7067
|
}, [expanded, itemKey, onClick, setExpanded, setFocusedElement]), handleKeyDown = useCallback((event_0) => {
|
|
8350
|
-
|
|
8351
|
-
const el = treeitemRef.current || rootRef.current;
|
|
8352
|
-
el == null || el.click();
|
|
8353
|
-
}
|
|
7068
|
+
focused && event_0.key === "Enter" && (treeitemRef.current || rootRef.current)?.click();
|
|
8354
7069
|
}, [focused]);
|
|
8355
7070
|
useEffect(() => {
|
|
8356
7071
|
if (rootRef.current)
|
|
@@ -8368,13 +7083,13 @@ const Root = memo(styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeIte
|
|
|
8368
7083
|
] }),
|
|
8369
7084
|
/* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Text, { muted, size: fontSize2, textOverflow: "ellipsis", weight, children: text }) })
|
|
8370
7085
|
] });
|
|
8371
|
-
return href ? /* @__PURE__ */ jsxs(Root,
|
|
7086
|
+
return href ? /* @__PURE__ */ 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: [
|
|
8372
7087
|
/* @__PURE__ */ jsx(TreeItemBox, { $level: tree.level, "aria-expanded": expanded, as: linkAs, "data-ui": "TreeItem__box", href, ref: treeitemRef, role: "treeitem", tabIndex, children: content }),
|
|
8373
7088
|
/* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsx(TreeGroup, { hidden: !expanded, children }) })
|
|
8374
|
-
] })
|
|
7089
|
+
] }) : /* @__PURE__ */ 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: [
|
|
8375
7090
|
/* @__PURE__ */ jsx(TreeItemBox, { $level: tree.level, as: "div", "data-ui": "TreeItem__box", children: content }),
|
|
8376
7091
|
/* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsx(TreeGroup, { expanded, children }) })
|
|
8377
|
-
] })
|
|
7092
|
+
] });
|
|
8378
7093
|
});
|
|
8379
7094
|
TreeItem.displayName = "Memo(TreeItem)";
|
|
8380
7095
|
export {
|