tek-wallet 0.0.760 → 0.0.762

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.
Files changed (49) hide show
  1. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +15 -24
  2. package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +4 -2
  3. package/dist/components/TekWallet/components/ui/ActivityItem/index.js +4 -2
  4. package/dist/components/TekWallet/components/ui/AnalyticGroupCenter/index.js +10 -42
  5. package/dist/components/TekWallet/components/ui/AssetViewHeader/index.js +12 -11
  6. package/dist/components/TekWallet/components/ui/CloseModal/index.js +1 -1
  7. package/dist/components/TekWallet/components/ui/CopyTextComponent/index.d.ts +2 -1
  8. package/dist/components/TekWallet/components/ui/CopyTextComponent/index.js +4 -3
  9. package/dist/components/TekWallet/components/ui/CopyableText/index.js +1 -1
  10. package/dist/components/TekWallet/components/ui/EmptyData/index.js +1 -1
  11. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareAction.js +2 -2
  12. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareImage.js +13 -13
  13. package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +11 -5
  14. package/dist/components/TekWallet/components/ui/QRCode/index.js +1 -1
  15. package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +10 -8
  16. package/dist/components/TekWallet/components/ui/QrCodeReader/reader.json +2644 -0
  17. package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +1 -1
  18. package/dist/components/TekWallet/components/ui/SendExternalToken/index.js +1 -1
  19. package/dist/components/TekWallet/components/ui/SvgPath/index.d.ts +1 -0
  20. package/dist/components/TekWallet/components/ui/SvgPath/index.js +24 -23
  21. package/dist/components/TekWallet/components/ui/WaitingData/index.js +29 -5
  22. package/dist/components/TekWallet/components/views/AssetView/index.js +6 -10
  23. package/dist/components/TekWallet/components/views/DetailActivityView/index.d.ts +8 -0
  24. package/dist/components/TekWallet/components/views/DetailActivityView/index.js +31 -0
  25. package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +1 -4
  26. package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js +1 -1
  27. package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +1 -1
  28. package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +1 -4
  29. package/dist/components/TekWallet/components/views/SettingView/index.d.ts +1 -1
  30. package/dist/components/TekWallet/components/views/SettingView/index.js +1 -1
  31. package/dist/components/TekWallet/components/views/TekWalletView/expose.d.ts +0 -1
  32. package/dist/components/TekWallet/components/views/TekWalletView/expose.js +0 -1
  33. package/dist/components/TekWallet/components/views/TekWalletView/index.d.ts +10 -6
  34. package/dist/components/TekWallet/components/views/TekWalletView/index.js +48 -5
  35. package/dist/components/TekWallet/providers/EventHandlerProvider/index.js +26 -2
  36. package/dist/components/TekWallet/providers/RealtimeProvider/index.js +33 -5
  37. package/dist/components/TekWallet/providers/RealtimeProvider/type.d.ts +1 -0
  38. package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +3 -1
  39. package/dist/components/TekWallet/providers/WalletDataProvider/index.js +2 -0
  40. package/dist/components/TekWallet/providers/WalletDataProviderNoImport/index.js +2 -0
  41. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.js +3 -3
  42. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.js +3 -3
  43. package/dist/components/TekWallet/theme/mui/theme.js +5 -5
  44. package/dist/components/TekWallet/types/expose-type.d.ts +4 -0
  45. package/dist/components/TekWallet/utils/stopPropagation.d.ts +2 -0
  46. package/dist/components/TekWallet/utils/stopPropagation.js +7 -0
  47. package/package.json +2 -1
  48. package/dist/components/TekWallet/components/views/TekWalletView/routes.d.ts +0 -10
  49. package/dist/components/TekWallet/components/views/TekWalletView/routes.js +0 -45
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.Status = void 0;
18
18
  var jsx_runtime_1 = require("react/jsx-runtime");
19
19
  var material_1 = require("@mui/material");
20
+ var link_1 = __importDefault(require("next/link"));
20
21
  var ThemeProvider_1 = require("../../../providers/ThemeProvider");
21
22
  var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
22
23
  var EmptyData_1 = __importDefault(require("../EmptyData"));
@@ -24,10 +25,8 @@ var ActivityItem_1 = __importDefault(require("../ActivityItem"));
24
25
  var useActivities_1 = __importDefault(require("../../../hooks/useActivities"));
25
26
  var react_1 = require("react");
26
27
  var WaitingData_1 = __importDefault(require("../WaitingData"));
27
- var DrawerComponent_1 = __importDefault(require("../DrawerComponent"));
28
- var ModalLayout_1 = __importDefault(require("../ModalLayout"));
29
- var ActivityDetail_1 = __importDefault(require("../ActivityDetail"));
30
28
  var SmartList_1 = __importDefault(require("../SmartList"));
29
+ var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
31
30
  var Status;
32
31
  (function (Status) {
33
32
  Status["Loading"] = "loading";
@@ -36,12 +35,12 @@ var Status;
36
35
  })(Status || (exports.Status = Status = {}));
37
36
  var prefix = "activities_";
38
37
  function ActivitiesTypeSlice(props) {
39
- var _a, _b, _c;
38
+ var _a, _b;
40
39
  var theme = (0, ThemeProvider_1.useTheme)();
41
- var _d = (0, useActivities_1.default)(), activities = _d.activities, loadActivities = _d.loadActivities, loadOutActivityType = _d.loadOutActivityType;
40
+ var _c = (0, useActivities_1.default)(), activities = _c.activities, loadActivities = _c.loadActivities, loadOutActivityType = _c.loadOutActivityType;
42
41
  var type = props.type, isActive = props.isActive, limitItems = props.limitItems, sx = props.sx;
43
- var _e = (0, react_1.useState)(undefined), detailActivity = _e[0], setDetailActivity = _e[1];
44
- var detailDrawerRef = (0, react_1.useRef)(null);
42
+ var options = (0, TekWalletProvider_1.useWalletConfig)().options;
43
+ var basePath = (options || {}).basePath;
45
44
  var activitiesByType = (0, react_1.useMemo)(function () {
46
45
  if (!(type === null || type === void 0 ? void 0 : type.slug))
47
46
  return undefined;
@@ -54,16 +53,6 @@ function ActivitiesTypeSlice(props) {
54
53
  return Status.Filled;
55
54
  return Status.Empty;
56
55
  }, [type, activitiesByType]);
57
- var openDetail = (0, react_1.useCallback)(function (activity) {
58
- var _a;
59
- setDetailActivity(activity);
60
- (_a = detailDrawerRef.current) === null || _a === void 0 ? void 0 : _a.open();
61
- }, []);
62
- var closeDetail = (0, react_1.useCallback)(function (e) {
63
- var _a;
64
- e.stopPropagation();
65
- (_a = detailDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
66
- }, []);
67
56
  (0, react_1.useEffect)(function () {
68
57
  if (!isActive || !!activitiesByType)
69
58
  return;
@@ -72,12 +61,14 @@ function ActivitiesTypeSlice(props) {
72
61
  var loadMore = (0, react_1.useCallback)(function () {
73
62
  loadActivities(type.slug);
74
63
  }, [loadActivities, type.slug]);
75
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ width: "100%", height: "100%", display: "flex", paddingTop: theme.mixins.customPadding.p8, px: theme.mixins.customPadding.p16 }, sx), children: [status === Status.Loading && (0, jsx_runtime_1.jsx)(WaitingData_1.default, { sx: { marginBottom: "auto" } }), status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SmartList_1.default, { loadMoreData: loadMore, hasMore: !loadOutActivityType[type.slug] &&
76
- ((activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.length) || 0) < (limitItems || Infinity), loadingComponent: (0, jsx_runtime_1.jsx)(WaitingData_1.default, { numberOfSkeleton: 3, sx: { marginTop: theme.mixins.customMargin.m12 } }), sx: {}, children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: (_b = activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.slice(0, limitItems)) === null || _b === void 0 ? void 0 : _b.map(function (activity, index) {
77
- if (!activity)
78
- return null;
79
- var dataAsJson = JSON.stringify(activity);
80
- return ((0, jsx_runtime_1.jsx)(ActivityItem_1.default, { onClick: function () { return openDetail(activity); }, data: dataAsJson }, index));
81
- }) }) }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: detailDrawerRef, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { onClose: closeDetail, title: (_c = detailActivity === null || detailActivity === void 0 ? void 0 : detailActivity.transaction_type) === null || _c === void 0 ? void 0 : _c.name, children: (0, jsx_runtime_1.jsx)(ActivityDetail_1.default, { activityData: detailActivity }) }) })] }))] }));
64
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ width: "100%", height: "100%", display: "flex", paddingTop: theme.mixins.customPadding.p16, px: theme.mixins.customPadding.p16 }, sx), children: [status === Status.Loading && (0, jsx_runtime_1.jsx)(WaitingData_1.default, { sx: { marginBottom: "auto" } }), status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { marginBottom: "auto", marginTop: "4rem" }, icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(SmartList_1.default, { loadMoreData: loadMore, hasMore: !loadOutActivityType[type.slug] &&
65
+ ((activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.length) || 0) < (limitItems || Infinity), loadingComponent: (0, jsx_runtime_1.jsx)(WaitingData_1.default, { numberOfSkeleton: 3, sx: { marginTop: theme.mixins.customMargin.m12 } }), sx: {}, children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, pb: theme.mixins.customPadding.p32 }), children: (_b = activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.slice(0, limitItems)) === null || _b === void 0 ? void 0 : _b.map(function (activity, index) {
66
+ if (!activity)
67
+ return null;
68
+ var dataAsJson = JSON.stringify(activity);
69
+ return ((0, jsx_runtime_1.jsx)(ActivityItem_1.default
70
+ // onClick={() => openDetail(activity)}
71
+ , { data: dataAsJson, component: link_1.default, href: "".concat(basePath || "", "/tek-wallet/activity/").concat(activity.id) }, index));
72
+ }) }) }) }))] }));
82
73
  }
