@orderly.network/ui 2.8.3-alpha.0 → 2.8.4-alpha.0
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 +9 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +354 -317
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +164 -128
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React67 = 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 React67__namespace = /*#__PURE__*/_interopNamespace(React67);
|
|
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 = React67__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 = React67.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 = React67__namespace.default.forwardRef(
|
|
706
706
|
(props, forwardedRef) => {
|
|
707
707
|
const {
|
|
708
708
|
asChild = false,
|
|
@@ -717,14 +717,14 @@ var BaseButton = React66__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 = React67.useMemo(() => {
|
|
721
|
+
return icon ? React67__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 = React67.useMemo(() => {
|
|
728
728
|
if (!leading && !trailing && !iconElement)
|
|
729
729
|
return children;
|
|
730
730
|
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", itemAlign: "center", className: "oui-space-x-1", children: [
|
|
@@ -734,7 +734,7 @@ var BaseButton = React66__namespace.default.forwardRef(
|
|
|
734
734
|
trailing
|
|
735
735
|
] });
|
|
736
736
|
}, [children, leading, trailing, iconElement]);
|
|
737
|
-
const spinnerSize =
|
|
737
|
+
const spinnerSize = React67.useMemo(() => {
|
|
738
738
|
switch (size) {
|
|
739
739
|
case "xl":
|
|
740
740
|
return "md";
|
|
@@ -969,7 +969,7 @@ var buttonVariants = tailwindVariants.tv(
|
|
|
969
969
|
responsiveVariants: ["md", "lg"]
|
|
970
970
|
}
|
|
971
971
|
);
|
|
972
|
-
var Button =
|
|
972
|
+
var Button = React67__namespace.default.forwardRef(
|
|
973
973
|
({
|
|
974
974
|
className,
|
|
975
975
|
variant,
|
|
@@ -1002,9 +1002,9 @@ var Button = React66__namespace.default.forwardRef(
|
|
|
1002
1002
|
}
|
|
1003
1003
|
);
|
|
1004
1004
|
Button.displayName = "Button";
|
|
1005
|
-
var ThrottledButton =
|
|
1006
|
-
const lastCall =
|
|
1007
|
-
const throttle =
|
|
1005
|
+
var ThrottledButton = React67__namespace.default.forwardRef(({ onClick, throttleDuration = 700, ...props }, ref) => {
|
|
1006
|
+
const lastCall = React67.useRef(0);
|
|
1007
|
+
const throttle = React67.useCallback(
|
|
1008
1008
|
(delay, fn) => {
|
|
1009
1009
|
return function(...args) {
|
|
1010
1010
|
const now = Date.now();
|
|
@@ -1089,7 +1089,7 @@ var gridVariants = tv({
|
|
|
1089
1089
|
// autoFlow: "row",
|
|
1090
1090
|
}
|
|
1091
1091
|
});
|
|
1092
|
-
var Grid =
|
|
1092
|
+
var Grid = React67__namespace.default.forwardRef((props, ref) => {
|
|
1093
1093
|
const { className, cols, rows, gap, gapX, gapY, autoFlow, ...rest } = props;
|
|
1094
1094
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1095
1095
|
Box,
|
|
@@ -1139,8 +1139,8 @@ var gridSpanVariants = tv({
|
|
|
1139
1139
|
});
|
|
1140
1140
|
var Span = (props) => {
|
|
1141
1141
|
const { colSpan, rowSpan, className, ...rest } = props;
|
|
1142
|
-
const ref =
|
|
1143
|
-
|
|
1142
|
+
const ref = React67.useRef(null);
|
|
1143
|
+
React67.useEffect(() => {
|
|
1144
1144
|
if (ref.current) {
|
|
1145
1145
|
const parent = ref.current.parentElement;
|
|
1146
1146
|
if (!parent || !parent.classList.contains("oui-grid")) ;
|
|
@@ -1183,7 +1183,7 @@ var iconVariants = tailwindVariants.tv({
|
|
|
1183
1183
|
color: "black"
|
|
1184
1184
|
}
|
|
1185
1185
|
});
|
|
1186
|
-
var BaseIcon =
|
|
1186
|
+
var BaseIcon = React67__namespace.default.forwardRef(
|
|
1187
1187
|
(props, ref) => {
|
|
1188
1188
|
const {
|
|
1189
1189
|
size = 24,
|
|
@@ -1242,7 +1242,7 @@ var avatarVariants = tv({
|
|
|
1242
1242
|
size: "sm"
|
|
1243
1243
|
}
|
|
1244
1244
|
});
|
|
1245
|
-
var AvatarBase =
|
|
1245
|
+
var AvatarBase = React67__namespace.forwardRef(({ className, size, ...props }, ref) => {
|
|
1246
1246
|
const { root } = avatarVariants({ size });
|
|
1247
1247
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1248
1248
|
AvatarPrimitive__namespace.Root,
|
|
@@ -1254,7 +1254,7 @@ var AvatarBase = React66__namespace.forwardRef(({ className, size, ...props }, r
|
|
|
1254
1254
|
);
|
|
1255
1255
|
});
|
|
1256
1256
|
AvatarBase.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
1257
|
-
var AvatarImage =
|
|
1257
|
+
var AvatarImage = React67__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1258
1258
|
const { image } = avatarVariants();
|
|
1259
1259
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1260
1260
|
AvatarPrimitive__namespace.Image,
|
|
@@ -1266,12 +1266,12 @@ var AvatarImage = React66__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1266
1266
|
);
|
|
1267
1267
|
});
|
|
1268
1268
|
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
1269
|
-
var AvatarFallback =
|
|
1269
|
+
var AvatarFallback = React67__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1270
1270
|
const { fallback } = avatarVariants({ className });
|
|
1271
1271
|
return /* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Fallback, { ref, className: fallback(), ...props });
|
|
1272
1272
|
});
|
|
1273
1273
|
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
1274
|
-
var Avatar =
|
|
1274
|
+
var Avatar = React67__namespace.forwardRef((props, ref) => {
|
|
1275
1275
|
const { size, src, fallback, delayMs, alt, onLoadingStatusChange, ...rest } = props;
|
|
1276
1276
|
return /* @__PURE__ */ jsxRuntime.jsxs(AvatarBase, { ...rest, ref, size, children: [
|
|
1277
1277
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1285,13 +1285,13 @@ var Avatar = React66__namespace.forwardRef((props, ref) => {
|
|
|
1285
1285
|
typeof fallback !== "undefined" && /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { delayMs, children: fallback })
|
|
1286
1286
|
] });
|
|
1287
1287
|
});
|
|
1288
|
-
var EVMAvatar =
|
|
1288
|
+
var EVMAvatar = React67__namespace.forwardRef((props, ref) => {
|
|
1289
1289
|
const { address, ...rest } = props;
|
|
1290
|
-
const src =
|
|
1290
|
+
const src = React67.useMemo(() => makeBlockie__default.default(address), [props.address]);
|
|
1291
1291
|
return /* @__PURE__ */ jsxRuntime.jsx(Avatar, { ...rest, src });
|
|
1292
1292
|
});
|
|
1293
1293
|
var ChainIcon = (props) => {
|
|
1294
|
-
const url =
|
|
1294
|
+
const url = React67.useMemo(() => {
|
|
1295
1295
|
return `https://oss.orderly.network/static/network_logo/${props.chainId}.png`;
|
|
1296
1296
|
}, [props.chainId]);
|
|
1297
1297
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1305,7 +1305,7 @@ var ChainIcon = (props) => {
|
|
|
1305
1305
|
);
|
|
1306
1306
|
};
|
|
1307
1307
|
var TokenIcon = (props) => {
|
|
1308
|
-
const url =
|
|
1308
|
+
const url = React67.useMemo(() => {
|
|
1309
1309
|
let name = props.name;
|
|
1310
1310
|
if (typeof props.symbol === "string") {
|
|
1311
1311
|
const arr = props.symbol?.split("_");
|
|
@@ -1325,7 +1325,7 @@ var TokenIcon = (props) => {
|
|
|
1325
1325
|
};
|
|
1326
1326
|
var CombineIcon = (props) => {
|
|
1327
1327
|
const { secondary } = props;
|
|
1328
|
-
const subElement =
|
|
1328
|
+
const subElement = React67.useMemo(() => {
|
|
1329
1329
|
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";
|
|
1330
1330
|
if (secondary.component) {
|
|
1331
1331
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindVariants.cnBase(className, secondary?.className), children: secondary.component });
|
|
@@ -1352,7 +1352,7 @@ var CombineIcon = (props) => {
|
|
|
1352
1352
|
subElement
|
|
1353
1353
|
] });
|
|
1354
1354
|
};
|
|
1355
|
-
var CloseIcon =
|
|
1355
|
+
var CloseIcon = React67__namespace.default.forwardRef(
|
|
1356
1356
|
(props, ref) => {
|
|
1357
1357
|
const { opacity = 0.54, ...rest } = props;
|
|
1358
1358
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1366,7 +1366,7 @@ var CloseIcon = React66__namespace.default.forwardRef(
|
|
|
1366
1366
|
}
|
|
1367
1367
|
);
|
|
1368
1368
|
CloseIcon.displayName = "CloseIcon";
|
|
1369
|
-
var BaseIconWithPath =
|
|
1369
|
+
var BaseIconWithPath = React67__namespace.default.forwardRef((props, ref) => {
|
|
1370
1370
|
const { opacity = 0.54, d, ...rest } = props;
|
|
1371
1371
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1372
1372
|
"path",
|
|
@@ -1379,7 +1379,7 @@ var BaseIconWithPath = React66__namespace.default.forwardRef((props, ref) => {
|
|
|
1379
1379
|
}
|
|
1380
1380
|
) });
|
|
1381
1381
|
});
|
|
1382
|
-
var CheckIcon =
|
|
1382
|
+
var CheckIcon = React67__namespace.default.forwardRef(
|
|
1383
1383
|
(props, ref) => {
|
|
1384
1384
|
const { opacity = 0.54, ...rest } = props;
|
|
1385
1385
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1393,7 +1393,7 @@ var CheckIcon = React66__namespace.default.forwardRef(
|
|
|
1393
1393
|
}
|
|
1394
1394
|
);
|
|
1395
1395
|
CheckIcon.displayName = "CheckIcon";
|
|
1396
|
-
var ChevronDownIcon =
|
|
1396
|
+
var ChevronDownIcon = React67__namespace.default.forwardRef(
|
|
1397
1397
|
(props, ref) => {
|
|
1398
1398
|
const { opacity = 0.54, ...rest } = props;
|
|
1399
1399
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1407,7 +1407,7 @@ var ChevronDownIcon = React66__namespace.default.forwardRef(
|
|
|
1407
1407
|
}
|
|
1408
1408
|
);
|
|
1409
1409
|
ChevronDownIcon.displayName = "ChevronDownIcon";
|
|
1410
|
-
var ChevronUpIcon =
|
|
1410
|
+
var ChevronUpIcon = React67__namespace.default.forwardRef(
|
|
1411
1411
|
(props, ref) => {
|
|
1412
1412
|
const { opacity = 0.54, ...rest } = props;
|
|
1413
1413
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1421,7 +1421,7 @@ var ChevronUpIcon = React66__namespace.default.forwardRef(
|
|
|
1421
1421
|
}
|
|
1422
1422
|
);
|
|
1423
1423
|
ChevronUpIcon.displayName = "ChevronUpIcon";
|
|
1424
|
-
var CaretUpIcon =
|
|
1424
|
+
var CaretUpIcon = React67__namespace.default.forwardRef(
|
|
1425
1425
|
(props, ref) => {
|
|
1426
1426
|
const { opacity = 0.54, ...rest } = props;
|
|
1427
1427
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1435,7 +1435,7 @@ var CaretUpIcon = React66__namespace.default.forwardRef(
|
|
|
1435
1435
|
}
|
|
1436
1436
|
);
|
|
1437
1437
|
CaretUpIcon.displayName = "CaretUpIcon";
|
|
1438
|
-
var CaretDownIcon =
|
|
1438
|
+
var CaretDownIcon = React67__namespace.default.forwardRef(
|
|
1439
1439
|
(props, ref) => {
|
|
1440
1440
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1441
1441
|
BaseIconWithPath,
|
|
@@ -1448,7 +1448,7 @@ var CaretDownIcon = React66__namespace.default.forwardRef(
|
|
|
1448
1448
|
}
|
|
1449
1449
|
);
|
|
1450
1450
|
CaretDownIcon.displayName = "CaretDownIcon";
|
|
1451
|
-
var CaretLeftIcon =
|
|
1451
|
+
var CaretLeftIcon = React67__namespace.default.forwardRef(
|
|
1452
1452
|
(props, ref) => {
|
|
1453
1453
|
const { opacity = 0.54, ...rest } = props;
|
|
1454
1454
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1462,7 +1462,7 @@ var CaretLeftIcon = React66__namespace.default.forwardRef(
|
|
|
1462
1462
|
}
|
|
1463
1463
|
);
|
|
1464
1464
|
CaretLeftIcon.displayName = "CaretLeftIcon";
|
|
1465
|
-
var CaretRightIcon =
|
|
1465
|
+
var CaretRightIcon = React67__namespace.default.forwardRef(
|
|
1466
1466
|
(props, ref) => {
|
|
1467
1467
|
const { opacity = 0.54, ...rest } = props;
|
|
1468
1468
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1476,7 +1476,7 @@ var CaretRightIcon = React66__namespace.default.forwardRef(
|
|
|
1476
1476
|
}
|
|
1477
1477
|
);
|
|
1478
1478
|
CaretRightIcon.displayName = "CaretRightIcon";
|
|
1479
|
-
var ChevronLeftIcon =
|
|
1479
|
+
var ChevronLeftIcon = React67__namespace.default.forwardRef(
|
|
1480
1480
|
(props, ref) => {
|
|
1481
1481
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1482
1482
|
BaseIconWithPath,
|
|
@@ -1489,7 +1489,7 @@ var ChevronLeftIcon = React66__namespace.default.forwardRef(
|
|
|
1489
1489
|
}
|
|
1490
1490
|
);
|
|
1491
1491
|
ChevronLeftIcon.displayName = "ChevronLeftIcon";
|
|
1492
|
-
var ChevronRightIcon =
|
|
1492
|
+
var ChevronRightIcon = React67__namespace.default.forwardRef(
|
|
1493
1493
|
(props, ref) => {
|
|
1494
1494
|
const { opacity = 0.54, ...rest } = props;
|
|
1495
1495
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1503,7 +1503,7 @@ var ChevronRightIcon = React66__namespace.default.forwardRef(
|
|
|
1503
1503
|
}
|
|
1504
1504
|
);
|
|
1505
1505
|
ChevronRightIcon.displayName = "ChevronRightIcon";
|
|
1506
|
-
var CalendarMinusIcon =
|
|
1506
|
+
var CalendarMinusIcon = React67__namespace.default.forwardRef(
|
|
1507
1507
|
(props, ref) => {
|
|
1508
1508
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1509
1509
|
BaseIconWithPath,
|
|
@@ -1516,7 +1516,7 @@ var CalendarMinusIcon = React66__namespace.default.forwardRef(
|
|
|
1516
1516
|
}
|
|
1517
1517
|
);
|
|
1518
1518
|
CalendarMinusIcon.displayName = "CalendarMinusIcon";
|
|
1519
|
-
var SettingIcon =
|
|
1519
|
+
var SettingIcon = React67__namespace.default.forwardRef(
|
|
1520
1520
|
(props, ref) => {
|
|
1521
1521
|
const { opacity = 0.54, ...rest } = props;
|
|
1522
1522
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1530,7 +1530,7 @@ var SettingIcon = React66__namespace.default.forwardRef(
|
|
|
1530
1530
|
}
|
|
1531
1531
|
);
|
|
1532
1532
|
SettingIcon.displayName = "SettingIcon";
|
|
1533
|
-
var CloseSquareFillIcon =
|
|
1533
|
+
var CloseSquareFillIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1534
1534
|
const { opacity = 0.54, ...rest } = props;
|
|
1535
1535
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1536
1536
|
"path",
|
|
@@ -1542,7 +1542,7 @@ var CloseSquareFillIcon = React66__namespace.default.forwardRef((props, ref) =>
|
|
|
1542
1542
|
) });
|
|
1543
1543
|
});
|
|
1544
1544
|
CloseSquareFillIcon.displayName = "CloseSquareFillIcon";
|
|
1545
|
-
var CloseCircleFillIcon =
|
|
1545
|
+
var CloseCircleFillIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1546
1546
|
const { opacity = 0.54, ...rest } = props;
|
|
1547
1547
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1548
1548
|
"path",
|
|
@@ -1554,7 +1554,7 @@ var CloseCircleFillIcon = React66__namespace.default.forwardRef((props, ref) =>
|
|
|
1554
1554
|
) });
|
|
1555
1555
|
});
|
|
1556
1556
|
CloseCircleFillIcon.displayName = "CloseCircleFillIcon";
|
|
1557
|
-
var CheckedCircleFillIcon =
|
|
1557
|
+
var CheckedCircleFillIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1558
1558
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1559
1559
|
BaseIconWithPath,
|
|
1560
1560
|
{
|
|
@@ -1565,7 +1565,7 @@ var CheckedCircleFillIcon = React66__namespace.default.forwardRef((props, ref) =
|
|
|
1565
1565
|
);
|
|
1566
1566
|
});
|
|
1567
1567
|
CheckedCircleFillIcon.displayName = "CheckedCircleFillIcon";
|
|
1568
|
-
var CheckedSquareFillIcon =
|
|
1568
|
+
var CheckedSquareFillIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1569
1569
|
const { opacity = 0.54, ...rest } = props;
|
|
1570
1570
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1571
1571
|
"path",
|
|
@@ -1579,7 +1579,7 @@ var CheckedSquareFillIcon = React66__namespace.default.forwardRef((props, ref) =
|
|
|
1579
1579
|
) });
|
|
1580
1580
|
});
|
|
1581
1581
|
CheckedSquareFillIcon.displayName = "CheckSquareFillIcon";
|
|
1582
|
-
var CheckSquareEmptyIcon =
|
|
1582
|
+
var CheckSquareEmptyIcon = React67__namespace.default.forwardRef(
|
|
1583
1583
|
(props, ref) => {
|
|
1584
1584
|
const { opacity = 0.54, ...rest } = props;
|
|
1585
1585
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1595,7 +1595,7 @@ var CheckSquareEmptyIcon = React66__namespace.default.forwardRef(
|
|
|
1595
1595
|
}
|
|
1596
1596
|
);
|
|
1597
1597
|
CheckSquareEmptyIcon.displayName = "CheckSquareEmptyIcon";
|
|
1598
|
-
var PlusIcon =
|
|
1598
|
+
var PlusIcon = React67__namespace.default.forwardRef(
|
|
1599
1599
|
(props, ref) => {
|
|
1600
1600
|
const { opacity = 0.54, ...rest } = props;
|
|
1601
1601
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1609,7 +1609,7 @@ var PlusIcon = React66__namespace.default.forwardRef(
|
|
|
1609
1609
|
}
|
|
1610
1610
|
);
|
|
1611
1611
|
PlusIcon.displayName = "PlusIcon";
|
|
1612
|
-
var ReduceIcon =
|
|
1612
|
+
var ReduceIcon = React67__namespace.default.forwardRef(
|
|
1613
1613
|
(props, ref) => {
|
|
1614
1614
|
const { opacity = 0.54, ...rest } = props;
|
|
1615
1615
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1627,7 +1627,7 @@ var ReduceIcon = React66__namespace.default.forwardRef(
|
|
|
1627
1627
|
}
|
|
1628
1628
|
);
|
|
1629
1629
|
ReduceIcon.displayName = "ReduceIcon";
|
|
1630
|
-
var CircleOutlinedIcon =
|
|
1630
|
+
var CircleOutlinedIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1631
1631
|
const { opacity = 0.54, ...rest } = props;
|
|
1632
1632
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1633
1633
|
"path",
|
|
@@ -1639,7 +1639,7 @@ var CircleOutlinedIcon = React66__namespace.default.forwardRef((props, ref) => {
|
|
|
1639
1639
|
) });
|
|
1640
1640
|
});
|
|
1641
1641
|
CircleOutlinedIcon.displayName = "CircleOutlinedIcon";
|
|
1642
|
-
var SquareOutlinedIcon =
|
|
1642
|
+
var SquareOutlinedIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1643
1643
|
const { opacity = 0.54, ...rest } = props;
|
|
1644
1644
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1645
1645
|
"path",
|
|
@@ -1651,7 +1651,7 @@ var SquareOutlinedIcon = React66__namespace.default.forwardRef((props, ref) => {
|
|
|
1651
1651
|
) });
|
|
1652
1652
|
});
|
|
1653
1653
|
SquareOutlinedIcon.displayName = "SquareOutlinedIcon";
|
|
1654
|
-
var ExclamationFillIcon =
|
|
1654
|
+
var ExclamationFillIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1655
1655
|
const { ...rest } = props;
|
|
1656
1656
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1657
1657
|
"path",
|
|
@@ -1662,7 +1662,7 @@ var ExclamationFillIcon = React66__namespace.default.forwardRef((props, ref) =>
|
|
|
1662
1662
|
) });
|
|
1663
1663
|
});
|
|
1664
1664
|
ExclamationFillIcon.displayName = "ExclamationFillIcon";
|
|
1665
|
-
var QuestionFillIcon =
|
|
1665
|
+
var QuestionFillIcon = React67__namespace.default.forwardRef(
|
|
1666
1666
|
(props, ref) => {
|
|
1667
1667
|
const { opacity = 0.54, ...rest } = props;
|
|
1668
1668
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1676,7 +1676,7 @@ var QuestionFillIcon = React66__namespace.default.forwardRef(
|
|
|
1676
1676
|
}
|
|
1677
1677
|
);
|
|
1678
1678
|
QuestionFillIcon.displayName = "ExclamationFillIcon";
|
|
1679
|
-
var ArrowLeftRightIcon =
|
|
1679
|
+
var ArrowLeftRightIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1680
1680
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1681
1681
|
BaseIconWithPath,
|
|
1682
1682
|
{
|
|
@@ -1687,7 +1687,7 @@ var ArrowLeftRightIcon = React66__namespace.default.forwardRef((props, ref) => {
|
|
|
1687
1687
|
);
|
|
1688
1688
|
});
|
|
1689
1689
|
ArrowLeftRightIcon.displayName = "ArrowLeftRightIcon";
|
|
1690
|
-
var ArrowDownUpIcon =
|
|
1690
|
+
var ArrowDownUpIcon = React67__namespace.default.forwardRef(
|
|
1691
1691
|
(props, ref) => {
|
|
1692
1692
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1693
1693
|
BaseIconWithPath,
|
|
@@ -1700,7 +1700,7 @@ var ArrowDownUpIcon = React66__namespace.default.forwardRef(
|
|
|
1700
1700
|
}
|
|
1701
1701
|
);
|
|
1702
1702
|
ArrowDownUpIcon.displayName = "ArrowDownUpIconIcon";
|
|
1703
|
-
var ArrowUpSquareFillIcon =
|
|
1703
|
+
var ArrowUpSquareFillIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1704
1704
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1705
1705
|
BaseIconWithPath,
|
|
1706
1706
|
{
|
|
@@ -1711,7 +1711,7 @@ var ArrowUpSquareFillIcon = React66__namespace.default.forwardRef((props, ref) =
|
|
|
1711
1711
|
);
|
|
1712
1712
|
});
|
|
1713
1713
|
ArrowUpSquareFillIcon.displayName = "ArrowUpSquareFillIconIcon";
|
|
1714
|
-
var ArrowDownSquareFillIcon =
|
|
1714
|
+
var ArrowDownSquareFillIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1715
1715
|
const { opacity = 0.54, ...rest } = props;
|
|
1716
1716
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1717
1717
|
"path",
|
|
@@ -1723,7 +1723,7 @@ var ArrowDownSquareFillIcon = React66__namespace.default.forwardRef((props, ref)
|
|
|
1723
1723
|
) });
|
|
1724
1724
|
});
|
|
1725
1725
|
ArrowDownSquareFillIcon.displayName = "ArrowDownSquareFillIconIcon";
|
|
1726
|
-
var ArrowLeftRightSquareFill =
|
|
1726
|
+
var ArrowLeftRightSquareFill = React67__namespace.default.forwardRef((props, ref) => {
|
|
1727
1727
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1728
1728
|
"svg",
|
|
1729
1729
|
{
|
|
@@ -1749,7 +1749,7 @@ var ArrowLeftRightSquareFill = React66__namespace.default.forwardRef((props, ref
|
|
|
1749
1749
|
if (process.env.NODE_ENV !== "production") {
|
|
1750
1750
|
ArrowLeftRightSquareFill.displayName = "ArrowLeftRightSquareFill";
|
|
1751
1751
|
}
|
|
1752
|
-
var ArrowRightUpSquareFillIcon =
|
|
1752
|
+
var ArrowRightUpSquareFillIcon = React67__namespace.default.forwardRef((props, ref) => {
|
|
1753
1753
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1754
1754
|
BaseIconWithPath,
|
|
1755
1755
|
{
|
|
@@ -1925,7 +1925,7 @@ var BattleSolidInactiveIcon = (props) => {
|
|
|
1925
1925
|
}
|
|
1926
1926
|
) });
|
|
1927
1927
|
};
|
|
1928
|
-
var FeeTierIcon =
|
|
1928
|
+
var FeeTierIcon = React67__namespace.default.forwardRef(
|
|
1929
1929
|
(props, ref) => {
|
|
1930
1930
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1931
1931
|
BaseIconWithPath,
|
|
@@ -1994,7 +1994,7 @@ var EarnInactiveIcon = (props) => {
|
|
|
1994
1994
|
)
|
|
1995
1995
|
] }) });
|
|
1996
1996
|
};
|
|
1997
|
-
var EditIcon =
|
|
1997
|
+
var EditIcon = React67__namespace.default.forwardRef(
|
|
1998
1998
|
(props, ref) => {
|
|
1999
1999
|
const { opacity = 0.54, ...rest } = props;
|
|
2000
2000
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2008,7 +2008,7 @@ var EditIcon = React66__namespace.default.forwardRef(
|
|
|
2008
2008
|
}
|
|
2009
2009
|
);
|
|
2010
2010
|
EditIcon.displayName = "EditIcon";
|
|
2011
|
-
var EyeIcon =
|
|
2011
|
+
var EyeIcon = React67__namespace.default.forwardRef(
|
|
2012
2012
|
(props, ref) => {
|
|
2013
2013
|
const { opacity = 0.54, ...rest } = props;
|
|
2014
2014
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2022,7 +2022,7 @@ var EyeIcon = React66__namespace.default.forwardRef(
|
|
|
2022
2022
|
}
|
|
2023
2023
|
);
|
|
2024
2024
|
EyeIcon.displayName = "EyeIcon";
|
|
2025
|
-
var ShareIcon =
|
|
2025
|
+
var ShareIcon = React67__namespace.default.forwardRef(
|
|
2026
2026
|
(props, ref) => {
|
|
2027
2027
|
const { opacity = 0.54, ...rest } = props;
|
|
2028
2028
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2036,7 +2036,7 @@ var ShareIcon = React66__namespace.default.forwardRef(
|
|
|
2036
2036
|
}
|
|
2037
2037
|
);
|
|
2038
2038
|
ShareIcon.displayName = "ShareIcon";
|
|
2039
|
-
var EyeCloseIcon =
|
|
2039
|
+
var EyeCloseIcon = React67__namespace.default.forwardRef(
|
|
2040
2040
|
(props, ref) => {
|
|
2041
2041
|
const { opacity = 0.54, ...rest } = props;
|
|
2042
2042
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2050,7 +2050,7 @@ var EyeCloseIcon = React66__namespace.default.forwardRef(
|
|
|
2050
2050
|
}
|
|
2051
2051
|
);
|
|
2052
2052
|
EyeCloseIcon.displayName = "EyeCloseIcon";
|
|
2053
|
-
var RefreshIcon =
|
|
2053
|
+
var RefreshIcon = React67__namespace.default.forwardRef(
|
|
2054
2054
|
(props, ref) => {
|
|
2055
2055
|
const { opacity = 0.54, ...rest } = props;
|
|
2056
2056
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2208,7 +2208,7 @@ var EsOrderlyIcon = (props) => {
|
|
|
2208
2208
|
}
|
|
2209
2209
|
);
|
|
2210
2210
|
};
|
|
2211
|
-
var InfoCircleIcon =
|
|
2211
|
+
var InfoCircleIcon = React67__namespace.default.forwardRef(
|
|
2212
2212
|
(props, ref) => {
|
|
2213
2213
|
const { className, opacity = 0.36, ...rest } = props;
|
|
2214
2214
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2235,14 +2235,14 @@ var InfoCircleIcon = React66__namespace.default.forwardRef(
|
|
|
2235
2235
|
}
|
|
2236
2236
|
);
|
|
2237
2237
|
var WalletIcon = (props) => {
|
|
2238
|
-
const url =
|
|
2238
|
+
const url = React67.useMemo(() => {
|
|
2239
2239
|
const split = props.name?.split(" ");
|
|
2240
2240
|
const formatWalletName = split?.[0]?.toLowerCase();
|
|
2241
2241
|
return `https://oss.orderly.network/static/wallet_icon/${formatWalletName}.png`;
|
|
2242
2242
|
}, [props.name]);
|
|
2243
2243
|
return /* @__PURE__ */ jsxRuntime.jsx(Avatar, { size: props.size, src: url, alt: `${props.name}` });
|
|
2244
2244
|
};
|
|
2245
|
-
var CalendarIcon =
|
|
2245
|
+
var CalendarIcon = React67__namespace.default.forwardRef(
|
|
2246
2246
|
(props, ref) => {
|
|
2247
2247
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2248
2248
|
BaseIconWithPath,
|
|
@@ -2255,7 +2255,7 @@ var CalendarIcon = React66__namespace.default.forwardRef(
|
|
|
2255
2255
|
}
|
|
2256
2256
|
);
|
|
2257
2257
|
CalendarIcon.displayName = "CaretLeftIcon";
|
|
2258
|
-
var CopyIcon =
|
|
2258
|
+
var CopyIcon = React67__namespace.default.forwardRef(
|
|
2259
2259
|
(props, ref) => {
|
|
2260
2260
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2261
2261
|
BaseIconWithPath,
|
|
@@ -2268,7 +2268,7 @@ var CopyIcon = React66__namespace.default.forwardRef(
|
|
|
2268
2268
|
}
|
|
2269
2269
|
);
|
|
2270
2270
|
CopyIcon.displayName = "CopyIcon";
|
|
2271
|
-
var ServerFillIcon =
|
|
2271
|
+
var ServerFillIcon = React67__namespace.default.forwardRef(
|
|
2272
2272
|
(props, ref) => {
|
|
2273
2273
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2274
2274
|
BaseIconWithPath,
|
|
@@ -2281,7 +2281,7 @@ var ServerFillIcon = React66__namespace.default.forwardRef(
|
|
|
2281
2281
|
}
|
|
2282
2282
|
);
|
|
2283
2283
|
ServerFillIcon.displayName = "ServerFillIcon";
|
|
2284
|
-
var SortingAscIcon =
|
|
2284
|
+
var SortingAscIcon = React67__namespace.default.forwardRef(
|
|
2285
2285
|
(props, ref) => {
|
|
2286
2286
|
const { opacity = 0.54, ...rest } = props;
|
|
2287
2287
|
return /* @__PURE__ */ jsxRuntime.jsxs(BaseIcon, { ref, ...rest, children: [
|
|
@@ -2305,7 +2305,7 @@ var SortingAscIcon = React66__namespace.default.forwardRef(
|
|
|
2305
2305
|
}
|
|
2306
2306
|
);
|
|
2307
2307
|
SortingAscIcon.displayName = "SortingAscIcon";
|
|
2308
|
-
var SortingDescIcon =
|
|
2308
|
+
var SortingDescIcon = React67__namespace.default.forwardRef(
|
|
2309
2309
|
(props, ref) => {
|
|
2310
2310
|
const { opacity = 0.54, ...rest } = props;
|
|
2311
2311
|
return /* @__PURE__ */ jsxRuntime.jsxs(BaseIcon, { ref, ...rest, children: [
|
|
@@ -2329,7 +2329,7 @@ var SortingDescIcon = React66__namespace.default.forwardRef(
|
|
|
2329
2329
|
}
|
|
2330
2330
|
);
|
|
2331
2331
|
SortingDescIcon.displayName = "SortingDescIcon";
|
|
2332
|
-
var ArrowUpShortIcon =
|
|
2332
|
+
var ArrowUpShortIcon = React67__namespace.default.forwardRef(
|
|
2333
2333
|
(props, ref) => {
|
|
2334
2334
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2335
2335
|
BaseIconWithPath,
|
|
@@ -2341,7 +2341,7 @@ var ArrowUpShortIcon = React66__namespace.default.forwardRef(
|
|
|
2341
2341
|
);
|
|
2342
2342
|
}
|
|
2343
2343
|
);
|
|
2344
|
-
var ArrowDownShortIcon =
|
|
2344
|
+
var ArrowDownShortIcon = React67__namespace.default.forwardRef(
|
|
2345
2345
|
(props, ref) => {
|
|
2346
2346
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2347
2347
|
BaseIconWithPath,
|
|
@@ -2353,7 +2353,7 @@ var ArrowDownShortIcon = React66__namespace.default.forwardRef(
|
|
|
2353
2353
|
);
|
|
2354
2354
|
}
|
|
2355
2355
|
);
|
|
2356
|
-
var ArrowLeftShortIcon =
|
|
2356
|
+
var ArrowLeftShortIcon = React67__namespace.default.forwardRef(
|
|
2357
2357
|
(props, ref) => {
|
|
2358
2358
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2359
2359
|
BaseIconWithPath,
|
|
@@ -2365,7 +2365,7 @@ var ArrowLeftShortIcon = React66__namespace.default.forwardRef(
|
|
|
2365
2365
|
);
|
|
2366
2366
|
}
|
|
2367
2367
|
);
|
|
2368
|
-
var ArrowRightShortIcon =
|
|
2368
|
+
var ArrowRightShortIcon = React67__namespace.default.forwardRef(
|
|
2369
2369
|
(props, ref) => {
|
|
2370
2370
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2371
2371
|
BaseIconWithPath,
|
|
@@ -2381,7 +2381,7 @@ ArrowUpShortIcon.displayName = "ArrowUpShortIcon";
|
|
|
2381
2381
|
ArrowDownShortIcon.displayName = "ArrowDownShortIcon";
|
|
2382
2382
|
ArrowLeftShortIcon.displayName = "ArrowLeftShortIcon";
|
|
2383
2383
|
ArrowRightShortIcon.displayName = "ArrowRightShortIcon";
|
|
2384
|
-
var SortingIcon =
|
|
2384
|
+
var SortingIcon = React67__namespace.default.forwardRef(
|
|
2385
2385
|
(props, ref) => {
|
|
2386
2386
|
const { opacity = 0.54, ...rest } = props;
|
|
2387
2387
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3625,7 +3625,7 @@ function EmptyStateIcon() {
|
|
|
3625
3625
|
);
|
|
3626
3626
|
}
|
|
3627
3627
|
var emptyData_default = EmptyStateIcon;
|
|
3628
|
-
var VectorIcon =
|
|
3628
|
+
var VectorIcon = React67__namespace.default.forwardRef(
|
|
3629
3629
|
(props, ref) => {
|
|
3630
3630
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3631
3631
|
"svg",
|
|
@@ -3723,7 +3723,7 @@ var PersonIcon = () => {
|
|
|
3723
3723
|
}
|
|
3724
3724
|
);
|
|
3725
3725
|
};
|
|
3726
|
-
var SettingFillIcon =
|
|
3726
|
+
var SettingFillIcon = React67__namespace.default.forwardRef(
|
|
3727
3727
|
(props, ref) => {
|
|
3728
3728
|
const { opacity = 0.54, ...rest } = props;
|
|
3729
3729
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3758,7 +3758,7 @@ var TradingLeftNavIcon = (props) => {
|
|
|
3758
3758
|
}
|
|
3759
3759
|
);
|
|
3760
3760
|
};
|
|
3761
|
-
var VaultsIcon =
|
|
3761
|
+
var VaultsIcon = React67__namespace.default.forwardRef(
|
|
3762
3762
|
(props, ref) => {
|
|
3763
3763
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3764
3764
|
"svg",
|
|
@@ -3783,7 +3783,7 @@ var VaultsIcon = React66__namespace.default.forwardRef(
|
|
|
3783
3783
|
if (process.env.NODE_ENV !== "production") {
|
|
3784
3784
|
VaultsIcon.displayName = "VaultsIcon";
|
|
3785
3785
|
}
|
|
3786
|
-
var LeftNavVaultsIcon =
|
|
3786
|
+
var LeftNavVaultsIcon = React67.forwardRef(
|
|
3787
3787
|
(props, ref) => {
|
|
3788
3788
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3789
3789
|
"svg",
|
|
@@ -3829,7 +3829,7 @@ var LeftNavVaultsIcon = React66.forwardRef(
|
|
|
3829
3829
|
if (process.env.NODE_ENV !== "production") {
|
|
3830
3830
|
LeftNavVaultsIcon.displayName = "LeftNavVaultsIcon";
|
|
3831
3831
|
}
|
|
3832
|
-
var NewsFillIcon =
|
|
3832
|
+
var NewsFillIcon = React67__namespace.default.forwardRef(
|
|
3833
3833
|
(props, ref) => {
|
|
3834
3834
|
const { opacity = 1, ...rest } = props;
|
|
3835
3835
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3843,7 +3843,7 @@ var NewsFillIcon = React66__namespace.default.forwardRef(
|
|
|
3843
3843
|
}
|
|
3844
3844
|
);
|
|
3845
3845
|
NewsFillIcon.displayName = "NewsFillIcon";
|
|
3846
|
-
var BellIcon =
|
|
3846
|
+
var BellIcon = React67__namespace.default.forwardRef(
|
|
3847
3847
|
(props, ref) => {
|
|
3848
3848
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3849
3849
|
BaseIconWithPath,
|
|
@@ -3924,6 +3924,42 @@ var ReferralSolidIcon = (props) => {
|
|
|
3924
3924
|
}
|
|
3925
3925
|
) });
|
|
3926
3926
|
};
|
|
3927
|
+
var AddCircleIcon = React67__namespace.default.forwardRef(
|
|
3928
|
+
(props, ref) => {
|
|
3929
|
+
const { className, opacity = 0.54, ...rest } = props;
|
|
3930
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3931
|
+
"svg",
|
|
3932
|
+
{
|
|
3933
|
+
width: "16",
|
|
3934
|
+
height: "16",
|
|
3935
|
+
viewBox: "0 0 16 16",
|
|
3936
|
+
fill: "currentColor",
|
|
3937
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3938
|
+
opacity,
|
|
3939
|
+
className,
|
|
3940
|
+
ref,
|
|
3941
|
+
...rest,
|
|
3942
|
+
children: [
|
|
3943
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3944
|
+
"path",
|
|
3945
|
+
{
|
|
3946
|
+
d: "M8.47 4.669c.12.12.205.287.205.471v2.15h2.151c.184.001.35.087.471.207a.68.68 0 0 1 .207.472c0 .368-.31.677-.678.678h-2.15v2.15c0 .368-.31.678-.678.678a.687.687 0 0 1-.678-.678v-2.15H5.17a.686.686 0 0 1-.679-.678c0-.368.31-.678.678-.678h2.15V5.14a.687.687 0 0 1 .679-.678c.184 0 .35.085.471.206",
|
|
3947
|
+
fill: "currentColor"
|
|
3948
|
+
}
|
|
3949
|
+
),
|
|
3950
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3951
|
+
"path",
|
|
3952
|
+
{
|
|
3953
|
+
d: "M7.999 1.333a6.667 6.667 0 1 0 0 13.333 6.667 6.667 0 0 0 0-13.333m0 1.333a5.334 5.334 0 1 1 0 10.667 5.334 5.334 0 0 1 0-10.667",
|
|
3954
|
+
fill: "currentColor"
|
|
3955
|
+
}
|
|
3956
|
+
)
|
|
3957
|
+
]
|
|
3958
|
+
}
|
|
3959
|
+
);
|
|
3960
|
+
}
|
|
3961
|
+
);
|
|
3962
|
+
AddCircleIcon.displayName = "AddCircleIcon";
|
|
3927
3963
|
|
|
3928
3964
|
// src/icon/index.ts
|
|
3929
3965
|
var Icon = BaseIcon;
|
|
@@ -3981,7 +4017,7 @@ var textVariants = tv({
|
|
|
3981
4017
|
}
|
|
3982
4018
|
}
|
|
3983
4019
|
});
|
|
3984
|
-
var Text =
|
|
4020
|
+
var Text = React67__namespace.default.forwardRef((props, forwardedRef) => {
|
|
3985
4021
|
const {
|
|
3986
4022
|
children,
|
|
3987
4023
|
className,
|
|
@@ -4070,7 +4106,7 @@ var isTextRule = (rule) => {
|
|
|
4070
4106
|
};
|
|
4071
4107
|
var DEFAULT_SYMBOL_FORMAT = "base-quote";
|
|
4072
4108
|
var DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
|
4073
|
-
var FormattedText =
|
|
4109
|
+
var FormattedText = React67__namespace.default.forwardRef(
|
|
4074
4110
|
(props, ref) => {
|
|
4075
4111
|
const {
|
|
4076
4112
|
rule,
|
|
@@ -4095,13 +4131,13 @@ var FormattedText = React66__namespace.default.forwardRef(
|
|
|
4095
4131
|
isIcon,
|
|
4096
4132
|
...rest
|
|
4097
4133
|
} = props;
|
|
4098
|
-
const prefixElement =
|
|
4134
|
+
const prefixElement = React67.useMemo(() => {
|
|
4099
4135
|
if (rule === "symbol" && showIcon) {
|
|
4100
4136
|
return /* @__PURE__ */ jsxRuntime.jsx(TokenIcon, { symbol: children, size: iconSize });
|
|
4101
4137
|
}
|
|
4102
4138
|
return prefix;
|
|
4103
4139
|
}, [prefix, showIcon, rule, iconSize, children]);
|
|
4104
|
-
const suffix =
|
|
4140
|
+
const suffix = React67.useMemo(() => {
|
|
4105
4141
|
if (typeof props.suffix !== "undefined") {
|
|
4106
4142
|
return props.suffix;
|
|
4107
4143
|
}
|
|
@@ -4120,7 +4156,7 @@ var FormattedText = React66__namespace.default.forwardRef(
|
|
|
4120
4156
|
);
|
|
4121
4157
|
}
|
|
4122
4158
|
}, [props.suffix, copyable, children]);
|
|
4123
|
-
const content =
|
|
4159
|
+
const content = React67.useMemo(() => {
|
|
4124
4160
|
if (typeof children === "undefined") {
|
|
4125
4161
|
return "--";
|
|
4126
4162
|
}
|
|
@@ -4152,7 +4188,7 @@ var FormattedText = React66__namespace.default.forwardRef(
|
|
|
4152
4188
|
}
|
|
4153
4189
|
return children;
|
|
4154
4190
|
}, [children, rule, formatString, range, symbolElement]);
|
|
4155
|
-
const contentWithFix =
|
|
4191
|
+
const contentWithFix = React67.useMemo(() => {
|
|
4156
4192
|
if (typeof suffix === "undefined" && typeof prefixElement === "undefined") {
|
|
4157
4193
|
return content;
|
|
4158
4194
|
}
|
|
@@ -4182,7 +4218,7 @@ var gradientTextVariants = tv({
|
|
|
4182
4218
|
}
|
|
4183
4219
|
}
|
|
4184
4220
|
});
|
|
4185
|
-
var GradientText =
|
|
4221
|
+
var GradientText = React67__namespace.default.forwardRef((props, ref) => {
|
|
4186
4222
|
const { color, className, angle, ...rest } = props;
|
|
4187
4223
|
const style = parseAngleProps({ angle });
|
|
4188
4224
|
return (
|
|
@@ -4225,7 +4261,7 @@ var Numeral = (props) => {
|
|
|
4225
4261
|
...rest
|
|
4226
4262
|
} = props;
|
|
4227
4263
|
const num = Number(props.children);
|
|
4228
|
-
const child =
|
|
4264
|
+
const child = React67.useMemo(() => {
|
|
4229
4265
|
if (props.children === "-")
|
|
4230
4266
|
return props.children;
|
|
4231
4267
|
if (isNaN(num))
|
|
@@ -4248,7 +4284,7 @@ var Numeral = (props) => {
|
|
|
4248
4284
|
});
|
|
4249
4285
|
}, [num, visible, tick, dp]);
|
|
4250
4286
|
const defaultColor = rest.color || "inherit";
|
|
4251
|
-
const colorName =
|
|
4287
|
+
const colorName = React67.useMemo(() => {
|
|
4252
4288
|
if (!coloring)
|
|
4253
4289
|
return defaultColor;
|
|
4254
4290
|
if (typeof visible !== "undefined" && !visible)
|
|
@@ -4262,7 +4298,7 @@ var Numeral = (props) => {
|
|
|
4262
4298
|
return "lose";
|
|
4263
4299
|
return "profit";
|
|
4264
4300
|
}, [coloring, num, rest.color, props.visible]);
|
|
4265
|
-
const identifier =
|
|
4301
|
+
const identifier = React67.useMemo(() => {
|
|
4266
4302
|
if (!showIdentifier || Number.isNaN(num) || num === 0)
|
|
4267
4303
|
return null;
|
|
4268
4304
|
if (typeof visible !== "undefined" && !visible)
|
|
@@ -4276,7 +4312,7 @@ var Numeral = (props) => {
|
|
|
4276
4312
|
return identifiers.profit;
|
|
4277
4313
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: "+" });
|
|
4278
4314
|
}, [num, props.visible, showIdentifier]);
|
|
4279
|
-
const childWithUnit =
|
|
4315
|
+
const childWithUnit = React67.useMemo(() => {
|
|
4280
4316
|
if (typeof suffix === "undefined" && typeof prefix === "undefined" && typeof unit === "undefined" && typeof currency === "undefined" && !showIdentifier) {
|
|
4281
4317
|
return child;
|
|
4282
4318
|
}
|
|
@@ -4361,7 +4397,7 @@ var statisticVariants = tv({
|
|
|
4361
4397
|
// color: "default",
|
|
4362
4398
|
}
|
|
4363
4399
|
});
|
|
4364
|
-
var StatisticLabel =
|
|
4400
|
+
var StatisticLabel = React67__namespace.default.forwardRef(
|
|
4365
4401
|
(props, ref) => {
|
|
4366
4402
|
const { label: labelClassName } = statisticVariants({});
|
|
4367
4403
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4377,10 +4413,10 @@ var StatisticLabel = React66__namespace.default.forwardRef(
|
|
|
4377
4413
|
}
|
|
4378
4414
|
);
|
|
4379
4415
|
StatisticLabel.displayName = "StatisticLabel";
|
|
4380
|
-
var Statistic =
|
|
4416
|
+
var Statistic = React67__namespace.default.forwardRef((props, ref) => {
|
|
4381
4417
|
const { label, valueProps, align, className, classNames, children, ...rest } = props;
|
|
4382
4418
|
const { root, value: valueClassName } = statisticVariants({ align });
|
|
4383
|
-
const value =
|
|
4419
|
+
const value = React67.useMemo(() => {
|
|
4384
4420
|
if (typeof children === "string" || typeof children === "number") {
|
|
4385
4421
|
const { className: valueClass, as, ...restValueProps } = valueProps ?? {};
|
|
4386
4422
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4424,7 +4460,7 @@ Text2.pnl = NumTypePnl;
|
|
|
4424
4460
|
Text2.notional = NumTypeNotional;
|
|
4425
4461
|
Text2.assetValue = NumTypeAssetValue;
|
|
4426
4462
|
Text2.collateral = NumTypeCollateral;
|
|
4427
|
-
var BaseInput =
|
|
4463
|
+
var BaseInput = React67.forwardRef(
|
|
4428
4464
|
(props, ref) => {
|
|
4429
4465
|
const {
|
|
4430
4466
|
clearable,
|
|
@@ -4441,14 +4477,14 @@ var BaseInput = React66.forwardRef(
|
|
|
4441
4477
|
value,
|
|
4442
4478
|
...inputProps
|
|
4443
4479
|
} = props;
|
|
4444
|
-
const [cursor, setCursor] =
|
|
4445
|
-
const innerInputRef =
|
|
4446
|
-
const prevInputValue =
|
|
4447
|
-
const isFocused =
|
|
4448
|
-
const innerFormatters =
|
|
4480
|
+
const [cursor, setCursor] = React67.useState(null);
|
|
4481
|
+
const innerInputRef = React67.useRef(null);
|
|
4482
|
+
const prevInputValue = React67.useRef(null);
|
|
4483
|
+
const isFocused = React67.useRef(false);
|
|
4484
|
+
const innerFormatters = React67.useMemo(() => {
|
|
4449
4485
|
return formatters ?? [];
|
|
4450
4486
|
}, [formatters]);
|
|
4451
|
-
|
|
4487
|
+
React67.useEffect(() => {
|
|
4452
4488
|
if (!ref)
|
|
4453
4489
|
return;
|
|
4454
4490
|
if (typeof ref === "function") {
|
|
@@ -4457,7 +4493,7 @@ var BaseInput = React66.forwardRef(
|
|
|
4457
4493
|
ref.current = innerInputRef.current;
|
|
4458
4494
|
}
|
|
4459
4495
|
}, [innerInputRef, ref]);
|
|
4460
|
-
const formatToRender =
|
|
4496
|
+
const formatToRender = React67.useCallback(
|
|
4461
4497
|
(value2) => {
|
|
4462
4498
|
if (!Array.isArray(innerFormatters) || innerFormatters.length === 0)
|
|
4463
4499
|
return value2;
|
|
@@ -4474,7 +4510,7 @@ var BaseInput = React66.forwardRef(
|
|
|
4474
4510
|
},
|
|
4475
4511
|
[innerFormatters]
|
|
4476
4512
|
);
|
|
4477
|
-
const formatToChange =
|
|
4513
|
+
const formatToChange = React67.useCallback(
|
|
4478
4514
|
(value2, originValue) => {
|
|
4479
4515
|
if (!Array.isArray(innerFormatters) || innerFormatters.length === 0)
|
|
4480
4516
|
return value2;
|
|
@@ -4492,12 +4528,12 @@ var BaseInput = React66.forwardRef(
|
|
|
4492
4528
|
},
|
|
4493
4529
|
[innerFormatters]
|
|
4494
4530
|
);
|
|
4495
|
-
const formattedValue =
|
|
4531
|
+
const formattedValue = React67.useMemo(() => {
|
|
4496
4532
|
if (typeof value === "undefined")
|
|
4497
4533
|
return value;
|
|
4498
4534
|
return formatToRender(value);
|
|
4499
4535
|
}, [value]);
|
|
4500
|
-
|
|
4536
|
+
React67.useEffect(() => {
|
|
4501
4537
|
if (document.activeElement !== innerInputRef.current)
|
|
4502
4538
|
return;
|
|
4503
4539
|
const nextValueLen = `${formattedValue}`.length;
|
|
@@ -4720,7 +4756,7 @@ var inputVariants = tv(
|
|
|
4720
4756
|
responsiveVariants: ["md", "lg"]
|
|
4721
4757
|
}
|
|
4722
4758
|
);
|
|
4723
|
-
var Input =
|
|
4759
|
+
var Input = React67__namespace.default.forwardRef((props, ref) => {
|
|
4724
4760
|
const {
|
|
4725
4761
|
size,
|
|
4726
4762
|
disabled,
|
|
@@ -4747,7 +4783,7 @@ var Input = React66__namespace.default.forwardRef((props, ref) => {
|
|
|
4747
4783
|
pl: typeof prefix === "undefined" || pl,
|
|
4748
4784
|
pr: typeof suffix === "undefined" || pr
|
|
4749
4785
|
});
|
|
4750
|
-
const cid =
|
|
4786
|
+
const cid = React67.useId();
|
|
4751
4787
|
const suffixElement = typeof onClear !== "undefined" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4752
4788
|
ClearButton,
|
|
4753
4789
|
{
|
|
@@ -4791,7 +4827,7 @@ var Input = React66__namespace.default.forwardRef((props, ref) => {
|
|
|
4791
4827
|
)
|
|
4792
4828
|
] });
|
|
4793
4829
|
});
|
|
4794
|
-
var ClearButton =
|
|
4830
|
+
var ClearButton = React67__namespace.default.forwardRef((props, ref) => {
|
|
4795
4831
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4796
4832
|
"button",
|
|
4797
4833
|
{
|
|
@@ -4852,7 +4888,7 @@ var popoverVariants = tv({
|
|
|
4852
4888
|
var PopoverRoot = PopoverPrimitive__namespace.Root;
|
|
4853
4889
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
4854
4890
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
4855
|
-
var PopoverContent =
|
|
4891
|
+
var PopoverContent = React67__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4856
4892
|
PopoverPrimitive__namespace.Content,
|
|
4857
4893
|
{
|
|
4858
4894
|
ref,
|
|
@@ -4903,7 +4939,7 @@ var scrollAreaVariants = tv({
|
|
|
4903
4939
|
}
|
|
4904
4940
|
}
|
|
4905
4941
|
});
|
|
4906
|
-
var ScrollArea =
|
|
4942
|
+
var ScrollArea = React67__namespace.default.forwardRef((oriProps, ref) => {
|
|
4907
4943
|
const {
|
|
4908
4944
|
className,
|
|
4909
4945
|
classNames,
|
|
@@ -4933,7 +4969,7 @@ var ScrollArea = React66__namespace.default.forwardRef((oriProps, ref) => {
|
|
|
4933
4969
|
);
|
|
4934
4970
|
});
|
|
4935
4971
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
4936
|
-
var ScrollBar =
|
|
4972
|
+
var ScrollBar = React67__namespace.default.forwardRef((oriProps, ref) => {
|
|
4937
4973
|
const { className, orientation = "vertical", ...props } = oriProps;
|
|
4938
4974
|
const { bar, tumb } = scrollAreaVariants({ className, orientation });
|
|
4939
4975
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5106,7 +5142,7 @@ var selectVariants = tv(
|
|
|
5106
5142
|
var SelectRoot = SelectPrimitive__namespace.Root;
|
|
5107
5143
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
5108
5144
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
5109
|
-
var SelectTrigger =
|
|
5145
|
+
var SelectTrigger = React67__namespace.forwardRef(
|
|
5110
5146
|
({
|
|
5111
5147
|
className,
|
|
5112
5148
|
children,
|
|
@@ -5160,7 +5196,7 @@ var SelectTrigger = React66__namespace.forwardRef(
|
|
|
5160
5196
|
}
|
|
5161
5197
|
);
|
|
5162
5198
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
5163
|
-
var SelectScrollUpButton =
|
|
5199
|
+
var SelectScrollUpButton = React67__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5164
5200
|
const { scrollUpButton } = selectVariants();
|
|
5165
5201
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5166
5202
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
@@ -5173,7 +5209,7 @@ var SelectScrollUpButton = React66__namespace.forwardRef(({ className, ...props
|
|
|
5173
5209
|
);
|
|
5174
5210
|
});
|
|
5175
5211
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
5176
|
-
var SelectScrollDownButton =
|
|
5212
|
+
var SelectScrollDownButton = React67__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5177
5213
|
const { scrollDownButton } = selectVariants();
|
|
5178
5214
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5179
5215
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
@@ -5186,7 +5222,7 @@ var SelectScrollDownButton = React66__namespace.forwardRef(({ className, ...prop
|
|
|
5186
5222
|
);
|
|
5187
5223
|
});
|
|
5188
5224
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
5189
|
-
var SelectContent =
|
|
5225
|
+
var SelectContent = React67__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
|
|
5190
5226
|
const { content, viewport } = selectVariants({ position, className });
|
|
5191
5227
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5192
5228
|
SelectPrimitive__namespace.Content,
|
|
@@ -5200,7 +5236,7 @@ var SelectContent = React66__namespace.forwardRef(({ className, children, positi
|
|
|
5200
5236
|
) });
|
|
5201
5237
|
});
|
|
5202
5238
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
5203
|
-
var SelectLabel =
|
|
5239
|
+
var SelectLabel = React67__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5204
5240
|
const { label } = selectVariants();
|
|
5205
5241
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5206
5242
|
SelectPrimitive__namespace.Label,
|
|
@@ -5212,12 +5248,12 @@ var SelectLabel = React66__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
5212
5248
|
);
|
|
5213
5249
|
});
|
|
5214
5250
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
5215
|
-
var SelectItem =
|
|
5251
|
+
var SelectItem = React67__namespace.forwardRef(({ className, children, size, ...props }, ref) => {
|
|
5216
5252
|
const { item } = selectVariants({ size });
|
|
5217
5253
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Item, { ref, className: item({ className }), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children }) });
|
|
5218
5254
|
});
|
|
5219
5255
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
5220
|
-
var SelectSeparator =
|
|
5256
|
+
var SelectSeparator = React67__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5221
5257
|
const { separator } = selectVariants();
|
|
5222
5258
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5223
5259
|
SelectPrimitive__namespace.Separator,
|
|
@@ -5231,17 +5267,17 @@ var SelectSeparator = React66__namespace.forwardRef(({ className, ...props }, re
|
|
|
5231
5267
|
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
5232
5268
|
var CombineSelect = (props) => {
|
|
5233
5269
|
const { options, variant, valueFormatter, ...rest } = props;
|
|
5234
|
-
const [keyword, setKeyword] =
|
|
5235
|
-
const [value, setValue] =
|
|
5270
|
+
const [keyword, setKeyword] = React67.useState("");
|
|
5271
|
+
const [value, setValue] = React67.useState(props.value ?? "");
|
|
5236
5272
|
const { trigger } = selectVariants({
|
|
5237
5273
|
size: props.size,
|
|
5238
5274
|
variant
|
|
5239
5275
|
});
|
|
5240
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5276
|
+
const [selectedIndex, setSelectedIndex] = React67.useState(
|
|
5241
5277
|
() => typeof props.value === "undefined" ? -1 : options.findIndex((option) => option.value === props.value)
|
|
5242
5278
|
);
|
|
5243
|
-
const [focused, setFocused] =
|
|
5244
|
-
const inputRef =
|
|
5279
|
+
const [focused, setFocused] = React67.useState(false);
|
|
5280
|
+
const inputRef = React67.useRef(null);
|
|
5245
5281
|
const onFocus = () => {
|
|
5246
5282
|
setFocused(true);
|
|
5247
5283
|
};
|
|
@@ -5411,7 +5447,7 @@ var SelectWithOptions = (props) => {
|
|
|
5411
5447
|
...rest
|
|
5412
5448
|
} = props;
|
|
5413
5449
|
return /* @__PURE__ */ jsxRuntime.jsx(Select, { ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(SelectGroup, { children: options.map((option, index) => {
|
|
5414
|
-
return
|
|
5450
|
+
return React67__namespace.default.cloneElement(optionRenderer(option, currentValue), {
|
|
5415
5451
|
size: props.size,
|
|
5416
5452
|
key: index,
|
|
5417
5453
|
index
|
|
@@ -5421,7 +5457,7 @@ var SelectWithOptions = (props) => {
|
|
|
5421
5457
|
var TokenSelect = (props) => {
|
|
5422
5458
|
const { tokens, showIcon = true, iconSize, ...rest } = props;
|
|
5423
5459
|
const { icon } = selectVariants();
|
|
5424
|
-
const options =
|
|
5460
|
+
const options = React67.useMemo(() => {
|
|
5425
5461
|
return tokens.map((token) => {
|
|
5426
5462
|
return {
|
|
5427
5463
|
...token,
|
|
@@ -5497,16 +5533,16 @@ var Select2 = Select;
|
|
|
5497
5533
|
Select2.options = SelectWithOptions;
|
|
5498
5534
|
Select2.combine = CombineSelect;
|
|
5499
5535
|
Select2.tokens = TokenSelect;
|
|
5500
|
-
var QuantityInput =
|
|
5536
|
+
var QuantityInput = React67.forwardRef(
|
|
5501
5537
|
(props, ref) => {
|
|
5502
5538
|
const { tokens, ...rest } = props;
|
|
5503
|
-
const [token, setToken] =
|
|
5504
|
-
const tokenOptions =
|
|
5539
|
+
const [token, setToken] = React67.useState(tokens[0]);
|
|
5540
|
+
const tokenOptions = React67.useMemo(() => {
|
|
5505
5541
|
return props.tokens.map((token2) => ({
|
|
5506
5542
|
name: token2
|
|
5507
5543
|
}));
|
|
5508
5544
|
}, [props.tokens]);
|
|
5509
|
-
const inputRef =
|
|
5545
|
+
const inputRef = React67.useRef(null);
|
|
5510
5546
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5511
5547
|
Input,
|
|
5512
5548
|
{
|
|
@@ -5572,7 +5608,7 @@ var tooltipVariants = tv({
|
|
|
5572
5608
|
"data-[side=top]:oui-slide-in-from-bottom-2"
|
|
5573
5609
|
]
|
|
5574
5610
|
});
|
|
5575
|
-
var TooltipContent =
|
|
5611
|
+
var TooltipContent = React67__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
|
5576
5612
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5577
5613
|
TooltipPrimitive__namespace.Content,
|
|
5578
5614
|
{
|
|
@@ -5603,7 +5639,7 @@ var TooltipArrow = (props) => {
|
|
|
5603
5639
|
}
|
|
5604
5640
|
);
|
|
5605
5641
|
};
|
|
5606
|
-
var Tooltip =
|
|
5642
|
+
var Tooltip = React67__namespace.forwardRef((originalProps, ref) => {
|
|
5607
5643
|
const {
|
|
5608
5644
|
children,
|
|
5609
5645
|
content,
|
|
@@ -5635,10 +5671,10 @@ var Tooltip = React66__namespace.forwardRef((originalProps, ref) => {
|
|
|
5635
5671
|
);
|
|
5636
5672
|
});
|
|
5637
5673
|
Tooltip.displayName = "Tooltip";
|
|
5638
|
-
var InputWithTooltip =
|
|
5674
|
+
var InputWithTooltip = React67.forwardRef((props, ref) => {
|
|
5639
5675
|
const { tooltip, tooltipProps, triggerClassName, ...inputProps } = props;
|
|
5640
|
-
const [open, setOpen] =
|
|
5641
|
-
|
|
5676
|
+
const [open, setOpen] = React67.useState(false);
|
|
5677
|
+
React67.useEffect(() => {
|
|
5642
5678
|
if (typeof tooltip !== "undefined" && tooltip !== "" && tooltip !== null) {
|
|
5643
5679
|
setOpen(true);
|
|
5644
5680
|
} else {
|
|
@@ -5853,7 +5889,7 @@ var inputHelpTextVariants = tailwindVariants.tv({
|
|
|
5853
5889
|
}
|
|
5854
5890
|
}
|
|
5855
5891
|
});
|
|
5856
|
-
var InputHelpText =
|
|
5892
|
+
var InputHelpText = React67__namespace.default.forwardRef(
|
|
5857
5893
|
(props, ref) => {
|
|
5858
5894
|
const { className, asChild, color, ...rest } = props;
|
|
5859
5895
|
const Comp = asChild ? reactSlot.Slot : "div";
|
|
@@ -5891,7 +5927,7 @@ var textFieldVariants = tv({
|
|
|
5891
5927
|
direction: "column"
|
|
5892
5928
|
}
|
|
5893
5929
|
});
|
|
5894
|
-
var TextField =
|
|
5930
|
+
var TextField = React67__namespace.default.forwardRef((props, ref) => {
|
|
5895
5931
|
const { label, helpText, direction, className, ...inputProps } = props;
|
|
5896
5932
|
const { root, label: labelClassName } = textFieldVariants({ direction });
|
|
5897
5933
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: root({ className, direction }), children: [
|
|
@@ -5909,7 +5945,7 @@ var TextField = React66__namespace.default.forwardRef((props, ref) => {
|
|
|
5909
5945
|
] });
|
|
5910
5946
|
});
|
|
5911
5947
|
TextField.displayName = "TextField";
|
|
5912
|
-
var InputLabel =
|
|
5948
|
+
var InputLabel = React67__namespace.default.forwardRef(
|
|
5913
5949
|
(props, ref) => {
|
|
5914
5950
|
const { asChild = false, className, ...rest } = props;
|
|
5915
5951
|
const Comp = asChild ? reactSlot.Slot : "label";
|
|
@@ -5961,7 +5997,7 @@ var checkboxVariants = tailwindVariants.tv({
|
|
|
5961
5997
|
// style: "checkBox",
|
|
5962
5998
|
}
|
|
5963
5999
|
});
|
|
5964
|
-
var Checkbox =
|
|
6000
|
+
var Checkbox = React67__namespace.forwardRef(({ className, color = "white", variant = "checkBox", ...props }, ref) => {
|
|
5965
6001
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5966
6002
|
CheckboxPrimitive__namespace.Root,
|
|
5967
6003
|
{
|
|
@@ -6089,7 +6125,7 @@ var switchVariants = tailwindVariants.tv({
|
|
|
6089
6125
|
color: "primary"
|
|
6090
6126
|
}
|
|
6091
6127
|
});
|
|
6092
|
-
var Switch =
|
|
6128
|
+
var Switch = React67__namespace.default.forwardRef(({ className, color, ...props }, ref) => {
|
|
6093
6129
|
const { root, thumb } = switchVariants({
|
|
6094
6130
|
className,
|
|
6095
6131
|
color
|
|
@@ -6210,7 +6246,7 @@ function Badge({ className, variant, color, size, ...props }) {
|
|
|
6210
6246
|
}
|
|
6211
6247
|
);
|
|
6212
6248
|
}
|
|
6213
|
-
var Logo =
|
|
6249
|
+
var Logo = React67__namespace.default.forwardRef(({ src, alt, href }, ref) => {
|
|
6214
6250
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "logo oui-px-3", ref, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: href ?? "/", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6215
6251
|
"img",
|
|
6216
6252
|
{
|
|
@@ -6223,8 +6259,8 @@ var Logo = React66__namespace.default.forwardRef(({ src, alt, href }, ref) => {
|
|
|
6223
6259
|
Logo.displayName = "LogoElement";
|
|
6224
6260
|
function useInit(params) {
|
|
6225
6261
|
const { dataSource, loading, ignoreLoadingCheck } = params;
|
|
6226
|
-
const [initialized, setInitialized] =
|
|
6227
|
-
|
|
6262
|
+
const [initialized, setInitialized] = React67.useState(false);
|
|
6263
|
+
React67.useEffect(() => {
|
|
6228
6264
|
if (initialized)
|
|
6229
6265
|
return;
|
|
6230
6266
|
if (ignoreLoadingCheck || loading || Array.isArray(dataSource)) {
|
|
@@ -6234,10 +6270,10 @@ function useInit(params) {
|
|
|
6234
6270
|
return initialized;
|
|
6235
6271
|
}
|
|
6236
6272
|
function useScroll(deps) {
|
|
6237
|
-
const scrollRef =
|
|
6238
|
-
const [showLeftShadow, setShowLeftShadow] =
|
|
6239
|
-
const [showRightShadow, setShowRightShadow] =
|
|
6240
|
-
|
|
6273
|
+
const scrollRef = React67.useRef(null);
|
|
6274
|
+
const [showLeftShadow, setShowLeftShadow] = React67.useState(false);
|
|
6275
|
+
const [showRightShadow, setShowRightShadow] = React67.useState(false);
|
|
6276
|
+
React67.useEffect(() => {
|
|
6241
6277
|
if (!scrollRef.current) {
|
|
6242
6278
|
return;
|
|
6243
6279
|
}
|
|
@@ -6246,7 +6282,7 @@ function useScroll(deps) {
|
|
|
6246
6282
|
setShowRightShadow(!isScrolledToRight(scrollRef.current));
|
|
6247
6283
|
});
|
|
6248
6284
|
}, [scrollRef]);
|
|
6249
|
-
|
|
6285
|
+
React67.useEffect(() => {
|
|
6250
6286
|
if (!scrollRef.current) {
|
|
6251
6287
|
return;
|
|
6252
6288
|
}
|
|
@@ -6268,14 +6304,14 @@ function hasHorizontalScroll(element) {
|
|
|
6268
6304
|
}
|
|
6269
6305
|
function useShowHeader(params) {
|
|
6270
6306
|
const { dataSource, loading } = params;
|
|
6271
|
-
const initShowHeader =
|
|
6272
|
-
const showHeader =
|
|
6307
|
+
const initShowHeader = React67.useRef(false);
|
|
6308
|
+
const showHeader = React67.useMemo(() => {
|
|
6273
6309
|
if (loading && !dataSource?.length) {
|
|
6274
6310
|
return initShowHeader.current;
|
|
6275
6311
|
}
|
|
6276
6312
|
return !!dataSource?.length;
|
|
6277
6313
|
}, [loading, dataSource]);
|
|
6278
|
-
|
|
6314
|
+
React67.useEffect(() => {
|
|
6279
6315
|
if (showHeader) {
|
|
6280
6316
|
initShowHeader.current = true;
|
|
6281
6317
|
}
|
|
@@ -6284,8 +6320,8 @@ function useShowHeader(params) {
|
|
|
6284
6320
|
}
|
|
6285
6321
|
function useShowPagination(params) {
|
|
6286
6322
|
const { loading, dataSource, pagination, rows } = params;
|
|
6287
|
-
const initShowPagination =
|
|
6288
|
-
const showPagination =
|
|
6323
|
+
const initShowPagination = React67.useRef(false);
|
|
6324
|
+
const showPagination = React67.useMemo(() => {
|
|
6289
6325
|
if (loading && !dataSource?.length) {
|
|
6290
6326
|
return initShowPagination.current;
|
|
6291
6327
|
}
|
|
@@ -6294,7 +6330,7 @@ function useShowPagination(params) {
|
|
|
6294
6330
|
}
|
|
6295
6331
|
return false;
|
|
6296
6332
|
}, [loading, pagination, dataSource, rows]);
|
|
6297
|
-
|
|
6333
|
+
React67.useEffect(() => {
|
|
6298
6334
|
if (showPagination) {
|
|
6299
6335
|
initShowPagination.current = true;
|
|
6300
6336
|
}
|
|
@@ -6303,7 +6339,7 @@ function useShowPagination(params) {
|
|
|
6303
6339
|
}
|
|
6304
6340
|
function useSort(props) {
|
|
6305
6341
|
const { onSort, initialSort } = props;
|
|
6306
|
-
const [sorting, setSorting] =
|
|
6342
|
+
const [sorting, setSorting] = React67.useState(
|
|
6307
6343
|
initialSort ? [
|
|
6308
6344
|
{
|
|
6309
6345
|
id: initialSort.sortKey,
|
|
@@ -6311,15 +6347,15 @@ function useSort(props) {
|
|
|
6311
6347
|
}
|
|
6312
6348
|
] : []
|
|
6313
6349
|
);
|
|
6314
|
-
|
|
6350
|
+
React67.useEffect(() => {
|
|
6315
6351
|
const { id, desc } = sorting[0] || {};
|
|
6316
6352
|
onSort?.(id ? { sortKey: id, sort: desc ? "desc" : "asc" } : void 0);
|
|
6317
6353
|
}, [sorting, onSort]);
|
|
6318
6354
|
return [sorting, setSorting];
|
|
6319
6355
|
}
|
|
6320
6356
|
function useWrap(deps) {
|
|
6321
|
-
const wrapRef =
|
|
6322
|
-
|
|
6357
|
+
const wrapRef = React67.useRef(null);
|
|
6358
|
+
React67.useEffect(() => {
|
|
6323
6359
|
if (!wrapRef.current)
|
|
6324
6360
|
return;
|
|
6325
6361
|
const bgColor = window.getComputedStyle(wrapRef.current).backgroundColor;
|
|
@@ -6413,7 +6449,7 @@ var TableBody = (props) => {
|
|
|
6413
6449
|
children: props.expandRowRender?.(row, row.index)
|
|
6414
6450
|
}
|
|
6415
6451
|
) });
|
|
6416
|
-
const rowView = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6452
|
+
const rowView = /* @__PURE__ */ jsxRuntime.jsxs(React67.Fragment, { children: [
|
|
6417
6453
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6418
6454
|
"tr",
|
|
6419
6455
|
{
|
|
@@ -6474,7 +6510,7 @@ var TableBody = (props) => {
|
|
|
6474
6510
|
expandView
|
|
6475
6511
|
] }, row.id);
|
|
6476
6512
|
if (typeof props.renderRowContainer === "function") {
|
|
6477
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6513
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React67.Fragment, { children: props.renderRowContainer(row.original, row.index, rowView, row) }, row.id);
|
|
6478
6514
|
}
|
|
6479
6515
|
return rowView;
|
|
6480
6516
|
})
|
|
@@ -6561,7 +6597,7 @@ var DescendingIcon = () => {
|
|
|
6561
6597
|
};
|
|
6562
6598
|
function useMultiSort(props) {
|
|
6563
6599
|
const { onSort, currentSorting } = props;
|
|
6564
|
-
const handleFieldSort =
|
|
6600
|
+
const handleFieldSort = React67.useCallback(
|
|
6565
6601
|
(fieldKey) => {
|
|
6566
6602
|
const isCurrentField = currentSorting?.sortKey === fieldKey;
|
|
6567
6603
|
let newOrder;
|
|
@@ -6576,7 +6612,7 @@ function useMultiSort(props) {
|
|
|
6576
6612
|
},
|
|
6577
6613
|
[currentSorting, onSort]
|
|
6578
6614
|
);
|
|
6579
|
-
const getFieldSort =
|
|
6615
|
+
const getFieldSort = React67.useCallback(
|
|
6580
6616
|
(fieldKey) => {
|
|
6581
6617
|
if (currentSorting?.sortKey === fieldKey) {
|
|
6582
6618
|
return { sortKey: fieldKey, sort: currentSorting.sort };
|
|
@@ -6732,9 +6768,9 @@ var SortIndicator2 = ({ isSorted }) => {
|
|
|
6732
6768
|
desc: /* @__PURE__ */ jsxRuntime.jsx(DescendingIcon, {})
|
|
6733
6769
|
}[isSorted] || /* @__PURE__ */ jsxRuntime.jsx(SortingIcon2, {});
|
|
6734
6770
|
};
|
|
6735
|
-
var LocaleContext =
|
|
6771
|
+
var LocaleContext = React67.createContext(void 0);
|
|
6736
6772
|
var LocaleProvider = (props) => {
|
|
6737
|
-
const value =
|
|
6773
|
+
const value = React67.useMemo(
|
|
6738
6774
|
() => ({ ...props.locale, exist: true }),
|
|
6739
6775
|
[props.locale]
|
|
6740
6776
|
);
|
|
@@ -6765,8 +6801,8 @@ var localeValues = {
|
|
|
6765
6801
|
|
|
6766
6802
|
// src/locale/useLocale.ts
|
|
6767
6803
|
var useLocale = (componentName, defaultLocale) => {
|
|
6768
|
-
const fullLocale =
|
|
6769
|
-
const getLocale =
|
|
6804
|
+
const fullLocale = React67.useContext(LocaleContext);
|
|
6805
|
+
const getLocale = React67.useMemo(() => {
|
|
6770
6806
|
const locale = defaultLocale || localeValues[componentName];
|
|
6771
6807
|
const localeFromContext = fullLocale?.[componentName] || {};
|
|
6772
6808
|
return {
|
|
@@ -6774,7 +6810,7 @@ var useLocale = (componentName, defaultLocale) => {
|
|
|
6774
6810
|
...localeFromContext
|
|
6775
6811
|
};
|
|
6776
6812
|
}, [componentName, defaultLocale, fullLocale]);
|
|
6777
|
-
const getLocaleCode =
|
|
6813
|
+
const getLocaleCode = React67.useMemo(() => {
|
|
6778
6814
|
const localeCode = fullLocale?.locale;
|
|
6779
6815
|
const defaultLocaleCode = localeValues.locale;
|
|
6780
6816
|
return localeCode || defaultLocaleCode;
|
|
@@ -6794,7 +6830,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
6794
6830
|
}
|
|
6795
6831
|
);
|
|
6796
6832
|
Pagination.displayName = "Pagination";
|
|
6797
|
-
var PaginationContent =
|
|
6833
|
+
var PaginationContent = React67__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6798
6834
|
"ul",
|
|
6799
6835
|
{
|
|
6800
6836
|
ref,
|
|
@@ -6806,7 +6842,7 @@ var PaginationContent = React66__namespace.default.forwardRef(({ className, ...p
|
|
|
6806
6842
|
}
|
|
6807
6843
|
));
|
|
6808
6844
|
PaginationContent.displayName = "PaginationContent";
|
|
6809
|
-
var PaginationItem =
|
|
6845
|
+
var PaginationItem = React67__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: tailwindVariants.cnBase("oui-leading-[0px]", className), ...props }));
|
|
6810
6846
|
PaginationItem.displayName = "PaginationItem";
|
|
6811
6847
|
var PaginationLink = ({
|
|
6812
6848
|
className,
|
|
@@ -6938,7 +6974,7 @@ var PaginationItems = (props) => {
|
|
|
6938
6974
|
if (totalPages <= 1) {
|
|
6939
6975
|
return null;
|
|
6940
6976
|
}
|
|
6941
|
-
const pageNumbers =
|
|
6977
|
+
const pageNumbers = React67.useMemo(() => {
|
|
6942
6978
|
if (typeof props.generatePageNumbers === "function") {
|
|
6943
6979
|
return props.generatePageNumbers(currentPage, totalPages);
|
|
6944
6980
|
}
|
|
@@ -7107,7 +7143,7 @@ var useExtensionBuilder = (position, props) => {
|
|
|
7107
7143
|
var ExtensionSlot = (props) => {
|
|
7108
7144
|
const { position, scope, defaultWidget: defaultValue, ...rest } = props;
|
|
7109
7145
|
const elementProps = useExtensionBuilder(position, rest);
|
|
7110
|
-
const Ele =
|
|
7146
|
+
const Ele = React67.useMemo(() => {
|
|
7111
7147
|
const registry = OrderlyExtensionRegistry.getInstance();
|
|
7112
7148
|
const plugin = registry.getPluginsByPosition(position);
|
|
7113
7149
|
return plugin?.render ?? defaultValue ?? NotFound;
|
|
@@ -7355,10 +7391,10 @@ function DataTable(props) {
|
|
|
7355
7391
|
onSort,
|
|
7356
7392
|
initialSort
|
|
7357
7393
|
});
|
|
7358
|
-
const hasMultiSortColumns =
|
|
7394
|
+
const hasMultiSortColumns = React67.useMemo(() => {
|
|
7359
7395
|
return columns.some((col) => col.multiSort && !col.multiSort.onSort);
|
|
7360
7396
|
}, [columns]);
|
|
7361
|
-
const effectiveManualSorting =
|
|
7397
|
+
const effectiveManualSorting = React67.useMemo(() => {
|
|
7362
7398
|
if (!hasMultiSortColumns) {
|
|
7363
7399
|
return manualSorting;
|
|
7364
7400
|
}
|
|
@@ -7372,27 +7408,27 @@ function DataTable(props) {
|
|
|
7372
7408
|
}
|
|
7373
7409
|
return false;
|
|
7374
7410
|
}, [hasMultiSortColumns, manualSorting, sorting, columns]);
|
|
7375
|
-
const dataSource =
|
|
7411
|
+
const dataSource = React67.useMemo(() => {
|
|
7376
7412
|
return Transform.dataSource(props.dataSource || [], columns, sorting);
|
|
7377
7413
|
}, [props.dataSource, columns, sorting]);
|
|
7378
|
-
const formatColumns =
|
|
7414
|
+
const formatColumns = React67.useMemo(
|
|
7379
7415
|
() => Transform.columns(columns, sorting, setSorting),
|
|
7380
7416
|
[columns, sorting, setSorting]
|
|
7381
7417
|
);
|
|
7382
|
-
const columnPinning =
|
|
7418
|
+
const columnPinning = React67.useMemo(
|
|
7383
7419
|
() => Transform.columnPinning(columns),
|
|
7384
7420
|
[columns]
|
|
7385
7421
|
);
|
|
7386
|
-
const rowSelection =
|
|
7422
|
+
const rowSelection = React67.useMemo(
|
|
7387
7423
|
() => props.rowSelection || {},
|
|
7388
7424
|
[props.rowSelection]
|
|
7389
7425
|
);
|
|
7390
|
-
const { state: paginationState, config: paginationConfig } =
|
|
7426
|
+
const { state: paginationState, config: paginationConfig } = React67.useMemo(
|
|
7391
7427
|
() => Transform.pagination(pagination),
|
|
7392
7428
|
[pagination]
|
|
7393
7429
|
);
|
|
7394
7430
|
const initialized = useInit({ dataSource, loading, ignoreLoadingCheck });
|
|
7395
|
-
const columnFilters =
|
|
7431
|
+
const columnFilters = React67.useMemo(() => {
|
|
7396
7432
|
return Array.isArray(props.columnFilters) ? props.columnFilters : props.columnFilters ? [props.columnFilters] : [];
|
|
7397
7433
|
}, [props.columnFilters]);
|
|
7398
7434
|
const table = reactTable.useReactTable({
|
|
@@ -7428,7 +7464,7 @@ function DataTable(props) {
|
|
|
7428
7464
|
...paginationConfig
|
|
7429
7465
|
// ...sortConfig,
|
|
7430
7466
|
});
|
|
7431
|
-
|
|
7467
|
+
React67.useEffect(() => {
|
|
7432
7468
|
props.getTableInstance?.(table);
|
|
7433
7469
|
}, [table]);
|
|
7434
7470
|
const wrapRef = useWrap([className, classNames?.root]);
|
|
@@ -7619,15 +7655,15 @@ var DateRangePicker = (props) => {
|
|
|
7619
7655
|
...calendarProps
|
|
7620
7656
|
} = props;
|
|
7621
7657
|
const [locale] = useLocale("picker");
|
|
7622
|
-
const [open, setOpen] =
|
|
7623
|
-
const [dateRange, setDateRange] =
|
|
7658
|
+
const [open, setOpen] = React67.useState(false);
|
|
7659
|
+
const [dateRange, setDateRange] = React67.useState(
|
|
7624
7660
|
value || initialValue || null
|
|
7625
7661
|
);
|
|
7626
|
-
const [isMobileView, setIsMobileView] =
|
|
7662
|
+
const [isMobileView, setIsMobileView] = React67.useState(false);
|
|
7627
7663
|
const update = useDebouncedCallback((width) => {
|
|
7628
7664
|
setIsMobileView(width <= 768);
|
|
7629
7665
|
}, 100);
|
|
7630
|
-
|
|
7666
|
+
React67.useEffect(() => {
|
|
7631
7667
|
const handleResize = () => {
|
|
7632
7668
|
update(window.innerWidth);
|
|
7633
7669
|
};
|
|
@@ -7637,12 +7673,12 @@ var DateRangePicker = (props) => {
|
|
|
7637
7673
|
window.removeEventListener("resize", handleResize);
|
|
7638
7674
|
};
|
|
7639
7675
|
}, []);
|
|
7640
|
-
|
|
7676
|
+
React67.useEffect(() => {
|
|
7641
7677
|
if (value?.from && value?.to && dateRange?.from && dateRange?.to && !areDatesEqual(value, dateRange))
|
|
7642
7678
|
setDateRange(value);
|
|
7643
7679
|
}, [value]);
|
|
7644
7680
|
const { trigger } = selectVariants({ size, className });
|
|
7645
|
-
const formattedValue =
|
|
7681
|
+
const formattedValue = React67.useMemo(() => {
|
|
7646
7682
|
if (!dateRange || !dateRange.from || !dateRange.to) {
|
|
7647
7683
|
return placeholder ?? locale.selectDate;
|
|
7648
7684
|
}
|
|
@@ -7718,8 +7754,8 @@ var DateRangePicker = (props) => {
|
|
|
7718
7754
|
};
|
|
7719
7755
|
DateRangePicker.displayName = "DateRangePicker";
|
|
7720
7756
|
function useDebouncedCallback(callback, delay) {
|
|
7721
|
-
const timeoutRef =
|
|
7722
|
-
const debouncedCallback =
|
|
7757
|
+
const timeoutRef = React67.useRef(null);
|
|
7758
|
+
const debouncedCallback = React67.useCallback(
|
|
7723
7759
|
(args) => {
|
|
7724
7760
|
if (timeoutRef.current) {
|
|
7725
7761
|
clearTimeout(timeoutRef.current);
|
|
@@ -7756,8 +7792,8 @@ var DatePicker = (props) => {
|
|
|
7756
7792
|
} = props;
|
|
7757
7793
|
const [locale] = useLocale("picker");
|
|
7758
7794
|
const { trigger } = selectVariants({ size, className });
|
|
7759
|
-
const [open, setOpen] =
|
|
7760
|
-
const formattedValue =
|
|
7795
|
+
const [open, setOpen] = React67.useState(false);
|
|
7796
|
+
const formattedValue = React67.useMemo(() => {
|
|
7761
7797
|
if (typeof value === "undefined") {
|
|
7762
7798
|
return placeholder ?? locale.selectDate;
|
|
7763
7799
|
}
|
|
@@ -7806,7 +7842,7 @@ var Sheet = DialogPrimitive__namespace.Root;
|
|
|
7806
7842
|
var SheetTrigger = DialogPrimitive__namespace.Trigger;
|
|
7807
7843
|
var SheetClose = DialogPrimitive__namespace.Close;
|
|
7808
7844
|
var SheetPortal = DialogPrimitive__namespace.Portal;
|
|
7809
|
-
var SheetOverlay =
|
|
7845
|
+
var SheetOverlay = React67__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7810
7846
|
DialogPrimitive__namespace.Overlay,
|
|
7811
7847
|
{
|
|
7812
7848
|
className: tailwindVariants.cnBase(
|
|
@@ -7832,7 +7868,7 @@ var sheetVariants = tailwindVariants.tv({
|
|
|
7832
7868
|
side: "bottom"
|
|
7833
7869
|
}
|
|
7834
7870
|
});
|
|
7835
|
-
var SheetContent =
|
|
7871
|
+
var SheetContent = React67__namespace.forwardRef(
|
|
7836
7872
|
({
|
|
7837
7873
|
side = "bottom",
|
|
7838
7874
|
closeable = true,
|
|
@@ -7928,7 +7964,7 @@ var SheetFooter = ({
|
|
|
7928
7964
|
}
|
|
7929
7965
|
);
|
|
7930
7966
|
SheetFooter.displayName = "SheetFooter";
|
|
7931
|
-
var SheetTitle =
|
|
7967
|
+
var SheetTitle = React67__namespace.forwardRef(({ className, leading, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7932
7968
|
"div",
|
|
7933
7969
|
{
|
|
7934
7970
|
className: "oui-sheet-header oui-grid oui-grid-cols-[40px_1fr_40px] oui-items-center",
|
|
@@ -7949,7 +7985,7 @@ var SheetTitle = React66__namespace.forwardRef(({ className, leading, ...props }
|
|
|
7949
7985
|
}
|
|
7950
7986
|
));
|
|
7951
7987
|
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
7952
|
-
var SheetDescription =
|
|
7988
|
+
var SheetDescription = React67__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7953
7989
|
DialogPrimitive__namespace.Description,
|
|
7954
7990
|
{
|
|
7955
7991
|
ref,
|
|
@@ -7975,8 +8011,8 @@ var getModalId = (modal2) => {
|
|
|
7975
8011
|
return modal2[symModalId];
|
|
7976
8012
|
};
|
|
7977
8013
|
function useModal(modal2, args) {
|
|
7978
|
-
const modals =
|
|
7979
|
-
const modalIdFromContext =
|
|
8014
|
+
const modals = React67.useContext(ModalContext);
|
|
8015
|
+
const modalIdFromContext = React67.useContext(ModalIdContext);
|
|
7980
8016
|
let modalId;
|
|
7981
8017
|
let isComponent = modal2 && typeof modal2 !== "string";
|
|
7982
8018
|
if (!modal2) {
|
|
@@ -7988,19 +8024,19 @@ function useModal(modal2, args) {
|
|
|
7988
8024
|
throw new Error("modalId is required");
|
|
7989
8025
|
}
|
|
7990
8026
|
const id = modalId;
|
|
7991
|
-
|
|
8027
|
+
React67.useEffect(() => {
|
|
7992
8028
|
if (isComponent) {
|
|
7993
8029
|
register(id, modal2, args);
|
|
7994
8030
|
}
|
|
7995
8031
|
}, [isComponent, modalId, modal2, args]);
|
|
7996
8032
|
const modalInfo = modals[id];
|
|
7997
|
-
const show2 =
|
|
8033
|
+
const show2 = React67.useCallback(
|
|
7998
8034
|
(args2) => modalActions.show(id, args2),
|
|
7999
8035
|
[id]
|
|
8000
8036
|
);
|
|
8001
|
-
const hide2 =
|
|
8002
|
-
const remove2 =
|
|
8003
|
-
const onOpenChange =
|
|
8037
|
+
const hide2 = React67.useCallback(() => modalActions.hide(id), [id]);
|
|
8038
|
+
const remove2 = React67.useCallback(() => modalActions.remove(id), [id]);
|
|
8039
|
+
const onOpenChange = React67.useCallback(
|
|
8004
8040
|
(isOpen) => {
|
|
8005
8041
|
if (!isOpen) {
|
|
8006
8042
|
reject("cancel");
|
|
@@ -8009,33 +8045,33 @@ function useModal(modal2, args) {
|
|
|
8009
8045
|
},
|
|
8010
8046
|
[id]
|
|
8011
8047
|
);
|
|
8012
|
-
const setStates2 =
|
|
8048
|
+
const setStates2 = React67.useCallback(
|
|
8013
8049
|
(states) => {
|
|
8014
8050
|
modalActions.setStates(id, states);
|
|
8015
8051
|
},
|
|
8016
8052
|
[id]
|
|
8017
8053
|
);
|
|
8018
|
-
const updateArgs2 =
|
|
8054
|
+
const updateArgs2 = React67.useCallback(
|
|
8019
8055
|
(args2) => {
|
|
8020
8056
|
modalActions.updateArgs(id, args2);
|
|
8021
8057
|
},
|
|
8022
8058
|
[id]
|
|
8023
8059
|
);
|
|
8024
|
-
const resolve =
|
|
8060
|
+
const resolve = React67.useCallback(
|
|
8025
8061
|
(args2) => {
|
|
8026
8062
|
modalCallbacks[id]?.resolve(args2);
|
|
8027
8063
|
delete modalCallbacks[id];
|
|
8028
8064
|
},
|
|
8029
8065
|
[id]
|
|
8030
8066
|
);
|
|
8031
|
-
const reject =
|
|
8067
|
+
const reject = React67.useCallback(
|
|
8032
8068
|
(args2) => {
|
|
8033
8069
|
modalCallbacks[id]?.reject(args2);
|
|
8034
8070
|
delete modalCallbacks[id];
|
|
8035
8071
|
},
|
|
8036
8072
|
[id]
|
|
8037
8073
|
);
|
|
8038
|
-
const resolveHide =
|
|
8074
|
+
const resolveHide = React67.useCallback((args2) => {
|
|
8039
8075
|
hideModalCallbacks[id]?.resolve(args2);
|
|
8040
8076
|
delete hideModalCallbacks[id];
|
|
8041
8077
|
}, []);
|
|
@@ -8069,9 +8105,9 @@ var MODAL_REGISTRY = /* @__PURE__ */ new Map();
|
|
|
8069
8105
|
var create = (Comp) => {
|
|
8070
8106
|
return ({ id, defaultVisible, keepMounted, ...props }) => {
|
|
8071
8107
|
const { args, show: show2 } = useModal(id);
|
|
8072
|
-
const modals =
|
|
8108
|
+
const modals = React67.useContext(ModalContext);
|
|
8073
8109
|
const shouldMount = !!modals[id];
|
|
8074
|
-
|
|
8110
|
+
React67.useEffect(() => {
|
|
8075
8111
|
if (defaultVisible) {
|
|
8076
8112
|
show2();
|
|
8077
8113
|
}
|
|
@@ -8082,12 +8118,12 @@ var create = (Comp) => {
|
|
|
8082
8118
|
}
|
|
8083
8119
|
};
|
|
8084
8120
|
}, [id, show2, defaultVisible]);
|
|
8085
|
-
|
|
8121
|
+
React67.useEffect(() => {
|
|
8086
8122
|
if (keepMounted)
|
|
8087
8123
|
modalActions.setStates(id, { keepMounted: true });
|
|
8088
8124
|
}, [id, keepMounted]);
|
|
8089
8125
|
const delayVisible = modals[id]?.delayVisible;
|
|
8090
|
-
|
|
8126
|
+
React67.useEffect(() => {
|
|
8091
8127
|
if (delayVisible) {
|
|
8092
8128
|
show2(args);
|
|
8093
8129
|
}
|
|
@@ -8109,8 +8145,8 @@ var unregister = (id) => {
|
|
|
8109
8145
|
};
|
|
8110
8146
|
var initialState = {};
|
|
8111
8147
|
var ALREADY_MOUNTED = {};
|
|
8112
|
-
var ModalContext =
|
|
8113
|
-
var ModalIdContext =
|
|
8148
|
+
var ModalContext = React67.createContext(initialState);
|
|
8149
|
+
var ModalIdContext = React67.createContext(null);
|
|
8114
8150
|
var modalCallbacks = {};
|
|
8115
8151
|
var hideModalCallbacks = {};
|
|
8116
8152
|
var dispatch = () => {
|
|
@@ -8219,7 +8255,7 @@ var reducer = (state, action) => {
|
|
|
8219
8255
|
}
|
|
8220
8256
|
};
|
|
8221
8257
|
var ModalContainer = () => {
|
|
8222
|
-
const modals =
|
|
8258
|
+
const modals = React67.useContext(ModalContext);
|
|
8223
8259
|
const visibleModalIds = Object.keys(modals).filter((id) => !!modals[id]);
|
|
8224
8260
|
visibleModalIds.forEach((id) => {
|
|
8225
8261
|
if (!MODAL_REGISTRY.has(id) && !ALREADY_MOUNTED[id]) {
|
|
@@ -8238,7 +8274,7 @@ var ModalContainer = () => {
|
|
|
8238
8274
|
}) });
|
|
8239
8275
|
};
|
|
8240
8276
|
var ModalProvider = (props) => {
|
|
8241
|
-
const [state, dispatchOrigin] =
|
|
8277
|
+
const [state, dispatchOrigin] = React67.useReducer(reducer, initialState);
|
|
8242
8278
|
dispatch = dispatchOrigin;
|
|
8243
8279
|
return /* @__PURE__ */ jsxRuntime.jsxs(ModalContext.Provider, { value: state, children: [
|
|
8244
8280
|
props.children,
|
|
@@ -8342,7 +8378,7 @@ var dividerVariants = tv({
|
|
|
8342
8378
|
intensity: 4
|
|
8343
8379
|
}
|
|
8344
8380
|
});
|
|
8345
|
-
var Divider =
|
|
8381
|
+
var Divider = React67__namespace.default.forwardRef((props, ref) => {
|
|
8346
8382
|
const { className, intensity, direction, lineStyle, mx, my, ...rest } = props;
|
|
8347
8383
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8348
8384
|
"div",
|
|
@@ -8550,7 +8586,7 @@ var Dialog = DialogPrimitive__namespace.Root;
|
|
|
8550
8586
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
8551
8587
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
8552
8588
|
var DialogClose = DialogPrimitive__namespace.Close;
|
|
8553
|
-
var DialogOverlay =
|
|
8589
|
+
var DialogOverlay = React67__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8554
8590
|
const { overlay } = dialogVariants();
|
|
8555
8591
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8556
8592
|
DialogPrimitive__namespace.Overlay,
|
|
@@ -8562,7 +8598,7 @@ var DialogOverlay = React66__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
8562
8598
|
);
|
|
8563
8599
|
});
|
|
8564
8600
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
8565
|
-
var DialogContent =
|
|
8601
|
+
var DialogContent = React67__namespace.forwardRef(
|
|
8566
8602
|
({
|
|
8567
8603
|
overlyClassName,
|
|
8568
8604
|
className,
|
|
@@ -8624,7 +8660,7 @@ var DialogFooter = ({
|
|
|
8624
8660
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: footer({ className }), ...props });
|
|
8625
8661
|
};
|
|
8626
8662
|
DialogFooter.displayName = "DialogFooter";
|
|
8627
|
-
var DialogTitle =
|
|
8663
|
+
var DialogTitle = React67__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8628
8664
|
const { title } = dialogVariants();
|
|
8629
8665
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8630
8666
|
DialogPrimitive__namespace.Title,
|
|
@@ -8636,7 +8672,7 @@ var DialogTitle = React66__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
8636
8672
|
);
|
|
8637
8673
|
});
|
|
8638
8674
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
8639
|
-
var DialogDescription =
|
|
8675
|
+
var DialogDescription = React67__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8640
8676
|
const { desc } = dialogVariants();
|
|
8641
8677
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8642
8678
|
DialogPrimitive__namespace.Description,
|
|
@@ -8650,10 +8686,10 @@ var DialogDescription = React66__namespace.forwardRef(({ className, ...props },
|
|
|
8650
8686
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
8651
8687
|
var SimpleDialogFooter = (props) => {
|
|
8652
8688
|
const { actions } = props;
|
|
8653
|
-
const [primaryLoading, setPrimaryLoading] =
|
|
8689
|
+
const [primaryLoading, setPrimaryLoading] = React67.useState(
|
|
8654
8690
|
actions?.primary?.loading ?? false
|
|
8655
8691
|
);
|
|
8656
|
-
|
|
8692
|
+
React67.useEffect(() => {
|
|
8657
8693
|
if (actions?.primary?.loading) {
|
|
8658
8694
|
setPrimaryLoading(actions?.primary?.loading);
|
|
8659
8695
|
}
|
|
@@ -8663,7 +8699,7 @@ var SimpleDialogFooter = (props) => {
|
|
|
8663
8699
|
}, [actions?.primary?.loading]);
|
|
8664
8700
|
if (!actions)
|
|
8665
8701
|
return null;
|
|
8666
|
-
const buttons =
|
|
8702
|
+
const buttons = React67.useMemo(() => {
|
|
8667
8703
|
const buttons2 = [];
|
|
8668
8704
|
if (actions.secondary && typeof actions.secondary.onClick === "function") {
|
|
8669
8705
|
const {
|
|
@@ -8763,11 +8799,11 @@ function useMediaQuery(query) {
|
|
|
8763
8799
|
}
|
|
8764
8800
|
return false;
|
|
8765
8801
|
};
|
|
8766
|
-
const [matches, setMatches] =
|
|
8802
|
+
const [matches, setMatches] = React67.useState(getMatches(query));
|
|
8767
8803
|
function handleChange() {
|
|
8768
8804
|
setMatches(getMatches(query));
|
|
8769
8805
|
}
|
|
8770
|
-
|
|
8806
|
+
React67.useEffect(() => {
|
|
8771
8807
|
const matchMedia = window?.matchMedia(query);
|
|
8772
8808
|
handleChange();
|
|
8773
8809
|
if (matchMedia?.addListener) {
|
|
@@ -8795,7 +8831,7 @@ function useScreen() {
|
|
|
8795
8831
|
};
|
|
8796
8832
|
}
|
|
8797
8833
|
function useObserverElement(element, callback) {
|
|
8798
|
-
|
|
8834
|
+
React67.useEffect(() => {
|
|
8799
8835
|
if (!element) {
|
|
8800
8836
|
return;
|
|
8801
8837
|
}
|
|
@@ -8825,7 +8861,7 @@ var AlertDialog = (props) => {
|
|
|
8825
8861
|
classNames
|
|
8826
8862
|
} = props;
|
|
8827
8863
|
const { isMobile } = useScreen();
|
|
8828
|
-
const actions =
|
|
8864
|
+
const actions = React67.useMemo(() => {
|
|
8829
8865
|
if (typeof onOk !== "function" && typeof onCancel !== "function")
|
|
8830
8866
|
return void 0;
|
|
8831
8867
|
const actions2 = {};
|
|
@@ -8878,7 +8914,7 @@ var AlertDialog = (props) => {
|
|
|
8878
8914
|
var CreatedAlertDialog = create((props) => {
|
|
8879
8915
|
const { onOk } = props;
|
|
8880
8916
|
const { visible, hide: hide2, resolve, reject, onOpenChange } = useModal();
|
|
8881
|
-
const onOkHandler =
|
|
8917
|
+
const onOkHandler = React67.useCallback(() => {
|
|
8882
8918
|
return Promise.resolve().then(onOk).then(hide2);
|
|
8883
8919
|
}, [onOk]);
|
|
8884
8920
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9095,14 +9131,14 @@ function registerSimpleSheet(id, comp, props) {
|
|
|
9095
9131
|
}
|
|
9096
9132
|
var ActionItem = (props) => {
|
|
9097
9133
|
const { action } = props;
|
|
9098
|
-
const onItemClick =
|
|
9134
|
+
const onItemClick = React67.useCallback(() => {
|
|
9099
9135
|
if (typeof action.onClick === "function") {
|
|
9100
9136
|
action.onClick(action);
|
|
9101
9137
|
} else {
|
|
9102
9138
|
props.onClick?.({ ...action, index: props.index });
|
|
9103
9139
|
}
|
|
9104
9140
|
}, [action]);
|
|
9105
|
-
const child =
|
|
9141
|
+
const child = React67.useMemo(() => {
|
|
9106
9142
|
return action.label;
|
|
9107
9143
|
}, [action.label]);
|
|
9108
9144
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9125,7 +9161,7 @@ var ActionSheetContent = (props) => {
|
|
|
9125
9161
|
if (action.type === "division") {
|
|
9126
9162
|
return /* @__PURE__ */ jsxRuntime.jsx(ActionDivision, {}, index);
|
|
9127
9163
|
}
|
|
9128
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9164
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React67.Fragment, { children: [
|
|
9129
9165
|
action.value === "cancel" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-h-2 oui-bg-base-10" }),
|
|
9130
9166
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9131
9167
|
ActionItem,
|
|
@@ -9152,7 +9188,7 @@ var ActionSheetContent = (props) => {
|
|
|
9152
9188
|
};
|
|
9153
9189
|
var ActionSheet = (props) => {
|
|
9154
9190
|
const [locale] = useLocale("modal");
|
|
9155
|
-
const items =
|
|
9191
|
+
const items = React67.useMemo(() => {
|
|
9156
9192
|
const items2 = [];
|
|
9157
9193
|
if (Array.isArray(props.actionSheets)) {
|
|
9158
9194
|
for (const action of props.actionSheets) {
|
|
@@ -9232,7 +9268,7 @@ var pickerVariants = tv({
|
|
|
9232
9268
|
color: "base"
|
|
9233
9269
|
}
|
|
9234
9270
|
});
|
|
9235
|
-
var Picker =
|
|
9271
|
+
var Picker = React67.forwardRef(
|
|
9236
9272
|
(originalProps, ref) => {
|
|
9237
9273
|
const {
|
|
9238
9274
|
size,
|
|
@@ -9247,8 +9283,8 @@ var Picker = React66.forwardRef(
|
|
|
9247
9283
|
valueRenderer,
|
|
9248
9284
|
...props
|
|
9249
9285
|
} = originalProps;
|
|
9250
|
-
const [open, setOpen] =
|
|
9251
|
-
const selectedItem =
|
|
9286
|
+
const [open, setOpen] = React67.useState(false);
|
|
9287
|
+
const selectedItem = React67.useMemo(() => {
|
|
9252
9288
|
if (value && !!value.value) {
|
|
9253
9289
|
return value;
|
|
9254
9290
|
}
|
|
@@ -9259,13 +9295,13 @@ var Picker = React66.forwardRef(
|
|
|
9259
9295
|
}
|
|
9260
9296
|
}
|
|
9261
9297
|
}, [value, options]);
|
|
9262
|
-
const text =
|
|
9298
|
+
const text = React67.useMemo(() => {
|
|
9263
9299
|
if (selectedItem) {
|
|
9264
9300
|
return selectedItem.label;
|
|
9265
9301
|
}
|
|
9266
9302
|
return placeholder || label || "";
|
|
9267
9303
|
}, [selectedItem, label, placeholder]);
|
|
9268
|
-
const actions =
|
|
9304
|
+
const actions = React67.useMemo(() => {
|
|
9269
9305
|
return [...options, "---", "Cancel"];
|
|
9270
9306
|
}, [options]);
|
|
9271
9307
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9396,10 +9432,10 @@ var DataFilter = (props) => {
|
|
|
9396
9432
|
);
|
|
9397
9433
|
};
|
|
9398
9434
|
var usePagination = (initial) => {
|
|
9399
|
-
const dataTotal =
|
|
9400
|
-
const [page, setPage] =
|
|
9401
|
-
const [pageSize, _setPageSize] =
|
|
9402
|
-
const setPageSize =
|
|
9435
|
+
const dataTotal = React67.useRef(0);
|
|
9436
|
+
const [page, setPage] = React67.useState(initial?.page ?? 1);
|
|
9437
|
+
const [pageSize, _setPageSize] = React67.useState(initial?.pageSize ?? 10);
|
|
9438
|
+
const setPageSize = React67.useCallback(
|
|
9403
9439
|
(size) => {
|
|
9404
9440
|
_setPageSize(size);
|
|
9405
9441
|
if (dataTotal.current > 0) {
|
|
@@ -9424,7 +9460,7 @@ var usePagination = (initial) => {
|
|
|
9424
9460
|
pageTotal
|
|
9425
9461
|
};
|
|
9426
9462
|
};
|
|
9427
|
-
const parsePagination =
|
|
9463
|
+
const parsePagination = React67.useCallback(
|
|
9428
9464
|
(meta) => {
|
|
9429
9465
|
return {
|
|
9430
9466
|
...parseMeta(meta),
|
|
@@ -9434,7 +9470,7 @@ var usePagination = (initial) => {
|
|
|
9434
9470
|
},
|
|
9435
9471
|
[page, pageSize]
|
|
9436
9472
|
);
|
|
9437
|
-
const pagination =
|
|
9473
|
+
const pagination = React67.useMemo(
|
|
9438
9474
|
() => ({
|
|
9439
9475
|
page,
|
|
9440
9476
|
pageSize,
|
|
@@ -9443,7 +9479,7 @@ var usePagination = (initial) => {
|
|
|
9443
9479
|
}),
|
|
9444
9480
|
[parsePagination]
|
|
9445
9481
|
);
|
|
9446
|
-
|
|
9482
|
+
React67.useEffect(() => {
|
|
9447
9483
|
if (initial?.resetPageWhenPageSizeChange !== false) {
|
|
9448
9484
|
setPage(1);
|
|
9449
9485
|
}
|
|
@@ -9684,13 +9720,13 @@ var tabsVariants = tv({
|
|
|
9684
9720
|
}
|
|
9685
9721
|
});
|
|
9686
9722
|
var TabsBase = TabsPrimitive__namespace.Root;
|
|
9687
|
-
var TabsList =
|
|
9723
|
+
var TabsList = React67__namespace.forwardRef((originProps, ref) => {
|
|
9688
9724
|
const { className, size, variant, ...props } = originProps;
|
|
9689
9725
|
const { list } = tabsVariants({ size, variant });
|
|
9690
9726
|
return /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.List, { ref, className: list({ className }), ...props });
|
|
9691
9727
|
});
|
|
9692
9728
|
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
9693
|
-
var TabsTrigger =
|
|
9729
|
+
var TabsTrigger = React67__namespace.forwardRef((originProps, ref) => {
|
|
9694
9730
|
const { className, size, children, icon, variant, ...props } = originProps;
|
|
9695
9731
|
const { trigger, icon: iconClassName } = tabsVariants({ size, variant });
|
|
9696
9732
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9700,14 +9736,14 @@ var TabsTrigger = React66__namespace.forwardRef((originProps, ref) => {
|
|
|
9700
9736
|
className: trigger({ className }),
|
|
9701
9737
|
...props,
|
|
9702
9738
|
children: [
|
|
9703
|
-
typeof icon !== "undefined" ?
|
|
9739
|
+
typeof icon !== "undefined" ? React67__namespace.cloneElement(icon, { className: iconClassName(), opacity: 1 }) : null,
|
|
9704
9740
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children })
|
|
9705
9741
|
]
|
|
9706
9742
|
}
|
|
9707
9743
|
);
|
|
9708
9744
|
});
|
|
9709
9745
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
9710
|
-
var TabsContent =
|
|
9746
|
+
var TabsContent = React67__namespace.forwardRef((oriProps, ref) => {
|
|
9711
9747
|
const { className, size, children, ...props } = oriProps;
|
|
9712
9748
|
const { content } = tabsVariants({ size });
|
|
9713
9749
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9721,16 +9757,16 @@ var TabsContent = React66__namespace.forwardRef((oriProps, ref) => {
|
|
|
9721
9757
|
);
|
|
9722
9758
|
});
|
|
9723
9759
|
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
9724
|
-
var OrderlyThemeContext =
|
|
9760
|
+
var OrderlyThemeContext = React67.createContext(
|
|
9725
9761
|
{}
|
|
9726
9762
|
);
|
|
9727
9763
|
var useOrderlyTheme = () => {
|
|
9728
|
-
return
|
|
9764
|
+
return React67.useContext(OrderlyThemeContext);
|
|
9729
9765
|
};
|
|
9730
9766
|
function useDrag(containerRef) {
|
|
9731
|
-
const [isDragging, setIsDragging] =
|
|
9732
|
-
const [startX, setStartX] =
|
|
9733
|
-
const [scrollLeft, setScrollLeft] =
|
|
9767
|
+
const [isDragging, setIsDragging] = React67.useState(false);
|
|
9768
|
+
const [startX, setStartX] = React67.useState(0);
|
|
9769
|
+
const [scrollLeft, setScrollLeft] = React67.useState(0);
|
|
9734
9770
|
const handleMouseDown = (e) => {
|
|
9735
9771
|
if (!containerRef.current)
|
|
9736
9772
|
return;
|
|
@@ -9757,10 +9793,10 @@ function useDrag(containerRef) {
|
|
|
9757
9793
|
};
|
|
9758
9794
|
}
|
|
9759
9795
|
function useScroll2() {
|
|
9760
|
-
const [leadingVisible, setLeadingVisible] =
|
|
9761
|
-
const [tailingVisible, setTailingVisible] =
|
|
9762
|
-
const containerRef =
|
|
9763
|
-
|
|
9796
|
+
const [leadingVisible, setLeadingVisible] = React67.useState(false);
|
|
9797
|
+
const [tailingVisible, setTailingVisible] = React67.useState(false);
|
|
9798
|
+
const containerRef = React67.useRef(null);
|
|
9799
|
+
React67.useEffect(() => {
|
|
9764
9800
|
if (!containerRef.current)
|
|
9765
9801
|
return;
|
|
9766
9802
|
const handleScroll = () => {
|
|
@@ -9787,7 +9823,7 @@ function useScroll2() {
|
|
|
9787
9823
|
intersectionObserver.disconnect();
|
|
9788
9824
|
};
|
|
9789
9825
|
}, []);
|
|
9790
|
-
|
|
9826
|
+
React67.useEffect(() => {
|
|
9791
9827
|
if (!containerRef.current)
|
|
9792
9828
|
return;
|
|
9793
9829
|
const intersectionObserver = new IntersectionObserver((entries) => {
|
|
@@ -9905,7 +9941,7 @@ var ScrollIndicator = (props) => {
|
|
|
9905
9941
|
}
|
|
9906
9942
|
);
|
|
9907
9943
|
};
|
|
9908
|
-
var TabsContext =
|
|
9944
|
+
var TabsContext = React67.createContext({});
|
|
9909
9945
|
var Tabs = (props) => {
|
|
9910
9946
|
const { getComponentTheme } = useOrderlyTheme();
|
|
9911
9947
|
const {
|
|
@@ -9918,20 +9954,20 @@ var Tabs = (props) => {
|
|
|
9918
9954
|
} = props;
|
|
9919
9955
|
const tabsOverrides = getComponentTheme("tabs", { variant: "contained" });
|
|
9920
9956
|
const tabsVariant = variant || tabsOverrides.variant;
|
|
9921
|
-
const [tabList, setTabList] =
|
|
9922
|
-
const registerTab =
|
|
9957
|
+
const [tabList, setTabList] = React67.useState({});
|
|
9958
|
+
const registerTab = React67.useCallback((config) => {
|
|
9923
9959
|
setTabList((prev) => {
|
|
9924
9960
|
return { ...prev, [config.value]: config };
|
|
9925
9961
|
});
|
|
9926
9962
|
}, []);
|
|
9927
|
-
const unregisterTab =
|
|
9963
|
+
const unregisterTab = React67.useCallback((config) => {
|
|
9928
9964
|
setTabList((prev) => {
|
|
9929
9965
|
const newTabList = { ...prev };
|
|
9930
9966
|
delete newTabList[config.value];
|
|
9931
9967
|
return newTabList;
|
|
9932
9968
|
});
|
|
9933
9969
|
}, []);
|
|
9934
|
-
const memoizedValue =
|
|
9970
|
+
const memoizedValue = React67.useMemo(
|
|
9935
9971
|
() => ({ registerTab, unregisterTab }),
|
|
9936
9972
|
[registerTab, unregisterTab]
|
|
9937
9973
|
);
|
|
@@ -10004,8 +10040,8 @@ var Tabs = (props) => {
|
|
|
10004
10040
|
Tabs.displayName = "Tabs";
|
|
10005
10041
|
var TabPanel = (props) => {
|
|
10006
10042
|
const { title, value, icon, className, style, testid, children } = props;
|
|
10007
|
-
const { registerTab, unregisterTab } =
|
|
10008
|
-
|
|
10043
|
+
const { registerTab, unregisterTab } = React67.useContext(TabsContext);
|
|
10044
|
+
React67.useEffect(() => {
|
|
10009
10045
|
const tabConfig = {
|
|
10010
10046
|
title,
|
|
10011
10047
|
value,
|
|
@@ -10041,7 +10077,7 @@ var cardVariants = tv({
|
|
|
10041
10077
|
intensity: 900
|
|
10042
10078
|
}
|
|
10043
10079
|
});
|
|
10044
|
-
var CardBase =
|
|
10080
|
+
var CardBase = React67__namespace.default.forwardRef(
|
|
10045
10081
|
({ className, intensity, children, ...props }, ref) => {
|
|
10046
10082
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10047
10083
|
"div",
|
|
@@ -10055,7 +10091,7 @@ var CardBase = React66__namespace.default.forwardRef(
|
|
|
10055
10091
|
}
|
|
10056
10092
|
);
|
|
10057
10093
|
CardBase.displayName = "CardBase";
|
|
10058
|
-
var CardHeader =
|
|
10094
|
+
var CardHeader = React67__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10059
10095
|
"div",
|
|
10060
10096
|
{
|
|
10061
10097
|
ref,
|
|
@@ -10068,7 +10104,7 @@ var CardHeader = React66__namespace.default.forwardRef(({ className, children, .
|
|
|
10068
10104
|
}
|
|
10069
10105
|
));
|
|
10070
10106
|
CardHeader.displayName = "CardHeader";
|
|
10071
|
-
var CardTitle =
|
|
10107
|
+
var CardTitle = React67__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10072
10108
|
"h3",
|
|
10073
10109
|
{
|
|
10074
10110
|
ref,
|
|
@@ -10081,7 +10117,7 @@ var CardTitle = React66__namespace.default.forwardRef(({ className, children, ..
|
|
|
10081
10117
|
}
|
|
10082
10118
|
));
|
|
10083
10119
|
CardTitle.displayName = "CardTitle";
|
|
10084
|
-
var CardDescription =
|
|
10120
|
+
var CardDescription = React67__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10085
10121
|
"p",
|
|
10086
10122
|
{
|
|
10087
10123
|
ref,
|
|
@@ -10090,7 +10126,7 @@ var CardDescription = React66__namespace.default.forwardRef(({ className, childr
|
|
|
10090
10126
|
children
|
|
10091
10127
|
}
|
|
10092
10128
|
));
|
|
10093
|
-
var CardContent =
|
|
10129
|
+
var CardContent = React67__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10094
10130
|
"div",
|
|
10095
10131
|
{
|
|
10096
10132
|
ref,
|
|
@@ -10100,9 +10136,9 @@ var CardContent = React66__namespace.default.forwardRef(({ className, children,
|
|
|
10100
10136
|
}
|
|
10101
10137
|
));
|
|
10102
10138
|
CardContent.displayName = "CardContent";
|
|
10103
|
-
var CardFooter =
|
|
10139
|
+
var CardFooter = React67__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, ...props, children }));
|
|
10104
10140
|
CardFooter.displayName = "CardFooter";
|
|
10105
|
-
var Card =
|
|
10141
|
+
var Card = React67.forwardRef(
|
|
10106
10142
|
(props, ref) => {
|
|
10107
10143
|
const { title, children, footer, className, classNames, ...rest } = props;
|
|
10108
10144
|
return /* @__PURE__ */ jsxRuntime.jsxs(CardBase, { ...rest, className: tailwindVariants.cnBase(className, classNames?.root), ref, children: [
|
|
@@ -10115,7 +10151,7 @@ var Card = React66.forwardRef(
|
|
|
10115
10151
|
Card.displayName = "Card";
|
|
10116
10152
|
var HoverCardRoot = HoverCardPrimitive__namespace.Root;
|
|
10117
10153
|
var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
|
|
10118
|
-
var HoverCardContent =
|
|
10154
|
+
var HoverCardContent = React67__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10119
10155
|
HoverCardPrimitive__namespace.Content,
|
|
10120
10156
|
{
|
|
10121
10157
|
ref,
|
|
@@ -10269,7 +10305,7 @@ var sliderVariants = tv({
|
|
|
10269
10305
|
}
|
|
10270
10306
|
}
|
|
10271
10307
|
});
|
|
10272
|
-
var BaseSlider =
|
|
10308
|
+
var BaseSlider = React67__namespace.forwardRef((oriProps, ref) => {
|
|
10273
10309
|
const {
|
|
10274
10310
|
className,
|
|
10275
10311
|
color,
|
|
@@ -10285,8 +10321,8 @@ var BaseSlider = React66__namespace.forwardRef((oriProps, ref) => {
|
|
|
10285
10321
|
const { track, range, thumb, root, trackInner, mark, tips } = sliderVariants({
|
|
10286
10322
|
color
|
|
10287
10323
|
});
|
|
10288
|
-
const [innerValue, setInvalue] =
|
|
10289
|
-
|
|
10324
|
+
const [innerValue, setInvalue] = React67__namespace.useState(__propsValue);
|
|
10325
|
+
React67__namespace.useEffect(() => {
|
|
10290
10326
|
setInvalue((prev) => {
|
|
10291
10327
|
if (!prev) {
|
|
10292
10328
|
return __propsValue;
|
|
@@ -10297,7 +10333,7 @@ var BaseSlider = React66__namespace.forwardRef((oriProps, ref) => {
|
|
|
10297
10333
|
return prev;
|
|
10298
10334
|
});
|
|
10299
10335
|
}, [__propsValue]);
|
|
10300
|
-
const innerMasks =
|
|
10336
|
+
const innerMasks = React67.useMemo(() => {
|
|
10301
10337
|
if (Array.isArray(marks) && marks.length > 0) {
|
|
10302
10338
|
return marks;
|
|
10303
10339
|
}
|
|
@@ -10393,14 +10429,14 @@ var Marks = (props) => {
|
|
|
10393
10429
|
className,
|
|
10394
10430
|
color = "primary"
|
|
10395
10431
|
} = props;
|
|
10396
|
-
const _value =
|
|
10397
|
-
const selIndex =
|
|
10432
|
+
const _value = React67.useMemo(() => value?.[0] ?? 0, [value]);
|
|
10433
|
+
const selIndex = React67.useMemo(() => {
|
|
10398
10434
|
if (typeof props.step === "undefined") {
|
|
10399
10435
|
return void 0;
|
|
10400
10436
|
}
|
|
10401
10437
|
return Math.floor(_value / props.step);
|
|
10402
10438
|
}, [_value, props.step]);
|
|
10403
|
-
const colorCls =
|
|
10439
|
+
const colorCls = React67.useMemo(() => {
|
|
10404
10440
|
switch (color) {
|
|
10405
10441
|
case "primary":
|
|
10406
10442
|
return "oui-border-primary oui-bg-primary";
|
|
@@ -10412,7 +10448,7 @@ var Marks = (props) => {
|
|
|
10412
10448
|
return "oui-border-primary-light oui-bg-primary-light";
|
|
10413
10449
|
}
|
|
10414
10450
|
}, [color]);
|
|
10415
|
-
const textCls =
|
|
10451
|
+
const textCls = React67.useMemo(() => {
|
|
10416
10452
|
switch (color) {
|
|
10417
10453
|
case "primary":
|
|
10418
10454
|
return "oui-text-primary";
|
|
@@ -10434,7 +10470,7 @@ var Marks = (props) => {
|
|
|
10434
10470
|
const __value = isInnerMask ? mark.value : index;
|
|
10435
10471
|
const active = (isInnerMask ? _value >= __value : _value >= mark.value) && _value >= 0 && !props.disabled;
|
|
10436
10472
|
const classNames = active ? colorCls : "";
|
|
10437
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10473
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React67.Fragment, { children: [
|
|
10438
10474
|
(!isInnerMask ? mark.label : true) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10439
10475
|
"span",
|
|
10440
10476
|
{
|
|
@@ -10464,8 +10500,8 @@ var SliderTip = (props) => {
|
|
|
10464
10500
|
const percent = convertValueToPercentage(value, min, max);
|
|
10465
10501
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className, style: { lineHeight: "19px" }, children: props.tipFormatter?.(value, min, max, percent) ?? `${percent.toFixed()}%` });
|
|
10466
10502
|
};
|
|
10467
|
-
var SingleSlider =
|
|
10468
|
-
const _value =
|
|
10503
|
+
var SingleSlider = React67__namespace.forwardRef((props, ref) => {
|
|
10504
|
+
const _value = React67.useMemo(() => [props.value], [props.value]);
|
|
10469
10505
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10470
10506
|
BaseSlider,
|
|
10471
10507
|
{
|
|
@@ -10484,7 +10520,7 @@ var SingleSlider = React66__namespace.forwardRef((props, ref) => {
|
|
|
10484
10520
|
SingleSlider.displayName = "SingleSlider";
|
|
10485
10521
|
var Slider = BaseSlider;
|
|
10486
10522
|
Slider.single = SingleSlider;
|
|
10487
|
-
var ToastErrorIcon =
|
|
10523
|
+
var ToastErrorIcon = React67__namespace.default.forwardRef(
|
|
10488
10524
|
(props, ref) => {
|
|
10489
10525
|
const { opacity = 1, viewBox = "0 0 20 20", ...rest } = props;
|
|
10490
10526
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, viewBox, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10497,7 +10533,7 @@ var ToastErrorIcon = React66__namespace.default.forwardRef(
|
|
|
10497
10533
|
) });
|
|
10498
10534
|
}
|
|
10499
10535
|
);
|
|
10500
|
-
var ToastSuccessIcon =
|
|
10536
|
+
var ToastSuccessIcon = React67__namespace.default.forwardRef(
|
|
10501
10537
|
(props, ref) => {
|
|
10502
10538
|
const { opacity = 1, viewBox = "0 0 20 20", ...rest } = props;
|
|
10503
10539
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, viewBox, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10511,7 +10547,7 @@ var ToastSuccessIcon = React66__namespace.default.forwardRef(
|
|
|
10511
10547
|
) });
|
|
10512
10548
|
}
|
|
10513
10549
|
);
|
|
10514
|
-
var ToastLoadingIcon =
|
|
10550
|
+
var ToastLoadingIcon = React67__namespace.default.forwardRef(
|
|
10515
10551
|
(props, ref) => {
|
|
10516
10552
|
const { opacity = 1, viewBox = "0 0 20 20", ...rest } = props;
|
|
10517
10553
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, viewBox, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10666,10 +10702,10 @@ var ToastTile = (props) => {
|
|
|
10666
10702
|
);
|
|
10667
10703
|
};
|
|
10668
10704
|
function useEndReached(sentinelRef, onEndReached) {
|
|
10669
|
-
const observer =
|
|
10670
|
-
const cb =
|
|
10705
|
+
const observer = React67.useRef();
|
|
10706
|
+
const cb = React67.useRef(onEndReached);
|
|
10671
10707
|
cb.current = onEndReached;
|
|
10672
|
-
|
|
10708
|
+
React67.useEffect(() => {
|
|
10673
10709
|
const options = {
|
|
10674
10710
|
root: null,
|
|
10675
10711
|
rootMargin: "0px",
|
|
@@ -10687,22 +10723,22 @@ function useEndReached(sentinelRef, onEndReached) {
|
|
|
10687
10723
|
observer.current?.disconnect();
|
|
10688
10724
|
};
|
|
10689
10725
|
}, []);
|
|
10690
|
-
|
|
10726
|
+
React67.useEffect(() => {
|
|
10691
10727
|
observer.current?.observe(sentinelRef.current);
|
|
10692
10728
|
}, []);
|
|
10693
10729
|
}
|
|
10694
10730
|
var ListViewInner = (props, ref) => {
|
|
10695
|
-
const sentinelRef =
|
|
10696
|
-
const containerRef =
|
|
10731
|
+
const sentinelRef = React67.useRef(null);
|
|
10732
|
+
const containerRef = React67.useRef(null);
|
|
10697
10733
|
useEndReached(sentinelRef, () => {
|
|
10698
10734
|
if (!props.isLoading) {
|
|
10699
10735
|
props.loadMore?.();
|
|
10700
10736
|
}
|
|
10701
10737
|
});
|
|
10702
|
-
const emptyDataSouce =
|
|
10738
|
+
const emptyDataSouce = React67.useMemo(() => {
|
|
10703
10739
|
return Array.isArray(props.dataSource) && props.dataSource.length <= 0;
|
|
10704
10740
|
}, [props.dataSource]);
|
|
10705
|
-
const listViewElement =
|
|
10741
|
+
const listViewElement = React67.useMemo(() => {
|
|
10706
10742
|
if (!props.dataSource) {
|
|
10707
10743
|
return null;
|
|
10708
10744
|
}
|
|
@@ -10719,9 +10755,9 @@ var ListViewInner = (props, ref) => {
|
|
|
10719
10755
|
}
|
|
10720
10756
|
);
|
|
10721
10757
|
}
|
|
10722
|
-
return props.dataSource.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10758
|
+
return props.dataSource.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(React67__namespace.default.Fragment, { children: props.renderItem(item, index, props.extraData) }, index));
|
|
10723
10759
|
}, [emptyDataSouce, props.dataSource, props.extraData, props.emptyView]);
|
|
10724
|
-
const loadingViewElement =
|
|
10760
|
+
const loadingViewElement = React67.useMemo(() => {
|
|
10725
10761
|
if ((props.dataSource?.length || 0) === 0)
|
|
10726
10762
|
return null;
|
|
10727
10763
|
if (!props.isLoading) {
|
|
@@ -10729,7 +10765,7 @@ var ListViewInner = (props, ref) => {
|
|
|
10729
10765
|
}
|
|
10730
10766
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-flex oui-py-2 oui-justify-center oui-items-center", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) });
|
|
10731
10767
|
}, [props.isLoading, props.dataSource]);
|
|
10732
|
-
|
|
10768
|
+
React67.useImperativeHandle(ref, () => {
|
|
10733
10769
|
return {
|
|
10734
10770
|
scroll: (direction) => {
|
|
10735
10771
|
containerRef.current?.scroll({
|
|
@@ -10775,7 +10811,7 @@ var ListViewInner = (props, ref) => {
|
|
|
10775
10811
|
}
|
|
10776
10812
|
);
|
|
10777
10813
|
};
|
|
10778
|
-
var ListView =
|
|
10814
|
+
var ListView = React67.forwardRef(ListViewInner);
|
|
10779
10815
|
var Collapsible = CollapsiblePrimitive__namespace.Root;
|
|
10780
10816
|
var CollapsibleTrigger2 = CollapsiblePrimitive__namespace.CollapsibleTrigger;
|
|
10781
10817
|
var CollapsibleContent2 = (props) => {
|
|
@@ -10790,16 +10826,16 @@ var CollapsibleContent2 = (props) => {
|
|
|
10790
10826
|
}
|
|
10791
10827
|
);
|
|
10792
10828
|
};
|
|
10793
|
-
var CollapseContext =
|
|
10829
|
+
var CollapseContext = React67.createContext(
|
|
10794
10830
|
{}
|
|
10795
10831
|
);
|
|
10796
10832
|
var useCollapseContext = () => {
|
|
10797
|
-
return
|
|
10833
|
+
return React67.useContext(CollapseContext);
|
|
10798
10834
|
};
|
|
10799
10835
|
var Panel = (props) => {
|
|
10800
10836
|
const { activeKey, setActiveKey } = useCollapseContext();
|
|
10801
10837
|
const { header, headerClassName, itemKey, disabled } = props;
|
|
10802
|
-
const headerNode =
|
|
10838
|
+
const headerNode = React67.useMemo(() => {
|
|
10803
10839
|
if (typeof header === "string") {
|
|
10804
10840
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10805
10841
|
"div",
|
|
@@ -10844,8 +10880,8 @@ var Panel = (props) => {
|
|
|
10844
10880
|
};
|
|
10845
10881
|
var CollapseRoot = (props) => {
|
|
10846
10882
|
const { activeKey = "", children } = props;
|
|
10847
|
-
const [internalActiveKey, setInternalActiveKey] =
|
|
10848
|
-
const memoizedValue =
|
|
10883
|
+
const [internalActiveKey, setInternalActiveKey] = React67.useState(activeKey);
|
|
10884
|
+
const memoizedValue = React67.useMemo(() => {
|
|
10849
10885
|
return {
|
|
10850
10886
|
activeKey: internalActiveKey,
|
|
10851
10887
|
setActiveKey: setInternalActiveKey
|
|
@@ -10865,11 +10901,11 @@ var Marquee = (props) => {
|
|
|
10865
10901
|
className,
|
|
10866
10902
|
setApi
|
|
10867
10903
|
} = props;
|
|
10868
|
-
const isHorizontal =
|
|
10904
|
+
const isHorizontal = React67.useMemo(
|
|
10869
10905
|
() => carouselOptions.axis !== "y",
|
|
10870
10906
|
[carouselOptions.axis]
|
|
10871
10907
|
);
|
|
10872
|
-
const emblaOptions =
|
|
10908
|
+
const emblaOptions = React67.useMemo(() => {
|
|
10873
10909
|
return {
|
|
10874
10910
|
loop: true,
|
|
10875
10911
|
align: "start",
|
|
@@ -10879,7 +10915,7 @@ var Marquee = (props) => {
|
|
|
10879
10915
|
...carouselOptions
|
|
10880
10916
|
};
|
|
10881
10917
|
}, [carouselOptions]);
|
|
10882
|
-
const autoScrollPluginOptions =
|
|
10918
|
+
const autoScrollPluginOptions = React67.useMemo(() => {
|
|
10883
10919
|
return {
|
|
10884
10920
|
speed: 1,
|
|
10885
10921
|
direction: "forward",
|
|
@@ -10893,12 +10929,12 @@ var Marquee = (props) => {
|
|
|
10893
10929
|
const [emblaRef, emblaApi] = useEmblaCarousel__default.default(emblaOptions, [
|
|
10894
10930
|
AutoScroll__default.default(autoScrollPluginOptions)
|
|
10895
10931
|
]);
|
|
10896
|
-
|
|
10932
|
+
React67__namespace.default.useEffect(() => {
|
|
10897
10933
|
if (emblaApi && setApi) {
|
|
10898
10934
|
setApi(emblaApi);
|
|
10899
10935
|
}
|
|
10900
10936
|
}, [emblaApi, setApi]);
|
|
10901
|
-
const renderSlides =
|
|
10937
|
+
const renderSlides = React67.useMemo(() => {
|
|
10902
10938
|
if (!Array.isArray(data) || data.length === 0) {
|
|
10903
10939
|
return null;
|
|
10904
10940
|
}
|
|
@@ -11045,7 +11081,7 @@ var dropdownMenuVariants = tailwindVariants.tv({
|
|
|
11045
11081
|
size: "lg"
|
|
11046
11082
|
}
|
|
11047
11083
|
});
|
|
11048
|
-
var DropdownMenuContent =
|
|
11084
|
+
var DropdownMenuContent = React67__namespace.forwardRef(({ className, sideOffset = 4, size, ...props }, ref) => {
|
|
11049
11085
|
const { content } = dropdownMenuVariants({ size });
|
|
11050
11086
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11051
11087
|
DropdownMenuPrimitive__namespace.Content,
|
|
@@ -11058,7 +11094,7 @@ var DropdownMenuContent = React66__namespace.forwardRef(({ className, sideOffset
|
|
|
11058
11094
|
) });
|
|
11059
11095
|
});
|
|
11060
11096
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
11061
|
-
var DropdownMenuItem =
|
|
11097
|
+
var DropdownMenuItem = React67__namespace.forwardRef(({ className, inset, size, ...props }, ref) => {
|
|
11062
11098
|
const { item } = dropdownMenuVariants({ size });
|
|
11063
11099
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11064
11100
|
DropdownMenuPrimitive__namespace.Item,
|
|
@@ -11070,7 +11106,7 @@ var DropdownMenuItem = React66__namespace.forwardRef(({ className, inset, size,
|
|
|
11070
11106
|
);
|
|
11071
11107
|
});
|
|
11072
11108
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
11073
|
-
var DropdownMenuLabel =
|
|
11109
|
+
var DropdownMenuLabel = React67__namespace.forwardRef(({ className, inset, ...props }, ref) => {
|
|
11074
11110
|
const { label } = dropdownMenuVariants({
|
|
11075
11111
|
inset
|
|
11076
11112
|
});
|
|
@@ -11084,7 +11120,7 @@ var DropdownMenuLabel = React66__namespace.forwardRef(({ className, inset, ...pr
|
|
|
11084
11120
|
);
|
|
11085
11121
|
});
|
|
11086
11122
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
11087
|
-
var DropdownMenuSeparator =
|
|
11123
|
+
var DropdownMenuSeparator = React67__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
11088
11124
|
const { separator } = dropdownMenuVariants();
|
|
11089
11125
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11090
11126
|
DropdownMenuPrimitive__namespace.Separator,
|
|
@@ -11106,7 +11142,7 @@ var DropdownMenuShortcut = ({
|
|
|
11106
11142
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
11107
11143
|
var SimpleDropdownMenu = (props) => {
|
|
11108
11144
|
const { currentValue, menu, render, size, children, ...contentProps } = props;
|
|
11109
|
-
const items =
|
|
11145
|
+
const items = React67.useMemo(() => {
|
|
11110
11146
|
if (typeof props.render === "function") {
|
|
11111
11147
|
return props.menu.map((item, index) => {
|
|
11112
11148
|
return props.render?.(item, index);
|
|
@@ -11145,7 +11181,7 @@ var SimpleDropdownMenu = (props) => {
|
|
|
11145
11181
|
] });
|
|
11146
11182
|
};
|
|
11147
11183
|
var ComponentsProvider = (props) => {
|
|
11148
|
-
|
|
11184
|
+
React67.useEffect(() => {
|
|
11149
11185
|
if (props.components && Object.keys(props.components).length) {
|
|
11150
11186
|
for (const position in props.components) {
|
|
11151
11187
|
const Element = props.components[position];
|
|
@@ -11163,20 +11199,20 @@ var ComponentsProvider = (props) => {
|
|
|
11163
11199
|
};
|
|
11164
11200
|
var OrderlyThemeProvider = (props) => {
|
|
11165
11201
|
const { components, overrides, children } = props;
|
|
11166
|
-
const resolveComponentTheme =
|
|
11202
|
+
const resolveComponentTheme = React67.useCallback(
|
|
11167
11203
|
(component, defaultValue) => {
|
|
11168
11204
|
return overrides?.[component] || defaultValue;
|
|
11169
11205
|
},
|
|
11170
11206
|
[overrides]
|
|
11171
11207
|
);
|
|
11172
|
-
const memoizedValue =
|
|
11208
|
+
const memoizedValue = React67.useMemo(() => {
|
|
11173
11209
|
return { getComponentTheme: resolveComponentTheme };
|
|
11174
11210
|
}, [resolveComponentTheme]);
|
|
11175
11211
|
return /* @__PURE__ */ jsxRuntime.jsx(OrderlyThemeContext.Provider, { value: memoizedValue, children: /* @__PURE__ */ jsxRuntime.jsx(ComponentsProvider, { components, children }) });
|
|
11176
11212
|
};
|
|
11177
|
-
var Either =
|
|
11213
|
+
var Either = React67.memo((props) => {
|
|
11178
11214
|
const { value, children, left } = props;
|
|
11179
|
-
const inputValue =
|
|
11215
|
+
const inputValue = React67.useMemo(
|
|
11180
11216
|
() => Boolean(typeof value === "function" ? value() : value),
|
|
11181
11217
|
[value]
|
|
11182
11218
|
);
|
|
@@ -11230,6 +11266,7 @@ Object.defineProperty(exports, "Autoplay", {
|
|
|
11230
11266
|
get: function () { return emblaCarouselAutoplay__default.default; }
|
|
11231
11267
|
});
|
|
11232
11268
|
exports.ActionSheet = ActionSheet;
|
|
11269
|
+
exports.AddCircleIcon = AddCircleIcon;
|
|
11233
11270
|
exports.AffiliateIcon = AffiliateIcon;
|
|
11234
11271
|
exports.AlertDialog = AlertDialog;
|
|
11235
11272
|
exports.ArrowDownShortIcon = ArrowDownShortIcon;
|