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