83
74
  exports.default = ActivitiesTypeSlice;
@@ -84,10 +84,12 @@ function ActivityDetail(props) {
84
84
  borderRadius: theme.mixins.customRadius.full,
85
85
  border: isSwap ? "0.25rem white solid" : "none",
86
86
  ml: "-1rem",
87
- } }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g4, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: getAmountColor() }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), isSwap && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: theme.palette.text.successStatus }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) }))] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: (0, formatDate_1.default)(activityData.date_created) }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "secondary", size: 16 })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
87
+ } }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g4, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, textAlign: "center", color: getAmountColor() }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), isSwap && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: theme.palette.text.successStatus }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) }))] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: (0, formatDate_1.default)(activityData.date_created, true) }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { sx: {
88
+ color: theme.palette.text.loadingStatus,
89
+ }, size: 16 })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
88
90
  fontSize: theme.typography.fontSize12,
89
91
  textTransform: "capitalize",
90
92
  color: getStatusColor(),
91
- }, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.paper), { p: theme.mixins.gaps.g12, width: "100%" }), children: [isReceive && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: activityData === null || activityData === void 0 ? void 0 : activityData.from_address, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "From" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: activityData === null || activityData === void 0 ? void 0 : activityData.from_address })] }) })), !!toAddress && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: toAddress, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Recipient address" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: toAddress })] }) }))] })] }));
93
+ }, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.paper), { p: 0, width: "100%" }), children: [isReceive && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: activityData === null || activityData === void 0 ? void 0 : activityData.from_address, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "From" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: activityData === null || activityData === void 0 ? void 0 : activityData.from_address })] }) })), !!toAddress && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: toAddress, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Recipient address" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: toAddress })] }) }))] })] }));
92
94
  }
93
95
  exports.default = ActivityDetail;
@@ -52,7 +52,7 @@ function ActivityItem(props) {
52
52
  return type === null || type === void 0 ? void 0 : type.slug;
53
53
  }, [type]);
54
54
  var isIncrease = (0, react_1.useMemo)(function () {
55
- return slug === type_1.TransactionSlug.DEPOSIT;
55
+ return slug === type_1.TransactionSlug.DEPOSIT || slug === type_1.TransactionSlug.RECEIVE;
56
56
  }, [slug]);
57
57
  var currency = (0, react_1.useMemo)(function () {
58
58
  return activityData === null || activityData === void 0 ? void 0 : activityData.currency_data;
@@ -95,7 +95,9 @@ function ActivityItem(props) {
95
95
  return ((0, jsx_runtime_1.jsxs)(material_1.ListItemButton, __assign({ sx: __assign(__assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, p: theme.mixins.customPadding.p12, flexGrow: "unset", boxShadow: theme.shadows[1] }), sx) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
96
96
  width: "fit-content",
97
97
  height: "fit-content",
98
- }, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: type === null || type === void 0 ? void 0 : type.link, width: 24, sx: { borderRadius: theme.mixins.customRadius.full } }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityTitle, children: type === null || type === void 0 ? void 0 : type.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityDescription, children: descriptionElement }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "secondary", size: 12 })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
98
+ }, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: type === null || type === void 0 ? void 0 : type.link, width: 28, sx: { borderRadius: theme.mixins.customRadius.full } }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityTitle, children: type === null || type === void 0 ? void 0 : type.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityDescription, children: descriptionElement }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 12, sx: {
99
+ color: theme.palette.text.loadingStatus,
100
+ } })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
99
101
  fontSize: theme.typography.fontSize12,
100
102
  textTransform: "capitalize",
101
103
  color: getStatusColor(),
@@ -20,16 +20,14 @@ var Formatter_1 = __importDefault(require("../Formatter"));
20
20
  var material_1 = require("@mui/material");
21
21
  var providers_1 = require("../../../providers");
22
22
  var SvgPath_1 = require("../SvgPath");
23
- var TimeFilter_1 = require("../TimeFilter");
24
23
  var user_1 = __importDefault(require("../../../store/user"));
25
24
  var balance_1 = __importDefault(require("../../../store/balance"));
26
25
  var AnalyticGroup = function (props) {
27
- var sx = props.sx, timeRange = props.timeRange;
26
+ var sx = props.sx;
28
27
  var theme = (0, providers_1.useTheme)();
29
28
  var isShowBalance = (0, user_1.default)(function (state) { return state.settings.balance.isShowBalance; });
30
29
  var toggleShowBalance = (0, user_1.default)(function (state) { return state.toggleShowBalance; });
31
30
  var totalBalanceInUSD = (0, balance_1.default)(function (state) { return state.totalBalanceInUSD; });
32
- var analytic = (0, balance_1.default)(function (state) { return state.analytic; });
33
31
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { justifyContent: "space-between", alignItems: "flex-start" }), sx), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g6, position: "relative" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
34
32
  fontSize: theme.typography.fontSize15,
35
33
  fontWeight: theme.typography.fontWeight500,
@@ -46,49 +44,19 @@ var AnalyticGroup = function (props) {
46
44
  backgroundColor: theme.palette.text.accent2,
47
45
  transform: "translate(calc(-50% + 1px), calc(-50% + 1px)) rotate(45deg)",
48
46
  transformOrigin: "center center",
49
- } })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
47
+ } })] })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
50
48
  display: "flex",
51
49
  flexDirection: "column",
52
50
  alignItems: "flex-end",
53
51
  gap: theme.mixins.gaps.g6,
54
52
  fontSize: theme.typography.fontSize12,
