@sanity/ui 2.10.3 → 2.10.5
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 +3 -3
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ function rem(pixelValue) {
|
|
|
35
35
|
return pixelValue === 0 ? 0 : `${pixelValue / 16}rem`;
|
|
36
36
|
}
|
|
37
37
|
function _responsive(media, values, callback) {
|
|
38
|
-
return (values
|
|
38
|
+
return ((values == null ? void 0 : values.map(callback)) || []).map((statement, mediaIndex) => mediaIndex === 0 ? statement : {
|
|
39
39
|
[`@media screen and (min-width: ${media[mediaIndex - 1]}px)`]: statement
|
|
40
40
|
});
|
|
41
41
|
}
|
|
@@ -150,8 +150,8 @@ function responsiveTextFont(props) {
|
|
|
150
150
|
function useArrayProp(val, defaultVal) {
|
|
151
151
|
const $ = reactCompilerRuntime.c(3);
|
|
152
152
|
let t0;
|
|
153
|
-
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val
|
|
154
|
-
const [t1, setCache] = react.useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val
|
|
153
|
+
$[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val != null ? val : defaultVal)], $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2];
|
|
154
|
+
const [t1, setCache] = react.useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val != null ? val : defaultVal);
|
|
155
155
|
return hash !== cachedHash && setCache([_getArrayProp(val, defaultVal), hash]), cachedVal;
|
|
156
156
|
}
|
|
157
157
|
function _getElements(element, elementsArg) {
|
|
@@ -210,7 +210,7 @@ function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
|
210
210
|
const target = evt.target;
|
|
211
211
|
if (!(target instanceof Node))
|
|
212
212
|
return;
|
|
213
|
-
const resolvedBoundaryElement = boundaryElement
|
|
213
|
+
const resolvedBoundaryElement = boundaryElement == null ? void 0 : boundaryElement();
|
|
214
214
|
if (resolvedBoundaryElement && !resolvedBoundaryElement.contains(target))
|
|
215
215
|
return;
|
|
216
216
|
const elements = elementsArg().flat();
|
|
@@ -237,7 +237,8 @@ function useCustomValidity(ref, customValidity) {
|
|
|
237
237
|
const $ = reactCompilerRuntime.c(6);
|
|
238
238
|
let t0;
|
|
239
239
|
$[0] !== customValidity || $[1] !== ref.current ? (t0 = () => {
|
|
240
|
-
|
|
240
|
+
var _a;
|
|
241
|
+
(_a = ref.current) == null || _a.setCustomValidity(customValidity || "");
|
|
241
242
|
}, $[0] = customValidity, $[1] = ref.current, $[2] = t0) : t0 = $[2];
|
|
242
243
|
let t1;
|
|
243
244
|
$[3] !== customValidity || $[4] !== ref ? (t1 = [customValidity, ref], $[3] = customValidity, $[4] = ref, $[5] = t1) : t1 = $[5], react.useEffect(t0, t1);
|
|
@@ -298,7 +299,7 @@ var freeze = function(obj) {
|
|
|
298
299
|
var _a;
|
|
299
300
|
if (obj instanceof Element)
|
|
300
301
|
return !0;
|
|
301
|
-
var scope = (_a = obj
|
|
302
|
+
var scope = (_a = obj == null ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
302
303
|
return !!(scope && obj instanceof scope.Element);
|
|
303
304
|
}, isReplacedElement = function(target) {
|
|
304
305
|
switch (target.tagName) {
|
|
@@ -574,7 +575,8 @@ function useElementSize(element) {
|
|
|
574
575
|
}, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), react.useEffect(t0, t1), size2;
|
|
575
576
|
}
|
|
576
577
|
function useElementRect(element) {
|
|
577
|
-
|
|
578
|
+
const elementSize = useElementSize(element);
|
|
579
|
+
return (elementSize == null ? void 0 : elementSize._contentRect) || null;
|
|
578
580
|
}
|
|
579
581
|
function useForwardedRef(ref) {
|
|
580
582
|
const $ = reactCompilerRuntime.c(1), innerRef = react.useRef(null);
|
|
@@ -617,9 +619,10 @@ function createGlobalScopedContext(key2, defaultValue) {
|
|
|
617
619
|
}
|
|
618
620
|
const ThemeContext = createGlobalScopedContext("@sanity/ui/context/theme", null);
|
|
619
621
|
function ThemeProvider(props) {
|
|
622
|
+
var _a, _b, _c2;
|
|
620
623
|
const $ = reactCompilerRuntime.c(15), parentTheme = react.useContext(ThemeContext), {
|
|
621
624
|
children
|
|
622
|
-
} = props, scheme = props.scheme
|
|
625
|
+
} = 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";
|
|
623
626
|
let t0;
|
|
624
627
|
bb0: {
|
|
625
628
|
if (!rootTheme) {
|
|
@@ -752,10 +755,11 @@ function responsiveBorderStyle() {
|
|
|
752
755
|
return [border, borderTop, borderRight, borderBottom, borderLeft];
|
|
753
756
|
}
|
|
754
757
|
function border(props) {
|
|
758
|
+
var _a, _b;
|
|
755
759
|
const {
|
|
756
760
|
card,
|
|
757
761
|
media
|
|
758
|
-
} = theme.getTheme_v2(props.theme), borderStyle = `${card.border
|
|
762
|
+
} = theme.getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
|
|
759
763
|
return _responsive(media, props.$border, (value) => value ? {
|
|
760
764
|
"&&": {
|
|
761
765
|
border: borderStyle
|
|
@@ -767,10 +771,11 @@ function border(props) {
|
|
|
767
771
|
});
|
|
768
772
|
}
|
|
769
773
|
function borderTop(props) {
|
|
774
|
+
var _a, _b;
|
|
770
775
|
const {
|
|
771
776
|
card,
|
|
772
777
|
media
|
|
773
|
-
} = theme.getTheme_v2(props.theme), borderStyle = `${card.border
|
|
778
|
+
} = theme.getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
|
|
774
779
|
return _responsive(media, props.$borderTop, (value) => value ? {
|
|
775
780
|
"&&": {
|
|
776
781
|
borderTop: borderStyle
|
|
@@ -782,10 +787,11 @@ function borderTop(props) {
|
|
|
782
787
|
});
|
|
783
788
|
}
|
|
784
789
|
function borderRight(props) {
|
|
790
|
+
var _a, _b;
|
|
785
791
|
const {
|
|
786
792
|
card,
|
|
787
793
|
media
|
|
788
|
-
} = theme.getTheme_v2(props.theme), borderStyle = `${card.border
|
|
794
|
+
} = theme.getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
|
|
789
795
|
return _responsive(media, props.$borderRight, (value) => value ? {
|
|
790
796
|
"&&": {
|
|
791
797
|
borderRight: borderStyle
|
|
@@ -797,10 +803,11 @@ function borderRight(props) {
|
|
|
797
803
|
});
|
|
798
804
|
}
|
|
799
805
|
function borderBottom(props) {
|
|
806
|
+
var _a, _b;
|
|
800
807
|
const {
|
|
801
808
|
card,
|
|
802
809
|
media
|
|
803
|
-
} = theme.getTheme_v2(props.theme), borderStyle = `${card.border
|
|
810
|
+
} = theme.getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
|
|
804
811
|
return _responsive(media, props.$borderBottom, (value) => value ? {
|
|
805
812
|
"&&": {
|
|
806
813
|
borderBottom: borderStyle
|
|
@@ -812,10 +819,11 @@ function borderBottom(props) {
|
|
|
812
819
|
});
|
|
813
820
|
}
|
|
814
821
|
function borderLeft(props) {
|
|
822
|
+
var _a, _b;
|
|
815
823
|
const {
|
|
816
824
|
card,
|
|
817
825
|
media
|
|
818
|
-
} = theme.getTheme_v2(props.theme), borderStyle = `${card.border
|
|
826
|
+
} = theme.getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
|
|
819
827
|
return _responsive(media, props.$borderLeft, (value) => value ? {
|
|
820
828
|
"&&": {
|
|
821
829
|
borderLeft: borderStyle
|
|
@@ -1102,6 +1110,14 @@ function responsiveGridItemColumnEndStyle(props) {
|
|
|
1102
1110
|
gridColumnEnd: columnEnd
|
|
1103
1111
|
}));
|
|
1104
1112
|
}
|
|
1113
|
+
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) => {
|
|
1114
|
+
for (var prop in b || (b = {}))
|
|
1115
|
+
__hasOwnProp$Q.call(b, prop) && __defNormalProp$R(a, prop, b[prop]);
|
|
1116
|
+
if (__getOwnPropSymbols$Q)
|
|
1117
|
+
for (var prop of __getOwnPropSymbols$Q(b))
|
|
1118
|
+
__propIsEnum$Q.call(b, prop) && __defNormalProp$R(a, prop, b[prop]);
|
|
1119
|
+
return a;
|
|
1120
|
+
}, __spreadProps$P = (a, b) => __defProps$P(a, __getOwnPropDescs$P(b));
|
|
1105
1121
|
function responsiveInputPaddingStyle(props) {
|
|
1106
1122
|
const {
|
|
1107
1123
|
$fontSize,
|
|
@@ -1127,10 +1143,9 @@ function responsiveInputPaddingStyle(props) {
|
|
|
1127
1143
|
});
|
|
1128
1144
|
}
|
|
1129
1145
|
function responsiveInputPaddingIconRightStyle(props) {
|
|
1130
|
-
return responsiveInputPaddingStyle({
|
|
1131
|
-
...props,
|
|
1146
|
+
return responsiveInputPaddingStyle(__spreadProps$P(__spreadValues$Q({}, props), {
|
|
1132
1147
|
$iconRight: !0
|
|
1133
|
-
});
|
|
1148
|
+
}));
|
|
1134
1149
|
}
|
|
1135
1150
|
const ROOT_STYLE = styledComponents.css`
|
|
1136
1151
|
&:not([hidden]) {
|
|
@@ -1453,6 +1468,22 @@ function labelBaseStyle(props) {
|
|
|
1453
1468
|
}
|
|
1454
1469
|
`;
|
|
1455
1470
|
}
|
|
1471
|
+
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) => {
|
|
1472
|
+
for (var prop in b || (b = {}))
|
|
1473
|
+
__hasOwnProp$P.call(b, prop) && __defNormalProp$Q(a, prop, b[prop]);
|
|
1474
|
+
if (__getOwnPropSymbols$P)
|
|
1475
|
+
for (var prop of __getOwnPropSymbols$P(b))
|
|
1476
|
+
__propIsEnum$P.call(b, prop) && __defNormalProp$Q(a, prop, b[prop]);
|
|
1477
|
+
return a;
|
|
1478
|
+
}, __spreadProps$O = (a, b) => __defProps$O(a, __getOwnPropDescs$O(b)), __objRest$J = (source, exclude) => {
|
|
1479
|
+
var target = {};
|
|
1480
|
+
for (var prop in source)
|
|
1481
|
+
__hasOwnProp$P.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1482
|
+
if (source != null && __getOwnPropSymbols$P)
|
|
1483
|
+
for (var prop of __getOwnPropSymbols$P(source))
|
|
1484
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$P.call(source, prop) && (target[prop] = source[prop]);
|
|
1485
|
+
return target;
|
|
1486
|
+
};
|
|
1456
1487
|
const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), SpanWithTextOverflow$2 = styledComponents.styled.span`
|
|
1457
1488
|
display: block;
|
|
1458
1489
|
white-space: nowrap;
|
|
@@ -1460,18 +1491,26 @@ const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAl
|
|
|
1460
1491
|
overflow: hidden;
|
|
1461
1492
|
overflow: clip;
|
|
1462
1493
|
`, Label = react.forwardRef(function(props, ref) {
|
|
1494
|
+
var _a;
|
|
1463
1495
|
const $ = reactCompilerRuntime.c(22);
|
|
1464
1496
|
let accent, align, childrenProp, restProps, t0, t1, textOverflow, weight;
|
|
1465
|
-
$[0] !== props ? ({
|
|
1497
|
+
$[0] !== props ? (_a = props, {
|
|
1466
1498
|
accent,
|
|
1467
1499
|
align,
|
|
1468
1500
|
children: childrenProp,
|
|
1469
1501
|
muted: t0,
|
|
1470
1502
|
size: t1,
|
|
1471
1503
|
textOverflow,
|
|
1472
|
-
weight
|
|
1473
|
-
|
|
1474
|
-
|
|
1504
|
+
weight
|
|
1505
|
+
} = _a, restProps = __objRest$J(_a, [
|
|
1506
|
+
"accent",
|
|
1507
|
+
"align",
|
|
1508
|
+
"children",
|
|
1509
|
+
"muted",
|
|
1510
|
+
"size",
|
|
1511
|
+
"textOverflow",
|
|
1512
|
+
"weight"
|
|
1513
|
+
]), $[0] = props, $[1] = accent, $[2] = align, $[3] = childrenProp, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = textOverflow, $[8] = weight) : (accent = $[1], align = $[2], childrenProp = $[3], restProps = $[4], t0 = $[5], t1 = $[6], textOverflow = $[7], weight = $[8]);
|
|
1475
1514
|
const muted = t0 === void 0 ? !1 : t0, size2 = t1 === void 0 ? 2 : t1;
|
|
1476
1515
|
let children = childrenProp;
|
|
1477
1516
|
if (textOverflow === "ellipsis") {
|
|
@@ -1483,7 +1522,7 @@ const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAl
|
|
|
1483
1522
|
}
|
|
1484
1523
|
const t2 = useArrayProp(align), t3 = useArrayProp(size2);
|
|
1485
1524
|
let t4;
|
|
1486
|
-
return $[13] !== accent || $[14] !== children || $[15] !== muted || $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== weight ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Root$C, { "data-ui": "Label",
|
|
1525
|
+
return $[13] !== accent || $[14] !== children || $[15] !== muted || $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== weight ? (t4 = /* @__PURE__ */ jsxRuntime.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;
|
|
1487
1526
|
});
|
|
1488
1527
|
Label.displayName = "ForwardRef(Label)";
|
|
1489
1528
|
const avatarStyle = {
|
|
@@ -1629,12 +1668,29 @@ function avatarStrokeStyle() {
|
|
|
1629
1668
|
}
|
|
1630
1669
|
};
|
|
1631
1670
|
}
|
|
1671
|
+
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) => {
|
|
1672
|
+
for (var prop in b || (b = {}))
|
|
1673
|
+
__hasOwnProp$O.call(b, prop) && __defNormalProp$P(a, prop, b[prop]);
|
|
1674
|
+
if (__getOwnPropSymbols$O)
|
|
1675
|
+
for (var prop of __getOwnPropSymbols$O(b))
|
|
1676
|
+
__propIsEnum$O.call(b, prop) && __defNormalProp$P(a, prop, b[prop]);
|
|
1677
|
+
return a;
|
|
1678
|
+
}, __spreadProps$N = (a, b) => __defProps$N(a, __getOwnPropDescs$N(b)), __objRest$I = (source, exclude) => {
|
|
1679
|
+
var target = {};
|
|
1680
|
+
for (var prop in source)
|
|
1681
|
+
__hasOwnProp$O.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1682
|
+
if (source != null && __getOwnPropSymbols$O)
|
|
1683
|
+
for (var prop of __getOwnPropSymbols$O(source))
|
|
1684
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$O.call(source, prop) && (target[prop] = source[prop]);
|
|
1685
|
+
return target;
|
|
1686
|
+
};
|
|
1632
1687
|
const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyle.root), Arrow$1 = styledComponents.styled.div(avatarStyle.arrow), BgStroke = styledComponents.styled.ellipse(avatarStyle.bgStroke), Stroke = styledComponents.styled.ellipse(avatarStyle.stroke), Initials = styledComponents.styled.div(avatarStyle.initials), InitialsLabel = styledComponents.styled(Label)({
|
|
1633
1688
|
color: "inherit"
|
|
1634
1689
|
}), Image = styledComponents.styled.svg(avatarStyle.image), Avatar = react.forwardRef(function(props, ref) {
|
|
1690
|
+
var _a;
|
|
1635
1691
|
const $ = reactCompilerRuntime.c(52);
|
|
1636
1692
|
let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, restProps, src, t0, t1, t2, title;
|
|
1637
|
-
$[0] !== props ? ({
|
|
1693
|
+
$[0] !== props ? (_a = props, {
|
|
1638
1694
|
__unstable_hideInnerStroke,
|
|
1639
1695
|
as: asProp,
|
|
1640
1696
|
color: t0,
|
|
@@ -1645,9 +1701,20 @@ const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyl
|
|
|
1645
1701
|
arrowPosition: arrowPositionProp,
|
|
1646
1702
|
animateArrowFrom,
|
|
1647
1703
|
status: t1,
|
|
1648
|
-
size: t2
|
|
1649
|
-
|
|
1650
|
-
|
|
1704
|
+
size: t2
|
|
1705
|
+
} = _a, restProps = __objRest$I(_a, [
|
|
1706
|
+
"__unstable_hideInnerStroke",
|
|
1707
|
+
"as",
|
|
1708
|
+
"color",
|
|
1709
|
+
"src",
|
|
1710
|
+
"title",
|
|
1711
|
+
"initials",
|
|
1712
|
+
"onImageLoadError",
|
|
1713
|
+
"arrowPosition",
|
|
1714
|
+
"animateArrowFrom",
|
|
1715
|
+
"status",
|
|
1716
|
+
"size"
|
|
1717
|
+
]), $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = initials, $[6] = onImageLoadError, $[7] = restProps, $[8] = src, $[9] = t0, $[10] = t1, $[11] = t2, $[12] = title) : (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6], restProps = $[7], src = $[8], t0 = $[9], t1 = $[10], t2 = $[11], title = $[12]);
|
|
1651
1718
|
const color = t0 === void 0 ? "gray" : t0, status = t1 === void 0 ? "online" : t1, sizeProp = t2 === void 0 ? 1 : t2, {
|
|
1652
1719
|
avatar
|
|
1653
1720
|
} = useTheme_v2(), as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div", size2 = useArrayProp(sizeProp), _sizeRem = (avatar.sizes[size2[0]] || avatar.sizes[0]).size, _radius = _sizeRem / 2, elementId = react.useId(), [arrowPosition, setArrowPosition] = react.useState(animateArrowFrom || arrowPositionProp || "inside"), [imageFailed, setImageFailed] = react.useState(!1), imageId = `avatar-image-${elementId}`;
|
|
@@ -1682,11 +1749,11 @@ const Root$B = styledComponents.styled.div(responsiveAvatarSizeStyle, avatarStyl
|
|
|
1682
1749
|
let t13;
|
|
1683
1750
|
$[34] !== imageFailed || $[35] !== initials || $[36] !== initialsSize || $[37] !== src ? (t13 = (imageFailed || !src) && initials && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(Initials, { children: /* @__PURE__ */ jsxRuntime.jsx(InitialsLabel, { forwardedAs: "span", size: initialsSize, weight: "medium", children: initials }) }) }), $[34] = imageFailed, $[35] = initials, $[36] = initialsSize, $[37] = src, $[38] = t13) : t13 = $[38];
|
|
1684
1751
|
let t14;
|
|
1685
|
-
return $[39] !== arrowPosition || $[40] !== as || $[41] !== color || $[42] !== ref || $[43] !== restProps || $[44] !== size2 || $[45] !== status || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== title ? (t14 = /* @__PURE__ */ jsxRuntime.jsxs(Root$B, { as, "data-as": t10, "data-ui": "Avatar",
|
|
1752
|
+
return $[39] !== arrowPosition || $[40] !== as || $[41] !== color || $[42] !== ref || $[43] !== restProps || $[44] !== size2 || $[45] !== status || $[46] !== t10 || $[47] !== t11 || $[48] !== t12 || $[49] !== t13 || $[50] !== title ? (t14 = /* @__PURE__ */ jsxRuntime.jsxs(Root$B, __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: [
|
|
1686
1753
|
t11,
|
|
1687
1754
|
t12,
|
|
1688
1755
|
t13
|
|
1689
|
-
] }), $[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;
|
|
1756
|
+
] })), $[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;
|
|
1690
1757
|
});
|
|
1691
1758
|
Avatar.displayName = "ForwardRef(Avatar)";
|
|
1692
1759
|
function _temp$8(s) {
|
|
@@ -1745,6 +1812,22 @@ AvatarCounter.displayName = "ForwardRef(AvatarCounter)";
|
|
|
1745
1812
|
function _temp$7(s) {
|
|
1746
1813
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
1747
1814
|
}
|
|
1815
|
+
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) => {
|
|
1816
|
+
for (var prop in b || (b = {}))
|
|
1817
|
+
__hasOwnProp$N.call(b, prop) && __defNormalProp$O(a, prop, b[prop]);
|
|
1818
|
+
if (__getOwnPropSymbols$N)
|
|
1819
|
+
for (var prop of __getOwnPropSymbols$N(b))
|
|
1820
|
+
__propIsEnum$N.call(b, prop) && __defNormalProp$O(a, prop, b[prop]);
|
|
1821
|
+
return a;
|
|
1822
|
+
}, __spreadProps$M = (a, b) => __defProps$M(a, __getOwnPropDescs$M(b)), __objRest$H = (source, exclude) => {
|
|
1823
|
+
var target = {};
|
|
1824
|
+
for (var prop in source)
|
|
1825
|
+
__hasOwnProp$N.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1826
|
+
if (source != null && __getOwnPropSymbols$N)
|
|
1827
|
+
for (var prop of __getOwnPropSymbols$N(source))
|
|
1828
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$N.call(source, prop) && (target[prop] = source[prop]);
|
|
1829
|
+
return target;
|
|
1830
|
+
};
|
|
1748
1831
|
const BASE_STYLES = styledComponents.css`
|
|
1749
1832
|
white-space: nowrap;
|
|
1750
1833
|
|
|
@@ -1774,14 +1857,18 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
1774
1857
|
});
|
|
1775
1858
|
}
|
|
1776
1859
|
const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = react.forwardRef(function(props, ref) {
|
|
1860
|
+
var _a;
|
|
1777
1861
|
const $ = reactCompilerRuntime.c(15);
|
|
1778
1862
|
let childrenProp, restProps, t0, t1;
|
|
1779
|
-
$[0] !== props ? ({
|
|
1863
|
+
$[0] !== props ? (_a = props, {
|
|
1780
1864
|
children: childrenProp,
|
|
1781
1865
|
maxLength: t0,
|
|
1782
|
-
size: t1
|
|
1783
|
-
|
|
1784
|
-
|
|
1866
|
+
size: t1
|
|
1867
|
+
} = _a, restProps = __objRest$H(_a, [
|
|
1868
|
+
"children",
|
|
1869
|
+
"maxLength",
|
|
1870
|
+
"size"
|
|
1871
|
+
]), $[0] = props, $[1] = childrenProp, $[2] = restProps, $[3] = t0, $[4] = t1) : (childrenProp = $[1], restProps = $[2], t0 = $[3], t1 = $[4]);
|
|
1785
1872
|
const maxLengthProp = t0 === void 0 ? 4 : t0, sizeProp = t1 === void 0 ? 1 : t1, children = react.Children.toArray(childrenProp).filter(react.isValidElement), maxLength = Math.max(maxLengthProp, 0), size2 = useArrayProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = Root$z, t2 = "AvatarStack", t3 = len === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: len, size: size2 }) }), t4 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) });
|
|
1786
1873
|
let t5;
|
|
1787
1874
|
$[5] !== size2 ? (t5 = (child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: react.cloneElement(child, {
|
|
@@ -1789,17 +1876,34 @@ const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avata
|
|
|
1789
1876
|
}) }, String(childIndex)), $[5] = size2, $[6] = t5) : t5 = $[6];
|
|
1790
1877
|
const t6 = visibleChildren.map(t5);
|
|
1791
1878
|
let t7;
|
|
1792
|
-
return $[7] !== T0 || $[8] !== ref || $[9] !== restProps || $[10] !== size2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs(T0, { "data-ui": t2,
|
|
1879
|
+
return $[7] !== T0 || $[8] !== ref || $[9] !== restProps || $[10] !== size2 || $[11] !== t3 || $[12] !== t4 || $[13] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs(T0, __spreadProps$M(__spreadValues$N({ "data-ui": t2 }, restProps), { ref, $size: size2, children: [
|
|
1793
1880
|
t3,
|
|
1794
1881
|
t4,
|
|
1795
1882
|
t6
|
|
1796
|
-
] }), $[7] = T0, $[8] = ref, $[9] = restProps, $[10] = size2, $[11] = t3, $[12] = t4, $[13] = t6, $[14] = t7) : t7 = $[14], t7;
|
|
1883
|
+
] })), $[7] = T0, $[8] = ref, $[9] = restProps, $[10] = size2, $[11] = t3, $[12] = t4, $[13] = t6, $[14] = t7) : t7 = $[14], t7;
|
|
1797
1884
|
});
|
|
1798
1885
|
AvatarStack.displayName = "ForwardRef(AvatarStack)";
|
|
1886
|
+
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) => {
|
|
1887
|
+
for (var prop in b || (b = {}))
|
|
1888
|
+
__hasOwnProp$M.call(b, prop) && __defNormalProp$N(a, prop, b[prop]);
|
|
1889
|
+
if (__getOwnPropSymbols$M)
|
|
1890
|
+
for (var prop of __getOwnPropSymbols$M(b))
|
|
1891
|
+
__propIsEnum$M.call(b, prop) && __defNormalProp$N(a, prop, b[prop]);
|
|
1892
|
+
return a;
|
|
1893
|
+
}, __spreadProps$L = (a, b) => __defProps$L(a, __getOwnPropDescs$L(b)), __objRest$G = (source, exclude) => {
|
|
1894
|
+
var target = {};
|
|
1895
|
+
for (var prop in source)
|
|
1896
|
+
__hasOwnProp$M.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
1897
|
+
if (source != null && __getOwnPropSymbols$M)
|
|
1898
|
+
for (var prop of __getOwnPropSymbols$M(source))
|
|
1899
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$M.call(source, prop) && (target[prop] = source[prop]);
|
|
1900
|
+
return target;
|
|
1901
|
+
};
|
|
1799
1902
|
const Root$y = styledComponents.styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = react.forwardRef(function(props, ref) {
|
|
1903
|
+
var _a;
|
|
1800
1904
|
const $ = reactCompilerRuntime.c(59);
|
|
1801
1905
|
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;
|
|
1802
|
-
$[0] !== props ? ({
|
|
1906
|
+
$[0] !== props ? (_a = props, {
|
|
1803
1907
|
as: t0,
|
|
1804
1908
|
column,
|
|
1805
1909
|
columnStart,
|
|
@@ -1825,12 +1929,38 @@ const Root$y = styledComponents.styled.div(boxStyle, flexItemStyle, responsiveBo
|
|
|
1825
1929
|
row,
|
|
1826
1930
|
rowStart,
|
|
1827
1931
|
rowEnd,
|
|
1828
|
-
sizing
|
|
1829
|
-
|
|
1830
|
-
|
|
1932
|
+
sizing
|
|
1933
|
+
} = _a, restProps = __objRest$G(_a, [
|
|
1934
|
+
"as",
|
|
1935
|
+
"column",
|
|
1936
|
+
"columnStart",
|
|
1937
|
+
"columnEnd",
|
|
1938
|
+
"display",
|
|
1939
|
+
"flex",
|
|
1940
|
+
"height",
|
|
1941
|
+
"margin",
|
|
1942
|
+
"marginX",
|
|
1943
|
+
"marginY",
|
|
1944
|
+
"marginTop",
|
|
1945
|
+
"marginRight",
|
|
1946
|
+
"marginBottom",
|
|
1947
|
+
"marginLeft",
|
|
1948
|
+
"overflow",
|
|
1949
|
+
"padding",
|
|
1950
|
+
"paddingX",
|
|
1951
|
+
"paddingY",
|
|
1952
|
+
"paddingTop",
|
|
1953
|
+
"paddingRight",
|
|
1954
|
+
"paddingBottom",
|
|
1955
|
+
"paddingLeft",
|
|
1956
|
+
"row",
|
|
1957
|
+
"rowStart",
|
|
1958
|
+
"rowEnd",
|
|
1959
|
+
"sizing"
|
|
1960
|
+
]), $[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]);
|
|
1831
1961
|
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);
|
|
1832
1962
|
let t30;
|
|
1833
|
-
return $[28] !== asProp || $[29] !== props.children || $[30] !== ref || $[31] !== restProps || $[32] !== t10 || $[33] !== t11 || $[34] !== t12 || $[35] !== t13 || $[36] !== t14 || $[37] !== t15 || $[38] !== t16 || $[39] !== t17 || $[40] !== t18 || $[41] !== t19 || $[42] !== t20 || $[43] !== t21 || $[44] !== t22 || $[45] !== t23 || $[46] !== t24 || $[47] !== t25 || $[48] !== t26 || $[49] !== t27 || $[50] !== t28 || $[51] !== t29 || $[52] !== t4 || $[53] !== t5 || $[54] !== t6 || $[55] !== t7 || $[56] !== t8 || $[57] !== t9 ? (t30 = /* @__PURE__ */ jsxRuntime.jsx(Root$y, { "data-as": t4, "data-ui": "Box",
|
|
1963
|
+
return $[28] !== asProp || $[29] !== props.children || $[30] !== ref || $[31] !== restProps || $[32] !== t10 || $[33] !== t11 || $[34] !== t12 || $[35] !== t13 || $[36] !== t14 || $[37] !== t15 || $[38] !== t16 || $[39] !== t17 || $[40] !== t18 || $[41] !== t19 || $[42] !== t20 || $[43] !== t21 || $[44] !== t22 || $[45] !== t23 || $[46] !== t24 || $[47] !== t25 || $[48] !== t26 || $[49] !== t27 || $[50] !== t28 || $[51] !== t29 || $[52] !== t4 || $[53] !== t5 || $[54] !== t6 || $[55] !== t7 || $[56] !== t8 || $[57] !== t9 ? (t30 = /* @__PURE__ */ jsxRuntime.jsx(Root$y, __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;
|
|
1834
1964
|
});
|
|
1835
1965
|
Box.displayName = "ForwardRef(Box)";
|
|
1836
1966
|
function textBaseStyle(props) {
|
|
@@ -1901,6 +2031,22 @@ function textBaseStyle(props) {
|
|
|
1901
2031
|
}
|
|
1902
2032
|
`;
|
|
1903
2033
|
}
|
|
2034
|
+
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) => {
|
|
2035
|
+
for (var prop in b || (b = {}))
|
|
2036
|
+
__hasOwnProp$L.call(b, prop) && __defNormalProp$M(a, prop, b[prop]);
|
|
2037
|
+
if (__getOwnPropSymbols$L)
|
|
2038
|
+
for (var prop of __getOwnPropSymbols$L(b))
|
|
2039
|
+
__propIsEnum$L.call(b, prop) && __defNormalProp$M(a, prop, b[prop]);
|
|
2040
|
+
return a;
|
|
2041
|
+
}, __spreadProps$K = (a, b) => __defProps$K(a, __getOwnPropDescs$K(b)), __objRest$F = (source, exclude) => {
|
|
2042
|
+
var target = {};
|
|
2043
|
+
for (var prop in source)
|
|
2044
|
+
__hasOwnProp$L.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2045
|
+
if (source != null && __getOwnPropSymbols$L)
|
|
2046
|
+
for (var prop of __getOwnPropSymbols$L(source))
|
|
2047
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$L.call(source, prop) && (target[prop] = source[prop]);
|
|
2048
|
+
return target;
|
|
2049
|
+
};
|
|
1904
2050
|
const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), SpanWithTextOverflow$1 = styledComponents.styled.span`
|
|
1905
2051
|
display: block;
|
|
1906
2052
|
white-space: nowrap;
|
|
@@ -1908,18 +2054,26 @@ const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAli
|
|
|
1908
2054
|
overflow: hidden;
|
|
1909
2055
|
overflow: clip;
|
|
1910
2056
|
`, Text = react.forwardRef(function(props, ref) {
|
|
2057
|
+
var _a;
|
|
1911
2058
|
const $ = reactCompilerRuntime.c(22);
|
|
1912
2059
|
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
1913
|
-
$[0] !== props ? ({
|
|
2060
|
+
$[0] !== props ? (_a = props, {
|
|
1914
2061
|
accent: t0,
|
|
1915
2062
|
align,
|
|
1916
2063
|
children: childrenProp,
|
|
1917
2064
|
muted: t1,
|
|
1918
2065
|
size: t2,
|
|
1919
2066
|
textOverflow,
|
|
1920
|
-
weight
|
|
1921
|
-
|
|
1922
|
-
|
|
2067
|
+
weight
|
|
2068
|
+
} = _a, restProps = __objRest$F(_a, [
|
|
2069
|
+
"accent",
|
|
2070
|
+
"align",
|
|
2071
|
+
"children",
|
|
2072
|
+
"muted",
|
|
2073
|
+
"size",
|
|
2074
|
+
"textOverflow",
|
|
2075
|
+
"weight"
|
|
2076
|
+
]), $[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]);
|
|
1923
2077
|
const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
1924
2078
|
let children = childrenProp;
|
|
1925
2079
|
if (textOverflow === "ellipsis") {
|
|
@@ -1930,7 +2084,7 @@ const Root$x = styledComponents.styled.div(responsiveTextFont, responsiveTextAli
|
|
|
1930
2084
|
let t5;
|
|
1931
2085
|
$[11] !== children ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
|
|
1932
2086
|
let t6;
|
|
1933
|
-
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$x, { "data-ui": "Text",
|
|
2087
|
+
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.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;
|
|
1934
2088
|
});
|
|
1935
2089
|
Text.displayName = "ForwardRef(Text)";
|
|
1936
2090
|
function badgeStyle(props) {
|
|
@@ -1948,19 +2102,41 @@ function badgeStyle(props) {
|
|
|
1948
2102
|
}
|
|
1949
2103
|
};
|
|
1950
2104
|
}
|
|
2105
|
+
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) => {
|
|
2106
|
+
for (var prop in b || (b = {}))
|
|
2107
|
+
__hasOwnProp$K.call(b, prop) && __defNormalProp$L(a, prop, b[prop]);
|
|
2108
|
+
if (__getOwnPropSymbols$K)
|
|
2109
|
+
for (var prop of __getOwnPropSymbols$K(b))
|
|
2110
|
+
__propIsEnum$K.call(b, prop) && __defNormalProp$L(a, prop, b[prop]);
|
|
2111
|
+
return a;
|
|
2112
|
+
}, __spreadProps$J = (a, b) => __defProps$J(a, __getOwnPropDescs$J(b)), __objRest$E = (source, exclude) => {
|
|
2113
|
+
var target = {};
|
|
2114
|
+
for (var prop in source)
|
|
2115
|
+
__hasOwnProp$K.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2116
|
+
if (source != null && __getOwnPropSymbols$K)
|
|
2117
|
+
for (var prop of __getOwnPropSymbols$K(source))
|
|
2118
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$K.call(source, prop) && (target[prop] = source[prop]);
|
|
2119
|
+
return target;
|
|
2120
|
+
};
|
|
1951
2121
|
const Root$w = styledComponents.styled(Box)(responsiveRadiusStyle, badgeStyle), Badge = react.forwardRef(function(props, ref) {
|
|
1952
2122
|
const $ = reactCompilerRuntime.c(17);
|
|
1953
2123
|
let children, restProps, t0, t1, t2, t3;
|
|
1954
2124
|
if ($[0] !== props) {
|
|
1955
|
-
const {
|
|
2125
|
+
const _a = props, {
|
|
1956
2126
|
children: t42,
|
|
1957
2127
|
fontSize: t52,
|
|
1958
2128
|
mode: _deprecated_mode,
|
|
1959
2129
|
padding: t62,
|
|
1960
2130
|
radius: t72,
|
|
1961
|
-
tone: t8
|
|
1962
|
-
|
|
1963
|
-
|
|
2131
|
+
tone: t8
|
|
2132
|
+
} = _a, t9 = __objRest$E(_a, [
|
|
2133
|
+
"children",
|
|
2134
|
+
"fontSize",
|
|
2135
|
+
"mode",
|
|
2136
|
+
"padding",
|
|
2137
|
+
"radius",
|
|
2138
|
+
"tone"
|
|
2139
|
+
]);
|
|
1964
2140
|
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;
|
|
1965
2141
|
} else
|
|
1966
2142
|
children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5], t3 = $[6];
|
|
@@ -1968,26 +2144,57 @@ const Root$w = styledComponents.styled(Box)(responsiveRadiusStyle, badgeStyle),
|
|
|
1968
2144
|
let t6;
|
|
1969
2145
|
$[7] !== children || $[8] !== fontSize2 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children }), $[7] = children, $[8] = fontSize2, $[9] = t6) : t6 = $[9];
|
|
1970
2146
|
let t7;
|
|
1971
|
-
return $[10] !== ref || $[11] !== restProps || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== tone ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Root$w, { "data-ui": "Badge",
|
|
2147
|
+
return $[10] !== ref || $[11] !== restProps || $[12] !== t4 || $[13] !== t5 || $[14] !== t6 || $[15] !== tone ? (t7 = /* @__PURE__ */ jsxRuntime.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;
|
|
1972
2148
|
});
|
|
1973
2149
|
Badge.displayName = "ForwardRef(Badge)";
|
|
2150
|
+
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) => {
|
|
2151
|
+
for (var prop in b || (b = {}))
|
|
2152
|
+
__hasOwnProp$J.call(b, prop) && __defNormalProp$K(a, prop, b[prop]);
|
|
2153
|
+
if (__getOwnPropSymbols$J)
|
|
2154
|
+
for (var prop of __getOwnPropSymbols$J(b))
|
|
2155
|
+
__propIsEnum$J.call(b, prop) && __defNormalProp$K(a, prop, b[prop]);
|
|
2156
|
+
return a;
|
|
2157
|
+
}, __spreadProps$I = (a, b) => __defProps$I(a, __getOwnPropDescs$I(b)), __objRest$D = (source, exclude) => {
|
|
2158
|
+
var target = {};
|
|
2159
|
+
for (var prop in source)
|
|
2160
|
+
__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2161
|
+
if (source != null && __getOwnPropSymbols$J)
|
|
2162
|
+
for (var prop of __getOwnPropSymbols$J(source))
|
|
2163
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop) && (target[prop] = source[prop]);
|
|
2164
|
+
return target;
|
|
2165
|
+
};
|
|
1974
2166
|
const Root$v = styledComponents.styled(Box)(flexItemStyle, responsiveFlexStyle), Flex = react.forwardRef(function(props, ref) {
|
|
2167
|
+
var _a;
|
|
1975
2168
|
const $ = reactCompilerRuntime.c(17);
|
|
1976
2169
|
let align, as, gap, justify, restProps, t0, wrap;
|
|
1977
|
-
$[0] !== props ? ({
|
|
2170
|
+
$[0] !== props ? (_a = props, {
|
|
1978
2171
|
align,
|
|
1979
2172
|
as,
|
|
1980
2173
|
direction: t0,
|
|
1981
2174
|
gap,
|
|
1982
2175
|
justify,
|
|
1983
|
-
wrap
|
|
1984
|
-
|
|
1985
|
-
|
|
2176
|
+
wrap
|
|
2177
|
+
} = _a, restProps = __objRest$D(_a, [
|
|
2178
|
+
"align",
|
|
2179
|
+
"as",
|
|
2180
|
+
"direction",
|
|
2181
|
+
"gap",
|
|
2182
|
+
"justify",
|
|
2183
|
+
"wrap"
|
|
2184
|
+
]), $[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]);
|
|
1986
2185
|
const direction = t0 === void 0 ? "row" : t0, t1 = useArrayProp(align), t2 = useArrayProp(direction), t3 = useArrayProp(gap), t4 = useArrayProp(justify), t5 = useArrayProp(wrap);
|
|
1987
2186
|
let t6;
|
|
1988
|
-
return $[8] !== as || $[9] !== ref || $[10] !== restProps || $[11] !== t1 || $[12] !== t2 || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$v, { "data-ui": "Flex",
|
|
2187
|
+
return $[8] !== as || $[9] !== ref || $[10] !== restProps || $[11] !== t1 || $[12] !== t2 || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.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;
|
|
1989
2188
|
});
|
|
1990
2189
|
Flex.displayName = "ForwardRef(Flex)";
|
|
2190
|
+
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) => {
|
|
2191
|
+
for (var prop in b || (b = {}))
|
|
2192
|
+
__hasOwnProp$I.call(b, prop) && __defNormalProp$J(a, prop, b[prop]);
|
|
2193
|
+
if (__getOwnPropSymbols$I)
|
|
2194
|
+
for (var prop of __getOwnPropSymbols$I(b))
|
|
2195
|
+
__propIsEnum$I.call(b, prop) && __defNormalProp$J(a, prop, b[prop]);
|
|
2196
|
+
return a;
|
|
2197
|
+
}, __spreadProps$H = (a, b) => __defProps$H(a, __getOwnPropDescs$H(b));
|
|
1991
2198
|
const rotate$1 = styledComponents.keyframes`
|
|
1992
2199
|
from {
|
|
1993
2200
|
transform: rotate(0deg);
|
|
@@ -2005,10 +2212,11 @@ const rotate$1 = styledComponents.keyframes`
|
|
|
2005
2212
|
let t0;
|
|
2006
2213
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsxRuntime.jsx(icons.SpinnerIcon, {}), $[0] = t0) : t0 = $[0];
|
|
2007
2214
|
let t1;
|
|
2008
|
-
return $[1] !== props || $[2] !== ref ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$u, { "data-ui": "Spinner",
|
|
2215
|
+
return $[1] !== props || $[2] !== ref ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$u, __spreadProps$H(__spreadValues$I({ "data-ui": "Spinner" }, props), { ref, children: t0 })), $[1] = props, $[2] = ref, $[3] = t1) : t1 = $[3], t1;
|
|
2009
2216
|
});
|
|
2010
2217
|
Spinner.displayName = "ForwardRef(Spinner)";
|
|
2011
2218
|
function _cardColorStyle(base, color, checkered = !1) {
|
|
2219
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
2012
2220
|
return {
|
|
2013
2221
|
// from base
|
|
2014
2222
|
"--card-backdrop-color": base.backdrop,
|
|
@@ -2044,18 +2252,18 @@ function _cardColorStyle(base, color, checkered = !1) {
|
|
|
2044
2252
|
"--card-badge-default-dot-color": color.badge.default.dot,
|
|
2045
2253
|
"--card-badge-default-fg-color": color.badge.default.fg,
|
|
2046
2254
|
"--card-badge-default-icon-color": color.badge.default.icon,
|
|
2047
|
-
"--card-badge-neutral-bg-color": color.badge.neutral
|
|
2048
|
-
"--card-badge-neutral-dot-color": color.badge.neutral
|
|
2049
|
-
"--card-badge-neutral-fg-color": color.badge.neutral
|
|
2050
|
-
"--card-badge-neutral-icon-color": color.badge.neutral
|
|
2255
|
+
"--card-badge-neutral-bg-color": (_a = color.badge.neutral) == null ? void 0 : _a.bg,
|
|
2256
|
+
"--card-badge-neutral-dot-color": (_b = color.badge.neutral) == null ? void 0 : _b.dot,
|
|
2257
|
+
"--card-badge-neutral-fg-color": (_c = color.badge.neutral) == null ? void 0 : _c.fg,
|
|
2258
|
+
"--card-badge-neutral-icon-color": (_d = color.badge.neutral) == null ? void 0 : _d.icon,
|
|
2051
2259
|
"--card-badge-primary-bg-color": color.badge.primary.bg,
|
|
2052
2260
|
"--card-badge-primary-dot-color": color.badge.primary.dot,
|
|
2053
2261
|
"--card-badge-primary-fg-color": color.badge.primary.fg,
|
|
2054
2262
|
"--card-badge-primary-icon-color": color.badge.primary.icon,
|
|
2055
|
-
"--card-badge-suggest-bg-color": color.badge.suggest
|
|
2056
|
-
"--card-badge-suggest-dot-color": color.badge.suggest
|
|
2057
|
-
"--card-badge-suggest-fg-color": color.badge.suggest
|
|
2058
|
-
"--card-badge-suggest-icon-color": color.badge.suggest
|
|
2263
|
+
"--card-badge-suggest-bg-color": (_e = color.badge.suggest) == null ? void 0 : _e.bg,
|
|
2264
|
+
"--card-badge-suggest-dot-color": (_f = color.badge.suggest) == null ? void 0 : _f.dot,
|
|
2265
|
+
"--card-badge-suggest-fg-color": (_g = color.badge.suggest) == null ? void 0 : _g.fg,
|
|
2266
|
+
"--card-badge-suggest-icon-color": (_h = color.badge.suggest) == null ? void 0 : _h.icon,
|
|
2059
2267
|
"--card-badge-positive-bg-color": color.badge.positive.bg,
|
|
2060
2268
|
"--card-badge-positive-dot-color": color.badge.positive.dot,
|
|
2061
2269
|
"--card-badge-positive-fg-color": color.badge.positive.fg,
|
|
@@ -2094,7 +2302,7 @@ function buttonBaseStyles(props) {
|
|
|
2094
2302
|
style
|
|
2095
2303
|
} = theme.getTheme_v2(props.theme);
|
|
2096
2304
|
return styledComponents.css`
|
|
2097
|
-
${style
|
|
2305
|
+
${style == null ? void 0 : style.button};
|
|
2098
2306
|
|
|
2099
2307
|
-webkit-font-smoothing: inherit;
|
|
2100
2308
|
appearance: none;
|
|
@@ -2137,6 +2345,7 @@ function combineBoxShadow(...boxShadows) {
|
|
|
2137
2345
|
return boxShadows.filter(Boolean).join(",");
|
|
2138
2346
|
}
|
|
2139
2347
|
function buttonColorStyles(props) {
|
|
2348
|
+
var _a;
|
|
2140
2349
|
const {
|
|
2141
2350
|
$mode
|
|
2142
2351
|
} = props, {
|
|
@@ -2174,8 +2383,24 @@ function buttonColorStyles(props) {
|
|
|
2174
2383
|
},
|
|
2175
2384
|
"&[data-selected]": _cardColorStyle(baseColor, color.pressed)
|
|
2176
2385
|
}
|
|
2177
|
-
}, style
|
|
2178
|
-
}
|
|
2386
|
+
}, (_a = style == null ? void 0 : style.button) == null ? void 0 : _a.root].filter(Boolean);
|
|
2387
|
+
}
|
|
2388
|
+
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) => {
|
|
2389
|
+
for (var prop in b || (b = {}))
|
|
2390
|
+
__hasOwnProp$H.call(b, prop) && __defNormalProp$I(a, prop, b[prop]);
|
|
2391
|
+
if (__getOwnPropSymbols$H)
|
|
2392
|
+
for (var prop of __getOwnPropSymbols$H(b))
|
|
2393
|
+
__propIsEnum$H.call(b, prop) && __defNormalProp$I(a, prop, b[prop]);
|
|
2394
|
+
return a;
|
|
2395
|
+
}, __spreadProps$G = (a, b) => __defProps$G(a, __getOwnPropDescs$G(b)), __objRest$C = (source, exclude) => {
|
|
2396
|
+
var target = {};
|
|
2397
|
+
for (var prop in source)
|
|
2398
|
+
__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2399
|
+
if (source != null && __getOwnPropSymbols$H)
|
|
2400
|
+
for (var prop of __getOwnPropSymbols$H(source))
|
|
2401
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop) && (target[prop] = source[prop]);
|
|
2402
|
+
return target;
|
|
2403
|
+
};
|
|
2179
2404
|
const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styledComponents.styled.div`
|
|
2180
2405
|
position: absolute;
|
|
2181
2406
|
top: 0;
|
|
@@ -2190,9 +2415,10 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2190
2415
|
z-index: 1;
|
|
2191
2416
|
box-shadow: inherit;
|
|
2192
2417
|
`, Button = react.forwardRef(function(props, ref) {
|
|
2418
|
+
var _a;
|
|
2193
2419
|
const $ = reactCompilerRuntime.c(64);
|
|
2194
2420
|
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;
|
|
2195
|
-
$[0] !== props ? ({
|
|
2421
|
+
$[0] !== props ? (_a = props, {
|
|
2196
2422
|
children,
|
|
2197
2423
|
disabled,
|
|
2198
2424
|
fontSize: t0,
|
|
@@ -2216,9 +2442,33 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2216
2442
|
tone: t6,
|
|
2217
2443
|
type: t7,
|
|
2218
2444
|
muted: t8,
|
|
2219
|
-
width
|
|
2220
|
-
|
|
2221
|
-
|
|
2445
|
+
width
|
|
2446
|
+
} = _a, restProps = __objRest$C(_a, [
|
|
2447
|
+
"children",
|
|
2448
|
+
"disabled",
|
|
2449
|
+
"fontSize",
|
|
2450
|
+
"icon",
|
|
2451
|
+
"iconRight",
|
|
2452
|
+
"justify",
|
|
2453
|
+
"loading",
|
|
2454
|
+
"mode",
|
|
2455
|
+
"padding",
|
|
2456
|
+
"paddingX",
|
|
2457
|
+
"paddingY",
|
|
2458
|
+
"paddingTop",
|
|
2459
|
+
"paddingBottom",
|
|
2460
|
+
"paddingLeft",
|
|
2461
|
+
"paddingRight",
|
|
2462
|
+
"radius",
|
|
2463
|
+
"selected",
|
|
2464
|
+
"space",
|
|
2465
|
+
"text",
|
|
2466
|
+
"textAlign",
|
|
2467
|
+
"tone",
|
|
2468
|
+
"type",
|
|
2469
|
+
"muted",
|
|
2470
|
+
"width"
|
|
2471
|
+
]), $[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]);
|
|
2222
2472
|
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, {
|
|
2223
2473
|
button
|
|
2224
2474
|
} = 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);
|
|
@@ -2236,7 +2486,7 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2236
2486
|
let t14;
|
|
2237
2487
|
$[34] !== loading ? (t14 = !!loading && /* @__PURE__ */ jsxRuntime.jsx(LoadingBox, { children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) }), $[34] = loading, $[35] = t14) : t14 = $[35];
|
|
2238
2488
|
let t15;
|
|
2239
|
-
$[36] !== IconComponent || $[37] !== IconRightComponent || $[38] !== boxProps || $[39] !== button || $[40] !== fontSize2 || $[41] !== justify || $[42] !== muted || $[43] !== space || $[44] !== text || $[45] !== textAlign ? (t15 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span",
|
|
2489
|
+
$[36] !== IconComponent || $[37] !== IconRightComponent || $[38] !== boxProps || $[39] !== button || $[40] !== fontSize2 || $[41] !== justify || $[42] !== muted || $[43] !== space || $[44] !== text || $[45] !== textAlign ? (t15 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(Box, __spreadProps$G(__spreadValues$H({ as: "span" }, boxProps), { children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", justify, gap: space, children: [
|
|
2240
2490
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
2241
2491
|
react.isValidElement(IconComponent) && IconComponent,
|
|
2242
2492
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
@@ -2246,15 +2496,15 @@ const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseS
|
|
|
2246
2496
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
2247
2497
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
2248
2498
|
] })
|
|
2249
|
-
] }) }), $[36] = IconComponent, $[37] = IconRightComponent, $[38] = boxProps, $[39] = button, $[40] = fontSize2, $[41] = justify, $[42] = muted, $[43] = space, $[44] = text, $[45] = textAlign, $[46] = t15) : t15 = $[46];
|
|
2499
|
+
] }) })), $[36] = IconComponent, $[37] = IconRightComponent, $[38] = boxProps, $[39] = button, $[40] = fontSize2, $[41] = justify, $[42] = muted, $[43] = space, $[44] = text, $[45] = textAlign, $[46] = t15) : t15 = $[46];
|
|
2250
2500
|
let t16;
|
|
2251
|
-
$[47] !== boxProps || $[48] !== children ? (t16 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span",
|
|
2501
|
+
$[47] !== boxProps || $[48] !== children ? (t16 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, __spreadProps$G(__spreadValues$H({ as: "span" }, boxProps), { children })), $[47] = boxProps, $[48] = children, $[49] = t16) : t16 = $[49];
|
|
2252
2502
|
let t17;
|
|
2253
|
-
return $[50] !== mode || $[51] !== radius || $[52] !== ref || $[53] !== restProps || $[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== t14 || $[58] !== t15 || $[59] !== t16 || $[60] !== tone || $[61] !== type || $[62] !== width ? (t17 = /* @__PURE__ */ jsxRuntime.jsxs(Root$t, { "data-ui": "Button",
|
|
2503
|
+
return $[50] !== mode || $[51] !== radius || $[52] !== ref || $[53] !== restProps || $[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== t14 || $[58] !== t15 || $[59] !== t16 || $[60] !== tone || $[61] !== type || $[62] !== width ? (t17 = /* @__PURE__ */ jsxRuntime.jsxs(Root$t, __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: [
|
|
2254
2504
|
t14,
|
|
2255
2505
|
t15,
|
|
2256
2506
|
t16
|
|
2257
|
-
] }), $[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;
|
|
2507
|
+
] })), $[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;
|
|
2258
2508
|
});
|
|
2259
2509
|
Button.displayName = "ForwardRef(Button)";
|
|
2260
2510
|
function cardStyle(props) {
|
|
@@ -2298,6 +2548,7 @@ function cardBaseStyle(props) {
|
|
|
2298
2548
|
`;
|
|
2299
2549
|
}
|
|
2300
2550
|
function cardColorStyle(props) {
|
|
2551
|
+
var _a;
|
|
2301
2552
|
const {
|
|
2302
2553
|
$checkered,
|
|
2303
2554
|
$focusRing,
|
|
@@ -2402,13 +2653,30 @@ function cardColorStyle(props) {
|
|
|
2402
2653
|
}
|
|
2403
2654
|
}
|
|
2404
2655
|
|
|
2405
|
-
${style
|
|
2656
|
+
${(_a = style == null ? void 0 : style.card) == null ? void 0 : _a.root}
|
|
2406
2657
|
`;
|
|
2407
2658
|
}
|
|
2659
|
+
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) => {
|
|
2660
|
+
for (var prop in b || (b = {}))
|
|
2661
|
+
__hasOwnProp$G.call(b, prop) && __defNormalProp$H(a, prop, b[prop]);
|
|
2662
|
+
if (__getOwnPropSymbols$G)
|
|
2663
|
+
for (var prop of __getOwnPropSymbols$G(b))
|
|
2664
|
+
__propIsEnum$G.call(b, prop) && __defNormalProp$H(a, prop, b[prop]);
|
|
2665
|
+
return a;
|
|
2666
|
+
}, __spreadProps$F = (a, b) => __defProps$F(a, __getOwnPropDescs$F(b)), __objRest$B = (source, exclude) => {
|
|
2667
|
+
var target = {};
|
|
2668
|
+
for (var prop in source)
|
|
2669
|
+
__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2670
|
+
if (source != null && __getOwnPropSymbols$G)
|
|
2671
|
+
for (var prop of __getOwnPropSymbols$G(source))
|
|
2672
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop) && (target[prop] = source[prop]);
|
|
2673
|
+
return target;
|
|
2674
|
+
};
|
|
2408
2675
|
const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = react.forwardRef(function(props, ref) {
|
|
2676
|
+
var _a;
|
|
2409
2677
|
const $ = reactCompilerRuntime.c(42);
|
|
2410
2678
|
let asProp, border2, borderBottom2, borderLeft2, borderRight2, borderTop2, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;
|
|
2411
|
-
$[0] !== props ? ({
|
|
2679
|
+
$[0] !== props ? (_a = props, {
|
|
2412
2680
|
__unstable_checkered: t0,
|
|
2413
2681
|
__unstable_focusRing: t1,
|
|
2414
2682
|
as: asProp,
|
|
@@ -2423,12 +2691,27 @@ const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRad
|
|
|
2423
2691
|
scheme,
|
|
2424
2692
|
selected,
|
|
2425
2693
|
shadow,
|
|
2426
|
-
tone: t3
|
|
2427
|
-
|
|
2428
|
-
|
|
2694
|
+
tone: t3
|
|
2695
|
+
} = _a, restProps = __objRest$B(_a, [
|
|
2696
|
+
"__unstable_checkered",
|
|
2697
|
+
"__unstable_focusRing",
|
|
2698
|
+
"as",
|
|
2699
|
+
"border",
|
|
2700
|
+
"borderTop",
|
|
2701
|
+
"borderRight",
|
|
2702
|
+
"borderBottom",
|
|
2703
|
+
"borderLeft",
|
|
2704
|
+
"muted",
|
|
2705
|
+
"pressed",
|
|
2706
|
+
"radius",
|
|
2707
|
+
"scheme",
|
|
2708
|
+
"selected",
|
|
2709
|
+
"shadow",
|
|
2710
|
+
"tone"
|
|
2711
|
+
]), $[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]);
|
|
2429
2712
|
const checkered = t0 === void 0 ? !1 : t0, focusRing = t1 === void 0 ? !1 : t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = ReactIs.isValidElementType(asProp) ? asProp : "div", rootTheme = useRootTheme(), tone = toneProp === "inherit" ? rootTheme.tone : toneProp, t4 = typeof as == "string" ? as : void 0, t5 = rootTheme.scheme, t6 = useArrayProp(border2), t7 = useArrayProp(borderTop2), t8 = useArrayProp(borderRight2), t9 = useArrayProp(borderBottom2), t10 = useArrayProp(borderLeft2), t11 = useArrayProp(radius), t12 = useArrayProp(shadow), t13 = checkered ? "" : void 0, t14 = pressed ? "" : void 0, t15 = selected ? "" : void 0;
|
|
2430
2713
|
let t16;
|
|
2431
|
-
$[17] !== as || $[18] !== checkered || $[19] !== focusRing || $[20] !== muted || $[21] !== ref || $[22] !== restProps || $[23] !== rootTheme.scheme || $[24] !== selected || $[25] !== t10 || $[26] !== t11 || $[27] !== t12 || $[28] !== t13 || $[29] !== t14 || $[30] !== t15 || $[31] !== t4 || $[32] !== t6 || $[33] !== t7 || $[34] !== t8 || $[35] !== t9 || $[36] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Root$s, { "data-as": t4, "data-scheme": t5, "data-ui": "Card", "data-tone": tone,
|
|
2714
|
+
$[17] !== as || $[18] !== checkered || $[19] !== focusRing || $[20] !== muted || $[21] !== ref || $[22] !== restProps || $[23] !== rootTheme.scheme || $[24] !== selected || $[25] !== t10 || $[26] !== t11 || $[27] !== t12 || $[28] !== t13 || $[29] !== t14 || $[30] !== t15 || $[31] !== t4 || $[32] !== t6 || $[33] !== t7 || $[34] !== t8 || $[35] !== t9 || $[36] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(Root$s, __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];
|
|
2432
2715
|
let t17;
|
|
2433
2716
|
return $[38] !== scheme || $[39] !== t16 || $[40] !== tone ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(ThemeColorProvider, { scheme, tone, children: t16 }), $[38] = scheme, $[39] = t16, $[40] = tone, $[41] = t17) : t17 = $[41], t17;
|
|
2434
2717
|
});
|
|
@@ -2571,19 +2854,43 @@ function inputElementStyles(props) {
|
|
|
2571
2854
|
}
|
|
2572
2855
|
`;
|
|
2573
2856
|
}
|
|
2857
|
+
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) => {
|
|
2858
|
+
for (var prop in b || (b = {}))
|
|
2859
|
+
__hasOwnProp$F.call(b, prop) && __defNormalProp$G(a, prop, b[prop]);
|
|
2860
|
+
if (__getOwnPropSymbols$F)
|
|
2861
|
+
for (var prop of __getOwnPropSymbols$F(b))
|
|
2862
|
+
__propIsEnum$F.call(b, prop) && __defNormalProp$G(a, prop, b[prop]);
|
|
2863
|
+
return a;
|
|
2864
|
+
}, __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b)), __objRest$A = (source, exclude) => {
|
|
2865
|
+
var target = {};
|
|
2866
|
+
for (var prop in source)
|
|
2867
|
+
__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
2868
|
+
if (source != null && __getOwnPropSymbols$F)
|
|
2869
|
+
for (var prop of __getOwnPropSymbols$F(source))
|
|
2870
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop) && (target[prop] = source[prop]);
|
|
2871
|
+
return target;
|
|
2872
|
+
};
|
|
2574
2873
|
const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styledComponents.styled.input(inputElementStyles), Checkbox = react.forwardRef(function(props, forwardedRef) {
|
|
2874
|
+
var _a;
|
|
2575
2875
|
const $ = reactCompilerRuntime.c(25);
|
|
2576
2876
|
let checked, className, customValidity, disabled, indeterminate, readOnly, restProps, style;
|
|
2577
|
-
$[0] !== props ? ({
|
|
2877
|
+
$[0] !== props ? (_a = props, {
|
|
2578
2878
|
checked,
|
|
2579
2879
|
className,
|
|
2580
2880
|
disabled,
|
|
2581
2881
|
indeterminate,
|
|
2582
2882
|
customValidity,
|
|
2583
2883
|
readOnly,
|
|
2584
|
-
style
|
|
2585
|
-
|
|
2586
|
-
|
|
2884
|
+
style
|
|
2885
|
+
} = _a, restProps = __objRest$A(_a, [
|
|
2886
|
+
"checked",
|
|
2887
|
+
"className",
|
|
2888
|
+
"disabled",
|
|
2889
|
+
"indeterminate",
|
|
2890
|
+
"customValidity",
|
|
2891
|
+
"readOnly",
|
|
2892
|
+
"style"
|
|
2893
|
+
]), $[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]);
|
|
2587
2894
|
const ref = react.useRef(null);
|
|
2588
2895
|
let t0;
|
|
2589
2896
|
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[9] = t0) : t0 = $[9], react.useImperativeHandle(forwardedRef, t0);
|
|
@@ -2593,7 +2900,7 @@ const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styled
|
|
|
2593
2900
|
}, t2 = [indeterminate], $[10] = indeterminate, $[11] = t1, $[12] = t2) : (t1 = $[11], t2 = $[12]), react.useEffect(t1, t2), useCustomValidity(ref, customValidity);
|
|
2594
2901
|
const t3 = !disabled && readOnly ? "" : void 0, t4 = customValidity ? "" : void 0, t5 = disabled || readOnly;
|
|
2595
2902
|
let t6;
|
|
2596
|
-
$[13] !== checked || $[14] !== readOnly || $[15] !== restProps || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Input$5, { "data-read-only": t3, "data-error": t4,
|
|
2903
|
+
$[13] !== checked || $[14] !== readOnly || $[15] !== restProps || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.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];
|
|
2597
2904
|
let t7;
|
|
2598
2905
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2599
2906
|
/* @__PURE__ */ jsxRuntime.jsx(icons.CheckmarkIcon, {}),
|
|
@@ -2754,16 +3061,37 @@ function codeBaseStyle() {
|
|
|
2754
3061
|
}
|
|
2755
3062
|
`;
|
|
2756
3063
|
}
|
|
3064
|
+
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) => {
|
|
3065
|
+
for (var prop in b || (b = {}))
|
|
3066
|
+
__hasOwnProp$E.call(b, prop) && __defNormalProp$F(a, prop, b[prop]);
|
|
3067
|
+
if (__getOwnPropSymbols$E)
|
|
3068
|
+
for (var prop of __getOwnPropSymbols$E(b))
|
|
3069
|
+
__propIsEnum$E.call(b, prop) && __defNormalProp$F(a, prop, b[prop]);
|
|
3070
|
+
return a;
|
|
3071
|
+
}, __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b)), __objRest$z = (source, exclude) => {
|
|
3072
|
+
var target = {};
|
|
3073
|
+
for (var prop in source)
|
|
3074
|
+
__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3075
|
+
if (source != null && __getOwnPropSymbols$E)
|
|
3076
|
+
for (var prop of __getOwnPropSymbols$E(source))
|
|
3077
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop) && (target[prop] = source[prop]);
|
|
3078
|
+
return target;
|
|
3079
|
+
};
|
|
2757
3080
|
const Root$q = styledComponents.styled.pre(codeBaseStyle, responsiveCodeFontStyle), Code = react.forwardRef(function(props, ref) {
|
|
3081
|
+
var _a;
|
|
2758
3082
|
const $ = reactCompilerRuntime.c(23);
|
|
2759
3083
|
let children, languageProp, restProps, t0, weight;
|
|
2760
|
-
$[0] !== props ? ({
|
|
3084
|
+
$[0] !== props ? (_a = props, {
|
|
2761
3085
|
children,
|
|
2762
3086
|
language: languageProp,
|
|
2763
3087
|
size: t0,
|
|
2764
|
-
weight
|
|
2765
|
-
|
|
2766
|
-
|
|
3088
|
+
weight
|
|
3089
|
+
} = _a, restProps = __objRest$z(_a, [
|
|
3090
|
+
"children",
|
|
3091
|
+
"language",
|
|
3092
|
+
"size",
|
|
3093
|
+
"weight"
|
|
3094
|
+
]), $[0] = props, $[1] = children, $[2] = languageProp, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], languageProp = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
|
|
2767
3095
|
const size2 = t0 === void 0 ? 2 : t0, language = typeof languageProp == "string" ? languageProp : void 0;
|
|
2768
3096
|
let t1;
|
|
2769
3097
|
$[6] !== language ? (t1 = language ? Refractor__default.default.hasLanguage(language) : !1, $[6] = language, $[7] = t1) : t1 = $[7];
|
|
@@ -2773,10 +3101,10 @@ const Root$q = styledComponents.styled.pre(codeBaseStyle, responsiveCodeFontStyl
|
|
|
2773
3101
|
let t4;
|
|
2774
3102
|
$[12] !== children || $[13] !== language || $[14] !== registered ? (t4 = language && registered && /* @__PURE__ */ jsxRuntime.jsx(Refractor__default.default, { inline: !0, language, value: String(children) }), $[12] = children, $[13] = language, $[14] = registered, $[15] = t4) : t4 = $[15];
|
|
2775
3103
|
let t5;
|
|
2776
|
-
return $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== weight ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(Root$q, { "data-ui": "Code",
|
|
3104
|
+
return $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== weight ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(Root$q, __spreadProps$D(__spreadValues$E({ "data-ui": "Code" }, restProps), { $size: t2, $weight: weight, ref, children: [
|
|
2777
3105
|
t3,
|
|
2778
3106
|
t4
|
|
2779
|
-
] }), $[16] = ref, $[17] = restProps, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = weight, $[22] = t5) : t5 = $[22], t5;
|
|
3107
|
+
] })), $[16] = ref, $[17] = restProps, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = weight, $[22] = t5) : t5 = $[22], t5;
|
|
2780
3108
|
});
|
|
2781
3109
|
Code.displayName = "ForwardRef(Code)";
|
|
2782
3110
|
const BASE_STYLE$1 = {
|
|
@@ -2795,23 +3123,59 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2795
3123
|
maxWidth: val === "auto" ? "none" : rem(container[val])
|
|
2796
3124
|
}));
|
|
2797
3125
|
}
|
|
3126
|
+
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) => {
|
|
3127
|
+
for (var prop in b || (b = {}))
|
|
3128
|
+
__hasOwnProp$D.call(b, prop) && __defNormalProp$E(a, prop, b[prop]);
|
|
3129
|
+
if (__getOwnPropSymbols$D)
|
|
3130
|
+
for (var prop of __getOwnPropSymbols$D(b))
|
|
3131
|
+
__propIsEnum$D.call(b, prop) && __defNormalProp$E(a, prop, b[prop]);
|
|
3132
|
+
return a;
|
|
3133
|
+
}, __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b)), __objRest$y = (source, exclude) => {
|
|
3134
|
+
var target = {};
|
|
3135
|
+
for (var prop in source)
|
|
3136
|
+
__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3137
|
+
if (source != null && __getOwnPropSymbols$D)
|
|
3138
|
+
for (var prop of __getOwnPropSymbols$D(source))
|
|
3139
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop) && (target[prop] = source[prop]);
|
|
3140
|
+
return target;
|
|
3141
|
+
};
|
|
2798
3142
|
const Root$p = styledComponents.styled(Box)(containerBaseStyle, responsiveContainerWidthStyle), Container = react.forwardRef(function(props, ref) {
|
|
3143
|
+
var _a;
|
|
2799
3144
|
const $ = reactCompilerRuntime.c(9);
|
|
2800
3145
|
let as, restProps, t0;
|
|
2801
|
-
$[0] !== props ? ({
|
|
3146
|
+
$[0] !== props ? (_a = props, {
|
|
2802
3147
|
as,
|
|
2803
|
-
width: t0
|
|
2804
|
-
|
|
2805
|
-
|
|
3148
|
+
width: t0
|
|
3149
|
+
} = _a, restProps = __objRest$y(_a, [
|
|
3150
|
+
"as",
|
|
3151
|
+
"width"
|
|
3152
|
+
]), $[0] = props, $[1] = as, $[2] = restProps, $[3] = t0) : (as = $[1], restProps = $[2], t0 = $[3]);
|
|
2806
3153
|
const t1 = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
2807
3154
|
let t2;
|
|
2808
|
-
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Root$p, { "data-ui": "Container",
|
|
3155
|
+
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.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;
|
|
2809
3156
|
});
|
|
2810
3157
|
Container.displayName = "ForwardRef(Container)";
|
|
3158
|
+
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) => {
|
|
3159
|
+
for (var prop in b || (b = {}))
|
|
3160
|
+
__hasOwnProp$C.call(b, prop) && __defNormalProp$D(a, prop, b[prop]);
|
|
3161
|
+
if (__getOwnPropSymbols$C)
|
|
3162
|
+
for (var prop of __getOwnPropSymbols$C(b))
|
|
3163
|
+
__propIsEnum$C.call(b, prop) && __defNormalProp$D(a, prop, b[prop]);
|
|
3164
|
+
return a;
|
|
3165
|
+
}, __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b)), __objRest$x = (source, exclude) => {
|
|
3166
|
+
var target = {};
|
|
3167
|
+
for (var prop in source)
|
|
3168
|
+
__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3169
|
+
if (source != null && __getOwnPropSymbols$C)
|
|
3170
|
+
for (var prop of __getOwnPropSymbols$C(source))
|
|
3171
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop) && (target[prop] = source[prop]);
|
|
3172
|
+
return target;
|
|
3173
|
+
};
|
|
2811
3174
|
const Root$o = styledComponents.styled(Box)(responsiveGridStyle), Grid = react.forwardRef(function(props, ref) {
|
|
3175
|
+
var _a;
|
|
2812
3176
|
const $ = reactCompilerRuntime.c(26);
|
|
2813
3177
|
let as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, restProps, rows;
|
|
2814
|
-
$[0] !== props ? ({
|
|
3178
|
+
$[0] !== props ? (_a = props, {
|
|
2815
3179
|
as,
|
|
2816
3180
|
autoRows,
|
|
2817
3181
|
autoCols,
|
|
@@ -2821,12 +3185,22 @@ const Root$o = styledComponents.styled(Box)(responsiveGridStyle), Grid = react.f
|
|
|
2821
3185
|
gapX,
|
|
2822
3186
|
gapY,
|
|
2823
3187
|
rows,
|
|
2824
|
-
children
|
|
2825
|
-
|
|
2826
|
-
|
|
3188
|
+
children
|
|
3189
|
+
} = _a, restProps = __objRest$x(_a, [
|
|
3190
|
+
"as",
|
|
3191
|
+
"autoRows",
|
|
3192
|
+
"autoCols",
|
|
3193
|
+
"autoFlow",
|
|
3194
|
+
"columns",
|
|
3195
|
+
"gap",
|
|
3196
|
+
"gapX",
|
|
3197
|
+
"gapY",
|
|
3198
|
+
"rows",
|
|
3199
|
+
"children"
|
|
3200
|
+
]), $[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]);
|
|
2827
3201
|
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);
|
|
2828
3202
|
let t9;
|
|
2829
|
-
return $[12] !== as || $[13] !== children || $[14] !== ref || $[15] !== restProps || $[16] !== t0 || $[17] !== t1 || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Root$o, { "data-as": t0, "data-ui": "Grid",
|
|
3203
|
+
return $[12] !== as || $[13] !== children || $[14] !== ref || $[15] !== restProps || $[16] !== t0 || $[17] !== t1 || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(Root$o, __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;
|
|
2830
3204
|
});
|
|
2831
3205
|
Grid.displayName = "ForwardRef(Grid)";
|
|
2832
3206
|
function headingBaseStyle(props) {
|
|
@@ -2888,6 +3262,22 @@ function headingBaseStyle(props) {
|
|
|
2888
3262
|
}
|
|
2889
3263
|
`;
|
|
2890
3264
|
}
|
|
3265
|
+
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) => {
|
|
3266
|
+
for (var prop in b || (b = {}))
|
|
3267
|
+
__hasOwnProp$B.call(b, prop) && __defNormalProp$C(a, prop, b[prop]);
|
|
3268
|
+
if (__getOwnPropSymbols$B)
|
|
3269
|
+
for (var prop of __getOwnPropSymbols$B(b))
|
|
3270
|
+
__propIsEnum$B.call(b, prop) && __defNormalProp$C(a, prop, b[prop]);
|
|
3271
|
+
return a;
|
|
3272
|
+
}, __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b)), __objRest$w = (source, exclude) => {
|
|
3273
|
+
var target = {};
|
|
3274
|
+
for (var prop in source)
|
|
3275
|
+
__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3276
|
+
if (source != null && __getOwnPropSymbols$B)
|
|
3277
|
+
for (var prop of __getOwnPropSymbols$B(source))
|
|
3278
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop) && (target[prop] = source[prop]);
|
|
3279
|
+
return target;
|
|
3280
|
+
};
|
|
2891
3281
|
const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), SpanWithTextOverflow = styledComponents.styled.span`
|
|
2892
3282
|
display: block;
|
|
2893
3283
|
white-space: nowrap;
|
|
@@ -2895,18 +3285,26 @@ const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlign
|
|
|
2895
3285
|
overflow: hidden;
|
|
2896
3286
|
overflow: clip;
|
|
2897
3287
|
`, Heading = react.forwardRef(function(props, ref) {
|
|
3288
|
+
var _a;
|
|
2898
3289
|
const $ = reactCompilerRuntime.c(22);
|
|
2899
3290
|
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
2900
|
-
$[0] !== props ? ({
|
|
3291
|
+
$[0] !== props ? (_a = props, {
|
|
2901
3292
|
accent: t0,
|
|
2902
3293
|
align,
|
|
2903
3294
|
children: childrenProp,
|
|
2904
3295
|
muted: t1,
|
|
2905
3296
|
size: t2,
|
|
2906
3297
|
textOverflow,
|
|
2907
|
-
weight
|
|
2908
|
-
|
|
2909
|
-
|
|
3298
|
+
weight
|
|
3299
|
+
} = _a, restProps = __objRest$w(_a, [
|
|
3300
|
+
"accent",
|
|
3301
|
+
"align",
|
|
3302
|
+
"children",
|
|
3303
|
+
"muted",
|
|
3304
|
+
"size",
|
|
3305
|
+
"textOverflow",
|
|
3306
|
+
"weight"
|
|
3307
|
+
]), $[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]);
|
|
2910
3308
|
const accent = t0 === void 0 ? !1 : t0, muted = t1 === void 0 ? !1 : t1, size2 = t2 === void 0 ? 2 : t2;
|
|
2911
3309
|
let children = childrenProp;
|
|
2912
3310
|
if (textOverflow === "ellipsis") {
|
|
@@ -2917,7 +3315,7 @@ const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlign
|
|
|
2917
3315
|
let t5;
|
|
2918
3316
|
$[11] !== children ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", { children }), $[11] = children, $[12] = t5) : t5 = $[12];
|
|
2919
3317
|
let t6;
|
|
2920
|
-
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$n, { "data-ui": "Heading",
|
|
3318
|
+
return $[13] !== accent || $[14] !== muted || $[15] !== ref || $[16] !== restProps || $[17] !== t3 || $[18] !== t4 || $[19] !== t5 || $[20] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.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;
|
|
2921
3319
|
});
|
|
2922
3320
|
Heading.displayName = "ForwardRef(Heading)";
|
|
2923
3321
|
function inlineBaseStyle() {
|
|
@@ -2947,25 +3345,61 @@ function inlineSpaceStyle(props) {
|
|
|
2947
3345
|
};
|
|
2948
3346
|
});
|
|
2949
3347
|
}
|
|
3348
|
+
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) => {
|
|
3349
|
+
for (var prop in b || (b = {}))
|
|
3350
|
+
__hasOwnProp$A.call(b, prop) && __defNormalProp$B(a, prop, b[prop]);
|
|
3351
|
+
if (__getOwnPropSymbols$A)
|
|
3352
|
+
for (var prop of __getOwnPropSymbols$A(b))
|
|
3353
|
+
__propIsEnum$A.call(b, prop) && __defNormalProp$B(a, prop, b[prop]);
|
|
3354
|
+
return a;
|
|
3355
|
+
}, __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b)), __objRest$v = (source, exclude) => {
|
|
3356
|
+
var target = {};
|
|
3357
|
+
for (var prop in source)
|
|
3358
|
+
__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3359
|
+
if (source != null && __getOwnPropSymbols$A)
|
|
3360
|
+
for (var prop of __getOwnPropSymbols$A(source))
|
|
3361
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop) && (target[prop] = source[prop]);
|
|
3362
|
+
return target;
|
|
3363
|
+
};
|
|
2950
3364
|
const Root$m = styledComponents.styled(Box)(inlineBaseStyle, inlineSpaceStyle), Inline = react.forwardRef(function(props, ref) {
|
|
3365
|
+
var _a;
|
|
2951
3366
|
const $ = reactCompilerRuntime.c(12);
|
|
2952
3367
|
let as, childrenProp, restProps, space;
|
|
2953
|
-
$[0] !== props ? ({
|
|
3368
|
+
$[0] !== props ? (_a = props, {
|
|
2954
3369
|
as,
|
|
2955
3370
|
children: childrenProp,
|
|
2956
|
-
space
|
|
2957
|
-
|
|
2958
|
-
|
|
3371
|
+
space
|
|
3372
|
+
} = _a, restProps = __objRest$v(_a, [
|
|
3373
|
+
"as",
|
|
3374
|
+
"children",
|
|
3375
|
+
"space"
|
|
3376
|
+
]), $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = restProps, $[4] = space) : (as = $[1], childrenProp = $[2], restProps = $[3], space = $[4]);
|
|
2959
3377
|
let t0, t1;
|
|
2960
3378
|
$[5] !== childrenProp ? (t1 = react.Children.map(childrenProp, _temp$6), $[5] = childrenProp, $[6] = t1) : t1 = $[6], t0 = t1;
|
|
2961
3379
|
const children = t0, t2 = useArrayProp(space);
|
|
2962
3380
|
let t3;
|
|
2963
|
-
return $[7] !== as || $[8] !== children || $[9] !== restProps || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Root$m, { "data-ui": "Inline",
|
|
3381
|
+
return $[7] !== as || $[8] !== children || $[9] !== restProps || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.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;
|
|
2964
3382
|
});
|
|
2965
3383
|
Inline.displayName = "ForwardRef(Inline)";
|
|
2966
3384
|
function _temp$6(child) {
|
|
2967
3385
|
return child && /* @__PURE__ */ jsxRuntime.jsx("div", { children: child });
|
|
2968
3386
|
}
|
|
3387
|
+
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) => {
|
|
3388
|
+
for (var prop in b || (b = {}))
|
|
3389
|
+
__hasOwnProp$z.call(b, prop) && __defNormalProp$A(a, prop, b[prop]);
|
|
3390
|
+
if (__getOwnPropSymbols$z)
|
|
3391
|
+
for (var prop of __getOwnPropSymbols$z(b))
|
|
3392
|
+
__propIsEnum$z.call(b, prop) && __defNormalProp$A(a, prop, b[prop]);
|
|
3393
|
+
return a;
|
|
3394
|
+
}, __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b)), __objRest$u = (source, exclude) => {
|
|
3395
|
+
var target = {};
|
|
3396
|
+
for (var prop in source)
|
|
3397
|
+
__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3398
|
+
if (source != null && __getOwnPropSymbols$z)
|
|
3399
|
+
for (var prop of __getOwnPropSymbols$z(source))
|
|
3400
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop) && (target[prop] = source[prop]);
|
|
3401
|
+
return target;
|
|
3402
|
+
};
|
|
2969
3403
|
function kbdStyle() {
|
|
2970
3404
|
return styledComponents.css`
|
|
2971
3405
|
--card-bg-color: var(--card-kbd-bg-color);
|
|
@@ -2984,22 +3418,27 @@ function kbdStyle() {
|
|
|
2984
3418
|
`;
|
|
2985
3419
|
}
|
|
2986
3420
|
const Root$l = styledComponents.styled.kbd(responsiveRadiusStyle, kbdStyle), KBD = react.forwardRef(function(props, ref) {
|
|
3421
|
+
var _a;
|
|
2987
3422
|
const $ = reactCompilerRuntime.c(17);
|
|
2988
3423
|
let children, restProps, t0, t1, t2;
|
|
2989
|
-
$[0] !== props ? ({
|
|
3424
|
+
$[0] !== props ? (_a = props, {
|
|
2990
3425
|
children,
|
|
2991
3426
|
fontSize: t0,
|
|
2992
3427
|
padding: t1,
|
|
2993
|
-
radius: t2
|
|
2994
|
-
|
|
2995
|
-
|
|
3428
|
+
radius: t2
|
|
3429
|
+
} = _a, restProps = __objRest$u(_a, [
|
|
3430
|
+
"children",
|
|
3431
|
+
"fontSize",
|
|
3432
|
+
"padding",
|
|
3433
|
+
"radius"
|
|
3434
|
+
]), $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0, $[4] = t1, $[5] = t2) : (children = $[1], restProps = $[2], t0 = $[3], t1 = $[4], t2 = $[5]);
|
|
2996
3435
|
const fontSize2 = t0 === void 0 ? 0 : t0, padding = t1 === void 0 ? 1 : t1, t3 = useArrayProp(t2 === void 0 ? 2 : t2);
|
|
2997
3436
|
let t4;
|
|
2998
3437
|
$[6] !== children || $[7] !== fontSize2 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }), $[6] = children, $[7] = fontSize2, $[8] = t4) : t4 = $[8];
|
|
2999
3438
|
let t5;
|
|
3000
3439
|
$[9] !== padding || $[10] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, children: t4 }), $[9] = padding, $[10] = t4, $[11] = t5) : t5 = $[11];
|
|
3001
3440
|
let t6;
|
|
3002
|
-
return $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$l, { "data-ui": "KBD",
|
|
3441
|
+
return $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.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;
|
|
3003
3442
|
});
|
|
3004
3443
|
KBD.displayName = "ForwardRef(KBD)";
|
|
3005
3444
|
const origin = {
|
|
@@ -3009,7 +3448,8 @@ const origin = {
|
|
|
3009
3448
|
placement,
|
|
3010
3449
|
rects
|
|
3011
3450
|
}) {
|
|
3012
|
-
|
|
3451
|
+
var _a, _b;
|
|
3452
|
+
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;
|
|
3013
3453
|
if (floatingWidth <= 0 || floatingHeight <= 0)
|
|
3014
3454
|
return {};
|
|
3015
3455
|
const isVerticalPlacement = ["bottom", "top"].includes(side), {
|
|
@@ -3033,6 +3473,14 @@ const origin = {
|
|
|
3033
3473
|
function clamp(num, min, max) {
|
|
3034
3474
|
return Math.min(Math.max(num, min), max);
|
|
3035
3475
|
}
|
|
3476
|
+
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) => {
|
|
3477
|
+
for (var prop in b || (b = {}))
|
|
3478
|
+
__hasOwnProp$y.call(b, prop) && __defNormalProp$z(a, prop, b[prop]);
|
|
3479
|
+
if (__getOwnPropSymbols$y)
|
|
3480
|
+
for (var prop of __getOwnPropSymbols$y(b))
|
|
3481
|
+
__propIsEnum$y.call(b, prop) && __defNormalProp$z(a, prop, b[prop]);
|
|
3482
|
+
return a;
|
|
3483
|
+
};
|
|
3036
3484
|
function moveTowardsLength(movingPoint, targetPoint, amount) {
|
|
3037
3485
|
const width = targetPoint.x - movingPoint.x, height = targetPoint.y - movingPoint.y, distance = Math.sqrt(width * width + height * height);
|
|
3038
3486
|
return moveTowardsFractional(movingPoint, targetPoint, Math.min(1, amount / distance));
|
|
@@ -3049,26 +3497,40 @@ function getRoundedCommands(points) {
|
|
|
3049
3497
|
const point = points[i], prevPoint = points[i - 1], nextPoint = points[i + 1];
|
|
3050
3498
|
if (prevPoint && point.radius) {
|
|
3051
3499
|
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);
|
|
3052
|
-
cmds.push({
|
|
3053
|
-
type: "point"
|
|
3054
|
-
|
|
3055
|
-
}), cmds.push({
|
|
3500
|
+
cmds.push(__spreadValues$y({
|
|
3501
|
+
type: "point"
|
|
3502
|
+
}, curveStart)), cmds.push({
|
|
3056
3503
|
type: "curve",
|
|
3057
3504
|
curveEnd,
|
|
3058
3505
|
startControl,
|
|
3059
3506
|
endControl
|
|
3060
3507
|
});
|
|
3061
3508
|
} else
|
|
3062
|
-
cmds.push({
|
|
3063
|
-
type: "point"
|
|
3064
|
-
|
|
3065
|
-
});
|
|
3509
|
+
cmds.push(__spreadValues$y({
|
|
3510
|
+
type: "point"
|
|
3511
|
+
}, point));
|
|
3066
3512
|
}
|
|
3067
3513
|
return cmds;
|
|
3068
3514
|
}
|
|
3069
3515
|
function compileCommands(cmds) {
|
|
3070
3516
|
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(" ");
|
|
3071
3517
|
}
|
|
3518
|
+
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) => {
|
|
3519
|
+
for (var prop in b || (b = {}))
|
|
3520
|
+
__hasOwnProp$x.call(b, prop) && __defNormalProp$y(a, prop, b[prop]);
|
|
3521
|
+
if (__getOwnPropSymbols$x)
|
|
3522
|
+
for (var prop of __getOwnPropSymbols$x(b))
|
|
3523
|
+
__propIsEnum$x.call(b, prop) && __defNormalProp$y(a, prop, b[prop]);
|
|
3524
|
+
return a;
|
|
3525
|
+
}, __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b)), __objRest$t = (source, exclude) => {
|
|
3526
|
+
var target = {};
|
|
3527
|
+
for (var prop in source)
|
|
3528
|
+
__hasOwnProp$x.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3529
|
+
if (source != null && __getOwnPropSymbols$x)
|
|
3530
|
+
for (var prop of __getOwnPropSymbols$x(source))
|
|
3531
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$x.call(source, prop) && (target[prop] = source[prop]);
|
|
3532
|
+
return target;
|
|
3533
|
+
};
|
|
3072
3534
|
const Root$k = styledComponents.styled.div(({
|
|
3073
3535
|
$w: w
|
|
3074
3536
|
}) => styledComponents.css`
|
|
@@ -3122,14 +3584,18 @@ const Root$k = styledComponents.styled.div(({
|
|
|
3122
3584
|
`, ShapePath = styledComponents.styled.path`
|
|
3123
3585
|
fill: var(--card-bg-color);
|
|
3124
3586
|
`, Arrow = react.forwardRef(function(props, ref) {
|
|
3587
|
+
var _a;
|
|
3125
3588
|
const $ = reactCompilerRuntime.c(24);
|
|
3126
3589
|
let h, restProps, t0, w;
|
|
3127
|
-
$[0] !== props ? ({
|
|
3590
|
+
$[0] !== props ? (_a = props, {
|
|
3128
3591
|
width: w,
|
|
3129
3592
|
height: h,
|
|
3130
|
-
radius: t0
|
|
3131
|
-
|
|
3132
|
-
|
|
3593
|
+
radius: t0
|
|
3594
|
+
} = _a, restProps = __objRest$t(_a, [
|
|
3595
|
+
"width",
|
|
3596
|
+
"height",
|
|
3597
|
+
"radius"
|
|
3598
|
+
]), $[0] = props, $[1] = h, $[2] = restProps, $[3] = t0, $[4] = w) : (h = $[1], restProps = $[2], t0 = $[3], w = $[4]);
|
|
3133
3599
|
const radius = t0 === void 0 ? 0 : t0, {
|
|
3134
3600
|
card
|
|
3135
3601
|
} = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, points = [{
|
|
@@ -3165,7 +3631,7 @@ const Root$k = styledComponents.styled.div(({
|
|
|
3165
3631
|
t5
|
|
3166
3632
|
] }), $[13] = t1, $[14] = t2, $[15] = t4, $[16] = t5, $[17] = w, $[18] = t6) : t6 = $[18];
|
|
3167
3633
|
let t7;
|
|
3168
|
-
return $[19] !== ref || $[20] !== restProps || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Root$k, {
|
|
3634
|
+
return $[19] !== ref || $[20] !== restProps || $[21] !== t6 || $[22] !== w ? (t7 = /* @__PURE__ */ jsxRuntime.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;
|
|
3169
3635
|
});
|
|
3170
3636
|
Arrow.displayName = "ForwardRef(Arrow)";
|
|
3171
3637
|
const BoundaryElementContext = createGlobalScopedContext("@sanity/ui/context/boundaryElement", null);
|
|
@@ -3217,17 +3683,36 @@ function findMinBreakpoints(media, width) {
|
|
|
3217
3683
|
media[i] <= width && ret.push(i);
|
|
3218
3684
|
return ret;
|
|
3219
3685
|
}
|
|
3686
|
+
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) => {
|
|
3687
|
+
for (var prop in b || (b = {}))
|
|
3688
|
+
__hasOwnProp$w.call(b, prop) && __defNormalProp$x(a, prop, b[prop]);
|
|
3689
|
+
if (__getOwnPropSymbols$w)
|
|
3690
|
+
for (var prop of __getOwnPropSymbols$w(b))
|
|
3691
|
+
__propIsEnum$w.call(b, prop) && __defNormalProp$x(a, prop, b[prop]);
|
|
3692
|
+
return a;
|
|
3693
|
+
}, __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b)), __objRest$s = (source, exclude) => {
|
|
3694
|
+
var target = {};
|
|
3695
|
+
for (var prop in source)
|
|
3696
|
+
__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3697
|
+
if (source != null && __getOwnPropSymbols$w)
|
|
3698
|
+
for (var prop of __getOwnPropSymbols$w(source))
|
|
3699
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop) && (target[prop] = source[prop]);
|
|
3700
|
+
return target;
|
|
3701
|
+
};
|
|
3220
3702
|
const ElementQuery = react.forwardRef(function(props, forwardedRef) {
|
|
3703
|
+
var _a, _b;
|
|
3221
3704
|
const $ = reactCompilerRuntime.c(18), theme2 = useTheme_v2();
|
|
3222
3705
|
let _media, children, restProps;
|
|
3223
|
-
$[0] !== props ? ({
|
|
3706
|
+
$[0] !== props ? (_a = props, {
|
|
3224
3707
|
children,
|
|
3225
|
-
media: _media
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3708
|
+
media: _media
|
|
3709
|
+
} = _a, restProps = __objRest$s(_a, [
|
|
3710
|
+
"children",
|
|
3711
|
+
"media"
|
|
3712
|
+
]), $[0] = props, $[1] = _media, $[2] = children, $[3] = restProps) : (_media = $[1], children = $[2], restProps = $[3]);
|
|
3713
|
+
const media = _media != null ? _media : theme2.media, [element, setElement] = react.useState(null), elementSize = useElementSize(element);
|
|
3229
3714
|
let t0;
|
|
3230
|
-
t0 = elementSize
|
|
3715
|
+
t0 = (_b = elementSize == null ? void 0 : elementSize.border.width) != null ? _b : window.innerWidth;
|
|
3231
3716
|
const width = t0;
|
|
3232
3717
|
let t1, t2;
|
|
3233
3718
|
if ($[4] !== media || $[5] !== width) {
|
|
@@ -3248,13 +3733,16 @@ const ElementQuery = react.forwardRef(function(props, forwardedRef) {
|
|
|
3248
3733
|
let t5, t6;
|
|
3249
3734
|
$[10] !== element ? (t5 = () => element, t6 = [element], $[10] = element, $[11] = t5, $[12] = t6) : (t5 = $[11], t6 = $[12]), react.useImperativeHandle(forwardedRef, t5, t6);
|
|
3250
3735
|
let t7;
|
|
3251
|
-
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t7 = /* @__PURE__ */ jsxRuntime.jsx("div", { "data-ui": "ElementQuery",
|
|
3736
|
+
return $[13] !== children || $[14] !== max || $[15] !== min || $[16] !== restProps ? (t7 = /* @__PURE__ */ jsxRuntime.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;
|
|
3252
3737
|
});
|
|
3253
3738
|
ElementQuery.displayName = "ForwardRef(ElementQuery)";
|
|
3739
|
+
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);
|
|
3254
3740
|
class ErrorBoundary extends react.Component {
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3741
|
+
constructor() {
|
|
3742
|
+
super(...arguments), __publicField(this, "state", {
|
|
3743
|
+
error: null
|
|
3744
|
+
});
|
|
3745
|
+
}
|
|
3258
3746
|
static getDerivedStateFromError(error) {
|
|
3259
3747
|
return {
|
|
3260
3748
|
error
|
|
@@ -3271,7 +3759,7 @@ class ErrorBoundary extends react.Component {
|
|
|
3271
3759
|
error
|
|
3272
3760
|
} = this.state;
|
|
3273
3761
|
if (error) {
|
|
3274
|
-
const message = typeof error
|
|
3762
|
+
const message = typeof (error == null ? void 0 : error.message) == "string" ? error.message : "Error";
|
|
3275
3763
|
return /* @__PURE__ */ jsxRuntime.jsx(Code, { children: message });
|
|
3276
3764
|
}
|
|
3277
3765
|
return this.props.children;
|
|
@@ -3349,7 +3837,7 @@ function attemptFocus(element) {
|
|
|
3349
3837
|
return !1;
|
|
3350
3838
|
try {
|
|
3351
3839
|
element.focus();
|
|
3352
|
-
} catch {
|
|
3840
|
+
} catch (_) {
|
|
3353
3841
|
}
|
|
3354
3842
|
return document.activeElement === element;
|
|
3355
3843
|
}
|
|
@@ -3374,38 +3862,45 @@ function _isScrollable(el) {
|
|
|
3374
3862
|
const style = window.getComputedStyle(el);
|
|
3375
3863
|
return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
|
|
3376
3864
|
}
|
|
3865
|
+
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) => {
|
|
3866
|
+
for (var prop in b || (b = {}))
|
|
3867
|
+
__hasOwnProp$v.call(b, prop) && __defNormalProp$v(a, prop, b[prop]);
|
|
3868
|
+
if (__getOwnPropSymbols$v)
|
|
3869
|
+
for (var prop of __getOwnPropSymbols$v(b))
|
|
3870
|
+
__propIsEnum$v.call(b, prop) && __defNormalProp$v(a, prop, b[prop]);
|
|
3871
|
+
return a;
|
|
3872
|
+
}, __spreadProps$v = (a, b) => __defProps$v(a, __getOwnPropDescs$v(b));
|
|
3377
3873
|
function LayerProvider(props) {
|
|
3874
|
+
var _a;
|
|
3378
3875
|
const $ = reactCompilerRuntime.c(19), {
|
|
3379
3876
|
children,
|
|
3380
3877
|
zOffset: t0
|
|
3381
3878
|
} = props, zOffsetProp = t0 === void 0 ? 0 : t0, parentContextValue = react.useContext(LayerContext);
|
|
3382
3879
|
let t1;
|
|
3383
3880
|
$[0] !== parentContextValue ? (t1 = parentContextValue && getLayerContext(parentContextValue), $[0] = parentContextValue, $[1] = t1) : t1 = $[1];
|
|
3384
|
-
const parent = t1, parentRegisterChild = parent
|
|
3881
|
+
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];
|
|
3385
3882
|
let t2;
|
|
3386
3883
|
$[2] === Symbol.for("react.memo_cache_sentinel") ? (t2 = {}, $[2] = t2) : t2 = $[2];
|
|
3387
3884
|
const [, setChildLayers] = react.useState(t2), [size2, setSize] = react.useState(0), isTopLayer = size2 === 0;
|
|
3388
3885
|
let t3;
|
|
3389
3886
|
$[3] !== parentRegisterChild || $[4] !== setChildLayers ? (t3 = (childLevel) => {
|
|
3390
|
-
const parentDispose = parentRegisterChild
|
|
3887
|
+
const parentDispose = parentRegisterChild == null ? void 0 : parentRegisterChild(childLevel);
|
|
3391
3888
|
return childLevel !== void 0 ? setChildLayers((state) => {
|
|
3392
|
-
|
|
3393
|
-
|
|
3889
|
+
var _a2;
|
|
3890
|
+
const prevLen = (_a2 = state[childLevel]) != null ? _a2 : 0, nextState = __spreadProps$v(__spreadValues$v({}, state), {
|
|
3394
3891
|
[childLevel]: prevLen + 1
|
|
3395
|
-
};
|
|
3892
|
+
});
|
|
3396
3893
|
return setSize(Object.keys(nextState).length), nextState;
|
|
3397
3894
|
}) : setSize(_temp$5), () => {
|
|
3398
3895
|
childLevel !== void 0 ? setChildLayers((state_0) => {
|
|
3399
|
-
const nextState_0 = {
|
|
3400
|
-
...state_0
|
|
3401
|
-
};
|
|
3896
|
+
const nextState_0 = __spreadValues$v({}, state_0);
|
|
3402
3897
|
return nextState_0[childLevel] === 1 ? (delete nextState_0[childLevel], setSize(Object.keys(nextState_0).length)) : nextState_0[childLevel] = nextState_0[childLevel] - 1, nextState_0;
|
|
3403
|
-
}) : setSize(_temp2$3), parentDispose
|
|
3898
|
+
}) : setSize(_temp2$3), parentDispose == null || parentDispose();
|
|
3404
3899
|
};
|
|
3405
3900
|
}, $[3] = parentRegisterChild, $[4] = setChildLayers, $[5] = t3) : t3 = $[5];
|
|
3406
3901
|
const registerChild = t3;
|
|
3407
3902
|
let t4, t5;
|
|
3408
|
-
$[6] !== level || $[7] !== parentRegisterChild ? (t4 = () => parentRegisterChild
|
|
3903
|
+
$[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]), react.useEffect(t4, t5);
|
|
3409
3904
|
let t6, t7;
|
|
3410
3905
|
$[10] !== isTopLayer || $[11] !== level || $[12] !== registerChild || $[13] !== size2 || $[14] !== zIndex ? (t7 = {
|
|
3411
3906
|
version: 0,
|
|
@@ -3426,18 +3921,39 @@ function _temp$5(v) {
|
|
|
3426
3921
|
return v + 1;
|
|
3427
3922
|
}
|
|
3428
3923
|
LayerProvider.displayName = "LayerProvider";
|
|
3924
|
+
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) => {
|
|
3925
|
+
for (var prop in b || (b = {}))
|
|
3926
|
+
__hasOwnProp$u.call(b, prop) && __defNormalProp$u(a, prop, b[prop]);
|
|
3927
|
+
if (__getOwnPropSymbols$u)
|
|
3928
|
+
for (var prop of __getOwnPropSymbols$u(b))
|
|
3929
|
+
__propIsEnum$u.call(b, prop) && __defNormalProp$u(a, prop, b[prop]);
|
|
3930
|
+
return a;
|
|
3931
|
+
}, __spreadProps$u = (a, b) => __defProps$u(a, __getOwnPropDescs$u(b)), __objRest$r = (source, exclude) => {
|
|
3932
|
+
var target = {};
|
|
3933
|
+
for (var prop in source)
|
|
3934
|
+
__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
3935
|
+
if (source != null && __getOwnPropSymbols$u)
|
|
3936
|
+
for (var prop of __getOwnPropSymbols$u(source))
|
|
3937
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop) && (target[prop] = source[prop]);
|
|
3938
|
+
return target;
|
|
3939
|
+
};
|
|
3429
3940
|
const Root$j = styledComponents.styled.div({
|
|
3430
3941
|
position: "relative"
|
|
3431
3942
|
}), LayerChildren = react.forwardRef(function(props, forwardedRef) {
|
|
3943
|
+
var _a;
|
|
3432
3944
|
const $ = reactCompilerRuntime.c(22);
|
|
3433
3945
|
let children, onActivate, onFocus, restProps, t0;
|
|
3434
|
-
$[0] !== props ? ({
|
|
3946
|
+
$[0] !== props ? (_a = props, {
|
|
3435
3947
|
children,
|
|
3436
3948
|
onActivate,
|
|
3437
3949
|
onFocus,
|
|
3438
|
-
style: t0
|
|
3439
|
-
|
|
3440
|
-
|
|
3950
|
+
style: t0
|
|
3951
|
+
} = _a, restProps = __objRest$r(_a, [
|
|
3952
|
+
"children",
|
|
3953
|
+
"onActivate",
|
|
3954
|
+
"onFocus",
|
|
3955
|
+
"style"
|
|
3956
|
+
]), $[0] = props, $[1] = children, $[2] = onActivate, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], onActivate = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
|
|
3441
3957
|
const style = t0 === void 0 ? EMPTY_RECORD : t0, {
|
|
3442
3958
|
zIndex,
|
|
3443
3959
|
isTopLayer
|
|
@@ -3446,35 +3962,37 @@ const Root$j = styledComponents.styled.div({
|
|
|
3446
3962
|
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[6] = t1) : t1 = $[6], react.useImperativeHandle(forwardedRef, t1);
|
|
3447
3963
|
let t2, t3;
|
|
3448
3964
|
$[7] !== isTopLayer || $[8] !== onActivate ? (t2 = () => {
|
|
3449
|
-
isTopLayerRef.current !== isTopLayer && isTopLayer && onActivate
|
|
3965
|
+
isTopLayerRef.current !== isTopLayer && isTopLayer && (onActivate == null || onActivate({
|
|
3450
3966
|
activeElement: lastFocusedRef.current
|
|
3451
|
-
}), isTopLayerRef.current = isTopLayer;
|
|
3967
|
+
})), isTopLayerRef.current = isTopLayer;
|
|
3452
3968
|
}, t3 = [isTopLayer, onActivate], $[7] = isTopLayer, $[8] = onActivate, $[9] = t2, $[10] = t3) : (t2 = $[9], t3 = $[10]), react.useEffect(t2, t3);
|
|
3453
3969
|
let t4;
|
|
3454
3970
|
$[11] !== isTopLayer || $[12] !== onFocus ? (t4 = (event) => {
|
|
3455
|
-
onFocus
|
|
3971
|
+
onFocus == null || onFocus(event);
|
|
3456
3972
|
const rootElement = ref.current, target = document.activeElement;
|
|
3457
3973
|
!isTopLayer || !rootElement || !target || isHTMLElement(target) && containsOrEqualsElement(rootElement, target) && (lastFocusedRef.current = target);
|
|
3458
3974
|
}, $[11] = isTopLayer, $[12] = onFocus, $[13] = t4) : t4 = $[13];
|
|
3459
3975
|
const handleFocus = t4;
|
|
3460
3976
|
let t5;
|
|
3461
|
-
$[14] !== style || $[15] !== zIndex ? (t5 = {
|
|
3462
|
-
...style,
|
|
3977
|
+
$[14] !== style || $[15] !== zIndex ? (t5 = __spreadProps$u(__spreadValues$u({}, style), {
|
|
3463
3978
|
zIndex
|
|
3464
|
-
}, $[14] = style, $[15] = zIndex, $[16] = t5) : t5 = $[16];
|
|
3979
|
+
}), $[14] = style, $[15] = zIndex, $[16] = t5) : t5 = $[16];
|
|
3465
3980
|
let t6;
|
|
3466
|
-
return $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$j, {
|
|
3981
|
+
return $[17] !== children || $[18] !== handleFocus || $[19] !== restProps || $[20] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.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;
|
|
3467
3982
|
}), Layer = react.forwardRef(function(props, ref) {
|
|
3983
|
+
var _a;
|
|
3468
3984
|
const $ = reactCompilerRuntime.c(11);
|
|
3469
3985
|
let children, restProps, t0;
|
|
3470
|
-
$[0] !== props ? ({
|
|
3986
|
+
$[0] !== props ? (_a = props, {
|
|
3471
3987
|
children,
|
|
3472
|
-
zOffset: t0
|
|
3473
|
-
|
|
3474
|
-
|
|
3988
|
+
zOffset: t0
|
|
3989
|
+
} = _a, restProps = __objRest$r(_a, [
|
|
3990
|
+
"children",
|
|
3991
|
+
"zOffset"
|
|
3992
|
+
]), $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
3475
3993
|
const zOffset = t0 === void 0 ? 1 : t0;
|
|
3476
3994
|
let t1;
|
|
3477
|
-
$[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(LayerChildren, {
|
|
3995
|
+
$[4] !== children || $[5] !== ref || $[6] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(LayerChildren, __spreadProps$u(__spreadValues$u({}, restProps), { ref, children })), $[4] = children, $[5] = ref, $[6] = restProps, $[7] = t1) : t1 = $[7];
|
|
3478
3996
|
let t2;
|
|
3479
3997
|
return $[8] !== t1 || $[9] !== zOffset ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: t1 }), $[8] = t1, $[9] = zOffset, $[10] = t2) : t2 = $[10], t2;
|
|
3480
3998
|
});
|
|
@@ -3497,10 +4015,11 @@ function usePortal() {
|
|
|
3497
4015
|
return value;
|
|
3498
4016
|
}
|
|
3499
4017
|
function Portal(props) {
|
|
4018
|
+
var _a;
|
|
3500
4019
|
const $ = reactCompilerRuntime.c(3), {
|
|
3501
4020
|
children,
|
|
3502
4021
|
__unstable_name: name
|
|
3503
|
-
} = props, portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) || portal.elements
|
|
4022
|
+
} = props, portal = usePortal(), portalElement = (name ? portal.elements && portal.elements[name] : portal.element) || ((_a = portal.elements) == null ? void 0 : _a.default);
|
|
3504
4023
|
if (!portalElement)
|
|
3505
4024
|
return null;
|
|
3506
4025
|
let t0;
|
|
@@ -3562,6 +4081,22 @@ const Root$i = styledComponents.styled.div`
|
|
|
3562
4081
|
return $[0] !== as || $[1] !== children || $[2] !== ref ? (t0 = /* @__PURE__ */ jsxRuntime.jsx(Root$i, { "aria-hidden": !0, as, "data-ui": "SrOnly", ref, children }), $[0] = as, $[1] = children, $[2] = ref, $[3] = t0) : t0 = $[3], t0;
|
|
3563
4082
|
});
|
|
3564
4083
|
SrOnly.displayName = "ForwardRef(SrOnly)";
|
|
4084
|
+
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) => {
|
|
4085
|
+
for (var prop in b || (b = {}))
|
|
4086
|
+
__hasOwnProp$t.call(b, prop) && __defNormalProp$t(a, prop, b[prop]);
|
|
4087
|
+
if (__getOwnPropSymbols$t)
|
|
4088
|
+
for (var prop of __getOwnPropSymbols$t(b))
|
|
4089
|
+
__propIsEnum$t.call(b, prop) && __defNormalProp$t(a, prop, b[prop]);
|
|
4090
|
+
return a;
|
|
4091
|
+
}, __spreadProps$t = (a, b) => __defProps$t(a, __getOwnPropDescs$t(b)), __objRest$q = (source, exclude) => {
|
|
4092
|
+
var target = {};
|
|
4093
|
+
for (var prop in source)
|
|
4094
|
+
__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4095
|
+
if (source != null && __getOwnPropSymbols$t)
|
|
4096
|
+
for (var prop of __getOwnPropSymbols$t(source))
|
|
4097
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop) && (target[prop] = source[prop]);
|
|
4098
|
+
return target;
|
|
4099
|
+
};
|
|
3565
4100
|
const Root$h = styledComponents.styled.div`
|
|
3566
4101
|
position: relative;
|
|
3567
4102
|
`, ItemWrapper = styledComponents.styled.div`
|
|
@@ -3569,17 +4104,24 @@ const Root$h = styledComponents.styled.div`
|
|
|
3569
4104
|
left: 0;
|
|
3570
4105
|
right: 0;
|
|
3571
4106
|
`, VirtualList = react.forwardRef(function(props, forwardedRef) {
|
|
4107
|
+
var _a;
|
|
3572
4108
|
const $ = reactCompilerRuntime.c(56);
|
|
3573
4109
|
let getItemKey, onChange, renderItem, restProps, t0, t1, t2;
|
|
3574
|
-
$[0] !== props ? ({
|
|
4110
|
+
$[0] !== props ? (_a = props, {
|
|
3575
4111
|
as: t0,
|
|
3576
4112
|
gap: t1,
|
|
3577
4113
|
getItemKey,
|
|
3578
4114
|
items: t2,
|
|
3579
4115
|
onChange,
|
|
3580
|
-
renderItem
|
|
3581
|
-
|
|
3582
|
-
|
|
4116
|
+
renderItem
|
|
4117
|
+
} = _a, restProps = __objRest$q(_a, [
|
|
4118
|
+
"as",
|
|
4119
|
+
"gap",
|
|
4120
|
+
"getItemKey",
|
|
4121
|
+
"items",
|
|
4122
|
+
"onChange",
|
|
4123
|
+
"renderItem"
|
|
4124
|
+
]), $[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]);
|
|
3583
4125
|
const as = t0 === void 0 ? "div" : t0, gap = t1 === void 0 ? 0 : t1;
|
|
3584
4126
|
let t3;
|
|
3585
4127
|
$[8] !== t2 ? (t3 = t2 === void 0 ? [] : t2, $[8] = t2, $[9] = t3) : t3 = $[9];
|
|
@@ -3680,7 +4222,7 @@ const Root$h = styledComponents.styled.div`
|
|
|
3680
4222
|
let t14;
|
|
3681
4223
|
$[49] !== children || $[50] !== wrapperStyle ? (t14 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[49] = children, $[50] = wrapperStyle, $[51] = t14) : t14 = $[51];
|
|
3682
4224
|
let t15;
|
|
3683
|
-
return $[52] !== as || $[53] !== restProps || $[54] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Root$h, { as, "data-ui": "VirtualList",
|
|
4225
|
+
return $[52] !== as || $[53] !== restProps || $[54] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.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;
|
|
3684
4226
|
});
|
|
3685
4227
|
VirtualList.displayName = "ForwardRef(VirtualList)";
|
|
3686
4228
|
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 = {
|
|
@@ -3752,8 +4294,24 @@ function calcMaxWidth(params) {
|
|
|
3752
4294
|
currentWidth
|
|
3753
4295
|
} = params;
|
|
3754
4296
|
if (!(currentWidth === void 0 && boundaryWidth === void 0))
|
|
3755
|
-
return Math.min(currentWidth
|
|
3756
|
-
}
|
|
4297
|
+
return Math.min(currentWidth != null ? currentWidth : 1 / 0, (boundaryWidth || 1 / 0) - DEFAULT_POPOVER_PADDING * 2);
|
|
4298
|
+
}
|
|
4299
|
+
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) => {
|
|
4300
|
+
for (var prop in b || (b = {}))
|
|
4301
|
+
__hasOwnProp$s.call(b, prop) && __defNormalProp$s(a, prop, b[prop]);
|
|
4302
|
+
if (__getOwnPropSymbols$s)
|
|
4303
|
+
for (var prop of __getOwnPropSymbols$s(b))
|
|
4304
|
+
__propIsEnum$s.call(b, prop) && __defNormalProp$s(a, prop, b[prop]);
|
|
4305
|
+
return a;
|
|
4306
|
+
}, __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b)), __objRest$p = (source, exclude) => {
|
|
4307
|
+
var target = {};
|
|
4308
|
+
for (var prop in source)
|
|
4309
|
+
__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4310
|
+
if (source != null && __getOwnPropSymbols$s)
|
|
4311
|
+
for (var prop of __getOwnPropSymbols$s(source))
|
|
4312
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop) && (target[prop] = source[prop]);
|
|
4313
|
+
return target;
|
|
4314
|
+
};
|
|
3757
4315
|
const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
3758
4316
|
&:not([hidden]) {
|
|
3759
4317
|
display: flex;
|
|
@@ -3766,9 +4324,10 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
|
3766
4324
|
will-change: opacity;
|
|
3767
4325
|
}
|
|
3768
4326
|
`, PopoverCard = react.memo(react.forwardRef(function(props, ref) {
|
|
4327
|
+
var _a;
|
|
3769
4328
|
const $ = reactCompilerRuntime.c(60);
|
|
3770
4329
|
let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, originX, originY, overflow, padding, placement, radius, restProps, scheme, shadow, strategy, style, tone, width, xProp, yProp;
|
|
3771
|
-
$[0] !== props ? ({
|
|
4330
|
+
$[0] !== props ? (_a = props, {
|
|
3772
4331
|
__unstable_margins: marginsProp,
|
|
3773
4332
|
animate,
|
|
3774
4333
|
arrow,
|
|
@@ -3789,19 +4348,40 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
|
3789
4348
|
tone,
|
|
3790
4349
|
width,
|
|
3791
4350
|
x: xProp,
|
|
3792
|
-
y: yProp
|
|
3793
|
-
|
|
3794
|
-
|
|
4351
|
+
y: yProp
|
|
4352
|
+
} = _a, restProps = __objRest$p(_a, [
|
|
4353
|
+
"__unstable_margins",
|
|
4354
|
+
"animate",
|
|
4355
|
+
"arrow",
|
|
4356
|
+
"arrowRef",
|
|
4357
|
+
"arrowX",
|
|
4358
|
+
"arrowY",
|
|
4359
|
+
"children",
|
|
4360
|
+
"padding",
|
|
4361
|
+
"placement",
|
|
4362
|
+
"originX",
|
|
4363
|
+
"originY",
|
|
4364
|
+
"overflow",
|
|
4365
|
+
"radius",
|
|
4366
|
+
"scheme",
|
|
4367
|
+
"shadow",
|
|
4368
|
+
"strategy",
|
|
4369
|
+
"style",
|
|
4370
|
+
"tone",
|
|
4371
|
+
"width",
|
|
4372
|
+
"x",
|
|
4373
|
+
"y"
|
|
4374
|
+
]), $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = originX, $[9] = originY, $[10] = overflow, $[11] = padding, $[12] = placement, $[13] = radius, $[14] = restProps, $[15] = scheme, $[16] = shadow, $[17] = strategy, $[18] = style, $[19] = tone, $[20] = width, $[21] = xProp, $[22] = yProp) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], originX = $[8], originY = $[9], overflow = $[10], padding = $[11], placement = $[12], radius = $[13], restProps = $[14], scheme = $[15], shadow = $[16], strategy = $[17], style = $[18], tone = $[19], width = $[20], xProp = $[21], yProp = $[22]);
|
|
3795
4375
|
const {
|
|
3796
4376
|
zIndex
|
|
3797
4377
|
} = useLayer();
|
|
3798
4378
|
let t0;
|
|
3799
4379
|
t0 = marginsProp || DEFAULT_POPOVER_MARGINS;
|
|
3800
|
-
const margins = t0, x = (xProp
|
|
4380
|
+
const margins = t0, x = (xProp != null ? xProp : 0) + margins[3], y = (yProp != null ? yProp : 0) + margins[0];
|
|
3801
4381
|
let t1;
|
|
3802
4382
|
const t2 = animate ? "transform" : void 0;
|
|
3803
4383
|
let t3;
|
|
3804
|
-
$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t2 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t3 = {
|
|
4384
|
+
$[23] !== originX || $[24] !== originY || $[25] !== strategy || $[26] !== style || $[27] !== t2 || $[28] !== width || $[29] !== x || $[30] !== y || $[31] !== zIndex ? (t3 = __spreadValues$s({
|
|
3805
4385
|
left: x,
|
|
3806
4386
|
originX,
|
|
3807
4387
|
originY,
|
|
@@ -3809,9 +4389,8 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
|
3809
4389
|
top: y,
|
|
3810
4390
|
width,
|
|
3811
4391
|
zIndex,
|
|
3812
|
-
willChange: t2
|
|
3813
|
-
|
|
3814
|
-
}, $[23] = originX, $[24] = originY, $[25] = strategy, $[26] = style, $[27] = t2, $[28] = width, $[29] = x, $[30] = y, $[31] = zIndex, $[32] = t3) : t3 = $[32], t1 = t3;
|
|
4392
|
+
willChange: t2
|
|
4393
|
+
}, 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;
|
|
3815
4394
|
const rootStyle2 = t1;
|
|
3816
4395
|
let t4;
|
|
3817
4396
|
const t5 = arrowX !== null ? arrowX : void 0, t6 = arrowY !== null ? arrowY : void 0;
|
|
@@ -3832,17 +4411,34 @@ const MotionCard$1 = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
|
3832
4411
|
let t12;
|
|
3833
4412
|
$[44] !== arrow || $[45] !== arrowRef || $[46] !== arrowStyle ? (t12 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[44] = arrow, $[45] = arrowRef, $[46] = arrowStyle, $[47] = t12) : t12 = $[47];
|
|
3834
4413
|
let t13;
|
|
3835
|
-
return $[48] !== placement || $[49] !== radius || $[50] !== ref || $[51] !== rootStyle2 || $[52] !== scheme || $[53] !== shadow || $[54] !== t11 || $[55] !== t12 || $[56] !== t8 || $[57] !== t9 || $[58] !== tone ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, { "data-ui": "Popover",
|
|
4414
|
+
return $[48] !== placement || $[49] !== radius || $[50] !== ref || $[51] !== rootStyle2 || $[52] !== scheme || $[53] !== shadow || $[54] !== t11 || $[55] !== t12 || $[56] !== t8 || $[57] !== t9 || $[58] !== tone ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, __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: [
|
|
3836
4415
|
t11,
|
|
3837
4416
|
t12
|
|
3838
|
-
] }), $[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;
|
|
4417
|
+
] })), $[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;
|
|
3839
4418
|
}));
|
|
3840
4419
|
PopoverCard.displayName = "Memo(ForwardRef(PopoverCard))";
|
|
4420
|
+
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) => {
|
|
4421
|
+
for (var prop in b || (b = {}))
|
|
4422
|
+
__hasOwnProp$r.call(b, prop) && __defNormalProp$r(a, prop, b[prop]);
|
|
4423
|
+
if (__getOwnPropSymbols$r)
|
|
4424
|
+
for (var prop of __getOwnPropSymbols$r(b))
|
|
4425
|
+
__propIsEnum$r.call(b, prop) && __defNormalProp$r(a, prop, b[prop]);
|
|
4426
|
+
return a;
|
|
4427
|
+
}, __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b)), __objRest$o = (source, exclude) => {
|
|
4428
|
+
var target = {};
|
|
4429
|
+
for (var prop in source)
|
|
4430
|
+
__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4431
|
+
if (source != null && __getOwnPropSymbols$r)
|
|
4432
|
+
for (var prop of __getOwnPropSymbols$r(source))
|
|
4433
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop) && (target[prop] = source[prop]);
|
|
4434
|
+
return target;
|
|
4435
|
+
};
|
|
3841
4436
|
const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
4437
|
+
var _a, _b, _c, _d, _f, _g, _h, _i, _j, _k;
|
|
3842
4438
|
const {
|
|
3843
4439
|
container,
|
|
3844
4440
|
layer
|
|
3845
|
-
} = useTheme_v2(), boundaryElementContext = useBoundaryElement(), {
|
|
4441
|
+
} = useTheme_v2(), boundaryElementContext = useBoundaryElement(), _e = props, {
|
|
3846
4442
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
3847
4443
|
animate: _animate = !1,
|
|
3848
4444
|
arrow: arrowProp = !1,
|
|
@@ -3851,10 +4447,9 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
3851
4447
|
constrainSize = !1,
|
|
3852
4448
|
content,
|
|
3853
4449
|
disabled,
|
|
3854
|
-
fallbackPlacements = props.fallbackPlacements
|
|
4450
|
+
fallbackPlacements = (_b = props.fallbackPlacements) != null ? _b : DEFAULT_FALLBACK_PLACEMENTS$1[(_a = props.placement) != null ? _a : "bottom"],
|
|
3855
4451
|
matchReferenceWidth,
|
|
3856
|
-
floatingBoundary = props.boundaryElement
|
|
3857
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4452
|
+
floatingBoundary = (_c = props.boundaryElement) != null ? _c : boundaryElementContext.element,
|
|
3858
4453
|
onActivate,
|
|
3859
4454
|
open,
|
|
3860
4455
|
overflow = "hidden",
|
|
@@ -3863,18 +4458,46 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
3863
4458
|
portal,
|
|
3864
4459
|
preventOverflow = !0,
|
|
3865
4460
|
radius: radiusProp = 3,
|
|
3866
|
-
referenceBoundary = props.boundaryElement
|
|
4461
|
+
referenceBoundary = (_d = props.boundaryElement) != null ? _d : boundaryElementContext.element,
|
|
3867
4462
|
referenceElement,
|
|
3868
4463
|
scheme,
|
|
3869
4464
|
shadow: shadowProp = 3,
|
|
3870
4465
|
tone = "inherit",
|
|
3871
4466
|
width: widthProp = "auto",
|
|
3872
4467
|
zOffset: zOffsetProp = layer.popover.zOffset,
|
|
3873
|
-
updateRef
|
|
3874
|
-
|
|
3875
|
-
|
|
4468
|
+
updateRef
|
|
4469
|
+
} = _e, restProps = __objRest$o(_e, [
|
|
4470
|
+
"__unstable_margins",
|
|
4471
|
+
"animate",
|
|
4472
|
+
"arrow",
|
|
4473
|
+
"boundaryElement",
|
|
4474
|
+
"children",
|
|
4475
|
+
"constrainSize",
|
|
4476
|
+
"content",
|
|
4477
|
+
"disabled",
|
|
4478
|
+
"fallbackPlacements",
|
|
4479
|
+
"matchReferenceWidth",
|
|
4480
|
+
"floatingBoundary",
|
|
4481
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4482
|
+
"onActivate",
|
|
4483
|
+
"open",
|
|
4484
|
+
"overflow",
|
|
4485
|
+
"padding",
|
|
4486
|
+
"placement",
|
|
4487
|
+
"portal",
|
|
4488
|
+
"preventOverflow",
|
|
4489
|
+
"radius",
|
|
4490
|
+
"referenceBoundary",
|
|
4491
|
+
"referenceElement",
|
|
4492
|
+
"scheme",
|
|
4493
|
+
"shadow",
|
|
4494
|
+
"tone",
|
|
4495
|
+
"width",
|
|
4496
|
+
"zOffset",
|
|
4497
|
+
"updateRef"
|
|
4498
|
+
]), animate = usePrefersReducedMotion() ? !1 : _animate, boundarySize = (_f = useElementSize(boundaryElement)) == null ? void 0 : _f.border, padding = useArrayProp(paddingProp), radius = useArrayProp(radiusProp), shadow = useArrayProp(shadowProp), widthArrayProp = useArrayProp(widthProp), zOffset = useArrayProp(zOffsetProp), ref = react.useRef(null), arrowRef = react.useRef(null), rootBoundary = "viewport";
|
|
3876
4499
|
react.useImperativeHandle(forwardedRef, () => ref.current);
|
|
3877
|
-
const mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize
|
|
4500
|
+
const mediaIndex = useMediaIndex(), boundaryWidth = constrainSize || preventOverflow ? boundarySize == null ? void 0 : boundarySize.width : void 0, width = calcCurrentWidth({
|
|
3878
4501
|
container,
|
|
3879
4502
|
mediaIndex,
|
|
3880
4503
|
width: widthArrayProp
|
|
@@ -3914,7 +4537,7 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
3914
4537
|
}) {
|
|
3915
4538
|
referenceWidthRef.current = referenceWidth_0;
|
|
3916
4539
|
const _currentWidth = widthRef.current, _maxWidth = maxWidthRef.current;
|
|
3917
|
-
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
|
|
4540
|
+
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`);
|
|
3918
4541
|
},
|
|
3919
4542
|
boundaryElement: floatingBoundary || void 0,
|
|
3920
4543
|
constrainSize,
|
|
@@ -3945,7 +4568,7 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
3945
4568
|
middleware,
|
|
3946
4569
|
placement: placementProp,
|
|
3947
4570
|
whileElementsMounted: reactDom$1.autoUpdate
|
|
3948
|
-
}), referenceHidden = middlewareData.hide
|
|
4571
|
+
}), 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 = react.useCallback((arrowEl) => {
|
|
3949
4572
|
arrowRef.current = arrowEl;
|
|
3950
4573
|
}, []), setFloating = react.useCallback((node) => {
|
|
3951
4574
|
ref.current = node, refs.setFloating(node);
|
|
@@ -3962,7 +4585,7 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
3962
4585
|
referenceElement && refs.setReference(referenceElement);
|
|
3963
4586
|
}, [referenceElement, refs]), disabled)
|
|
3964
4587
|
return childProp || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
3965
|
-
const popover = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(PopoverCard, {
|
|
4588
|
+
const popover = /* @__PURE__ */ jsxRuntime.jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover);
|
|
3966
4589
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3967
4590
|
animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
|
|
3968
4591
|
child
|
|
@@ -3970,8 +4593,9 @@ const Popover = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
|
3970
4593
|
}));
|
|
3971
4594
|
Popover.displayName = "Memo(ForwardRef(Popover))";
|
|
3972
4595
|
function getElementRef(element) {
|
|
3973
|
-
|
|
3974
|
-
|
|
4596
|
+
var _a, _b;
|
|
4597
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get, mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
4598
|
+
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);
|
|
3975
4599
|
}
|
|
3976
4600
|
function radioBaseStyle() {
|
|
3977
4601
|
return styledComponents.css`
|
|
@@ -4087,23 +4711,45 @@ function inputElementStyle(props) {
|
|
|
4087
4711
|
}
|
|
4088
4712
|
`;
|
|
4089
4713
|
}
|
|
4714
|
+
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) => {
|
|
4715
|
+
for (var prop in b || (b = {}))
|
|
4716
|
+
__hasOwnProp$q.call(b, prop) && __defNormalProp$q(a, prop, b[prop]);
|
|
4717
|
+
if (__getOwnPropSymbols$q)
|
|
4718
|
+
for (var prop of __getOwnPropSymbols$q(b))
|
|
4719
|
+
__propIsEnum$q.call(b, prop) && __defNormalProp$q(a, prop, b[prop]);
|
|
4720
|
+
return a;
|
|
4721
|
+
}, __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b)), __objRest$n = (source, exclude) => {
|
|
4722
|
+
var target = {};
|
|
4723
|
+
for (var prop in source)
|
|
4724
|
+
__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4725
|
+
if (source != null && __getOwnPropSymbols$q)
|
|
4726
|
+
for (var prop of __getOwnPropSymbols$q(source))
|
|
4727
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop) && (target[prop] = source[prop]);
|
|
4728
|
+
return target;
|
|
4729
|
+
};
|
|
4090
4730
|
const Root$g = styledComponents.styled.div(radioBaseStyle), Input$4 = styledComponents.styled.input(inputElementStyle), Radio = react.forwardRef(function(props, forwardedRef) {
|
|
4731
|
+
var _a;
|
|
4091
4732
|
const $ = reactCompilerRuntime.c(19);
|
|
4092
4733
|
let className, customValidity, disabled, readOnly, restProps, style;
|
|
4093
|
-
$[0] !== props ? ({
|
|
4734
|
+
$[0] !== props ? (_a = props, {
|
|
4094
4735
|
className,
|
|
4095
4736
|
disabled,
|
|
4096
4737
|
style,
|
|
4097
4738
|
customValidity,
|
|
4098
|
-
readOnly
|
|
4099
|
-
|
|
4100
|
-
|
|
4739
|
+
readOnly
|
|
4740
|
+
} = _a, restProps = __objRest$n(_a, [
|
|
4741
|
+
"className",
|
|
4742
|
+
"disabled",
|
|
4743
|
+
"style",
|
|
4744
|
+
"customValidity",
|
|
4745
|
+
"readOnly"
|
|
4746
|
+
]), $[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]);
|
|
4101
4747
|
const ref = react.useRef(null);
|
|
4102
4748
|
let t0;
|
|
4103
4749
|
$[7] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[7] = t0) : t0 = $[7], react.useImperativeHandle(forwardedRef, t0), useCustomValidity(ref, customValidity);
|
|
4104
4750
|
const t1 = !disabled && readOnly ? "" : void 0, t2 = customValidity ? "" : void 0, t3 = disabled || readOnly;
|
|
4105
4751
|
let t4;
|
|
4106
|
-
$[8] !== readOnly || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Input$4, { "data-read-only": t1, "data-error": t2,
|
|
4752
|
+
$[8] !== readOnly || $[9] !== restProps || $[10] !== t1 || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.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];
|
|
4107
4753
|
let t5;
|
|
4108
4754
|
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("span", {}), $[14] = t5) : t5 = $[14];
|
|
4109
4755
|
let t6;
|
|
@@ -4255,10 +4901,28 @@ const selectStyle = {
|
|
|
4255
4901
|
root: rootStyle,
|
|
4256
4902
|
input: inputStyle,
|
|
4257
4903
|
iconBox: iconBoxStyle
|
|
4258
|
-
}
|
|
4904
|
+
};
|
|
4905
|
+
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) => {
|
|
4906
|
+
for (var prop in b || (b = {}))
|
|
4907
|
+
__hasOwnProp$p.call(b, prop) && __defNormalProp$p(a, prop, b[prop]);
|
|
4908
|
+
if (__getOwnPropSymbols$p)
|
|
4909
|
+
for (var prop of __getOwnPropSymbols$p(b))
|
|
4910
|
+
__propIsEnum$p.call(b, prop) && __defNormalProp$p(a, prop, b[prop]);
|
|
4911
|
+
return a;
|
|
4912
|
+
}, __spreadProps$p = (a, b) => __defProps$p(a, __getOwnPropDescs$p(b)), __objRest$m = (source, exclude) => {
|
|
4913
|
+
var target = {};
|
|
4914
|
+
for (var prop in source)
|
|
4915
|
+
__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4916
|
+
if (source != null && __getOwnPropSymbols$p)
|
|
4917
|
+
for (var prop of __getOwnPropSymbols$p(source))
|
|
4918
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop) && (target[prop] = source[prop]);
|
|
4919
|
+
return target;
|
|
4920
|
+
};
|
|
4921
|
+
const Root$f = styledComponents.styled.div(selectStyle.root), Input$3 = styledComponents.styled.select(selectStyle.input), IconBox = styledComponents.styled(Box)(selectStyle.iconBox), Select = react.forwardRef(function(props, forwardedRef) {
|
|
4922
|
+
var _a;
|
|
4259
4923
|
const $ = reactCompilerRuntime.c(29);
|
|
4260
4924
|
let children, customValidity, disabled, readOnly, restProps, t0, t1, t2, t3;
|
|
4261
|
-
$[0] !== props ? ({
|
|
4925
|
+
$[0] !== props ? (_a = props, {
|
|
4262
4926
|
children,
|
|
4263
4927
|
customValidity,
|
|
4264
4928
|
disabled,
|
|
@@ -4266,15 +4930,23 @@ const selectStyle = {
|
|
|
4266
4930
|
padding: t1,
|
|
4267
4931
|
radius: t2,
|
|
4268
4932
|
readOnly,
|
|
4269
|
-
space: t3
|
|
4270
|
-
|
|
4271
|
-
|
|
4933
|
+
space: t3
|
|
4934
|
+
} = _a, restProps = __objRest$m(_a, [
|
|
4935
|
+
"children",
|
|
4936
|
+
"customValidity",
|
|
4937
|
+
"disabled",
|
|
4938
|
+
"fontSize",
|
|
4939
|
+
"padding",
|
|
4940
|
+
"radius",
|
|
4941
|
+
"readOnly",
|
|
4942
|
+
"space"
|
|
4943
|
+
]), $[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]);
|
|
4272
4944
|
const fontSize2 = t0 === void 0 ? 2 : t0, padding = t1 === void 0 ? 3 : t1, radius = t2 === void 0 ? 2 : t2, space = t3 === void 0 ? 3 : t3, ref = react.useRef(null);
|
|
4273
4945
|
let t4;
|
|
4274
4946
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[10] = t4) : t4 = $[10], react.useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
|
|
4275
4947
|
const t5 = !disabled && readOnly ? "" : void 0, t6 = useArrayProp(fontSize2), t7 = useArrayProp(padding), t8 = useArrayProp(radius), t9 = useArrayProp(space), t10 = disabled || readOnly;
|
|
4276
4948
|
let t11;
|
|
4277
|
-
$[11] !== children || $[12] !== restProps || $[13] !== t10 || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Input$3, { "data-read-only": t5, "data-ui": "Select",
|
|
4949
|
+
$[11] !== children || $[12] !== restProps || $[13] !== t10 || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.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];
|
|
4278
4950
|
let t12;
|
|
4279
4951
|
$[20] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}), $[20] = t12) : t12 = $[20];
|
|
4280
4952
|
let t13;
|
|
@@ -4310,17 +4982,36 @@ function responsiveStackSpaceStyle(props) {
|
|
|
4310
4982
|
gridGap: rem(space[spaceIndex])
|
|
4311
4983
|
}));
|
|
4312
4984
|
}
|
|
4985
|
+
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) => {
|
|
4986
|
+
for (var prop in b || (b = {}))
|
|
4987
|
+
__hasOwnProp$o.call(b, prop) && __defNormalProp$o(a, prop, b[prop]);
|
|
4988
|
+
if (__getOwnPropSymbols$o)
|
|
4989
|
+
for (var prop of __getOwnPropSymbols$o(b))
|
|
4990
|
+
__propIsEnum$o.call(b, prop) && __defNormalProp$o(a, prop, b[prop]);
|
|
4991
|
+
return a;
|
|
4992
|
+
}, __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b)), __objRest$l = (source, exclude) => {
|
|
4993
|
+
var target = {};
|
|
4994
|
+
for (var prop in source)
|
|
4995
|
+
__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
4996
|
+
if (source != null && __getOwnPropSymbols$o)
|
|
4997
|
+
for (var prop of __getOwnPropSymbols$o(source))
|
|
4998
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop) && (target[prop] = source[prop]);
|
|
4999
|
+
return target;
|
|
5000
|
+
};
|
|
4313
5001
|
const Root$e = styledComponents.styled(Box)(stackBaseStyle, responsiveStackSpaceStyle), Stack = react.forwardRef(function(props, ref) {
|
|
5002
|
+
var _a;
|
|
4314
5003
|
const $ = reactCompilerRuntime.c(10);
|
|
4315
5004
|
let as, restProps, space;
|
|
4316
|
-
$[0] !== props ? ({
|
|
5005
|
+
$[0] !== props ? (_a = props, {
|
|
4317
5006
|
as,
|
|
4318
|
-
space
|
|
4319
|
-
|
|
4320
|
-
|
|
5007
|
+
space
|
|
5008
|
+
} = _a, restProps = __objRest$l(_a, [
|
|
5009
|
+
"as",
|
|
5010
|
+
"space"
|
|
5011
|
+
]), $[0] = props, $[1] = as, $[2] = restProps, $[3] = space) : (as = $[1], restProps = $[2], space = $[3]);
|
|
4321
5012
|
const t0 = typeof as == "string" ? as : void 0, t1 = useArrayProp(space);
|
|
4322
5013
|
let t2;
|
|
4323
|
-
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t0 || $[8] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Root$e, { "data-as": t0, "data-ui": "Stack",
|
|
5014
|
+
return $[4] !== as || $[5] !== ref || $[6] !== restProps || $[7] !== t0 || $[8] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.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;
|
|
4324
5015
|
});
|
|
4325
5016
|
Stack.displayName = "ForwardRef(Stack)";
|
|
4326
5017
|
function switchBaseStyles() {
|
|
@@ -4476,18 +5167,41 @@ function switchThumbStyles(props) {
|
|
|
4476
5167
|
`}
|
|
4477
5168
|
`;
|
|
4478
5169
|
}
|
|
5170
|
+
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) => {
|
|
5171
|
+
for (var prop in b || (b = {}))
|
|
5172
|
+
__hasOwnProp$n.call(b, prop) && __defNormalProp$n(a, prop, b[prop]);
|
|
5173
|
+
if (__getOwnPropSymbols$n)
|
|
5174
|
+
for (var prop of __getOwnPropSymbols$n(b))
|
|
5175
|
+
__propIsEnum$n.call(b, prop) && __defNormalProp$n(a, prop, b[prop]);
|
|
5176
|
+
return a;
|
|
5177
|
+
}, __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b)), __objRest$k = (source, exclude) => {
|
|
5178
|
+
var target = {};
|
|
5179
|
+
for (var prop in source)
|
|
5180
|
+
__hasOwnProp$n.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5181
|
+
if (source != null && __getOwnPropSymbols$n)
|
|
5182
|
+
for (var prop of __getOwnPropSymbols$n(source))
|
|
5183
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$n.call(source, prop) && (target[prop] = source[prop]);
|
|
5184
|
+
return target;
|
|
5185
|
+
};
|
|
4479
5186
|
const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledComponents.styled.input(switchInputStyles), Representation = styledComponents.styled.span(switchRepresentationStyles), Track = styledComponents.styled.span(switchTrackStyles), Thumb = styledComponents.styled.span(switchThumbStyles), Switch = react.forwardRef(function(props, forwardedRef) {
|
|
5187
|
+
var _a;
|
|
4480
5188
|
const $ = reactCompilerRuntime.c(26);
|
|
4481
5189
|
let checked, className, disabled, indeterminate, readOnly, restProps, style;
|
|
4482
|
-
$[0] !== props ? ({
|
|
5190
|
+
$[0] !== props ? (_a = props, {
|
|
4483
5191
|
checked,
|
|
4484
5192
|
className,
|
|
4485
5193
|
disabled,
|
|
4486
5194
|
indeterminate,
|
|
4487
5195
|
readOnly,
|
|
4488
|
-
style
|
|
4489
|
-
|
|
4490
|
-
|
|
5196
|
+
style
|
|
5197
|
+
} = _a, restProps = __objRest$k(_a, [
|
|
5198
|
+
"checked",
|
|
5199
|
+
"className",
|
|
5200
|
+
"disabled",
|
|
5201
|
+
"indeterminate",
|
|
5202
|
+
"readOnly",
|
|
5203
|
+
"style"
|
|
5204
|
+
]), $[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]);
|
|
4491
5205
|
const ref = react.useRef(null);
|
|
4492
5206
|
let t0;
|
|
4493
5207
|
$[8] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[8] = t0) : t0 = $[8], react.useImperativeHandle(forwardedRef, t0);
|
|
@@ -4497,7 +5211,7 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
4497
5211
|
}, t2 = [indeterminate], $[9] = indeterminate, $[10] = t1, $[11] = t2) : (t1 = $[10], t2 = $[11]), react.useEffect(t1, t2);
|
|
4498
5212
|
const t3 = !disabled && readOnly ? "" : void 0, t4 = indeterminate !== !0 && checked, t5 = disabled || readOnly;
|
|
4499
5213
|
let t6;
|
|
4500
|
-
$[12] !== restProps || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Input$2, { "data-read-only": t3,
|
|
5214
|
+
$[12] !== restProps || $[13] !== t3 || $[14] !== t4 || $[15] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.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];
|
|
4501
5215
|
let t7;
|
|
4502
5216
|
$[17] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Track, {}), $[17] = t7) : t7 = $[17];
|
|
4503
5217
|
let t8;
|
|
@@ -4512,15 +5226,32 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
4512
5226
|
] }), $[21] = className, $[22] = style, $[23] = t6, $[24] = t8, $[25] = t9) : t9 = $[25], t9;
|
|
4513
5227
|
});
|
|
4514
5228
|
Switch.displayName = "ForwardRef(Switch)";
|
|
5229
|
+
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) => {
|
|
5230
|
+
for (var prop in b || (b = {}))
|
|
5231
|
+
__hasOwnProp$m.call(b, prop) && __defNormalProp$m(a, prop, b[prop]);
|
|
5232
|
+
if (__getOwnPropSymbols$m)
|
|
5233
|
+
for (var prop of __getOwnPropSymbols$m(b))
|
|
5234
|
+
__propIsEnum$m.call(b, prop) && __defNormalProp$m(a, prop, b[prop]);
|
|
5235
|
+
return a;
|
|
5236
|
+
}, __spreadProps$m = (a, b) => __defProps$m(a, __getOwnPropDescs$m(b)), __objRest$j = (source, exclude) => {
|
|
5237
|
+
var target = {};
|
|
5238
|
+
for (var prop in source)
|
|
5239
|
+
__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5240
|
+
if (source != null && __getOwnPropSymbols$m)
|
|
5241
|
+
for (var prop of __getOwnPropSymbols$m(source))
|
|
5242
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop) && (target[prop] = source[prop]);
|
|
5243
|
+
return target;
|
|
5244
|
+
};
|
|
4515
5245
|
const Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = styledComponents.styled.span`
|
|
4516
5246
|
flex: 1;
|
|
4517
5247
|
min-width: 0;
|
|
4518
5248
|
display: block;
|
|
4519
5249
|
position: relative;
|
|
4520
5250
|
`, Input$1 = styledComponents.styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation$1 = styledComponents.styled.div(responsiveRadiusStyle, textInputRepresentationStyle), TextArea = react.forwardRef(function(props, forwardedRef) {
|
|
5251
|
+
var _a;
|
|
4521
5252
|
const $ = reactCompilerRuntime.c(29);
|
|
4522
5253
|
let __unstable_disableFocusRing, customValidity, restProps, t0, t1, t2, t3, t4, weight;
|
|
4523
|
-
$[0] !== props ? ({
|
|
5254
|
+
$[0] !== props ? (_a = props, {
|
|
4524
5255
|
border: t0,
|
|
4525
5256
|
customValidity,
|
|
4526
5257
|
disabled: t1,
|
|
@@ -4528,15 +5259,23 @@ const Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = s
|
|
|
4528
5259
|
padding: t3,
|
|
4529
5260
|
radius: t4,
|
|
4530
5261
|
weight,
|
|
4531
|
-
__unstable_disableFocusRing
|
|
4532
|
-
|
|
4533
|
-
|
|
5262
|
+
__unstable_disableFocusRing
|
|
5263
|
+
} = _a, restProps = __objRest$j(_a, [
|
|
5264
|
+
"border",
|
|
5265
|
+
"customValidity",
|
|
5266
|
+
"disabled",
|
|
5267
|
+
"fontSize",
|
|
5268
|
+
"padding",
|
|
5269
|
+
"radius",
|
|
5270
|
+
"weight",
|
|
5271
|
+
"__unstable_disableFocusRing"
|
|
5272
|
+
]), $[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]);
|
|
4534
5273
|
const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize2 = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, ref = react.useRef(null), rootTheme = useRootTheme();
|
|
4535
5274
|
let t5;
|
|
4536
5275
|
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[10] = t5) : t5 = $[10], react.useImperativeHandle(forwardedRef, t5), useCustomValidity(ref, customValidity);
|
|
4537
5276
|
const t6 = rootTheme.scheme, t7 = rootTheme.tone, t8 = useArrayProp(fontSize2), t9 = useArrayProp(padding), t10 = rootTheme.scheme, t11 = useArrayProp(0);
|
|
4538
5277
|
let t12;
|
|
4539
|
-
$[11] !== disabled || $[12] !== restProps || $[13] !== rootTheme.scheme || $[14] !== rootTheme.tone || $[15] !== t11 || $[16] !== t8 || $[17] !== t9 || $[18] !== weight ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Input$1, { "data-as": "textarea", "data-scheme": t6, "data-tone": t7,
|
|
5278
|
+
$[11] !== disabled || $[12] !== restProps || $[13] !== rootTheme.scheme || $[14] !== rootTheme.tone || $[15] !== t11 || $[16] !== t8 || $[17] !== t9 || $[18] !== weight ? (t12 = /* @__PURE__ */ jsxRuntime.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];
|
|
4540
5279
|
const t13 = useArrayProp(radius), t14 = border2 ? "" : void 0;
|
|
4541
5280
|
let t15;
|
|
4542
5281
|
$[20] !== __unstable_disableFocusRing || $[21] !== rootTheme.scheme || $[22] !== rootTheme.tone || $[23] !== t13 || $[24] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsx(Presentation$1, { $radius: t13, $unstableDisableFocusRing: __unstable_disableFocusRing, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t14, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone }), $[20] = __unstable_disableFocusRing, $[21] = rootTheme.scheme, $[22] = rootTheme.tone, $[23] = t13, $[24] = t14, $[25] = t15) : t15 = $[25];
|
|
@@ -4547,6 +5286,22 @@ const Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = s
|
|
|
4547
5286
|
] }) }), $[26] = t12, $[27] = t15, $[28] = t16) : t16 = $[28], t16;
|
|
4548
5287
|
});
|
|
4549
5288
|
TextArea.displayName = "ForwardRef(TextArea)";
|
|
5289
|
+
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) => {
|
|
5290
|
+
for (var prop in b || (b = {}))
|
|
5291
|
+
__hasOwnProp$l.call(b, prop) && __defNormalProp$l(a, prop, b[prop]);
|
|
5292
|
+
if (__getOwnPropSymbols$l)
|
|
5293
|
+
for (var prop of __getOwnPropSymbols$l(b))
|
|
5294
|
+
__propIsEnum$l.call(b, prop) && __defNormalProp$l(a, prop, b[prop]);
|
|
5295
|
+
return a;
|
|
5296
|
+
}, __spreadProps$l = (a, b) => __defProps$l(a, __getOwnPropDescs$l(b)), __objRest$i = (source, exclude) => {
|
|
5297
|
+
var target = {};
|
|
5298
|
+
for (var prop in source)
|
|
5299
|
+
__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5300
|
+
if (source != null && __getOwnPropSymbols$l)
|
|
5301
|
+
for (var prop of __getOwnPropSymbols$l(source))
|
|
5302
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop) && (target[prop] = source[prop]);
|
|
5303
|
+
return target;
|
|
5304
|
+
};
|
|
4550
5305
|
const CLEAR_BUTTON_BOX_STYLE = {
|
|
4551
5306
|
zIndex: 2
|
|
4552
5307
|
}, Root$b = styledComponents.styled(Card).attrs({
|
|
@@ -4594,9 +5349,10 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4594
5349
|
display: "block"
|
|
4595
5350
|
}
|
|
4596
5351
|
}), TextInput = react.forwardRef(function(props, forwardedRef) {
|
|
5352
|
+
var _a;
|
|
4597
5353
|
const $ = reactCompilerRuntime.c(84);
|
|
4598
5354
|
let IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
|
|
4599
|
-
$[0] !== props ? ({
|
|
5355
|
+
$[0] !== props ? (_a = props, {
|
|
4600
5356
|
__unstable_disableFocusRing,
|
|
4601
5357
|
border: t0,
|
|
4602
5358
|
clearButton,
|
|
@@ -4613,16 +5369,34 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4613
5369
|
suffix,
|
|
4614
5370
|
customValidity,
|
|
4615
5371
|
type: t6,
|
|
4616
|
-
weight
|
|
4617
|
-
|
|
4618
|
-
|
|
5372
|
+
weight
|
|
5373
|
+
} = _a, restProps = __objRest$i(_a, [
|
|
5374
|
+
"__unstable_disableFocusRing",
|
|
5375
|
+
"border",
|
|
5376
|
+
"clearButton",
|
|
5377
|
+
"disabled",
|
|
5378
|
+
"fontSize",
|
|
5379
|
+
"icon",
|
|
5380
|
+
"iconRight",
|
|
5381
|
+
"onClear",
|
|
5382
|
+
"padding",
|
|
5383
|
+
"prefix",
|
|
5384
|
+
"radius",
|
|
5385
|
+
"readOnly",
|
|
5386
|
+
"space",
|
|
5387
|
+
"suffix",
|
|
5388
|
+
"customValidity",
|
|
5389
|
+
"type",
|
|
5390
|
+
"weight"
|
|
5391
|
+
]), $[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]);
|
|
4619
5392
|
const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, spaceProp = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = react.useRef(null), rootTheme = useRootTheme(), fontSize2 = useArrayProp(fontSizeProp), padding = useArrayProp(paddingProp), radius = useArrayProp(radiusProp), space = useArrayProp(spaceProp), $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
|
|
4620
5393
|
let t7;
|
|
4621
5394
|
$[19] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[19] = t7) : t7 = $[19], react.useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
4622
5395
|
const handleClearMouseDown = _temp$3;
|
|
4623
5396
|
let t8;
|
|
4624
5397
|
$[20] !== onClear ? (t8 = (event_0) => {
|
|
4625
|
-
|
|
5398
|
+
var _a2;
|
|
5399
|
+
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), (_a2 = ref.current) == null || _a2.focus();
|
|
4626
5400
|
}, $[20] = onClear, $[21] = t8) : t8 = $[21];
|
|
4627
5401
|
const handleClearClick = t8;
|
|
4628
5402
|
let t9, t10;
|
|
@@ -4656,13 +5430,13 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4656
5430
|
t20 = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
|
|
4657
5431
|
const clearButtonProps = t20;
|
|
4658
5432
|
let t21, t22;
|
|
4659
|
-
$[48] !== clearButton || $[49] !== clearButtonBoxPadding || $[50] !== clearButtonPadding || $[51] !== clearButtonProps || $[52] !== customValidity || $[53] !== disabled || $[54] !== fontSize2 || $[55] !== handleClearClick || $[56] !== radius || $[57] !== readOnly ? (t22 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius,
|
|
5433
|
+
$[48] !== clearButton || $[49] !== clearButtonBoxPadding || $[50] !== clearButtonPadding || $[51] !== clearButtonProps || $[52] !== customValidity || $[53] !== disabled || $[54] !== fontSize2 || $[55] !== handleClearClick || $[56] !== radius || $[57] !== readOnly ? (t22 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(TextInputClearButton, __spreadProps$l(__spreadValues$l({ "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius }, clearButtonProps), { onClick: handleClearClick, onMouseDown: handleClearMouseDown })) }), $[48] = clearButton, $[49] = clearButtonBoxPadding, $[50] = clearButtonPadding, $[51] = clearButtonProps, $[52] = customValidity, $[53] = disabled, $[54] = fontSize2, $[55] = handleClearClick, $[56] = radius, $[57] = readOnly, $[58] = t22) : t22 = $[58], t21 = t22;
|
|
4660
5434
|
const clearButtonNode = t21;
|
|
4661
5435
|
let t23, t24;
|
|
4662
5436
|
$[59] !== radius || $[60] !== suffix ? (t24 = suffix && /* @__PURE__ */ jsxRuntime.jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: suffix }) }), $[59] = radius, $[60] = suffix, $[61] = t24) : t24 = $[61], t23 = t24;
|
|
4663
5437
|
const suffixNode = t23, t25 = $hasIconRight || $hasClearButton;
|
|
4664
5438
|
let t26;
|
|
4665
|
-
$[62] !== $hasIcon || $[63] !== disabled || $[64] !== fontSize2 || $[65] !== padding || $[66] !== readOnly || $[67] !== restProps || $[68] !== rootTheme.scheme || $[69] !== rootTheme.tone || $[70] !== space || $[71] !== t25 || $[72] !== type || $[73] !== weight ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone,
|
|
5439
|
+
$[62] !== $hasIcon || $[63] !== disabled || $[64] !== fontSize2 || $[65] !== padding || $[66] !== readOnly || $[67] !== restProps || $[68] !== rootTheme.scheme || $[69] !== rootTheme.tone || $[70] !== space || $[71] !== t25 || $[72] !== type || $[73] !== weight ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(Input, __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];
|
|
4666
5440
|
let t27;
|
|
4667
5441
|
$[75] !== clearButtonNode || $[76] !== presentationNode || $[77] !== t26 ? (t27 = /* @__PURE__ */ jsxRuntime.jsxs(InputRoot, { children: [
|
|
4668
5442
|
t26,
|
|
@@ -4714,15 +5488,33 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4714
5488
|
right: ["right-end", "right-start", "left", "top", "bottom"],
|
|
4715
5489
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
4716
5490
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
4717
|
-
}
|
|
5491
|
+
};
|
|
5492
|
+
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) => {
|
|
5493
|
+
for (var prop in b || (b = {}))
|
|
5494
|
+
__hasOwnProp$k.call(b, prop) && __defNormalProp$k(a, prop, b[prop]);
|
|
5495
|
+
if (__getOwnPropSymbols$k)
|
|
5496
|
+
for (var prop of __getOwnPropSymbols$k(b))
|
|
5497
|
+
__propIsEnum$k.call(b, prop) && __defNormalProp$k(a, prop, b[prop]);
|
|
5498
|
+
return a;
|
|
5499
|
+
}, __spreadProps$k = (a, b) => __defProps$k(a, __getOwnPropDescs$k(b)), __objRest$h = (source, exclude) => {
|
|
5500
|
+
var target = {};
|
|
5501
|
+
for (var prop in source)
|
|
5502
|
+
__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5503
|
+
if (source != null && __getOwnPropSymbols$k)
|
|
5504
|
+
for (var prop of __getOwnPropSymbols$k(source))
|
|
5505
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop) && (target[prop] = source[prop]);
|
|
5506
|
+
return target;
|
|
5507
|
+
};
|
|
5508
|
+
const MotionCard = styledComponents.styled(framerMotion.motion.create(Card))`
|
|
4718
5509
|
& > * {
|
|
4719
5510
|
opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
|
|
4720
5511
|
will-change: opacity;
|
|
4721
5512
|
}
|
|
4722
5513
|
`, TooltipCard = react.memo(react.forwardRef(function(props, ref) {
|
|
5514
|
+
var _a;
|
|
4723
5515
|
const $ = reactCompilerRuntime.c(42);
|
|
4724
5516
|
let animate, arrow, arrowRef, arrowX, arrowY, children, originX, originY, padding, placement, radius, restProps, scheme, shadow, style;
|
|
4725
|
-
$[0] !== props ? ({
|
|
5517
|
+
$[0] !== props ? (_a = props, {
|
|
4726
5518
|
animate,
|
|
4727
5519
|
arrow,
|
|
4728
5520
|
arrowRef,
|
|
@@ -4736,18 +5528,31 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4736
5528
|
radius,
|
|
4737
5529
|
scheme,
|
|
4738
5530
|
shadow,
|
|
4739
|
-
style
|
|
4740
|
-
|
|
4741
|
-
|
|
5531
|
+
style
|
|
5532
|
+
} = _a, restProps = __objRest$h(_a, [
|
|
5533
|
+
"animate",
|
|
5534
|
+
"arrow",
|
|
5535
|
+
"arrowRef",
|
|
5536
|
+
"arrowX",
|
|
5537
|
+
"arrowY",
|
|
5538
|
+
"children",
|
|
5539
|
+
"originX",
|
|
5540
|
+
"originY",
|
|
5541
|
+
"padding",
|
|
5542
|
+
"placement",
|
|
5543
|
+
"radius",
|
|
5544
|
+
"scheme",
|
|
5545
|
+
"shadow",
|
|
5546
|
+
"style"
|
|
5547
|
+
]), $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = originX, $[8] = originY, $[9] = padding, $[10] = placement, $[11] = radius, $[12] = restProps, $[13] = scheme, $[14] = shadow, $[15] = style) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], originX = $[7], originY = $[8], padding = $[9], placement = $[10], radius = $[11], restProps = $[12], scheme = $[13], shadow = $[14], style = $[15]);
|
|
4742
5548
|
let t0;
|
|
4743
5549
|
const t1 = animate ? "transform" : void 0;
|
|
4744
5550
|
let t2;
|
|
4745
|
-
$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t1 ? (t2 = {
|
|
5551
|
+
$[16] !== originX || $[17] !== originY || $[18] !== style || $[19] !== t1 ? (t2 = __spreadValues$k({
|
|
4746
5552
|
originX,
|
|
4747
5553
|
originY,
|
|
4748
|
-
willChange: t1
|
|
4749
|
-
|
|
4750
|
-
}, $[16] = originX, $[17] = originY, $[18] = style, $[19] = t1, $[20] = t2) : t2 = $[20], t0 = t2;
|
|
5554
|
+
willChange: t1
|
|
5555
|
+
}, style), $[16] = originX, $[17] = originY, $[18] = style, $[19] = t1, $[20] = t2) : t2 = $[20], t0 = t2;
|
|
4751
5556
|
const rootStyle2 = t0;
|
|
4752
5557
|
let t3;
|
|
4753
5558
|
const t4 = arrowX !== null ? arrowX : void 0, t5 = arrowY !== null ? arrowY : void 0;
|
|
@@ -4764,10 +5569,10 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4764
5569
|
let t9;
|
|
4765
5570
|
$[26] !== arrow || $[27] !== arrowRef || $[28] !== arrowStyle ? (t9 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_TOOLTIP_ARROW_WIDTH, height: DEFAULT_TOOLTIP_ARROW_HEIGHT, radius: DEFAULT_TOOLTIP_ARROW_RADIUS }), $[26] = arrow, $[27] = arrowRef, $[28] = arrowStyle, $[29] = t9) : t9 = $[29];
|
|
4766
5571
|
let t10;
|
|
4767
|
-
return $[30] !== children || $[31] !== padding || $[32] !== placement || $[33] !== radius || $[34] !== ref || $[35] !== rootStyle2 || $[36] !== scheme || $[37] !== shadow || $[38] !== t7 || $[39] !== t8 || $[40] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { "data-ui": "Tooltip__card",
|
|
5572
|
+
return $[30] !== children || $[31] !== padding || $[32] !== placement || $[33] !== radius || $[34] !== ref || $[35] !== rootStyle2 || $[36] !== scheme || $[37] !== shadow || $[38] !== t7 || $[39] !== t8 || $[40] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, __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: [
|
|
4768
5573
|
children,
|
|
4769
5574
|
t9
|
|
4770
|
-
] }), $[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;
|
|
5575
|
+
] })), $[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;
|
|
4771
5576
|
}));
|
|
4772
5577
|
TooltipCard.displayName = "Memo(ForwardRef(TooltipCard))";
|
|
4773
5578
|
const TooltipDelayGroupContext = createGlobalScopedContext("@sanity/ui/context/tooltipDelayGroup", null);
|
|
@@ -4778,7 +5583,7 @@ function TooltipDelayGroupProvider(props) {
|
|
|
4778
5583
|
const $ = reactCompilerRuntime.c(10), {
|
|
4779
5584
|
children,
|
|
4780
5585
|
delay
|
|
4781
|
-
} = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay
|
|
5586
|
+
} = 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;
|
|
4782
5587
|
let t0;
|
|
4783
5588
|
const t1 = isGroupActive ? 1 : openDelay;
|
|
4784
5589
|
let t2;
|
|
@@ -4795,19 +5600,36 @@ function TooltipDelayGroupProvider(props) {
|
|
|
4795
5600
|
return $[7] !== children || $[8] !== value ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupContext.Provider, { value, children }), $[7] = children, $[8] = value, $[9] = t3) : t3 = $[9], t3;
|
|
4796
5601
|
}
|
|
4797
5602
|
TooltipDelayGroupProvider.displayName = "TooltipDelayGroupProvider";
|
|
5603
|
+
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) => {
|
|
5604
|
+
for (var prop in b || (b = {}))
|
|
5605
|
+
__hasOwnProp$j.call(b, prop) && __defNormalProp$j(a, prop, b[prop]);
|
|
5606
|
+
if (__getOwnPropSymbols$j)
|
|
5607
|
+
for (var prop of __getOwnPropSymbols$j(b))
|
|
5608
|
+
__propIsEnum$j.call(b, prop) && __defNormalProp$j(a, prop, b[prop]);
|
|
5609
|
+
return a;
|
|
5610
|
+
}, __spreadProps$j = (a, b) => __defProps$j(a, __getOwnPropDescs$j(b)), __objRest$g = (source, exclude) => {
|
|
5611
|
+
var target = {};
|
|
5612
|
+
for (var prop in source)
|
|
5613
|
+
__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5614
|
+
if (source != null && __getOwnPropSymbols$j)
|
|
5615
|
+
for (var prop of __getOwnPropSymbols$j(source))
|
|
5616
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop) && (target[prop] = source[prop]);
|
|
5617
|
+
return target;
|
|
5618
|
+
};
|
|
4798
5619
|
const Root$a = styledComponents.styled(Layer)`
|
|
4799
5620
|
pointer-events: none;
|
|
4800
5621
|
`, Tooltip = react.forwardRef(function(props, forwardedRef) {
|
|
5622
|
+
var _a, _b, _d, _e, _f, _g, _h;
|
|
4801
5623
|
const boundaryElementContext = useBoundaryElement(), {
|
|
4802
5624
|
layer
|
|
4803
|
-
} = useTheme_v2(), {
|
|
5625
|
+
} = useTheme_v2(), _c2 = props, {
|
|
4804
5626
|
animate: _animate = !1,
|
|
4805
5627
|
arrow: arrowProp = !1,
|
|
4806
|
-
boundaryElement = boundaryElementContext
|
|
5628
|
+
boundaryElement = boundaryElementContext == null ? void 0 : boundaryElementContext.element,
|
|
4807
5629
|
children: childProp,
|
|
4808
5630
|
content,
|
|
4809
5631
|
disabled,
|
|
4810
|
-
fallbackPlacements: fallbackPlacementsProp = props.fallbackPlacements
|
|
5632
|
+
fallbackPlacements: fallbackPlacementsProp = (_b = props.fallbackPlacements) != null ? _b : DEFAULT_FALLBACK_PLACEMENTS[(_a = props.placement) != null ? _a : "bottom"],
|
|
4811
5633
|
padding = 2,
|
|
4812
5634
|
placement: placementProp = "bottom",
|
|
4813
5635
|
portal: portalProp,
|
|
@@ -4815,11 +5637,26 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
4815
5637
|
scheme,
|
|
4816
5638
|
shadow = 2,
|
|
4817
5639
|
zOffset = layer.tooltip.zOffset,
|
|
4818
|
-
delay
|
|
4819
|
-
|
|
4820
|
-
|
|
5640
|
+
delay
|
|
5641
|
+
} = _c2, restProps = __objRest$g(_c2, [
|
|
5642
|
+
"animate",
|
|
5643
|
+
"arrow",
|
|
5644
|
+
"boundaryElement",
|
|
5645
|
+
"children",
|
|
5646
|
+
"content",
|
|
5647
|
+
"disabled",
|
|
5648
|
+
"fallbackPlacements",
|
|
5649
|
+
"padding",
|
|
5650
|
+
"placement",
|
|
5651
|
+
"portal",
|
|
5652
|
+
"radius",
|
|
5653
|
+
"scheme",
|
|
5654
|
+
"shadow",
|
|
5655
|
+
"zOffset",
|
|
5656
|
+
"delay"
|
|
5657
|
+
]), animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = react.useRef(null), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = react.useState(0);
|
|
4821
5658
|
react.useImperativeHandle(forwardedRef, () => ref.current);
|
|
4822
|
-
const portal = usePortal(), portalElement = typeof portalProp == "string" ? portal.elements
|
|
5659
|
+
const portal = usePortal(), portalElement = typeof portalProp == "string" ? ((_d = portal.elements) == null ? void 0 : _d[portalProp]) || null : portal.element, middleware = react.useMemo(() => {
|
|
4823
5660
|
const ret = [];
|
|
4824
5661
|
return ret.push(reactDom$1.flip({
|
|
4825
5662
|
boundary: boundaryElement || void 0,
|
|
@@ -4846,7 +5683,7 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
4846
5683
|
middleware,
|
|
4847
5684
|
placement: placementProp,
|
|
4848
5685
|
whileElementsMounted: reactDom$1.autoUpdate
|
|
4849
|
-
}), arrowX = middlewareData.arrow
|
|
5686
|
+
}), 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 = react.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 = react.useCallback((open, immediate) => {
|
|
4850
5687
|
if (isInsideGroup)
|
|
4851
5688
|
if (open) {
|
|
4852
5689
|
const groupedOpenDelay = immediate ? 0 : openDelay;
|
|
@@ -4858,18 +5695,24 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
4858
5695
|
else
|
|
4859
5696
|
setIsOpen(open, immediate ? 0 : open ? openDelay : closeDelay);
|
|
4860
5697
|
}, [isInsideGroup, delayGroupContext, openDelay, tooltipId, closeDelay, setIsOpen]), handleBlur = react.useCallback((e) => {
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
handleIsOpenChange(!1, !0), childProp
|
|
4866
|
-
}, [childProp
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
handleIsOpenChange(!
|
|
4872
|
-
}, [childProp
|
|
5698
|
+
var _a2, _b2;
|
|
5699
|
+
handleIsOpenChange(!1), (_b2 = (_a2 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a2.onBlur) == null || _b2.call(_a2, e);
|
|
5700
|
+
}, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]), handleClick = react.useCallback((e_0) => {
|
|
5701
|
+
var _a2, _b2;
|
|
5702
|
+
handleIsOpenChange(!1, !0), (_b2 = childProp == null ? void 0 : (_a2 = childProp.props).onClick) == null || _b2.call(_a2, e_0);
|
|
5703
|
+
}, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]), handleContextMenu = react.useCallback((e_1) => {
|
|
5704
|
+
var _a2, _b2;
|
|
5705
|
+
handleIsOpenChange(!1, !0), (_b2 = childProp == null ? void 0 : (_a2 = childProp.props).onContextMenu) == null || _b2.call(_a2, e_1);
|
|
5706
|
+
}, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]), handleFocus = react.useCallback((e_2) => {
|
|
5707
|
+
var _a2, _b2;
|
|
5708
|
+
handleIsOpenChange(!0), (_b2 = (_a2 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a2.onFocus) == null || _b2.call(_a2, e_2);
|
|
5709
|
+
}, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]), handleMouseEnter = react.useCallback((e_3) => {
|
|
5710
|
+
var _a2, _b2;
|
|
5711
|
+
handleIsOpenChange(!0), (_b2 = (_a2 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a2.onMouseEnter) == null || _b2.call(_a2, e_3);
|
|
5712
|
+
}, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]), handleMouseLeave = react.useCallback((e_4) => {
|
|
5713
|
+
var _a2, _b2;
|
|
5714
|
+
handleIsOpenChange(!1), (_b2 = (_a2 = childProp == null ? void 0 : childProp.props) == null ? void 0 : _a2.onMouseLeave) == null || _b2.call(_a2, e_4);
|
|
5715
|
+
}, [childProp == null ? void 0 : childProp.props, handleIsOpenChange]);
|
|
4873
5716
|
useCloseOnMouseLeave({
|
|
4874
5717
|
handleIsOpenChange,
|
|
4875
5718
|
referenceElement,
|
|
@@ -4887,7 +5730,7 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
4887
5730
|
window.removeEventListener("keydown", handleWindowKeyDown);
|
|
4888
5731
|
};
|
|
4889
5732
|
}, [handleIsOpenChange, showTooltip]), react.useLayoutEffect(() => {
|
|
4890
|
-
const availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [], portalElement
|
|
5733
|
+
const availableWidths = [...boundaryElement ? [boundaryElement.offsetWidth] : [], (portalElement == null ? void 0 : portalElement.offsetWidth) || document.body.offsetWidth];
|
|
4891
5734
|
setTooltipMaxWidth(Math.min(...availableWidths) - DEFAULT_TOOLTIP_PADDING * 2);
|
|
4892
5735
|
}, [boundaryElement, portalElement]);
|
|
4893
5736
|
const setArrow = react.useCallback((arrowEl) => {
|
|
@@ -4895,7 +5738,7 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
4895
5738
|
}, [update]), setFloating = react.useCallback((node) => {
|
|
4896
5739
|
ref.current = node, refs.setFloating(node);
|
|
4897
5740
|
}, [refs]), childRef = react.useRef(null);
|
|
4898
|
-
react.useImperativeHandle(childProp
|
|
5741
|
+
react.useImperativeHandle(childProp == null ? void 0 : childProp.ref, () => childRef.current);
|
|
4899
5742
|
const child = react.useMemo(() => childProp ? react.cloneElement(childProp, {
|
|
4900
5743
|
onBlur: handleBlur,
|
|
4901
5744
|
onFocus: handleFocus,
|
|
@@ -4910,10 +5753,9 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
4910
5753
|
return setReferenceElement(childRef.current), () => setReferenceElement(null);
|
|
4911
5754
|
}, [child]), !child) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
4912
5755
|
if (disabled) return child;
|
|
4913
|
-
const tooltip = /* @__PURE__ */ jsxRuntime.jsx(Root$a, { "data-ui": "Tooltip",
|
|
4914
|
-
...floatingStyles,
|
|
5756
|
+
const tooltip = /* @__PURE__ */ jsxRuntime.jsx(Root$a, __spreadProps$j(__spreadValues$j({ "data-ui": "Tooltip" }, restProps), { ref: setFloating, style: __spreadProps$j(__spreadValues$j({}, floatingStyles), {
|
|
4915
5757
|
maxWidth: tooltipMaxWidth > 0 ? `${tooltipMaxWidth}px` : void 0
|
|
4916
|
-
}, zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipCard, {
|
|
5758
|
+
}), zOffset, children: /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portalProp == "string" ? portalProp : void 0, children: tooltip }) : tooltip);
|
|
4917
5759
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4918
5760
|
animate ? /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children }) : children,
|
|
4919
5761
|
child
|
|
@@ -4983,47 +5825,63 @@ function AutocompleteOption(props) {
|
|
|
4983
5825
|
let t2;
|
|
4984
5826
|
return $[5] !== children || $[6] !== handleClick || $[7] !== handleKeyDown || $[8] !== id || $[9] !== selected ? (t2 = /* @__PURE__ */ jsxRuntime.jsx("li", { "aria-selected": selected, "data-ui": "AutocompleteOption", id, role: "option", onClick: handleClick, onKeyDown: handleKeyDown, children }), $[5] = children, $[6] = handleClick, $[7] = handleKeyDown, $[8] = id, $[9] = selected, $[10] = t2) : t2 = $[10], t2;
|
|
4985
5827
|
}
|
|
5828
|
+
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) => {
|
|
5829
|
+
for (var prop in b || (b = {}))
|
|
5830
|
+
__hasOwnProp$i.call(b, prop) && __defNormalProp$i(a, prop, b[prop]);
|
|
5831
|
+
if (__getOwnPropSymbols$i)
|
|
5832
|
+
for (var prop of __getOwnPropSymbols$i(b))
|
|
5833
|
+
__propIsEnum$i.call(b, prop) && __defNormalProp$i(a, prop, b[prop]);
|
|
5834
|
+
return a;
|
|
5835
|
+
}, __spreadProps$i = (a, b) => __defProps$i(a, __getOwnPropDescs$i(b));
|
|
4986
5836
|
function autocompleteReducer(state, msg2) {
|
|
4987
|
-
return msg2.type === "input/change" ? {
|
|
4988
|
-
...state,
|
|
5837
|
+
return msg2.type === "input/change" ? __spreadProps$i(__spreadValues$i({}, state), {
|
|
4989
5838
|
activeValue: null,
|
|
4990
5839
|
focused: !0,
|
|
4991
5840
|
query: msg2.query
|
|
4992
|
-
} : msg2.type === "input/focus" ? {
|
|
4993
|
-
...state,
|
|
5841
|
+
}) : msg2.type === "input/focus" ? __spreadProps$i(__spreadValues$i({}, state), {
|
|
4994
5842
|
focused: !0
|
|
4995
|
-
} : msg2.type === "root/blur" ? {
|
|
4996
|
-
...state,
|
|
5843
|
+
}) : msg2.type === "root/blur" ? __spreadProps$i(__spreadValues$i({}, state), {
|
|
4997
5844
|
focused: !1,
|
|
4998
5845
|
query: null
|
|
4999
|
-
} : msg2.type === "root/clear" ? {
|
|
5000
|
-
...state,
|
|
5846
|
+
}) : msg2.type === "root/clear" ? __spreadProps$i(__spreadValues$i({}, state), {
|
|
5001
5847
|
activeValue: null,
|
|
5002
5848
|
query: null,
|
|
5003
5849
|
value: null
|
|
5004
|
-
} : msg2.type === "root/escape" ? {
|
|
5005
|
-
...state,
|
|
5850
|
+
}) : msg2.type === "root/escape" ? __spreadProps$i(__spreadValues$i({}, state), {
|
|
5006
5851
|
focused: !1,
|
|
5007
5852
|
query: null
|
|
5008
|
-
} : msg2.type === "root/open" ? {
|
|
5009
|
-
...state,
|
|
5853
|
+
}) : msg2.type === "root/open" ? __spreadProps$i(__spreadValues$i({}, state), {
|
|
5010
5854
|
query: state.query || msg2.query
|
|
5011
|
-
} : msg2.type === "root/setActiveValue" ? {
|
|
5012
|
-
...state,
|
|
5855
|
+
}) : msg2.type === "root/setActiveValue" ? __spreadProps$i(__spreadValues$i({}, state), {
|
|
5013
5856
|
activeValue: msg2.value,
|
|
5014
5857
|
listFocused: msg2.listFocused || state.listFocused
|
|
5015
|
-
} : msg2.type === "root/setListFocused" ? {
|
|
5016
|
-
...state,
|
|
5858
|
+
}) : msg2.type === "root/setListFocused" ? __spreadProps$i(__spreadValues$i({}, state), {
|
|
5017
5859
|
listFocused: msg2.listFocused
|
|
5018
|
-
} : msg2.type === "value/change" ? {
|
|
5019
|
-
...state,
|
|
5860
|
+
}) : msg2.type === "value/change" ? __spreadProps$i(__spreadValues$i({}, state), {
|
|
5020
5861
|
activeValue: msg2.value,
|
|
5021
5862
|
query: null,
|
|
5022
5863
|
value: msg2.value
|
|
5023
|
-
} : state;
|
|
5024
|
-
}
|
|
5025
|
-
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"]
|
|
5026
|
-
|
|
5864
|
+
}) : state;
|
|
5865
|
+
}
|
|
5866
|
+
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"];
|
|
5867
|
+
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) => {
|
|
5868
|
+
for (var prop in b || (b = {}))
|
|
5869
|
+
__hasOwnProp$h.call(b, prop) && __defNormalProp$h(a, prop, b[prop]);
|
|
5870
|
+
if (__getOwnPropSymbols$h)
|
|
5871
|
+
for (var prop of __getOwnPropSymbols$h(b))
|
|
5872
|
+
__propIsEnum$h.call(b, prop) && __defNormalProp$h(a, prop, b[prop]);
|
|
5873
|
+
return a;
|
|
5874
|
+
}, __spreadProps$h = (a, b) => __defProps$h(a, __getOwnPropDescs$h(b)), __objRest$f = (source, exclude) => {
|
|
5875
|
+
var target = {};
|
|
5876
|
+
for (var prop in source)
|
|
5877
|
+
__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
5878
|
+
if (source != null && __getOwnPropSymbols$h)
|
|
5879
|
+
for (var prop of __getOwnPropSymbols$h(source))
|
|
5880
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop) && (target[prop] = source[prop]);
|
|
5881
|
+
return target;
|
|
5882
|
+
};
|
|
5883
|
+
const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, DEFAULT_FILTER_OPTION = (query, option) => option.value.toLowerCase().indexOf(query.toLowerCase()) > -1, InnerAutocomplete = react.forwardRef(function(props, forwardedRef) {
|
|
5884
|
+
const _a = props, {
|
|
5027
5885
|
border: border2 = !0,
|
|
5028
5886
|
customValidity,
|
|
5029
5887
|
disabled,
|
|
@@ -5051,9 +5909,37 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5051
5909
|
renderPopover,
|
|
5052
5910
|
renderValue = DEFAULT_RENDER_VALUE,
|
|
5053
5911
|
suffix,
|
|
5054
|
-
value: valueProp
|
|
5055
|
-
|
|
5056
|
-
|
|
5912
|
+
value: valueProp
|
|
5913
|
+
} = _a, restProps = __objRest$f(_a, [
|
|
5914
|
+
"border",
|
|
5915
|
+
"customValidity",
|
|
5916
|
+
"disabled",
|
|
5917
|
+
"filterOption",
|
|
5918
|
+
"fontSize",
|
|
5919
|
+
"icon",
|
|
5920
|
+
"id",
|
|
5921
|
+
"listBox",
|
|
5922
|
+
"loading",
|
|
5923
|
+
"onBlur",
|
|
5924
|
+
"onChange",
|
|
5925
|
+
"onFocus",
|
|
5926
|
+
"onQueryChange",
|
|
5927
|
+
"onSelect",
|
|
5928
|
+
"openButton",
|
|
5929
|
+
"openOnFocus",
|
|
5930
|
+
"options",
|
|
5931
|
+
"padding",
|
|
5932
|
+
"popover",
|
|
5933
|
+
"prefix",
|
|
5934
|
+
"radius",
|
|
5935
|
+
"readOnly",
|
|
5936
|
+
"relatedElements",
|
|
5937
|
+
"renderOption",
|
|
5938
|
+
"renderPopover",
|
|
5939
|
+
"renderValue",
|
|
5940
|
+
"suffix",
|
|
5941
|
+
"value"
|
|
5942
|
+
]), [state, dispatch] = react.useReducer(autocompleteReducer, {
|
|
5057
5943
|
activeValue: valueProp || null,
|
|
5058
5944
|
focused: !1,
|
|
5059
5945
|
listFocused: !1,
|
|
@@ -5087,17 +5973,19 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5087
5973
|
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), onBlur && onBlur(event));
|
|
5088
5974
|
}, 0);
|
|
5089
5975
|
}, [onBlur, onQueryChange, relatedElements]), handleRootFocus = react.useCallback((event_0) => {
|
|
5090
|
-
const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = listBoxElement
|
|
5976
|
+
const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = (listBoxElement == null ? void 0 : listBoxElement.contains(focusedElement)) || !1;
|
|
5091
5977
|
listFocused_0 !== listFocusedRef.current && (listFocusedRef.current = listFocused_0, dispatch({
|
|
5092
5978
|
type: "root/setListFocused",
|
|
5093
5979
|
listFocused: listFocused_0
|
|
5094
5980
|
}));
|
|
5095
5981
|
}, []), handleOptionSelect = react.useCallback((v) => {
|
|
5982
|
+
var _a2;
|
|
5096
5983
|
dispatch({
|
|
5097
5984
|
type: "value/change",
|
|
5098
5985
|
value: v
|
|
5099
|
-
}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), inputElementRef.current
|
|
5986
|
+
}), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), (_a2 = inputElementRef.current) == null || _a2.focus();
|
|
5100
5987
|
}, [onChange, onSelect, onQueryChange]), handleRootKeyDown = react.useCallback((event_1) => {
|
|
5988
|
+
var _a2, _b;
|
|
5101
5989
|
if (event_1.key === "ArrowDown") {
|
|
5102
5990
|
if (event_1.preventDefault(), !filteredOptionsLen) return;
|
|
5103
5991
|
const activeOption = filteredOptions.find((o_0) => o_0.value === activeValue), activeIndex = activeOption ? filteredOptions.indexOf(activeOption) : -1, nextActiveOption = filteredOptions[(activeIndex + 1) % filteredOptionsLen];
|
|
@@ -5121,12 +6009,12 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5121
6009
|
if (event_1.key === "Escape") {
|
|
5122
6010
|
dispatch({
|
|
5123
6011
|
type: "root/escape"
|
|
5124
|
-
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), inputElementRef.current
|
|
6012
|
+
}), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), (_a2 = inputElementRef.current) == null || _a2.focus();
|
|
5125
6013
|
return;
|
|
5126
6014
|
}
|
|
5127
6015
|
const target = event_1.target, listEl = listBoxElementRef.current;
|
|
5128
|
-
if ((listEl === target || listEl
|
|
5129
|
-
inputElementRef.current
|
|
6016
|
+
if ((listEl === target || listEl != null && listEl.contains(target)) && !AUTOCOMPLETE_LISTBOX_IGNORE_KEYS.includes(event_1.key)) {
|
|
6017
|
+
(_b = inputElementRef.current) == null || _b.focus();
|
|
5130
6018
|
return;
|
|
5131
6019
|
}
|
|
5132
6020
|
}, [activeValue, filteredOptions, filteredOptionsLen, onQueryChange]), handleInputChange = react.useCallback((event_2) => {
|
|
@@ -5149,9 +6037,10 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5149
6037
|
}, []), handlePopoverMouseLeave = react.useCallback(() => {
|
|
5150
6038
|
popoverMouseWithinRef.current = !1;
|
|
5151
6039
|
}, []), handleClearButtonClick = react.useCallback(() => {
|
|
6040
|
+
var _a2;
|
|
5152
6041
|
dispatch({
|
|
5153
6042
|
type: "root/clear"
|
|
5154
|
-
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null), inputElementRef.current
|
|
6043
|
+
}), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null), (_a2 = inputElementRef.current) == null || _a2.focus();
|
|
5155
6044
|
}, [onChange, onQueryChange]), handleClearButtonFocus = react.useCallback(() => {
|
|
5156
6045
|
dispatch({
|
|
5157
6046
|
type: "input/focus"
|
|
@@ -5194,17 +6083,21 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5194
6083
|
onFocus: handleClearButtonFocus
|
|
5195
6084
|
};
|
|
5196
6085
|
}, [disabled, handleClearButtonFocus, loading, value]), openButtonBoxPadding = react.useMemo(() => padding.map((v_0) => v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2), [padding]), openButtonPadding = react.useMemo(() => padding.map((v_1) => Math.max(v_1 - 1, 0)), [padding]), openButtonProps = react.useMemo(() => typeof openButton == "object" ? openButton : EMPTY_RECORD, [openButton]), handleOpenClick = react.useCallback((event_4) => {
|
|
5197
|
-
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() =>
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
6086
|
+
dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => {
|
|
6087
|
+
var _a2;
|
|
6088
|
+
return (_a2 = inputElementRef.current) == null ? void 0 : _a2.focus();
|
|
6089
|
+
});
|
|
6090
|
+
}, [openButtonProps, dispatchOpen]), openButtonNode = react.useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsxRuntime.jsx(Button, __spreadProps$h(__spreadValues$h({ "aria-label": "Open", disabled: expanded, fontSize: fontSize2, icon: icons.ChevronDownIcon, mode: "bleed", padding: openButtonPadding }, openButtonProps), { onClick: handleOpenClick })) }) : void 0, [disabled, expanded, fontSize2, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]), inputValue = react.useMemo(() => query === null ? value !== null ? renderValue(value, currentOption) : "" : query, [currentOption, query, renderValue, value]), input = /* @__PURE__ */ jsxRuntime.jsx(TextInput, __spreadProps$h(__spreadValues$h({}, restProps), { "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", border: border2, clearButton, customValidity, disabled, fontSize: fontSize2, icon, iconRight: loading && AnimatedSpinnerIcon, id, inputMode: "search", onChange: handleInputChange, onClear: handleClearButtonClick, onFocus: handleInputFocus, padding, prefix, radius, readOnly, ref: inputElementRef, role: "combobox", spellCheck: !1, suffix: suffix || openButtonNode, value: inputValue })), handleListBoxKeyDown = react.useCallback((event_5) => {
|
|
6091
|
+
var _a2;
|
|
6092
|
+
event_5.key === "Tab" && listFocused && ((_a2 = inputElementRef.current) == null || _a2.focus());
|
|
6093
|
+
}, [listFocused]), content = react.useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ListBox, __spreadProps$h(__spreadValues$h({ "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1 }, listBox), { tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: filteredOptions.map((option_0) => {
|
|
5201
6094
|
const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
|
|
5202
6095
|
return /* @__PURE__ */ jsxRuntime.jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: react.cloneElement(renderOption(option_0), {
|
|
5203
6096
|
disabled: loading,
|
|
5204
6097
|
selected: active,
|
|
5205
6098
|
tabIndex: listFocused && active ? 0 : -1
|
|
5206
6099
|
}) }, option_0.value);
|
|
5207
|
-
}) }) }), [activeValue, currentOption, filteredOptions, handleOptionSelect, handleListBoxKeyDown, id, listBox, listBoxId, listFocused, loading, renderOption]), results = react.useMemo(() => renderPopover ? renderPopover({
|
|
6100
|
+
}) }) })), [activeValue, currentOption, filteredOptions, handleOptionSelect, handleListBoxKeyDown, id, listBox, listBoxId, listFocused, loading, renderOption]), results = react.useMemo(() => renderPopover ? renderPopover({
|
|
5208
6101
|
content,
|
|
5209
6102
|
hidden: !expanded,
|
|
5210
6103
|
inputElement: inputElementRef.current,
|
|
@@ -5212,7 +6105,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5212
6105
|
onMouseLeave: handlePopoverMouseLeave
|
|
5213
6106
|
}, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
5214
6107
|
Popover,
|
|
5215
|
-
{
|
|
6108
|
+
__spreadValues$h({
|
|
5216
6109
|
arrow: !1,
|
|
5217
6110
|
constrainSize: !0,
|
|
5218
6111
|
content,
|
|
@@ -5226,9 +6119,8 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
|
|
|
5226
6119
|
portal: !0,
|
|
5227
6120
|
radius,
|
|
5228
6121
|
ref: resultsPopoverElementRef,
|
|
5229
|
-
referenceElement: inputElementRef.current
|
|
5230
|
-
|
|
5231
|
-
}
|
|
6122
|
+
referenceElement: inputElementRef.current
|
|
6123
|
+
}, popover)
|
|
5232
6124
|
), [content, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, radius, renderPopover]);
|
|
5233
6125
|
return /* @__PURE__ */ jsxRuntime.jsxs(Root$9, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
|
|
5234
6126
|
input,
|
|
@@ -5247,14 +6139,35 @@ const Autocomplete = InnerAutocomplete, Root$8 = styledComponents.styled.ol`
|
|
|
5247
6139
|
`, ExpandButton = styledComponents.styled(Button)`
|
|
5248
6140
|
appearance: none;
|
|
5249
6141
|
margin: -4px;
|
|
5250
|
-
|
|
5251
|
-
|
|
6142
|
+
`;
|
|
6143
|
+
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) => {
|
|
6144
|
+
for (var prop in b || (b = {}))
|
|
6145
|
+
__hasOwnProp$g.call(b, prop) && __defNormalProp$g(a, prop, b[prop]);
|
|
6146
|
+
if (__getOwnPropSymbols$g)
|
|
6147
|
+
for (var prop of __getOwnPropSymbols$g(b))
|
|
6148
|
+
__propIsEnum$g.call(b, prop) && __defNormalProp$g(a, prop, b[prop]);
|
|
6149
|
+
return a;
|
|
6150
|
+
}, __spreadProps$g = (a, b) => __defProps$g(a, __getOwnPropDescs$g(b)), __objRest$e = (source, exclude) => {
|
|
6151
|
+
var target = {};
|
|
6152
|
+
for (var prop in source)
|
|
6153
|
+
__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6154
|
+
if (source != null && __getOwnPropSymbols$g)
|
|
6155
|
+
for (var prop of __getOwnPropSymbols$g(source))
|
|
6156
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop) && (target[prop] = source[prop]);
|
|
6157
|
+
return target;
|
|
6158
|
+
};
|
|
6159
|
+
const Breadcrumbs = react.forwardRef(function(props, ref) {
|
|
6160
|
+
const _a = props, {
|
|
5252
6161
|
children,
|
|
5253
6162
|
maxLength,
|
|
5254
6163
|
separator,
|
|
5255
|
-
space: spaceRaw = 2
|
|
5256
|
-
|
|
5257
|
-
|
|
6164
|
+
space: spaceRaw = 2
|
|
6165
|
+
} = _a, restProps = __objRest$e(_a, [
|
|
6166
|
+
"children",
|
|
6167
|
+
"maxLength",
|
|
6168
|
+
"separator",
|
|
6169
|
+
"space"
|
|
6170
|
+
]), space = useArrayProp(spaceRaw), [open, setOpen] = react.useState(!1), expandElementRef = react.useRef(null), popoverElementRef = react.useRef(null), collapse = react.useCallback(() => setOpen(!1), []), expand = react.useCallback(() => setOpen(!0), []);
|
|
5258
6171
|
useClickOutsideEvent(collapse, () => [expandElementRef.current, popoverElementRef.current]);
|
|
5259
6172
|
const rawItems = react.useMemo(() => react.Children.toArray(children).filter(react.isValidElement), [children]), items = react.useMemo(() => {
|
|
5260
6173
|
const len = rawItems.length;
|
|
@@ -5264,10 +6177,10 @@ const Autocomplete = InnerAutocomplete, Root$8 = styledComponents.styled.ol`
|
|
|
5264
6177
|
}
|
|
5265
6178
|
return rawItems;
|
|
5266
6179
|
}, [collapse, expand, maxLength, open, rawItems, space]);
|
|
5267
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Root$8, { "data-ui": "Breadcrumbs",
|
|
6180
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root$8, __spreadProps$g(__spreadValues$g({ "data-ui": "Breadcrumbs" }, restProps), { ref, children: items.map((item, itemIndex) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
|
|
5268
6181
|
itemIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": !0, as: "li", paddingX: space, children: separator || /* @__PURE__ */ jsxRuntime.jsx(Text, { muted: !0, children: "/" }) }),
|
|
5269
6182
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { as: "li", children: item })
|
|
5270
|
-
] }, itemIndex)) });
|
|
6183
|
+
] }, itemIndex)) }));
|
|
5271
6184
|
});
|
|
5272
6185
|
Breadcrumbs.displayName = "ForwardRef(Breadcrumbs)";
|
|
5273
6186
|
function dialogStyle({
|
|
@@ -5334,6 +6247,22 @@ const DialogContext = createGlobalScopedContext("@sanity/ui/context/dialog", {
|
|
|
5334
6247
|
function useDialog() {
|
|
5335
6248
|
return react.useContext(DialogContext);
|
|
5336
6249
|
}
|
|
6250
|
+
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) => {
|
|
6251
|
+
for (var prop in b || (b = {}))
|
|
6252
|
+
__hasOwnProp$f.call(b, prop) && __defNormalProp$f(a, prop, b[prop]);
|
|
6253
|
+
if (__getOwnPropSymbols$f)
|
|
6254
|
+
for (var prop of __getOwnPropSymbols$f(b))
|
|
6255
|
+
__propIsEnum$f.call(b, prop) && __defNormalProp$f(a, prop, b[prop]);
|
|
6256
|
+
return a;
|
|
6257
|
+
}, __spreadProps$f = (a, b) => __defProps$f(a, __getOwnPropDescs$f(b)), __objRest$d = (source, exclude) => {
|
|
6258
|
+
var target = {};
|
|
6259
|
+
for (var prop in source)
|
|
6260
|
+
__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6261
|
+
if (source != null && __getOwnPropSymbols$f)
|
|
6262
|
+
for (var prop of __getOwnPropSymbols$f(source))
|
|
6263
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop) && (target[prop] = source[prop]);
|
|
6264
|
+
return target;
|
|
6265
|
+
};
|
|
5337
6266
|
function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
5338
6267
|
return !boundaryElement || !portalElement ? !0 : containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
|
|
5339
6268
|
}
|
|
@@ -5371,6 +6300,7 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5371
6300
|
position: relative;
|
|
5372
6301
|
z-index: 3;
|
|
5373
6302
|
`, DialogCard = react.forwardRef(function(props, forwardedRef) {
|
|
6303
|
+
var _a;
|
|
5374
6304
|
const $ = reactCompilerRuntime.c(38), {
|
|
5375
6305
|
__unstable_autoFocus: autoFocus,
|
|
5376
6306
|
__unstable_hideCloseButton: hideCloseButton,
|
|
@@ -5386,7 +6316,7 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5386
6316
|
scheme,
|
|
5387
6317
|
shadow: shadowProp,
|
|
5388
6318
|
width: widthProp
|
|
5389
|
-
} = props, portal = usePortal(), portalElement = portalProp ? portal.elements
|
|
6319
|
+
} = 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 = react.useRef(null), contentRef = react.useRef(null), layer = useLayer(), {
|
|
5390
6320
|
isTopLayer
|
|
5391
6321
|
} = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton;
|
|
5392
6322
|
let t0;
|
|
@@ -5433,11 +6363,12 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5433
6363
|
});
|
|
5434
6364
|
DialogCard.displayName = "ForwardRef(DialogCard)";
|
|
5435
6365
|
const Dialog = react.forwardRef(function(props, ref) {
|
|
6366
|
+
var _a, _b;
|
|
5436
6367
|
const $ = reactCompilerRuntime.c(60), dialog = useDialog(), {
|
|
5437
6368
|
layer
|
|
5438
6369
|
} = useTheme_v2();
|
|
5439
6370
|
let _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;
|
|
5440
|
-
$[0] !== props ? ({
|
|
6371
|
+
$[0] !== props ? (_a = props, {
|
|
5441
6372
|
__unstable_autoFocus: t0,
|
|
5442
6373
|
__unstable_hideCloseButton: t1,
|
|
5443
6374
|
cardRadius: t2,
|
|
@@ -5457,13 +6388,33 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
5457
6388
|
scheme,
|
|
5458
6389
|
width: t5,
|
|
5459
6390
|
zOffset: _zOffsetProp,
|
|
5460
|
-
animate: t6
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
6391
|
+
animate: t6
|
|
6392
|
+
} = _a, restProps = __objRest$d(_a, [
|
|
6393
|
+
"__unstable_autoFocus",
|
|
6394
|
+
"__unstable_hideCloseButton",
|
|
6395
|
+
"cardRadius",
|
|
6396
|
+
"cardShadow",
|
|
6397
|
+
"children",
|
|
6398
|
+
"contentRef",
|
|
6399
|
+
"footer",
|
|
6400
|
+
"header",
|
|
6401
|
+
"id",
|
|
6402
|
+
"onActivate",
|
|
6403
|
+
"onClickOutside",
|
|
6404
|
+
"onClose",
|
|
6405
|
+
"onFocus",
|
|
6406
|
+
"padding",
|
|
6407
|
+
"portal",
|
|
6408
|
+
"position",
|
|
6409
|
+
"scheme",
|
|
6410
|
+
"width",
|
|
6411
|
+
"zOffset",
|
|
6412
|
+
"animate"
|
|
6413
|
+
]), $[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]);
|
|
6414
|
+
const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : t1, cardRadiusProp = t2 === void 0 ? 4 : t2, cardShadow = t3 === void 0 ? 3 : t3, paddingProp = t4 === void 0 ? 3 : t4, widthProp = t5 === void 0 ? 0 : t5, _animate = t6 === void 0 ? !1 : t6, positionProp = _positionProp != null ? _positionProp : dialog.position || "fixed", zOffsetProp = _zOffsetProp != null ? _zOffsetProp : dialog.zOffset || layer.dialog.zOffset, animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? ((_b = portal.elements) == null ? void 0 : _b[portalProp]) || null : portal.element, boundaryElement = useBoundaryElement().element, cardRadius = useArrayProp(cardRadiusProp), padding = useArrayProp(paddingProp), position = useArrayProp(positionProp), width = useArrayProp(widthProp), zOffset = useArrayProp(zOffsetProp), preDivRef = react.useRef(null), postDivRef = react.useRef(null), cardRef = react.useRef(null), focusedElementRef = react.useRef(null);
|
|
5464
6415
|
let t7;
|
|
5465
6416
|
$[22] !== onFocus ? (t7 = (event) => {
|
|
5466
|
-
onFocus
|
|
6417
|
+
onFocus == null || onFocus(event);
|
|
5467
6418
|
const target = event.target, cardElement = cardRef.current;
|
|
5468
6419
|
if (cardElement && target === preDivRef.current) {
|
|
5469
6420
|
focusLastDescendant(cardElement);
|
|
@@ -5499,11 +6450,11 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
5499
6450
|
let t11;
|
|
5500
6451
|
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: postDivRef, tabIndex: 0 }), $[43] = t11) : t11 = $[43];
|
|
5501
6452
|
let t12;
|
|
5502
|
-
$[44] !== animate || $[45] !== handleFocus || $[46] !== handleRootClick || $[47] !== id || $[48] !== labelId || $[49] !== onActivate || $[50] !== padding || $[51] !== position || $[52] !== ref || $[53] !== restProps || $[54] !== t10 || $[55] !== zOffset ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs(Root$7, {
|
|
6453
|
+
$[44] !== animate || $[45] !== handleFocus || $[46] !== handleRootClick || $[47] !== id || $[48] !== labelId || $[49] !== onActivate || $[50] !== padding || $[51] !== position || $[52] !== ref || $[53] !== restProps || $[54] !== t10 || $[55] !== zOffset ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs(Root$7, __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: [
|
|
5503
6454
|
t9,
|
|
5504
6455
|
t10,
|
|
5505
6456
|
t11
|
|
5506
|
-
] }), $[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];
|
|
6457
|
+
] })), $[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];
|
|
5507
6458
|
let t13;
|
|
5508
6459
|
return $[57] !== portalProp || $[58] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: portalProp, children: t12 }), $[57] = portalProp, $[58] = t12, $[59] = t13) : t13 = $[59], t13;
|
|
5509
6460
|
});
|
|
@@ -5525,6 +6476,22 @@ function DialogProvider(props) {
|
|
|
5525
6476
|
return $[3] !== children || $[4] !== contextValue ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(DialogContext.Provider, { value: contextValue, children }), $[3] = children, $[4] = contextValue, $[5] = t2) : t2 = $[5], t2;
|
|
5526
6477
|
}
|
|
5527
6478
|
DialogProvider.displayName = "DialogProvider";
|
|
6479
|
+
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) => {
|
|
6480
|
+
for (var prop in b || (b = {}))
|
|
6481
|
+
__hasOwnProp$e.call(b, prop) && __defNormalProp$e(a, prop, b[prop]);
|
|
6482
|
+
if (__getOwnPropSymbols$e)
|
|
6483
|
+
for (var prop of __getOwnPropSymbols$e(b))
|
|
6484
|
+
__propIsEnum$e.call(b, prop) && __defNormalProp$e(a, prop, b[prop]);
|
|
6485
|
+
return a;
|
|
6486
|
+
}, __spreadProps$e = (a, b) => __defProps$e(a, __getOwnPropDescs$e(b)), __objRest$c = (source, exclude) => {
|
|
6487
|
+
var target = {};
|
|
6488
|
+
for (var prop in source)
|
|
6489
|
+
__hasOwnProp$e.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6490
|
+
if (source != null && __getOwnPropSymbols$e)
|
|
6491
|
+
for (var prop of __getOwnPropSymbols$e(source))
|
|
6492
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$e.call(source, prop) && (target[prop] = source[prop]);
|
|
6493
|
+
return target;
|
|
6494
|
+
};
|
|
5528
6495
|
const Root$6 = styledComponents.styled.kbd`
|
|
5529
6496
|
font: inherit;
|
|
5530
6497
|
padding: 1px;
|
|
@@ -5537,16 +6504,22 @@ const Root$6 = styledComponents.styled.kbd`
|
|
|
5537
6504
|
display: block;
|
|
5538
6505
|
}
|
|
5539
6506
|
`, Hotkeys = react.forwardRef(function(props, ref) {
|
|
6507
|
+
var _a;
|
|
5540
6508
|
const $ = reactCompilerRuntime.c(24);
|
|
5541
6509
|
let fontSize2, keys, padding, radius, restProps, t0;
|
|
5542
|
-
$[0] !== props ? ({
|
|
6510
|
+
$[0] !== props ? (_a = props, {
|
|
5543
6511
|
fontSize: fontSize2,
|
|
5544
6512
|
keys,
|
|
5545
6513
|
padding,
|
|
5546
6514
|
radius,
|
|
5547
|
-
space: t0
|
|
5548
|
-
|
|
5549
|
-
|
|
6515
|
+
space: t0
|
|
6516
|
+
} = _a, restProps = __objRest$c(_a, [
|
|
6517
|
+
"fontSize",
|
|
6518
|
+
"keys",
|
|
6519
|
+
"padding",
|
|
6520
|
+
"radius",
|
|
6521
|
+
"space"
|
|
6522
|
+
]), $[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]);
|
|
5550
6523
|
const space = useArrayProp(t0 === void 0 ? 0.5 : t0);
|
|
5551
6524
|
if (!keys || keys.length === 0) {
|
|
5552
6525
|
let t12;
|
|
@@ -5561,7 +6534,7 @@ const Root$6 = styledComponents.styled.kbd`
|
|
|
5561
6534
|
let t2;
|
|
5562
6535
|
$[17] !== space || $[18] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Inline, { as: "span", space, children: t1 }), $[17] = space, $[18] = t1, $[19] = t2) : t2 = $[19];
|
|
5563
6536
|
let t3;
|
|
5564
|
-
return $[20] !== ref || $[21] !== restProps || $[22] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(Root$6, { "data-ui": "Hotkeys",
|
|
6537
|
+
return $[20] !== ref || $[21] !== restProps || $[22] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.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;
|
|
5565
6538
|
});
|
|
5566
6539
|
Hotkeys.displayName = "ForwardRef(Hotkeys)";
|
|
5567
6540
|
const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
|
|
@@ -5668,7 +6641,8 @@ function useMenuController(props) {
|
|
|
5668
6641
|
const element_0 = event_0.currentTarget, currentIndex_3 = elementsRef.current.indexOf(element_0);
|
|
5669
6642
|
setActiveIndex(currentIndex_3);
|
|
5670
6643
|
}, [setActiveIndex]), handleItemMouseLeave = react.useCallback(() => {
|
|
5671
|
-
|
|
6644
|
+
var _a;
|
|
6645
|
+
setActiveIndex(-2), (_a = rootElementRef.current) == null || _a.focus();
|
|
5672
6646
|
}, [rootElementRef, setActiveIndex]);
|
|
5673
6647
|
return react.useEffect(() => {
|
|
5674
6648
|
if (!mounted) return;
|
|
@@ -5690,7 +6664,8 @@ function useMenuController(props) {
|
|
|
5690
6664
|
}
|
|
5691
6665
|
return;
|
|
5692
6666
|
}
|
|
5693
|
-
|
|
6667
|
+
const element_1 = elementsRef.current[activeIndex] || null;
|
|
6668
|
+
element_1 == null || element_1.focus();
|
|
5694
6669
|
});
|
|
5695
6670
|
return () => cancelAnimationFrame(rafId);
|
|
5696
6671
|
}, [activeIndex, mounted, setActiveIndex, shouldFocus]), {
|
|
@@ -5702,6 +6677,22 @@ function useMenuController(props) {
|
|
|
5702
6677
|
mount
|
|
5703
6678
|
};
|
|
5704
6679
|
}
|
|
6680
|
+
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) => {
|
|
6681
|
+
for (var prop in b || (b = {}))
|
|
6682
|
+
__hasOwnProp$d.call(b, prop) && __defNormalProp$d(a, prop, b[prop]);
|
|
6683
|
+
if (__getOwnPropSymbols$d)
|
|
6684
|
+
for (var prop of __getOwnPropSymbols$d(b))
|
|
6685
|
+
__propIsEnum$d.call(b, prop) && __defNormalProp$d(a, prop, b[prop]);
|
|
6686
|
+
return a;
|
|
6687
|
+
}, __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b)), __objRest$b = (source, exclude) => {
|
|
6688
|
+
var target = {};
|
|
6689
|
+
for (var prop in source)
|
|
6690
|
+
__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
6691
|
+
if (source != null && __getOwnPropSymbols$d)
|
|
6692
|
+
for (var prop of __getOwnPropSymbols$d(source))
|
|
6693
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop) && (target[prop] = source[prop]);
|
|
6694
|
+
return target;
|
|
6695
|
+
};
|
|
5705
6696
|
const Root$5 = styledComponents.styled(Box)`
|
|
5706
6697
|
outline: none;
|
|
5707
6698
|
overflow: auto;
|
|
@@ -5709,7 +6700,7 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
5709
6700
|
const $ = reactCompilerRuntime.c(50);
|
|
5710
6701
|
let _shouldFocus, children, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
|
|
5711
6702
|
if ($[0] !== props) {
|
|
5712
|
-
const {
|
|
6703
|
+
const _a = props, {
|
|
5713
6704
|
children: t22,
|
|
5714
6705
|
focusFirst,
|
|
5715
6706
|
focusLast,
|
|
@@ -5722,13 +6713,26 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
5722
6713
|
padding: t92,
|
|
5723
6714
|
registerElement: t102,
|
|
5724
6715
|
shouldFocus: t112,
|
|
5725
|
-
space: t122
|
|
5726
|
-
|
|
5727
|
-
|
|
6716
|
+
space: t122
|
|
6717
|
+
} = _a, t132 = __objRest$b(_a, [
|
|
6718
|
+
"children",
|
|
6719
|
+
"focusFirst",
|
|
6720
|
+
"focusLast",
|
|
6721
|
+
"onClickOutside",
|
|
6722
|
+
"onEscape",
|
|
6723
|
+
"onItemClick",
|
|
6724
|
+
"onItemSelect",
|
|
6725
|
+
"onKeyDown",
|
|
6726
|
+
"originElement",
|
|
6727
|
+
"padding",
|
|
6728
|
+
"registerElement",
|
|
6729
|
+
"shouldFocus",
|
|
6730
|
+
"space"
|
|
6731
|
+
]);
|
|
5728
6732
|
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;
|
|
5729
6733
|
} else
|
|
5730
6734
|
_shouldFocus = $[1], children = $[2], onClickOutside = $[3], onEscape = $[4], onItemClick = $[5], onItemSelect = $[6], onKeyDown = $[7], originElement = $[8], registerElement = $[9], restProps = $[10], t0 = $[11], t1 = $[12];
|
|
5731
|
-
const padding = t0 === void 0 ? 1 : t0, space = t1 === void 0 ? 1 : t1, shouldFocus = _shouldFocus
|
|
6735
|
+
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 = react.useRef(null);
|
|
5732
6736
|
let t2;
|
|
5733
6737
|
$[13] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[13] = t2) : t2 = $[13], react.useImperativeHandle(forwardedRef, t2);
|
|
5734
6738
|
const {
|
|
@@ -5783,12 +6787,21 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
5783
6787
|
let t11;
|
|
5784
6788
|
$[38] !== children || $[39] !== space ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { space, children }), $[38] = children, $[39] = space, $[40] = t11) : t11 = $[40];
|
|
5785
6789
|
let t12;
|
|
5786
|
-
$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t11 ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(Root$5, { "data-ui": "Menu",
|
|
6790
|
+
$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t11 ? (t12 = /* @__PURE__ */ jsxRuntime.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];
|
|
5787
6791
|
let t13;
|
|
5788
6792
|
return $[47] !== t12 || $[48] !== value ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: t12 }), $[47] = t12, $[48] = value, $[49] = t13) : t13 = $[49], t13;
|
|
5789
6793
|
});
|
|
5790
6794
|
Menu.displayName = "ForwardRef(Menu)";
|
|
6795
|
+
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) => {
|
|
6796
|
+
for (var prop in b || (b = {}))
|
|
6797
|
+
__hasOwnProp$c.call(b, prop) && __defNormalProp$c(a, prop, b[prop]);
|
|
6798
|
+
if (__getOwnPropSymbols$c)
|
|
6799
|
+
for (var prop of __getOwnPropSymbols$c(b))
|
|
6800
|
+
__propIsEnum$c.call(b, prop) && __defNormalProp$c(a, prop, b[prop]);
|
|
6801
|
+
return a;
|
|
6802
|
+
}, __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));
|
|
5791
6803
|
const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
6804
|
+
var _a;
|
|
5792
6805
|
const $ = reactCompilerRuntime.c(62), {
|
|
5793
6806
|
__unstable_disableRestoreFocusOnClose: t0,
|
|
5794
6807
|
boundaryElement: deprecated_boundaryElement,
|
|
@@ -5898,7 +6911,7 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
5898
6911
|
"aria-haspopup": !0,
|
|
5899
6912
|
"aria-expanded": open,
|
|
5900
6913
|
ref: setButtonElement,
|
|
5901
|
-
selected: buttonProp.props.selected
|
|
6914
|
+
selected: (_a = buttonProp.props.selected) != null ? _a : open
|
|
5902
6915
|
}), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t19) : t19 = $[41], t18 = t19;
|
|
5903
6916
|
const button = t18;
|
|
5904
6917
|
let t20, t21;
|
|
@@ -5906,21 +6919,20 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
|
|
|
5906
6919
|
let t22, t23;
|
|
5907
6920
|
$[45] !== popover ? (t23 = popover || {}, $[45] = popover, $[46] = t23) : t23 = $[46];
|
|
5908
6921
|
let t24;
|
|
5909
|
-
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 = {
|
|
6922
|
+
$[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 = __spreadValues$c({
|
|
5910
6923
|
boundaryElement: deprecated_boundaryElement,
|
|
5911
6924
|
overflow: "auto",
|
|
5912
6925
|
placement: deprecated_placement,
|
|
5913
6926
|
portal: deprecated_portal,
|
|
5914
6927
|
preventOverflow: deprecated_preventOverflow,
|
|
5915
6928
|
radius: deprecated_popoverRadius,
|
|
5916
|
-
scheme: deprecated_popoverScheme
|
|
5917
|
-
|
|
5918
|
-
}, $[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;
|
|
6929
|
+
scheme: deprecated_popoverScheme
|
|
6930
|
+
}, 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;
|
|
5919
6931
|
const popoverProps = t22;
|
|
5920
6932
|
let t25;
|
|
5921
6933
|
$[55] !== button ? (t25 = button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[55] = button, $[56] = t25) : t25 = $[56];
|
|
5922
6934
|
let t26;
|
|
5923
|
-
return $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t25 ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { "data-ui": "MenuButton__popover",
|
|
6935
|
+
return $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t25 ? (t26 = /* @__PURE__ */ jsxRuntime.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;
|
|
5924
6936
|
});
|
|
5925
6937
|
MenuButton.displayName = "ForwardRef(MenuButton)";
|
|
5926
6938
|
function _temp$2(v) {
|
|
@@ -5957,6 +6969,7 @@ function selectableBaseStyle() {
|
|
|
5957
6969
|
`;
|
|
5958
6970
|
}
|
|
5959
6971
|
function selectableColorStyle(props) {
|
|
6972
|
+
var _a;
|
|
5960
6973
|
const {
|
|
5961
6974
|
$tone
|
|
5962
6975
|
} = props, {
|
|
@@ -6030,7 +7043,7 @@ function selectableColorStyle(props) {
|
|
|
6030
7043
|
}
|
|
6031
7044
|
}
|
|
6032
7045
|
|
|
6033
|
-
${style
|
|
7046
|
+
${(_a = style == null ? void 0 : style.card) == null ? void 0 : _a.root}
|
|
6034
7047
|
`;
|
|
6035
7048
|
}
|
|
6036
7049
|
const Selectable = styledComponents.styled(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
|
|
@@ -6043,10 +7056,27 @@ function useMenu() {
|
|
|
6043
7056
|
throw new Error("useMenu(): the context value is not compatible");
|
|
6044
7057
|
return value;
|
|
6045
7058
|
}
|
|
7059
|
+
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) => {
|
|
7060
|
+
for (var prop in b || (b = {}))
|
|
7061
|
+
__hasOwnProp$b.call(b, prop) && __defNormalProp$b(a, prop, b[prop]);
|
|
7062
|
+
if (__getOwnPropSymbols$b)
|
|
7063
|
+
for (var prop of __getOwnPropSymbols$b(b))
|
|
7064
|
+
__propIsEnum$b.call(b, prop) && __defNormalProp$b(a, prop, b[prop]);
|
|
7065
|
+
return a;
|
|
7066
|
+
}, __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b)), __objRest$a = (source, exclude) => {
|
|
7067
|
+
var target = {};
|
|
7068
|
+
for (var prop in source)
|
|
7069
|
+
__hasOwnProp$b.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7070
|
+
if (source != null && __getOwnPropSymbols$b)
|
|
7071
|
+
for (var prop of __getOwnPropSymbols$b(source))
|
|
7072
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$b.call(source, prop) && (target[prop] = source[prop]);
|
|
7073
|
+
return target;
|
|
7074
|
+
};
|
|
6046
7075
|
function MenuGroup(props) {
|
|
7076
|
+
var _a;
|
|
6047
7077
|
const $ = reactCompilerRuntime.c(77);
|
|
6048
7078
|
let IconComponent, children, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
|
|
6049
|
-
$[0] !== props ? ({
|
|
7079
|
+
$[0] !== props ? (_a = props, {
|
|
6050
7080
|
as: t0,
|
|
6051
7081
|
children,
|
|
6052
7082
|
fontSize: t1,
|
|
@@ -6057,9 +7087,20 @@ function MenuGroup(props) {
|
|
|
6057
7087
|
radius: t3,
|
|
6058
7088
|
space: t4,
|
|
6059
7089
|
text,
|
|
6060
|
-
tone: t5
|
|
6061
|
-
|
|
6062
|
-
|
|
7090
|
+
tone: t5
|
|
7091
|
+
} = _a, restProps = __objRest$a(_a, [
|
|
7092
|
+
"as",
|
|
7093
|
+
"children",
|
|
7094
|
+
"fontSize",
|
|
7095
|
+
"icon",
|
|
7096
|
+
"onClick",
|
|
7097
|
+
"padding",
|
|
7098
|
+
"popover",
|
|
7099
|
+
"radius",
|
|
7100
|
+
"space",
|
|
7101
|
+
"text",
|
|
7102
|
+
"tone"
|
|
7103
|
+
]), $[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]);
|
|
6063
7104
|
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(), {
|
|
6064
7105
|
scheme
|
|
6065
7106
|
} = useRootTheme(), {
|
|
@@ -6070,7 +7111,7 @@ function MenuGroup(props) {
|
|
|
6070
7111
|
onItemClick,
|
|
6071
7112
|
onItemMouseEnter: _onItemMouseEnter,
|
|
6072
7113
|
registerElement
|
|
6073
|
-
} = menu, onItemMouseEnter = _onItemMouseEnter
|
|
7114
|
+
} = menu, onItemMouseEnter = _onItemMouseEnter != null ? _onItemMouseEnter : menu.onMouseEnter, [rootElement, setRootElement] = react.useState(null), [open, setOpen] = react.useState(!1), [shouldFocus, setShouldFocus] = react.useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = react.useState(!1);
|
|
6074
7115
|
let t6;
|
|
6075
7116
|
$[13] !== onItemMouseEnter ? (t6 = (event) => {
|
|
6076
7117
|
setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
|
|
@@ -6079,18 +7120,18 @@ function MenuGroup(props) {
|
|
|
6079
7120
|
let t7;
|
|
6080
7121
|
$[15] !== rootElement ? (t7 = (event_0) => {
|
|
6081
7122
|
event_0.key === "ArrowLeft" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
|
|
6082
|
-
rootElement
|
|
7123
|
+
rootElement == null || rootElement.focus();
|
|
6083
7124
|
}));
|
|
6084
7125
|
}, $[15] = rootElement, $[16] = t7) : t7 = $[16];
|
|
6085
7126
|
const handleMenuKeyDown = t7;
|
|
6086
7127
|
let t8;
|
|
6087
7128
|
$[17] !== onClick ? (t8 = (event_1) => {
|
|
6088
|
-
onClick
|
|
7129
|
+
onClick == null || onClick(event_1), setShouldFocus("first"), setOpen(!0);
|
|
6089
7130
|
}, $[17] = onClick, $[18] = t8) : t8 = $[18];
|
|
6090
7131
|
const handleClick = t8;
|
|
6091
7132
|
let t9;
|
|
6092
7133
|
$[19] !== onItemClick ? (t9 = () => {
|
|
6093
|
-
setOpen(!1), onItemClick
|
|
7134
|
+
setOpen(!1), onItemClick == null || onItemClick();
|
|
6094
7135
|
}, $[19] = onItemClick, $[20] = t9) : t9 = $[20];
|
|
6095
7136
|
const handleChildItemClick = t9;
|
|
6096
7137
|
let t10;
|
|
@@ -6143,15 +7184,32 @@ function MenuGroup(props) {
|
|
|
6143
7184
|
t29
|
|
6144
7185
|
] }), $[53] = padding, $[54] = space, $[55] = t26, $[56] = t27, $[57] = t29, $[58] = t30) : t30 = $[58];
|
|
6145
7186
|
let t31;
|
|
6146
|
-
$[59] !== as || $[60] !== handleClick || $[61] !== handleMouseEnter || $[62] !== restProps || $[63] !== scheme || $[64] !== t21 || $[65] !== t22 || $[66] !== t23 || $[67] !== t24 || $[68] !== t25 || $[69] !== t30 || $[70] !== tone ? (t31 = /* @__PURE__ */ jsxRuntime.jsx(Selectable, { "data-as": as, "data-ui": "MenuGroup", forwardedAs: as,
|
|
7187
|
+
$[59] !== as || $[60] !== handleClick || $[61] !== handleMouseEnter || $[62] !== restProps || $[63] !== scheme || $[64] !== t21 || $[65] !== t22 || $[66] !== t23 || $[67] !== t24 || $[68] !== t25 || $[69] !== t30 || $[70] !== tone ? (t31 = /* @__PURE__ */ jsxRuntime.jsx(Selectable, __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];
|
|
6147
7188
|
let t32;
|
|
6148
|
-
return $[72] !== childMenu || $[73] !== open || $[74] !== popover || $[75] !== t31 ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(Popover, {
|
|
7189
|
+
return $[72] !== childMenu || $[73] !== open || $[74] !== popover || $[75] !== t31 ? (t32 = /* @__PURE__ */ jsxRuntime.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;
|
|
6149
7190
|
}
|
|
6150
7191
|
MenuGroup.displayName = "MenuGroup";
|
|
7192
|
+
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) => {
|
|
7193
|
+
for (var prop in b || (b = {}))
|
|
7194
|
+
__hasOwnProp$a.call(b, prop) && __defNormalProp$a(a, prop, b[prop]);
|
|
7195
|
+
if (__getOwnPropSymbols$a)
|
|
7196
|
+
for (var prop of __getOwnPropSymbols$a(b))
|
|
7197
|
+
__propIsEnum$a.call(b, prop) && __defNormalProp$a(a, prop, b[prop]);
|
|
7198
|
+
return a;
|
|
7199
|
+
}, __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b)), __objRest$9 = (source, exclude) => {
|
|
7200
|
+
var target = {};
|
|
7201
|
+
for (var prop in source)
|
|
7202
|
+
__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7203
|
+
if (source != null && __getOwnPropSymbols$a)
|
|
7204
|
+
for (var prop of __getOwnPropSymbols$a(source))
|
|
7205
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop) && (target[prop] = source[prop]);
|
|
7206
|
+
return target;
|
|
7207
|
+
};
|
|
6151
7208
|
const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
7209
|
+
var _a;
|
|
6152
7210
|
const $ = reactCompilerRuntime.c(74);
|
|
6153
7211
|
let IconComponent, IconRightComponent, children, disabled, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
|
|
6154
|
-
$[0] !== props ? ({
|
|
7212
|
+
$[0] !== props ? (_a = props, {
|
|
6155
7213
|
as: t0,
|
|
6156
7214
|
children,
|
|
6157
7215
|
disabled,
|
|
@@ -6172,9 +7230,30 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6172
7230
|
selected: selectedProp,
|
|
6173
7231
|
space: t4,
|
|
6174
7232
|
text,
|
|
6175
|
-
tone: t5
|
|
6176
|
-
|
|
6177
|
-
|
|
7233
|
+
tone: t5
|
|
7234
|
+
} = _a, restProps = __objRest$9(_a, [
|
|
7235
|
+
"as",
|
|
7236
|
+
"children",
|
|
7237
|
+
"disabled",
|
|
7238
|
+
"fontSize",
|
|
7239
|
+
"hotkeys",
|
|
7240
|
+
"icon",
|
|
7241
|
+
"iconRight",
|
|
7242
|
+
"onClick",
|
|
7243
|
+
"padding",
|
|
7244
|
+
"paddingX",
|
|
7245
|
+
"paddingY",
|
|
7246
|
+
"paddingTop",
|
|
7247
|
+
"paddingRight",
|
|
7248
|
+
"paddingBottom",
|
|
7249
|
+
"paddingLeft",
|
|
7250
|
+
"pressed",
|
|
7251
|
+
"radius",
|
|
7252
|
+
"selected",
|
|
7253
|
+
"space",
|
|
7254
|
+
"text",
|
|
7255
|
+
"tone"
|
|
7256
|
+
]), $[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]);
|
|
6178
7257
|
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, {
|
|
6179
7258
|
scheme
|
|
6180
7259
|
} = useRootTheme(), menu = useMenu(), {
|
|
@@ -6183,7 +7262,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6183
7262
|
onItemClick,
|
|
6184
7263
|
onItemMouseEnter: _onItemMouseEnter,
|
|
6185
7264
|
onItemMouseLeave: _onItemMouseLeave
|
|
6186
|
-
} = menu, onItemMouseEnter = _onItemMouseEnter
|
|
7265
|
+
} = menu, onItemMouseEnter = _onItemMouseEnter != null ? _onItemMouseEnter : menu.onMouseEnter, onItemMouseLeave = _onItemMouseLeave != null ? _onItemMouseLeave : menu.onMouseLeave, [rootElement, setRootElement] = react.useState(null), active = !!activeElement && activeElement === rootElement, ref = react.useRef(null);
|
|
6187
7266
|
let t6;
|
|
6188
7267
|
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[23] = t6) : t6 = $[23], react.useImperativeHandle(forwardedRef, t6);
|
|
6189
7268
|
let t7, t8;
|
|
@@ -6213,7 +7292,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6213
7292
|
}, $[43] = t14) : t14 = $[43];
|
|
6214
7293
|
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;
|
|
6215
7294
|
let t23;
|
|
6216
|
-
$[44] !== IconComponent || $[45] !== IconRightComponent || $[46] !== fontSize2 || $[47] !== hotkeys || $[48] !== hotkeysFontSize || $[49] !== paddingProps || $[50] !== space || $[51] !== text ? (t23 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", gap: space, align: "center",
|
|
7295
|
+
$[44] !== IconComponent || $[45] !== IconRightComponent || $[46] !== fontSize2 || $[47] !== hotkeys || $[48] !== hotkeysFontSize || $[49] !== paddingProps || $[50] !== space || $[51] !== text ? (t23 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, __spreadProps$a(__spreadValues$a({ as: "span", gap: space, align: "center" }, paddingProps), { children: [
|
|
6217
7296
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
6218
7297
|
react.isValidElement(IconComponent) && IconComponent,
|
|
6219
7298
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
@@ -6227,14 +7306,14 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6227
7306
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
6228
7307
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
6229
7308
|
] })
|
|
6230
|
-
] }), $[44] = IconComponent, $[45] = IconRightComponent, $[46] = fontSize2, $[47] = hotkeys, $[48] = hotkeysFontSize, $[49] = paddingProps, $[50] = space, $[51] = text, $[52] = t23) : t23 = $[52];
|
|
7309
|
+
] })), $[44] = IconComponent, $[45] = IconRightComponent, $[46] = fontSize2, $[47] = hotkeys, $[48] = hotkeysFontSize, $[49] = paddingProps, $[50] = space, $[51] = text, $[52] = t23) : t23 = $[52];
|
|
6231
7310
|
let t24;
|
|
6232
|
-
$[53] !== children || $[54] !== paddingProps ? (t24 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span",
|
|
7311
|
+
$[53] !== children || $[54] !== paddingProps ? (t24 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, __spreadProps$a(__spreadValues$a({ as: "span" }, paddingProps), { children })), $[53] = children, $[54] = paddingProps, $[55] = t24) : t24 = $[55];
|
|
6233
7312
|
let t25;
|
|
6234
|
-
return $[56] !== as || $[57] !== disabled || $[58] !== handleClick || $[59] !== onItemMouseEnter || $[60] !== onItemMouseLeave || $[61] !== restProps || $[62] !== scheme || $[63] !== t15 || $[64] !== t16 || $[65] !== t17 || $[66] !== t18 || $[67] !== t19 || $[68] !== t20 || $[69] !== t21 || $[70] !== t22 || $[71] !== t23 || $[72] !== t24 ? (t25 = /* @__PURE__ */ jsxRuntime.jsxs(Selectable, { "data-ui": "MenuItem",
|
|
7313
|
+
return $[56] !== as || $[57] !== disabled || $[58] !== handleClick || $[59] !== onItemMouseEnter || $[60] !== onItemMouseLeave || $[61] !== restProps || $[62] !== scheme || $[63] !== t15 || $[64] !== t16 || $[65] !== t17 || $[66] !== t18 || $[67] !== t19 || $[68] !== t20 || $[69] !== t21 || $[70] !== t22 || $[71] !== t23 || $[72] !== t24 ? (t25 = /* @__PURE__ */ jsxRuntime.jsxs(Selectable, __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: [
|
|
6235
7314
|
t23,
|
|
6236
7315
|
t24
|
|
6237
|
-
] }), $[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;
|
|
7316
|
+
] })), $[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;
|
|
6238
7317
|
});
|
|
6239
7318
|
MenuItem.displayName = "ForwardRef(MenuItem)";
|
|
6240
7319
|
function _temp$1(s) {
|
|
@@ -6280,15 +7359,36 @@ const keyframe = styledComponents.keyframes`
|
|
|
6280
7359
|
@media screen and (prefers-reduced-motion: reduce) {
|
|
6281
7360
|
background-color: var(--card-skeleton-color-from);
|
|
6282
7361
|
}
|
|
6283
|
-
|
|
7362
|
+
`;
|
|
7363
|
+
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) => {
|
|
7364
|
+
for (var prop in b || (b = {}))
|
|
7365
|
+
__hasOwnProp$9.call(b, prop) && __defNormalProp$9(a, prop, b[prop]);
|
|
7366
|
+
if (__getOwnPropSymbols$9)
|
|
7367
|
+
for (var prop of __getOwnPropSymbols$9(b))
|
|
7368
|
+
__propIsEnum$9.call(b, prop) && __defNormalProp$9(a, prop, b[prop]);
|
|
7369
|
+
return a;
|
|
7370
|
+
}, __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b)), __objRest$8 = (source, exclude) => {
|
|
7371
|
+
var target = {};
|
|
7372
|
+
for (var prop in source)
|
|
7373
|
+
__hasOwnProp$9.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7374
|
+
if (source != null && __getOwnPropSymbols$9)
|
|
7375
|
+
for (var prop of __getOwnPropSymbols$9(source))
|
|
7376
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$9.call(source, prop) && (target[prop] = source[prop]);
|
|
7377
|
+
return target;
|
|
7378
|
+
};
|
|
7379
|
+
const Root$4 = styledComponents.styled(Box)(responsiveRadiusStyle, skeletonStyle), Skeleton = react.forwardRef(function(props, ref) {
|
|
7380
|
+
var _a;
|
|
6284
7381
|
const $ = reactCompilerRuntime.c(14);
|
|
6285
7382
|
let delay, radius, restProps, t0;
|
|
6286
|
-
$[0] !== props ? ({
|
|
7383
|
+
$[0] !== props ? (_a = props, {
|
|
6287
7384
|
animated: t0,
|
|
6288
7385
|
delay,
|
|
6289
|
-
radius
|
|
6290
|
-
|
|
6291
|
-
|
|
7386
|
+
radius
|
|
7387
|
+
} = _a, restProps = __objRest$8(_a, [
|
|
7388
|
+
"animated",
|
|
7389
|
+
"delay",
|
|
7390
|
+
"radius"
|
|
7391
|
+
]), $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0) : (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]);
|
|
6292
7392
|
const animated = t0 === void 0 ? !1 : t0, [visible, setVisible] = react.useState(!delay);
|
|
6293
7393
|
let t1, t2;
|
|
6294
7394
|
$[5] !== delay ? (t1 = () => {
|
|
@@ -6303,9 +7403,25 @@ const keyframe = styledComponents.keyframes`
|
|
|
6303
7403
|
}, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2) : (t1 = $[6], t2 = $[7]), react.useEffect(t1, t2);
|
|
6304
7404
|
const t3 = useArrayProp(radius);
|
|
6305
7405
|
let t4;
|
|
6306
|
-
return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== visible ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Root$4, {
|
|
7406
|
+
return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== visible ? (t4 = /* @__PURE__ */ jsxRuntime.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;
|
|
6307
7407
|
});
|
|
6308
7408
|
Skeleton.displayName = "ForwardRef(Skeleton)";
|
|
7409
|
+
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) => {
|
|
7410
|
+
for (var prop in b || (b = {}))
|
|
7411
|
+
__hasOwnProp$8.call(b, prop) && __defNormalProp$8(a, prop, b[prop]);
|
|
7412
|
+
if (__getOwnPropSymbols$8)
|
|
7413
|
+
for (var prop of __getOwnPropSymbols$8(b))
|
|
7414
|
+
__propIsEnum$8.call(b, prop) && __defNormalProp$8(a, prop, b[prop]);
|
|
7415
|
+
return a;
|
|
7416
|
+
}, __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b)), __objRest$7 = (source, exclude) => {
|
|
7417
|
+
var target = {};
|
|
7418
|
+
for (var prop in source)
|
|
7419
|
+
__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7420
|
+
if (source != null && __getOwnPropSymbols$8)
|
|
7421
|
+
for (var prop of __getOwnPropSymbols$8(source))
|
|
7422
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop) && (target[prop] = source[prop]);
|
|
7423
|
+
return target;
|
|
7424
|
+
};
|
|
6309
7425
|
const Root$3 = styledComponents.styled(Skeleton)((props) => {
|
|
6310
7426
|
const {
|
|
6311
7427
|
$size,
|
|
@@ -6321,59 +7437,84 @@ const Root$3 = styledComponents.styled(Skeleton)((props) => {
|
|
|
6321
7437
|
};
|
|
6322
7438
|
});
|
|
6323
7439
|
}), TextSkeleton = react.forwardRef(function(props, ref) {
|
|
7440
|
+
var _a;
|
|
6324
7441
|
const $ = reactCompilerRuntime.c(7);
|
|
6325
7442
|
let restProps, t0;
|
|
6326
|
-
$[0] !== props ? ({
|
|
6327
|
-
size: t0
|
|
6328
|
-
|
|
6329
|
-
|
|
7443
|
+
$[0] !== props ? (_a = props, {
|
|
7444
|
+
size: t0
|
|
7445
|
+
} = _a, restProps = __objRest$7(_a, [
|
|
7446
|
+
"size"
|
|
7447
|
+
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6330
7448
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6331
7449
|
let t1;
|
|
6332
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, {
|
|
7450
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, __spreadProps$8(__spreadValues$8({}, restProps), { $size, ref, $style: "text" })), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6333
7451
|
});
|
|
6334
7452
|
TextSkeleton.displayName = "ForwardRef(TextSkeleton)";
|
|
6335
7453
|
const LabelSkeleton = react.forwardRef(function(props, ref) {
|
|
7454
|
+
var _a;
|
|
6336
7455
|
const $ = reactCompilerRuntime.c(7);
|
|
6337
7456
|
let restProps, t0;
|
|
6338
|
-
$[0] !== props ? ({
|
|
6339
|
-
size: t0
|
|
6340
|
-
|
|
6341
|
-
|
|
7457
|
+
$[0] !== props ? (_a = props, {
|
|
7458
|
+
size: t0
|
|
7459
|
+
} = _a, restProps = __objRest$7(_a, [
|
|
7460
|
+
"size"
|
|
7461
|
+
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6342
7462
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6343
7463
|
let t1;
|
|
6344
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, {
|
|
7464
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, __spreadProps$8(__spreadValues$8({}, restProps), { $size, ref, $style: "label" })), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6345
7465
|
});
|
|
6346
7466
|
LabelSkeleton.displayName = "ForwardRef(LabelSkeleton)";
|
|
6347
7467
|
const HeadingSkeleton = react.forwardRef(function(props, ref) {
|
|
7468
|
+
var _a;
|
|
6348
7469
|
const $ = reactCompilerRuntime.c(7);
|
|
6349
7470
|
let restProps, t0;
|
|
6350
|
-
$[0] !== props ? ({
|
|
6351
|
-
size: t0
|
|
6352
|
-
|
|
6353
|
-
|
|
7471
|
+
$[0] !== props ? (_a = props, {
|
|
7472
|
+
size: t0
|
|
7473
|
+
} = _a, restProps = __objRest$7(_a, [
|
|
7474
|
+
"size"
|
|
7475
|
+
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6354
7476
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6355
7477
|
let t1;
|
|
6356
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, {
|
|
7478
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, __spreadProps$8(__spreadValues$8({}, restProps), { $size, ref, $style: "heading" })), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6357
7479
|
});
|
|
6358
7480
|
HeadingSkeleton.displayName = "ForwardRef(HeadingSkeleton)";
|
|
6359
7481
|
const CodeSkeleton = react.forwardRef(function(props, ref) {
|
|
7482
|
+
var _a;
|
|
6360
7483
|
const $ = reactCompilerRuntime.c(7);
|
|
6361
7484
|
let restProps, t0;
|
|
6362
|
-
$[0] !== props ? ({
|
|
6363
|
-
size: t0
|
|
6364
|
-
|
|
6365
|
-
|
|
7485
|
+
$[0] !== props ? (_a = props, {
|
|
7486
|
+
size: t0
|
|
7487
|
+
} = _a, restProps = __objRest$7(_a, [
|
|
7488
|
+
"size"
|
|
7489
|
+
]), $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
|
|
6366
7490
|
const $size = useArrayProp(t0 === void 0 ? 2 : t0);
|
|
6367
7491
|
let t1;
|
|
6368
|
-
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, {
|
|
7492
|
+
return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Root$3, __spreadProps$8(__spreadValues$8({}, restProps), { $size, ref, $style: "code" })), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
|
|
6369
7493
|
});
|
|
6370
7494
|
CodeSkeleton.displayName = "ForwardRef(CodeSkeleton)";
|
|
7495
|
+
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) => {
|
|
7496
|
+
for (var prop in b || (b = {}))
|
|
7497
|
+
__hasOwnProp$7.call(b, prop) && __defNormalProp$7(a, prop, b[prop]);
|
|
7498
|
+
if (__getOwnPropSymbols$7)
|
|
7499
|
+
for (var prop of __getOwnPropSymbols$7(b))
|
|
7500
|
+
__propIsEnum$7.call(b, prop) && __defNormalProp$7(a, prop, b[prop]);
|
|
7501
|
+
return a;
|
|
7502
|
+
}, __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b)), __objRest$6 = (source, exclude) => {
|
|
7503
|
+
var target = {};
|
|
7504
|
+
for (var prop in source)
|
|
7505
|
+
__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7506
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
7507
|
+
for (var prop of __getOwnPropSymbols$7(source))
|
|
7508
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop) && (target[prop] = source[prop]);
|
|
7509
|
+
return target;
|
|
7510
|
+
};
|
|
6371
7511
|
const CustomButton = styledComponents.styled(Button)`
|
|
6372
7512
|
max-width: 100%;
|
|
6373
7513
|
`, Tab = react.forwardRef(function(props, forwardedRef) {
|
|
7514
|
+
var _a;
|
|
6374
7515
|
const $ = reactCompilerRuntime.c(30);
|
|
6375
7516
|
let focused, icon, id, label, onClick, onFocus, restProps, selected, t0, t1;
|
|
6376
|
-
$[0] !== props ? ({
|
|
7517
|
+
$[0] !== props ? (_a = props, {
|
|
6377
7518
|
icon,
|
|
6378
7519
|
id,
|
|
6379
7520
|
focused,
|
|
@@ -6382,9 +7523,18 @@ const CustomButton = styledComponents.styled(Button)`
|
|
|
6382
7523
|
onClick,
|
|
6383
7524
|
onFocus,
|
|
6384
7525
|
padding: t1,
|
|
6385
|
-
selected
|
|
6386
|
-
|
|
6387
|
-
|
|
7526
|
+
selected
|
|
7527
|
+
} = _a, restProps = __objRest$6(_a, [
|
|
7528
|
+
"icon",
|
|
7529
|
+
"id",
|
|
7530
|
+
"focused",
|
|
7531
|
+
"fontSize",
|
|
7532
|
+
"label",
|
|
7533
|
+
"onClick",
|
|
7534
|
+
"onFocus",
|
|
7535
|
+
"padding",
|
|
7536
|
+
"selected"
|
|
7537
|
+
]), $[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]);
|
|
6388
7538
|
const fontSize2 = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 2 : t1, ref = react.useRef(null), focusedRef = react.useRef(!1);
|
|
6389
7539
|
let t2;
|
|
6390
7540
|
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[11] = t2) : t2 = $[11], react.useImperativeHandle(forwardedRef, t2);
|
|
@@ -6404,9 +7554,25 @@ const CustomButton = styledComponents.styled(Button)`
|
|
|
6404
7554
|
}, t6 = [focused], $[15] = focused, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), react.useEffect(t5, t6);
|
|
6405
7555
|
const t7 = selected ? "true" : "false", t8 = selected ? 0 : -1;
|
|
6406
7556
|
let t9;
|
|
6407
|
-
return $[18] !== fontSize2 || $[19] !== handleFocus || $[20] !== icon || $[21] !== id || $[22] !== label || $[23] !== onClick || $[24] !== padding || $[25] !== restProps || $[26] !== selected || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(CustomButton, { "data-ui": "Tab",
|
|
7557
|
+
return $[18] !== fontSize2 || $[19] !== handleFocus || $[20] !== icon || $[21] !== id || $[22] !== label || $[23] !== onClick || $[24] !== padding || $[25] !== restProps || $[26] !== selected || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(CustomButton, __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;
|
|
6408
7558
|
});
|
|
6409
7559
|
Tab.displayName = "ForwardRef(Tab)";
|
|
7560
|
+
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) => {
|
|
7561
|
+
for (var prop in b || (b = {}))
|
|
7562
|
+
__hasOwnProp$6.call(b, prop) && __defNormalProp$6(a, prop, b[prop]);
|
|
7563
|
+
if (__getOwnPropSymbols$6)
|
|
7564
|
+
for (var prop of __getOwnPropSymbols$6(b))
|
|
7565
|
+
__propIsEnum$6.call(b, prop) && __defNormalProp$6(a, prop, b[prop]);
|
|
7566
|
+
return a;
|
|
7567
|
+
}, __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b)), __objRest$5 = (source, exclude) => {
|
|
7568
|
+
var target = {};
|
|
7569
|
+
for (var prop in source)
|
|
7570
|
+
__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7571
|
+
if (source != null && __getOwnPropSymbols$6)
|
|
7572
|
+
for (var prop of __getOwnPropSymbols$6(source))
|
|
7573
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop) && (target[prop] = source[prop]);
|
|
7574
|
+
return target;
|
|
7575
|
+
};
|
|
6410
7576
|
const CustomInline = styledComponents.styled(Inline)`
|
|
6411
7577
|
& > div {
|
|
6412
7578
|
display: inline-block;
|
|
@@ -6415,12 +7581,14 @@ const CustomInline = styledComponents.styled(Inline)`
|
|
|
6415
7581
|
box-sizing: border-box;
|
|
6416
7582
|
}
|
|
6417
7583
|
`, TabList = react.forwardRef(function(props, ref) {
|
|
7584
|
+
var _a;
|
|
6418
7585
|
const $ = reactCompilerRuntime.c(15);
|
|
6419
7586
|
let childrenProp, restProps;
|
|
6420
|
-
$[0] !== props ? ({
|
|
6421
|
-
children: childrenProp
|
|
6422
|
-
|
|
6423
|
-
|
|
7587
|
+
$[0] !== props ? (_a = props, {
|
|
7588
|
+
children: childrenProp
|
|
7589
|
+
} = _a, restProps = __objRest$5(_a, [
|
|
7590
|
+
"children"
|
|
7591
|
+
]), $[0] = props, $[1] = childrenProp, $[2] = restProps) : (childrenProp = $[1], restProps = $[2]);
|
|
6424
7592
|
const [focusedIndex, setFocusedIndex] = react.useState(-1);
|
|
6425
7593
|
let t0;
|
|
6426
7594
|
if ($[3] !== childrenProp || $[4] !== focusedIndex) {
|
|
@@ -6440,19 +7608,37 @@ const CustomInline = styledComponents.styled(Inline)`
|
|
|
6440
7608
|
}, $[8] = numTabs, $[9] = t1) : t1 = $[9];
|
|
6441
7609
|
const handleKeyDown = t1;
|
|
6442
7610
|
let t2;
|
|
6443
|
-
return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(CustomInline, { "data-ui": "TabList",
|
|
7611
|
+
return $[10] !== handleKeyDown || $[11] !== ref || $[12] !== restProps || $[13] !== tabs ? (t2 = /* @__PURE__ */ jsxRuntime.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;
|
|
6444
7612
|
});
|
|
6445
7613
|
TabList.displayName = "ForwardRef(TabList)";
|
|
7614
|
+
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) => {
|
|
7615
|
+
for (var prop in b || (b = {}))
|
|
7616
|
+
__hasOwnProp$5.call(b, prop) && __defNormalProp$5(a, prop, b[prop]);
|
|
7617
|
+
if (__getOwnPropSymbols$5)
|
|
7618
|
+
for (var prop of __getOwnPropSymbols$5(b))
|
|
7619
|
+
__propIsEnum$5.call(b, prop) && __defNormalProp$5(a, prop, b[prop]);
|
|
7620
|
+
return a;
|
|
7621
|
+
}, __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b)), __objRest$4 = (source, exclude) => {
|
|
7622
|
+
var target = {};
|
|
7623
|
+
for (var prop in source)
|
|
7624
|
+
__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7625
|
+
if (source != null && __getOwnPropSymbols$5)
|
|
7626
|
+
for (var prop of __getOwnPropSymbols$5(source))
|
|
7627
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop) && (target[prop] = source[prop]);
|
|
7628
|
+
return target;
|
|
7629
|
+
};
|
|
6446
7630
|
const TabPanel = react.forwardRef(function(props, ref) {
|
|
7631
|
+
var _a;
|
|
6447
7632
|
const $ = reactCompilerRuntime.c(9);
|
|
6448
7633
|
let flex, restProps;
|
|
6449
|
-
$[0] !== props ? ({
|
|
6450
|
-
flex
|
|
6451
|
-
|
|
6452
|
-
|
|
7634
|
+
$[0] !== props ? (_a = props, {
|
|
7635
|
+
flex
|
|
7636
|
+
} = _a, restProps = __objRest$4(_a, [
|
|
7637
|
+
"flex"
|
|
7638
|
+
]), $[0] = props, $[1] = flex, $[2] = restProps) : (flex = $[1], restProps = $[2]);
|
|
6453
7639
|
const t0 = props.tabIndex === void 0 ? 0 : props.tabIndex;
|
|
6454
7640
|
let t1;
|
|
6455
|
-
return $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "TabPanel",
|
|
7641
|
+
return $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.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;
|
|
6456
7642
|
});
|
|
6457
7643
|
TabPanel.displayName = "ForwardRef(TabPanel)";
|
|
6458
7644
|
const TextBox = styledComponents.styled(Flex)`
|
|
@@ -6499,6 +7685,22 @@ function rootStyles(props) {
|
|
|
6499
7685
|
}
|
|
6500
7686
|
`;
|
|
6501
7687
|
}
|
|
7688
|
+
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) => {
|
|
7689
|
+
for (var prop in b || (b = {}))
|
|
7690
|
+
__hasOwnProp$4.call(b, prop) && __defNormalProp$4(a, prop, b[prop]);
|
|
7691
|
+
if (__getOwnPropSymbols$4)
|
|
7692
|
+
for (var prop of __getOwnPropSymbols$4(b))
|
|
7693
|
+
__propIsEnum$4.call(b, prop) && __defNormalProp$4(a, prop, b[prop]);
|
|
7694
|
+
return a;
|
|
7695
|
+
}, __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b)), __objRest$3 = (source, exclude) => {
|
|
7696
|
+
var target = {};
|
|
7697
|
+
for (var prop in source)
|
|
7698
|
+
__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7699
|
+
if (source != null && __getOwnPropSymbols$4)
|
|
7700
|
+
for (var prop of __getOwnPropSymbols$4(source))
|
|
7701
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop) && (target[prop] = source[prop]);
|
|
7702
|
+
return target;
|
|
7703
|
+
};
|
|
6502
7704
|
const STATUS_CARD_TONE = {
|
|
6503
7705
|
error: "critical",
|
|
6504
7706
|
warning: "caution",
|
|
@@ -6516,18 +7718,26 @@ const STATUS_CARD_TONE = {
|
|
|
6516
7718
|
info: "alert"
|
|
6517
7719
|
}, Root$2 = styledComponents.styled(Card)(rootStyles);
|
|
6518
7720
|
function Toast(props) {
|
|
7721
|
+
var _a;
|
|
6519
7722
|
const $ = reactCompilerRuntime.c(30);
|
|
6520
7723
|
let closable, description, duration, onClose, restProps, status, t0, title;
|
|
6521
|
-
$[0] !== props ? ({
|
|
7724
|
+
$[0] !== props ? (_a = props, {
|
|
6522
7725
|
closable,
|
|
6523
7726
|
description,
|
|
6524
7727
|
duration,
|
|
6525
7728
|
onClose,
|
|
6526
7729
|
radius: t0,
|
|
6527
7730
|
title,
|
|
6528
|
-
status
|
|
6529
|
-
|
|
6530
|
-
|
|
7731
|
+
status
|
|
7732
|
+
} = _a, restProps = __objRest$3(_a, [
|
|
7733
|
+
"closable",
|
|
7734
|
+
"description",
|
|
7735
|
+
"duration",
|
|
7736
|
+
"onClose",
|
|
7737
|
+
"radius",
|
|
7738
|
+
"title",
|
|
7739
|
+
"status"
|
|
7740
|
+
]), $[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]);
|
|
6531
7741
|
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";
|
|
6532
7742
|
let t1;
|
|
6533
7743
|
$[9] !== title ? (t1 = title && /* @__PURE__ */ jsxRuntime.jsx(Text, { size: 1, weight: "medium", children: title }), $[9] = title, $[10] = t1) : t1 = $[10];
|
|
@@ -6548,7 +7758,7 @@ function Toast(props) {
|
|
|
6548
7758
|
t4
|
|
6549
7759
|
] }), $[20] = t3, $[21] = t4, $[22] = t5) : t5 = $[22];
|
|
6550
7760
|
let t6;
|
|
6551
|
-
return $[23] !== cardTone || $[24] !== duration || $[25] !== radius || $[26] !== restProps || $[27] !== role || $[28] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Root$2, { "data-ui": "Toast", role,
|
|
7761
|
+
return $[23] !== cardTone || $[24] !== duration || $[25] !== radius || $[26] !== restProps || $[27] !== role || $[28] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.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;
|
|
6552
7762
|
}
|
|
6553
7763
|
Toast.displayName = "Toast";
|
|
6554
7764
|
function useMounted() {
|
|
@@ -6566,6 +7776,14 @@ let toastId = 0;
|
|
|
6566
7776
|
function generateToastId() {
|
|
6567
7777
|
return String(toastId++);
|
|
6568
7778
|
}
|
|
7779
|
+
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) => {
|
|
7780
|
+
for (var prop in b || (b = {}))
|
|
7781
|
+
__hasOwnProp$3.call(b, prop) && __defNormalProp$3(a, prop, b[prop]);
|
|
7782
|
+
if (__getOwnPropSymbols$3)
|
|
7783
|
+
for (var prop of __getOwnPropSymbols$3(b))
|
|
7784
|
+
__propIsEnum$3.call(b, prop) && __defNormalProp$3(a, prop, b[prop]);
|
|
7785
|
+
return a;
|
|
7786
|
+
}, __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
6569
7787
|
const Root$1 = styledComponents.styled(Layer)`
|
|
6570
7788
|
position: fixed;
|
|
6571
7789
|
top: 0;
|
|
@@ -6632,7 +7850,8 @@ function ToastProvider(props) {
|
|
|
6632
7850
|
version: 0,
|
|
6633
7851
|
push: (params) => {
|
|
6634
7852
|
const setState = (state_0) => react.startTransition(() => _setState(state_0)), id = params.id || generateToastId(), duration = params.duration || 5e3, dismiss = () => {
|
|
6635
|
-
|
|
7853
|
+
var _a;
|
|
7854
|
+
const timeoutId = (_a = toastsRef.current[id]) == null ? void 0 : _a.timeoutId;
|
|
6636
7855
|
setState((prevState) => {
|
|
6637
7856
|
const idx = prevState.findIndex((t) => t.id === id);
|
|
6638
7857
|
if (idx > -1) {
|
|
@@ -6645,10 +7864,9 @@ function ToastProvider(props) {
|
|
|
6645
7864
|
return setState((prevState_0) => prevState_0.filter((t_0) => t_0.id !== id).concat([{
|
|
6646
7865
|
dismiss,
|
|
6647
7866
|
id,
|
|
6648
|
-
params: {
|
|
6649
|
-
...params,
|
|
7867
|
+
params: __spreadProps$3(__spreadValues$3({}, params), {
|
|
6650
7868
|
duration
|
|
6651
|
-
}
|
|
7869
|
+
})
|
|
6652
7870
|
}])), toastsRef.current[id] && (clearTimeout(toastsRef.current[id].timeoutId), delete toastsRef.current[id]), toastsRef.current[id] = {
|
|
6653
7871
|
timeoutId: setTimeout(dismiss, duration)
|
|
6654
7872
|
}, id;
|
|
@@ -6694,6 +7912,7 @@ function useToast() {
|
|
|
6694
7912
|
return value;
|
|
6695
7913
|
}
|
|
6696
7914
|
function _findPrevItemElement(state, itemElements, focusedElement) {
|
|
7915
|
+
var _a;
|
|
6697
7916
|
const idx = itemElements.indexOf(focusedElement), els = itemElements.slice(0, idx), len = els.length;
|
|
6698
7917
|
for (let i = len - 1; i >= 0; i -= 1) {
|
|
6699
7918
|
const itemKey = els[i].getAttribute("data-tree-key");
|
|
@@ -6706,7 +7925,7 @@ function _findPrevItemElement(state, itemElements, focusedElement) {
|
|
|
6706
7925
|
for (let j = 0; j < segments.length; j += 1) {
|
|
6707
7926
|
p.push(segments[j]);
|
|
6708
7927
|
const k = p.join("/");
|
|
6709
|
-
if (!state[k]
|
|
7928
|
+
if (!((_a = state[k]) != null && _a.expanded)) {
|
|
6710
7929
|
expanded = !1;
|
|
6711
7930
|
break;
|
|
6712
7931
|
}
|
|
@@ -6717,6 +7936,7 @@ function _findPrevItemElement(state, itemElements, focusedElement) {
|
|
|
6717
7936
|
return null;
|
|
6718
7937
|
}
|
|
6719
7938
|
function _findNextItemElement(state, itemElements, focusedElement) {
|
|
7939
|
+
var _a;
|
|
6720
7940
|
const idx = itemElements.indexOf(focusedElement), els = itemElements.slice(idx), len = itemElements.length;
|
|
6721
7941
|
for (let i = 1; i < len; i += 1) {
|
|
6722
7942
|
if (!els[i])
|
|
@@ -6731,7 +7951,7 @@ function _findNextItemElement(state, itemElements, focusedElement) {
|
|
|
6731
7951
|
for (let j = 0; j < segments.length; j += 1) {
|
|
6732
7952
|
p.push(segments[j]);
|
|
6733
7953
|
const k = p.join("/");
|
|
6734
|
-
if (!state[k]
|
|
7954
|
+
if (!((_a = state[k]) != null && _a.expanded)) {
|
|
6735
7955
|
expanded = !1;
|
|
6736
7956
|
break;
|
|
6737
7957
|
}
|
|
@@ -6747,15 +7967,36 @@ function _focusItemElement(el) {
|
|
|
6747
7967
|
firstChild && firstChild instanceof HTMLElement && firstChild.focus();
|
|
6748
7968
|
}
|
|
6749
7969
|
}
|
|
6750
|
-
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null)
|
|
7970
|
+
const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null);
|
|
7971
|
+
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) => {
|
|
7972
|
+
for (var prop in b || (b = {}))
|
|
7973
|
+
__hasOwnProp$2.call(b, prop) && __defNormalProp$2(a, prop, b[prop]);
|
|
7974
|
+
if (__getOwnPropSymbols$2)
|
|
7975
|
+
for (var prop of __getOwnPropSymbols$2(b))
|
|
7976
|
+
__propIsEnum$2.call(b, prop) && __defNormalProp$2(a, prop, b[prop]);
|
|
7977
|
+
return a;
|
|
7978
|
+
}, __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b)), __objRest$2 = (source, exclude) => {
|
|
7979
|
+
var target = {};
|
|
7980
|
+
for (var prop in source)
|
|
7981
|
+
__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
7982
|
+
if (source != null && __getOwnPropSymbols$2)
|
|
7983
|
+
for (var prop of __getOwnPropSymbols$2(source))
|
|
7984
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop) && (target[prop] = source[prop]);
|
|
7985
|
+
return target;
|
|
7986
|
+
};
|
|
7987
|
+
const Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
|
|
7988
|
+
var _a;
|
|
6751
7989
|
const $ = reactCompilerRuntime.c(37);
|
|
6752
7990
|
let children, onFocus, restProps, t0;
|
|
6753
|
-
$[0] !== props ? ({
|
|
7991
|
+
$[0] !== props ? (_a = props, {
|
|
6754
7992
|
children,
|
|
6755
7993
|
space: t0,
|
|
6756
|
-
onFocus
|
|
6757
|
-
|
|
6758
|
-
|
|
7994
|
+
onFocus
|
|
7995
|
+
} = _a, restProps = __objRest$2(_a, [
|
|
7996
|
+
"children",
|
|
7997
|
+
"space",
|
|
7998
|
+
"onFocus"
|
|
7999
|
+
]), $[0] = props, $[1] = children, $[2] = onFocus, $[3] = restProps, $[4] = t0) : (children = $[1], onFocus = $[2], restProps = $[3], t0 = $[4]);
|
|
6759
8000
|
const space = t0 === void 0 ? 1 : t0, ref = react.useRef(null), [focusedElement, setFocusedElement] = react.useState(null), focusedElementRef = react.useRef(focusedElement);
|
|
6760
8001
|
let t1, t2;
|
|
6761
8002
|
$[5] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[5] = t2) : t2 = $[5], t1 = t2;
|
|
@@ -6777,17 +8018,14 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
6777
8018
|
stateRef.current = state;
|
|
6778
8019
|
}, t9 = [state], $[12] = state, $[13] = t8, $[14] = t9) : (t8 = $[13], t9 = $[14]), react.useEffect(t8, t9);
|
|
6779
8020
|
let t10;
|
|
6780
|
-
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) => ({
|
|
6781
|
-
...s,
|
|
8021
|
+
$[15] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) => __spreadProps$2(__spreadValues$2({}, s), {
|
|
6782
8022
|
[path_0]: {
|
|
6783
8023
|
element,
|
|
6784
8024
|
expanded
|
|
6785
8025
|
}
|
|
6786
8026
|
})), selected && setFocusedElement(element), () => {
|
|
6787
8027
|
setState((s_0) => {
|
|
6788
|
-
const newState = {
|
|
6789
|
-
...s_0
|
|
6790
|
-
};
|
|
8028
|
+
const newState = __spreadValues$2({}, s_0);
|
|
6791
8029
|
return delete newState[path_0], newState;
|
|
6792
8030
|
});
|
|
6793
8031
|
}), $[15] = t10) : t10 = $[15];
|
|
@@ -6796,13 +8034,11 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
6796
8034
|
$[16] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (path_1, expanded_0) => {
|
|
6797
8035
|
setState((s_1) => {
|
|
6798
8036
|
const itemState = s_1[path_1];
|
|
6799
|
-
return itemState ? {
|
|
6800
|
-
|
|
6801
|
-
[path_1]: {
|
|
6802
|
-
...itemState,
|
|
8037
|
+
return itemState ? __spreadProps$2(__spreadValues$2({}, s_1), {
|
|
8038
|
+
[path_1]: __spreadProps$2(__spreadValues$2({}, itemState), {
|
|
6803
8039
|
expanded: expanded_0
|
|
6804
|
-
}
|
|
6805
|
-
} : s_1;
|
|
8040
|
+
})
|
|
8041
|
+
}) : s_1;
|
|
6806
8042
|
});
|
|
6807
8043
|
}, $[16] = t11) : t11 = $[16];
|
|
6808
8044
|
const setExpanded = t11;
|
|
@@ -6823,6 +8059,7 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
6823
8059
|
const contextValue = t12;
|
|
6824
8060
|
let t15;
|
|
6825
8061
|
$[21] !== itemElements ? (t15 = (event) => {
|
|
8062
|
+
var _a2;
|
|
6826
8063
|
if (focusedElementRef.current) {
|
|
6827
8064
|
if (event.key === "ArrowDown") {
|
|
6828
8065
|
event.preventDefault();
|
|
@@ -6847,13 +8084,11 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
6847
8084
|
if (itemState_0.expanded)
|
|
6848
8085
|
setState((s_2) => {
|
|
6849
8086
|
const itemState_1 = s_2[itemKey];
|
|
6850
|
-
return itemState_1 ? {
|
|
6851
|
-
|
|
6852
|
-
[itemKey]: {
|
|
6853
|
-
...itemState_1,
|
|
8087
|
+
return itemState_1 ? __spreadProps$2(__spreadValues$2({}, s_2), {
|
|
8088
|
+
[itemKey]: __spreadProps$2(__spreadValues$2({}, itemState_1), {
|
|
6854
8089
|
expanded: !1
|
|
6855
|
-
}
|
|
6856
|
-
} : s_2;
|
|
8090
|
+
})
|
|
8091
|
+
}) : s_2;
|
|
6857
8092
|
});
|
|
6858
8093
|
else {
|
|
6859
8094
|
const itemPath = itemKey.split("/");
|
|
@@ -6868,15 +8103,13 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
6868
8103
|
const focusedKey = focusedElementRef.current.getAttribute("data-tree-key");
|
|
6869
8104
|
if (!focusedKey)
|
|
6870
8105
|
return;
|
|
6871
|
-
stateRef.current[focusedKey]
|
|
8106
|
+
(_a2 = stateRef.current[focusedKey]) != null && _a2.expanded || setState((s_3) => {
|
|
6872
8107
|
const itemState_2 = s_3[focusedKey];
|
|
6873
|
-
return itemState_2 ? {
|
|
6874
|
-
|
|
6875
|
-
[focusedKey]: {
|
|
6876
|
-
...itemState_2,
|
|
8108
|
+
return itemState_2 ? __spreadProps$2(__spreadValues$2({}, s_3), {
|
|
8109
|
+
[focusedKey]: __spreadProps$2(__spreadValues$2({}, itemState_2), {
|
|
6877
8110
|
expanded: !0
|
|
6878
|
-
}
|
|
6879
|
-
} : s_3;
|
|
8111
|
+
})
|
|
8112
|
+
}) : s_3;
|
|
6880
8113
|
});
|
|
6881
8114
|
return;
|
|
6882
8115
|
}
|
|
@@ -6885,7 +8118,7 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
6885
8118
|
const handleKeyDown = t15;
|
|
6886
8119
|
let t16;
|
|
6887
8120
|
$[23] !== onFocus ? (t16 = (event_0) => {
|
|
6888
|
-
setFocusedElement(event_0.target), onFocus
|
|
8121
|
+
setFocusedElement(event_0.target), onFocus == null || onFocus(event_0);
|
|
6889
8122
|
}, $[23] = onFocus, $[24] = t16) : t16 = $[24];
|
|
6890
8123
|
const handleFocus = t16;
|
|
6891
8124
|
let t17;
|
|
@@ -6898,7 +8131,7 @@ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null),
|
|
|
6898
8131
|
let t18;
|
|
6899
8132
|
$[26] !== children ? (t18 = [children], $[26] = children, $[27] = t18) : t18 = $[27], react.useEffect(t17, t18);
|
|
6900
8133
|
let t19;
|
|
6901
|
-
$[28] !== children || $[29] !== handleFocus || $[30] !== handleKeyDown || $[31] !== restProps || $[32] !== space ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "data-ui": "Tree",
|
|
8134
|
+
$[28] !== children || $[29] !== handleFocus || $[30] !== handleKeyDown || $[31] !== restProps || $[32] !== space ? (t19 = /* @__PURE__ */ jsxRuntime.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];
|
|
6902
8135
|
let t20;
|
|
6903
8136
|
return $[34] !== contextValue || $[35] !== t19 ? (t20 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t19 }), $[34] = contextValue, $[35] = t19, $[36] = t20) : t20 = $[36], t20;
|
|
6904
8137
|
}));
|
|
@@ -7001,25 +8234,61 @@ function useTree() {
|
|
|
7001
8234
|
throw new Error("Tree: missing context value");
|
|
7002
8235
|
return tree;
|
|
7003
8236
|
}
|
|
8237
|
+
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) => {
|
|
8238
|
+
for (var prop in b || (b = {}))
|
|
8239
|
+
__hasOwnProp$1.call(b, prop) && __defNormalProp$1(a, prop, b[prop]);
|
|
8240
|
+
if (__getOwnPropSymbols$1)
|
|
8241
|
+
for (var prop of __getOwnPropSymbols$1(b))
|
|
8242
|
+
__propIsEnum$1.call(b, prop) && __defNormalProp$1(a, prop, b[prop]);
|
|
8243
|
+
return a;
|
|
8244
|
+
}, __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)), __objRest$1 = (source, exclude) => {
|
|
8245
|
+
var target = {};
|
|
8246
|
+
for (var prop in source)
|
|
8247
|
+
__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
8248
|
+
if (source != null && __getOwnPropSymbols$1)
|
|
8249
|
+
for (var prop of __getOwnPropSymbols$1(source))
|
|
8250
|
+
exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop) && (target[prop] = source[prop]);
|
|
8251
|
+
return target;
|
|
8252
|
+
};
|
|
7004
8253
|
const TreeGroup = react.memo(function(props) {
|
|
8254
|
+
var _a;
|
|
7005
8255
|
const $ = reactCompilerRuntime.c(9);
|
|
7006
8256
|
let children, restProps, t0;
|
|
7007
|
-
$[0] !== props ? ({
|
|
8257
|
+
$[0] !== props ? (_a = props, {
|
|
7008
8258
|
children,
|
|
7009
|
-
expanded: t0
|
|
7010
|
-
|
|
7011
|
-
|
|
8259
|
+
expanded: t0
|
|
8260
|
+
} = _a, restProps = __objRest$1(_a, [
|
|
8261
|
+
"children",
|
|
8262
|
+
"expanded"
|
|
8263
|
+
]), $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
|
|
7012
8264
|
const expanded = t0 === void 0 ? !1 : t0, tree = useTree(), t1 = !expanded;
|
|
7013
8265
|
let t2;
|
|
7014
|
-
return $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.space ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { as: "ul", "data-ui": "TreeGroup",
|
|
7015
|
-
})
|
|
8266
|
+
return $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.space ? (t2 = /* @__PURE__ */ jsxRuntime.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;
|
|
8267
|
+
});
|
|
8268
|
+
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) => {
|
|
8269
|
+
for (var prop in b || (b = {}))
|
|
8270
|
+
__hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);
|
|
8271
|
+
if (__getOwnPropSymbols)
|
|
8272
|
+
for (var prop of __getOwnPropSymbols(b))
|
|
8273
|
+
__propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);
|
|
8274
|
+
return a;
|
|
8275
|
+
}, __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)), __objRest = (source, exclude) => {
|
|
8276
|
+
var target = {};
|
|
8277
|
+
for (var prop in source)
|
|
8278
|
+
__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0 && (target[prop] = source[prop]);
|
|
8279
|
+
if (source != null && __getOwnPropSymbols)
|
|
8280
|
+
for (var prop of __getOwnPropSymbols(source))
|
|
8281
|
+
exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop) && (target[prop] = source[prop]);
|
|
8282
|
+
return target;
|
|
8283
|
+
};
|
|
8284
|
+
const Root = react.memo(styledComponents.styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styledComponents.styled(Box).attrs({
|
|
7016
8285
|
forwardedAs: "a"
|
|
7017
8286
|
})(treeItemBoxStyle), ToggleArrowText = styledComponents.styled(Text)`
|
|
7018
8287
|
& > svg {
|
|
7019
8288
|
transition: transform 100ms;
|
|
7020
8289
|
}
|
|
7021
8290
|
`, TreeItem = react.memo(function(props) {
|
|
7022
|
-
const {
|
|
8291
|
+
const _a = props, {
|
|
7023
8292
|
children,
|
|
7024
8293
|
expanded: expandedProp = !1,
|
|
7025
8294
|
fontSize: fontSize2 = 1,
|
|
@@ -7033,15 +8302,28 @@ const TreeGroup = react.memo(function(props) {
|
|
|
7033
8302
|
selected = !1,
|
|
7034
8303
|
space = 2,
|
|
7035
8304
|
text,
|
|
7036
|
-
weight
|
|
7037
|
-
|
|
7038
|
-
|
|
8305
|
+
weight
|
|
8306
|
+
} = _a, restProps = __objRest(_a, [
|
|
8307
|
+
"children",
|
|
8308
|
+
"expanded",
|
|
8309
|
+
"fontSize",
|
|
8310
|
+
"href",
|
|
8311
|
+
"icon",
|
|
8312
|
+
"id",
|
|
8313
|
+
"linkAs",
|
|
8314
|
+
"muted",
|
|
8315
|
+
"onClick",
|
|
8316
|
+
"padding",
|
|
8317
|
+
"selected",
|
|
8318
|
+
"space",
|
|
8319
|
+
"text",
|
|
8320
|
+
"weight"
|
|
8321
|
+
]), rootRef = react.useRef(null), treeitemRef = react.useRef(null), tree = useTree(), {
|
|
7039
8322
|
path,
|
|
7040
8323
|
registerItem,
|
|
7041
8324
|
setExpanded,
|
|
7042
8325
|
setFocusedElement
|
|
7043
|
-
} = tree, _id = react.useId(), id = idProp || _id, itemPath = react.useMemo(() => path.concat([id || ""]), [id, path]), itemKey = itemPath.join("/"), itemState = tree.state[itemKey], focused = tree.focusedElement === rootRef.current, expanded = itemState
|
|
7044
|
-
...tree,
|
|
8326
|
+
} = tree, _id = react.useId(), id = idProp || _id, itemPath = react.useMemo(() => path.concat([id || ""]), [id, path]), itemKey = itemPath.join("/"), itemState = tree.state[itemKey], focused = tree.focusedElement === rootRef.current, expanded = (itemState == 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 = react.useMemo(() => __spreadProps(__spreadValues({}, tree), {
|
|
7045
8327
|
level: tree.level + 1,
|
|
7046
8328
|
path: itemPath
|
|
7047
8329
|
}), [itemPath, tree]), handleClick = react.useCallback((event) => {
|
|
@@ -7049,7 +8331,10 @@ const TreeGroup = react.memo(function(props) {
|
|
|
7049
8331
|
const target = event.target;
|
|
7050
8332
|
target instanceof HTMLElement && (target.getAttribute("data-ui") === "TreeItem" || target.closest('[data-ui="TreeItem__box"]')) && (event.stopPropagation(), setExpanded(itemKey, !expanded), setFocusedElement(rootRef.current));
|
|
7051
8333
|
}, [expanded, itemKey, onClick, setExpanded, setFocusedElement]), handleKeyDown = react.useCallback((event_0) => {
|
|
7052
|
-
focused && event_0.key === "Enter"
|
|
8334
|
+
if (focused && event_0.key === "Enter") {
|
|
8335
|
+
const el = treeitemRef.current || rootRef.current;
|
|
8336
|
+
el == null || el.click();
|
|
8337
|
+
}
|
|
7053
8338
|
}, [focused]);
|
|
7054
8339
|
react.useEffect(() => {
|
|
7055
8340
|
if (rootRef.current)
|
|
@@ -7067,13 +8352,13 @@ const TreeGroup = react.memo(function(props) {
|
|
|
7067
8352
|
] }),
|
|
7068
8353
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { muted, size: fontSize2, textOverflow: "ellipsis", weight, children: text }) })
|
|
7069
8354
|
] });
|
|
7070
|
-
return href ? /* @__PURE__ */ jsxRuntime.jsxs(Root, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem",
|
|
8355
|
+
return href ? /* @__PURE__ */ jsxRuntime.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: [
|
|
7071
8356
|
/* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, "aria-expanded": expanded, as: linkAs, "data-ui": "TreeItem__box", href, ref: treeitemRef, role: "treeitem", tabIndex, children: content }),
|
|
7072
8357
|
/* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { hidden: !expanded, children }) })
|
|
7073
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs(Root, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey,
|
|
8358
|
+
] })) : /* @__PURE__ */ jsxRuntime.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: [
|
|
7074
8359
|
/* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, as: "div", "data-ui": "TreeItem__box", children: content }),
|
|
7075
8360
|
/* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { expanded, children }) })
|
|
7076
|
-
] });
|
|
8361
|
+
] }));
|
|
7077
8362
|
});
|
|
7078
8363
|
TreeItem.displayName = "Memo(TreeItem)";
|
|
7079
8364
|
exports.Arrow = Arrow;
|