@orderly.network/ui 2.8.13-rc.0 → 2.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +6 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +127 -124
- package/dist/index.d.ts +127 -124
- package/dist/index.js +351 -334
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +146 -130
- 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 React69 = 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 React69__namespace = /*#__PURE__*/_interopNamespace(React69);
|
|
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 = React69__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 = React69.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 = React69__namespace.default.forwardRef(
|
|
706
706
|
(props, forwardedRef) => {
|
|
707
707
|
const {
|
|
708
708
|
asChild = false,
|
|
@@ -717,14 +717,14 @@ var BaseButton = React68__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 = React69.useMemo(() => {
|
|
721
|
+
return icon ? React69__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 = React69.useMemo(() => {
|
|
728
728
|
if (!leading && !trailing && !iconElement) return children;
|
|
729
729
|
return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", itemAlign: "center", className: "oui-space-x-1", children: [
|
|
730
730
|
leading,
|
|
@@ -733,7 +733,7 @@ var BaseButton = React68__namespace.default.forwardRef(
|
|
|
733
733
|
trailing
|
|
734
734
|
] });
|
|
735
735
|
}, [children, leading, trailing, iconElement]);
|
|
736
|
-
const spinnerSize =
|
|
736
|
+
const spinnerSize = React69.useMemo(() => {
|
|
737
737
|
switch (size) {
|
|
738
738
|
case "xl":
|
|
739
739
|
return "md";
|
|
@@ -968,7 +968,7 @@ var buttonVariants = tailwindVariants.tv(
|
|
|
968
968
|
responsiveVariants: ["md", "lg"]
|
|
969
969
|
}
|
|
970
970
|
);
|
|
971
|
-
var Button =
|
|
971
|
+
var Button = React69__namespace.default.forwardRef(
|
|
972
972
|
({
|
|
973
973
|
className,
|
|
974
974
|
variant,
|
|
@@ -1001,9 +1001,9 @@ var Button = React68__namespace.default.forwardRef(
|
|
|
1001
1001
|
}
|
|
1002
1002
|
);
|
|
1003
1003
|
Button.displayName = "Button";
|
|
1004
|
-
var ThrottledButton =
|
|
1005
|
-
const lastCall =
|
|
1006
|
-
const throttle =
|
|
1004
|
+
var ThrottledButton = React69__namespace.default.forwardRef(({ onClick, throttleDuration = 700, ...props }, ref) => {
|
|
1005
|
+
const lastCall = React69.useRef(0);
|
|
1006
|
+
const throttle = React69.useCallback(
|
|
1007
1007
|
(delay, fn) => {
|
|
1008
1008
|
return function(...args) {
|
|
1009
1009
|
const now = Date.now();
|
|
@@ -1088,7 +1088,7 @@ var gridVariants = tv({
|
|
|
1088
1088
|
// autoFlow: "row",
|
|
1089
1089
|
}
|
|
1090
1090
|
});
|
|
1091
|
-
var Grid =
|
|
1091
|
+
var Grid = React69__namespace.default.forwardRef((props, ref) => {
|
|
1092
1092
|
const { className, cols, rows, gap, gapX, gapY, autoFlow, ...rest } = props;
|
|
1093
1093
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1094
1094
|
Box,
|
|
@@ -1138,8 +1138,8 @@ var gridSpanVariants = tv({
|
|
|
1138
1138
|
});
|
|
1139
1139
|
var Span = (props) => {
|
|
1140
1140
|
const { colSpan, rowSpan, className, ...rest } = props;
|
|
1141
|
-
const ref =
|
|
1142
|
-
|
|
1141
|
+
const ref = React69.useRef(null);
|
|
1142
|
+
React69.useEffect(() => {
|
|
1143
1143
|
if (ref.current) {
|
|
1144
1144
|
const parent = ref.current.parentElement;
|
|
1145
1145
|
if (!parent || !parent.classList.contains("oui-grid")) ;
|
|
@@ -1182,7 +1182,7 @@ var iconVariants = tailwindVariants.tv({
|
|
|
1182
1182
|
color: "black"
|
|
1183
1183
|
}
|
|
1184
1184
|
});
|
|
1185
|
-
var BaseIcon =
|
|
1185
|
+
var BaseIcon = React69__namespace.default.forwardRef(
|
|
1186
1186
|
(props, ref) => {
|
|
1187
1187
|
const {
|
|
1188
1188
|
size = 24,
|
|
@@ -1244,7 +1244,7 @@ var avatarVariants = tv({
|
|
|
1244
1244
|
size: "sm"
|
|
1245
1245
|
}
|
|
1246
1246
|
});
|
|
1247
|
-
var AvatarBase =
|
|
1247
|
+
var AvatarBase = React69__namespace.forwardRef(({ className, size, ...props }, ref) => {
|
|
1248
1248
|
const { root } = avatarVariants({ size });
|
|
1249
1249
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1250
1250
|
AvatarPrimitive__namespace.Root,
|
|
@@ -1256,7 +1256,7 @@ var AvatarBase = React68__namespace.forwardRef(({ className, size, ...props }, r
|
|
|
1256
1256
|
);
|
|
1257
1257
|
});
|
|
1258
1258
|
AvatarBase.displayName = AvatarPrimitive__namespace.Root.displayName;
|
|
1259
|
-
var AvatarImage =
|
|
1259
|
+
var AvatarImage = React69__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1260
1260
|
const { image } = avatarVariants();
|
|
1261
1261
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1262
1262
|
AvatarPrimitive__namespace.Image,
|
|
@@ -1268,12 +1268,12 @@ var AvatarImage = React68__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1268
1268
|
);
|
|
1269
1269
|
});
|
|
1270
1270
|
AvatarImage.displayName = AvatarPrimitive__namespace.Image.displayName;
|
|
1271
|
-
var AvatarFallback =
|
|
1271
|
+
var AvatarFallback = React69__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1272
1272
|
const { fallback } = avatarVariants({ className });
|
|
1273
1273
|
return /* @__PURE__ */ jsxRuntime.jsx(AvatarPrimitive__namespace.Fallback, { ref, className: fallback(), ...props });
|
|
1274
1274
|
});
|
|
1275
1275
|
AvatarFallback.displayName = AvatarPrimitive__namespace.Fallback.displayName;
|
|
1276
|
-
var Avatar =
|
|
1276
|
+
var Avatar = React69__namespace.forwardRef((props, ref) => {
|
|
1277
1277
|
const { size, src, fallback, delayMs, alt, onLoadingStatusChange, ...rest } = props;
|
|
1278
1278
|
return /* @__PURE__ */ jsxRuntime.jsxs(AvatarBase, { ...rest, ref, size, children: [
|
|
1279
1279
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1287,13 +1287,13 @@ var Avatar = React68__namespace.forwardRef((props, ref) => {
|
|
|
1287
1287
|
typeof fallback !== "undefined" && /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { delayMs, children: fallback })
|
|
1288
1288
|
] });
|
|
1289
1289
|
});
|
|
1290
|
-
var EVMAvatar =
|
|
1290
|
+
var EVMAvatar = React69__namespace.forwardRef((props, ref) => {
|
|
1291
1291
|
const { address, ...rest } = props;
|
|
1292
|
-
const src =
|
|
1292
|
+
const src = React69.useMemo(() => makeBlockie__default.default(address), [props.address]);
|
|
1293
1293
|
return /* @__PURE__ */ jsxRuntime.jsx(Avatar, { ...rest, src });
|
|
1294
1294
|
});
|
|
1295
1295
|
var ChainIcon = (props) => {
|
|
1296
|
-
const url =
|
|
1296
|
+
const url = React69.useMemo(() => {
|
|
1297
1297
|
return `https://oss.orderly.network/static/network_logo/${props.chainId}.png`;
|
|
1298
1298
|
}, [props.chainId]);
|
|
1299
1299
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1307,7 +1307,7 @@ var ChainIcon = (props) => {
|
|
|
1307
1307
|
);
|
|
1308
1308
|
};
|
|
1309
1309
|
var TokenIcon = (props) => {
|
|
1310
|
-
const url =
|
|
1310
|
+
const url = React69.useMemo(() => {
|
|
1311
1311
|
let name = props.name;
|
|
1312
1312
|
if (typeof props.symbol === "string") {
|
|
1313
1313
|
const arr = props.symbol?.split("_");
|
|
@@ -1327,7 +1327,7 @@ var TokenIcon = (props) => {
|
|
|
1327
1327
|
};
|
|
1328
1328
|
var CombineIcon = (props) => {
|
|
1329
1329
|
const { secondary } = props;
|
|
1330
|
-
const subElement =
|
|
1330
|
+
const subElement = React69.useMemo(() => {
|
|
1331
1331
|
const className = "oui-bg-base-6 oui-absolute oui-bottom-0 oui-right-0 oui-outline oui-outline-2 oui-outline-base-1 oui-z-10";
|
|
1332
1332
|
if (secondary.component) {
|
|
1333
1333
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindVariants.cnBase(className, secondary?.className), children: secondary.component });
|
|
@@ -1354,7 +1354,7 @@ var CombineIcon = (props) => {
|
|
|
1354
1354
|
subElement
|
|
1355
1355
|
] });
|
|
1356
1356
|
};
|
|
1357
|
-
var CloseIcon =
|
|
1357
|
+
var CloseIcon = React69__namespace.default.forwardRef(
|
|
1358
1358
|
(props, ref) => {
|
|
1359
1359
|
const { opacity = 0.54, ...rest } = props;
|
|
1360
1360
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1368,7 +1368,7 @@ var CloseIcon = React68__namespace.default.forwardRef(
|
|
|
1368
1368
|
}
|
|
1369
1369
|
);
|
|
1370
1370
|
CloseIcon.displayName = "CloseIcon";
|
|
1371
|
-
var BaseIconWithPath =
|
|
1371
|
+
var BaseIconWithPath = React69__namespace.default.forwardRef((props, ref) => {
|
|
1372
1372
|
const { opacity = 0.54, d, ...rest } = props;
|
|
1373
1373
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1374
1374
|
"path",
|
|
@@ -1381,7 +1381,7 @@ var BaseIconWithPath = React68__namespace.default.forwardRef((props, ref) => {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
) });
|
|
1383
1383
|
});
|
|
1384
|
-
var CheckIcon =
|
|
1384
|
+
var CheckIcon = React69__namespace.default.forwardRef(
|
|
1385
1385
|
(props, ref) => {
|
|
1386
1386
|
const { opacity = 0.54, ...rest } = props;
|
|
1387
1387
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1395,7 +1395,7 @@ var CheckIcon = React68__namespace.default.forwardRef(
|
|
|
1395
1395
|
}
|
|
1396
1396
|
);
|
|
1397
1397
|
CheckIcon.displayName = "CheckIcon";
|
|
1398
|
-
var ChevronDownIcon =
|
|
1398
|
+
var ChevronDownIcon = React69__namespace.default.forwardRef(
|
|
1399
1399
|
(props, ref) => {
|
|
1400
1400
|
const { opacity = 0.54, ...rest } = props;
|
|
1401
1401
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1409,7 +1409,7 @@ var ChevronDownIcon = React68__namespace.default.forwardRef(
|
|
|
1409
1409
|
}
|
|
1410
1410
|
);
|
|
1411
1411
|
ChevronDownIcon.displayName = "ChevronDownIcon";
|
|
1412
|
-
var ChevronUpIcon =
|
|
1412
|
+
var ChevronUpIcon = React69__namespace.default.forwardRef(
|
|
1413
1413
|
(props, ref) => {
|
|
1414
1414
|
const { opacity = 0.54, ...rest } = props;
|
|
1415
1415
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1423,7 +1423,7 @@ var ChevronUpIcon = React68__namespace.default.forwardRef(
|
|
|
1423
1423
|
}
|
|
1424
1424
|
);
|
|
1425
1425
|
ChevronUpIcon.displayName = "ChevronUpIcon";
|
|
1426
|
-
var CaretUpIcon =
|
|
1426
|
+
var CaretUpIcon = React69__namespace.default.forwardRef(
|
|
1427
1427
|
(props, ref) => {
|
|
1428
1428
|
const { opacity = 0.54, ...rest } = props;
|
|
1429
1429
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1437,7 +1437,7 @@ var CaretUpIcon = React68__namespace.default.forwardRef(
|
|
|
1437
1437
|
}
|
|
1438
1438
|
);
|
|
1439
1439
|
CaretUpIcon.displayName = "CaretUpIcon";
|
|
1440
|
-
var CaretDownIcon =
|
|
1440
|
+
var CaretDownIcon = React69__namespace.default.forwardRef(
|
|
1441
1441
|
(props, ref) => {
|
|
1442
1442
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1443
1443
|
BaseIconWithPath,
|
|
@@ -1450,7 +1450,7 @@ var CaretDownIcon = React68__namespace.default.forwardRef(
|
|
|
1450
1450
|
}
|
|
1451
1451
|
);
|
|
1452
1452
|
CaretDownIcon.displayName = "CaretDownIcon";
|
|
1453
|
-
var CaretLeftIcon =
|
|
1453
|
+
var CaretLeftIcon = React69__namespace.default.forwardRef(
|
|
1454
1454
|
(props, ref) => {
|
|
1455
1455
|
const { opacity = 0.54, ...rest } = props;
|
|
1456
1456
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1464,7 +1464,7 @@ var CaretLeftIcon = React68__namespace.default.forwardRef(
|
|
|
1464
1464
|
}
|
|
1465
1465
|
);
|
|
1466
1466
|
CaretLeftIcon.displayName = "CaretLeftIcon";
|
|
1467
|
-
var CaretRightIcon =
|
|
1467
|
+
var CaretRightIcon = React69__namespace.default.forwardRef(
|
|
1468
1468
|
(props, ref) => {
|
|
1469
1469
|
const { opacity = 0.54, ...rest } = props;
|
|
1470
1470
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1478,7 +1478,7 @@ var CaretRightIcon = React68__namespace.default.forwardRef(
|
|
|
1478
1478
|
}
|
|
1479
1479
|
);
|
|
1480
1480
|
CaretRightIcon.displayName = "CaretRightIcon";
|
|
1481
|
-
var ChevronLeftIcon =
|
|
1481
|
+
var ChevronLeftIcon = React69__namespace.default.forwardRef(
|
|
1482
1482
|
(props, ref) => {
|
|
1483
1483
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1484
1484
|
BaseIconWithPath,
|
|
@@ -1491,7 +1491,7 @@ var ChevronLeftIcon = React68__namespace.default.forwardRef(
|
|
|
1491
1491
|
}
|
|
1492
1492
|
);
|
|
1493
1493
|
ChevronLeftIcon.displayName = "ChevronLeftIcon";
|
|
1494
|
-
var ChevronRightIcon =
|
|
1494
|
+
var ChevronRightIcon = React69__namespace.default.forwardRef(
|
|
1495
1495
|
(props, ref) => {
|
|
1496
1496
|
const { opacity = 0.54, ...rest } = props;
|
|
1497
1497
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1505,7 +1505,7 @@ var ChevronRightIcon = React68__namespace.default.forwardRef(
|
|
|
1505
1505
|
}
|
|
1506
1506
|
);
|
|
1507
1507
|
ChevronRightIcon.displayName = "ChevronRightIcon";
|
|
1508
|
-
var CalendarMinusIcon =
|
|
1508
|
+
var CalendarMinusIcon = React69__namespace.default.forwardRef(
|
|
1509
1509
|
(props, ref) => {
|
|
1510
1510
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1511
1511
|
BaseIconWithPath,
|
|
@@ -1518,7 +1518,7 @@ var CalendarMinusIcon = React68__namespace.default.forwardRef(
|
|
|
1518
1518
|
}
|
|
1519
1519
|
);
|
|
1520
1520
|
CalendarMinusIcon.displayName = "CalendarMinusIcon";
|
|
1521
|
-
var SettingIcon =
|
|
1521
|
+
var SettingIcon = React69__namespace.default.forwardRef(
|
|
1522
1522
|
(props, ref) => {
|
|
1523
1523
|
const { opacity = 0.54, ...rest } = props;
|
|
1524
1524
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1532,7 +1532,7 @@ var SettingIcon = React68__namespace.default.forwardRef(
|
|
|
1532
1532
|
}
|
|
1533
1533
|
);
|
|
1534
1534
|
SettingIcon.displayName = "SettingIcon";
|
|
1535
|
-
var CloseSquareFillIcon =
|
|
1535
|
+
var CloseSquareFillIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1536
1536
|
const { opacity = 0.54, ...rest } = props;
|
|
1537
1537
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1538
1538
|
"path",
|
|
@@ -1544,7 +1544,7 @@ var CloseSquareFillIcon = React68__namespace.default.forwardRef((props, ref) =>
|
|
|
1544
1544
|
) });
|
|
1545
1545
|
});
|
|
1546
1546
|
CloseSquareFillIcon.displayName = "CloseSquareFillIcon";
|
|
1547
|
-
var CloseCircleFillIcon =
|
|
1547
|
+
var CloseCircleFillIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1548
1548
|
const { opacity = 0.54, ...rest } = props;
|
|
1549
1549
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1550
1550
|
"path",
|
|
@@ -1556,7 +1556,7 @@ var CloseCircleFillIcon = React68__namespace.default.forwardRef((props, ref) =>
|
|
|
1556
1556
|
) });
|
|
1557
1557
|
});
|
|
1558
1558
|
CloseCircleFillIcon.displayName = "CloseCircleFillIcon";
|
|
1559
|
-
var CheckedCircleFillIcon =
|
|
1559
|
+
var CheckedCircleFillIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1560
1560
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1561
1561
|
BaseIconWithPath,
|
|
1562
1562
|
{
|
|
@@ -1567,7 +1567,7 @@ var CheckedCircleFillIcon = React68__namespace.default.forwardRef((props, ref) =
|
|
|
1567
1567
|
);
|
|
1568
1568
|
});
|
|
1569
1569
|
CheckedCircleFillIcon.displayName = "CheckedCircleFillIcon";
|
|
1570
|
-
var CheckedSquareFillIcon =
|
|
1570
|
+
var CheckedSquareFillIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1571
1571
|
const { opacity = 0.54, ...rest } = props;
|
|
1572
1572
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1573
1573
|
"path",
|
|
@@ -1581,7 +1581,7 @@ var CheckedSquareFillIcon = React68__namespace.default.forwardRef((props, ref) =
|
|
|
1581
1581
|
) });
|
|
1582
1582
|
});
|
|
1583
1583
|
CheckedSquareFillIcon.displayName = "CheckSquareFillIcon";
|
|
1584
|
-
var CheckSquareEmptyIcon =
|
|
1584
|
+
var CheckSquareEmptyIcon = React69__namespace.default.forwardRef(
|
|
1585
1585
|
(props, ref) => {
|
|
1586
1586
|
const { opacity = 0.54, ...rest } = props;
|
|
1587
1587
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1597,7 +1597,7 @@ var CheckSquareEmptyIcon = React68__namespace.default.forwardRef(
|
|
|
1597
1597
|
}
|
|
1598
1598
|
);
|
|
1599
1599
|
CheckSquareEmptyIcon.displayName = "CheckSquareEmptyIcon";
|
|
1600
|
-
var PlusIcon =
|
|
1600
|
+
var PlusIcon = React69__namespace.default.forwardRef(
|
|
1601
1601
|
(props, ref) => {
|
|
1602
1602
|
const { opacity = 0.54, ...rest } = props;
|
|
1603
1603
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1611,7 +1611,7 @@ var PlusIcon = React68__namespace.default.forwardRef(
|
|
|
1611
1611
|
}
|
|
1612
1612
|
);
|
|
1613
1613
|
PlusIcon.displayName = "PlusIcon";
|
|
1614
|
-
var ReduceIcon =
|
|
1614
|
+
var ReduceIcon = React69__namespace.default.forwardRef(
|
|
1615
1615
|
(props, ref) => {
|
|
1616
1616
|
const { opacity = 0.54, ...rest } = props;
|
|
1617
1617
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1629,7 +1629,7 @@ var ReduceIcon = React68__namespace.default.forwardRef(
|
|
|
1629
1629
|
}
|
|
1630
1630
|
);
|
|
1631
1631
|
ReduceIcon.displayName = "ReduceIcon";
|
|
1632
|
-
var CircleOutlinedIcon =
|
|
1632
|
+
var CircleOutlinedIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1633
1633
|
const { opacity = 0.54, ...rest } = props;
|
|
1634
1634
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1635
1635
|
"path",
|
|
@@ -1641,7 +1641,7 @@ var CircleOutlinedIcon = React68__namespace.default.forwardRef((props, ref) => {
|
|
|
1641
1641
|
) });
|
|
1642
1642
|
});
|
|
1643
1643
|
CircleOutlinedIcon.displayName = "CircleOutlinedIcon";
|
|
1644
|
-
var SquareOutlinedIcon =
|
|
1644
|
+
var SquareOutlinedIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1645
1645
|
const { opacity = 0.54, ...rest } = props;
|
|
1646
1646
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1647
1647
|
"path",
|
|
@@ -1653,7 +1653,7 @@ var SquareOutlinedIcon = React68__namespace.default.forwardRef((props, ref) => {
|
|
|
1653
1653
|
) });
|
|
1654
1654
|
});
|
|
1655
1655
|
SquareOutlinedIcon.displayName = "SquareOutlinedIcon";
|
|
1656
|
-
var ExclamationFillIcon =
|
|
1656
|
+
var ExclamationFillIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1657
1657
|
const { ...rest } = props;
|
|
1658
1658
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1659
1659
|
"path",
|
|
@@ -1664,7 +1664,7 @@ var ExclamationFillIcon = React68__namespace.default.forwardRef((props, ref) =>
|
|
|
1664
1664
|
) });
|
|
1665
1665
|
});
|
|
1666
1666
|
ExclamationFillIcon.displayName = "ExclamationFillIcon";
|
|
1667
|
-
var QuestionFillIcon =
|
|
1667
|
+
var QuestionFillIcon = React69__namespace.default.forwardRef(
|
|
1668
1668
|
(props, ref) => {
|
|
1669
1669
|
const { opacity = 0.54, ...rest } = props;
|
|
1670
1670
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1678,7 +1678,7 @@ var QuestionFillIcon = React68__namespace.default.forwardRef(
|
|
|
1678
1678
|
}
|
|
1679
1679
|
);
|
|
1680
1680
|
QuestionFillIcon.displayName = "ExclamationFillIcon";
|
|
1681
|
-
var ArrowLeftRightIcon =
|
|
1681
|
+
var ArrowLeftRightIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1682
1682
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1683
1683
|
BaseIconWithPath,
|
|
1684
1684
|
{
|
|
@@ -1689,7 +1689,7 @@ var ArrowLeftRightIcon = React68__namespace.default.forwardRef((props, ref) => {
|
|
|
1689
1689
|
);
|
|
1690
1690
|
});
|
|
1691
1691
|
ArrowLeftRightIcon.displayName = "ArrowLeftRightIcon";
|
|
1692
|
-
var ArrowDownUpIcon =
|
|
1692
|
+
var ArrowDownUpIcon = React69__namespace.default.forwardRef(
|
|
1693
1693
|
(props, ref) => {
|
|
1694
1694
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1695
1695
|
BaseIconWithPath,
|
|
@@ -1702,7 +1702,7 @@ var ArrowDownUpIcon = React68__namespace.default.forwardRef(
|
|
|
1702
1702
|
}
|
|
1703
1703
|
);
|
|
1704
1704
|
ArrowDownUpIcon.displayName = "ArrowDownUpIconIcon";
|
|
1705
|
-
var ArrowUpSquareFillIcon =
|
|
1705
|
+
var ArrowUpSquareFillIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1706
1706
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1707
1707
|
BaseIconWithPath,
|
|
1708
1708
|
{
|
|
@@ -1713,7 +1713,7 @@ var ArrowUpSquareFillIcon = React68__namespace.default.forwardRef((props, ref) =
|
|
|
1713
1713
|
);
|
|
1714
1714
|
});
|
|
1715
1715
|
ArrowUpSquareFillIcon.displayName = "ArrowUpSquareFillIconIcon";
|
|
1716
|
-
var ArrowDownSquareFillIcon =
|
|
1716
|
+
var ArrowDownSquareFillIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1717
1717
|
const { opacity = 0.54, ...rest } = props;
|
|
1718
1718
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1719
1719
|
"path",
|
|
@@ -1725,7 +1725,7 @@ var ArrowDownSquareFillIcon = React68__namespace.default.forwardRef((props, ref)
|
|
|
1725
1725
|
) });
|
|
1726
1726
|
});
|
|
1727
1727
|
ArrowDownSquareFillIcon.displayName = "ArrowDownSquareFillIconIcon";
|
|
1728
|
-
var ArrowLeftRightSquareFill =
|
|
1728
|
+
var ArrowLeftRightSquareFill = React69__namespace.default.forwardRef((props, ref) => {
|
|
1729
1729
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1730
1730
|
"svg",
|
|
1731
1731
|
{
|
|
@@ -1751,7 +1751,7 @@ var ArrowLeftRightSquareFill = React68__namespace.default.forwardRef((props, ref
|
|
|
1751
1751
|
if (process.env.NODE_ENV !== "production") {
|
|
1752
1752
|
ArrowLeftRightSquareFill.displayName = "ArrowLeftRightSquareFill";
|
|
1753
1753
|
}
|
|
1754
|
-
var ArrowRightUpSquareFillIcon =
|
|
1754
|
+
var ArrowRightUpSquareFillIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
1755
1755
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1756
1756
|
BaseIconWithPath,
|
|
1757
1757
|
{
|
|
@@ -1927,7 +1927,7 @@ var BattleSolidInactiveIcon = (props) => {
|
|
|
1927
1927
|
}
|
|
1928
1928
|
) });
|
|
1929
1929
|
};
|
|
1930
|
-
var FeeTierIcon =
|
|
1930
|
+
var FeeTierIcon = React69__namespace.default.forwardRef(
|
|
1931
1931
|
(props, ref) => {
|
|
1932
1932
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1933
1933
|
BaseIconWithPath,
|
|
@@ -1996,7 +1996,7 @@ var EarnInactiveIcon = (props) => {
|
|
|
1996
1996
|
)
|
|
1997
1997
|
] }) });
|
|
1998
1998
|
};
|
|
1999
|
-
var EditIcon =
|
|
1999
|
+
var EditIcon = React69__namespace.default.forwardRef(
|
|
2000
2000
|
(props, ref) => {
|
|
2001
2001
|
const { opacity = 0.54, ...rest } = props;
|
|
2002
2002
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2010,7 +2010,7 @@ var EditIcon = React68__namespace.default.forwardRef(
|
|
|
2010
2010
|
}
|
|
2011
2011
|
);
|
|
2012
2012
|
EditIcon.displayName = "EditIcon";
|
|
2013
|
-
var EyeIcon =
|
|
2013
|
+
var EyeIcon = React69__namespace.default.forwardRef(
|
|
2014
2014
|
(props, ref) => {
|
|
2015
2015
|
const { opacity = 0.54, ...rest } = props;
|
|
2016
2016
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2024,7 +2024,7 @@ var EyeIcon = React68__namespace.default.forwardRef(
|
|
|
2024
2024
|
}
|
|
2025
2025
|
);
|
|
2026
2026
|
EyeIcon.displayName = "EyeIcon";
|
|
2027
|
-
var ShareIcon =
|
|
2027
|
+
var ShareIcon = React69__namespace.default.forwardRef(
|
|
2028
2028
|
(props, ref) => {
|
|
2029
2029
|
const { opacity = 0.54, ...rest } = props;
|
|
2030
2030
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2038,7 +2038,7 @@ var ShareIcon = React68__namespace.default.forwardRef(
|
|
|
2038
2038
|
}
|
|
2039
2039
|
);
|
|
2040
2040
|
ShareIcon.displayName = "ShareIcon";
|
|
2041
|
-
var EyeCloseIcon =
|
|
2041
|
+
var EyeCloseIcon = React69__namespace.default.forwardRef(
|
|
2042
2042
|
(props, ref) => {
|
|
2043
2043
|
const { opacity = 0.54, ...rest } = props;
|
|
2044
2044
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2052,7 +2052,7 @@ var EyeCloseIcon = React68__namespace.default.forwardRef(
|
|
|
2052
2052
|
}
|
|
2053
2053
|
);
|
|
2054
2054
|
EyeCloseIcon.displayName = "EyeCloseIcon";
|
|
2055
|
-
var RefreshIcon =
|
|
2055
|
+
var RefreshIcon = React69__namespace.default.forwardRef(
|
|
2056
2056
|
(props, ref) => {
|
|
2057
2057
|
const { opacity = 0.54, ...rest } = props;
|
|
2058
2058
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2210,7 +2210,7 @@ var EsOrderlyIcon = (props) => {
|
|
|
2210
2210
|
}
|
|
2211
2211
|
);
|
|
2212
2212
|
};
|
|
2213
|
-
var InfoCircleIcon =
|
|
2213
|
+
var InfoCircleIcon = React69__namespace.default.forwardRef(
|
|
2214
2214
|
(props, ref) => {
|
|
2215
2215
|
const { className, opacity = 0.36, ...rest } = props;
|
|
2216
2216
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2237,14 +2237,14 @@ var InfoCircleIcon = React68__namespace.default.forwardRef(
|
|
|
2237
2237
|
}
|
|
2238
2238
|
);
|
|
2239
2239
|
var WalletIcon = (props) => {
|
|
2240
|
-
const url =
|
|
2240
|
+
const url = React69.useMemo(() => {
|
|
2241
2241
|
const split = props.name?.split(" ");
|
|
2242
2242
|
const formatWalletName = split?.[0]?.toLowerCase();
|
|
2243
2243
|
return `https://oss.orderly.network/static/wallet_icon/${formatWalletName}.png`;
|
|
2244
2244
|
}, [props.name]);
|
|
2245
2245
|
return /* @__PURE__ */ jsxRuntime.jsx(Avatar, { size: props.size, src: url, alt: `${props.name}` });
|
|
2246
2246
|
};
|
|
2247
|
-
var CalendarIcon =
|
|
2247
|
+
var CalendarIcon = React69__namespace.default.forwardRef(
|
|
2248
2248
|
(props, ref) => {
|
|
2249
2249
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2250
2250
|
BaseIconWithPath,
|
|
@@ -2257,7 +2257,7 @@ var CalendarIcon = React68__namespace.default.forwardRef(
|
|
|
2257
2257
|
}
|
|
2258
2258
|
);
|
|
2259
2259
|
CalendarIcon.displayName = "CaretLeftIcon";
|
|
2260
|
-
var CopyIcon =
|
|
2260
|
+
var CopyIcon = React69__namespace.default.forwardRef(
|
|
2261
2261
|
(props, ref) => {
|
|
2262
2262
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2263
2263
|
BaseIconWithPath,
|
|
@@ -2270,7 +2270,7 @@ var CopyIcon = React68__namespace.default.forwardRef(
|
|
|
2270
2270
|
}
|
|
2271
2271
|
);
|
|
2272
2272
|
CopyIcon.displayName = "CopyIcon";
|
|
2273
|
-
var ServerFillIcon =
|
|
2273
|
+
var ServerFillIcon = React69__namespace.default.forwardRef(
|
|
2274
2274
|
(props, ref) => {
|
|
2275
2275
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2276
2276
|
BaseIconWithPath,
|
|
@@ -2283,7 +2283,7 @@ var ServerFillIcon = React68__namespace.default.forwardRef(
|
|
|
2283
2283
|
}
|
|
2284
2284
|
);
|
|
2285
2285
|
ServerFillIcon.displayName = "ServerFillIcon";
|
|
2286
|
-
var SortingAscIcon =
|
|
2286
|
+
var SortingAscIcon = React69__namespace.default.forwardRef(
|
|
2287
2287
|
(props, ref) => {
|
|
2288
2288
|
const { opacity = 0.54, ...rest } = props;
|
|
2289
2289
|
return /* @__PURE__ */ jsxRuntime.jsxs(BaseIcon, { ref, ...rest, children: [
|
|
@@ -2307,7 +2307,7 @@ var SortingAscIcon = React68__namespace.default.forwardRef(
|
|
|
2307
2307
|
}
|
|
2308
2308
|
);
|
|
2309
2309
|
SortingAscIcon.displayName = "SortingAscIcon";
|
|
2310
|
-
var SortingDescIcon =
|
|
2310
|
+
var SortingDescIcon = React69__namespace.default.forwardRef(
|
|
2311
2311
|
(props, ref) => {
|
|
2312
2312
|
const { opacity = 0.54, ...rest } = props;
|
|
2313
2313
|
return /* @__PURE__ */ jsxRuntime.jsxs(BaseIcon, { ref, ...rest, children: [
|
|
@@ -2331,7 +2331,7 @@ var SortingDescIcon = React68__namespace.default.forwardRef(
|
|
|
2331
2331
|
}
|
|
2332
2332
|
);
|
|
2333
2333
|
SortingDescIcon.displayName = "SortingDescIcon";
|
|
2334
|
-
var ArrowUpShortIcon =
|
|
2334
|
+
var ArrowUpShortIcon = React69__namespace.default.forwardRef(
|
|
2335
2335
|
(props, ref) => {
|
|
2336
2336
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2337
2337
|
BaseIconWithPath,
|
|
@@ -2343,7 +2343,7 @@ var ArrowUpShortIcon = React68__namespace.default.forwardRef(
|
|
|
2343
2343
|
);
|
|
2344
2344
|
}
|
|
2345
2345
|
);
|
|
2346
|
-
var ArrowDownShortIcon =
|
|
2346
|
+
var ArrowDownShortIcon = React69__namespace.default.forwardRef(
|
|
2347
2347
|
(props, ref) => {
|
|
2348
2348
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2349
2349
|
BaseIconWithPath,
|
|
@@ -2355,7 +2355,7 @@ var ArrowDownShortIcon = React68__namespace.default.forwardRef(
|
|
|
2355
2355
|
);
|
|
2356
2356
|
}
|
|
2357
2357
|
);
|
|
2358
|
-
var ArrowLeftShortIcon =
|
|
2358
|
+
var ArrowLeftShortIcon = React69__namespace.default.forwardRef(
|
|
2359
2359
|
(props, ref) => {
|
|
2360
2360
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2361
2361
|
BaseIconWithPath,
|
|
@@ -2367,7 +2367,7 @@ var ArrowLeftShortIcon = React68__namespace.default.forwardRef(
|
|
|
2367
2367
|
);
|
|
2368
2368
|
}
|
|
2369
2369
|
);
|
|
2370
|
-
var ArrowRightShortIcon =
|
|
2370
|
+
var ArrowRightShortIcon = React69__namespace.default.forwardRef(
|
|
2371
2371
|
(props, ref) => {
|
|
2372
2372
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2373
2373
|
BaseIconWithPath,
|
|
@@ -2383,7 +2383,7 @@ ArrowUpShortIcon.displayName = "ArrowUpShortIcon";
|
|
|
2383
2383
|
ArrowDownShortIcon.displayName = "ArrowDownShortIcon";
|
|
2384
2384
|
ArrowLeftShortIcon.displayName = "ArrowLeftShortIcon";
|
|
2385
2385
|
ArrowRightShortIcon.displayName = "ArrowRightShortIcon";
|
|
2386
|
-
var SortingIcon =
|
|
2386
|
+
var SortingIcon = React69__namespace.default.forwardRef(
|
|
2387
2387
|
(props, ref) => {
|
|
2388
2388
|
const { opacity = 0.54, ...rest } = props;
|
|
2389
2389
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3429,7 +3429,7 @@ var StarChildChatInactiveIcon = (props) => {
|
|
|
3429
3429
|
)
|
|
3430
3430
|
] });
|
|
3431
3431
|
};
|
|
3432
|
-
var CloseRoundFillIcon =
|
|
3432
|
+
var CloseRoundFillIcon = React69__namespace.default.forwardRef((props, ref) => {
|
|
3433
3433
|
const { opacity = 0.54, ...rest } = props;
|
|
3434
3434
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, viewBox: "0 0 28 28", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3435
3435
|
"path",
|
|
@@ -3629,7 +3629,7 @@ function EmptyStateIcon() {
|
|
|
3629
3629
|
);
|
|
3630
3630
|
}
|
|
3631
3631
|
var emptyData_default = EmptyStateIcon;
|
|
3632
|
-
var VectorIcon =
|
|
3632
|
+
var VectorIcon = React69__namespace.default.forwardRef(
|
|
3633
3633
|
(props, ref) => {
|
|
3634
3634
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3635
3635
|
"svg",
|
|
@@ -3727,7 +3727,7 @@ var PersonIcon = () => {
|
|
|
3727
3727
|
}
|
|
3728
3728
|
);
|
|
3729
3729
|
};
|
|
3730
|
-
var SettingFillIcon =
|
|
3730
|
+
var SettingFillIcon = React69__namespace.default.forwardRef(
|
|
3731
3731
|
(props, ref) => {
|
|
3732
3732
|
const { opacity = 0.54, ...rest } = props;
|
|
3733
3733
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3762,7 +3762,7 @@ var TradingLeftNavIcon = (props) => {
|
|
|
3762
3762
|
}
|
|
3763
3763
|
);
|
|
3764
3764
|
};
|
|
3765
|
-
var VaultsIcon =
|
|
3765
|
+
var VaultsIcon = React69__namespace.default.forwardRef(
|
|
3766
3766
|
(props, ref) => {
|
|
3767
3767
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3768
3768
|
"svg",
|
|
@@ -3787,7 +3787,7 @@ var VaultsIcon = React68__namespace.default.forwardRef(
|
|
|
3787
3787
|
if (process.env.NODE_ENV !== "production") {
|
|
3788
3788
|
VaultsIcon.displayName = "VaultsIcon";
|
|
3789
3789
|
}
|
|
3790
|
-
var LeftNavVaultsIcon =
|
|
3790
|
+
var LeftNavVaultsIcon = React69.forwardRef(
|
|
3791
3791
|
(props, ref) => {
|
|
3792
3792
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3793
3793
|
"svg",
|
|
@@ -3833,7 +3833,7 @@ var LeftNavVaultsIcon = React68.forwardRef(
|
|
|
3833
3833
|
if (process.env.NODE_ENV !== "production") {
|
|
3834
3834
|
LeftNavVaultsIcon.displayName = "LeftNavVaultsIcon";
|
|
3835
3835
|
}
|
|
3836
|
-
var NewsFillIcon =
|
|
3836
|
+
var NewsFillIcon = React69__namespace.default.forwardRef(
|
|
3837
3837
|
(props, ref) => {
|
|
3838
3838
|
const { opacity = 1, ...rest } = props;
|
|
3839
3839
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3847,7 +3847,7 @@ var NewsFillIcon = React68__namespace.default.forwardRef(
|
|
|
3847
3847
|
}
|
|
3848
3848
|
);
|
|
3849
3849
|
NewsFillIcon.displayName = "NewsFillIcon";
|
|
3850
|
-
var BellIcon =
|
|
3850
|
+
var BellIcon = React69__namespace.default.forwardRef(
|
|
3851
3851
|
(props, ref) => {
|
|
3852
3852
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3853
3853
|
BaseIconWithPath,
|
|
@@ -3928,7 +3928,7 @@ var ReferralSolidIcon = (props) => {
|
|
|
3928
3928
|
}
|
|
3929
3929
|
) });
|
|
3930
3930
|
};
|
|
3931
|
-
var AddCircleIcon =
|
|
3931
|
+
var AddCircleIcon = React69__namespace.default.forwardRef(
|
|
3932
3932
|
(props, ref) => {
|
|
3933
3933
|
const { className, opacity = 0.54, ...rest } = props;
|
|
3934
3934
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3964,6 +3964,20 @@ var AddCircleIcon = React68__namespace.default.forwardRef(
|
|
|
3964
3964
|
}
|
|
3965
3965
|
);
|
|
3966
3966
|
AddCircleIcon.displayName = "AddCircleIcon";
|
|
3967
|
+
var RwaIcon = React69__namespace.default.forwardRef(
|
|
3968
|
+
(props, ref) => {
|
|
3969
|
+
const { opacity = 1, ...rest } = props;
|
|
3970
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, ...rest, viewBox: "0 0 12 12", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3971
|
+
"path",
|
|
3972
|
+
{
|
|
3973
|
+
d: "M6 1a5 5 0 0 1 4.999 5H11l-.002.047-.002.121a5 5 0 0 1-.049.552 5 5 0 0 1-.596 1.742l-.025.044-.086.143-.023.035q-.044.072-.093.142l-.021.03q-.145.208-.31.4l-.071.082a5 5 0 0 1-.403.4l-.074.064-.1.085-.063.049q-.056.044-.114.087l-.052.037q-.31.223-.656.399l-.01.006A5 5 0 0 1 6 11a5 5 0 0 1-3.582-1.511L1.5 10.5.75 7.25l3.25.5-.906.996A4 4 0 0 0 6 10c.834 0 1.609-.256 2.25-.693v-.002c.381-.272.718-.6 1-.975a8 8 0 0 0-1-.19 8 8 0 0 1-.151.57.244.244 0 0 1-.302.16l-.481-.138a.256.256 0 0 1-.172-.32q.051-.177.101-.367c-.172 0-.343-.014-.52-.024a.26.26 0 0 1-.245-.256V7.25c0-.138.112-.25.25-.249.237.002.469.01.695.044Q7.492 6.524 7.5 6q0-.532-.06-1.06C7 5 6.5 5 6 5s-.975 0-1.44-.055Q4.495 5.47 4.5 6v.187a.247.247 0 0 1-.272.246 17 17 0 0 1-.515-.062.25.25 0 0 1-.213-.246V6a10 10 0 0 1 .06-1.155 8 8 0 0 1-1.295-.27c-.18.453-.27.687-.265 1.175v.01c0 .16-.147.278-.302.243q-.255-.057-.5-.116a.24.24 0 0 1-.187-.25A5 5 0 0 1 6 1m3.73 3.581a9 9 0 0 1-1.3.259 9.7 9.7 0 0 1 0 2.315q.665.078 1.31.264c.144-.38.233-.787.255-1.213L10 6a3.8 3.8 0 0 0-.27-1.419M6 2c-.47 0-1 .83-1.275 1.955C5.13 4 5.555 4 6 4s.865 0 1.27-.035C7 2.795 6.46 2 6 2m-1.772.413a4 4 0 0 0-1.493 1.262q.495.122 1 .19c.098-.504.264-.992.493-1.452m3.548 0q.326.7.499 1.452.505-.066 1-.185a4.4 4.4 0 0 0-1.499-1.266",
|
|
3974
|
+
fill: "currentColor",
|
|
3975
|
+
fillOpacity: opacity
|
|
3976
|
+
}
|
|
3977
|
+
) });
|
|
3978
|
+
}
|
|
3979
|
+
);
|
|
3980
|
+
RwaIcon.displayName = "RwaIcon";
|
|
3967
3981
|
|
|
3968
3982
|
// src/icon/index.ts
|
|
3969
3983
|
var Icon = BaseIcon;
|
|
@@ -4021,7 +4035,7 @@ var textVariants = tv({
|
|
|
4021
4035
|
}
|
|
4022
4036
|
}
|
|
4023
4037
|
});
|
|
4024
|
-
var Text =
|
|
4038
|
+
var Text = React69__namespace.default.forwardRef((props, forwardedRef) => {
|
|
4025
4039
|
const {
|
|
4026
4040
|
children,
|
|
4027
4041
|
className,
|
|
@@ -4110,7 +4124,7 @@ var isTextRule = (rule) => {
|
|
|
4110
4124
|
};
|
|
4111
4125
|
var DEFAULT_SYMBOL_FORMAT = "base-quote";
|
|
4112
4126
|
var DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
|
4113
|
-
var FormattedText =
|
|
4127
|
+
var FormattedText = React69__namespace.default.forwardRef(
|
|
4114
4128
|
(props, ref) => {
|
|
4115
4129
|
const {
|
|
4116
4130
|
rule,
|
|
@@ -4135,13 +4149,13 @@ var FormattedText = React68__namespace.default.forwardRef(
|
|
|
4135
4149
|
isIcon,
|
|
4136
4150
|
...rest
|
|
4137
4151
|
} = props;
|
|
4138
|
-
const prefixElement =
|
|
4152
|
+
const prefixElement = React69.useMemo(() => {
|
|
4139
4153
|
if (rule === "symbol" && showIcon) {
|
|
4140
4154
|
return /* @__PURE__ */ jsxRuntime.jsx(TokenIcon, { symbol: children, size: iconSize });
|
|
4141
4155
|
}
|
|
4142
4156
|
return prefix;
|
|
4143
4157
|
}, [prefix, showIcon, rule, iconSize, children]);
|
|
4144
|
-
const suffix =
|
|
4158
|
+
const suffix = React69.useMemo(() => {
|
|
4145
4159
|
if (typeof props.suffix !== "undefined") {
|
|
4146
4160
|
return props.suffix;
|
|
4147
4161
|
}
|
|
@@ -4160,7 +4174,7 @@ var FormattedText = React68__namespace.default.forwardRef(
|
|
|
4160
4174
|
);
|
|
4161
4175
|
}
|
|
4162
4176
|
}, [props.suffix, copyable, children]);
|
|
4163
|
-
const content =
|
|
4177
|
+
const content = React69.useMemo(() => {
|
|
4164
4178
|
if (typeof children === "undefined") {
|
|
4165
4179
|
return "--";
|
|
4166
4180
|
}
|
|
@@ -4192,7 +4206,7 @@ var FormattedText = React68__namespace.default.forwardRef(
|
|
|
4192
4206
|
}
|
|
4193
4207
|
return children;
|
|
4194
4208
|
}, [children, rule, formatString, range, symbolElement]);
|
|
4195
|
-
const contentWithFix =
|
|
4209
|
+
const contentWithFix = React69.useMemo(() => {
|
|
4196
4210
|
if (typeof suffix === "undefined" && typeof prefixElement === "undefined") {
|
|
4197
4211
|
return content;
|
|
4198
4212
|
}
|
|
@@ -4222,7 +4236,7 @@ var gradientTextVariants = tv({
|
|
|
4222
4236
|
}
|
|
4223
4237
|
}
|
|
4224
4238
|
});
|
|
4225
|
-
var GradientText =
|
|
4239
|
+
var GradientText = React69__namespace.default.forwardRef((props, ref) => {
|
|
4226
4240
|
const { color, className, angle, ...rest } = props;
|
|
4227
4241
|
const style = parseAngleProps({ angle });
|
|
4228
4242
|
return (
|
|
@@ -4265,7 +4279,7 @@ var Numeral = (props) => {
|
|
|
4265
4279
|
...rest
|
|
4266
4280
|
} = props;
|
|
4267
4281
|
const num = Number(props.children);
|
|
4268
|
-
const child =
|
|
4282
|
+
const child = React69.useMemo(() => {
|
|
4269
4283
|
if (props.children === "-") return props.children;
|
|
4270
4284
|
if (isNaN(num)) return placeholder ?? "--";
|
|
4271
4285
|
if (typeof visible !== "undefined" && !visible) return masking ?? "*****";
|
|
@@ -4285,7 +4299,7 @@ var Numeral = (props) => {
|
|
|
4285
4299
|
});
|
|
4286
4300
|
}, [num, visible, tick, dp]);
|
|
4287
4301
|
const defaultColor = rest.color || "inherit";
|
|
4288
|
-
const colorName =
|
|
4302
|
+
const colorName = React69.useMemo(() => {
|
|
4289
4303
|
if (!coloring) return defaultColor;
|
|
4290
4304
|
if (typeof visible !== "undefined" && !visible) return defaultColor;
|
|
4291
4305
|
if (Number.isNaN(num)) {
|
|
@@ -4295,7 +4309,7 @@ var Numeral = (props) => {
|
|
|
4295
4309
|
if (num < 0) return "lose";
|
|
4296
4310
|
return "profit";
|
|
4297
4311
|
}, [coloring, num, rest.color, props.visible]);
|
|
4298
|
-
const identifier =
|
|
4312
|
+
const identifier = React69.useMemo(() => {
|
|
4299
4313
|
if (!showIdentifier || Number.isNaN(num) || num === 0) return null;
|
|
4300
4314
|
if (typeof visible !== "undefined" && !visible) return null;
|
|
4301
4315
|
if (num < 0) {
|
|
@@ -4305,7 +4319,7 @@ var Numeral = (props) => {
|
|
|
4305
4319
|
if (identifiers?.profit) return identifiers.profit;
|
|
4306
4320
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: "+" });
|
|
4307
4321
|
}, [num, props.visible, showIdentifier]);
|
|
4308
|
-
const childWithUnit =
|
|
4322
|
+
const childWithUnit = React69.useMemo(() => {
|
|
4309
4323
|
if (typeof suffix === "undefined" && typeof prefix === "undefined" && typeof unit === "undefined" && typeof currency === "undefined" && !showIdentifier) {
|
|
4310
4324
|
return child;
|
|
4311
4325
|
}
|
|
@@ -4390,7 +4404,7 @@ var statisticVariants = tv({
|
|
|
4390
4404
|
// color: "default",
|
|
4391
4405
|
}
|
|
4392
4406
|
});
|
|
4393
|
-
var StatisticLabel =
|
|
4407
|
+
var StatisticLabel = React69__namespace.default.forwardRef(
|
|
4394
4408
|
(props, ref) => {
|
|
4395
4409
|
const { label: labelClassName } = statisticVariants({});
|
|
4396
4410
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4406,10 +4420,10 @@ var StatisticLabel = React68__namespace.default.forwardRef(
|
|
|
4406
4420
|
}
|
|
4407
4421
|
);
|
|
4408
4422
|
StatisticLabel.displayName = "StatisticLabel";
|
|
4409
|
-
var Statistic =
|
|
4423
|
+
var Statistic = React69__namespace.default.forwardRef((props, ref) => {
|
|
4410
4424
|
const { label, valueProps, align, className, classNames, children, ...rest } = props;
|
|
4411
4425
|
const { root, value: valueClassName } = statisticVariants({ align });
|
|
4412
|
-
const value =
|
|
4426
|
+
const value = React69.useMemo(() => {
|
|
4413
4427
|
if (typeof children === "string" || typeof children === "number") {
|
|
4414
4428
|
const { className: valueClass, as, ...restValueProps } = valueProps ?? {};
|
|
4415
4429
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4453,7 +4467,7 @@ Text2.pnl = NumTypePnl;
|
|
|
4453
4467
|
Text2.notional = NumTypeNotional;
|
|
4454
4468
|
Text2.assetValue = NumTypeAssetValue;
|
|
4455
4469
|
Text2.collateral = NumTypeCollateral;
|
|
4456
|
-
var BaseInput =
|
|
4470
|
+
var BaseInput = React69.forwardRef(
|
|
4457
4471
|
(props, ref) => {
|
|
4458
4472
|
const {
|
|
4459
4473
|
clearable,
|
|
@@ -4470,14 +4484,14 @@ var BaseInput = React68.forwardRef(
|
|
|
4470
4484
|
value,
|
|
4471
4485
|
...inputProps
|
|
4472
4486
|
} = props;
|
|
4473
|
-
const [cursor, setCursor] =
|
|
4474
|
-
const innerInputRef =
|
|
4475
|
-
const prevInputValue =
|
|
4476
|
-
const isFocused =
|
|
4477
|
-
const innerFormatters =
|
|
4487
|
+
const [cursor, setCursor] = React69.useState(null);
|
|
4488
|
+
const innerInputRef = React69.useRef(null);
|
|
4489
|
+
const prevInputValue = React69.useRef(null);
|
|
4490
|
+
const isFocused = React69.useRef(false);
|
|
4491
|
+
const innerFormatters = React69.useMemo(() => {
|
|
4478
4492
|
return formatters ?? [];
|
|
4479
4493
|
}, [formatters]);
|
|
4480
|
-
|
|
4494
|
+
React69.useEffect(() => {
|
|
4481
4495
|
if (!ref) return;
|
|
4482
4496
|
if (typeof ref === "function") {
|
|
4483
4497
|
ref(innerInputRef.current);
|
|
@@ -4485,7 +4499,7 @@ var BaseInput = React68.forwardRef(
|
|
|
4485
4499
|
ref.current = innerInputRef.current;
|
|
4486
4500
|
}
|
|
4487
4501
|
}, [innerInputRef, ref]);
|
|
4488
|
-
const formatToRender =
|
|
4502
|
+
const formatToRender = React69.useCallback(
|
|
4489
4503
|
(value2) => {
|
|
4490
4504
|
if (!Array.isArray(innerFormatters) || innerFormatters.length === 0)
|
|
4491
4505
|
return value2;
|
|
@@ -4501,7 +4515,7 @@ var BaseInput = React68.forwardRef(
|
|
|
4501
4515
|
},
|
|
4502
4516
|
[innerFormatters]
|
|
4503
4517
|
);
|
|
4504
|
-
const formatToChange =
|
|
4518
|
+
const formatToChange = React69.useCallback(
|
|
4505
4519
|
(value2, originValue) => {
|
|
4506
4520
|
if (!Array.isArray(innerFormatters) || innerFormatters.length === 0)
|
|
4507
4521
|
return value2;
|
|
@@ -4518,11 +4532,11 @@ var BaseInput = React68.forwardRef(
|
|
|
4518
4532
|
},
|
|
4519
4533
|
[innerFormatters]
|
|
4520
4534
|
);
|
|
4521
|
-
const formattedValue =
|
|
4535
|
+
const formattedValue = React69.useMemo(() => {
|
|
4522
4536
|
if (typeof value === "undefined" || value === null) return "";
|
|
4523
4537
|
return formatToRender(value);
|
|
4524
4538
|
}, [value, formatToRender]);
|
|
4525
|
-
|
|
4539
|
+
React69.useEffect(() => {
|
|
4526
4540
|
if (document.activeElement !== innerInputRef.current) return;
|
|
4527
4541
|
const nextValueLen = `${formattedValue}`.length;
|
|
4528
4542
|
const prevValueLen = prevInputValue.current?.length || 0;
|
|
@@ -4744,7 +4758,7 @@ var inputVariants = tv(
|
|
|
4744
4758
|
responsiveVariants: ["md", "lg"]
|
|
4745
4759
|
}
|
|
4746
4760
|
);
|
|
4747
|
-
var Input =
|
|
4761
|
+
var Input = React69__namespace.default.forwardRef((props, ref) => {
|
|
4748
4762
|
const {
|
|
4749
4763
|
size,
|
|
4750
4764
|
disabled,
|
|
@@ -4771,7 +4785,7 @@ var Input = React68__namespace.default.forwardRef((props, ref) => {
|
|
|
4771
4785
|
pl: typeof prefix === "undefined" || pl,
|
|
4772
4786
|
pr: typeof suffix === "undefined" || pr
|
|
4773
4787
|
});
|
|
4774
|
-
const cid =
|
|
4788
|
+
const cid = React69.useId();
|
|
4775
4789
|
const suffixElement = typeof onClear !== "undefined" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4776
4790
|
ClearButton,
|
|
4777
4791
|
{
|
|
@@ -4815,7 +4829,7 @@ var Input = React68__namespace.default.forwardRef((props, ref) => {
|
|
|
4815
4829
|
)
|
|
4816
4830
|
] });
|
|
4817
4831
|
});
|
|
4818
|
-
var ClearButton =
|
|
4832
|
+
var ClearButton = React69__namespace.default.forwardRef((props, ref) => {
|
|
4819
4833
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4820
4834
|
"button",
|
|
4821
4835
|
{
|
|
@@ -4876,7 +4890,7 @@ var popoverVariants = tv({
|
|
|
4876
4890
|
var PopoverRoot = PopoverPrimitive__namespace.Root;
|
|
4877
4891
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
4878
4892
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
4879
|
-
var PopoverContent =
|
|
4893
|
+
var PopoverContent = React69__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4880
4894
|
PopoverPrimitive__namespace.Content,
|
|
4881
4895
|
{
|
|
4882
4896
|
ref,
|
|
@@ -4927,7 +4941,7 @@ var scrollAreaVariants = tv({
|
|
|
4927
4941
|
}
|
|
4928
4942
|
}
|
|
4929
4943
|
});
|
|
4930
|
-
var ScrollArea =
|
|
4944
|
+
var ScrollArea = React69__namespace.default.forwardRef((oriProps, ref) => {
|
|
4931
4945
|
const {
|
|
4932
4946
|
className,
|
|
4933
4947
|
classNames,
|
|
@@ -4957,7 +4971,7 @@ var ScrollArea = React68__namespace.default.forwardRef((oriProps, ref) => {
|
|
|
4957
4971
|
);
|
|
4958
4972
|
});
|
|
4959
4973
|
ScrollArea.displayName = ScrollAreaPrimitive__namespace.Root.displayName;
|
|
4960
|
-
var ScrollBar =
|
|
4974
|
+
var ScrollBar = React69__namespace.default.forwardRef((oriProps, ref) => {
|
|
4961
4975
|
const { className, orientation = "vertical", ...props } = oriProps;
|
|
4962
4976
|
const { bar, tumb } = scrollAreaVariants({ className, orientation });
|
|
4963
4977
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5130,7 +5144,7 @@ var selectVariants = tv(
|
|
|
5130
5144
|
var SelectRoot = SelectPrimitive__namespace.Root;
|
|
5131
5145
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
5132
5146
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
5133
|
-
var SelectTrigger =
|
|
5147
|
+
var SelectTrigger = React69__namespace.forwardRef(
|
|
5134
5148
|
({
|
|
5135
5149
|
className,
|
|
5136
5150
|
children,
|
|
@@ -5184,7 +5198,7 @@ var SelectTrigger = React68__namespace.forwardRef(
|
|
|
5184
5198
|
}
|
|
5185
5199
|
);
|
|
5186
5200
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
5187
|
-
var SelectScrollUpButton =
|
|
5201
|
+
var SelectScrollUpButton = React69__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5188
5202
|
const { scrollUpButton } = selectVariants();
|
|
5189
5203
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5190
5204
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
@@ -5197,7 +5211,7 @@ var SelectScrollUpButton = React68__namespace.forwardRef(({ className, ...props
|
|
|
5197
5211
|
);
|
|
5198
5212
|
});
|
|
5199
5213
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
5200
|
-
var SelectScrollDownButton =
|
|
5214
|
+
var SelectScrollDownButton = React69__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5201
5215
|
const { scrollDownButton } = selectVariants();
|
|
5202
5216
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5203
5217
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
@@ -5210,7 +5224,7 @@ var SelectScrollDownButton = React68__namespace.forwardRef(({ className, ...prop
|
|
|
5210
5224
|
);
|
|
5211
5225
|
});
|
|
5212
5226
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
5213
|
-
var SelectContent =
|
|
5227
|
+
var SelectContent = React69__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
|
|
5214
5228
|
const { content, viewport } = selectVariants({ position, className });
|
|
5215
5229
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5216
5230
|
SelectPrimitive__namespace.Content,
|
|
@@ -5224,7 +5238,7 @@ var SelectContent = React68__namespace.forwardRef(({ className, children, positi
|
|
|
5224
5238
|
) });
|
|
5225
5239
|
});
|
|
5226
5240
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
5227
|
-
var SelectLabel =
|
|
5241
|
+
var SelectLabel = React69__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5228
5242
|
const { label } = selectVariants();
|
|
5229
5243
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5230
5244
|
SelectPrimitive__namespace.Label,
|
|
@@ -5236,12 +5250,12 @@ var SelectLabel = React68__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
5236
5250
|
);
|
|
5237
5251
|
});
|
|
5238
5252
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
5239
|
-
var SelectItem =
|
|
5253
|
+
var SelectItem = React69__namespace.forwardRef(({ className, children, size, ...props }, ref) => {
|
|
5240
5254
|
const { item } = selectVariants({ size });
|
|
5241
5255
|
return /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Item, { ref, className: item({ className }), ...props, children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children }) });
|
|
5242
5256
|
});
|
|
5243
5257
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
5244
|
-
var SelectSeparator =
|
|
5258
|
+
var SelectSeparator = React69__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
5245
5259
|
const { separator } = selectVariants();
|
|
5246
5260
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5247
5261
|
SelectPrimitive__namespace.Separator,
|
|
@@ -5255,17 +5269,17 @@ var SelectSeparator = React68__namespace.forwardRef(({ className, ...props }, re
|
|
|
5255
5269
|
SelectSeparator.displayName = SelectPrimitive__namespace.Separator.displayName;
|
|
5256
5270
|
var CombineSelect = (props) => {
|
|
5257
5271
|
const { options, variant, valueFormatter, ...rest } = props;
|
|
5258
|
-
const [keyword, setKeyword] =
|
|
5259
|
-
const [value, setValue] =
|
|
5272
|
+
const [keyword, setKeyword] = React69.useState("");
|
|
5273
|
+
const [value, setValue] = React69.useState(props.value ?? "");
|
|
5260
5274
|
const { trigger } = selectVariants({
|
|
5261
5275
|
size: props.size,
|
|
5262
5276
|
variant
|
|
5263
5277
|
});
|
|
5264
|
-
const [selectedIndex, setSelectedIndex] =
|
|
5278
|
+
const [selectedIndex, setSelectedIndex] = React69.useState(
|
|
5265
5279
|
() => typeof props.value === "undefined" ? -1 : options.findIndex((option) => option.value === props.value)
|
|
5266
5280
|
);
|
|
5267
|
-
const [focused, setFocused] =
|
|
5268
|
-
const inputRef =
|
|
5281
|
+
const [focused, setFocused] = React69.useState(false);
|
|
5282
|
+
const inputRef = React69.useRef(null);
|
|
5269
5283
|
const onFocus = () => {
|
|
5270
5284
|
setFocused(true);
|
|
5271
5285
|
};
|
|
@@ -5435,7 +5449,7 @@ var SelectWithOptions = (props) => {
|
|
|
5435
5449
|
...rest
|
|
5436
5450
|
} = props;
|
|
5437
5451
|
return /* @__PURE__ */ jsxRuntime.jsx(Select, { ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(SelectGroup, { children: options.map((option, index) => {
|
|
5438
|
-
return
|
|
5452
|
+
return React69__namespace.default.cloneElement(optionRenderer(option, currentValue), {
|
|
5439
5453
|
size: props.size,
|
|
5440
5454
|
key: index,
|
|
5441
5455
|
index
|
|
@@ -5445,7 +5459,7 @@ var SelectWithOptions = (props) => {
|
|
|
5445
5459
|
var TokenSelect = (props) => {
|
|
5446
5460
|
const { tokens, showIcon = true, iconSize, showCaret, ...rest } = props;
|
|
5447
5461
|
const { icon } = selectVariants();
|
|
5448
|
-
const options =
|
|
5462
|
+
const options = React69.useMemo(() => {
|
|
5449
5463
|
return tokens.map((token) => {
|
|
5450
5464
|
return {
|
|
5451
5465
|
...token,
|
|
@@ -5521,16 +5535,16 @@ var Select2 = Select;
|
|
|
5521
5535
|
Select2.options = SelectWithOptions;
|
|
5522
5536
|
Select2.combine = CombineSelect;
|
|
5523
5537
|
Select2.tokens = TokenSelect;
|
|
5524
|
-
var QuantityInput =
|
|
5538
|
+
var QuantityInput = React69.forwardRef(
|
|
5525
5539
|
(props, ref) => {
|
|
5526
5540
|
const { tokens, ...rest } = props;
|
|
5527
|
-
const [token, setToken] =
|
|
5528
|
-
const tokenOptions =
|
|
5541
|
+
const [token, setToken] = React69.useState(tokens[0]);
|
|
5542
|
+
const tokenOptions = React69.useMemo(() => {
|
|
5529
5543
|
return props.tokens.map((token2) => ({
|
|
5530
5544
|
name: token2
|
|
5531
5545
|
}));
|
|
5532
5546
|
}, [props.tokens]);
|
|
5533
|
-
const inputRef =
|
|
5547
|
+
const inputRef = React69.useRef(null);
|
|
5534
5548
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5535
5549
|
Input,
|
|
5536
5550
|
{
|
|
@@ -5596,7 +5610,7 @@ var tooltipVariants = tv({
|
|
|
5596
5610
|
"data-[side=top]:oui-slide-in-from-bottom-2"
|
|
5597
5611
|
]
|
|
5598
5612
|
});
|
|
5599
|
-
var TooltipContent =
|
|
5613
|
+
var TooltipContent = React69__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
|
5600
5614
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5601
5615
|
TooltipPrimitive__namespace.Content,
|
|
5602
5616
|
{
|
|
@@ -5627,7 +5641,7 @@ var TooltipArrow = (props) => {
|
|
|
5627
5641
|
}
|
|
5628
5642
|
);
|
|
5629
5643
|
};
|
|
5630
|
-
var Tooltip =
|
|
5644
|
+
var Tooltip = React69__namespace.forwardRef((originalProps, ref) => {
|
|
5631
5645
|
const {
|
|
5632
5646
|
children,
|
|
5633
5647
|
content,
|
|
@@ -5659,10 +5673,10 @@ var Tooltip = React68__namespace.forwardRef((originalProps, ref) => {
|
|
|
5659
5673
|
);
|
|
5660
5674
|
});
|
|
5661
5675
|
Tooltip.displayName = "Tooltip";
|
|
5662
|
-
var InputWithTooltip =
|
|
5676
|
+
var InputWithTooltip = React69.forwardRef((props, ref) => {
|
|
5663
5677
|
const { tooltip, tooltipProps, triggerClassName, ...inputProps } = props;
|
|
5664
|
-
const [open, setOpen] =
|
|
5665
|
-
|
|
5678
|
+
const [open, setOpen] = React69.useState(false);
|
|
5679
|
+
React69.useEffect(() => {
|
|
5666
5680
|
if (typeof tooltip !== "undefined" && tooltip !== "" && tooltip !== null) {
|
|
5667
5681
|
setOpen(true);
|
|
5668
5682
|
} else {
|
|
@@ -5859,7 +5873,7 @@ var inputHelpTextVariants = tailwindVariants.tv({
|
|
|
5859
5873
|
}
|
|
5860
5874
|
}
|
|
5861
5875
|
});
|
|
5862
|
-
var InputHelpText =
|
|
5876
|
+
var InputHelpText = React69__namespace.default.forwardRef(
|
|
5863
5877
|
(props, ref) => {
|
|
5864
5878
|
const { className, asChild, color, ...rest } = props;
|
|
5865
5879
|
const Comp = asChild ? reactSlot.Slot : "div";
|
|
@@ -5897,7 +5911,7 @@ var textFieldVariants = tv({
|
|
|
5897
5911
|
direction: "column"
|
|
5898
5912
|
}
|
|
5899
5913
|
});
|
|
5900
|
-
var TextField =
|
|
5914
|
+
var TextField = React69__namespace.default.forwardRef((props, ref) => {
|
|
5901
5915
|
const { label, helpText, direction, className, ...inputProps } = props;
|
|
5902
5916
|
const { root, label: labelClassName } = textFieldVariants({ direction });
|
|
5903
5917
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: root({ className, direction }), children: [
|
|
@@ -5915,7 +5929,7 @@ var TextField = React68__namespace.default.forwardRef((props, ref) => {
|
|
|
5915
5929
|
] });
|
|
5916
5930
|
});
|
|
5917
5931
|
TextField.displayName = "TextField";
|
|
5918
|
-
var InputLabel =
|
|
5932
|
+
var InputLabel = React69__namespace.default.forwardRef(
|
|
5919
5933
|
(props, ref) => {
|
|
5920
5934
|
const { asChild = false, className, ...rest } = props;
|
|
5921
5935
|
const Comp = asChild ? reactSlot.Slot : "label";
|
|
@@ -5967,7 +5981,7 @@ var checkboxVariants = tailwindVariants.tv({
|
|
|
5967
5981
|
// style: "checkBox",
|
|
5968
5982
|
}
|
|
5969
5983
|
});
|
|
5970
|
-
var Checkbox =
|
|
5984
|
+
var Checkbox = React69__namespace.forwardRef(({ className, color = "white", variant = "checkBox", ...props }, ref) => {
|
|
5971
5985
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5972
5986
|
CheckboxPrimitive__namespace.Root,
|
|
5973
5987
|
{
|
|
@@ -6095,7 +6109,7 @@ var switchVariants = tailwindVariants.tv({
|
|
|
6095
6109
|
color: "primary"
|
|
6096
6110
|
}
|
|
6097
6111
|
});
|
|
6098
|
-
var Switch =
|
|
6112
|
+
var Switch = React69__namespace.default.forwardRef(({ className, color, ...props }, ref) => {
|
|
6099
6113
|
const { root, thumb } = switchVariants({
|
|
6100
6114
|
className,
|
|
6101
6115
|
color
|
|
@@ -6216,7 +6230,7 @@ function Badge({ className, variant, color, size, ...props }) {
|
|
|
6216
6230
|
}
|
|
6217
6231
|
);
|
|
6218
6232
|
}
|
|
6219
|
-
var Logo =
|
|
6233
|
+
var Logo = React69__namespace.default.forwardRef(({ src, alt, href }, ref) => {
|
|
6220
6234
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "logo oui-px-3", ref, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: href ?? "/", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6221
6235
|
"img",
|
|
6222
6236
|
{
|
|
@@ -6229,8 +6243,8 @@ var Logo = React68__namespace.default.forwardRef(({ src, alt, href }, ref) => {
|
|
|
6229
6243
|
Logo.displayName = "LogoElement";
|
|
6230
6244
|
function useInit(params) {
|
|
6231
6245
|
const { dataSource, loading, ignoreLoadingCheck } = params;
|
|
6232
|
-
const [initialized, setInitialized] =
|
|
6233
|
-
|
|
6246
|
+
const [initialized, setInitialized] = React69.useState(false);
|
|
6247
|
+
React69.useEffect(() => {
|
|
6234
6248
|
if (initialized) return;
|
|
6235
6249
|
if (ignoreLoadingCheck || loading || Array.isArray(dataSource)) {
|
|
6236
6250
|
setInitialized(true);
|
|
@@ -6239,10 +6253,10 @@ function useInit(params) {
|
|
|
6239
6253
|
return initialized;
|
|
6240
6254
|
}
|
|
6241
6255
|
function useScroll(deps) {
|
|
6242
|
-
const scrollRef =
|
|
6243
|
-
const [showLeftShadow, setShowLeftShadow] =
|
|
6244
|
-
const [showRightShadow, setShowRightShadow] =
|
|
6245
|
-
|
|
6256
|
+
const scrollRef = React69.useRef(null);
|
|
6257
|
+
const [showLeftShadow, setShowLeftShadow] = React69.useState(false);
|
|
6258
|
+
const [showRightShadow, setShowRightShadow] = React69.useState(false);
|
|
6259
|
+
React69.useEffect(() => {
|
|
6246
6260
|
if (!scrollRef.current) {
|
|
6247
6261
|
return;
|
|
6248
6262
|
}
|
|
@@ -6251,7 +6265,7 @@ function useScroll(deps) {
|
|
|
6251
6265
|
setShowRightShadow(!isScrolledToRight(scrollRef.current));
|
|
6252
6266
|
});
|
|
6253
6267
|
}, [scrollRef]);
|
|
6254
|
-
|
|
6268
|
+
React69.useEffect(() => {
|
|
6255
6269
|
if (!scrollRef.current) {
|
|
6256
6270
|
return;
|
|
6257
6271
|
}
|
|
@@ -6273,14 +6287,14 @@ function hasHorizontalScroll(element) {
|
|
|
6273
6287
|
}
|
|
6274
6288
|
function useShowHeader(params) {
|
|
6275
6289
|
const { dataSource, loading } = params;
|
|
6276
|
-
const initShowHeader =
|
|
6277
|
-
const showHeader =
|
|
6290
|
+
const initShowHeader = React69.useRef(false);
|
|
6291
|
+
const showHeader = React69.useMemo(() => {
|
|
6278
6292
|
if (loading && !dataSource?.length) {
|
|
6279
6293
|
return initShowHeader.current;
|
|
6280
6294
|
}
|
|
6281
6295
|
return !!dataSource?.length;
|
|
6282
6296
|
}, [loading, dataSource]);
|
|
6283
|
-
|
|
6297
|
+
React69.useEffect(() => {
|
|
6284
6298
|
if (showHeader) {
|
|
6285
6299
|
initShowHeader.current = true;
|
|
6286
6300
|
}
|
|
@@ -6289,8 +6303,8 @@ function useShowHeader(params) {
|
|
|
6289
6303
|
}
|
|
6290
6304
|
function useShowPagination(params) {
|
|
6291
6305
|
const { loading, dataSource, pagination, rows } = params;
|
|
6292
|
-
const initShowPagination =
|
|
6293
|
-
const showPagination =
|
|
6306
|
+
const initShowPagination = React69.useRef(false);
|
|
6307
|
+
const showPagination = React69.useMemo(() => {
|
|
6294
6308
|
if (loading && !dataSource?.length) {
|
|
6295
6309
|
return initShowPagination.current;
|
|
6296
6310
|
}
|
|
@@ -6299,7 +6313,7 @@ function useShowPagination(params) {
|
|
|
6299
6313
|
}
|
|
6300
6314
|
return false;
|
|
6301
6315
|
}, [loading, pagination, dataSource, rows]);
|
|
6302
|
-
|
|
6316
|
+
React69.useEffect(() => {
|
|
6303
6317
|
if (showPagination) {
|
|
6304
6318
|
initShowPagination.current = true;
|
|
6305
6319
|
}
|
|
@@ -6308,7 +6322,7 @@ function useShowPagination(params) {
|
|
|
6308
6322
|
}
|
|
6309
6323
|
function useSort(props) {
|
|
6310
6324
|
const { onSort, initialSort } = props;
|
|
6311
|
-
const [sorting, setSorting] =
|
|
6325
|
+
const [sorting, setSorting] = React69.useState(
|
|
6312
6326
|
initialSort ? [
|
|
6313
6327
|
{
|
|
6314
6328
|
id: initialSort.sortKey,
|
|
@@ -6316,15 +6330,15 @@ function useSort(props) {
|
|
|
6316
6330
|
}
|
|
6317
6331
|
] : []
|
|
6318
6332
|
);
|
|
6319
|
-
|
|
6333
|
+
React69.useEffect(() => {
|
|
6320
6334
|
const { id, desc } = sorting[0] || {};
|
|
6321
6335
|
onSort?.(id ? { sortKey: id, sort: desc ? "desc" : "asc" } : void 0);
|
|
6322
6336
|
}, [sorting, onSort]);
|
|
6323
6337
|
return [sorting, setSorting];
|
|
6324
6338
|
}
|
|
6325
6339
|
function useWrap(deps) {
|
|
6326
|
-
const wrapRef =
|
|
6327
|
-
|
|
6340
|
+
const wrapRef = React69.useRef(null);
|
|
6341
|
+
React69.useEffect(() => {
|
|
6328
6342
|
if (!wrapRef.current) return;
|
|
6329
6343
|
const bgColor = window.getComputedStyle(wrapRef.current).backgroundColor;
|
|
6330
6344
|
wrapRef.current.style.setProperty("--oui-table-background-color", bgColor);
|
|
@@ -6417,7 +6431,7 @@ var TableBody = (props) => {
|
|
|
6417
6431
|
children: props.expandRowRender?.(row, row.index)
|
|
6418
6432
|
}
|
|
6419
6433
|
) });
|
|
6420
|
-
const rowView = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6434
|
+
const rowView = /* @__PURE__ */ jsxRuntime.jsxs(React69.Fragment, { children: [
|
|
6421
6435
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6422
6436
|
"tr",
|
|
6423
6437
|
{
|
|
@@ -6478,7 +6492,7 @@ var TableBody = (props) => {
|
|
|
6478
6492
|
expandView
|
|
6479
6493
|
] }, row.id);
|
|
6480
6494
|
if (typeof props.renderRowContainer === "function") {
|
|
6481
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6495
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React69.Fragment, { children: props.renderRowContainer(row.original, row.index, rowView, row) }, row.id);
|
|
6482
6496
|
}
|
|
6483
6497
|
return rowView;
|
|
6484
6498
|
})
|
|
@@ -6565,7 +6579,7 @@ var DescendingIcon = () => {
|
|
|
6565
6579
|
};
|
|
6566
6580
|
function useMultiSort(props) {
|
|
6567
6581
|
const { onSort, currentSorting } = props;
|
|
6568
|
-
const handleFieldSort =
|
|
6582
|
+
const handleFieldSort = React69.useCallback(
|
|
6569
6583
|
(fieldKey) => {
|
|
6570
6584
|
const isCurrentField = currentSorting?.sortKey === fieldKey;
|
|
6571
6585
|
let newOrder;
|
|
@@ -6580,7 +6594,7 @@ function useMultiSort(props) {
|
|
|
6580
6594
|
},
|
|
6581
6595
|
[currentSorting, onSort]
|
|
6582
6596
|
);
|
|
6583
|
-
const getFieldSort =
|
|
6597
|
+
const getFieldSort = React69.useCallback(
|
|
6584
6598
|
(fieldKey) => {
|
|
6585
6599
|
if (currentSorting?.sortKey === fieldKey) {
|
|
6586
6600
|
return { sortKey: fieldKey, sort: currentSorting.sort };
|
|
@@ -6736,9 +6750,9 @@ var SortIndicator2 = ({ isSorted }) => {
|
|
|
6736
6750
|
desc: /* @__PURE__ */ jsxRuntime.jsx(DescendingIcon, {})
|
|
6737
6751
|
}[isSorted] || /* @__PURE__ */ jsxRuntime.jsx(SortingIcon2, {});
|
|
6738
6752
|
};
|
|
6739
|
-
var LocaleContext =
|
|
6753
|
+
var LocaleContext = React69.createContext(void 0);
|
|
6740
6754
|
var LocaleProvider = (props) => {
|
|
6741
|
-
const value =
|
|
6755
|
+
const value = React69.useMemo(
|
|
6742
6756
|
() => ({ ...props.locale, exist: true }),
|
|
6743
6757
|
[props.locale]
|
|
6744
6758
|
);
|
|
@@ -6769,8 +6783,8 @@ var localeValues = {
|
|
|
6769
6783
|
|
|
6770
6784
|
// src/locale/useLocale.ts
|
|
6771
6785
|
var useLocale = (componentName, defaultLocale) => {
|
|
6772
|
-
const fullLocale =
|
|
6773
|
-
const getLocale =
|
|
6786
|
+
const fullLocale = React69.useContext(LocaleContext);
|
|
6787
|
+
const getLocale = React69.useMemo(() => {
|
|
6774
6788
|
const locale = defaultLocale || localeValues[componentName];
|
|
6775
6789
|
const localeFromContext = fullLocale?.[componentName] || {};
|
|
6776
6790
|
return {
|
|
@@ -6778,7 +6792,7 @@ var useLocale = (componentName, defaultLocale) => {
|
|
|
6778
6792
|
...localeFromContext
|
|
6779
6793
|
};
|
|
6780
6794
|
}, [componentName, defaultLocale, fullLocale]);
|
|
6781
|
-
const getLocaleCode =
|
|
6795
|
+
const getLocaleCode = React69.useMemo(() => {
|
|
6782
6796
|
const localeCode = fullLocale?.locale;
|
|
6783
6797
|
const defaultLocaleCode = localeValues.locale;
|
|
6784
6798
|
return localeCode || defaultLocaleCode;
|
|
@@ -6798,7 +6812,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
6798
6812
|
}
|
|
6799
6813
|
);
|
|
6800
6814
|
Pagination.displayName = "Pagination";
|
|
6801
|
-
var PaginationContent =
|
|
6815
|
+
var PaginationContent = React69__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6802
6816
|
"ul",
|
|
6803
6817
|
{
|
|
6804
6818
|
ref,
|
|
@@ -6810,7 +6824,7 @@ var PaginationContent = React68__namespace.default.forwardRef(({ className, ...p
|
|
|
6810
6824
|
}
|
|
6811
6825
|
));
|
|
6812
6826
|
PaginationContent.displayName = "PaginationContent";
|
|
6813
|
-
var PaginationItem =
|
|
6827
|
+
var PaginationItem = React69__namespace.default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: tailwindVariants.cnBase("oui-leading-[0px]", className), ...props }));
|
|
6814
6828
|
PaginationItem.displayName = "PaginationItem";
|
|
6815
6829
|
var PaginationLink = ({
|
|
6816
6830
|
className,
|
|
@@ -6942,7 +6956,7 @@ var PaginationItems = (props) => {
|
|
|
6942
6956
|
if (totalPages <= 1) {
|
|
6943
6957
|
return null;
|
|
6944
6958
|
}
|
|
6945
|
-
const pageNumbers =
|
|
6959
|
+
const pageNumbers = React69.useMemo(() => {
|
|
6946
6960
|
if (typeof props.generatePageNumbers === "function") {
|
|
6947
6961
|
return props.generatePageNumbers(currentPage, totalPages);
|
|
6948
6962
|
}
|
|
@@ -7111,7 +7125,7 @@ var useExtensionBuilder = (position, props) => {
|
|
|
7111
7125
|
var ExtensionSlot = (props) => {
|
|
7112
7126
|
const { position, scope, defaultWidget: defaultValue, ...rest } = props;
|
|
7113
7127
|
const elementProps = useExtensionBuilder(position, rest);
|
|
7114
|
-
const Ele =
|
|
7128
|
+
const Ele = React69.useMemo(() => {
|
|
7115
7129
|
const registry = OrderlyExtensionRegistry.getInstance();
|
|
7116
7130
|
const plugin = registry.getPluginsByPosition(position);
|
|
7117
7131
|
return plugin?.render ?? defaultValue ?? NotFound;
|
|
@@ -7352,10 +7366,10 @@ function DataTable(props) {
|
|
|
7352
7366
|
onSort,
|
|
7353
7367
|
initialSort
|
|
7354
7368
|
});
|
|
7355
|
-
const hasMultiSortColumns =
|
|
7369
|
+
const hasMultiSortColumns = React69.useMemo(() => {
|
|
7356
7370
|
return columns.some((col) => col.multiSort && !col.multiSort.onSort);
|
|
7357
7371
|
}, [columns]);
|
|
7358
|
-
const effectiveManualSorting =
|
|
7372
|
+
const effectiveManualSorting = React69.useMemo(() => {
|
|
7359
7373
|
if (!hasMultiSortColumns) {
|
|
7360
7374
|
return manualSorting;
|
|
7361
7375
|
}
|
|
@@ -7369,27 +7383,27 @@ function DataTable(props) {
|
|
|
7369
7383
|
}
|
|
7370
7384
|
return false;
|
|
7371
7385
|
}, [hasMultiSortColumns, manualSorting, sorting, columns]);
|
|
7372
|
-
const dataSource =
|
|
7386
|
+
const dataSource = React69.useMemo(() => {
|
|
7373
7387
|
return Transform.dataSource(props.dataSource || [], columns, sorting);
|
|
7374
7388
|
}, [props.dataSource, columns, sorting]);
|
|
7375
|
-
const formatColumns =
|
|
7389
|
+
const formatColumns = React69.useMemo(
|
|
7376
7390
|
() => Transform.columns(columns, sorting, setSorting),
|
|
7377
7391
|
[columns, sorting, setSorting]
|
|
7378
7392
|
);
|
|
7379
|
-
const columnPinning =
|
|
7393
|
+
const columnPinning = React69.useMemo(
|
|
7380
7394
|
() => Transform.columnPinning(columns),
|
|
7381
7395
|
[columns]
|
|
7382
7396
|
);
|
|
7383
|
-
const rowSelection =
|
|
7397
|
+
const rowSelection = React69.useMemo(
|
|
7384
7398
|
() => props.rowSelection || {},
|
|
7385
7399
|
[props.rowSelection]
|
|
7386
7400
|
);
|
|
7387
|
-
const { state: paginationState, config: paginationConfig } =
|
|
7401
|
+
const { state: paginationState, config: paginationConfig } = React69.useMemo(
|
|
7388
7402
|
() => Transform.pagination(pagination),
|
|
7389
7403
|
[pagination]
|
|
7390
7404
|
);
|
|
7391
7405
|
const initialized = useInit({ dataSource, loading, ignoreLoadingCheck });
|
|
7392
|
-
const columnFilters =
|
|
7406
|
+
const columnFilters = React69.useMemo(() => {
|
|
7393
7407
|
return Array.isArray(props.columnFilters) ? props.columnFilters : props.columnFilters ? [props.columnFilters] : [];
|
|
7394
7408
|
}, [props.columnFilters]);
|
|
7395
7409
|
const table = reactTable.useReactTable({
|
|
@@ -7425,7 +7439,7 @@ function DataTable(props) {
|
|
|
7425
7439
|
...paginationConfig
|
|
7426
7440
|
// ...sortConfig,
|
|
7427
7441
|
});
|
|
7428
|
-
|
|
7442
|
+
React69.useEffect(() => {
|
|
7429
7443
|
props.getTableInstance?.(table);
|
|
7430
7444
|
}, [table]);
|
|
7431
7445
|
const wrapRef = useWrap([className, classNames?.root]);
|
|
@@ -7616,15 +7630,15 @@ var DateRangePicker = (props) => {
|
|
|
7616
7630
|
...calendarProps
|
|
7617
7631
|
} = props;
|
|
7618
7632
|
const [locale] = useLocale("picker");
|
|
7619
|
-
const [open, setOpen] =
|
|
7620
|
-
const [dateRange, setDateRange] =
|
|
7633
|
+
const [open, setOpen] = React69.useState(false);
|
|
7634
|
+
const [dateRange, setDateRange] = React69.useState(
|
|
7621
7635
|
value || initialValue || null
|
|
7622
7636
|
);
|
|
7623
|
-
const [isMobileView, setIsMobileView] =
|
|
7637
|
+
const [isMobileView, setIsMobileView] = React69.useState(false);
|
|
7624
7638
|
const update = useDebouncedCallback((width) => {
|
|
7625
7639
|
setIsMobileView(width <= 768);
|
|
7626
7640
|
}, 100);
|
|
7627
|
-
|
|
7641
|
+
React69.useEffect(() => {
|
|
7628
7642
|
const handleResize = () => {
|
|
7629
7643
|
update(window.innerWidth);
|
|
7630
7644
|
};
|
|
@@ -7634,12 +7648,12 @@ var DateRangePicker = (props) => {
|
|
|
7634
7648
|
window.removeEventListener("resize", handleResize);
|
|
7635
7649
|
};
|
|
7636
7650
|
}, []);
|
|
7637
|
-
|
|
7651
|
+
React69.useEffect(() => {
|
|
7638
7652
|
if (value?.from && value?.to && dateRange?.from && dateRange?.to && !areDatesEqual(value, dateRange))
|
|
7639
7653
|
setDateRange(value);
|
|
7640
7654
|
}, [value]);
|
|
7641
7655
|
const { trigger } = selectVariants({ size, className });
|
|
7642
|
-
const formattedValue =
|
|
7656
|
+
const formattedValue = React69.useMemo(() => {
|
|
7643
7657
|
if (!dateRange || !dateRange.from || !dateRange.to) {
|
|
7644
7658
|
return placeholder ?? locale.selectDate;
|
|
7645
7659
|
}
|
|
@@ -7713,8 +7727,8 @@ var DateRangePicker = (props) => {
|
|
|
7713
7727
|
};
|
|
7714
7728
|
DateRangePicker.displayName = "DateRangePicker";
|
|
7715
7729
|
function useDebouncedCallback(callback, delay) {
|
|
7716
|
-
const timeoutRef =
|
|
7717
|
-
const debouncedCallback =
|
|
7730
|
+
const timeoutRef = React69.useRef(null);
|
|
7731
|
+
const debouncedCallback = React69.useCallback(
|
|
7718
7732
|
(args) => {
|
|
7719
7733
|
if (timeoutRef.current) {
|
|
7720
7734
|
clearTimeout(timeoutRef.current);
|
|
@@ -7752,8 +7766,8 @@ var DatePicker = (props) => {
|
|
|
7752
7766
|
} = props;
|
|
7753
7767
|
const [locale] = useLocale("picker");
|
|
7754
7768
|
const { trigger } = selectVariants({ size });
|
|
7755
|
-
const [open, setOpen] =
|
|
7756
|
-
const formattedValue =
|
|
7769
|
+
const [open, setOpen] = React69.useState(false);
|
|
7770
|
+
const formattedValue = React69.useMemo(() => {
|
|
7757
7771
|
if (typeof value === "undefined") {
|
|
7758
7772
|
return placeholder ?? locale.selectDate;
|
|
7759
7773
|
}
|
|
@@ -7820,7 +7834,7 @@ var Sheet = DialogPrimitive__namespace.Root;
|
|
|
7820
7834
|
var SheetTrigger = DialogPrimitive__namespace.Trigger;
|
|
7821
7835
|
var SheetClose = DialogPrimitive__namespace.Close;
|
|
7822
7836
|
var SheetPortal = DialogPrimitive__namespace.Portal;
|
|
7823
|
-
var SheetOverlay =
|
|
7837
|
+
var SheetOverlay = React69__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7824
7838
|
DialogPrimitive__namespace.Overlay,
|
|
7825
7839
|
{
|
|
7826
7840
|
className: tailwindVariants.cnBase(
|
|
@@ -7846,7 +7860,7 @@ var sheetVariants = tailwindVariants.tv({
|
|
|
7846
7860
|
side: "bottom"
|
|
7847
7861
|
}
|
|
7848
7862
|
});
|
|
7849
|
-
var SheetContent =
|
|
7863
|
+
var SheetContent = React69__namespace.forwardRef(
|
|
7850
7864
|
({
|
|
7851
7865
|
side = "bottom",
|
|
7852
7866
|
closeable = true,
|
|
@@ -7942,7 +7956,7 @@ var SheetFooter = ({
|
|
|
7942
7956
|
}
|
|
7943
7957
|
);
|
|
7944
7958
|
SheetFooter.displayName = "SheetFooter";
|
|
7945
|
-
var SheetTitle =
|
|
7959
|
+
var SheetTitle = React69__namespace.forwardRef(({ className, leading, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7946
7960
|
"div",
|
|
7947
7961
|
{
|
|
7948
7962
|
className: "oui-sheet-header oui-grid oui-grid-cols-[40px_1fr_40px] oui-items-center",
|
|
@@ -7963,7 +7977,7 @@ var SheetTitle = React68__namespace.forwardRef(({ className, leading, ...props }
|
|
|
7963
7977
|
}
|
|
7964
7978
|
));
|
|
7965
7979
|
SheetTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
7966
|
-
var SheetDescription =
|
|
7980
|
+
var SheetDescription = React69__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7967
7981
|
DialogPrimitive__namespace.Description,
|
|
7968
7982
|
{
|
|
7969
7983
|
ref,
|
|
@@ -7988,8 +8002,8 @@ var getModalId = (modal2) => {
|
|
|
7988
8002
|
return modal2[symModalId];
|
|
7989
8003
|
};
|
|
7990
8004
|
function useModal(modal2, args) {
|
|
7991
|
-
const modals =
|
|
7992
|
-
const modalIdFromContext =
|
|
8005
|
+
const modals = React69.useContext(ModalContext);
|
|
8006
|
+
const modalIdFromContext = React69.useContext(ModalIdContext);
|
|
7993
8007
|
let modalId;
|
|
7994
8008
|
let isComponent = modal2 && typeof modal2 !== "string";
|
|
7995
8009
|
if (!modal2) {
|
|
@@ -8001,19 +8015,19 @@ function useModal(modal2, args) {
|
|
|
8001
8015
|
throw new Error("modalId is required");
|
|
8002
8016
|
}
|
|
8003
8017
|
const id = modalId;
|
|
8004
|
-
|
|
8018
|
+
React69.useEffect(() => {
|
|
8005
8019
|
if (isComponent) {
|
|
8006
8020
|
register(id, modal2, args);
|
|
8007
8021
|
}
|
|
8008
8022
|
}, [isComponent, modalId, modal2, args]);
|
|
8009
8023
|
const modalInfo = modals[id];
|
|
8010
|
-
const show2 =
|
|
8024
|
+
const show2 = React69.useCallback(
|
|
8011
8025
|
(args2) => modalActions.show(id, args2),
|
|
8012
8026
|
[id]
|
|
8013
8027
|
);
|
|
8014
|
-
const hide2 =
|
|
8015
|
-
const remove2 =
|
|
8016
|
-
const onOpenChange =
|
|
8028
|
+
const hide2 = React69.useCallback(() => modalActions.hide(id), [id]);
|
|
8029
|
+
const remove2 = React69.useCallback(() => modalActions.remove(id), [id]);
|
|
8030
|
+
const onOpenChange = React69.useCallback(
|
|
8017
8031
|
(isOpen) => {
|
|
8018
8032
|
if (!isOpen) {
|
|
8019
8033
|
reject("cancel");
|
|
@@ -8022,33 +8036,33 @@ function useModal(modal2, args) {
|
|
|
8022
8036
|
},
|
|
8023
8037
|
[id]
|
|
8024
8038
|
);
|
|
8025
|
-
const setStates2 =
|
|
8039
|
+
const setStates2 = React69.useCallback(
|
|
8026
8040
|
(states) => {
|
|
8027
8041
|
modalActions.setStates(id, states);
|
|
8028
8042
|
},
|
|
8029
8043
|
[id]
|
|
8030
8044
|
);
|
|
8031
|
-
const updateArgs2 =
|
|
8045
|
+
const updateArgs2 = React69.useCallback(
|
|
8032
8046
|
(args2) => {
|
|
8033
8047
|
modalActions.updateArgs(id, args2);
|
|
8034
8048
|
},
|
|
8035
8049
|
[id]
|
|
8036
8050
|
);
|
|
8037
|
-
const resolve =
|
|
8051
|
+
const resolve = React69.useCallback(
|
|
8038
8052
|
(args2) => {
|
|
8039
8053
|
modalCallbacks[id]?.resolve(args2);
|
|
8040
8054
|
delete modalCallbacks[id];
|
|
8041
8055
|
},
|
|
8042
8056
|
[id]
|
|
8043
8057
|
);
|
|
8044
|
-
const reject =
|
|
8058
|
+
const reject = React69.useCallback(
|
|
8045
8059
|
(args2) => {
|
|
8046
8060
|
modalCallbacks[id]?.reject(args2);
|
|
8047
8061
|
delete modalCallbacks[id];
|
|
8048
8062
|
},
|
|
8049
8063
|
[id]
|
|
8050
8064
|
);
|
|
8051
|
-
const resolveHide =
|
|
8065
|
+
const resolveHide = React69.useCallback((args2) => {
|
|
8052
8066
|
hideModalCallbacks[id]?.resolve(args2);
|
|
8053
8067
|
delete hideModalCallbacks[id];
|
|
8054
8068
|
}, []);
|
|
@@ -8082,9 +8096,9 @@ var MODAL_REGISTRY = /* @__PURE__ */ new Map();
|
|
|
8082
8096
|
var create = (Comp) => {
|
|
8083
8097
|
return ({ id, defaultVisible, keepMounted, ...props }) => {
|
|
8084
8098
|
const { args, show: show2 } = useModal(id);
|
|
8085
|
-
const modals =
|
|
8099
|
+
const modals = React69.useContext(ModalContext);
|
|
8086
8100
|
const shouldMount = !!modals[id];
|
|
8087
|
-
|
|
8101
|
+
React69.useEffect(() => {
|
|
8088
8102
|
if (defaultVisible) {
|
|
8089
8103
|
show2();
|
|
8090
8104
|
}
|
|
@@ -8095,11 +8109,11 @@ var create = (Comp) => {
|
|
|
8095
8109
|
}
|
|
8096
8110
|
};
|
|
8097
8111
|
}, [id, show2, defaultVisible]);
|
|
8098
|
-
|
|
8112
|
+
React69.useEffect(() => {
|
|
8099
8113
|
if (keepMounted) modalActions.setStates(id, { keepMounted: true });
|
|
8100
8114
|
}, [id, keepMounted]);
|
|
8101
8115
|
const delayVisible = modals[id]?.delayVisible;
|
|
8102
|
-
|
|
8116
|
+
React69.useEffect(() => {
|
|
8103
8117
|
if (delayVisible) {
|
|
8104
8118
|
show2(args);
|
|
8105
8119
|
}
|
|
@@ -8120,8 +8134,8 @@ var unregister = (id) => {
|
|
|
8120
8134
|
};
|
|
8121
8135
|
var initialState = {};
|
|
8122
8136
|
var ALREADY_MOUNTED = {};
|
|
8123
|
-
var ModalContext =
|
|
8124
|
-
var ModalIdContext =
|
|
8137
|
+
var ModalContext = React69.createContext(initialState);
|
|
8138
|
+
var ModalIdContext = React69.createContext(null);
|
|
8125
8139
|
var modalCallbacks = {};
|
|
8126
8140
|
var hideModalCallbacks = {};
|
|
8127
8141
|
var dispatch = () => {
|
|
@@ -8230,7 +8244,7 @@ var reducer = (state, action) => {
|
|
|
8230
8244
|
}
|
|
8231
8245
|
};
|
|
8232
8246
|
var ModalContainer = () => {
|
|
8233
|
-
const modals =
|
|
8247
|
+
const modals = React69.useContext(ModalContext);
|
|
8234
8248
|
const visibleModalIds = Object.keys(modals).filter((id) => !!modals[id]);
|
|
8235
8249
|
visibleModalIds.forEach((id) => {
|
|
8236
8250
|
if (!MODAL_REGISTRY.has(id) && !ALREADY_MOUNTED[id]) {
|
|
@@ -8249,7 +8263,7 @@ var ModalContainer = () => {
|
|
|
8249
8263
|
}) });
|
|
8250
8264
|
};
|
|
8251
8265
|
var ModalProvider = (props) => {
|
|
8252
|
-
const [state, dispatchOrigin] =
|
|
8266
|
+
const [state, dispatchOrigin] = React69.useReducer(reducer, initialState);
|
|
8253
8267
|
dispatch = dispatchOrigin;
|
|
8254
8268
|
return /* @__PURE__ */ jsxRuntime.jsxs(ModalContext.Provider, { value: state, children: [
|
|
8255
8269
|
props.children,
|
|
@@ -8353,7 +8367,7 @@ var dividerVariants = tv({
|
|
|
8353
8367
|
intensity: 4
|
|
8354
8368
|
}
|
|
8355
8369
|
});
|
|
8356
|
-
var Divider =
|
|
8370
|
+
var Divider = React69__namespace.default.forwardRef((props, ref) => {
|
|
8357
8371
|
const { className, intensity, direction, lineStyle, mx, my, ...rest } = props;
|
|
8358
8372
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8359
8373
|
"div",
|
|
@@ -8561,7 +8575,7 @@ var Dialog = DialogPrimitive__namespace.Root;
|
|
|
8561
8575
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
8562
8576
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
8563
8577
|
var DialogClose = DialogPrimitive__namespace.Close;
|
|
8564
|
-
var DialogOverlay =
|
|
8578
|
+
var DialogOverlay = React69__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8565
8579
|
const { overlay } = dialogVariants();
|
|
8566
8580
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8567
8581
|
DialogPrimitive__namespace.Overlay,
|
|
@@ -8573,7 +8587,7 @@ var DialogOverlay = React68__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
8573
8587
|
);
|
|
8574
8588
|
});
|
|
8575
8589
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
8576
|
-
var DialogContent =
|
|
8590
|
+
var DialogContent = React69__namespace.forwardRef(
|
|
8577
8591
|
({
|
|
8578
8592
|
overlyClassName,
|
|
8579
8593
|
className,
|
|
@@ -8635,7 +8649,7 @@ var DialogFooter = ({
|
|
|
8635
8649
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: footer({ className }), ...props });
|
|
8636
8650
|
};
|
|
8637
8651
|
DialogFooter.displayName = "DialogFooter";
|
|
8638
|
-
var DialogTitle =
|
|
8652
|
+
var DialogTitle = React69__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8639
8653
|
const { title } = dialogVariants();
|
|
8640
8654
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8641
8655
|
DialogPrimitive__namespace.Title,
|
|
@@ -8647,7 +8661,7 @@ var DialogTitle = React68__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
8647
8661
|
);
|
|
8648
8662
|
});
|
|
8649
8663
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
8650
|
-
var DialogDescription =
|
|
8664
|
+
var DialogDescription = React69__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
8651
8665
|
const { desc } = dialogVariants();
|
|
8652
8666
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8653
8667
|
DialogPrimitive__namespace.Description,
|
|
@@ -8661,10 +8675,10 @@ var DialogDescription = React68__namespace.forwardRef(({ className, ...props },
|
|
|
8661
8675
|
DialogDescription.displayName = DialogPrimitive__namespace.Description.displayName;
|
|
8662
8676
|
var SimpleDialogFooter = (props) => {
|
|
8663
8677
|
const { actions } = props;
|
|
8664
|
-
const [primaryLoading, setPrimaryLoading] =
|
|
8678
|
+
const [primaryLoading, setPrimaryLoading] = React69.useState(
|
|
8665
8679
|
actions?.primary?.loading ?? false
|
|
8666
8680
|
);
|
|
8667
|
-
|
|
8681
|
+
React69.useEffect(() => {
|
|
8668
8682
|
if (actions?.primary?.loading) {
|
|
8669
8683
|
setPrimaryLoading(actions?.primary?.loading);
|
|
8670
8684
|
}
|
|
@@ -8673,7 +8687,7 @@ var SimpleDialogFooter = (props) => {
|
|
|
8673
8687
|
};
|
|
8674
8688
|
}, [actions?.primary?.loading]);
|
|
8675
8689
|
if (!actions) return null;
|
|
8676
|
-
const buttons =
|
|
8690
|
+
const buttons = React69.useMemo(() => {
|
|
8677
8691
|
const buttons2 = [];
|
|
8678
8692
|
if (actions.secondary && typeof actions.secondary.onClick === "function") {
|
|
8679
8693
|
const {
|
|
@@ -8772,11 +8786,11 @@ function useMediaQuery(query) {
|
|
|
8772
8786
|
}
|
|
8773
8787
|
return false;
|
|
8774
8788
|
};
|
|
8775
|
-
const [matches, setMatches] =
|
|
8789
|
+
const [matches, setMatches] = React69.useState(getMatches(query));
|
|
8776
8790
|
function handleChange() {
|
|
8777
8791
|
setMatches(getMatches(query));
|
|
8778
8792
|
}
|
|
8779
|
-
|
|
8793
|
+
React69.useEffect(() => {
|
|
8780
8794
|
const matchMedia = window?.matchMedia(query);
|
|
8781
8795
|
handleChange();
|
|
8782
8796
|
if (matchMedia?.addListener) {
|
|
@@ -8804,7 +8818,7 @@ function useScreen() {
|
|
|
8804
8818
|
};
|
|
8805
8819
|
}
|
|
8806
8820
|
function useObserverElement(element, callback) {
|
|
8807
|
-
|
|
8821
|
+
React69.useEffect(() => {
|
|
8808
8822
|
if (!element) {
|
|
8809
8823
|
return;
|
|
8810
8824
|
}
|
|
@@ -8820,11 +8834,11 @@ function useObserverElement(element, callback) {
|
|
|
8820
8834
|
}, [element]);
|
|
8821
8835
|
}
|
|
8822
8836
|
function useLongPress(callback, longPressTime = 600) {
|
|
8823
|
-
const timeoutRef =
|
|
8824
|
-
const targetRef =
|
|
8825
|
-
const startPositionRef =
|
|
8826
|
-
const isLongPressTriggeredRef =
|
|
8827
|
-
const clearLongPress =
|
|
8837
|
+
const timeoutRef = React69.useRef(null);
|
|
8838
|
+
const targetRef = React69.useRef(null);
|
|
8839
|
+
const startPositionRef = React69.useRef(null);
|
|
8840
|
+
const isLongPressTriggeredRef = React69.useRef(false);
|
|
8841
|
+
const clearLongPress = React69.useCallback(() => {
|
|
8828
8842
|
if (timeoutRef.current) {
|
|
8829
8843
|
clearTimeout(timeoutRef.current);
|
|
8830
8844
|
timeoutRef.current = null;
|
|
@@ -8833,7 +8847,7 @@ function useLongPress(callback, longPressTime = 600) {
|
|
|
8833
8847
|
startPositionRef.current = null;
|
|
8834
8848
|
isLongPressTriggeredRef.current = false;
|
|
8835
8849
|
}, []);
|
|
8836
|
-
const startLongPress =
|
|
8850
|
+
const startLongPress = React69.useCallback(
|
|
8837
8851
|
(e) => {
|
|
8838
8852
|
clearLongPress();
|
|
8839
8853
|
if ("touches" in e) {
|
|
@@ -8854,17 +8868,17 @@ function useLongPress(callback, longPressTime = 600) {
|
|
|
8854
8868
|
},
|
|
8855
8869
|
[callback, longPressTime, clearLongPress]
|
|
8856
8870
|
);
|
|
8857
|
-
const handleMouseDown =
|
|
8871
|
+
const handleMouseDown = React69.useCallback(
|
|
8858
8872
|
(e) => {
|
|
8859
8873
|
if (e.button !== 0) return;
|
|
8860
8874
|
startLongPress(e);
|
|
8861
8875
|
},
|
|
8862
8876
|
[startLongPress]
|
|
8863
8877
|
);
|
|
8864
|
-
const handleMouseUp =
|
|
8878
|
+
const handleMouseUp = React69.useCallback(() => {
|
|
8865
8879
|
clearLongPress();
|
|
8866
8880
|
}, [clearLongPress]);
|
|
8867
|
-
const handleMouseMove =
|
|
8881
|
+
const handleMouseMove = React69.useCallback(
|
|
8868
8882
|
(e) => {
|
|
8869
8883
|
if (isLongPressTriggeredRef.current) return;
|
|
8870
8884
|
if (startPositionRef.current) {
|
|
@@ -8878,25 +8892,25 @@ function useLongPress(callback, longPressTime = 600) {
|
|
|
8878
8892
|
},
|
|
8879
8893
|
[clearLongPress]
|
|
8880
8894
|
);
|
|
8881
|
-
const handleMouseLeave =
|
|
8895
|
+
const handleMouseLeave = React69.useCallback(() => {
|
|
8882
8896
|
clearLongPress();
|
|
8883
8897
|
}, [clearLongPress]);
|
|
8884
|
-
const handleContextMenu =
|
|
8898
|
+
const handleContextMenu = React69.useCallback((e) => {
|
|
8885
8899
|
if (timeoutRef.current || isLongPressTriggeredRef.current) {
|
|
8886
8900
|
e.preventDefault();
|
|
8887
8901
|
e.stopPropagation();
|
|
8888
8902
|
}
|
|
8889
8903
|
}, []);
|
|
8890
|
-
const handleTouchStart =
|
|
8904
|
+
const handleTouchStart = React69.useCallback(
|
|
8891
8905
|
(e) => {
|
|
8892
8906
|
startLongPress(e);
|
|
8893
8907
|
},
|
|
8894
8908
|
[startLongPress]
|
|
8895
8909
|
);
|
|
8896
|
-
const handleTouchEnd =
|
|
8910
|
+
const handleTouchEnd = React69.useCallback(() => {
|
|
8897
8911
|
clearLongPress();
|
|
8898
8912
|
}, [clearLongPress]);
|
|
8899
|
-
const handleTouchMove =
|
|
8913
|
+
const handleTouchMove = React69.useCallback(
|
|
8900
8914
|
(e) => {
|
|
8901
8915
|
if (timeoutRef.current) {
|
|
8902
8916
|
e.preventDefault();
|
|
@@ -8917,7 +8931,7 @@ function useLongPress(callback, longPressTime = 600) {
|
|
|
8917
8931
|
},
|
|
8918
8932
|
[clearLongPress]
|
|
8919
8933
|
);
|
|
8920
|
-
const handleTouchCancel =
|
|
8934
|
+
const handleTouchCancel = React69.useCallback(() => {
|
|
8921
8935
|
clearLongPress();
|
|
8922
8936
|
}, [clearLongPress]);
|
|
8923
8937
|
return {
|
|
@@ -8947,7 +8961,7 @@ var AlertDialog = (props) => {
|
|
|
8947
8961
|
classNames
|
|
8948
8962
|
} = props;
|
|
8949
8963
|
const { isMobile } = useScreen();
|
|
8950
|
-
const actions =
|
|
8964
|
+
const actions = React69.useMemo(() => {
|
|
8951
8965
|
if (typeof onOk !== "function" && typeof onCancel !== "function")
|
|
8952
8966
|
return void 0;
|
|
8953
8967
|
const actions2 = {};
|
|
@@ -9000,7 +9014,7 @@ var AlertDialog = (props) => {
|
|
|
9000
9014
|
var CreatedAlertDialog = create((props) => {
|
|
9001
9015
|
const { onOk } = props;
|
|
9002
9016
|
const { visible, hide: hide2, resolve, reject, onOpenChange } = useModal();
|
|
9003
|
-
const onOkHandler =
|
|
9017
|
+
const onOkHandler = React69.useCallback(() => {
|
|
9004
9018
|
return Promise.resolve().then(onOk).then(hide2);
|
|
9005
9019
|
}, [onOk]);
|
|
9006
9020
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9217,14 +9231,14 @@ function registerSimpleSheet(id, comp, props) {
|
|
|
9217
9231
|
}
|
|
9218
9232
|
var ActionItem = (props) => {
|
|
9219
9233
|
const { action } = props;
|
|
9220
|
-
const onItemClick =
|
|
9234
|
+
const onItemClick = React69.useCallback(() => {
|
|
9221
9235
|
if (typeof action.onClick === "function") {
|
|
9222
9236
|
action.onClick(action);
|
|
9223
9237
|
} else {
|
|
9224
9238
|
props.onClick?.({ ...action, index: props.index });
|
|
9225
9239
|
}
|
|
9226
9240
|
}, [action]);
|
|
9227
|
-
const child =
|
|
9241
|
+
const child = React69.useMemo(() => {
|
|
9228
9242
|
return action.label;
|
|
9229
9243
|
}, [action.label]);
|
|
9230
9244
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9247,7 +9261,7 @@ var ActionSheetContent = (props) => {
|
|
|
9247
9261
|
if (action.type === "division") {
|
|
9248
9262
|
return /* @__PURE__ */ jsxRuntime.jsx(ActionDivision, {}, index);
|
|
9249
9263
|
}
|
|
9250
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9264
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React69.Fragment, { children: [
|
|
9251
9265
|
action.value === "cancel" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-h-2 oui-bg-base-10" }),
|
|
9252
9266
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9253
9267
|
ActionItem,
|
|
@@ -9274,7 +9288,7 @@ var ActionSheetContent = (props) => {
|
|
|
9274
9288
|
};
|
|
9275
9289
|
var ActionSheet = (props) => {
|
|
9276
9290
|
const [locale] = useLocale("modal");
|
|
9277
|
-
const items =
|
|
9291
|
+
const items = React69.useMemo(() => {
|
|
9278
9292
|
const items2 = [];
|
|
9279
9293
|
if (Array.isArray(props.actionSheets)) {
|
|
9280
9294
|
for (const action of props.actionSheets) {
|
|
@@ -9354,7 +9368,7 @@ var pickerVariants = tv({
|
|
|
9354
9368
|
color: "base"
|
|
9355
9369
|
}
|
|
9356
9370
|
});
|
|
9357
|
-
var Picker =
|
|
9371
|
+
var Picker = React69.forwardRef(
|
|
9358
9372
|
(originalProps, ref) => {
|
|
9359
9373
|
const {
|
|
9360
9374
|
size,
|
|
@@ -9369,8 +9383,8 @@ var Picker = React68.forwardRef(
|
|
|
9369
9383
|
valueRenderer,
|
|
9370
9384
|
...props
|
|
9371
9385
|
} = originalProps;
|
|
9372
|
-
const [open, setOpen] =
|
|
9373
|
-
const selectedItem =
|
|
9386
|
+
const [open, setOpen] = React69.useState(false);
|
|
9387
|
+
const selectedItem = React69.useMemo(() => {
|
|
9374
9388
|
if (value && !!value.value) {
|
|
9375
9389
|
return value;
|
|
9376
9390
|
}
|
|
@@ -9381,13 +9395,13 @@ var Picker = React68.forwardRef(
|
|
|
9381
9395
|
}
|
|
9382
9396
|
}
|
|
9383
9397
|
}, [value, options]);
|
|
9384
|
-
const text =
|
|
9398
|
+
const text = React69.useMemo(() => {
|
|
9385
9399
|
if (selectedItem) {
|
|
9386
9400
|
return selectedItem.label;
|
|
9387
9401
|
}
|
|
9388
9402
|
return placeholder || label || "";
|
|
9389
9403
|
}, [selectedItem, label, placeholder]);
|
|
9390
|
-
const actions =
|
|
9404
|
+
const actions = React69.useMemo(() => {
|
|
9391
9405
|
return [...options, "---", "Cancel"];
|
|
9392
9406
|
}, [options]);
|
|
9393
9407
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9518,10 +9532,10 @@ var DataFilter = (props) => {
|
|
|
9518
9532
|
);
|
|
9519
9533
|
};
|
|
9520
9534
|
var usePagination = (initial) => {
|
|
9521
|
-
const dataTotal =
|
|
9522
|
-
const [page, setPage] =
|
|
9523
|
-
const [pageSize, _setPageSize] =
|
|
9524
|
-
const setPageSize =
|
|
9535
|
+
const dataTotal = React69.useRef(0);
|
|
9536
|
+
const [page, setPage] = React69.useState(initial?.page ?? 1);
|
|
9537
|
+
const [pageSize, _setPageSize] = React69.useState(initial?.pageSize ?? 10);
|
|
9538
|
+
const setPageSize = React69.useCallback(
|
|
9525
9539
|
(size) => {
|
|
9526
9540
|
_setPageSize(size);
|
|
9527
9541
|
if (dataTotal.current > 0) {
|
|
@@ -9546,7 +9560,7 @@ var usePagination = (initial) => {
|
|
|
9546
9560
|
pageTotal
|
|
9547
9561
|
};
|
|
9548
9562
|
};
|
|
9549
|
-
const parsePagination =
|
|
9563
|
+
const parsePagination = React69.useCallback(
|
|
9550
9564
|
(meta) => {
|
|
9551
9565
|
return {
|
|
9552
9566
|
...parseMeta(meta),
|
|
@@ -9556,7 +9570,7 @@ var usePagination = (initial) => {
|
|
|
9556
9570
|
},
|
|
9557
9571
|
[page, pageSize]
|
|
9558
9572
|
);
|
|
9559
|
-
const pagination =
|
|
9573
|
+
const pagination = React69.useMemo(
|
|
9560
9574
|
() => ({
|
|
9561
9575
|
page,
|
|
9562
9576
|
pageSize,
|
|
@@ -9565,7 +9579,7 @@ var usePagination = (initial) => {
|
|
|
9565
9579
|
}),
|
|
9566
9580
|
[parsePagination]
|
|
9567
9581
|
);
|
|
9568
|
-
|
|
9582
|
+
React69.useEffect(() => {
|
|
9569
9583
|
if (initial?.resetPageWhenPageSizeChange !== false) {
|
|
9570
9584
|
setPage(1);
|
|
9571
9585
|
}
|
|
@@ -9698,6 +9712,7 @@ var tabsVariants = tv({
|
|
|
9698
9712
|
"oui-px-1"
|
|
9699
9713
|
],
|
|
9700
9714
|
trigger: [
|
|
9715
|
+
"oui-group",
|
|
9701
9716
|
"oui-pb-2",
|
|
9702
9717
|
"oui-relative",
|
|
9703
9718
|
"data-[state=active]:oui-text-base-contrast",
|
|
@@ -9715,6 +9730,7 @@ var tabsVariants = tv({
|
|
|
9715
9730
|
contained: {
|
|
9716
9731
|
list: ["oui-space-x-[6px]"],
|
|
9717
9732
|
trigger: [
|
|
9733
|
+
"oui-group",
|
|
9718
9734
|
"oui-rounded",
|
|
9719
9735
|
"oui-px-3",
|
|
9720
9736
|
"oui-bg-base-7 hover:oui-bg-base-5",
|
|
@@ -9806,13 +9822,13 @@ var tabsVariants = tv({
|
|
|
9806
9822
|
}
|
|
9807
9823
|
});
|
|
9808
9824
|
var TabsBase = TabsPrimitive__namespace.Root;
|
|
9809
|
-
var TabsList =
|
|
9825
|
+
var TabsList = React69__namespace.forwardRef((originProps, ref) => {
|
|
9810
9826
|
const { className, size, variant, ...props } = originProps;
|
|
9811
9827
|
const { list } = tabsVariants({ size, variant });
|
|
9812
9828
|
return /* @__PURE__ */ jsxRuntime.jsx(TabsPrimitive__namespace.List, { ref, className: list({ className }), ...props });
|
|
9813
9829
|
});
|
|
9814
9830
|
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
9815
|
-
var TabsTrigger =
|
|
9831
|
+
var TabsTrigger = React69__namespace.forwardRef((originProps, ref) => {
|
|
9816
9832
|
const { className, size, children, icon, variant, ...props } = originProps;
|
|
9817
9833
|
const { trigger, icon: iconClassName } = tabsVariants({ size, variant });
|
|
9818
9834
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -9822,14 +9838,14 @@ var TabsTrigger = React68__namespace.forwardRef((originProps, ref) => {
|
|
|
9822
9838
|
className: trigger({ className }),
|
|
9823
9839
|
...props,
|
|
9824
9840
|
children: [
|
|
9825
|
-
typeof icon !== "undefined" ?
|
|
9841
|
+
typeof icon !== "undefined" ? React69__namespace.cloneElement(icon, { className: iconClassName(), opacity: 1 }) : null,
|
|
9826
9842
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children })
|
|
9827
9843
|
]
|
|
9828
9844
|
}
|
|
9829
9845
|
);
|
|
9830
9846
|
});
|
|
9831
9847
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
9832
|
-
var TabsContent =
|
|
9848
|
+
var TabsContent = React69__namespace.forwardRef((oriProps, ref) => {
|
|
9833
9849
|
const { className, size, children, ...props } = oriProps;
|
|
9834
9850
|
const { content } = tabsVariants({ size });
|
|
9835
9851
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9843,16 +9859,16 @@ var TabsContent = React68__namespace.forwardRef((oriProps, ref) => {
|
|
|
9843
9859
|
);
|
|
9844
9860
|
});
|
|
9845
9861
|
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
9846
|
-
var OrderlyThemeContext =
|
|
9862
|
+
var OrderlyThemeContext = React69.createContext(
|
|
9847
9863
|
{}
|
|
9848
9864
|
);
|
|
9849
9865
|
var useOrderlyTheme = () => {
|
|
9850
|
-
return
|
|
9866
|
+
return React69.useContext(OrderlyThemeContext);
|
|
9851
9867
|
};
|
|
9852
9868
|
function useDrag(containerRef) {
|
|
9853
|
-
const [isDragging, setIsDragging] =
|
|
9854
|
-
const [startX, setStartX] =
|
|
9855
|
-
const [scrollLeft, setScrollLeft] =
|
|
9869
|
+
const [isDragging, setIsDragging] = React69.useState(false);
|
|
9870
|
+
const [startX, setStartX] = React69.useState(0);
|
|
9871
|
+
const [scrollLeft, setScrollLeft] = React69.useState(0);
|
|
9856
9872
|
const handleMouseDown = (e) => {
|
|
9857
9873
|
if (!containerRef.current) return;
|
|
9858
9874
|
setIsDragging(true);
|
|
@@ -9877,10 +9893,10 @@ function useDrag(containerRef) {
|
|
|
9877
9893
|
};
|
|
9878
9894
|
}
|
|
9879
9895
|
function useScroll2() {
|
|
9880
|
-
const [leadingVisible, setLeadingVisible] =
|
|
9881
|
-
const [tailingVisible, setTailingVisible] =
|
|
9882
|
-
const containerRef =
|
|
9883
|
-
|
|
9896
|
+
const [leadingVisible, setLeadingVisible] = React69.useState(false);
|
|
9897
|
+
const [tailingVisible, setTailingVisible] = React69.useState(false);
|
|
9898
|
+
const containerRef = React69.useRef(null);
|
|
9899
|
+
React69.useEffect(() => {
|
|
9884
9900
|
if (!containerRef.current) return;
|
|
9885
9901
|
const handleScroll = () => {
|
|
9886
9902
|
const container2 = containerRef.current;
|
|
@@ -9905,7 +9921,7 @@ function useScroll2() {
|
|
|
9905
9921
|
intersectionObserver.disconnect();
|
|
9906
9922
|
};
|
|
9907
9923
|
}, []);
|
|
9908
|
-
|
|
9924
|
+
React69.useEffect(() => {
|
|
9909
9925
|
if (!containerRef.current) return;
|
|
9910
9926
|
const intersectionObserver = new IntersectionObserver((entries) => {
|
|
9911
9927
|
entries.forEach((entry) => {
|
|
@@ -10022,7 +10038,7 @@ var ScrollIndicator = (props) => {
|
|
|
10022
10038
|
}
|
|
10023
10039
|
);
|
|
10024
10040
|
};
|
|
10025
|
-
var TabsContext =
|
|
10041
|
+
var TabsContext = React69.createContext({});
|
|
10026
10042
|
var Tabs = (props) => {
|
|
10027
10043
|
const { getComponentTheme } = useOrderlyTheme();
|
|
10028
10044
|
const {
|
|
@@ -10035,20 +10051,20 @@ var Tabs = (props) => {
|
|
|
10035
10051
|
} = props;
|
|
10036
10052
|
const tabsOverrides = getComponentTheme("tabs", { variant: "contained" });
|
|
10037
10053
|
const tabsVariant = variant || tabsOverrides.variant;
|
|
10038
|
-
const [tabList, setTabList] =
|
|
10039
|
-
const registerTab =
|
|
10054
|
+
const [tabList, setTabList] = React69.useState({});
|
|
10055
|
+
const registerTab = React69.useCallback((config) => {
|
|
10040
10056
|
setTabList((prev) => {
|
|
10041
10057
|
return { ...prev, [config.value]: config };
|
|
10042
10058
|
});
|
|
10043
10059
|
}, []);
|
|
10044
|
-
const unregisterTab =
|
|
10060
|
+
const unregisterTab = React69.useCallback((config) => {
|
|
10045
10061
|
setTabList((prev) => {
|
|
10046
10062
|
const newTabList = { ...prev };
|
|
10047
10063
|
delete newTabList[config.value];
|
|
10048
10064
|
return newTabList;
|
|
10049
10065
|
});
|
|
10050
10066
|
}, []);
|
|
10051
|
-
const memoizedValue =
|
|
10067
|
+
const memoizedValue = React69.useMemo(
|
|
10052
10068
|
() => ({ registerTab, unregisterTab }),
|
|
10053
10069
|
[registerTab, unregisterTab]
|
|
10054
10070
|
);
|
|
@@ -10121,8 +10137,8 @@ var Tabs = (props) => {
|
|
|
10121
10137
|
Tabs.displayName = "Tabs";
|
|
10122
10138
|
var TabPanel = (props) => {
|
|
10123
10139
|
const { title, value, icon, className, style, testid, children } = props;
|
|
10124
|
-
const { registerTab, unregisterTab } =
|
|
10125
|
-
|
|
10140
|
+
const { registerTab, unregisterTab } = React69.useContext(TabsContext);
|
|
10141
|
+
React69.useEffect(() => {
|
|
10126
10142
|
const tabConfig = {
|
|
10127
10143
|
title,
|
|
10128
10144
|
value,
|
|
@@ -10158,7 +10174,7 @@ var cardVariants = tv({
|
|
|
10158
10174
|
intensity: 900
|
|
10159
10175
|
}
|
|
10160
10176
|
});
|
|
10161
|
-
var CardBase =
|
|
10177
|
+
var CardBase = React69__namespace.default.forwardRef(
|
|
10162
10178
|
({ className, intensity, children, ...props }, ref) => {
|
|
10163
10179
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10164
10180
|
"div",
|
|
@@ -10172,7 +10188,7 @@ var CardBase = React68__namespace.default.forwardRef(
|
|
|
10172
10188
|
}
|
|
10173
10189
|
);
|
|
10174
10190
|
CardBase.displayName = "CardBase";
|
|
10175
|
-
var CardHeader =
|
|
10191
|
+
var CardHeader = React69__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10176
10192
|
"div",
|
|
10177
10193
|
{
|
|
10178
10194
|
ref,
|
|
@@ -10185,7 +10201,7 @@ var CardHeader = React68__namespace.default.forwardRef(({ className, children, .
|
|
|
10185
10201
|
}
|
|
10186
10202
|
));
|
|
10187
10203
|
CardHeader.displayName = "CardHeader";
|
|
10188
|
-
var CardTitle =
|
|
10204
|
+
var CardTitle = React69__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10189
10205
|
"h3",
|
|
10190
10206
|
{
|
|
10191
10207
|
ref,
|
|
@@ -10198,7 +10214,7 @@ var CardTitle = React68__namespace.default.forwardRef(({ className, children, ..
|
|
|
10198
10214
|
}
|
|
10199
10215
|
));
|
|
10200
10216
|
CardTitle.displayName = "CardTitle";
|
|
10201
|
-
var CardDescription =
|
|
10217
|
+
var CardDescription = React69__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10202
10218
|
"p",
|
|
10203
10219
|
{
|
|
10204
10220
|
ref,
|
|
@@ -10207,7 +10223,7 @@ var CardDescription = React68__namespace.default.forwardRef(({ className, childr
|
|
|
10207
10223
|
children
|
|
10208
10224
|
}
|
|
10209
10225
|
));
|
|
10210
|
-
var CardContent =
|
|
10226
|
+
var CardContent = React69__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10211
10227
|
"div",
|
|
10212
10228
|
{
|
|
10213
10229
|
ref,
|
|
@@ -10217,9 +10233,9 @@ var CardContent = React68__namespace.default.forwardRef(({ className, children,
|
|
|
10217
10233
|
}
|
|
10218
10234
|
));
|
|
10219
10235
|
CardContent.displayName = "CardContent";
|
|
10220
|
-
var CardFooter =
|
|
10236
|
+
var CardFooter = React69__namespace.default.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, ...props, children }));
|
|
10221
10237
|
CardFooter.displayName = "CardFooter";
|
|
10222
|
-
var Card =
|
|
10238
|
+
var Card = React69.forwardRef(
|
|
10223
10239
|
(props, ref) => {
|
|
10224
10240
|
const { title, children, footer, className, classNames, ...rest } = props;
|
|
10225
10241
|
return /* @__PURE__ */ jsxRuntime.jsxs(CardBase, { ...rest, className: tailwindVariants.cnBase(className, classNames?.root), ref, children: [
|
|
@@ -10232,7 +10248,7 @@ var Card = React68.forwardRef(
|
|
|
10232
10248
|
Card.displayName = "Card";
|
|
10233
10249
|
var HoverCardRoot = HoverCardPrimitive__namespace.Root;
|
|
10234
10250
|
var HoverCardTrigger = HoverCardPrimitive__namespace.Trigger;
|
|
10235
|
-
var HoverCardContent =
|
|
10251
|
+
var HoverCardContent = React69__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10236
10252
|
HoverCardPrimitive__namespace.Content,
|
|
10237
10253
|
{
|
|
10238
10254
|
ref,
|
|
@@ -10386,7 +10402,7 @@ var sliderVariants = tv({
|
|
|
10386
10402
|
}
|
|
10387
10403
|
}
|
|
10388
10404
|
});
|
|
10389
|
-
var BaseSlider =
|
|
10405
|
+
var BaseSlider = React69__namespace.forwardRef((oriProps, ref) => {
|
|
10390
10406
|
const {
|
|
10391
10407
|
className,
|
|
10392
10408
|
color,
|
|
@@ -10402,8 +10418,8 @@ var BaseSlider = React68__namespace.forwardRef((oriProps, ref) => {
|
|
|
10402
10418
|
const { track, range, thumb, root, trackInner, mark, tips } = sliderVariants({
|
|
10403
10419
|
color
|
|
10404
10420
|
});
|
|
10405
|
-
const [innerValue, setInvalue] =
|
|
10406
|
-
|
|
10421
|
+
const [innerValue, setInvalue] = React69__namespace.useState(__propsValue);
|
|
10422
|
+
React69__namespace.useEffect(() => {
|
|
10407
10423
|
setInvalue((prev) => {
|
|
10408
10424
|
if (!prev) {
|
|
10409
10425
|
return __propsValue;
|
|
@@ -10414,7 +10430,7 @@ var BaseSlider = React68__namespace.forwardRef((oriProps, ref) => {
|
|
|
10414
10430
|
return prev;
|
|
10415
10431
|
});
|
|
10416
10432
|
}, [__propsValue]);
|
|
10417
|
-
const innerMasks =
|
|
10433
|
+
const innerMasks = React69.useMemo(() => {
|
|
10418
10434
|
if (Array.isArray(marks) && marks.length > 0) {
|
|
10419
10435
|
return marks;
|
|
10420
10436
|
}
|
|
@@ -10510,14 +10526,14 @@ var Marks = (props) => {
|
|
|
10510
10526
|
className,
|
|
10511
10527
|
color = "primary"
|
|
10512
10528
|
} = props;
|
|
10513
|
-
const _value =
|
|
10514
|
-
const selIndex =
|
|
10529
|
+
const _value = React69.useMemo(() => value?.[0] ?? 0, [value]);
|
|
10530
|
+
const selIndex = React69.useMemo(() => {
|
|
10515
10531
|
if (typeof props.step === "undefined") {
|
|
10516
10532
|
return void 0;
|
|
10517
10533
|
}
|
|
10518
10534
|
return Math.floor(_value / props.step);
|
|
10519
10535
|
}, [_value, props.step]);
|
|
10520
|
-
const colorCls =
|
|
10536
|
+
const colorCls = React69.useMemo(() => {
|
|
10521
10537
|
switch (color) {
|
|
10522
10538
|
case "primary":
|
|
10523
10539
|
return "oui-border-primary oui-bg-primary";
|
|
@@ -10529,7 +10545,7 @@ var Marks = (props) => {
|
|
|
10529
10545
|
return "oui-border-primary-light oui-bg-primary-light";
|
|
10530
10546
|
}
|
|
10531
10547
|
}, [color]);
|
|
10532
|
-
const textCls =
|
|
10548
|
+
const textCls = React69.useMemo(() => {
|
|
10533
10549
|
switch (color) {
|
|
10534
10550
|
case "primary":
|
|
10535
10551
|
return "oui-text-primary";
|
|
@@ -10551,7 +10567,7 @@ var Marks = (props) => {
|
|
|
10551
10567
|
const __value = isInnerMask ? mark.value : index;
|
|
10552
10568
|
const active = (isInnerMask ? _value >= __value : _value >= mark.value) && _value >= 0 && !props.disabled;
|
|
10553
10569
|
const classNames = active ? colorCls : "";
|
|
10554
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10570
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React69.Fragment, { children: [
|
|
10555
10571
|
(!isInnerMask ? mark.label : true) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
10556
10572
|
"span",
|
|
10557
10573
|
{
|
|
@@ -10581,8 +10597,8 @@ var SliderTip = (props) => {
|
|
|
10581
10597
|
const percent = convertValueToPercentage(value, min, max);
|
|
10582
10598
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className, style: { lineHeight: "19px" }, children: props.tipFormatter?.(value, min, max, percent) ?? `${percent.toFixed()}%` });
|
|
10583
10599
|
};
|
|
10584
|
-
var SingleSlider =
|
|
10585
|
-
const _value =
|
|
10600
|
+
var SingleSlider = React69__namespace.forwardRef((props, ref) => {
|
|
10601
|
+
const _value = React69.useMemo(() => [props.value], [props.value]);
|
|
10586
10602
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10587
10603
|
BaseSlider,
|
|
10588
10604
|
{
|
|
@@ -10601,7 +10617,7 @@ var SingleSlider = React68__namespace.forwardRef((props, ref) => {
|
|
|
10601
10617
|
SingleSlider.displayName = "SingleSlider";
|
|
10602
10618
|
var Slider = BaseSlider;
|
|
10603
10619
|
Slider.single = SingleSlider;
|
|
10604
|
-
var ToastErrorIcon =
|
|
10620
|
+
var ToastErrorIcon = React69__namespace.default.forwardRef(
|
|
10605
10621
|
(props, ref) => {
|
|
10606
10622
|
const { opacity = 1, viewBox = "0 0 20 20", ...rest } = props;
|
|
10607
10623
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, viewBox, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10614,7 +10630,7 @@ var ToastErrorIcon = React68__namespace.default.forwardRef(
|
|
|
10614
10630
|
) });
|
|
10615
10631
|
}
|
|
10616
10632
|
);
|
|
10617
|
-
var ToastSuccessIcon =
|
|
10633
|
+
var ToastSuccessIcon = React69__namespace.default.forwardRef(
|
|
10618
10634
|
(props, ref) => {
|
|
10619
10635
|
const { opacity = 1, viewBox = "0 0 20 20", ...rest } = props;
|
|
10620
10636
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, viewBox, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10628,7 +10644,7 @@ var ToastSuccessIcon = React68__namespace.default.forwardRef(
|
|
|
10628
10644
|
) });
|
|
10629
10645
|
}
|
|
10630
10646
|
);
|
|
10631
|
-
var ToastLoadingIcon =
|
|
10647
|
+
var ToastLoadingIcon = React69__namespace.default.forwardRef(
|
|
10632
10648
|
(props, ref) => {
|
|
10633
10649
|
const { opacity = 1, viewBox = "0 0 20 20", ...rest } = props;
|
|
10634
10650
|
return /* @__PURE__ */ jsxRuntime.jsx(BaseIcon, { ref, viewBox, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10783,10 +10799,10 @@ var ToastTile = (props) => {
|
|
|
10783
10799
|
);
|
|
10784
10800
|
};
|
|
10785
10801
|
function useEndReached(sentinelRef, onEndReached) {
|
|
10786
|
-
const observer =
|
|
10787
|
-
const cb =
|
|
10802
|
+
const observer = React69.useRef();
|
|
10803
|
+
const cb = React69.useRef(onEndReached);
|
|
10788
10804
|
cb.current = onEndReached;
|
|
10789
|
-
|
|
10805
|
+
React69.useEffect(() => {
|
|
10790
10806
|
const options = {
|
|
10791
10807
|
root: null,
|
|
10792
10808
|
rootMargin: "0px",
|
|
@@ -10804,22 +10820,22 @@ function useEndReached(sentinelRef, onEndReached) {
|
|
|
10804
10820
|
observer.current?.disconnect();
|
|
10805
10821
|
};
|
|
10806
10822
|
}, []);
|
|
10807
|
-
|
|
10823
|
+
React69.useEffect(() => {
|
|
10808
10824
|
observer.current?.observe(sentinelRef.current);
|
|
10809
10825
|
}, []);
|
|
10810
10826
|
}
|
|
10811
10827
|
var ListViewInner = (props, ref) => {
|
|
10812
|
-
const sentinelRef =
|
|
10813
|
-
const containerRef =
|
|
10828
|
+
const sentinelRef = React69.useRef(null);
|
|
10829
|
+
const containerRef = React69.useRef(null);
|
|
10814
10830
|
useEndReached(sentinelRef, () => {
|
|
10815
10831
|
if (!props.isLoading) {
|
|
10816
10832
|
props.loadMore?.();
|
|
10817
10833
|
}
|
|
10818
10834
|
});
|
|
10819
|
-
const emptyDataSouce =
|
|
10835
|
+
const emptyDataSouce = React69.useMemo(() => {
|
|
10820
10836
|
return Array.isArray(props.dataSource) && props.dataSource.length <= 0;
|
|
10821
10837
|
}, [props.dataSource]);
|
|
10822
|
-
const listViewElement =
|
|
10838
|
+
const listViewElement = React69.useMemo(() => {
|
|
10823
10839
|
if (!props.dataSource) {
|
|
10824
10840
|
return null;
|
|
10825
10841
|
}
|
|
@@ -10836,16 +10852,16 @@ var ListViewInner = (props, ref) => {
|
|
|
10836
10852
|
}
|
|
10837
10853
|
);
|
|
10838
10854
|
}
|
|
10839
|
-
return props.dataSource.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10855
|
+
return props.dataSource.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(React69__namespace.default.Fragment, { children: props.renderItem(item, index, props.extraData) }, index));
|
|
10840
10856
|
}, [emptyDataSouce, props.dataSource, props.extraData, props.emptyView]);
|
|
10841
|
-
const loadingViewElement =
|
|
10857
|
+
const loadingViewElement = React69.useMemo(() => {
|
|
10842
10858
|
if ((props.dataSource?.length || 0) === 0) return null;
|
|
10843
10859
|
if (!props.isLoading) {
|
|
10844
10860
|
return null;
|
|
10845
10861
|
}
|
|
10846
10862
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oui-flex oui-py-2 oui-justify-center oui-items-center", children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) });
|
|
10847
10863
|
}, [props.isLoading, props.dataSource]);
|
|
10848
|
-
|
|
10864
|
+
React69.useImperativeHandle(ref, () => {
|
|
10849
10865
|
return {
|
|
10850
10866
|
scroll: (direction) => {
|
|
10851
10867
|
containerRef.current?.scroll({
|
|
@@ -10891,7 +10907,7 @@ var ListViewInner = (props, ref) => {
|
|
|
10891
10907
|
}
|
|
10892
10908
|
);
|
|
10893
10909
|
};
|
|
10894
|
-
var ListView =
|
|
10910
|
+
var ListView = React69.forwardRef(ListViewInner);
|
|
10895
10911
|
var Collapsible = CollapsiblePrimitive__namespace.Root;
|
|
10896
10912
|
var CollapsibleTrigger2 = CollapsiblePrimitive__namespace.CollapsibleTrigger;
|
|
10897
10913
|
var CollapsibleContent2 = (props) => {
|
|
@@ -10906,16 +10922,16 @@ var CollapsibleContent2 = (props) => {
|
|
|
10906
10922
|
}
|
|
10907
10923
|
);
|
|
10908
10924
|
};
|
|
10909
|
-
var CollapseContext =
|
|
10925
|
+
var CollapseContext = React69.createContext(
|
|
10910
10926
|
{}
|
|
10911
10927
|
);
|
|
10912
10928
|
var useCollapseContext = () => {
|
|
10913
|
-
return
|
|
10929
|
+
return React69.useContext(CollapseContext);
|
|
10914
10930
|
};
|
|
10915
10931
|
var Panel = (props) => {
|
|
10916
10932
|
const { activeKey, setActiveKey } = useCollapseContext();
|
|
10917
10933
|
const { header, headerClassName, itemKey, disabled } = props;
|
|
10918
|
-
const headerNode =
|
|
10934
|
+
const headerNode = React69.useMemo(() => {
|
|
10919
10935
|
if (typeof header === "string") {
|
|
10920
10936
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10921
10937
|
"div",
|
|
@@ -10960,8 +10976,8 @@ var Panel = (props) => {
|
|
|
10960
10976
|
};
|
|
10961
10977
|
var CollapseRoot = (props) => {
|
|
10962
10978
|
const { activeKey = "", children } = props;
|
|
10963
|
-
const [internalActiveKey, setInternalActiveKey] =
|
|
10964
|
-
const memoizedValue =
|
|
10979
|
+
const [internalActiveKey, setInternalActiveKey] = React69.useState(activeKey);
|
|
10980
|
+
const memoizedValue = React69.useMemo(() => {
|
|
10965
10981
|
return {
|
|
10966
10982
|
activeKey: internalActiveKey,
|
|
10967
10983
|
setActiveKey: setInternalActiveKey
|
|
@@ -10981,11 +10997,11 @@ var Marquee = (props) => {
|
|
|
10981
10997
|
className,
|
|
10982
10998
|
setApi
|
|
10983
10999
|
} = props;
|
|
10984
|
-
const isHorizontal =
|
|
11000
|
+
const isHorizontal = React69.useMemo(
|
|
10985
11001
|
() => carouselOptions.axis !== "y",
|
|
10986
11002
|
[carouselOptions.axis]
|
|
10987
11003
|
);
|
|
10988
|
-
const emblaOptions =
|
|
11004
|
+
const emblaOptions = React69.useMemo(() => {
|
|
10989
11005
|
return {
|
|
10990
11006
|
loop: true,
|
|
10991
11007
|
align: "start",
|
|
@@ -10995,7 +11011,7 @@ var Marquee = (props) => {
|
|
|
10995
11011
|
...carouselOptions
|
|
10996
11012
|
};
|
|
10997
11013
|
}, [carouselOptions]);
|
|
10998
|
-
const autoScrollPluginOptions =
|
|
11014
|
+
const autoScrollPluginOptions = React69.useMemo(() => {
|
|
10999
11015
|
return {
|
|
11000
11016
|
speed: 1,
|
|
11001
11017
|
direction: "forward",
|
|
@@ -11009,12 +11025,12 @@ var Marquee = (props) => {
|
|
|
11009
11025
|
const [emblaRef, emblaApi] = useEmblaCarousel__default.default(emblaOptions, [
|
|
11010
11026
|
AutoScroll__default.default(autoScrollPluginOptions)
|
|
11011
11027
|
]);
|
|
11012
|
-
|
|
11028
|
+
React69__namespace.default.useEffect(() => {
|
|
11013
11029
|
if (emblaApi && setApi) {
|
|
11014
11030
|
setApi(emblaApi);
|
|
11015
11031
|
}
|
|
11016
11032
|
}, [emblaApi, setApi]);
|
|
11017
|
-
const renderSlides =
|
|
11033
|
+
const renderSlides = React69.useMemo(() => {
|
|
11018
11034
|
if (!Array.isArray(data) || data.length === 0) {
|
|
11019
11035
|
return null;
|
|
11020
11036
|
}
|
|
@@ -11161,7 +11177,7 @@ var dropdownMenuVariants = tailwindVariants.tv({
|
|
|
11161
11177
|
size: "lg"
|
|
11162
11178
|
}
|
|
11163
11179
|
});
|
|
11164
|
-
var DropdownMenuContent =
|
|
11180
|
+
var DropdownMenuContent = React69__namespace.forwardRef(({ className, sideOffset = 4, size, ...props }, ref) => {
|
|
11165
11181
|
const { content } = dropdownMenuVariants({ size });
|
|
11166
11182
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11167
11183
|
DropdownMenuPrimitive__namespace.Content,
|
|
@@ -11174,7 +11190,7 @@ var DropdownMenuContent = React68__namespace.forwardRef(({ className, sideOffset
|
|
|
11174
11190
|
) });
|
|
11175
11191
|
});
|
|
11176
11192
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
11177
|
-
var DropdownMenuItem =
|
|
11193
|
+
var DropdownMenuItem = React69__namespace.forwardRef(({ className, inset, size, ...props }, ref) => {
|
|
11178
11194
|
const { item } = dropdownMenuVariants({ size });
|
|
11179
11195
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11180
11196
|
DropdownMenuPrimitive__namespace.Item,
|
|
@@ -11186,7 +11202,7 @@ var DropdownMenuItem = React68__namespace.forwardRef(({ className, inset, size,
|
|
|
11186
11202
|
);
|
|
11187
11203
|
});
|
|
11188
11204
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
11189
|
-
var DropdownMenuLabel =
|
|
11205
|
+
var DropdownMenuLabel = React69__namespace.forwardRef(({ className, inset, ...props }, ref) => {
|
|
11190
11206
|
const { label } = dropdownMenuVariants({
|
|
11191
11207
|
inset
|
|
11192
11208
|
});
|
|
@@ -11200,7 +11216,7 @@ var DropdownMenuLabel = React68__namespace.forwardRef(({ className, inset, ...pr
|
|
|
11200
11216
|
);
|
|
11201
11217
|
});
|
|
11202
11218
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
11203
|
-
var DropdownMenuSeparator =
|
|
11219
|
+
var DropdownMenuSeparator = React69__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
11204
11220
|
const { separator } = dropdownMenuVariants();
|
|
11205
11221
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11206
11222
|
DropdownMenuPrimitive__namespace.Separator,
|
|
@@ -11222,7 +11238,7 @@ var DropdownMenuShortcut = ({
|
|
|
11222
11238
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
11223
11239
|
var SimpleDropdownMenu = (props) => {
|
|
11224
11240
|
const { currentValue, menu, render, size, children, ...contentProps } = props;
|
|
11225
|
-
const items =
|
|
11241
|
+
const items = React69.useMemo(() => {
|
|
11226
11242
|
if (typeof props.render === "function") {
|
|
11227
11243
|
return props.menu.map((item, index) => {
|
|
11228
11244
|
return props.render?.(item, index);
|
|
@@ -11261,7 +11277,7 @@ var SimpleDropdownMenu = (props) => {
|
|
|
11261
11277
|
] });
|
|
11262
11278
|
};
|
|
11263
11279
|
var ComponentsProvider = (props) => {
|
|
11264
|
-
|
|
11280
|
+
React69.useEffect(() => {
|
|
11265
11281
|
if (props.components && Object.keys(props.components).length) {
|
|
11266
11282
|
for (const position in props.components) {
|
|
11267
11283
|
const Element = props.components[position];
|
|
@@ -11279,20 +11295,20 @@ var ComponentsProvider = (props) => {
|
|
|
11279
11295
|
};
|
|
11280
11296
|
var OrderlyThemeProvider = (props) => {
|
|
11281
11297
|
const { components, overrides, children } = props;
|
|
11282
|
-
const resolveComponentTheme =
|
|
11298
|
+
const resolveComponentTheme = React69.useCallback(
|
|
11283
11299
|
(component, defaultValue) => {
|
|
11284
11300
|
return overrides?.[component] || defaultValue;
|
|
11285
11301
|
},
|
|
11286
11302
|
[overrides]
|
|
11287
11303
|
);
|
|
11288
|
-
const memoizedValue =
|
|
11304
|
+
const memoizedValue = React69.useMemo(() => {
|
|
11289
11305
|
return { getComponentTheme: resolveComponentTheme };
|
|
11290
11306
|
}, [resolveComponentTheme]);
|
|
11291
11307
|
return /* @__PURE__ */ jsxRuntime.jsx(OrderlyThemeContext.Provider, { value: memoizedValue, children: /* @__PURE__ */ jsxRuntime.jsx(ComponentsProvider, { components, children }) });
|
|
11292
11308
|
};
|
|
11293
|
-
var Either =
|
|
11309
|
+
var Either = React69.memo((props) => {
|
|
11294
11310
|
const { value, children, left } = props;
|
|
11295
|
-
const inputValue =
|
|
11311
|
+
const inputValue = React69.useMemo(
|
|
11296
11312
|
() => Boolean(typeof value === "function" ? value() : value),
|
|
11297
11313
|
[value]
|
|
11298
11314
|
);
|
|
@@ -11568,6 +11584,7 @@ exports.QuestionFillIcon = QuestionFillIcon;
|
|
|
11568
11584
|
exports.ReduceIcon = ReduceIcon;
|
|
11569
11585
|
exports.ReferralSolidIcon = ReferralSolidIcon;
|
|
11570
11586
|
exports.RefreshIcon = RefreshIcon;
|
|
11587
|
+
exports.RwaIcon = RwaIcon;
|
|
11571
11588
|
exports.ScrollArea = ScrollArea;
|
|
11572
11589
|
exports.ScrollBar = ScrollBar;
|
|
11573
11590
|
exports.ScrollIndicator = ScrollIndicator;
|