55
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.mixins.row), theme.mixins.value), { alignItems: "baseline", fontSize: theme.typography.fontSize20, gap: theme.mixins.gaps.g2 }), children: isShowBalance ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: { fontWeight: theme.typography.fontWeight700 }, value: totalBalanceInUSD, unit: "USD", hideUnitOutSide: true }), !!totalBalanceInUSD && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
56
- fontWeight: theme.typography.fontWeight400,
57
- fontSize: "0.8em",
58
- }, children: "$" }), false && ((0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_DOWN }))] }))] })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
59
- fontSize: theme.typography.fontSize24,
60
- fontWeight: theme.typography.fontWeight700,
61
- color: theme.palette.text.black,
62
- }, children: "******" })) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [!!timeRange && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
63
- fontWeight: theme.typography.fontWeight600,
64
- leading: theme.typography.leading140,
65
- fontSize: theme.typography.fontSize12,
66
- textTransform: "capitalize",
67
- color: theme.palette.text.accent,
68
- }, children: TimeFilter_1.TIME_FILTER_LABEL[timeRange] })), !!(analytic === null || analytic === void 0 ? void 0 : analytic.pnl) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isShowBalance && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_UP }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: theme.palette.text.alertStatus, fontSize: theme.typography.fontSize12, fontWeight: theme.typography.fontWeight600, borderBottom: "1px dashed currentColor" }), children: [(0, jsx_runtime_1.jsx)("span", { children: (analytic === null || analytic === void 0 ? void 0 : analytic.pnl) > 0 ? "+" : "" }), " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: analytic === null || analytic === void 0 ? void 0 : analytic.pnl }), " ", "(", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: analytic === null || analytic === void 0 ? void 0 : analytic.pnl_percent, unit: "%" }), ")"] })] })), !isShowBalance && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
69
- fontSize: theme.typography.fontSize12,
70
- fontWeight: theme.typography.fontWeight600,
71
- color: theme.palette.text.accent2,
72
- display: theme.mixins.row,
73
- }, children: "******" }))] }))] }), false && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
74
- width: "110%",
75
- borderColor: "".concat(theme.palette.border.accent),
76
- opacity: 0.2,
77
- marginTop: theme.mixins.customMargin.m4,
78
- } }), isShowBalance && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
79
- fontWeight: theme.typography.fontWeight500,
80
- leading: theme.typography.leading140,
81
- fontSize: theme.typography.fontSize12,
82
- textTransform: "capitalize",
83
- color: theme.palette.text.accent,
84
- }, children: "Profit" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
85
- fontSize: theme.typography.fontSize12,
86
- fontWeight: theme.typography.fontWeight600,
87
- color: theme.palette.text.accent2,
88
- }, children: "\u2248 250k XP" }) }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 14, height: 14 }, children: SvgPath_1.IC_INFORMATION })] })), !isShowBalance && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
89
- fontSize: theme.typography.fontSize12,
90
- fontWeight: theme.typography.fontWeight600,
91
- color: theme.palette.text.accent2,
92
- }, children: "******" }))] }))] })] }));
53
+ }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.mixins.row), theme.mixins.value), { alignItems: "baseline", fontSize: theme.typography.fontSize20, gap: theme.mixins.gaps.g2 }), children: isShowBalance ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: { fontWeight: theme.typography.fontWeight700 }, value: totalBalanceInUSD, unit: "USD", hideUnitOutSide: true }), !!totalBalanceInUSD && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
54
+ fontWeight: theme.typography.fontWeight400,
55
+ fontSize: "0.8em",
56
+ }, children: "$" }), false && ((0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_DOWN }))] }))] })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
57
+ fontSize: theme.typography.fontSize24,
58
+ fontWeight: theme.typography.fontWeight700,
59
+ color: theme.palette.text.black,
60
+ }, children: "******" })) }) })] }));
93
61
  };
94
62
  exports.default = AnalyticGroup;
@@ -59,27 +59,28 @@ var SvgPath_1 = require("../SvgPath");
59
59
  var CloseModal_1 = __importDefault(require("../CloseModal"));
60
60
  var react_1 = require("react");
61
61
  var link_1 = __importDefault(require("next/link"));
62
- var routes_1 = require("../../views/TekWalletView/routes");
63
62
  var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
63
+ var TekWalletView_1 = require("../../views/TekWalletView");
64
+ var Icon_1 = __importDefault(require("../Icon"));
64
65
  var AssetViewHeader = function () {
65
66
  var _a = (0, useWallet_1.default)(), masterWallet = _a.masterWallet, blockchainWallets = _a.blockchainWallets;
66
67
  var options = (0, TekWalletProvider_1.useWalletConfig)().options;
67
68
  var theme = (0, ThemeProvider_1.useTheme)();
68
69
  var modalRef = (0, react_1.useRef)(null);
69
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "center", position: "relative" }), children: [(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(options === null || options === void 0 ? void 0 : options.basePath, "/tek-wallet/").concat(routes_1.TekWalletViewRoutes.SETTING), children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
70
- width: 24,
71
- height: 24,
72
- position: "absolute",
73
- left: "16px",
74
- top: "50%",
75
- transform: "translateY(-50%)",
76
- }, children: SvgPath_1.IC_SETTING }) }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: modalRef, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "center", justifyContent: "center", textAlign: "center", gap: theme.mixins.gaps.g4, py: theme.mixins.customPadding.p8 }), theme.mixins.value), children: [(0, compactWalletAddress_1.default)(masterWallet), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 10 }, children: SvgPath_1.ARROW_DROP_DOWN })] }), direction: DrawerComponent_1.DRAWER_DIRECTION.TOP, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
70
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "center", position: "relative", boxShadow: "0 0 1px 2px rgba(0, 0, 0, 0.03)" }), children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: modalRef, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "center", justifyContent: "center", textAlign: "center", gap: theme.mixins.gaps.g4, py: theme.mixins.customPadding.p8 }), theme.mixins.value), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1.25rem", height: "1.25rem" }, children: SvgPath_1.WALLET }), (0, compactWalletAddress_1.default)(masterWallet), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "0.625rem", height: "0.625rem" }, children: SvgPath_1.ARROW_DROP_DOWN })] }), direction: DrawerComponent_1.DRAWER_DIRECTION.TOP, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
77
71
  width: "100%",
78
72
  height: "fit-content",
79
73
  backgroundColor: "white",
80
74
  padding: theme.mixins.customPadding.p16,
81
- }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.mixins.headerTitle), { py: theme.mixins.customPadding.p8, textAlign: "left" }), children: "Wallet address" }), (0, jsx_runtime_1.jsx)(CloseModal_1.default, { onClick: function () { var _a; return (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.close(); } })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [!!masterWallet && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: masterWallet !== null && masterWallet !== void 0 ? masterWallet : "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ py: theme.mixins.customPadding.p8 }, theme.mixins.row), { justifyContent: "space-between", alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listTitle), children: "Internal wallet" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listDescription), children: (0, compactWalletAddress_1.default)(masterWallet) })] }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
75
+ }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.mixins.headerTitle), { py: theme.mixins.customPadding.p8, textAlign: "left" }), children: "Wallet address" }), (0, jsx_runtime_1.jsx)(CloseModal_1.default, { onClick: function () { var _a; return (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.close(); } })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [!!masterWallet && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: masterWallet !== null && masterWallet !== void 0 ? masterWallet : "", messageSuccess: "Copied Internal address", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ py: theme.mixins.customPadding.p8 }, theme.mixins.row), { justifyContent: "space-between", alignItems: "center", gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1.75rem", height: "1.75rem", opacity: 0.7 }, children: SvgPath_1.WALLET }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listTitle), children: "Internal wallet" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listDescription), children: (0, compactWalletAddress_1.default)(masterWallet) })] }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1rem", height: "1rem" }, children: SvgPath_1.IC_COPY })] }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
82
76
  my: theme.mixins.customPadding.p8,
83
- } })] })), blockchainWallets === null || blockchainWallets === void 0 ? void 0 : blockchainWallets.map(function (wallet, index) { return ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: wallet.blockchainAddress, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ py: theme.mixins.customPadding.p8 }, theme.mixins.row), { justifyContent: "space-between", alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listTitle), children: wallet.networkSlug }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listDescription), children: (0, compactWalletAddress_1.default)(wallet.blockchainAddress) })] }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] }) }, wallet.blockchainAddress + index)); })] })] }) })] }));
77
+ } })] })), blockchainWallets === null || blockchainWallets === void 0 ? void 0 : blockchainWallets.map(function (wallet, index) { return ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: wallet.blockchainAddress, messageSuccess: "Copied ".concat(wallet.networkName, " address"), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ py: theme.mixins.customPadding.p8 }, theme.mixins.row), { gap: theme.mixins.gaps.g8, justifyContent: "space-between", alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: wallet.networkIcon, width: 28, sx: { borderRadius: theme.mixins.customRadius.full } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listTitle), children: wallet.networkName }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.listDescription), children: (0, compactWalletAddress_1.default)(wallet.blockchainAddress) })] }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1rem", height: "1rem" }, children: SvgPath_1.IC_COPY })] }) }, wallet.blockchainAddress + index)); })] })] }) }), (0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat((options === null || options === void 0 ? void 0 : options.basePath) || "", "/tek-wallet/").concat(TekWalletView_1.TekWalletViewRoutes.SETTING), children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
78
+ width: "1.5rem",
79
+ height: "1.5rem",
80
+ position: "absolute",
81
+ right: "16px",
82
+ top: "50%",
83
+ transform: "translateY(-50%)",
84
+ }, children: SvgPath_1.IC_SETTING }) })] }));
84
85
  };
85
86
  exports.default = AssetViewHeader;
@@ -27,6 +27,6 @@ var material_1 = require("@mui/material");
27
27
  var SvgPath_1 = require("../SvgPath");
28
28
  var CloseModal = function (props) {
29
29
  var sx = props.sx, rest = __rest(props, ["sx"]);
30
- return ((0, jsx_runtime_1.jsx)(material_1.SvgIcon, __assign({ sx: __assign({ width: 16, height: 16 }, sx) }, rest, { children: SvgPath_1.IC_CLOSE })));
30
+ return ((0, jsx_runtime_1.jsx)(material_1.SvgIcon, __assign({ sx: __assign({ width: "1rem", height: "1rem" }, sx) }, rest, { children: SvgPath_1.IC_CLOSE })));
31
31
  };
