@orderly.network/ui 2.8.14 → 2.9.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +166 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +408 -337
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +202 -133
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/tailwind.config.js +2 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React70 = require('react');
|
|
4
4
|
var tailwindVariants = require('tailwind-variants');
|
|
5
5
|
var reactSlot = require('@radix-ui/react-slot');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -49,7 +49,7 @@ function _interopNamespace(e) {
|
|
|
49
49
|
return Object.freeze(n);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
var
|
|
52
|
+
var React70__namespace = /*#__PURE__*/_interopNamespace(React70);
|
|
53
53
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
54
54
|
var makeBlockie__default = /*#__PURE__*/_interopDefault(makeBlockie);
|
|
55
55
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
@@ -468,7 +468,7 @@ var boxVariants = tv({
|
|
|
468
468
|
__size: false
|
|
469
469
|
}
|
|
470
470
|
});
|
|
471
|
-
var Box =
|
|
471
|
+
var Box = React70__namespace.default.forwardRef((props, forwardedRef) => {
|
|
472
472
|
const {
|
|
473
473
|
asChild = false,
|
|
474
474
|
as: TAG = "div",
|
|
@@ -603,7 +603,7 @@ var flexVariant = tv(
|
|
|
603
603
|
responsiveVariants: true
|
|
604
604
|
}
|
|
605
605
|
);
|
|
606
|
-
var Flex =
|
|
606
|
+
var Flex = React70.forwardRef((props, ref) => {
|
|
607
607
|
const {
|
|
608
608
|
className,
|
|
609
609
|
display,
|
|
@@ -702,7 +702,7 @@ var Spinner = (props) => {
|
|
|
702
702
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "oui-sr-only", children: "Loading..." })
|
|
703
703
|
] });
|
|
704
704
|
};
|
|
705
|
-
var BaseButton =
|
|
705
|
+
var BaseButton = React70__namespace.default.forwardRef(
|
|
706
706
|
(props, forwardedRef) => {
|
|
707
707
|
const {
|
|
708
708
|
asChild = false,
|
|
@@ -717,14 +717,14 @@ var BaseButton = React69__namespace.default.forwardRef(
|
|
|
717
717
|
} = props;
|
|
718
718
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
719
719
|
const isDisabled = typeof disabled !== "undefined" ? disabled : loading;
|
|
720
|
-
const iconElement =
|
|
721
|
-
return icon ?
|
|
720
|
+
const iconElement = React70.useMemo(() => {
|
|
721
|
+
return icon ? React70__namespace.default.cloneElement(icon, {
|
|
722
722
|
size: size === "xs" ? 12 : size === "sm" ? 12 : size === "md" ? 14 : size === "lg" ? 16 : size === "xl" ? 18 : 12,
|
|
723
723
|
className: "oui-text-inherit",
|
|
724
724
|
opacity: loading ? 0 : 1
|
|
725
725
|
}) : null;
|
|
726
726
|
}, [size, icon]);
|
|
727
|
-
const content =
|
|
727
|
+
const content = React70.useMemo(() => {
|
|
728
728
|
if (!leading && !trailing && !iconElement) return children;
|
|
729
729
|
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", itemAlign: "center", className: "oui-space-x-1", children: [
|
|
730
730
|
leading,
|
|
@@ -733,7 +733,7 @@ var BaseButton = React69__namespace.default.forwardRef(
|
|
|
733
733
|
trailing
|
|
734
734
|
] });
|
|
735
735
|
}, [children, leading, trailing, iconElement]);
|
|
736
|
-
const spinnerSize =
|
|
736
|
+
const spinnerSize = React70.useMemo(() => {
|
|
737
737
|
switch (size) {
|
|
738
738
|
case "xl":
|
|
739
739
|
return "md";
|
|
@@ -968,7 +968,7 @@ var buttonVariants = tailwindVariants.tv(
|
|
|
968
968
|
responsiveVariants: ["md", "lg"]
|
|
969
969
|
}
|
|
970
970
|
);
|
|
971
|
-
var Button =
|
|
971
|
+
var Button = React70__namespace.default.forwardRef(
|
|
972
972
|
({
|
|
973
973
|
className,
|
|
974
974
|
variant,
|
|
@@ -1001,9 +1001,9 @@ var Button = React69__namespace.default.forwardRef(
|
|
|
1001
1001
|
}
|
|
1002
1002
|
);
|
|
1003
1003
|
Button.displayName = "Button";
|
|
1004
|
-
var ThrottledButton =
|
|
1005
|
-
const lastCall =
|
|
1006
|
-
const throttle =
|
|
1004
|
+
var ThrottledButton = React70__namespace.default.forwardRef(({ onClick, throttleDuration = 700, ...props }, ref) => {
|
|
1005
|
+
const lastCall = React70.useRef(0);
|
|
1006
|
+
const throttle = React70.useCallback(
|
|
1007
1007
|
(delay, fn) => {
|
|
1008
1008
|
return function(...args) {
|
|
1009
1009
|
const now = Date.now();
|
|
@@ -1088,7 +1088,7 @@ var gridVariants = tv({
|
|
|
1088
1088
|
// autoFlow: "row",
|
|
1089
1089
|
}
|
|
1090
1090
|
});
|
|
1091
|
-
var Grid =
|
|
1091
|
+
var Grid = React70__namespace.default.forwardRef((props, ref) => {
|
|
1092
1092
|
const { className, cols, rows, gap, gapX, gapY, autoFlow, ...rest } = props;
|
|
1093
1093
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1094
1094
|
Box,
|
|
@@ -1138,8 +1138,8 @@ var gridSpanVariants = tv({
|
|
|
1138
1138
|
});
|
|
1139
1139
|
var Span = (props) => {
|
|
1140
1140
|
const { colSpan, rowSpan, className, ...rest } = props;
|
|
1141
|
-
const ref =
|
|
1142
|
-
|
|
1141
|
+
const ref = React70.useRef(null);
|
|
1142
|
+
React70.useEffect(() => {
|
|
1143
1143
|
if (ref.current) {
|
|
1144
1144
|
const parent = ref.current.parentElement;
|
|
1145
1145
|
if (!parent || !parent.classList.contains("oui-grid")) ;
|
|
@@ -1182,7 +1182,7 @@ var iconVariants = tailwindVariants.tv({
|
|
|
1182
1182
|
color: "black"
|
|
1183
1183
|
}
|
|
1184
1184
|
});
|
|
1185
|
-
var BaseIcon =
|
|
1185
|
+
var BaseIcon = React70__namespace.default.forwardRef(
|
|
1186
1186
|
(props, ref) => {
|
|
1187
1187
|
const {
|
|
1188
1188
|
size = 24,
|
|
@@ -1244,7 +1244,7 @@ var avatarVariants = tv({
|
|
|
1244
1244
|
size: "sm"
|
|
1245
1245
|
}
|
|
1246
1246
|
});
|
|
1247
|
-
var AvatarBase =
|
|
1247
|
+
var AvatarBase = React70__namespace.forwardRef(({ className, size, ...props }, ref) => {
|
|
1248
1248
|
const { root } = avatarVariants({ size });
|
|
1249
1249
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1250
1250
|
AvatarPrimitive__namespace.Root,
|
|
@@ -1256,7 +1256,7 @@ var AvatarBase = React69__namespace.forwardRef(({ className, size, ...props }, r
|
|
|
1256
1256
|
);
|
|
1257
1257
|
});
|
|
1258
1258
|
AvatarBase.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
1259
|
-
var AvatarImage =
|
|
1259
|
+
var AvatarImage = React70__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1260
1260
|
const { image } = avatarVariants();
|
|
1261
1261
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1262
1262
|
AvatarPrimitive__namespace.Image,
|
|
@@ -1268,12 +1268,12 @@ var AvatarImage = React69__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1268
1268
|
);
|
|
1269
1269
|
});
|
|
1270
1270
|
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
1271
|
-
var AvatarFallback =
|
|
1271
|
+
var AvatarFallback = React70__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1272
1272
|
const { fallback } = avatarVariants({ className });
|
|
1273
1273
|
return /* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Fallback, { ref, className: fallback(), ...props });
|
|
1274
1274
|
});
|
|
1275
1275
|
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
1276
|
-
var Avatar =
|
|
1276
|
+
var Avatar = React70__namespace.forwardRef((props, ref) => {
|
|
1277
1277
|
const { size, src, fallback, delayMs, alt, onLoadingStatusChange, ...rest } = props;
|
|
1278
1278
|
return /* @__PURE__ */ jsxRuntime.jsxs(AvatarBase, { ...rest, ref, size, children: [
|
|
1279
1279
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1287,13 +1287,13 @@ var Avatar = React69__namespace.forwardRef((props, ref) => {
|
|
|
1287
1287
|
typeof fallback !== "undefined" && /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { delayMs, children: fallback })
|
|
1288
1288
|
] });
|
|
1289
1289
|
});
|
|
1290
|
-
var EVMAvatar =
|
|
1290
|
+
var EVMAvatar = React70__namespace.forwardRef((props, ref) => {
|
|
1291
1291
|
const { address, ...rest } = props;
|
|
1292
|
-
const src =
|
|
1292
|
+
const src = React70.useMemo(() => makeBlockie__default.default(address), [props.address]);
|
|
1293
1293
|
return /* @__PURE__ */ jsxRuntime.jsx(Avatar, { ...rest, src });
|
|
1294
1294
|
});
|
|
1295
1295
|
var ChainIcon = (props) => {
|
|
1296
|
-
const url =
|
|
1296
|
+
const url = React70.useMemo(() => {
|
|
1297
1297
|
return `https://oss.orderly.network/static/network_logo/${props.chainId}.png`;
|
|
1298
1298
|
}, [props.chainId]);
|
|
1299
1299
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1307,7 +1307,7 @@ var ChainIcon = (props) => {
|
|
|
1307
1307
|
);
|
|
1308
1308
|
};
|
|
1309
1309
|
var TokenIcon = (props) => {
|
|
1310
|
-
const url =
|
|
1310
|
+
const url = React70.useMemo(() => {
|
|
1311
1311
|
let name = props.name;
|
|
1312
1312
|
if (typeof props.symbol === "string") {
|
|
1313
1313
|
const arr = props.symbol?.split("_");
|
|
@@ -1327,7 +1327,7 @@ var TokenIcon = (props) => {
|
|
|
1327
1327
|
};
|
|
1328
1328
|
var CombineIcon = (props) => {
|
|
1329
1329
|
const { secondary } = props;
|
|
1330
|
-
const subElement =
|
|
1330
|
+
const subElement = React70.useMemo(() => {
|
|
1331
1331
|
const className = "oui-bg-base-6 oui-absolute oui-bottom-0 oui-right-0 oui-outline oui-outline-2 oui-outline-base-1 oui-z-10";
|
|
1332
1332
|
if (secondary.component) {
|
|
1333
1333
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindVariants.cnBase(className, secondary?.className), children: secondary.component });
|
|
@@ -1354,7 +1354,7 @@ var CombineIcon = (props) => {
|
|
|
1354
1354
|
subElement
|
|
1355
1355
|
] });
|
|
1356
1356
|
};
|
|
1357
|
-
var CloseIcon =
|
|
1357
|
+
var CloseIcon = React70__namespace.default.forwardRef(
|
|
1358
1358
|
(props, ref) => {
|
|
1359
1359
|
const { opacity = 0.54, ...rest } = props;
|
|
1360
1360
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1368,7 +1368,7 @@ var CloseIcon = React69__namespace.default.forwardRef(
|
|
|
1368
1368
|
}
|
|
1369
1369
|
);
|
|
1370
1370
|
CloseIcon.displayName = "CloseIcon";
|
|
1371
|
-
var BaseIconWithPath =
|
|
1371
|
+
var BaseIconWithPath = React70__namespace.default.forwardRef((props, ref) => {
|
|
1372
1372
|
const { opacity = 0.54, d, ...rest } = props;
|
|
1373
1373
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1374
1374
|
"path",
|
|
@@ -1381,7 +1381,7 @@ var BaseIconWithPath = React69__namespace.default.forwardRef((props, ref) => {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
) });
|
|
1383
1383
|
});
|
|
1384
|
-
var CheckIcon =
|
|
1384
|
+
var CheckIcon = React70__namespace.default.forwardRef(
|
|
1385
1385
|
(props, ref) => {
|
|
1386
1386
|
const { opacity = 0.54, ...rest } = props;
|
|
1387
1387
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1395,7 +1395,7 @@ var CheckIcon = React69__namespace.default.forwardRef(
|
|
|
1395
1395
|
}
|
|
1396
1396
|
);
|
|
1397
1397
|
CheckIcon.displayName = "CheckIcon";
|
|
1398
|
-
var ChevronDownIcon =
|
|
1398
|
+
var ChevronDownIcon = React70__namespace.default.forwardRef(
|
|
1399
1399
|
(props, ref) => {
|
|
1400
1400
|
const { opacity = 0.54, ...rest } = props;
|
|
1401
1401
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1409,7 +1409,7 @@ var ChevronDownIcon = React69__namespace.default.forwardRef(
|
|
|
1409
1409
|
}
|
|
1410
1410
|
);
|
|
1411
1411
|
ChevronDownIcon.displayName = "ChevronDownIcon";
|
|
1412
|
-
var ChevronUpIcon =
|
|
1412
|
+
var ChevronUpIcon = React70__namespace.default.forwardRef(
|
|
1413
1413
|
(props, ref) => {
|
|
1414
1414
|
const { opacity = 0.54, ...rest } = props;
|
|
1415
1415
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1423,7 +1423,7 @@ var ChevronUpIcon = React69__namespace.default.forwardRef(
|
|
|
1423
1423
|
}
|
|
1424
1424
|
);
|
|
1425
1425
|
ChevronUpIcon.displayName = "ChevronUpIcon";
|
|
1426
|
-
var CaretUpIcon =
|
|
1426
|
+
var CaretUpIcon = React70__namespace.default.forwardRef(
|
|
1427
1427
|
(props, ref) => {
|
|
1428
1428
|
const { opacity = 0.54, ...rest } = props;
|
|
1429
1429
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1437,7 +1437,7 @@ var CaretUpIcon = React69__namespace.default.forwardRef(
|
|
|
1437
1437
|
}
|
|
1438
1438
|
);
|
|
1439
1439
|
CaretUpIcon.displayName = "CaretUpIcon";
|
|
1440
|
-
var CaretDownIcon =
|
|
1440
|
+
var CaretDownIcon = React70__namespace.default.forwardRef(
|
|
1441
1441
|
(props, ref) => {
|
|
1442
1442
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1443
1443
|
BaseIconWithPath,
|
|
@@ -1450,7 +1450,7 @@ var CaretDownIcon = React69__namespace.default.forwardRef(
|
|
|
1450
1450
|
}
|
|
1451
1451
|
);
|
|
1452
1452
|
CaretDownIcon.displayName = "CaretDownIcon";
|
|
1453
|
-
var CaretLeftIcon =
|
|
1453
|
+
var CaretLeftIcon = React70__namespace.default.forwardRef(
|
|
1454
1454
|
(props, ref) => {
|
|
1455
1455
|
const { opacity = 0.54, ...rest } = props;
|
|
1456
1456
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1464,7 +1464,7 @@ var CaretLeftIcon = React69__namespace.default.forwardRef(
|
|
|
1464
1464
|
}
|
|
1465
1465
|
);
|
|
1466
1466
|
CaretLeftIcon.displayName = "CaretLeftIcon";
|
|
1467
|
-
var CaretRightIcon =
|
|
1467
|
+
var CaretRightIcon = React70__namespace.default.forwardRef(
|
|
1468
1468
|
(props, ref) => {
|
|
1469
1469
|
const { opacity = 0.54, ...rest } = props;
|
|
1470
1470
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1478,7 +1478,7 @@ var CaretRightIcon = React69__namespace.default.forwardRef(
|
|
|
1478
1478
|
}
|
|
1479
1479
|
);
|
|
1480
1480
|
CaretRightIcon.displayName = "CaretRightIcon";
|
|
1481
|
-
var ChevronLeftIcon =
|
|
1481
|
+
var ChevronLeftIcon = React70__namespace.default.forwardRef(
|
|
1482
1482
|
(props, ref) => {
|
|
1483
1483
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1484
1484
|
BaseIconWithPath,
|
|
@@ -1491,7 +1491,7 @@ var ChevronLeftIcon = React69__namespace.default.forwardRef(
|
|
|
1491
1491
|
}
|
|
1492
1492
|
);
|
|
1493
1493
|
ChevronLeftIcon.displayName = "ChevronLeftIcon";
|
|
1494
|
-
var ChevronRightIcon =
|
|
1494
|
+
var ChevronRightIcon = React70__namespace.default.forwardRef(
|
|
1495
1495
|
(props, ref) => {
|
|
1496
1496
|
const { opacity = 0.54, ...rest } = props;
|
|
1497
1497
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1505,7 +1505,7 @@ var ChevronRightIcon = React69__namespace.default.forwardRef(
|
|
|
1505
1505
|
}
|
|
1506
1506
|
);
|
|
1507
1507
|
ChevronRightIcon.displayName = "ChevronRightIcon";
|
|
1508
|
-
var CalendarMinusIcon =
|
|
1508
|
+
var CalendarMinusIcon = React70__namespace.default.forwardRef(
|
|
1509
1509
|
(props, ref) => {
|
|
1510
1510
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1511
1511
|
BaseIconWithPath,
|
|
@@ -1518,7 +1518,7 @@ var CalendarMinusIcon = React69__namespace.default.forwardRef(
|
|
|
1518
1518
|
}
|
|
1519
1519
|
);
|
|
1520
1520
|
CalendarMinusIcon.displayName = "CalendarMinusIcon";
|
|
1521
|
-
var SettingIcon =
|
|
1521
|
+
var SettingIcon = React70__namespace.default.forwardRef(
|
|
1522
1522
|
(props, ref) => {
|
|
1523
1523
|
const { opacity = 0.54, ...rest } = props;
|
|
1524
1524
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1532,7 +1532,7 @@ var SettingIcon = React69__namespace.default.forwardRef(
|
|
|
1532
1532
|
}
|
|
1533
1533
|
);
|
|
1534
1534
|
SettingIcon.displayName = "SettingIcon";
|
|
1535
|
-
var CloseSquareFillIcon =
|
|
1535
|
+
var CloseSquareFillIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1536
1536
|
const { opacity = 0.54, ...rest } = props;
|
|
1537
1537
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1538
1538
|
"path",
|
|
@@ -1544,7 +1544,7 @@ var CloseSquareFillIcon = React69__namespace.default.forwardRef((props, ref) =>
|
|
|
1544
1544
|
) });
|
|
1545
1545
|
});
|
|
1546
1546
|
CloseSquareFillIcon.displayName = "CloseSquareFillIcon";
|
|
1547
|
-
var CloseCircleFillIcon =
|
|
1547
|
+
var CloseCircleFillIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1548
1548
|
const { opacity = 0.54, ...rest } = props;
|
|
1549
1549
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1550
1550
|
"path",
|
|
@@ -1556,7 +1556,7 @@ var CloseCircleFillIcon = React69__namespace.default.forwardRef((props, ref) =>
|
|
|
1556
1556
|
) });
|
|
1557
1557
|
});
|
|
1558
1558
|
CloseCircleFillIcon.displayName = "CloseCircleFillIcon";
|
|
1559
|
-
var CheckedCircleFillIcon =
|
|
1559
|
+
var CheckedCircleFillIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1560
1560
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1561
1561
|
BaseIconWithPath,
|
|
1562
1562
|
{
|
|
@@ -1567,7 +1567,7 @@ var CheckedCircleFillIcon = React69__namespace.default.forwardRef((props, ref) =
|
|
|
1567
1567
|
);
|
|
1568
1568
|
});
|
|
1569
1569
|
CheckedCircleFillIcon.displayName = "CheckedCircleFillIcon";
|
|
1570
|
-
var CheckedSquareFillIcon =
|
|
1570
|
+
var CheckedSquareFillIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1571
1571
|
const { opacity = 0.54, ...rest } = props;
|
|
1572
1572
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1573
1573
|
"path",
|
|
@@ -1581,7 +1581,7 @@ var CheckedSquareFillIcon = React69__namespace.default.forwardRef((props, ref) =
|
|
|
1581
1581
|
) });
|
|
1582
1582
|
});
|
|
1583
1583
|
CheckedSquareFillIcon.displayName = "CheckSquareFillIcon";
|
|
1584
|
-
var CheckSquareEmptyIcon =
|
|
1584
|
+
var CheckSquareEmptyIcon = React70__namespace.default.forwardRef(
|
|
1585
1585
|
(props, ref) => {
|
|
1586
1586
|
const { opacity = 0.54, ...rest } = props;
|
|
1587
1587
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1597,7 +1597,7 @@ var CheckSquareEmptyIcon = React69__namespace.default.forwardRef(
|
|
|
1597
1597
|
}
|
|
1598
1598
|
);
|
|
1599
1599
|
CheckSquareEmptyIcon.displayName = "CheckSquareEmptyIcon";
|
|
1600
|
-
var PlusIcon =
|
|
1600
|
+
var PlusIcon = React70__namespace.default.forwardRef(
|
|
1601
1601
|
(props, ref) => {
|
|
1602
1602
|
const { opacity = 0.54, ...rest } = props;
|
|
1603
1603
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1611,7 +1611,7 @@ var PlusIcon = React69__namespace.default.forwardRef(
|
|
|
1611
1611
|
}
|
|
1612
1612
|
);
|
|
1613
1613
|
PlusIcon.displayName = "PlusIcon";
|
|
1614
|
-
var ReduceIcon =
|
|
1614
|
+
var ReduceIcon = React70__namespace.default.forwardRef(
|
|
1615
1615
|
(props, ref) => {
|
|
1616
1616
|
const { opacity = 0.54, ...rest } = props;
|
|
1617
1617
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1629,7 +1629,7 @@ var ReduceIcon = React69__namespace.default.forwardRef(
|
|
|
1629
1629
|
}
|
|
1630
1630
|
);
|
|
1631
1631
|
ReduceIcon.displayName = "ReduceIcon";
|
|
1632
|
-
var CircleOutlinedIcon =
|
|
1632
|
+
var CircleOutlinedIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1633
1633
|
const { opacity = 0.54, ...rest } = props;
|
|
1634
1634
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1635
1635
|
"path",
|
|
@@ -1641,7 +1641,7 @@ var CircleOutlinedIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
|
1641
1641
|
) });
|
|
1642
1642
|
});
|
|
1643
1643
|
CircleOutlinedIcon.displayName = "CircleOutlinedIcon";
|
|
1644
|
-
var SquareOutlinedIcon =
|
|
1644
|
+
var SquareOutlinedIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1645
1645
|
const { opacity = 0.54, ...rest } = props;
|
|
1646
1646
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1647
1647
|
"path",
|
|
@@ -1653,7 +1653,7 @@ var SquareOutlinedIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
|
1653
1653
|
) });
|
|
1654
1654
|
});
|
|
1655
1655
|
SquareOutlinedIcon.displayName = "SquareOutlinedIcon";
|
|
1656
|
-
var ExclamationFillIcon =
|
|
1656
|
+
var ExclamationFillIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1657
1657
|
const { ...rest } = props;
|
|
1658
1658
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1659
1659
|
"path",
|
|
@@ -1664,7 +1664,7 @@ var ExclamationFillIcon = React69__namespace.default.forwardRef((props, ref) =>
|
|
|
1664
1664
|
) });
|
|
1665
1665
|
});
|
|
1666
1666
|
ExclamationFillIcon.displayName = "ExclamationFillIcon";
|
|
1667
|
-
var QuestionFillIcon =
|
|
1667
|
+
var QuestionFillIcon = React70__namespace.default.forwardRef(
|
|
1668
1668
|
(props, ref) => {
|
|
1669
1669
|
const { opacity = 0.54, ...rest } = props;
|
|
1670
1670
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1678,7 +1678,7 @@ var QuestionFillIcon = React69__namespace.default.forwardRef(
|
|
|
1678
1678
|
}
|
|
1679
1679
|
);
|
|
1680
1680
|
QuestionFillIcon.displayName = "ExclamationFillIcon";
|
|
1681
|
-
var ArrowLeftRightIcon =
|
|
1681
|
+
var ArrowLeftRightIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1682
1682
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1683
1683
|
BaseIconWithPath,
|
|
1684
1684
|
{
|
|
@@ -1689,7 +1689,7 @@ var ArrowLeftRightIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
|
1689
1689
|
);
|
|
1690
1690
|
});
|
|
1691
1691
|
ArrowLeftRightIcon.displayName = "ArrowLeftRightIcon";
|
|
1692
|
-
var ArrowDownUpIcon =
|
|
1692
|
+
var ArrowDownUpIcon = React70__namespace.default.forwardRef(
|
|
1693
1693
|
(props, ref) => {
|
|
1694
1694
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1695
1695
|
BaseIconWithPath,
|
|
@@ -1702,7 +1702,7 @@ var ArrowDownUpIcon = React69__namespace.default.forwardRef(
|
|
|
1702
1702
|
}
|
|
1703
1703
|
);
|
|
1704
1704
|
ArrowDownUpIcon.displayName = "ArrowDownUpIconIcon";
|
|
1705
|
-
var ArrowUpSquareFillIcon =
|
|
1705
|
+
var ArrowUpSquareFillIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1706
1706
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1707
1707
|
BaseIconWithPath,
|
|
1708
1708
|
{
|
|
@@ -1713,7 +1713,7 @@ var ArrowUpSquareFillIcon = React69__namespace.default.forwardRef((props, ref) =
|
|
|
1713
1713
|
);
|
|
1714
1714
|
});
|
|
1715
1715
|
ArrowUpSquareFillIcon.displayName = "ArrowUpSquareFillIconIcon";
|
|
1716
|
-
var ArrowDownSquareFillIcon =
|
|
1716
|
+
var ArrowDownSquareFillIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1717
1717
|
const { opacity = 0.54, ...rest } = props;
|
|
1718
1718
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1719
1719
|
"path",
|
|
@@ -1725,7 +1725,7 @@ var ArrowDownSquareFillIcon = React69__namespace.default.forwardRef((props, ref)
|
|
|
1725
1725
|
) });
|
|
1726
1726
|
});
|
|
1727
1727
|
ArrowDownSquareFillIcon.displayName = "ArrowDownSquareFillIconIcon";
|
|
1728
|
-
var ArrowLeftRightSquareFill =
|
|
1728
|
+
var ArrowLeftRightSquareFill = React70__namespace.default.forwardRef((props, ref) => {
|
|
1729
1729
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1730
1730
|
"svg",
|
|
1731
1731
|
{
|
|
@@ -1751,7 +1751,7 @@ var ArrowLeftRightSquareFill = React69__namespace.default.forwardRef((props, ref
|
|
|
1751
1751
|
if (process.env.NODE_ENV !== "production") {
|
|
1752
1752
|
ArrowLeftRightSquareFill.displayName = "ArrowLeftRightSquareFill";
|
|
1753
1753
|
}
|
|
1754
|
-
var ArrowRightUpSquareFillIcon =
|
|
1754
|
+
var ArrowRightUpSquareFillIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
1755
1755
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1756
1756
|
BaseIconWithPath,
|
|
1757
1757
|
{
|
|
@@ -1927,7 +1927,7 @@ var BattleSolidInactiveIcon = (props) => {
|
|
|
1927
1927
|
}
|
|
1928
1928
|
) });
|
|
1929
1929
|
};
|
|
1930
|
-
var FeeTierIcon =
|
|
1930
|
+
var FeeTierIcon = React70__namespace.default.forwardRef(
|
|
1931
1931
|
(props, ref) => {
|
|
1932
1932
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1933
1933
|
BaseIconWithPath,
|
|
@@ -1996,7 +1996,7 @@ var EarnInactiveIcon = (props) => {
|
|
|
1996
1996
|
)
|
|
1997
1997
|
] }) });
|
|
1998
1998
|
};
|
|
1999
|
-
var EditIcon =
|
|
1999
|
+
var EditIcon = React70__namespace.default.forwardRef(
|
|
2000
2000
|
(props, ref) => {
|
|
2001
2001
|
const { opacity = 0.54, ...rest } = props;
|
|
2002
2002
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2010,7 +2010,7 @@ var EditIcon = React69__namespace.default.forwardRef(
|
|
|
2010
2010
|
}
|
|
2011
2011
|
);
|
|
2012
2012
|
EditIcon.displayName = "EditIcon";
|
|
2013
|
-
var EyeIcon =
|
|
2013
|
+
var EyeIcon = React70__namespace.default.forwardRef(
|
|
2014
2014
|
(props, ref) => {
|
|
2015
2015
|
const { opacity = 0.54, ...rest } = props;
|
|
2016
2016
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2024,7 +2024,7 @@ var EyeIcon = React69__namespace.default.forwardRef(
|
|
|
2024
2024
|
}
|
|
2025
2025
|
);
|
|
2026
2026
|
EyeIcon.displayName = "EyeIcon";
|
|
2027
|
-
var ShareIcon =
|
|
2027
|
+
var ShareIcon = React70__namespace.default.forwardRef(
|
|
2028
2028
|
(props, ref) => {
|
|
2029
2029
|
const { opacity = 0.54, ...rest } = props;
|
|
2030
2030
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2038,7 +2038,7 @@ var ShareIcon = React69__namespace.default.forwardRef(
|
|
|
2038
2038
|
}
|
|
2039
2039
|
);
|
|
2040
2040
|
ShareIcon.displayName = "ShareIcon";
|
|
2041
|
-
var EyeCloseIcon =
|
|
2041
|
+
var EyeCloseIcon = React70__namespace.default.forwardRef(
|
|
2042
2042
|
(props, ref) => {
|
|
2043
2043
|
const { opacity = 0.54, ...rest } = props;
|
|
2044
2044
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2052,7 +2052,7 @@ var EyeCloseIcon = React69__namespace.default.forwardRef(
|
|
|
2052
2052
|
}
|
|
2053
2053
|
);
|
|
2054
2054
|
EyeCloseIcon.displayName = "EyeCloseIcon";
|
|
2055
|
-
var RefreshIcon =
|
|
2055
|
+
var RefreshIcon = React70__namespace.default.forwardRef(
|
|
2056
2056
|
(props, ref) => {
|
|
2057
2057
|
const { opacity = 0.54, ...rest } = props;
|
|
2058
2058
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2210,7 +2210,7 @@ var EsOrderlyIcon = (props) => {
|
|
|
2210
2210
|
}
|
|
2211
2211
|
);
|
|
2212
2212
|
};
|
|
2213
|
-
var InfoCircleIcon =
|
|
2213
|
+
var InfoCircleIcon = React70__namespace.default.forwardRef(
|
|
2214
2214
|
(props, ref) => {
|
|
2215
2215
|
const { className, opacity = 0.36, ...rest } = props;
|
|
2216
2216
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2237,14 +2237,14 @@ var InfoCircleIcon = React69__namespace.default.forwardRef(
|
|
|
2237
2237
|
}
|
|
2238
2238
|
);
|
|
2239
2239
|
var WalletIcon = (props) => {
|
|
2240
|
-
const url =
|
|
2240
|
+
const url = React70.useMemo(() => {
|
|
2241
2241
|
const split = props.name?.split(" ");
|
|
2242
2242
|
const formatWalletName = split?.[0]?.toLowerCase();
|
|
2243
2243
|
return `https://oss.orderly.network/static/wallet_icon/${formatWalletName}.png`;
|
|
2244
2244
|
}, [props.name]);
|
|
2245
2245
|
return /* @__PURE__ */ jsxRuntime.jsx(Avatar, { size: props.size, src: url, alt: `${props.name}` });
|
|
2246
2246
|
};
|
|
2247
|
-
var CalendarIcon =
|
|
2247
|
+
var CalendarIcon = React70__namespace.default.forwardRef(
|
|
2248
2248
|
(props, ref) => {
|
|
2249
2249
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2250
2250
|
BaseIconWithPath,
|
|
@@ -2257,7 +2257,7 @@ var CalendarIcon = React69__namespace.default.forwardRef(
|
|
|
2257
2257
|
}
|
|
2258
2258
|
);
|
|
2259
2259
|
CalendarIcon.displayName = "CaretLeftIcon";
|
|
2260
|
-
var CopyIcon =
|
|
2260
|
+
var CopyIcon = React70__namespace.default.forwardRef(
|
|
2261
2261
|
(props, ref) => {
|
|
2262
2262
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2263
2263
|
BaseIconWithPath,
|
|
@@ -2270,7 +2270,7 @@ var CopyIcon = React69__namespace.default.forwardRef(
|
|
|
2270
2270
|
}
|
|
2271
2271
|
);
|
|
2272
2272
|
CopyIcon.displayName = "CopyIcon";
|
|
2273
|
-
var ServerFillIcon =
|
|
2273
|
+
var ServerFillIcon = React70__namespace.default.forwardRef(
|
|
2274
2274
|
(props, ref) => {
|
|
2275
2275
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2276
2276
|
BaseIconWithPath,
|
|
@@ -2283,7 +2283,7 @@ var ServerFillIcon = React69__namespace.default.forwardRef(
|
|
|
2283
2283
|
}
|
|
2284
2284
|
);
|
|
2285
2285
|
ServerFillIcon.displayName = "ServerFillIcon";
|
|
2286
|
-
var SortingAscIcon =
|
|
2286
|
+
var SortingAscIcon = React70__namespace.default.forwardRef(
|
|
2287
2287
|
(props, ref) => {
|
|
2288
2288
|
const { opacity = 0.54, ...rest } = props;
|
|
2289
2289
|
return /* @__PURE__ */ jsxRuntime.jsxs(BaseIcon, { ref, ...rest, children: [
|
|
@@ -2307,7 +2307,7 @@ var SortingAscIcon = React69__namespace.default.forwardRef(
|
|
|
2307
2307
|
}
|
|
2308
2308
|
);
|
|
2309
2309
|
SortingAscIcon.displayName = "SortingAscIcon";
|
|
2310
|
-
var SortingDescIcon =
|
|
2310
|
+
var SortingDescIcon = React70__namespace.default.forwardRef(
|
|
2311
2311
|
(props, ref) => {
|
|
2312
2312
|
const { opacity = 0.54, ...rest } = props;
|
|
2313
2313
|
return /* @__PURE__ */ jsxRuntime.jsxs(BaseIcon, { ref, ...rest, children: [
|
|
@@ -2331,7 +2331,7 @@ var SortingDescIcon = React69__namespace.default.forwardRef(
|
|
|
2331
2331
|
}
|
|
2332
2332
|
);
|
|
2333
2333
|
SortingDescIcon.displayName = "SortingDescIcon";
|
|
2334
|
-
var ArrowUpShortIcon =
|
|
2334
|
+
var ArrowUpShortIcon = React70__namespace.default.forwardRef(
|
|
2335
2335
|
(props, ref) => {
|
|
2336
2336
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2337
2337
|
BaseIconWithPath,
|
|
@@ -2343,7 +2343,7 @@ var ArrowUpShortIcon = React69__namespace.default.forwardRef(
|
|
|
2343
2343
|
);
|
|
2344
2344
|
}
|
|
2345
2345
|
);
|
|
2346
|
-
var ArrowDownShortIcon =
|
|
2346
|
+
var ArrowDownShortIcon = React70__namespace.default.forwardRef(
|
|
2347
2347
|
(props, ref) => {
|
|
2348
2348
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2349
2349
|
BaseIconWithPath,
|
|
@@ -2355,7 +2355,7 @@ var ArrowDownShortIcon = React69__namespace.default.forwardRef(
|
|
|
2355
2355
|
);
|
|
2356
2356
|
}
|
|
2357
2357
|
);
|
|
2358
|
-
var ArrowLeftShortIcon =
|
|
2358
|
+
var ArrowLeftShortIcon = React70__namespace.default.forwardRef(
|
|
2359
2359
|
(props, ref) => {
|
|
2360
2360
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2361
2361
|
BaseIconWithPath,
|
|
@@ -2367,7 +2367,7 @@ var ArrowLeftShortIcon = React69__namespace.default.forwardRef(
|
|
|
2367
2367
|
);
|
|
2368
2368
|
}
|
|
2369
2369
|
);
|
|
2370
|
-
var ArrowRightShortIcon =
|
|
2370
|
+
var ArrowRightShortIcon = React70__namespace.default.forwardRef(
|
|
2371
2371
|
(props, ref) => {
|
|
2372
2372
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2373
2373
|
BaseIconWithPath,
|
|
@@ -2383,7 +2383,7 @@ ArrowUpShortIcon.displayName = "ArrowUpShortIcon";
|
|
|
2383
2383
|
ArrowDownShortIcon.displayName = "ArrowDownShortIcon";
|
|
2384
2384
|
ArrowLeftShortIcon.displayName = "ArrowLeftShortIcon";
|
|
2385
2385
|
ArrowRightShortIcon.displayName = "ArrowRightShortIcon";
|
|
2386
|
-
var SortingIcon =
|
|
2386
|
+
var SortingIcon = React70__namespace.default.forwardRef(
|
|
2387
2387
|
(props, ref) => {
|
|
2388
2388
|
const { opacity = 0.54, ...rest } = props;
|
|
2389
2389
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3429,7 +3429,7 @@ var StarChildChatInactiveIcon = (props) => {
|
|
|
3429
3429
|
)
|
|
3430
3430
|
] });
|
|
3431
3431
|
};
|
|
3432
|
-
var CloseRoundFillIcon =
|
|
3432
|
+
var CloseRoundFillIcon = React70__namespace.default.forwardRef((props, ref) => {
|
|
3433
3433
|
const { opacity = 0.54, ...rest } = props;
|
|
3434
3434
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, viewBox: "0 0 28 28", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3435
3435
|
"path",
|
|
@@ -3629,7 +3629,7 @@ function EmptyStateIcon() {
|
|
|
3629
3629
|
);
|
|
3630
3630
|
}
|
|
3631
3631
|
var emptyData_default = EmptyStateIcon;
|
|
3632
|
-
var VectorIcon =
|
|
3632
|
+
var VectorIcon = React70__namespace.default.forwardRef(
|
|
3633
3633
|
(props, ref) => {
|
|
3634
3634
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3635
3635
|
"svg",
|
|
@@ -3727,7 +3727,7 @@ var PersonIcon = () => {
|
|
|
3727
3727
|
}
|
|
3728
3728
|
);
|
|
3729
3729
|
};
|
|
3730
|
-
var SettingFillIcon =
|
|
3730
|
+
var SettingFillIcon = React70__namespace.default.forwardRef(
|
|
3731
3731
|
(props, ref) => {
|
|
3732
3732
|
const { opacity = 0.54, ...rest } = props;
|
|
3733
3733
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3762,7 +3762,7 @@ var TradingLeftNavIcon = (props) => {
|
|
|
3762
3762
|
}
|
|
3763
3763
|
);
|
|
3764
3764
|
};
|
|
3765
|
-
var VaultsIcon =
|
|
3765
|
+
var VaultsIcon = React70__namespace.default.forwardRef(
|
|
3766
3766
|
(props, ref) => {
|
|
3767
3767
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3768
3768
|
"svg",
|
|
@@ -3787,7 +3787,7 @@ var VaultsIcon = React69__namespace.default.forwardRef(
|
|
|
3787
3787
|
if (process.env.NODE_ENV !== "production") {
|
|
3788
3788
|
VaultsIcon.displayName = "VaultsIcon";
|
|
3789
3789
|
}
|
|
3790
|
-
var LeftNavVaultsIcon =
|
|
3790
|
+
var LeftNavVaultsIcon = React70.forwardRef(
|
|
3791
3791
|
(props, ref) => {
|
|
3792
3792
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3793
3793
|
"svg",
|
|
@@ -3833,7 +3833,7 @@ var LeftNavVaultsIcon = React69.forwardRef(
|
|
|
3833
3833
|
if (process.env.NODE_ENV !== "production") {
|
|
3834
3834
|
LeftNavVaultsIcon.displayName = "LeftNavVaultsIcon";
|
|
3835
3835
|
}
|
|
3836
|
-
var NewsFillIcon =
|
|
3836
|
+
var NewsFillIcon = React70__namespace.default.forwardRef(
|
|
3837
3837
|
(props, ref) => {
|
|
3838
3838
|
const { opacity = 1, ...rest } = props;
|
|
3839
3839
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3847,7 +3847,7 @@ var NewsFillIcon = React69__namespace.default.forwardRef(
|
|
|
3847
3847
|
}
|
|
3848
3848
|
);
|
|
3849
3849
|
NewsFillIcon.displayName = "NewsFillIcon";
|
|
3850
|
-
var BellIcon =
|
|
3850
|
+
var BellIcon = React70__namespace.default.forwardRef(
|
|
3851
3851
|
(props, ref) => {
|
|
3852
3852
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3853
3853
|
BaseIconWithPath,
|
|
@@ -3928,7 +3928,7 @@ var ReferralSolidIcon = (props) => {
|
|
|
3928
3928
|
}
|
|
3929
3929
|
) });
|
|
3930
3930
|
};
|
|
3931
|
-
var AddCircleIcon =
|
|
3931
|
+
var AddCircleIcon = React70__namespace.default.forwardRef(
|
|
3932
3932
|
(props, ref) => {
|
|
3933
3933
|
const { className, opacity = 0.54, ...rest } = props;
|
|
3934
3934
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3964,7 +3964,24 @@ var AddCircleIcon = React69__namespace.default.forwardRef(
|
|
|
3964
3964
|
}
|
|
3965
3965
|
);
|
|
3966
3966
|
AddCircleIcon.displayName = "AddCircleIcon";
|
|
3967
|
-
var
|
|
3967
|
+
var WarningIcon = React70__namespace.default.forwardRef(
|
|
3968
|
+
(props, ref) => {
|
|
3969
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3970
|
+
"svg",
|
|
3971
|
+
{
|
|
3972
|
+
width: 20,
|
|
3973
|
+
height: 20,
|
|
3974
|
+
viewBox: "0 0 20 20",
|
|
3975
|
+
fill: "currentColor",
|
|
3976
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3977
|
+
ref,
|
|
3978
|
+
...props,
|
|
3979
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.012 1.666a8.333 8.333 0 1 0 0 16.667 8.333 8.333 0 1 0 0-16.667m0 4.167c.46 0 .833.373.833.833v4.167a.834.834 0 0 1-1.667 0V6.666c0-.46.374-.833.834-.833m0 6.666a.834.834 0 1 1 0 1.668.834.834 0 0 1 0-1.668" })
|
|
3980
|
+
}
|
|
3981
|
+
);
|
|
3982
|
+
}
|
|
3983
|
+
);
|
|
3984
|
+
var RwaIcon = React70__namespace.default.forwardRef(
|
|
3968
3985
|
(props, ref) => {
|
|
3969
3986
|
const { opacity = 1, ...rest } = props;
|
|
3970
3987
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, viewBox: "0 0 12 12", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4035,7 +4052,7 @@ var textVariants = tv({
|
|
|
4035
4052
|
}
|
|
4036
4053
|
}
|
|
4037
4054
|
});
|
|
4038
|
-
var Text =
|
|
4055
|
+
var Text = React70__namespace.default.forwardRef((props, forwardedRef) => {
|
|
4039
4056
|
const {
|
|
4040
4057
|
children,
|
|
4041
4058
|
className,
|
|
@@ -4124,7 +4141,7 @@ var isTextRule = (rule) => {
|
|
|
4124
4141
|
};
|
|
4125
4142
|
var DEFAULT_SYMBOL_FORMAT = "base-quote";
|
|
4126
4143
|
var DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
|
4127
|
-
var FormattedText =
|
|
4144
|
+
var FormattedText = React70__namespace.default.forwardRef(
|
|
4128
4145
|
(props, ref) => {
|
|
4129
4146
|
const {
|
|
4130
4147
|
rule,
|
|
@@ -4149,13 +4166,13 @@ var FormattedText = React69__namespace.default.forwardRef(
|
|
|
4149
4166
|
isIcon,
|
|
4150
4167
|
...rest
|
|
4151
4168
|
} = props;
|
|
4152
|
-
const prefixElement =
|
|
4169
|
+
const prefixElement = React70.useMemo(() => {
|
|
4153
4170
|
if (rule === "symbol" && showIcon) {
|
|
4154
4171
|
return /* @__PURE__ */ jsxRuntime.jsx(TokenIcon, { symbol: children, size: iconSize });
|
|
4155
4172
|
}
|
|
4156
4173
|
return prefix;
|
|
4157
4174
|
}, [prefix, showIcon, rule, iconSize, children]);
|
|
4158
|
-
const suffix =
|
|
4175
|
+
const suffix = React70.useMemo(() => {
|
|
4159
4176
|
if (typeof props.suffix !== "undefined") {
|
|
4160
4177
|
return props.suffix;
|
|
4161
4178
|
}
|
|
@@ -4174,7 +4191,7 @@ var FormattedText = React69__namespace.default.forwardRef(
|
|
|
4174
4191
|
);
|
|
4175
4192
|
}
|
|
4176
4193
|
}, [props.suffix, copyable, children]);
|
|
4177
|
-
const content =
|
|
4194
|
+
const content = React70.useMemo(() => {
|
|
4178
4195
|
if (typeof children === "undefined") {
|
|
4179
4196
|
return "--";
|
|
4180
4197
|
}
|
|
@@ -4206,7 +4223,7 @@ var FormattedText = React69__namespace.default.forwardRef(
|
|
|
4206
4223
|
}
|
|
4207
4224
|
return children;
|
|
4208
4225
|
}, [children, rule, formatString, range, symbolElement]);
|
|
4209
|
-
const contentWithFix =
|
|
4226
|
+
const contentWithFix = React70.useMemo(() => {
|
|
4210
4227
|
if (typeof suffix === "undefined" && typeof prefixElement === "undefined") {
|
|
4211
4228
|
return content;
|
|
4212
4229
|
}
|
|
@@ -4236,7 +4253,7 @@ var gradientTextVariants = tv({
|
|
|
4236
4253
|
}
|
|
4237
4254
|
}
|
|
4238
4255
|
});
|
|
4239
|
-
var GradientText =
|
|
4256
|
+
var GradientText = React70__namespace.default.forwardRef((props, ref) => {
|
|
4240
4257
|
const { color, className, angle, ...rest } = props;
|
|
4241
4258
|
const style = parseAngleProps({ angle });
|
|
4242
4259
|
return (
|
|
@@ -4279,7 +4296,7 @@ var Numeral = (props) => {
|
|
|
4279
4296
|
...rest
|
|
4280
4297
|
} = props;
|
|
4281
4298
|
const num = Number(props.children);
|
|
4282
|
-
const child =
|
|
4299
|
+
const child = React70.useMemo(() => {
|
|
4283
4300
|
if (props.children === "-") return props.children;
|
|
4284
4301
|
if (isNaN(num)) return placeholder ?? "--";
|
|
4285
4302
|
if (typeof visible !== "undefined" && !visible) return masking ?? "*****";
|
|
@@ -4299,7 +4316,7 @@ var Numeral = (props) => {
|
|
|
4299
4316
|
});
|
|
4300
4317
|
}, [num, visible, tick, dp]);
|
|
4301
4318
|
const defaultColor = rest.color || "inherit";
|
|
4302
|
-
const colorName =
|
|
4319
|
+
const colorName = React70.useMemo(() => {
|
|
4303
4320
|
if (!coloring) return defaultColor;
|
|
4304
4321
|
if (typeof visible !== "undefined" && !visible) return defaultColor;
|
|
4305
4322
|
if (Number.isNaN(num)) {
|
|
@@ -4309,7 +4326,7 @@ var Numeral = (props) => {
|
|
|
4309
4326
|
if (num < 0) return "lose";
|
|
4310
4327
|
return "profit";
|
|
4311
4328
|
}, [coloring, num, rest.color, props.visible]);
|
|
4312
|
-
const identifier =
|
|
4329
|
+
const identifier = React70.useMemo(() => {
|
|
4313
4330
|
if (!showIdentifier || Number.isNaN(num) || num === 0) return null;
|
|
4314
4331
|
if (typeof visible !== "undefined" && !visible) return null;
|
|
4315
4332
|
if (num < 0) {
|
|
@@ -4319,7 +4336,7 @@ var Numeral = (props) => {
|
|
|
4319
4336
|
if (identifiers?.profit) return identifiers.profit;
|
|
4320
4337
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: "+" });
|
|
4321
4338
|
}, [num, props.visible, showIdentifier]);
|
|
4322
|
-
const childWithUnit =
|
|
4339
|
+
const childWithUnit = React70.useMemo(() => {
|
|
4323
4340
|
if (typeof suffix === "undefined" && typeof prefix === "undefined" && typeof unit === "undefined" && typeof currency === "undefined" && !showIdentifier) {
|
|
4324
4341
|
return child;
|
|
4325
4342
|
}
|
|
@@ -4404,7 +4421,7 @@ var statisticVariants = tv({
|
|
|
4404
4421
|
// color: "default",
|
|
4405
4422
|
}
|
|
4406
4423
|
});
|
|
4407
|
-
var StatisticLabel =
|
|
4424
|
+
var StatisticLabel = React70__namespace.default.forwardRef(
|
|
4408
4425
|
(props, ref) => {
|
|
4409
4426
|
const { label: labelClassName } = statisticVariants({});
|
|
4410
4427
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4420,10 +4437,10 @@ var StatisticLabel = React69__namespace.default.forwardRef(
|
|
|
4420
4437
|
}
|
|
4421
4438
|
);
|
|
4422
4439
|
StatisticLabel.displayName = "StatisticLabel";
|
|
4423
|
-
var Statistic =
|
|
4440
|
+
var Statistic = React70__namespace.default.forwardRef((props, ref) => {
|
|
4424
4441
|
const { label, valueProps, align, className, classNames, children, ...rest } = props;
|
|
4425
4442
|
const { root, value: valueClassName } = statisticVariants({ align });
|
|
4426
|
-
const value =
|
|
4443
|
+
const value = React70.useMemo(() => {
|
|
4427
4444
|
if (typeof children === "string" || typeof children === "number") {
|
|
4428
4445
|
const { className: valueClass, as, ...restValueProps } = valueProps ?? {};
|
|
4429
4446
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4467,7 +4484,7 @@ Text2.pnl = NumTypePnl;
|
|
|
4467
4484
|
Text2.notional = NumTypeNotional;
|
|
4468
4485
|
Text2.assetValue = NumTypeAssetValue;
|
|
4469
4486
|
Text2.collateral = NumTypeCollateral;
|
|
4470
|
-
var BaseInput =
|
|
4487
|
+
var BaseInput = React70.forwardRef(
|
|
4471
4488
|
(props, ref) => {
|
|
4472
4489
|
const {
|
|
4473
4490
|
clearable,
|
|
@@ -4484,14 +4501,14 @@ var BaseInput = React69.forwardRef(
|
|
|
4484
4501
|
value,
|
|
4485
4502
|
...inputProps
|
|
4486
4503
|
} = props;
|
|
4487
|
-
const [cursor, setCursor] =
|
|
4488
|
-
const innerInputRef =
|
|
4489
|
-
const prevInputValue =
|
|
4490
|
-
const isFocused =
|
|
4491
|
-
const innerFormatters =
|
|
4504
|
+
const [cursor, setCursor] = React70.useState(null);
|
|
4505
|
+
const innerInputRef = React70.useRef(null);
|
|
4506
|
+
const prevInputValue = React70.useRef(null);
|
|
4507
|
+
const isFocused = React70.useRef(false);
|
|
4508
|
+
const innerFormatters = React70.useMemo(() => {
|
|
4492
4509
|
return formatters ?? [];
|
|
4493
4510
|
}, [formatters]);
|
|
4494
|
-
|
|
4511
|
+
React70.useEffect(() => {
|
|
4495
4512
|
if (!ref) return;
|
|
4496
4513
|
if (typeof ref === "function") {
|
|
4497
4514
|
ref(innerInputRef.current);
|
|
@@ -4499,7 +4516,7 @@ var BaseInput = React69.forwardRef(
|
|
|
4499
4516
|
ref.current = innerInputRef.current;
|
|
4500
4517
|
}
|
|
4501
4518
|
}, [innerInputRef, ref]);
|
|
4502
|
-
const formatToRender =
|
|
4519
|
+
const formatToRender = React70.useCallback(
|
|
4503
4520
|
(value2) => {
|
|
4504
4521
|
if (!Array.isArray(innerFormatters) || innerFormatters.length === 0)
|
|
4505
4522
|
return value2;
|
|
@@ -4515,7 +4532,7 @@ var BaseInput = React69.forwardRef(
|
|
|
4515
4532
|
},
|
|
4516
4533
|
[innerFormatters]
|
|
4517
4534
|
);
|
|
4518
|
-
const formatToChange =
|
|
4535
|
+
const formatToChange = React70.useCallback(
|
|
4519
4536
|
(value2, originValue) => {
|
|
4520
4537
|
if (!Array.isArray(innerFormatters) || innerFormatters.length === 0)
|
|
4521
4538
|
return value2;
|
|
@@ -4532,11 +4549,11 @@ var BaseInput = React69.forwardRef(
|
|
|
4532
4549
|
},
|
|
4533
4550
|
[innerFormatters]
|
|
4534
4551
|
);
|
|
4535
|
-
const formattedValue =
|
|
4552
|
+
const formattedValue = React70.useMemo(() => {
|
|
4536
4553
|
if (typeof value === "undefined" || value === null) return "";
|
|
4537
4554
|
return formatToRender(value);
|
|
4538
4555
|
}, [value, formatToRender]);
|
|
4539
|
-
|
|
4556
|
+
React70.useEffect(() => {
|
|
4540
4557
|
if (document.activeElement !== innerInputRef.current) return;
|
|
4541
4558
|
const nextValueLen = `${formattedValue}`.length;
|
|
4542
4559
|
const prevValueLen = prevInputValue.current?.length || 0;
|
|
@@ -4758,7 +4775,7 @@ var inputVariants = tv(
|
|
|
4758
4775
|
responsiveVariants: ["md", "lg"]
|
|
4759
4776
|
}
|
|
4760
4777
|
);
|
|
4761
|
-
var Input =
|
|
4778
|
+
var Input = React70__namespace.default.forwardRef((props, ref) => {
|
|
4762
4779
|
const {
|
|
4763
4780
|
size,
|
|
4764
4781
|
disabled,
|
|
@@ -4785,7 +4802,7 @@ var Input = React69__namespace.default.forwardRef((props, ref) => {
|
|
|
4785
4802
|
pl: typeof prefix === "undefined" || pl,
|
|
4786
4803
|
pr: typeof suffix === "undefined" || pr
|
|
4787
4804
|
});
|
|
4788
|
-
const cid =
|
|
4805
|
+
const cid = React70.useId();
|
|
4789
4806
|
const suffixElement = typeof onClear !== "undefined" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4790
4807
|
ClearButton,
|
|
4791
4808
|
{
|
|
@@ -4829,7 +4846,7 @@ var Input = React69__namespace.default.forwardRef((props, ref) => {
|
|
|
4829
4846
|
)
|
|
4830
4847
|
] });
|
|
4831
4848
|
});
|
|
4832
|
-
var ClearButton =
|
|
4849
|
+
var ClearButton = React70__namespace.default.forwardRef((props, ref) => {
|
|
4833
4850
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4834
4851
|
"button",
|
|
4835
4852
|
{
|
|
@@ -4890,7 +4907,7 @@ var popoverVariants = tv({
|
|
|
4890
4907
|
var PopoverRoot = PopoverPrimitive__namespace.Root;
|
|
4891
4908
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
4892
4909
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
4893
|
-
var PopoverContent =
|
|
4910
|
+
var PopoverContent = React70__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4894
4911
|
PopoverPrimitive__namespace.Content,
|
|
4895
4912
|
{
|
|
4896
4913
|
ref,
|
|
@@ -4941,7 +4958,7 @@ var scrollAreaVariants = tv({
|
|
|
4941
4958
|
}
|
|
4942
4959
|
}
|
|
4943
4960
|
});
|
|
4944
|
-
var ScrollArea =
|
|
4961
|
+
var ScrollArea = React70__namespace.default.forwardRef((oriProps, ref) => {
|
|
4945
4962
|
const {
|
|
4946
4963
|
className,
|
|
4947
4964
|
classNames,
|
|
@@ -4971,7 +4988,7 @@ var ScrollArea = React69__namespace.default.forwardRef((oriProps, ref) => {
|
|
|
4971
4988
|
);
|
|
4972
4989
|
});
|
|
4973
4990
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
4974
|
-
var ScrollBar =
|
|
4991
|
+
var ScrollBar = React70__namespace.default.forwardRef((oriProps, ref) => {
|
|
4975
4992
|
const { className, orientation = "vertical", ...props } = oriProps;
|
|
4976
4993
|
const { bar, tumb } = scrollAreaVariants({ className, orientation });
|
|
4977
4994
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5144,7 +5161,7 @@ var selectVariants = tv(
|
|
|
5144
5161
|
var SelectRoot = SelectPrimitive__namespace.Root;
|
|
5145
5162
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
5146
5163
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
5147
|
-
var SelectTrigger =
|
|
5164
|
+
var SelectTrigger = React70__namespace.forwardRef(
|
|
5148
5165
|
({
|
|
5149
5166
|
className,
|
|
5150
5167
|
children,
|
|
@@ -5198,7 +5215,7 @@ var SelectTrigger = React69__namespace.forwardRef(
|
|
|
5198
5215
|
}
|
|
5199
5216
|
);
|
|
5200
5217
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
5201
|
-
var SelectScrollUpButton =
|
|
5218
|
+
var SelectScrollUpButton = React70__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5202
5219
|
const { scrollUpButton } = selectVariants();
|
|
5203
5220
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5204
5221
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
@@ -5211,7 +5228,7 @@ var SelectScrollUpButton = React69__namespace.forwardRef(({ className, ...props
|
|
|
5211
5228
|
);
|
|
5212
5229
|
});
|
|
5213
5230
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
5214
|
-
var SelectScrollDownButton =
|
|
5231
|
+
var SelectScrollDownButton = React70__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5215
5232
|
const { scrollDownButton } = selectVariants();
|
|
5216
5233
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5217
5234
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
@@ -5224,7 +5241,7 @@ var SelectScrollDownButton = React69__namespace.forwardRef(({ className, ...prop
|
|
|
5224
5241
|
);
|
|
5225
5242
|
});
|
|
5226
5243
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
5227
|
-
var SelectContent =
|
|
5244
|
+
var SelectContent = React70__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
|
|
5228
5245
|
const { content, viewport } = selectVariants({ position, className });
|
|
5229
5246
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5230
5247
|
SelectPrimitive__namespace.Content,
|
|
@@ -5238,7 +5255,7 @@ var SelectContent = React69__namespace.forwardRef(({ className, children, positi
|
|
|
5238
5255
|
) });
|
|
5239
5256
|
});
|
|
5240
5257
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
5241
|
-
var SelectLabel =
|
|
5258
|
+
var SelectLabel = React70__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5242
5259
|
const { label } = selectVariants();
|
|
5243
5260
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5244
5261
|
SelectPrimitive__namespace.Label,
|
|
@@ -5250,12 +5267,12 @@ var SelectLabel = React69__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
5250
5267
|
);
|
|
5251
5268
|
});
|
|
5252
5269
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
5253
|
-
var SelectItem =
|
|
5270
|
+
var SelectItem = React70__namespace.forwardRef(({ className, children, size, ...props }, ref) => {
|
|
5254
5271
|
const { item } = selectVariants({ size });
|
|
5255
5272
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Item, { ref, className: item({ className }), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children }) });
|
|
5256
5273
|
});
|
|
5257
5274
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
5258
|
-
var SelectSeparator =
|
|
5275
|
+
var SelectSeparator = React70__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5259
5276
|
const { separator } = selectVariants();
|
|
5260
5277
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5261
5278
|
SelectPrimitive__namespace.Separator,
|
|
@@ -5269,17 +5286,17 @@ var SelectSeparator = React69__namespace.forwardRef(({ className, ...props }, re
|
|
|
5269
5286
|
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
5270
5287
|
var CombineSelect = (props) => {
|
|
5271
5288
|
const { options, variant, valueFormatter, ...rest } = props;
|
|
5272
|
-
const [keyword, setKeyword] =
|
|
5273
|
-
const [value, setValue] =
|
|
5289
|
+
const [keyword, setKeyword] = React70.useState("");
|
|
5290
|
+
const [value, setValue] = React70.useState(props.value ?? "");
|
|
5274
5291
|
const { trigger } = selectVariants({
|
|
5275
5292
|
size: props.size,
|
|
5276
5293
|
variant
|
|
5277
5294
|
});
|
|
5278
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5295
|
+
const [selectedIndex, setSelectedIndex] = React70.useState(
|
|
5279
5296
|
() => typeof props.value === "undefined" ? -1 : options.findIndex((option) => option.value === props.value)
|
|
5280
5297
|
);
|
|
5281
|
-
const [focused, setFocused] =
|
|
5282
|
-
const inputRef =
|
|
5298
|
+
const [focused, setFocused] = React70.useState(false);
|
|
5299
|
+
const inputRef = React70.useRef(null);
|
|
5283
5300
|
const onFocus = () => {
|
|
5284
5301
|
setFocused(true);
|
|
5285
5302
|
};
|
|
@@ -5449,7 +5466,7 @@ var SelectWithOptions = (props) => {
|
|
|
5449
5466
|
...rest
|
|
5450
5467
|
} = props;
|
|
5451
5468
|
return /* @__PURE__ */ jsxRuntime.jsx(Select, { ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(SelectGroup, { children: options.map((option, index) => {
|
|
5452
|
-
return
|
|
5469
|
+
return React70__namespace.default.cloneElement(optionRenderer(option, currentValue), {
|
|
5453
5470
|
size: props.size,
|
|
5454
5471
|
key: index,
|
|
5455
5472
|
index
|
|
@@ -5459,7 +5476,7 @@ var SelectWithOptions = (props) => {
|
|
|
5459
5476
|
var TokenSelect = (props) => {
|
|
5460
5477
|
const { tokens, showIcon = true, iconSize, showCaret, ...rest } = props;
|
|
5461
5478
|
const { icon } = selectVariants();
|
|
5462
|
-
const options =
|
|
5479
|
+
const options = React70.useMemo(() => {
|
|
5463
5480
|
return tokens.map((token) => {
|
|
5464
5481
|
return {
|
|
5465
5482
|
...token,
|
|
@@ -5535,16 +5552,16 @@ var Select2 = Select;
|
|
|
5535
5552
|
Select2.options = SelectWithOptions;
|
|
5536
5553
|
Select2.combine = CombineSelect;
|
|
5537
5554
|
Select2.tokens = TokenSelect;
|
|
5538
|
-
var QuantityInput =
|
|
5555
|
+
var QuantityInput = React70.forwardRef(
|
|
5539
5556
|
(props, ref) => {
|
|
5540
5557
|
const { tokens, ...rest } = props;
|
|
5541
|
-
const [token, setToken] =
|
|
5542
|
-
const tokenOptions =
|
|
5558
|
+
const [token, setToken] = React70.useState(tokens[0]);
|
|
5559
|
+
const tokenOptions = React70.useMemo(() => {
|
|
5543
5560
|
return props.tokens.map((token2) => ({
|
|
5544
5561
|
name: token2
|
|
5545
5562
|
}));
|
|
5546
5563
|
}, [props.tokens]);
|
|
5547
|
-
const inputRef =
|
|
5564
|
+
const inputRef = React70.useRef(null);
|
|
5548
5565
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5549
5566
|
Input,
|
|
5550
5567
|
{
|
|
@@ -5610,7 +5627,7 @@ var tooltipVariants = tv({
|
|
|
5610
5627
|
"data-[side=top]:oui-slide-in-from-bottom-2"
|
|
5611
5628
|
]
|
|
5612
5629
|
});
|
|
5613
|
-
var TooltipContent =
|
|
5630
|
+
var TooltipContent = React70__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
|
5614
5631
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5615
5632
|
TooltipPrimitive__namespace.Content,
|
|
5616
5633
|
{
|
|
@@ -5641,7 +5658,7 @@ var TooltipArrow = (props) => {
|
|
|
5641
5658
|
}
|
|
5642
5659
|
);
|
|
5643
5660
|
};
|
|
5644
|
-
var Tooltip =
|
|
5661
|
+
var Tooltip = React70__namespace.forwardRef((originalProps, ref) => {
|
|
5645
5662
|
const {
|
|
5646
5663
|
children,
|
|
5647
5664
|
content,
|
|
@@ -5673,10 +5690,10 @@ var Tooltip = React69__namespace.forwardRef((originalProps, ref) => {
|
|
|
5673
5690
|
);
|
|
5674
5691
|
});
|
|
5675
5692
|
Tooltip.displayName = "Tooltip";
|
|
5676
|
-
var InputWithTooltip =
|
|
5693
|
+
var InputWithTooltip = React70.forwardRef((props, ref) => {
|
|
5677
5694
|
const { tooltip, tooltipProps, triggerClassName, ...inputProps } = props;
|
|
5678
|
-
const [open, setOpen] =
|
|
5679
|
-
|
|
5695
|
+
const [open, setOpen] = React70.useState(false);
|
|
5696
|
+
React70.useEffect(() => {
|
|
5680
5697
|
if (typeof tooltip !== "undefined" && tooltip !== "" && tooltip !== null) {
|
|
5681
5698
|
setOpen(true);
|
|
5682
5699
|
} else {
|
|
@@ -5873,7 +5890,7 @@ var inputHelpTextVariants = tailwindVariants.tv({
|
|
|
5873
5890
|
}
|
|
5874
5891
|
}
|
|
5875
5892
|
});
|
|
5876
|
-
var InputHelpText =
|
|
5893
|
+
var InputHelpText = React70__namespace.default.forwardRef(
|
|
5877
5894
|
(props, ref) => {
|
|
5878
5895
|
const { className, asChild, color, ...rest } = props;
|
|
5879
5896
|
const Comp = asChild ? reactSlot.Slot : "div";
|
|
@@ -5911,7 +5928,7 @@ var textFieldVariants = tv({
|
|
|
5911
5928
|
direction: "column"
|
|
5912
5929
|
}
|
|
5913
5930
|
});
|
|
5914
|
-
var TextField =
|
|
5931
|
+
var TextField = React70__namespace.default.forwardRef((props, ref) => {
|
|
5915
5932
|
const { label, helpText, direction, className, ...inputProps } = props;
|
|
5916
5933
|
const { root, label: labelClassName } = textFieldVariants({ direction });
|
|
5917
5934
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: root({ className, direction }), children: [
|
|
@@ -5929,7 +5946,7 @@ var TextField = React69__namespace.default.forwardRef((props, ref) => {
|
|
|
5929
5946
|
] });
|
|
5930
5947
|
});
|
|
5931
5948
|
TextField.displayName = "TextField";
|
|
5932
|
-
var InputLabel =
|
|
5949
|
+
var InputLabel = React70__namespace.default.forwardRef(
|
|
5933
5950
|
(props, ref) => {
|
|
5934
5951
|
const { asChild = false, className, ...rest } = props;
|
|
5935
5952
|
const Comp = asChild ? reactSlot.Slot : "label";
|
|
@@ -5981,7 +5998,7 @@ var checkboxVariants = tailwindVariants.tv({
|
|
|
5981
5998
|
// style: "checkBox",
|
|
5982
5999
|
}
|
|
5983
6000
|
});
|
|
5984
|
-
var Checkbox =
|
|
6001
|
+
var Checkbox = React70__namespace.forwardRef(({ className, color = "white", variant = "checkBox", ...props }, ref) => {
|
|
5985
6002
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5986
6003
|
CheckboxPrimitive__namespace.Root,
|
|
5987
6004
|
{
|
|
@@ -6109,7 +6126,7 @@ var switchVariants = tailwindVariants.tv({
|
|
|
6109
6126
|
color: "primary"
|
|
6110
6127
|
}
|
|
6111
6128
|
});
|
|
6112
|
-
var Switch =
|
|
6129
|
+
var Switch = React70__namespace.default.forwardRef(({ className, color, ...props }, ref) => {
|
|
6113
6130
|
const { root, thumb } = switchVariants({
|
|
6114
6131
|
className,
|
|
6115
6132
|
color
|
|
@@ -6230,7 +6247,7 @@ function Badge({ className, variant, color, size, ...props }) {
|
|
|
6230
6247
|
}
|
|
6231
6248
|
);
|
|
6232
6249
|
}
|
|
6233
|
-
var Logo =
|
|
6250
|
+
var Logo = React70__namespace.default.forwardRef(({ src, alt, href }, ref) => {
|
|
6234
6251
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "logo oui-px-3", ref, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: href ?? "/", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6235
6252
|
"img",
|
|
6236
6253
|
{
|
|
@@ -6243,8 +6260,8 @@ var Logo = React69__namespace.default.forwardRef(({ src, alt, href }, ref) => {
|
|
|
6243
6260
|
Logo.displayName = "LogoElement";
|
|
6244
6261
|
function useInit(params) {
|
|
6245
6262
|
const { dataSource, loading, ignoreLoadingCheck } = params;
|
|
6246
|
-
const [initialized, setInitialized] =
|
|
6247
|
-
|
|
6263
|
+
const [initialized, setInitialized] = React70.useState(false);
|
|
6264
|
+
React70.useEffect(() => {
|
|
6248
6265
|
if (initialized) return;
|
|
6249
6266
|
if (ignoreLoadingCheck || loading || Array.isArray(dataSource)) {
|
|
6250
6267
|
setInitialized(true);
|
|
@@ -6253,10 +6270,10 @@ function useInit(params) {
|
|
|
6253
6270
|
return initialized;
|
|
6254
6271
|
}
|
|
6255
6272
|
function useScroll(deps) {
|
|
6256
|
-
const scrollRef =
|
|
6257
|
-
const [showLeftShadow, setShowLeftShadow] =
|
|
6258
|
-
const [showRightShadow, setShowRightShadow] =
|
|
6259
|
-
|
|
6273
|
+
const scrollRef = React70.useRef(null);
|
|
6274
|
+
const [showLeftShadow, setShowLeftShadow] = React70.useState(false);
|
|
6275
|
+
const [showRightShadow, setShowRightShadow] = React70.useState(false);
|
|
6276
|
+
React70.useEffect(() => {
|
|
6260
6277
|
if (!scrollRef.current) {
|
|
6261
6278
|
return;
|
|
6262
6279
|
}
|
|
@@ -6265,7 +6282,7 @@ function useScroll(deps) {
|
|
|
6265
6282
|
setShowRightShadow(!isScrolledToRight(scrollRef.current));
|
|
6266
6283
|
});
|
|
6267
6284
|
}, [scrollRef]);
|
|
6268
|
-
|
|
6285
|
+
React70.useEffect(() => {
|
|
6269
6286
|
if (!scrollRef.current) {
|
|
6270
6287
|
return;
|
|
6271
6288
|
}
|
|
@@ -6287,14 +6304,14 @@ function hasHorizontalScroll(element) {
|
|
|
6287
6304
|
}
|
|
6288
6305
|
function useShowHeader(params) {
|
|
6289
6306
|
const { dataSource, loading } = params;
|
|
6290
|
-
const initShowHeader =
|
|
6291
|
-
const showHeader =
|
|
6307
|
+
const initShowHeader = React70.useRef(false);
|
|
6308
|
+
const showHeader = React70.useMemo(() => {
|
|
6292
6309
|
if (loading && !dataSource?.length) {
|
|
6293
6310
|
return initShowHeader.current;
|
|
6294
6311
|
}
|
|
6295
6312
|
return !!dataSource?.length;
|
|
6296
6313
|
}, [loading, dataSource]);
|
|
6297
|
-
|
|
6314
|
+
React70.useEffect(() => {
|
|
6298
6315
|
if (showHeader) {
|
|
6299
6316
|
initShowHeader.current = true;
|
|
6300
6317
|
}
|
|
@@ -6303,8 +6320,8 @@ function useShowHeader(params) {
|
|
|
6303
6320
|
}
|
|
6304
6321
|
function useShowPagination(params) {
|
|
6305
6322
|
const { loading, dataSource, pagination, rows } = params;
|
|
6306
|
-
const initShowPagination =
|
|
6307
|
-
const showPagination =
|
|
6323
|
+
const initShowPagination = React70.useRef(false);
|
|
6324
|
+
const showPagination = React70.useMemo(() => {
|
|
6308
6325
|
if (loading && !dataSource?.length) {
|
|
6309
6326
|
return initShowPagination.current;
|
|
6310
6327
|
}
|
|
@@ -6313,7 +6330,7 @@ function useShowPagination(params) {
|
|
|
6313
6330
|
}
|
|
6314
6331
|
return false;
|
|
6315
6332
|
}, [loading, pagination, dataSource, rows]);
|
|
6316
|
-
|
|
6333
|
+
React70.useEffect(() => {
|
|
6317
6334
|
if (showPagination) {
|
|
6318
6335
|
initShowPagination.current = true;
|
|
6319
6336
|
}
|
|
@@ -6322,7 +6339,7 @@ function useShowPagination(params) {
|
|
|
6322
6339
|
}
|
|
6323
6340
|
function useSort(props) {
|
|
6324
6341
|
const { onSort, initialSort } = props;
|
|
6325
|
-
const [sorting, setSorting] =
|
|
6342
|
+
const [sorting, setSorting] = React70.useState(
|
|
6326
6343
|
initialSort ? [
|
|
6327
6344
|
{
|
|
6328
6345
|
id: initialSort.sortKey,
|
|
@@ -6330,15 +6347,15 @@ function useSort(props) {
|
|
|
6330
6347
|
}
|
|
6331
6348
|
] : []
|
|
6332
6349
|
);
|
|
6333
|
-
|
|
6350
|
+
React70.useEffect(() => {
|
|
6334
6351
|
const { id, desc } = sorting[0] || {};
|
|
6335
6352
|
onSort?.(id ? { sortKey: id, sort: desc ? "desc" : "asc" } : void 0);
|
|
6336
6353
|
}, [sorting, onSort]);
|
|
6337
6354
|
return [sorting, setSorting];
|
|
6338
6355
|
}
|
|
6339
6356
|
function useWrap(deps) {
|
|
6340
|
-
const wrapRef =
|
|
6341
|
-
|
|
6357
|
+
const wrapRef = React70.useRef(null);
|
|
6358
|
+
React70.useEffect(() => {
|
|
6342
6359
|
if (!wrapRef.current) return;
|
|
6343
6360
|
const bgColor = window.getComputedStyle(wrapRef.current).backgroundColor;
|
|
6344
6361
|
wrapRef.current.style.setProperty("--oui-table-background-color", bgColor);
|
|
@@ -6431,7 +6448,7 @@ var TableBody = (props) => {
|
|
|
6431
6448
|
children: props.expandRowRender?.(row, row.index)
|
|
6432
6449
|
}
|
|
6433
6450
|
) });
|
|
6434
|
-
const rowView = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6451
|
+
const rowView = /* @__PURE__ */ jsxRuntime.jsxs(React70.Fragment, { children: [
|
|
6435
6452
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6436
6453
|
"tr",
|
|
6437
6454
|
{
|
|
@@ -6492,7 +6509,7 @@ var TableBody = (props) => {
|
|
|
6492
6509
|
expandView
|
|
6493
6510
|
] }, row.id);
|
|
6494
6511
|
if (typeof props.renderRowContainer === "function") {
|
|
6495
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6512
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React70.Fragment, { children: props.renderRowContainer(row.original, row.index, rowView, row) }, row.id);
|
|
6496
6513
|
}
|
|
6497
6514
|
return rowView;
|
|
6498
6515
|
})
|
|
@@ -6579,7 +6596,7 @@ var DescendingIcon = () => {
|
|
|
6579
6596
|
};
|
|
6580
6597
|
function useMultiSort(props) {
|
|
6581
6598
|
const { onSort, currentSorting } = props;
|
|
6582
|
-
const handleFieldSort =
|
|
6599
|
+
const handleFieldSort = React70.useCallback(
|
|
6583
6600
|
(fieldKey) => {
|
|
6584
6601
|
const isCurrentField = currentSorting?.sortKey === fieldKey;
|
|
6585
6602
|
let newOrder;
|
|
@@ -6594,7 +6611,7 @@ function useMultiSort(props) {
|
|
|
6594
6611
|
},
|
|
6595
6612
|
[currentSorting, onSort]
|
|
6596
6613
|
);
|
|
6597
|
-
const getFieldSort =
|
|
6614
|
+
const getFieldSort = React70.useCallback(
|
|
6598
6615
|
(fieldKey) => {
|
|
6599
6616
|
if (currentSorting?.sortKey === fieldKey) {
|
|
6600
6617
|
return { sortKey: fieldKey, sort: currentSorting.sort };
|
|
@@ -6750,9 +6767,9 @@ var SortIndicator2 = ({ isSorted }) => {
|
|
|
6750
6767
|
desc: /* @__PURE__ */ jsxRuntime.jsx(DescendingIcon, {})
|
|
6751
6768
|
}[isSorted] || /* @__PURE__ */ jsxRuntime.jsx(SortingIcon2, {});
|
|
6752
6769
|
};
|
|
6753
|
-
var LocaleContext =
|
|
6770
|
+
var LocaleContext = React70.createContext(void 0);
|
|
6754
6771
|
var LocaleProvider = (props) => {
|
|
6755
|
-
const value =
|
|
6772
|
+
const value = React70.useMemo(
|
|
6756
6773
|
() => ({ ...props.locale, exist: true }),
|
|
6757
6774
|
[props.locale]
|
|
6758
6775
|
);
|
|
@@ -6783,8 +6800,8 @@ var localeValues = {
|
|
|
6783
6800
|
|
|
6784
6801
|
// src/locale/useLocale.ts
|
|
6785
6802
|
var useLocale = (componentName, defaultLocale) => {
|
|
6786
|
-
const fullLocale =
|
|
6787
|
-
const getLocale =
|
|
6803
|
+
const fullLocale = React70.useContext(LocaleContext);
|
|
6804
|
+
const getLocale = React70.useMemo(() => {
|
|
6788
6805
|
const locale = defaultLocale || localeValues[componentName];
|
|
6789
6806
|
const localeFromContext = fullLocale?.[componentName] || {};
|
|
6790
6807
|
return {
|
|
@@ -6792,7 +6809,7 @@ var useLocale = (componentName, defaultLocale) => {
|
|
|
6792
6809
|
...localeFromContext
|
|
6793
6810
|
};
|
|
6794
6811
|
}, [componentName, defaultLocale, fullLocale]);
|
|
6795
|
-
const getLocaleCode =
|
|
6812
|
+
const getLocaleCode = React70.useMemo(() => {
|
|
6796
6813
|
const localeCode = fullLocale?.locale;
|
|
6797
6814
|
const defaultLocaleCode = localeValues.locale;
|
|
6798
6815
|
return localeCode || defaultLocaleCode;
|
|
@@ -6812,7 +6829,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
6812
6829
|
}
|
|
6813
6830
|
);
|
|
6814
6831
|
Pagination.displayName = "Pagination";
|
|
6815
|
-
var PaginationContent =
|
|
6832
|
+
var PaginationContent = React70__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6816
6833
|
"ul",
|
|
6817
6834
|
{
|
|
6818
6835
|
ref,
|
|
@@ -6824,7 +6841,7 @@ var PaginationContent = React69__namespace.default.forwardRef(({ className, ...p
|
|
|
6824
6841
|
}
|
|
6825
6842
|
));
|
|
6826
6843
|
PaginationContent.displayName = "PaginationContent";
|
|
6827
|
-
var PaginationItem =
|
|
6844
|
+
var PaginationItem = React70__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: tailwindVariants.cnBase("oui-leading-[0px]", className), ...props }));
|
|
6828
6845
|
PaginationItem.displayName = "PaginationItem";
|
|
6829
6846
|
var PaginationLink = ({
|
|
6830
6847
|
className,
|
|
@@ -6956,7 +6973,7 @@ var PaginationItems = (props) => {
|
|
|
6956
6973
|
if (totalPages <= 1) {
|
|
6957
6974
|
return null;
|
|
6958
6975
|
}
|
|
6959
|
-
const pageNumbers =
|
|
6976
|
+
const pageNumbers = React70.useMemo(() => {
|
|
6960
6977
|
if (typeof props.generatePageNumbers === "function") {
|
|
6961
6978
|
return props.generatePageNumbers(currentPage, totalPages);
|
|
6962
6979
|
}
|
|
@@ -7125,7 +7142,7 @@ var useExtensionBuilder = (position, props) => {
|
|
|
7125
7142
|
var ExtensionSlot = (props) => {
|
|
7126
7143
|
const { position, scope, defaultWidget: defaultValue, ...rest } = props;
|
|
7127
7144
|
const elementProps = useExtensionBuilder(position, rest);
|
|
7128
|
-
const Ele =
|
|
7145
|
+
const Ele = React70.useMemo(() => {
|
|
7129
7146
|
const registry = OrderlyExtensionRegistry.getInstance();
|
|
7130
7147
|
const plugin = registry.getPluginsByPosition(position);
|
|
7131
7148
|
return plugin?.render ?? defaultValue ?? NotFound;
|
|
@@ -7366,10 +7383,10 @@ function DataTable(props) {
|
|
|
7366
7383
|
onSort,
|
|
7367
7384
|
initialSort
|
|
7368
7385
|
});
|
|
7369
|
-
const hasMultiSortColumns =
|
|
7386
|
+
const hasMultiSortColumns = React70.useMemo(() => {
|
|
7370
7387
|
return columns.some((col) => col.multiSort && !col.multiSort.onSort);
|
|
7371
7388
|
}, [columns]);
|
|
7372
|
-
const effectiveManualSorting =
|
|
7389
|
+
const effectiveManualSorting = React70.useMemo(() => {
|
|
7373
7390
|
if (!hasMultiSortColumns) {
|
|
7374
7391
|
return manualSorting;
|
|
7375
7392
|
}
|
|
@@ -7383,27 +7400,27 @@ function DataTable(props) {
|
|
|
7383
7400
|
}
|
|
7384
7401
|
return false;
|
|
7385
7402
|
}, [hasMultiSortColumns, manualSorting, sorting, columns]);
|
|
7386
|
-
const dataSource =
|
|
7403
|
+
const dataSource = React70.useMemo(() => {
|
|
7387
7404
|
return Transform.dataSource(props.dataSource || [], columns, sorting);
|
|
7388
7405
|
}, [props.dataSource, columns, sorting]);
|
|
7389
|
-
const formatColumns =
|
|
7406
|
+
const formatColumns = React70.useMemo(
|
|
7390
7407
|
() => Transform.columns(columns, sorting, setSorting),
|
|
7391
7408
|
[columns, sorting, setSorting]
|
|
7392
7409
|
);
|
|
7393
|
-
const columnPinning =
|
|
7410
|
+
const columnPinning = React70.useMemo(
|
|
7394
7411
|
() => Transform.columnPinning(columns),
|
|
7395
7412
|
[columns]
|
|
7396
7413
|
);
|
|
7397
|
-
const rowSelection =
|
|
7414
|
+
const rowSelection = React70.useMemo(
|
|
7398
7415
|
() => props.rowSelection || {},
|
|
7399
7416
|
[props.rowSelection]
|
|
7400
7417
|
);
|
|
7401
|
-
const { state: paginationState, config: paginationConfig } =
|
|
7418
|
+
const { state: paginationState, config: paginationConfig } = React70.useMemo(
|
|
7402
7419
|
() => Transform.pagination(pagination),
|
|
7403
7420
|
[pagination]
|
|
7404
7421
|
);
|
|
7405
7422
|
const initialized = useInit({ dataSource, loading, ignoreLoadingCheck });
|
|
7406
|
-
const columnFilters =
|
|
7423
|
+
const columnFilters = React70.useMemo(() => {
|
|
7407
7424
|
return Array.isArray(props.columnFilters) ? props.columnFilters : props.columnFilters ? [props.columnFilters] : [];
|
|
7408
7425
|
}, [props.columnFilters]);
|
|
7409
7426
|
const table = reactTable.useReactTable({
|
|
@@ -7439,7 +7456,7 @@ function DataTable(props) {
|
|
|
7439
7456
|
...paginationConfig
|
|
7440
7457
|
// ...sortConfig,
|
|
7441
7458
|
});
|
|
7442
|
-
|
|
7459
|
+
React70.useEffect(() => {
|
|
7443
7460
|
props.getTableInstance?.(table);
|
|
7444
7461
|
}, [table]);
|
|
7445
7462
|
const wrapRef = useWrap([className, classNames?.root]);
|
|
@@ -7630,15 +7647,15 @@ var DateRangePicker = (props) => {
|
|
|
7630
7647
|
...calendarProps
|
|
7631
7648
|
} = props;
|
|
7632
7649
|
const [locale] = useLocale("picker");
|
|
7633
|
-
const [open, setOpen] =
|
|
7634
|
-
const [dateRange, setDateRange] =
|
|
7650
|
+
const [open, setOpen] = React70.useState(false);
|
|
7651
|
+
const [dateRange, setDateRange] = React70.useState(
|
|
7635
7652
|
value || initialValue || null
|
|
7636
7653
|
);
|
|
7637
|
-
const [isMobileView, setIsMobileView] =
|
|
7654
|
+
const [isMobileView, setIsMobileView] = React70.useState(false);
|
|
7638
7655
|
const update = useDebouncedCallback((width) => {
|
|
7639
7656
|
setIsMobileView(width <= 768);
|
|
7640
7657
|
}, 100);
|
|
7641
|
-
|
|
7658
|
+
React70.useEffect(() => {
|
|
7642
7659
|
const handleResize = () => {
|
|
7643
7660
|
update(window.innerWidth);
|
|
7644
7661
|
};
|
|
@@ -7648,12 +7665,12 @@ var DateRangePicker = (props) => {
|
|
|
7648
7665
|
window.removeEventListener("resize", handleResize);
|
|
7649
7666
|
};
|
|
7650
7667
|
}, []);
|
|
7651
|
-
|
|
7668
|
+
React70.useEffect(() => {
|
|
7652
7669
|
if (value?.from && value?.to && dateRange?.from && dateRange?.to && !areDatesEqual(value, dateRange))
|
|
7653
7670
|
setDateRange(value);
|
|
7654
7671
|
}, [value]);
|
|
7655
7672
|
const { trigger } = selectVariants({ size, className });
|
|
7656
|
-
const formattedValue =
|
|
7673
|
+
const formattedValue = React70.useMemo(() => {
|
|
7657
7674
|
if (!dateRange || !dateRange.from || !dateRange.to) {
|
|
7658
7675
|
return placeholder ?? locale.selectDate;
|
|
7659
7676
|
}
|
|
@@ -7727,8 +7744,8 @@ var DateRangePicker = (props) => {
|
|
|
7727
7744
|
};
|
|
7728
7745
|
DateRangePicker.displayName = "DateRangePicker";
|
|
7729
7746
|
function useDebouncedCallback(callback, delay) {
|
|
7730
|
-
const timeoutRef =
|
|
7731
|
-
const debouncedCallback =
|
|
7747
|
+
const timeoutRef = React70.useRef(null);
|
|
7748
|
+
const debouncedCallback = React70.useCallback(
|
|
7732
7749
|
(args) => {
|
|
7733
7750
|
if (timeoutRef.current) {
|
|
7734
7751
|
clearTimeout(timeoutRef.current);
|
|
@@ -7766,8 +7783,8 @@ var DatePicker = (props) => {
|
|
|
7766
7783
|
} = props;
|
|
7767
7784
|
const [locale] = useLocale("picker");
|
|
7768
7785
|
const { trigger } = selectVariants({ size });
|
|
7769
|
-
const [open, setOpen] =
|
|
7770
|
-
const formattedValue =
|
|
7786
|
+
const [open, setOpen] = React70.useState(false);
|
|
7787
|
+
const formattedValue = React70.useMemo(() => {
|
|
7771
7788
|
if (typeof value === "undefined") {
|
|
7772
7789
|
return placeholder ?? locale.selectDate;
|
|
7773
7790
|
}
|
|
@@ -7834,7 +7851,7 @@ var Sheet = DialogPrimitive__namespace.Root;
|
|
|
7834
7851
|
var SheetTrigger = DialogPrimitive__namespace.Trigger;
|
|
7835
7852
|
var SheetClose = DialogPrimitive__namespace.Close;
|
|
7836
7853
|
var SheetPortal = DialogPrimitive__namespace.Portal;
|
|
7837
|
-
var SheetOverlay =
|
|
7854
|
+
var SheetOverlay = React70__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7838
7855
|
DialogPrimitive__namespace.Overlay,
|
|
7839
7856
|
{
|
|
7840
7857
|
className: tailwindVariants.cnBase(
|
|
@@ -7860,7 +7877,7 @@ var sheetVariants = tailwindVariants.tv({
|
|
|
7860
7877
|
side: "bottom"
|
|
7861
7878
|
}
|
|
7862
7879
|
});
|
|
7863
|
-
var SheetContent =
|
|
7880
|
+
var SheetContent = React70__namespace.forwardRef(
|
|
7864
7881
|
({
|
|
7865
7882
|
side = "bottom",
|
|
7866
7883
|
closeable = true,
|
|
@@ -7956,7 +7973,7 @@ var SheetFooter = ({
|
|
|
7956
7973
|
}
|
|
7957
7974
|
);
|
|
7958
7975
|
SheetFooter.displayName = "SheetFooter";
|
|
7959
|
-
var SheetTitle =
|
|
7976
|
+
var SheetTitle = React70__namespace.forwardRef(({ className, leading, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7960
7977
|
"div",
|
|
7961
7978
|
{
|
|
7962
7979
|
className: "oui-sheet-header oui-grid oui-grid-cols-[40px_1fr_40px] oui-items-center",
|
|
@@ -7977,7 +7994,7 @@ var SheetTitle = React69__namespace.forwardRef(({ className, leading, ...props }
|
|
|
7977
7994
|
}
|
|
7978
7995
|
));
|
|
7979
7996
|
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
7980
|
-
var SheetDescription =
|
|
7997
|
+
var SheetDescription = React70__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7981
7998
|
DialogPrimitive__namespace.Description,
|
|
7982
7999
|
{
|
|
7983
8000
|
ref,
|
|
@@ -8002,8 +8019,8 @@ var getModalId = (modal2) => {
|
|
|
8002
8019
|
return modal2[symModalId];
|
|
8003
8020
|
};
|
|
8004
8021
|
function useModal(modal2, args) {
|
|
8005
|
-
const modals =
|
|
8006
|
-
const modalIdFromContext =
|
|
8022
|
+
const modals = React70.useContext(ModalContext);
|
|
8023
|
+
const modalIdFromContext = React70.useContext(ModalIdContext);
|
|
8007
8024
|
let modalId;
|
|
8008
8025
|
let isComponent = modal2 && typeof modal2 !== "string";
|
|
8009
8026
|
if (!modal2) {
|
|
@@ -8015,19 +8032,19 @@ function useModal(modal2, args) {
|
|
|
8015
8032
|
throw new Error("modalId is required");
|
|
8016
8033
|
}
|
|
8017
8034
|
const id = modalId;
|
|
8018
|
-
|
|
8035
|
+
React70.useEffect(() => {
|
|
8019
8036
|
if (isComponent) {
|
|
8020
8037
|
register(id, modal2, args);
|
|
8021
8038
|
}
|
|
8022
8039
|
}, [isComponent, modalId, modal2, args]);
|
|
8023
8040
|
const modalInfo = modals[id];
|
|
8024
|
-
const show2 =
|
|
8041
|
+
const show2 = React70.useCallback(
|
|
8025
8042
|
(args2) => modalActions.show(id, args2),
|
|
8026
8043
|
[id]
|
|
8027
8044
|
);
|
|
8028
|
-
const hide2 =
|
|
8029
|
-
const remove2 =
|
|
8030
|
-
const onOpenChange =
|
|
8045
|
+
const hide2 = React70.useCallback(() => modalActions.hide(id), [id]);
|
|
8046
|
+
const remove2 = React70.useCallback(() => modalActions.remove(id), [id]);
|
|
8047
|
+
const onOpenChange = React70.useCallback(
|
|
8031
8048
|
(isOpen) => {
|
|
8032
8049
|
if (!isOpen) {
|
|
8033
8050
|
reject("cancel");
|
|
@@ -8036,33 +8053,33 @@ function useModal(modal2, args) {
|
|
|
8036
8053
|
},
|
|
8037
8054
|
[id]
|
|
8038
8055
|
);
|
|
8039
|
-
const setStates2 =
|
|
8056
|
+
const setStates2 = React70.useCallback(
|
|
8040
8057
|
(states) => {
|
|
8041
8058
|
modalActions.setStates(id, states);
|
|
8042
8059
|
},
|
|
8043
8060
|
[id]
|
|
8044
8061
|
);
|
|
8045
|
-
const updateArgs2 =
|
|
8062
|
+
const updateArgs2 = React70.useCallback(
|
|
8046
8063
|
(args2) => {
|
|
8047
8064
|
modalActions.updateArgs(id, args2);
|
|
8048
8065
|
},
|
|
8049
8066
|
[id]
|
|
8050
8067
|
);
|
|
8051
|
-
const resolve =
|
|
8068
|
+
const resolve = React70.useCallback(
|
|
8052
8069
|
(args2) => {
|
|
8053
8070
|
modalCallbacks[id]?.resolve(args2);
|
|
8054
8071
|
delete modalCallbacks[id];
|
|
8055
8072
|
},
|
|
8056
8073
|
[id]
|
|
8057
8074
|
);
|
|
8058
|
-
const reject =
|
|
8075
|
+
const reject = React70.useCallback(
|
|
8059
8076
|
(args2) => {
|
|
8060
8077
|
modalCallbacks[id]?.reject(args2);
|
|
8061
8078
|
delete modalCallbacks[id];
|
|
8062
8079
|
},
|
|
8063
8080
|
[id]
|
|
8064
8081
|
);
|
|
8065
|
-
const resolveHide =
|
|
8082
|
+
const resolveHide = React70.useCallback((args2) => {
|
|
8066
8083
|
hideModalCallbacks[id]?.resolve(args2);
|
|
8067
8084
|
delete hideModalCallbacks[id];
|
|
8068
8085
|
}, []);
|
|
@@ -8096,9 +8113,9 @@ var MODAL_REGISTRY = /* @__PURE__ */ new Map();
|
|
|
8096
8113
|
var create = (Comp) => {
|
|
8097
8114
|
return ({ id, defaultVisible, keepMounted, ...props }) => {
|
|
8098
8115
|
const { args, show: show2 } = useModal(id);
|
|
8099
|
-
const modals =
|
|
8116
|
+
const modals = React70.useContext(ModalContext);
|
|
8100
8117
|
const shouldMount = !!modals[id];
|
|
8101
|
-
|
|
8118
|
+
React70.useEffect(() => {
|
|
8102
8119
|
if (defaultVisible) {
|
|
8103
8120
|
show2();
|
|
8104
8121
|
}
|
|
@@ -8109,11 +8126,11 @@ var create = (Comp) => {
|
|
|
8109
8126
|
}
|
|
8110
8127
|
};
|
|
8111
8128
|
}, [id, show2, defaultVisible]);
|
|
8112
|
-
|
|
8129
|
+
React70.useEffect(() => {
|
|
8113
8130
|
if (keepMounted) modalActions.setStates(id, { keepMounted: true });
|
|
8114
8131
|
}, [id, keepMounted]);
|
|
8115
8132
|
const delayVisible = modals[id]?.delayVisible;
|
|
8116
|
-
|
|
8133
|
+
React70.useEffect(() => {
|
|
8117
8134
|
if (delayVisible) {
|
|
8118
8135
|
show2(args);
|
|
8119
8136
|
}
|
|
@@ -8134,8 +8151,8 @@ var unregister = (id) => {
|
|
|
8134
8151
|
};
|
|
8135
8152
|
var initialState = {};
|
|
8136
8153
|
var ALREADY_MOUNTED = {};
|
|
8137
|
-
var ModalContext =
|
|
8138
|
-
var ModalIdContext =
|
|
8154
|
+
var ModalContext = React70.createContext(initialState);
|
|
8155
|
+
var ModalIdContext = React70.createContext(null);
|
|
8139
8156
|
var modalCallbacks = {};
|
|
8140
8157
|
var hideModalCallbacks = {};
|
|
8141
8158
|
var dispatch = () => {
|
|
@@ -8244,7 +8261,7 @@ var reducer = (state, action) => {
|
|
|
8244
8261
|
}
|
|
8245
8262
|
};
|
|
8246
8263
|
var ModalContainer = () => {
|
|
8247
|
-
const modals =
|
|
8264
|
+
const modals = React70.useContext(ModalContext);
|
|
8248
8265
|
const visibleModalIds = Object.keys(modals).filter((id) => !!modals[id]);
|
|
8249
8266
|
visibleModalIds.forEach((id) => {
|
|
8250
8267
|
if (!MODAL_REGISTRY.has(id) && !ALREADY_MOUNTED[id]) {
|
|
@@ -8263,7 +8280,7 @@ var ModalContainer = () => {
|
|
|
8263
8280
|
}) });
|
|
8264
8281
|
};
|
|
8265
8282
|
var ModalProvider = (props) => {
|
|
8266
|
-
const [state, dispatchOrigin] =
|
|
8283
|
+
const [state, dispatchOrigin] = React70.useReducer(reducer, initialState);
|
|
8267
8284
|
dispatch = dispatchOrigin;
|
|
8268
8285
|
return /* @__PURE__ */ jsxRuntime.jsxs(ModalContext.Provider, { value: state, children: [
|
|
8269
8286
|
props.children,
|
|
@@ -8367,7 +8384,7 @@ var dividerVariants = tv({
|
|
|
8367
8384
|
intensity: 4
|
|
8368
8385
|
}
|
|
8369
8386
|
});
|
|
8370
|
-
var Divider =
|
|
8387
|
+
var Divider = React70__namespace.default.forwardRef((props, ref) => {
|
|
8371
8388
|
const { className, intensity, direction, lineStyle, mx, my, ...rest } = props;
|
|
8372
8389
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8373
8390
|
"div",
|
|
@@ -8575,7 +8592,7 @@ var Dialog = DialogPrimitive__namespace.Root;
|
|
|
8575
8592
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
8576
8593
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
8577
8594
|
var DialogClose = DialogPrimitive__namespace.Close;
|
|
8578
|
-
var DialogOverlay =
|
|
8595
|
+
var DialogOverlay = React70__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8579
8596
|
const { overlay } = dialogVariants();
|
|
8580
8597
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8581
8598
|
DialogPrimitive__namespace.Overlay,
|
|
@@ -8587,7 +8604,7 @@ var DialogOverlay = React69__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
8587
8604
|
);
|
|
8588
8605
|
});
|
|
8589
8606
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
8590
|
-
var DialogContent =
|
|
8607
|
+
var DialogContent = React70__namespace.forwardRef(
|
|
8591
8608
|
({
|
|
8592
8609
|
overlyClassName,
|
|
8593
8610
|
className,
|
|
@@ -8649,7 +8666,7 @@ var DialogFooter = ({
|
|
|
8649
8666
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: footer({ className }), ...props });
|
|
8650
8667
|
};
|
|
8651
8668
|
DialogFooter.displayName = "DialogFooter";
|
|
8652
|
-
var DialogTitle =
|
|
8669
|
+
var DialogTitle = React70__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8653
8670
|
const { title } = dialogVariants();
|
|
8654
8671
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8655
8672
|
DialogPrimitive__namespace.Title,
|
|
@@ -8661,7 +8678,7 @@ var DialogTitle = React69__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
8661
8678
|
);
|
|
8662
8679
|
});
|
|
8663
8680
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
8664
|
-
var DialogDescription =
|
|
8681
|
+
var DialogDescription = React70__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8665
8682
|
const { desc } = dialogVariants();
|
|
8666
8683
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8667
8684
|
DialogPrimitive__namespace.Description,
|
|
@@ -8675,10 +8692,10 @@ var DialogDescription = React69__namespace.forwardRef(({ className, ...props },
|
|
|
8675
8692
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
8676
8693
|
var SimpleDialogFooter = (props) => {
|
|
8677
8694
|
const { actions } = props;
|
|
8678
|
-
const [primaryLoading, setPrimaryLoading] =
|
|
8695
|
+
const [primaryLoading, setPrimaryLoading] = React70.useState(
|
|
8679
8696
|
actions?.primary?.loading ?? false
|
|
8680
8697
|
);
|
|
8681
|
-
|
|
8698
|
+
React70.useEffect(() => {
|
|
8682
8699
|
if (actions?.primary?.loading) {
|
|
8683
8700
|
setPrimaryLoading(actions?.primary?.loading);
|
|
8684
8701
|
}
|
|
@@ -8687,7 +8704,7 @@ var SimpleDialogFooter = (props) => {
|
|
|
8687
8704
|
};
|
|
8688
8705
|
}, [actions?.primary?.loading]);
|
|
8689
8706
|
if (!actions) return null;
|
|
8690
|
-
const buttons =
|
|
8707
|
+
const buttons = React70.useMemo(() => {
|
|
8691
8708
|
const buttons2 = [];
|
|
8692
8709
|
if (actions.secondary && typeof actions.secondary.onClick === "function") {
|
|
8693
8710
|
const {
|
|
@@ -8786,11 +8803,11 @@ function useMediaQuery(query) {
|
|
|
8786
8803
|
}
|
|
8787
8804
|
return false;
|
|
8788
8805
|
};
|
|
8789
|
-
const [matches, setMatches] =
|
|
8806
|
+
const [matches, setMatches] = React70.useState(getMatches(query));
|
|
8790
8807
|
function handleChange() {
|
|
8791
8808
|
setMatches(getMatches(query));
|
|
8792
8809
|
}
|
|
8793
|
-
|
|
8810
|
+
React70.useEffect(() => {
|
|
8794
8811
|
const matchMedia = window?.matchMedia(query);
|
|
8795
8812
|
handleChange();
|
|
8796
8813
|
if (matchMedia?.addListener) {
|
|
@@ -8818,7 +8835,7 @@ function useScreen() {
|
|
|
8818
8835
|
};
|
|
8819
8836
|
}
|
|
8820
8837
|
function useObserverElement(element, callback) {
|
|
8821
|
-
|
|
8838
|
+
React70.useEffect(() => {
|
|
8822
8839
|
if (!element) {
|
|
8823
8840
|
return;
|
|
8824
8841
|
}
|
|
@@ -8834,11 +8851,11 @@ function useObserverElement(element, callback) {
|
|
|
8834
8851
|
}, [element]);
|
|
8835
8852
|
}
|
|
8836
8853
|
function useLongPress(callback, longPressTime = 600) {
|
|
8837
|
-
const timeoutRef =
|
|
8838
|
-
const targetRef =
|
|
8839
|
-
const startPositionRef =
|
|
8840
|
-
const isLongPressTriggeredRef =
|
|
8841
|
-
const clearLongPress =
|
|
8854
|
+
const timeoutRef = React70.useRef(null);
|
|
8855
|
+
const targetRef = React70.useRef(null);
|
|
8856
|
+
const startPositionRef = React70.useRef(null);
|
|
8857
|
+
const isLongPressTriggeredRef = React70.useRef(false);
|
|
8858
|
+
const clearLongPress = React70.useCallback(() => {
|
|
8842
8859
|
if (timeoutRef.current) {
|
|
8843
8860
|
clearTimeout(timeoutRef.current);
|
|
8844
8861
|
timeoutRef.current = null;
|
|
@@ -8847,7 +8864,7 @@ function useLongPress(callback, longPressTime = 600) {
|
|
|
8847
8864
|
startPositionRef.current = null;
|
|
8848
8865
|
isLongPressTriggeredRef.current = false;
|
|
8849
8866
|
}, []);
|
|
8850
|
-
const startLongPress =
|
|
8867
|
+
const startLongPress = React70.useCallback(
|
|
8851
8868
|
(e) => {
|
|
8852
8869
|
clearLongPress();
|
|
8853
8870
|
if ("touches" in e) {
|
|
@@ -8868,17 +8885,17 @@ function useLongPress(callback, longPressTime = 600) {
|
|
|
8868
8885
|
},
|
|
8869
8886
|
[callback, longPressTime, clearLongPress]
|
|
8870
8887
|
);
|
|
8871
|
-
const handleMouseDown =
|
|
8888
|
+
const handleMouseDown = React70.useCallback(
|
|
8872
8889
|
(e) => {
|
|
8873
8890
|
if (e.button !== 0) return;
|
|
8874
8891
|
startLongPress(e);
|
|
8875
8892
|
},
|
|
8876
8893
|
[startLongPress]
|
|
8877
8894
|
);
|
|
8878
|
-
const handleMouseUp =
|
|
8895
|
+
const handleMouseUp = React70.useCallback(() => {
|
|
8879
8896
|
clearLongPress();
|
|
8880
8897
|
}, [clearLongPress]);
|
|
8881
|
-
const handleMouseMove =
|
|
8898
|
+
const handleMouseMove = React70.useCallback(
|
|
8882
8899
|
(e) => {
|
|
8883
8900
|
if (isLongPressTriggeredRef.current) return;
|
|
8884
8901
|
if (startPositionRef.current) {
|
|
@@ -8892,25 +8909,25 @@ function useLongPress(callback, longPressTime = 600) {
|
|
|
8892
8909
|
},
|
|
8893
8910
|
[clearLongPress]
|
|
8894
8911
|
);
|
|
8895
|
-
const handleMouseLeave =
|
|
8912
|
+
const handleMouseLeave = React70.useCallback(() => {
|
|
8896
8913
|
clearLongPress();
|
|
8897
8914
|
}, [clearLongPress]);
|
|
8898
|
-
const handleContextMenu =
|
|
8915
|
+
const handleContextMenu = React70.useCallback((e) => {
|
|
8899
8916
|
if (timeoutRef.current || isLongPressTriggeredRef.current) {
|
|
8900
8917
|
e.preventDefault();
|
|
8901
8918
|
e.stopPropagation();
|
|
8902
8919
|
}
|
|
8903
8920
|
}, []);
|
|
8904
|
-
const handleTouchStart =
|
|
8921
|
+
const handleTouchStart = React70.useCallback(
|
|
8905
8922
|
(e) => {
|
|
8906
8923
|
startLongPress(e);
|
|
8907
8924
|
},
|
|
8908
8925
|
[startLongPress]
|
|
8909
8926
|
);
|
|
8910
|
-
const handleTouchEnd =
|
|
8927
|
+
const handleTouchEnd = React70.useCallback(() => {
|
|
8911
8928
|
clearLongPress();
|
|
8912
8929
|
}, [clearLongPress]);
|
|
8913
|
-
const handleTouchMove =
|
|
8930
|
+
const handleTouchMove = React70.useCallback(
|
|
8914
8931
|
(e) => {
|
|
8915
8932
|
if (timeoutRef.current) {
|
|
8916
8933
|
e.preventDefault();
|
|
@@ -8931,7 +8948,7 @@ function useLongPress(callback, longPressTime = 600) {
|
|
|
8931
8948
|
},
|
|
8932
8949
|
[clearLongPress]
|
|
8933
8950
|
);
|
|
8934
|
-
const handleTouchCancel =
|
|
8951
|
+
const handleTouchCancel = React70.useCallback(() => {
|
|
8935
8952
|
clearLongPress();
|
|
8936
8953
|
}, [clearLongPress]);
|
|
8937
8954
|
return {
|
|
@@ -8961,7 +8978,7 @@ var AlertDialog = (props) => {
|
|
|
8961
8978
|
classNames
|
|
8962
8979
|
} = props;
|
|
8963
8980
|
const { isMobile } = useScreen();
|
|
8964
|
-
const actions =
|
|
8981
|
+
const actions = React70.useMemo(() => {
|
|
8965
8982
|
if (typeof onOk !== "function" && typeof onCancel !== "function")
|
|
8966
8983
|
return void 0;
|
|
8967
8984
|
const actions2 = {};
|
|
@@ -9014,7 +9031,7 @@ var AlertDialog = (props) => {
|
|
|
9014
9031
|
var CreatedAlertDialog = create((props) => {
|
|
9015
9032
|
const { onOk } = props;
|
|
9016
9033
|
const { visible, hide: hide2, resolve, reject, onOpenChange } = useModal();
|
|
9017
|
-
const onOkHandler =
|
|
9034
|
+
const onOkHandler = React70.useCallback(() => {
|
|
9018
9035
|
return Promise.resolve().then(onOk).then(hide2);
|
|
9019
9036
|
}, [onOk]);
|
|
9020
9037
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9231,14 +9248,14 @@ function registerSimpleSheet(id, comp, props) {
|
|
|
9231
9248
|
}
|
|
9232
9249
|
var ActionItem = (props) => {
|
|
9233
9250
|
const { action } = props;
|
|
9234
|
-
const onItemClick =
|
|
9251
|
+
const onItemClick = React70.useCallback(() => {
|
|
9235
9252
|
if (typeof action.onClick === "function") {
|
|
9236
9253
|
action.onClick(action);
|
|
9237
9254
|
} else {
|
|
9238
9255
|
props.onClick?.({ ...action, index: props.index });
|
|
9239
9256
|
}
|
|
9240
9257
|
}, [action]);
|
|
9241
|
-
const child =
|
|
9258
|
+
const child = React70.useMemo(() => {
|
|
9242
9259
|
return action.label;
|
|
9243
9260
|
}, [action.label]);
|
|
9244
9261
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9261,7 +9278,7 @@ var ActionSheetContent = (props) => {
|
|
|
9261
9278
|
if (action.type === "division") {
|
|
9262
9279
|
return /* @__PURE__ */ jsxRuntime.jsx(ActionDivision, {}, index);
|
|
9263
9280
|
}
|
|
9264
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9281
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React70.Fragment, { children: [
|
|
9265
9282
|
action.value === "cancel" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-h-2 oui-bg-base-10" }),
|
|
9266
9283
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9267
9284
|
ActionItem,
|
|
@@ -9288,7 +9305,7 @@ var ActionSheetContent = (props) => {
|
|
|
9288
9305
|
};
|
|
9289
9306
|
var ActionSheet = (props) => {
|
|
9290
9307
|
const [locale] = useLocale("modal");
|
|
9291
|
-
const items =
|
|
9308
|
+
const items = React70.useMemo(() => {
|
|
9292
9309
|
const items2 = [];
|
|
9293
9310
|
if (Array.isArray(props.actionSheets)) {
|
|
9294
9311
|
for (const action of props.actionSheets) {
|
|
@@ -9368,7 +9385,7 @@ var pickerVariants = tv({
|
|
|
9368
9385
|
color: "base"
|
|
9369
9386
|
}
|
|
9370
9387
|
});
|
|
9371
|
-
var Picker =
|
|
9388
|
+
var Picker = React70.forwardRef(
|
|
9372
9389
|
(originalProps, ref) => {
|
|
9373
9390
|
const {
|
|
9374
9391
|
size,
|
|
@@ -9383,8 +9400,8 @@ var Picker = React69.forwardRef(
|
|
|
9383
9400
|
valueRenderer,
|
|
9384
9401
|
...props
|
|
9385
9402
|
} = originalProps;
|
|
9386
|
-
const [open, setOpen] =
|
|
9387
|
-
const selectedItem =
|
|
9403
|
+
const [open, setOpen] = React70.useState(false);
|
|
9404
|
+
const selectedItem = React70.useMemo(() => {
|
|
9388
9405
|
if (value && !!value.value) {
|
|
9389
9406
|
return value;
|
|
9390
9407
|
}
|
|
@@ -9395,13 +9412,13 @@ var Picker = React69.forwardRef(
|
|
|
9395
9412
|
}
|
|
9396
9413
|
}
|
|
9397
9414
|
}, [value, options]);
|
|
9398
|
-
const text =
|
|
9415
|
+
const text = React70.useMemo(() => {
|
|
9399
9416
|
if (selectedItem) {
|
|
9400
9417
|
return selectedItem.label;
|
|
9401
9418
|
}
|
|
9402
9419
|
return placeholder || label || "";
|
|
9403
9420
|
}, [selectedItem, label, placeholder]);
|
|
9404
|
-
const actions =
|
|
9421
|
+
const actions = React70.useMemo(() => {
|
|
9405
9422
|
return [...options, "---", "Cancel"];
|
|
9406
9423
|
}, [options]);
|
|
9407
9424
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9532,10 +9549,10 @@ var DataFilter = (props) => {
|
|
|
9532
9549
|
);
|
|
9533
9550
|
};
|
|
9534
9551
|
var usePagination = (initial) => {
|
|
9535
|
-
const dataTotal =
|
|
9536
|
-
const [page, setPage] =
|
|
9537
|
-
const [pageSize, _setPageSize] =
|
|
9538
|
-
const setPageSize =
|
|
9552
|
+
const dataTotal = React70.useRef(0);
|
|
9553
|
+
const [page, setPage] = React70.useState(initial?.page ?? 1);
|
|
9554
|
+
const [pageSize, _setPageSize] = React70.useState(initial?.pageSize ?? 10);
|
|
9555
|
+
const setPageSize = React70.useCallback(
|
|
9539
9556
|
(size) => {
|
|
9540
9557
|
_setPageSize(size);
|
|
9541
9558
|
if (dataTotal.current > 0) {
|
|
@@ -9560,7 +9577,7 @@ var usePagination = (initial) => {
|
|
|
9560
9577
|
pageTotal
|
|
9561
9578
|
};
|
|
9562
9579
|
};
|
|
9563
|
-
const parsePagination =
|
|
9580
|
+
const parsePagination = React70.useCallback(
|
|
9564
9581
|
(meta) => {
|
|
9565
9582
|
return {
|
|
9566
9583
|
...parseMeta(meta),
|
|
@@ -9570,7 +9587,7 @@ var usePagination = (initial) => {
|
|
|
9570
9587
|
},
|
|
9571
9588
|
[page, pageSize]
|
|
9572
9589
|
);
|
|
9573
|
-
const pagination =
|
|
9590
|
+
const pagination = React70.useMemo(
|
|
9574
9591
|
() => ({
|
|
9575
9592
|
page,
|
|
9576
9593
|
pageSize,
|
|
@@ -9579,7 +9596,7 @@ var usePagination = (initial) => {
|
|
|
9579
9596
|
}),
|
|
9580
9597
|
[parsePagination]
|
|
9581
9598
|
);
|
|
9582
|
-
|
|
9599
|
+
React70.useEffect(() => {
|
|
9583
9600
|
if (initial?.resetPageWhenPageSizeChange !== false) {
|
|
9584
9601
|
setPage(1);
|
|
9585
9602
|
}
|
|
@@ -9822,13 +9839,13 @@ var tabsVariants = tv({
|
|
|
9822
9839
|
}
|
|
9823
9840
|
});
|
|
9824
9841
|
var TabsBase = TabsPrimitive__namespace.Root;
|
|
9825
|
-
var TabsList =
|
|
9842
|
+
var TabsList = React70__namespace.forwardRef((originProps, ref) => {
|
|
9826
9843
|
const { className, size, variant, ...props } = originProps;
|
|
9827
9844
|
const { list } = tabsVariants({ size, variant });
|
|
9828
9845
|
return /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.List, { ref, className: list({ className }), ...props });
|
|
9829
9846
|
});
|
|
9830
9847
|
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
9831
|
-
var TabsTrigger =
|
|
9848
|
+
var TabsTrigger = React70__namespace.forwardRef((originProps, ref) => {
|
|
9832
9849
|
const { className, size, children, icon, variant, ...props } = originProps;
|
|
9833
9850
|
const { trigger, icon: iconClassName } = tabsVariants({ size, variant });
|
|
9834
9851
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9838,14 +9855,14 @@ var TabsTrigger = React69__namespace.forwardRef((originProps, ref) => {
|
|
|
9838
9855
|
className: trigger({ className }),
|
|
9839
9856
|
...props,
|
|
9840
9857
|
children: [
|
|
9841
|
-
typeof icon !== "undefined" ?
|
|
9858
|
+
typeof icon !== "undefined" ? React70__namespace.cloneElement(icon, { className: iconClassName(), opacity: 1 }) : null,
|
|
9842
9859
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children })
|
|
9843
9860
|
]
|
|
9844
9861
|
}
|
|
9845
9862
|
);
|
|
9846
9863
|
});
|
|
9847
9864
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
9848
|
-
var TabsContent =
|
|
9865
|
+
var TabsContent = React70__namespace.forwardRef((oriProps, ref) => {
|
|
9849
9866
|
const { className, size, children, ...props } = oriProps;
|
|
9850
9867
|
const { content } = tabsVariants({ size });
|
|
9851
9868
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9859,16 +9876,16 @@ var TabsContent = React69__namespace.forwardRef((oriProps, ref) => {
|
|
|
9859
9876
|
);
|
|
9860
9877
|
});
|
|
9861
9878
|
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
9862
|
-
var OrderlyThemeContext =
|
|
9879
|
+
var OrderlyThemeContext = React70.createContext(
|
|
9863
9880
|
{}
|
|
9864
9881
|
);
|
|
9865
9882
|
var useOrderlyTheme = () => {
|
|
9866
|
-
return
|
|
9883
|
+
return React70.useContext(OrderlyThemeContext);
|
|
9867
9884
|
};
|
|
9868
9885
|
function useDrag(containerRef) {
|
|
9869
|
-
const [isDragging, setIsDragging] =
|
|
9870
|
-
const [startX, setStartX] =
|
|
9871
|
-
const [scrollLeft, setScrollLeft] =
|
|
9886
|
+
const [isDragging, setIsDragging] = React70.useState(false);
|
|
9887
|
+
const [startX, setStartX] = React70.useState(0);
|
|
9888
|
+
const [scrollLeft, setScrollLeft] = React70.useState(0);
|
|
9872
9889
|
const handleMouseDown = (e) => {
|
|
9873
9890
|
if (!containerRef.current) return;
|
|
9874
9891
|
setIsDragging(true);
|
|
@@ -9893,10 +9910,10 @@ function useDrag(containerRef) {
|
|
|
9893
9910
|
};
|
|
9894
9911
|
}
|
|
9895
9912
|
function useScroll2() {
|
|
9896
|
-
const [leadingVisible, setLeadingVisible] =
|
|
9897
|
-
const [tailingVisible, setTailingVisible] =
|
|
9898
|
-
const containerRef =
|
|
9899
|
-
|
|
9913
|
+
const [leadingVisible, setLeadingVisible] = React70.useState(false);
|
|
9914
|
+
const [tailingVisible, setTailingVisible] = React70.useState(false);
|
|
9915
|
+
const containerRef = React70.useRef(null);
|
|
9916
|
+
React70.useEffect(() => {
|
|
9900
9917
|
if (!containerRef.current) return;
|
|
9901
9918
|
const handleScroll = () => {
|
|
9902
9919
|
const container2 = containerRef.current;
|
|
@@ -9921,7 +9938,7 @@ function useScroll2() {
|
|
|
9921
9938
|
intersectionObserver.disconnect();
|
|
9922
9939
|
};
|
|
9923
9940
|
}, []);
|
|
9924
|
-
|
|
9941
|
+
React70.useEffect(() => {
|
|
9925
9942
|
if (!containerRef.current) return;
|
|
9926
9943
|
const intersectionObserver = new IntersectionObserver((entries) => {
|
|
9927
9944
|
entries.forEach((entry) => {
|
|
@@ -10038,7 +10055,7 @@ var ScrollIndicator = (props) => {
|
|
|
10038
10055
|
}
|
|
10039
10056
|
);
|
|
10040
10057
|
};
|
|
10041
|
-
var TabsContext =
|
|
10058
|
+
var TabsContext = React70.createContext({});
|
|
10042
10059
|
var Tabs = (props) => {
|
|
10043
10060
|
const { getComponentTheme } = useOrderlyTheme();
|
|
10044
10061
|
const {
|
|
@@ -10051,20 +10068,20 @@ var Tabs = (props) => {
|
|
|
10051
10068
|
} = props;
|
|
10052
10069
|
const tabsOverrides = getComponentTheme("tabs", { variant: "contained" });
|
|
10053
10070
|
const tabsVariant = variant || tabsOverrides.variant;
|
|
10054
|
-
const [tabList, setTabList] =
|
|
10055
|
-
const registerTab =
|
|
10071
|
+
const [tabList, setTabList] = React70.useState({});
|
|
10072
|
+
const registerTab = React70.useCallback((config) => {
|
|
10056
10073
|
setTabList((prev) => {
|
|
10057
10074
|
return { ...prev, [config.value]: config };
|
|
10058
10075
|
});
|
|
10059
10076
|
}, []);
|
|
10060
|
-
const unregisterTab =
|
|
10077
|
+
const unregisterTab = React70.useCallback((config) => {
|
|
10061
10078
|
setTabList((prev) => {
|
|
10062
10079
|
const newTabList = { ...prev };
|
|
10063
10080
|
delete newTabList[config.value];
|
|
10064
10081
|
return newTabList;
|
|
10065
10082
|
});
|
|
10066
10083
|
}, []);
|
|
10067
|
-
const memoizedValue =
|
|
10084
|
+
const memoizedValue = React70.useMemo(
|
|
10068
10085
|
() => ({ registerTab, unregisterTab }),
|
|
10069
10086
|
[registerTab, unregisterTab]
|
|
10070
10087
|
);
|
|
@@ -10137,8 +10154,8 @@ var Tabs = (props) => {
|
|
|
10137
10154
|
Tabs.displayName = "Tabs";
|
|
10138
10155
|
var TabPanel = (props) => {
|
|
10139
10156
|
const { title, value, icon, className, style, testid, children } = props;
|
|
10140
|
-
const { registerTab, unregisterTab } =
|
|
10141
|
-
|
|
10157
|
+
const { registerTab, unregisterTab } = React70.useContext(TabsContext);
|
|
10158
|
+
React70.useEffect(() => {
|
|
10142
10159
|
const tabConfig = {
|
|
10143
10160
|
title,
|
|
10144
10161
|
value,
|
|
@@ -10174,7 +10191,7 @@ var cardVariants = tv({
|
|
|
10174
10191
|
intensity: 900
|
|
10175
10192
|
}
|
|
10176
10193
|
});
|
|
10177
|
-
var CardBase =
|
|
10194
|
+
var CardBase = React70__namespace.default.forwardRef(
|
|
10178
10195
|
({ className, intensity, children, ...props }, ref) => {
|
|
10179
10196
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10180
10197
|
"div",
|
|
@@ -10188,7 +10205,7 @@ var CardBase = React69__namespace.default.forwardRef(
|
|
|
10188
10205
|
}
|
|
10189
10206
|
);
|
|
10190
10207
|
CardBase.displayName = "CardBase";
|
|
10191
|
-
var CardHeader =
|
|
10208
|
+
var CardHeader = React70__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10192
10209
|
"div",
|
|
10193
10210
|
{
|
|
10194
10211
|
ref,
|
|
@@ -10201,7 +10218,7 @@ var CardHeader = React69__namespace.default.forwardRef(({ className, children, .
|
|
|
10201
10218
|
}
|
|
10202
10219
|
));
|
|
10203
10220
|
CardHeader.displayName = "CardHeader";
|
|
10204
|
-
var CardTitle =
|
|
10221
|
+
var CardTitle = React70__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10205
10222
|
"h3",
|
|
10206
10223
|
{
|
|
10207
10224
|
ref,
|
|
@@ -10214,7 +10231,7 @@ var CardTitle = React69__namespace.default.forwardRef(({ className, children, ..
|
|
|
10214
10231
|
}
|
|
10215
10232
|
));
|
|
10216
10233
|
CardTitle.displayName = "CardTitle";
|
|
10217
|
-
var CardDescription =
|
|
10234
|
+
var CardDescription = React70__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10218
10235
|
"p",
|
|
10219
10236
|
{
|
|
10220
10237
|
ref,
|
|
@@ -10223,7 +10240,7 @@ var CardDescription = React69__namespace.default.forwardRef(({ className, childr
|
|
|
10223
10240
|
children
|
|
10224
10241
|
}
|
|
10225
10242
|
));
|
|
10226
|
-
var CardContent =
|
|
10243
|
+
var CardContent = React70__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10227
10244
|
"div",
|
|
10228
10245
|
{
|
|
10229
10246
|
ref,
|
|
@@ -10233,9 +10250,9 @@ var CardContent = React69__namespace.default.forwardRef(({ className, children,
|
|
|
10233
10250
|
}
|
|
10234
10251
|
));
|
|
10235
10252
|
CardContent.displayName = "CardContent";
|
|
10236
|
-
var CardFooter =
|
|
10253
|
+
var CardFooter = React70__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, ...props, children }));
|
|
10237
10254
|
CardFooter.displayName = "CardFooter";
|
|
10238
|
-
var Card =
|
|
10255
|
+
var Card = React70.forwardRef(
|
|
10239
10256
|
(props, ref) => {
|
|
10240
10257
|
const { title, children, footer, className, classNames, ...rest } = props;
|
|
10241
10258
|
return /* @__PURE__ */ jsxRuntime.jsxs(CardBase, { ...rest, className: tailwindVariants.cnBase(className, classNames?.root), ref, children: [
|
|
@@ -10248,7 +10265,7 @@ var Card = React69.forwardRef(
|
|
|
10248
10265
|
Card.displayName = "Card";
|
|
10249
10266
|
var HoverCardRoot = HoverCardPrimitive__namespace.Root;
|
|
10250
10267
|
var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
|
|
10251
|
-
var HoverCardContent =
|
|
10268
|
+
var HoverCardContent = React70__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10252
10269
|
HoverCardPrimitive__namespace.Content,
|
|
10253
10270
|
{
|
|
10254
10271
|
ref,
|
|
@@ -10402,7 +10419,7 @@ var sliderVariants = tv({
|
|
|
10402
10419
|
}
|
|
10403
10420
|
}
|
|
10404
10421
|
});
|
|
10405
|
-
var BaseSlider =
|
|
10422
|
+
var BaseSlider = React70__namespace.forwardRef((oriProps, ref) => {
|
|
10406
10423
|
const {
|
|
10407
10424
|
className,
|
|
10408
10425
|
color,
|
|
@@ -10418,8 +10435,8 @@ var BaseSlider = React69__namespace.forwardRef((oriProps, ref) => {
|
|
|
10418
10435
|
const { track, range, thumb, root, trackInner, mark, tips } = sliderVariants({
|
|
10419
10436
|
color
|
|
10420
10437
|
});
|
|
10421
|
-
const [innerValue, setInvalue] =
|
|
10422
|
-
|
|
10438
|
+
const [innerValue, setInvalue] = React70__namespace.useState(__propsValue);
|
|
10439
|
+
React70__namespace.useEffect(() => {
|
|
10423
10440
|
setInvalue((prev) => {
|
|
10424
10441
|
if (!prev) {
|
|
10425
10442
|
return __propsValue;
|
|
@@ -10430,7 +10447,7 @@ var BaseSlider = React69__namespace.forwardRef((oriProps, ref) => {
|
|
|
10430
10447
|
return prev;
|
|
10431
10448
|
});
|
|
10432
10449
|
}, [__propsValue]);
|
|
10433
|
-
const innerMasks =
|
|
10450
|
+
const innerMasks = React70.useMemo(() => {
|
|
10434
10451
|
if (Array.isArray(marks) && marks.length > 0) {
|
|
10435
10452
|
return marks;
|
|
10436
10453
|
}
|
|
@@ -10469,7 +10486,7 @@ var BaseSlider = React69__namespace.forwardRef((oriProps, ref) => {
|
|
|
10469
10486
|
{
|
|
10470
10487
|
className: track({ className: classNames?.track }),
|
|
10471
10488
|
children: [
|
|
10472
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: trackInner() }),
|
|
10489
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: trackInner({ className: classNames?.trackInner }) }),
|
|
10473
10490
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10474
10491
|
SliderPrimitive__namespace.Range,
|
|
10475
10492
|
{
|
|
@@ -10526,14 +10543,14 @@ var Marks = (props) => {
|
|
|
10526
10543
|
className,
|
|
10527
10544
|
color = "primary"
|
|
10528
10545
|
} = props;
|
|
10529
|
-
const _value =
|
|
10530
|
-
const selIndex =
|
|
10546
|
+
const _value = React70.useMemo(() => value?.[0] ?? 0, [value]);
|
|
10547
|
+
const selIndex = React70.useMemo(() => {
|
|
10531
10548
|
if (typeof props.step === "undefined") {
|
|
10532
10549
|
return void 0;
|
|
10533
10550
|
}
|
|
10534
10551
|
return Math.floor(_value / props.step);
|
|
10535
10552
|
}, [_value, props.step]);
|
|
10536
|
-
const colorCls =
|
|
10553
|
+
const colorCls = React70.useMemo(() => {
|
|
10537
10554
|
switch (color) {
|
|
10538
10555
|
case "primary":
|
|
10539
10556
|
return "oui-border-primary oui-bg-primary";
|
|
@@ -10545,7 +10562,7 @@ var Marks = (props) => {
|
|
|
10545
10562
|
return "oui-border-primary-light oui-bg-primary-light";
|
|
10546
10563
|
}
|
|
10547
10564
|
}, [color]);
|
|
10548
|
-
const textCls =
|
|
10565
|
+
const textCls = React70.useMemo(() => {
|
|
10549
10566
|
switch (color) {
|
|
10550
10567
|
case "primary":
|
|
10551
10568
|
return "oui-text-primary";
|
|
@@ -10567,7 +10584,7 @@ var Marks = (props) => {
|
|
|
10567
10584
|
const __value = isInnerMask ? mark.value : index;
|
|
10568
10585
|
const active = (isInnerMask ? _value >= __value : _value >= mark.value) && _value >= 0 && !props.disabled;
|
|
10569
10586
|
const classNames = active ? colorCls : "";
|
|
10570
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10587
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React70.Fragment, { children: [
|
|
10571
10588
|
(!isInnerMask ? mark.label : true) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10572
10589
|
"span",
|
|
10573
10590
|
{
|
|
@@ -10597,8 +10614,8 @@ var SliderTip = (props) => {
|
|
|
10597
10614
|
const percent = convertValueToPercentage(value, min, max);
|
|
10598
10615
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className, style: { lineHeight: "19px" }, children: props.tipFormatter?.(value, min, max, percent) ?? `${percent.toFixed()}%` });
|
|
10599
10616
|
};
|
|
10600
|
-
var SingleSlider =
|
|
10601
|
-
const _value =
|
|
10617
|
+
var SingleSlider = React70__namespace.forwardRef((props, ref) => {
|
|
10618
|
+
const _value = React70.useMemo(() => [props.value], [props.value]);
|
|
10602
10619
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10603
10620
|
BaseSlider,
|
|
10604
10621
|
{
|
|
@@ -10617,7 +10634,7 @@ var SingleSlider = React69__namespace.forwardRef((props, ref) => {
|
|
|
10617
10634
|
SingleSlider.displayName = "SingleSlider";
|
|
10618
10635
|
var Slider = BaseSlider;
|
|
10619
10636
|
Slider.single = SingleSlider;
|
|
10620
|
-
var ToastErrorIcon =
|
|
10637
|
+
var ToastErrorIcon = React70__namespace.default.forwardRef(
|
|
10621
10638
|
(props, ref) => {
|
|
10622
10639
|
const { opacity = 1, viewBox = "0 0 20 20", ...rest } = props;
|
|
10623
10640
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, viewBox, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10630,7 +10647,7 @@ var ToastErrorIcon = React69__namespace.default.forwardRef(
|
|
|
10630
10647
|
) });
|
|
10631
10648
|
}
|
|
10632
10649
|
);
|
|
10633
|
-
var ToastSuccessIcon =
|
|
10650
|
+
var ToastSuccessIcon = React70__namespace.default.forwardRef(
|
|
10634
10651
|
(props, ref) => {
|
|
10635
10652
|
const { opacity = 1, viewBox = "0 0 20 20", ...rest } = props;
|
|
10636
10653
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, viewBox, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10644,7 +10661,7 @@ var ToastSuccessIcon = React69__namespace.default.forwardRef(
|
|
|
10644
10661
|
) });
|
|
10645
10662
|
}
|
|
10646
10663
|
);
|
|
10647
|
-
var ToastLoadingIcon =
|
|
10664
|
+
var ToastLoadingIcon = React70__namespace.default.forwardRef(
|
|
10648
10665
|
(props, ref) => {
|
|
10649
10666
|
const { opacity = 1, viewBox = "0 0 20 20", ...rest } = props;
|
|
10650
10667
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, viewBox, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10799,10 +10816,10 @@ var ToastTile = (props) => {
|
|
|
10799
10816
|
);
|
|
10800
10817
|
};
|
|
10801
10818
|
function useEndReached(sentinelRef, onEndReached) {
|
|
10802
|
-
const observer =
|
|
10803
|
-
const cb =
|
|
10819
|
+
const observer = React70.useRef();
|
|
10820
|
+
const cb = React70.useRef(onEndReached);
|
|
10804
10821
|
cb.current = onEndReached;
|
|
10805
|
-
|
|
10822
|
+
React70.useEffect(() => {
|
|
10806
10823
|
const options = {
|
|
10807
10824
|
root: null,
|
|
10808
10825
|
rootMargin: "0px",
|
|
@@ -10820,22 +10837,22 @@ function useEndReached(sentinelRef, onEndReached) {
|
|
|
10820
10837
|
observer.current?.disconnect();
|
|
10821
10838
|
};
|
|
10822
10839
|
}, []);
|
|
10823
|
-
|
|
10840
|
+
React70.useEffect(() => {
|
|
10824
10841
|
observer.current?.observe(sentinelRef.current);
|
|
10825
10842
|
}, []);
|
|
10826
10843
|
}
|
|
10827
10844
|
var ListViewInner = (props, ref) => {
|
|
10828
|
-
const sentinelRef =
|
|
10829
|
-
const containerRef =
|
|
10845
|
+
const sentinelRef = React70.useRef(null);
|
|
10846
|
+
const containerRef = React70.useRef(null);
|
|
10830
10847
|
useEndReached(sentinelRef, () => {
|
|
10831
10848
|
if (!props.isLoading) {
|
|
10832
10849
|
props.loadMore?.();
|
|
10833
10850
|
}
|
|
10834
10851
|
});
|
|
10835
|
-
const emptyDataSouce =
|
|
10852
|
+
const emptyDataSouce = React70.useMemo(() => {
|
|
10836
10853
|
return Array.isArray(props.dataSource) && props.dataSource.length <= 0;
|
|
10837
10854
|
}, [props.dataSource]);
|
|
10838
|
-
const listViewElement =
|
|
10855
|
+
const listViewElement = React70.useMemo(() => {
|
|
10839
10856
|
if (!props.dataSource) {
|
|
10840
10857
|
return null;
|
|
10841
10858
|
}
|
|
@@ -10852,16 +10869,16 @@ var ListViewInner = (props, ref) => {
|
|
|
10852
10869
|
}
|
|
10853
10870
|
);
|
|
10854
10871
|
}
|
|
10855
|
-
return props.dataSource.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10872
|
+
return props.dataSource.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(React70__namespace.default.Fragment, { children: props.renderItem(item, index, props.extraData) }, index));
|
|
10856
10873
|
}, [emptyDataSouce, props.dataSource, props.extraData, props.emptyView]);
|
|
10857
|
-
const loadingViewElement =
|
|
10874
|
+
const loadingViewElement = React70.useMemo(() => {
|
|
10858
10875
|
if ((props.dataSource?.length || 0) === 0) return null;
|
|
10859
10876
|
if (!props.isLoading) {
|
|
10860
10877
|
return null;
|
|
10861
10878
|
}
|
|
10862
10879
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-flex oui-py-2 oui-justify-center oui-items-center", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) });
|
|
10863
10880
|
}, [props.isLoading, props.dataSource]);
|
|
10864
|
-
|
|
10881
|
+
React70.useImperativeHandle(ref, () => {
|
|
10865
10882
|
return {
|
|
10866
10883
|
scroll: (direction) => {
|
|
10867
10884
|
containerRef.current?.scroll({
|
|
@@ -10907,7 +10924,7 @@ var ListViewInner = (props, ref) => {
|
|
|
10907
10924
|
}
|
|
10908
10925
|
);
|
|
10909
10926
|
};
|
|
10910
|
-
var ListView =
|
|
10927
|
+
var ListView = React70.forwardRef(ListViewInner);
|
|
10911
10928
|
var Collapsible = CollapsiblePrimitive__namespace.Root;
|
|
10912
10929
|
var CollapsibleTrigger2 = CollapsiblePrimitive__namespace.CollapsibleTrigger;
|
|
10913
10930
|
var CollapsibleContent2 = (props) => {
|
|
@@ -10917,21 +10934,21 @@ var CollapsibleContent2 = (props) => {
|
|
|
10917
10934
|
...props,
|
|
10918
10935
|
className: tailwindVariants.cnBase(
|
|
10919
10936
|
props.className,
|
|
10920
|
-
"data-[state=
|
|
10937
|
+
"oui-overflow-hidden data-[state=closed]:oui-animate-collapsible-up data-[state=open]:oui-animate-collapsible-down"
|
|
10921
10938
|
)
|
|
10922
10939
|
}
|
|
10923
10940
|
);
|
|
10924
10941
|
};
|
|
10925
|
-
var CollapseContext =
|
|
10942
|
+
var CollapseContext = React70.createContext(
|
|
10926
10943
|
{}
|
|
10927
10944
|
);
|
|
10928
10945
|
var useCollapseContext = () => {
|
|
10929
|
-
return
|
|
10946
|
+
return React70.useContext(CollapseContext);
|
|
10930
10947
|
};
|
|
10931
10948
|
var Panel = (props) => {
|
|
10932
10949
|
const { activeKey, setActiveKey } = useCollapseContext();
|
|
10933
10950
|
const { header, headerClassName, itemKey, disabled } = props;
|
|
10934
|
-
const headerNode =
|
|
10951
|
+
const headerNode = React70.useMemo(() => {
|
|
10935
10952
|
if (typeof header === "string") {
|
|
10936
10953
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10937
10954
|
"div",
|
|
@@ -10976,8 +10993,8 @@ var Panel = (props) => {
|
|
|
10976
10993
|
};
|
|
10977
10994
|
var CollapseRoot = (props) => {
|
|
10978
10995
|
const { activeKey = "", children } = props;
|
|
10979
|
-
const [internalActiveKey, setInternalActiveKey] =
|
|
10980
|
-
const memoizedValue =
|
|
10996
|
+
const [internalActiveKey, setInternalActiveKey] = React70.useState(activeKey);
|
|
10997
|
+
const memoizedValue = React70.useMemo(() => {
|
|
10981
10998
|
return {
|
|
10982
10999
|
activeKey: internalActiveKey,
|
|
10983
11000
|
setActiveKey: setInternalActiveKey
|
|
@@ -10997,11 +11014,11 @@ var Marquee = (props) => {
|
|
|
10997
11014
|
className,
|
|
10998
11015
|
setApi
|
|
10999
11016
|
} = props;
|
|
11000
|
-
const isHorizontal =
|
|
11017
|
+
const isHorizontal = React70.useMemo(
|
|
11001
11018
|
() => carouselOptions.axis !== "y",
|
|
11002
11019
|
[carouselOptions.axis]
|
|
11003
11020
|
);
|
|
11004
|
-
const emblaOptions =
|
|
11021
|
+
const emblaOptions = React70.useMemo(() => {
|
|
11005
11022
|
return {
|
|
11006
11023
|
loop: true,
|
|
11007
11024
|
align: "start",
|
|
@@ -11011,7 +11028,7 @@ var Marquee = (props) => {
|
|
|
11011
11028
|
...carouselOptions
|
|
11012
11029
|
};
|
|
11013
11030
|
}, [carouselOptions]);
|
|
11014
|
-
const autoScrollPluginOptions =
|
|
11031
|
+
const autoScrollPluginOptions = React70.useMemo(() => {
|
|
11015
11032
|
return {
|
|
11016
11033
|
speed: 1,
|
|
11017
11034
|
direction: "forward",
|
|
@@ -11025,12 +11042,12 @@ var Marquee = (props) => {
|
|
|
11025
11042
|
const [emblaRef, emblaApi] = useEmblaCarousel__default.default(emblaOptions, [
|
|
11026
11043
|
AutoScroll__default.default(autoScrollPluginOptions)
|
|
11027
11044
|
]);
|
|
11028
|
-
|
|
11045
|
+
React70__namespace.default.useEffect(() => {
|
|
11029
11046
|
if (emblaApi && setApi) {
|
|
11030
11047
|
setApi(emblaApi);
|
|
11031
11048
|
}
|
|
11032
11049
|
}, [emblaApi, setApi]);
|
|
11033
|
-
const renderSlides =
|
|
11050
|
+
const renderSlides = React70.useMemo(() => {
|
|
11034
11051
|
if (!Array.isArray(data) || data.length === 0) {
|
|
11035
11052
|
return null;
|
|
11036
11053
|
}
|
|
@@ -11177,7 +11194,7 @@ var dropdownMenuVariants = tailwindVariants.tv({
|
|
|
11177
11194
|
size: "lg"
|
|
11178
11195
|
}
|
|
11179
11196
|
});
|
|
11180
|
-
var DropdownMenuContent =
|
|
11197
|
+
var DropdownMenuContent = React70__namespace.forwardRef(({ className, sideOffset = 4, size, ...props }, ref) => {
|
|
11181
11198
|
const { content } = dropdownMenuVariants({ size });
|
|
11182
11199
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11183
11200
|
DropdownMenuPrimitive__namespace.Content,
|
|
@@ -11190,7 +11207,7 @@ var DropdownMenuContent = React69__namespace.forwardRef(({ className, sideOffset
|
|
|
11190
11207
|
) });
|
|
11191
11208
|
});
|
|
11192
11209
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
11193
|
-
var DropdownMenuItem =
|
|
11210
|
+
var DropdownMenuItem = React70__namespace.forwardRef(({ className, inset, size, ...props }, ref) => {
|
|
11194
11211
|
const { item } = dropdownMenuVariants({ size });
|
|
11195
11212
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11196
11213
|
DropdownMenuPrimitive__namespace.Item,
|
|
@@ -11202,7 +11219,7 @@ var DropdownMenuItem = React69__namespace.forwardRef(({ className, inset, size,
|
|
|
11202
11219
|
);
|
|
11203
11220
|
});
|
|
11204
11221
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
11205
|
-
var DropdownMenuLabel =
|
|
11222
|
+
var DropdownMenuLabel = React70__namespace.forwardRef(({ className, inset, ...props }, ref) => {
|
|
11206
11223
|
const { label } = dropdownMenuVariants({
|
|
11207
11224
|
inset
|
|
11208
11225
|
});
|
|
@@ -11216,7 +11233,7 @@ var DropdownMenuLabel = React69__namespace.forwardRef(({ className, inset, ...pr
|
|
|
11216
11233
|
);
|
|
11217
11234
|
});
|
|
11218
11235
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
11219
|
-
var DropdownMenuSeparator =
|
|
11236
|
+
var DropdownMenuSeparator = React70__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
11220
11237
|
const { separator } = dropdownMenuVariants();
|
|
11221
11238
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11222
11239
|
DropdownMenuPrimitive__namespace.Separator,
|
|
@@ -11238,7 +11255,7 @@ var DropdownMenuShortcut = ({
|
|
|
11238
11255
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
11239
11256
|
var SimpleDropdownMenu = (props) => {
|
|
11240
11257
|
const { currentValue, menu, render, size, children, ...contentProps } = props;
|
|
11241
|
-
const items =
|
|
11258
|
+
const items = React70.useMemo(() => {
|
|
11242
11259
|
if (typeof props.render === "function") {
|
|
11243
11260
|
return props.menu.map((item, index) => {
|
|
11244
11261
|
return props.render?.(item, index);
|
|
@@ -11277,7 +11294,7 @@ var SimpleDropdownMenu = (props) => {
|
|
|
11277
11294
|
] });
|
|
11278
11295
|
};
|
|
11279
11296
|
var ComponentsProvider = (props) => {
|
|
11280
|
-
|
|
11297
|
+
React70.useEffect(() => {
|
|
11281
11298
|
if (props.components && Object.keys(props.components).length) {
|
|
11282
11299
|
for (const position in props.components) {
|
|
11283
11300
|
const Element = props.components[position];
|
|
@@ -11295,20 +11312,20 @@ var ComponentsProvider = (props) => {
|
|
|
11295
11312
|
};
|
|
11296
11313
|
var OrderlyThemeProvider = (props) => {
|
|
11297
11314
|
const { components, overrides, children } = props;
|
|
11298
|
-
const resolveComponentTheme =
|
|
11315
|
+
const resolveComponentTheme = React70.useCallback(
|
|
11299
11316
|
(component, defaultValue) => {
|
|
11300
11317
|
return overrides?.[component] || defaultValue;
|
|
11301
11318
|
},
|
|
11302
11319
|
[overrides]
|
|
11303
11320
|
);
|
|
11304
|
-
const memoizedValue =
|
|
11321
|
+
const memoizedValue = React70.useMemo(() => {
|
|
11305
11322
|
return { getComponentTheme: resolveComponentTheme };
|
|
11306
11323
|
}, [resolveComponentTheme]);
|
|
11307
11324
|
return /* @__PURE__ */ jsxRuntime.jsx(OrderlyThemeContext.Provider, { value: memoizedValue, children: /* @__PURE__ */ jsxRuntime.jsx(ComponentsProvider, { components, children }) });
|
|
11308
11325
|
};
|
|
11309
|
-
var Either =
|
|
11326
|
+
var Either = React70.memo((props) => {
|
|
11310
11327
|
const { value, children, left } = props;
|
|
11311
|
-
const inputValue =
|
|
11328
|
+
const inputValue = React70.useMemo(
|
|
11312
11329
|
() => Boolean(typeof value === "function" ? value() : value),
|
|
11313
11330
|
[value]
|
|
11314
11331
|
);
|
|
@@ -11339,6 +11356,58 @@ __export(tailwind_exports, {
|
|
|
11339
11356
|
default: () => tailwind_default
|
|
11340
11357
|
});
|
|
11341
11358
|
var tailwind_default = {};
|
|
11359
|
+
var stopPropagation = (event) => {
|
|
11360
|
+
event.stopPropagation();
|
|
11361
|
+
};
|
|
11362
|
+
var Tips = ({
|
|
11363
|
+
content,
|
|
11364
|
+
title = "Tips",
|
|
11365
|
+
trigger,
|
|
11366
|
+
className,
|
|
11367
|
+
classNames
|
|
11368
|
+
}) => {
|
|
11369
|
+
const { isMobile } = useScreen();
|
|
11370
|
+
const triggerElement = trigger || /* @__PURE__ */ jsxRuntime.jsx(
|
|
11371
|
+
InfoCircleIcon,
|
|
11372
|
+
{
|
|
11373
|
+
opacity: 1,
|
|
11374
|
+
className: tailwindVariants.cnBase(
|
|
11375
|
+
"oui-size-3 oui-shrink-0 oui-cursor-pointer oui-text-base-contrast-36",
|
|
11376
|
+
classNames?.trigger
|
|
11377
|
+
)
|
|
11378
|
+
}
|
|
11379
|
+
);
|
|
11380
|
+
if (isMobile) {
|
|
11381
|
+
const handleClick = (event) => {
|
|
11382
|
+
event.stopPropagation();
|
|
11383
|
+
modal.alert({
|
|
11384
|
+
title,
|
|
11385
|
+
message: content
|
|
11386
|
+
});
|
|
11387
|
+
};
|
|
11388
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11389
|
+
"button",
|
|
11390
|
+
{
|
|
11391
|
+
type: "button",
|
|
11392
|
+
className,
|
|
11393
|
+
onClick: handleClick,
|
|
11394
|
+
onMouseDown: stopPropagation,
|
|
11395
|
+
onPointerDown: stopPropagation,
|
|
11396
|
+
children: triggerElement
|
|
11397
|
+
}
|
|
11398
|
+
);
|
|
11399
|
+
}
|
|
11400
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11401
|
+
Tooltip,
|
|
11402
|
+
{
|
|
11403
|
+
className: "oui-bg-base-6",
|
|
11404
|
+
arrow: { className: "oui-fill-base-6" },
|
|
11405
|
+
content: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-max-w-72", children: content }),
|
|
11406
|
+
children: triggerElement
|
|
11407
|
+
}
|
|
11408
|
+
);
|
|
11409
|
+
};
|
|
11410
|
+
Tips.displayName = "Tips";
|
|
11342
11411
|
var dotStatusVariants = tailwindVariants.tv({
|
|
11343
11412
|
slots: {
|
|
11344
11413
|
root: "oui-flex oui-items-center oui-justify-center oui-gap-1",
|
|
@@ -11632,6 +11701,7 @@ exports.TabsTrigger = TabsTrigger;
|
|
|
11632
11701
|
exports.Text = Text2;
|
|
11633
11702
|
exports.TextField = TextField;
|
|
11634
11703
|
exports.ThrottledButton = ThrottledButton;
|
|
11704
|
+
exports.Tips = Tips;
|
|
11635
11705
|
exports.ToastTile = ToastTile;
|
|
11636
11706
|
exports.Toaster = Toaster;
|
|
11637
11707
|
exports.TokenIcon = TokenIcon;
|
|
@@ -11652,6 +11722,7 @@ exports.TriggerDialog = TriggerDialog;
|
|
|
11652
11722
|
exports.VaultsIcon = VaultsIcon;
|
|
11653
11723
|
exports.VectorIcon = VectorIcon;
|
|
11654
11724
|
exports.WalletIcon = WalletIcon;
|
|
11725
|
+
exports.WarningIcon = WarningIcon;
|
|
11655
11726
|
exports.WoofiStakeIcon = WoofiStakeIcon;
|
|
11656
11727
|
exports.boxVariants = boxVariants;
|
|
11657
11728
|
exports.buttonVariants = buttonVariants;
|