32
32
  exports.default = CloseModal;
@@ -3,6 +3,7 @@ interface CopyTextComponentProps extends GeneralProps {
3
3
  value: string;
4
4
  iconSuccess?: React.ReactNode;
5
5
  hideTextMessage?: boolean;
6
+ messageSuccess?: string;
6
7
  }
7
- declare const CopyTextComponent: ({ value, iconSuccess, children, hideTextMessage, sx, }: CopyTextComponentProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const CopyTextComponent: ({ value, iconSuccess, children, hideTextMessage, sx, messageSuccess, }: CopyTextComponentProps) => import("react/jsx-runtime").JSX.Element;
8
9
  export default CopyTextComponent;
@@ -57,7 +57,7 @@ var ThemeProvider_1 = require("../../../providers/ThemeProvider");
57
57
  var Text_1 = __importDefault(require("../Text"));
58
58
  var SvgPath_1 = require("../SvgPath");
59
59
  var CopyTextComponent = function (_a) {
60
- var value = _a.value, iconSuccess = _a.iconSuccess, children = _a.children, hideTextMessage = _a.hideTextMessage, sx = _a.sx;
60
+ var value = _a.value, iconSuccess = _a.iconSuccess, children = _a.children, hideTextMessage = _a.hideTextMessage, sx = _a.sx, messageSuccess = _a.messageSuccess;
61
61
  var theme = (0, ThemeProvider_1.useTheme)();
62
62
  var _b = (0, react_1.useState)(false), showSuccess = _b[0], setShowSuccess = _b[1];
63
63
  var copyText = function (e) { return __awaiter(void 0, void 0, void 0, function () {
@@ -94,7 +94,7 @@ var CopyTextComponent = function (_a) {
94
94
  position: "absolute",
95
95
  top: 0,
96
96
  left: "50%",
97
- transform: "translate(-50%, -120%) scale(".concat(showSuccess ? 1 : 0, ")"),
97
+ transform: "translate(-50%, -80%) scale(".concat(showSuccess ? 1 : 0, ")"),
98
98
  transformOrigin: "center bottom",
99
99
  backgroundColor: theme.palette.background.black,
100
100
  backdropFilter: "blur(12px)",
@@ -107,6 +107,7 @@ var CopyTextComponent = function (_a) {
107
107
  color: "#01FF00",
108
108
  fontSize: theme.typography.fontSize14,
109
109
  lineHeight: theme.typography.leading100,
110
- }, children: "Copied" }))] })] }));
110
+ whiteSpace: "nowrap",
111
+ }, children: messageSuccess || "Copied" }))] })] }));
111
112
  };
112
113
  exports.default = CopyTextComponent;
@@ -80,6 +80,6 @@ var CopyableText = function (_a) {
80
80
  }
81
81
  return function () { return clearTimeout(timer); };
82
82
  }, [copied]);
83
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", gap: 0.5, sx: sx === null || sx === void 0 ? void 0 : sx.container, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: copied ? "success.main" : "text.primary", sx: sx === null || sx === void 0 ? void 0 : sx.text, children: copied ? "Copied!" : displayText || copyText }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: handleCopy, size: "small", sx: __assign({ padding: 0.5 }, sx === null || sx === void 0 ? void 0 : sx.button), children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_860_5627", maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20", children: (0, jsx_runtime_1.jsx)("rect", { width: "20", height: "20", fill: "#D9D9D9" }) }), (0, jsx_runtime_1.jsx)("g", { mask: "url(#mask0_860_5627)", children: (0, jsx_runtime_1.jsx)("path", { d: "M7.54804 14.5826C7.17293 14.5826 6.85587 14.4531 6.59685 14.1941C6.33783 13.9351 6.20831 13.618 6.20831 13.2429V3.75577C6.20831 3.38066 6.33783 3.06359 6.59685 2.80456C6.85587 2.54553 7.17293 2.41602 7.54804 2.41602H15.0352C15.4103 2.41602 15.7273 2.54553 15.9864 2.80456C16.2454 3.06359 16.3749 3.38066 16.3749 3.75577V13.2429C16.3749 13.618 16.2454 13.9351 15.9864 14.1941C15.7273 14.4531 15.4103 14.5826 15.0352 14.5826H7.54804ZM7.54804 13.4993H15.0352C15.0993 13.4993 15.158 13.4726 15.2115 13.4192C15.2649 13.3658 15.2916 13.307 15.2916 13.2429V3.75577C15.2916 3.69166 15.2649 3.63288 15.2115 3.57945C15.158 3.52604 15.0993 3.49933 15.0352 3.49933H7.54804C7.48393 3.49933 7.42517 3.52604 7.37175 3.57945C7.31832 3.63288 7.2916 3.69166 7.2916 3.75577V13.2429C7.2916 13.307 7.31832 13.3658 7.37175 13.4192C7.42517 13.4726 7.48393 13.4993 7.54804 13.4993ZM4.96473 17.1659C4.58963 17.1659 4.27257 17.0364 4.01354 16.7774C3.75451 16.5184 3.625 16.2013 3.625 15.8262V5.25577H4.70831V15.8262C4.70831 15.8903 4.73502 15.9491 4.78844 16.0025C4.84187 16.0559 4.90063 16.0826 4.96473 16.0826H13.5352V17.1659H4.96473Z", fill: "#1C461D" }) })] }) }) })] }));
83
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", gap: 0.5, sx: sx === null || sx === void 0 ? void 0 : sx.container, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: copied ? "success.main" : "text.primary", sx: sx === null || sx === void 0 ? void 0 : sx.text, children: copied ? "Copied!" : displayText || copyText }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: handleCopy, size: "small", sx: __assign({ padding: 0.5 }, sx === null || sx === void 0 ? void 0 : sx.button), children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_860_5627", maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20", children: (0, jsx_runtime_1.jsx)("rect", { width: "20", height: "20", fill: "#D9D9D9" }) }), (0, jsx_runtime_1.jsx)("g", { mask: "url(#mask0_860_5627)", children: (0, jsx_runtime_1.jsx)("path", { d: "M7.54804 14.5826C7.17293 14.5826 6.85587 14.4531 6.59685 14.1941C6.33783 13.9351 6.20831 13.618 6.20831 13.2429V3.75577C6.20831 3.38066 6.33783 3.06359 6.59685 2.80456C6.85587 2.54553 7.17293 2.41602 7.54804 2.41602H15.0352C15.4103 2.41602 15.7273 2.54553 15.9864 2.80456C16.2454 3.06359 16.3749 3.38066 16.3749 3.75577V13.2429C16.3749 13.618 16.2454 13.9351 15.9864 14.1941C15.7273 14.4531 15.4103 14.5826 15.0352 14.5826H7.54804ZM7.54804 13.4993H15.0352C15.0993 13.4993 15.158 13.4726 15.2115 13.4192C15.2649 13.3658 15.2916 13.307 15.2916 13.2429V3.75577C15.2916 3.69166 15.2649 3.63288 15.2115 3.57945C15.158 3.52604 15.0993 3.49933 15.0352 3.49933H7.54804C7.48393 3.49933 7.42517 3.52604 7.37175 3.57945C7.31832 3.63288 7.2916 3.69166 7.2916 3.75577V13.2429C7.2916 13.307 7.31832 13.3658 7.37175 13.4192C7.42517 13.4726 7.48393 13.4993 7.54804 13.4993ZM4.96473 17.1659C4.58963 17.1659 4.27257 17.0364 4.01354 16.7774C3.75451 16.5184 3.625 16.2013 3.625 15.8262V5.25577H4.70831V15.8262C4.70831 15.8903 4.73502 15.9491 4.78844 16.0025C4.84187 16.0559 4.90063 16.0826 4.96473 16.0826H13.5352V17.1659H4.96473Z", fill: "#044C2F" }) })] }) }) })] }));
84
84
  };
85
85
  exports.default = CopyableText;
@@ -21,6 +21,6 @@ var Text_1 = __importDefault(require("../Text"));
21
21
  var Button_1 = __importDefault(require("../Button"));
22
22
  function EmptyData(props) {
23
23
  var theme = (0, ThemeProvider_1.useTheme)();
24
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center", justifyContent: "center" }), props.sx), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 62, height: 62 }, children: (0, jsx_runtime_1.jsxs)("svg", { width: "63", height: "62", viewBox: "0 0 63 62", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M46.0312 23.25H21.7544C21.4638 23.25 21.1925 23.1241 21.0084 22.9012L17.3272 18.4837C16.775 17.8153 15.9612 17.4375 15.0991 17.4375H5.34375C3.74531 17.4375 2.4375 18.7453 2.4375 20.3438V59.0938C2.4375 59.4231 2.61188 59.7331 2.89281 59.9172C3.04781 60.0141 3.23188 60.0625 3.40625 60.0625C3.55156 60.0625 3.68719 60.0334 3.82281 59.9656L48.3853 38.6531C48.7244 38.4884 48.9375 38.1494 48.9375 37.7812V26.1562C48.9375 24.5578 47.6297 23.25 46.0312 23.25Z", fill: "#A3A3A3" }), (0, jsx_runtime_1.jsx)("path", { d: "M60.2912 37.7522C59.9425 37.1613 59.3225 36.8125 58.6347 36.8125H15.535C14.8278 36.8125 14.1787 37.2 13.8397 37.8297L2.55373 58.6287C2.38904 58.9291 2.39873 59.2972 2.5731 59.5878C2.74748 59.8784 3.06717 60.0625 3.40623 60.0625H46.9709C48.3853 60.0625 49.6834 59.2875 50.3615 58.0378L60.3203 39.6703C60.6497 39.06 60.64 38.3431 60.2815 37.7522H60.2912Z", fill: "#1C461D" }), (0, jsx_runtime_1.jsx)("path", { d: "M27.625 50.375H16.9688C16.4359 50.375 16 49.9391 16 49.4062C16 48.8734 16.4359 48.4375 16.9688 48.4375H27.625C28.1578 48.4375 28.5938 48.8734 28.5938 49.4062C28.5938 49.9391 28.1578 50.375 27.625 50.375Z", fill: "#ECF4E9" }), (0, jsx_runtime_1.jsx)("path", { d: "M31.5 55.2188H14.0625C13.5297 55.2188 13.0938 54.7828 13.0938 54.25C13.0938 53.7172 13.5297 53.2812 14.0625 53.2812H31.5C32.0328 53.2812 32.4688 53.7172 32.4688 54.25C32.4688 54.7828 32.0328 55.2188 31.5 55.2188Z", fill: "#ECF4E9" }), (0, jsx_runtime_1.jsx)("path", { d: "M39.25 1.9375C31.7713 1.9375 25.6875 8.02125 25.6875 15.5C25.6875 21.7969 30.0663 27.2897 36.1597 28.7041L38.4169 32.4628C38.5912 32.7534 38.9109 32.9375 39.25 32.9375C39.5891 32.9375 39.9088 32.7631 40.0831 32.4628L42.3403 28.7041C48.4337 27.2897 52.8125 21.7969 52.8125 15.5C52.8125 8.02125 46.7288 1.9375 39.25 1.9375Z", fill: "#E5E6E6" }), (0, jsx_runtime_1.jsx)("path", { d: "M44.7817 9.96891C44.4039 9.59109 43.7936 9.59109 43.4158 9.96891L39.2598 14.1248L35.1039 9.96891C34.7261 9.59109 34.1158 9.59109 33.7379 9.96891C33.3601 10.3467 33.3601 10.957 33.7379 11.3348L37.8939 15.4908L33.7379 19.6467C33.3601 20.0245 33.3601 20.6348 33.7379 21.0127C33.9317 21.2064 34.1739 21.2936 34.4258 21.2936C34.6776 21.2936 34.9198 21.1967 35.1136 21.0127L39.2695 16.8567L43.4254 21.0127C43.6192 21.2064 43.8614 21.2936 44.1133 21.2936C44.3651 21.2936 44.6073 21.1967 44.8011 21.0127C45.1789 20.6348 45.1789 20.0245 44.8011 19.6467L40.6451 15.4908L44.8011 11.3348C45.1789 10.957 45.1789 10.3467 44.8011 9.96891H44.7817Z", fill: "#1C461D" })] }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: props.title }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: props.description })] }), props.action && (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: props.action, children: props.actionText })] }));
24
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center", justifyContent: "center" }), props.sx), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 62, height: 62 }, children: (0, jsx_runtime_1.jsxs)("svg", { width: "63", height: "62", viewBox: "0 0 63 62", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [(0, jsx_runtime_1.jsx)("path", { d: "M46.0312 23.25H21.7544C21.4638 23.25 21.1925 23.1241 21.0084 22.9012L17.3272 18.4837C16.775 17.8153 15.9612 17.4375 15.0991 17.4375H5.34375C3.74531 17.4375 2.4375 18.7453 2.4375 20.3438V59.0938C2.4375 59.4231 2.61188 59.7331 2.89281 59.9172C3.04781 60.0141 3.23188 60.0625 3.40625 60.0625C3.55156 60.0625 3.68719 60.0334 3.82281 59.9656L48.3853 38.6531C48.7244 38.4884 48.9375 38.1494 48.9375 37.7812V26.1562C48.9375 24.5578 47.6297 23.25 46.0312 23.25Z", fill: "#A3A3A3" }), (0, jsx_runtime_1.jsx)("path", { d: "M60.2912 37.7522C59.9425 37.1613 59.3225 36.8125 58.6347 36.8125H15.535C14.8278 36.8125 14.1787 37.2 13.8397 37.8297L2.55373 58.6287C2.38904 58.9291 2.39873 59.2972 2.5731 59.5878C2.74748 59.8784 3.06717 60.0625 3.40623 60.0625H46.9709C48.3853 60.0625 49.6834 59.2875 50.3615 58.0378L60.3203 39.6703C60.6497 39.06 60.64 38.3431 60.2815 37.7522H60.2912Z", fill: "#044C2F" }), (0, jsx_runtime_1.jsx)("path", { d: "M27.625 50.375H16.9688C16.4359 50.375 16 49.9391 16 49.4062C16 48.8734 16.4359 48.4375 16.9688 48.4375H27.625C28.1578 48.4375 28.5938 48.8734 28.5938 49.4062C28.5938 49.9391 28.1578 50.375 27.625 50.375Z", fill: "#ECF4E9" }), (0, jsx_runtime_1.jsx)("path", { d: "M31.5 55.2188H14.0625C13.5297 55.2188 13.0938 54.7828 13.0938 54.25C13.0938 53.7172 13.5297 53.2812 14.0625 53.2812H31.5C32.0328 53.2812 32.4688 53.7172 32.4688 54.25C32.4688 54.7828 32.0328 55.2188 31.5 55.2188Z", fill: "#ECF4E9" }), (0, jsx_runtime_1.jsx)("path", { d: "M39.25 1.9375C31.7713 1.9375 25.6875 8.02125 25.6875 15.5C25.6875 21.7969 30.0663 27.2897 36.1597 28.7041L38.4169 32.4628C38.5912 32.7534 38.9109 32.9375 39.25 32.9375C39.5891 32.9375 39.9088 32.7631 40.0831 32.4628L42.3403 28.7041C48.4337 27.2897 52.8125 21.7969 52.8125 15.5C52.8125 8.02125 46.7288 1.9375 39.25 1.9375Z", fill: "#E5E6E6" }), (0, jsx_runtime_1.jsx)("path", { d: "M44.7817 9.96891C44.4039 9.59109 43.7936 9.59109 43.4158 9.96891L39.2598 14.1248L35.1039 9.96891C34.7261 9.59109 34.1158 9.59109 33.7379 9.96891C33.3601 10.3467 33.3601 10.957 33.7379 11.3348L37.8939 15.4908L33.7379 19.6467C33.3601 20.0245 33.3601 20.6348 33.7379 21.0127C33.9317 21.2064 34.1739 21.2936 34.4258 21.2936C34.6776 21.2936 34.9198 21.1967 35.1136 21.0127L39.2695 16.8567L43.4254 21.0127C43.6192 21.2064 43.8614 21.2936 44.1133 21.2936C44.3651 21.2936 44.6073 21.1967 44.8011 21.0127C45.1789 20.6348 45.1789 20.0245 44.8011 19.6467L40.6451 15.4908L44.8011 11.3348C45.1789 10.957 45.1789 10.3467 44.8011 9.96891H44.7817Z", fill: "#044C2F" })] }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: props.title }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.sessionDescription), children: props.description })] }), props.action && (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: props.action, children: props.actionText })] }));
25
25
  }
26
26
  exports.default = EmptyData;
@@ -156,7 +156,7 @@ exports.default = (0, react_1.memo)(function ShareAction(_a) {
156
156
  display: "flex",
157
157
  color: "#fff",
158
158
  aspectRatio: "1 / 1",
159
- background: "#1C461D",
159
+ background: "#044C2F",
160
160
  }, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "21", height: "20", viewBox: "0 0 21 20", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M3.375 13.75V15.625C3.375 16.1223 3.57254 16.5992 3.92417 16.9508C4.27581 17.3025 4.75272 17.5 5.25 17.5H16.5C16.9973 17.5 17.4742 17.3025 17.8258 16.9508C18.1775 16.5992 18.375 16.1223 18.375 15.625V13.75M14.625 10L10.875 13.75M10.875 13.75L7.125 10M10.875 13.75V2.5", stroke: "white", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.content02), color: (_b = palette_1.palette.positive) === null || _b === void 0 ? void 0 : _b.main, children: "Save photo" })] }), (0, jsx_runtime_1.jsxs)(material_1.Grid2, { display: "flex", flexDirection: "column", gap: "0.375rem", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Button, { color: "primary", onClick: handleCopyLink, sx: {
161
161
  borderRadius: "0.75rem",
162
162
  justifyContent: "center",
@@ -166,6 +166,6 @@ exports.default = (0, react_1.memo)(function ShareAction(_a) {
166
166
  display: "flex",
167
167
  color: "#fff",
168
168
  aspectRatio: "1 / 1",
169
- background: "#1C461D",
169
+ background: "#044C2F",
170
170
  }, children: copySuccess ? ((0, jsx_runtime_1.jsx)(exports.SuccessAnimation, {})) : ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "21", height: "20", viewBox: "0 0 21 20", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M11.6167 7.24002C12.1582 7.49857 12.6298 7.8833 12.9918 8.36189C13.3538 8.84048 13.5956 9.39895 13.697 9.9904C13.7985 10.5818 13.7564 11.189 13.5745 11.7608C13.3926 12.3327 13.0762 12.8525 12.6517 13.2767L8.90169 17.0267C8.19842 17.73 7.24459 18.125 6.25002 18.125C5.25546 18.125 4.30162 17.73 3.59836 17.0267C2.89509 16.3234 2.5 15.3696 2.5 14.375C2.5 13.3805 2.89509 12.4266 3.59836 11.7234L5.06252 10.2592M16.1875 9.74086L17.6517 8.27669C18.355 7.57342 18.75 6.61959 18.75 5.62502C18.75 4.63046 18.355 3.67662 17.6517 2.97336C16.9484 2.27009 15.9946 1.875 15 1.875C14.0055 1.875 13.0516 2.27009 12.3484 2.97336L8.59836 6.72336C8.17389 7.14752 7.85741 7.66736 7.67551 8.23921C7.49361 8.81105 7.45159 9.4182 7.553 10.0096C7.6544 10.6011 7.89626 11.1596 8.25827 11.6382C8.62027 12.1167 9.09183 12.5015 9.63336 12.76", stroke: "white", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) })) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.content02), color: (_c = palette_1.palette.positive) === null || _c === void 0 ? void 0 : _c.main, children: copySuccess ? "Copied!" : "Copy link" })] })] }));
171
171
  });
@@ -46,7 +46,7 @@ function ShareImage(_a) {
46
46
  backgroundColor: "transparent",
47
47
  alignItems: "center",
48
48
  justifyContent: "center",
49
- }, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M16.0234 9.34794H21.0154L17.8344 6.16494C16.8103 5.14081 15.5346 4.40433 14.1356 4.02955C12.7366 3.65476 11.2636 3.65487 9.86464 4.02986C8.4657 4.40486 7.19014 5.14153 6.16617 6.16581C5.14221 7.19009 4.40594 8.46588 4.03138 9.86494M2.98537 19.6439V14.6519M2.98537 14.6519H7.97738M2.98537 14.6519L6.16537 17.8349C7.18949 18.8591 8.46517 19.5955 9.86416 19.9703C11.2632 20.3451 12.7362 20.345 14.1351 19.97C15.534 19.595 16.8096 18.8584 17.8336 17.8341C18.8575 16.8098 19.5938 15.534 19.9684 14.1349M21.0154 4.35594V9.34594", stroke: "#1C461D", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }))] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { component: "span", sx: {
49
+ }, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M16.0234 9.34794H21.0154L17.8344 6.16494C16.8103 5.14081 15.5346 4.40433 14.1356 4.02955C12.7366 3.65476 11.2636 3.65487 9.86464 4.02986C8.4657 4.40486 7.19014 5.14153 6.16617 6.16581C5.14221 7.19009 4.40594 8.46588 4.03138 9.86494M2.98537 19.6439V14.6519M2.98537 14.6519H7.97738M2.98537 14.6519L6.16537 17.8349C7.18949 18.8591 8.46517 19.5955 9.86416 19.9703C11.2632 20.3451 12.7362 20.345 14.1351 19.97C15.534 19.595 16.8096 18.8584 17.8336 17.8341C18.8575 16.8098 19.5938 15.534 19.9684 14.1349M21.0154 4.35594V9.34594", stroke: "#044C2F", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }))] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { component: "span", sx: {
50
50
  display: "flex",
51
51
  flexDirection: "column",
52
52
  fontSize: "0.813rem",
@@ -70,8 +70,8 @@ function ShareImage(_a) {
70
70
  left: "-1px",
71
71
  width: "16px",
72
72
  height: "16px",
73
- borderTop: "1px solid #1C461D",
74
- borderLeft: "1px solid #1C461D",
73
+ borderTop: "1px solid #044C2F",
74
+ borderLeft: "1px solid #044C2F",
75
75
  borderTopLeftRadius: "9px",
76
76
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
77
77
  position: "absolute",
@@ -79,8 +79,8 @@ function ShareImage(_a) {
79
79
  right: "-1px",
80
80
  width: "16px",
81
81
  height: "16px",
82
- borderTop: "1px solid #1C461D",
83
- borderRight: "1px solid #1C461D",
82
+ borderTop: "1px solid #044C2F",
83
+ borderRight: "1px solid #044C2F",
84
84
  borderTopRightRadius: "9px",
85
85
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
86
86
  position: "absolute",
@@ -88,8 +88,8 @@ function ShareImage(_a) {
88
88
  left: "-1px",
89
89
  width: "16px",
90
90
  height: "16px",
91
- borderBottom: "1px solid #1C461D",
92
- borderLeft: "1px solid #1C461D",
91
+ borderBottom: "1px solid #044C2F",
92
+ borderLeft: "1px solid #044C2F",
93
93
  borderBottomLeftRadius: "9px",
94
94
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
95
95
  position: "absolute",
@@ -97,27 +97,27 @@ function ShareImage(_a) {
97
97
  right: "-1px",
98
98
  width: "16px",
99
99
  height: "16px",
100
- borderBottom: "1px solid #1C461D",
101
- borderRight: "1px solid #1C461D",
100
+ borderBottom: "1px solid #044C2F",
101
+ borderRight: "1px solid #044C2F",
102
102
  borderBottomRightRadius: "9px",
103
103
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
104
104
  position: "absolute",
105
105
  top: "-1px",
106
106
  width: "16px",
107
107
  height: "16px",
108
- borderTop: "1px solid #1C461D",
108
+ borderTop: "1px solid #044C2F",
109
109
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
110
110
  position: "absolute",
111
111
  bottom: "-1px",
112
112
  width: "16px",
113
113
  height: "16px",
114
- borderBottom: "1px solid #1C461D",
114
+ borderBottom: "1px solid #044C2F",
115
115
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
116
116
  position: "absolute",
117
117
  left: "-1px",
118
118
  width: "16px",
119
119
  height: "16px",
120
- borderLeft: "1px solid #1C461D",
120
+ borderLeft: "1px solid #044C2F",
121
121
  top: "50%",
122
122
  transform: "translateY(-50%)",
123
123
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
@@ -125,7 +125,7 @@ function ShareImage(_a) {
125
125
  right: "-1px",
126
126
  width: "16px",
127
127
  height: "16px",
128
- borderRight: "1px solid #1C461D",
128
+ borderRight: "1px solid #044C2F",
129
129
  top: "50%",
130
130
  transform: "translateY(-50%)",
131
131
  } })] })] }) }));
@@ -66,7 +66,7 @@ var link_1 = __importDefault(require("next/link"));
66
66
  var DrawerComponent_1 = __importStar(require("../DrawerComponent"));
67
67
  var theme_1 = __importDefault(require("../../../theme/mui/deposit-fiat-theme/theme"));
68
68
  var Icon_1 = __importDefault(require("../Icon"));
69
- var Button_1 = __importDefault(require("../Button"));
69
+ var Button_1 = __importStar(require("../Button"));
70
70
  var Text_1 = __importDefault(require("../Text"));
71
71
  var style_1 = require("./style");
72
72
  var palette_1 = require("../../../theme/mui/deposit-fiat-theme/palette");
@@ -88,7 +88,7 @@ var Header = function (_a) {
88
88
  }, children: [(0, jsx_runtime_1.jsx)(material_1.Grid2, { children: (0, jsx_runtime_1.jsx)(BackArrow, { onClick: handleBack }) }), (0, jsx_runtime_1.jsx)(material_1.Grid2, { display: "flex", children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, style_1.title01), { width: "100%", textAlign: "center" }), children: "Top up" }) }), false && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Grid2, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", justifyContent: "end", gap: ".5rem", children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20 }, children: SvgPath_1.IC_HELP }), (0, jsx_runtime_1.jsx)(material_1.Divider, { flexItem: true, sx: { width: "1px" } }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: historyRef, trigger: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20, display: "block" }, children: SvgPath_1.IC_HISTORY }), direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, children: (0, jsx_runtime_1.jsx)(ReceiveHistory_1.default, { onClose: function () { var _a; return (_a = historyRef.current) === null || _a === void 0 ? void 0 : _a.close(); } }) })] }) }) }))] }));
89
89
  };
90
90
  var CopyIcon = function () {
91
- return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M11 11.5V13.75C11 14.164 10.664 14.5 10.25 14.5H3.75C3.55109 14.5 3.36032 14.421 3.21967 14.2803C3.07902 14.1397 3 13.9489 3 13.75V5.25C3 4.836 3.336 4.5 3.75 4.5H5C5.33505 4.49977 5.66954 4.52742 6 4.58267M11 11.5H13.25C13.664 11.5 14 11.164 14 10.75V7.5C14 4.52667 11.838 2.05933 9 1.58267C8.66954 1.52742 8.33505 1.49977 8 1.5H6.75C6.336 1.5 6 1.836 6 2.25V4.58267M11 11.5H6.75C6.55109 11.5 6.36032 11.421 6.21967 11.2803C6.07902 11.1397 6 10.9489 6 10.75V4.58267M14 9V7.75C14 7.15326 13.7629 6.58097 13.341 6.15901C12.919 5.73705 12.3467 5.5 11.75 5.5H10.75C10.5511 5.5 10.3603 5.42098 10.2197 5.28033C10.079 5.13968 10 4.94891 10 4.75V3.75C10 3.45453 9.9418 3.16195 9.82873 2.88896C9.71566 2.61598 9.54992 2.36794 9.34099 2.15901C9.13206 1.95008 8.88402 1.78435 8.61104 1.67127C8.33806 1.5582 8.04547 1.5 7.75 1.5H7", stroke: "#1C461D", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }));
91
+ return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M11 11.5V13.75C11 14.164 10.664 14.5 10.25 14.5H3.75C3.55109 14.5 3.36032 14.421 3.21967 14.2803C3.07902 14.1397 3 13.9489 3 13.75V5.25C3 4.836 3.336 4.5 3.75 4.5H5C5.33505 4.49977 5.66954 4.52742 6 4.58267M11 11.5H13.25C13.664 11.5 14 11.164 14 10.75V7.5C14 4.52667 11.838 2.05933 9 1.58267C8.66954 1.52742 8.33505 1.49977 8 1.5H6.75C6.336 1.5 6 1.836 6 2.25V4.58267M11 11.5H6.75C6.55109 11.5 6.36032 11.421 6.21967 11.2803C6.07902 11.1397 6 10.9489 6 10.75V4.58267M14 9V7.75C14 7.15326 13.7629 6.58097 13.341 6.15901C12.919 5.73705 12.3467 5.5 11.75 5.5H10.75C10.5511 5.5 10.3603 5.42098 10.2197 5.28033C10.079 5.13968 10 4.94891 10 4.75V3.75C10 3.45453 9.9418 3.16195 9.82873 2.88896C9.71566 2.61598 9.54992 2.36794 9.34099 2.15901C9.13206 1.95008 8.88402 1.78435 8.61104 1.67127C8.33806 1.5582 8.04547 1.5 7.75 1.5H7", stroke: "#044C2F", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }));
92
92
  };
93
93
  exports.CopyIcon = CopyIcon;
94
94
  function FiatDeposit(_a) {
@@ -208,13 +208,19 @@ function FiatDeposit(_a) {
208
208
  borderColor: theme_1.default.palette.accent3.main,
209
209
  borderRadius: "1rem",
210
210
  gap: "0.5rem",
211
+ opacity: loading ? 0.5 : 1,
212
+ pointerEvents: loading ? "none" : "auto",
211
213
  }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.title02), color: (_b = palette_1.palette.positive) === null || _b === void 0 ? void 0 : _b.main, children: "You Pay" }), (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { autoFocus: true, alwaysFocus: true, ref: amountInputRef, elementsAcceptIds: ["amount-keyboard-id"], value: inputAmount === null || inputAmount === void 0 ? void 0 : inputAmount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, styles: {
212
214
  container: {
213
215
  border: "1px solid ".concat(error ? theme_1.default.palette.error.main : theme_1.default.palette.primary.main),
214
216
  },
215
217
  }, rightElement: (0, jsx_runtime_1.jsxs)(material_1.Stack, { flexDirection: "row", alignItems: "center", gap: "4px", flexShrink: 0, pl: "1rem", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { alt: "", width: 16, height: 16, sx: {
216
218
  borderRadius: "999px",
217
- }, src: (_d = (_c = tokens === null || tokens === void 0 ? void 0 : tokens.find(function (item) { return item.currency_slug.toLocaleLowerCase() === "vnd"; })) === null || _c === void 0 ? void 0 : _c.currency.link) !== null && _d !== void 0 ? _d : "/" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.title03), color: (_e = palette_1.palette.accent2) === null || _e === void 0 ? void 0 : _e.main, children: "VND" })] }) }) }), error && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, style_1.content02), display: "flex", alignItems: "center", gap: "4px", className: "text-error", children: [(0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M7 5.25V7.4375M12.25 7C12.25 7.68944 12.1142 8.37213 11.8504 9.00909C11.5865 9.64605 11.1998 10.2248 10.7123 10.7123C10.2248 11.1998 9.64605 11.5865 9.00909 11.8504C8.37213 12.1142 7.68944 12.25 7 12.25C6.31056 12.25 5.62787 12.1142 4.99091 11.8504C4.35395 11.5865 3.7752 11.1998 3.28769 10.7123C2.80018 10.2248 2.41347 9.64605 2.14963 9.00909C1.8858 8.37213 1.75 7.68944 1.75 7C1.75 5.60761 2.30312 4.27226 3.28769 3.28769C4.27226 2.30312 5.60761 1.75 7 1.75C8.39239 1.75 9.72774 2.30312 10.7123 3.28769C11.6969 4.27226 12.25 5.60761 12.25 7ZM7 9.1875H7.00467V9.19217H7V9.1875Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), error] }))] }) }), (0, jsx_runtime_1.jsx)(material_1.Stack, { pt: "12px", id: "input-amount-action", children: (0, jsx_runtime_1.jsx)(material_1.Box, { px: "1rem", pb: "1.5rem", children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { loading: loading, disabled: loading || !!error, onClick: handleClick, fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.button), children: "Continue" }) }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Drawer, { classes: { paper: "w-full" }, open: openQR, onClose: function () { return setOpenQR(false); }, anchor: "right", keepMounted: false, onClick: function (e) { return e.stopPropagation(); }, children: [(0, jsx_runtime_1.jsx)(Header, { handleBack: function () {
219
+ }, src: (_d = (_c = tokens === null || tokens === void 0 ? void 0 : tokens.find(function (item) { return item.currency_slug.toLocaleLowerCase() === "vnd"; })) === null || _c === void 0 ? void 0 : _c.currency.link) !== null && _d !== void 0 ? _d : "/" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.title03), color: (_e = palette_1.palette.accent2) === null || _e === void 0 ? void 0 : _e.main, children: "VND" })] }) }) }), error && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, style_1.content02), display: "flex", alignItems: "center", gap: "4px", className: "text-error", children: [(0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M7 5.25V7.4375M12.25 7C12.25 7.68944 12.1142 8.37213 11.8504 9.00909C11.5865 9.64605 11.1998 10.2248 10.7123 10.7123C10.2248 11.1998 9.64605 11.5865 9.00909 11.8504C8.37213 12.1142 7.68944 12.25 7 12.25C6.31056 12.25 5.62787 12.1142 4.99091 11.8504C4.35395 11.5865 3.7752 11.1998 3.28769 10.7123C2.80018 10.2248 2.41347 9.64605 2.14963 9.00909C1.8858 8.37213 1.75 7.68944 1.75 7C1.75 5.60761 2.30312 4.27226 3.28769 3.28769C4.27226 2.30312 5.60761 1.75 7 1.75C8.39239 1.75 9.72774 2.30312 10.7123 3.28769C11.6969 4.27226 12.25 5.60761 12.25 7ZM7 9.1875H7.00467V9.19217H7V9.1875Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }), error] }))] }) }), (0, jsx_runtime_1.jsx)(material_1.Stack, { pt: "12px", id: "input-amount-action", children: (0, jsx_runtime_1.jsx)(material_1.Box, { px: "1rem", pb: "1.5rem", children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { status: !!error || !inputAmount
220
+ ? Button_1.BUTTON_STATUS.DISABLED
221
+ : loading
222
+ ? Button_1.BUTTON_STATUS.LOADING
223
+ : Button_1.BUTTON_STATUS.ENABLED, onClick: handleClick, fullWidth: true, children: "Continue" }) }) })] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Drawer, { classes: { paper: "w-full" }, open: openQR, onClose: function () { return setOpenQR(false); }, anchor: "right", keepMounted: false, onClick: function (e) { return e.stopPropagation(); }, children: [(0, jsx_runtime_1.jsx)(Header, { handleBack: function () {
218
224
  setOpen(false);
219
225
  setOpenQR(false);
220
226
  setInputAmount("");
@@ -230,7 +236,7 @@ function FiatDeposit(_a) {
230
236
  }, style: { filter: count === 0 ? "blur(6px)" : "none" } }), count === 0 && ((0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", position: "absolute", alignItems: "center", justifyContent: "center", sx: {
231
237
  background: "transparent",
232
238
  inset: 0,
233
- }, onClick: handleClick, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M16.0234 9.34794H21.0154L17.8344 6.16494C16.8103 5.14081 15.5346 4.40433 14.1356 4.02955C12.7366 3.65476 11.2636 3.65487 9.86464 4.02986C8.4657 4.40486 7.19014 5.14153 6.16617 6.16581C5.14221 7.19009 4.40594 8.46588 4.03138 9.86494M2.98537 19.6439V14.6519M2.98537 14.6519H7.97738M2.98537 14.6519L6.16537 17.8349C7.18949 18.8591 8.46517 19.5955 9.86416 19.9703C11.2632 20.3451 12.7362 20.345 14.1351 19.97C15.534 19.595 16.8096 18.8584 17.8336 17.8341C18.8575 16.8098 19.5938 15.534 19.9684 14.1349M21.0154 4.35594V9.34594", stroke: "#1C461D", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }))] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
239
+ }, onClick: handleClick, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M16.0234 9.34794H21.0154L17.8344 6.16494C16.8103 5.14081 15.5346 4.40433 14.1356 4.02955C12.7366 3.65476 11.2636 3.65487 9.86464 4.02986C8.4657 4.40486 7.19014 5.14153 6.16617 6.16581C5.14221 7.19009 4.40594 8.46588 4.03138 9.86494M2.98537 19.6439V14.6519M2.98537 14.6519H7.97738M2.98537 14.6519L6.16537 17.8349C7.18949 18.8591 8.46517 19.5955 9.86416 19.9703C11.2632 20.3451 12.7362 20.345 14.1351 19.97C15.534 19.595 16.8096 18.8584 17.8336 17.8341C18.8575 16.8098 19.5938 15.534 19.9684 14.1349M21.0154 4.35594V9.34594", stroke: "#044C2F", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }))] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
234
240
  fontSize: "1.5rem",
235
241
  fontWeight: 600,
236
242
  lineHeight: "140%",
@@ -242,7 +248,7 @@ function FiatDeposit(_a) {
242
248
  fontSize: "0.938rem",
243
249
  fontWeight: 500,
244
250
  lineHeight: "140%",
245
- }, children: "VND" })] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { display: "flex", alignItems: "center", gap: "0.375rem", sx: __assign({}, style_1.title03), color: (_g = palette_1.palette.accent2) === null || _g === void 0 ? void 0 : _g.main, children: ["Top up time left", (0, jsx_runtime_1.jsx)(TimeText_1.default, { seconds: count }), (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M7 5V7.5M13 7C13 7.78793 12.8448 8.56815 12.5433 9.2961C12.2417 10.0241 11.7998 10.6855 11.2426 11.2426C10.6855 11.7998 10.0241 12.2417 9.2961 12.5433C8.56815 12.8448 7.78793 13 7 13C6.21207 13 5.43185 12.8448 4.7039 12.5433C3.97595 12.2417 3.31451 11.7998 2.75736 11.2426C2.20021 10.6855 1.75825 10.0241 1.45672 9.2961C1.15519 8.56815 1 7.78793 1 7C1 5.4087 1.63214 3.88258 2.75736 2.75736C3.88258 1.63214 5.4087 1 7 1C8.5913 1 10.1174 1.63214 11.2426 2.75736C12.3679 3.88258 13 5.4087 13 7ZM7 9.5H7.00533V9.50533H7V9.5Z", stroke: "#1C461D", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { flexItem: true }), (0, jsx_runtime_1.jsxs)(Text_1.default, { display: "flex", flexDirection: "column", alignItems: "center", gap: "0.375rem", sx: __assign({}, style_1.title01), children: [depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.account_name, (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.content02), color: (_h = palette_1.palette.accent2) === null || _h === void 0 ? void 0 : _h.main, children: depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.bank_name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.title02), display: "flex", alignItems: "center", gap: "0.25rem", children: (0, jsx_runtime_1.jsxs)(CopyTextComponent_1.default, { sx: {
251
+ }, children: "VND" })] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { display: "flex", alignItems: "center", gap: "0.375rem", sx: __assign({}, style_1.title03), color: (_g = palette_1.palette.accent2) === null || _g === void 0 ? void 0 : _g.main, children: ["Top up time left", (0, jsx_runtime_1.jsx)(TimeText_1.default, { seconds: count }), (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M7 5V7.5M13 7C13 7.78793 12.8448 8.56815 12.5433 9.2961C12.2417 10.0241 11.7998 10.6855 11.2426 11.2426C10.6855 11.7998 10.0241 12.2417 9.2961 12.5433C8.56815 12.8448 7.78793 13 7 13C6.21207 13 5.43185 12.8448 4.7039 12.5433C3.97595 12.2417 3.31451 11.7998 2.75736 11.2426C2.20021 10.6855 1.75825 10.0241 1.45672 9.2961C1.15519 8.56815 1 7.78793 1 7C1 5.4087 1.63214 3.88258 2.75736 2.75736C3.88258 1.63214 5.4087 1 7 1C8.5913 1 10.1174 1.63214 11.2426 2.75736C12.3679 3.88258 13 5.4087 13 7ZM7 9.5H7.00533V9.50533H7V9.5Z", stroke: "#044C2F", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { flexItem: true }), (0, jsx_runtime_1.jsxs)(Text_1.default, { display: "flex", flexDirection: "column", alignItems: "center", gap: "0.375rem", sx: __assign({}, style_1.title01), children: [depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.account_name, (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.content02), color: (_h = palette_1.palette.accent2) === null || _h === void 0 ? void 0 : _h.main, children: depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.bank_name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.title02), display: "flex", alignItems: "center", gap: "0.25rem", children: (0, jsx_runtime_1.jsxs)(CopyTextComponent_1.default, { sx: {
246
252
  display: "flex",
247
253
  alignItems: "center",
248
254
  gap: 1,
@@ -4,7 +4,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
4
4
  var qrcode_react_1 = require("qrcode.react");
5
5
  function QRCode(props) {
6
6
  var value = props.value, _a = props.size, size = _a === void 0 ? 156 : _a, logo = props.logo, title = props.title, _b = props.bgColor, bgColor = _b === void 0 ? "#ffffff" : _b;
7
- return ((0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeCanvas, { value: value, title: title, size: size, bgColor: bgColor, fgColor: "#1C461D", level: "L", minVersion: 8, marginSize: 4, imageSettings: {
7
+ return ((0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeCanvas, { value: value, title: title, size: size, bgColor: bgColor, fgColor: "#044C2F", level: "L", minVersion: 8, marginSize: 4, imageSettings: {
8
8
  src: logo || "/",
9
9
  x: undefined,
10
10
  y: undefined,