tek-wallet 0.0.195 → 0.0.197
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.
|
@@ -126,11 +126,11 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
126
126
|
display: "flex",
|
|
127
127
|
alignItems: "center",
|
|
128
128
|
minHeight: "2rem",
|
|
129
|
-
|
|
129
|
+
mb: theme.mixins.customMargin.p20,
|
|
130
|
+
}, overrideBack: handleBack, hideBack: currentStep === DepositStep.SELECT_TOKEN, center: DEPOSIT_STEP_NAME[currentStep], children: (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: { marginLeft: "auto" }, onClick: close }) }), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperRef, swiperProps: {
|
|
130
131
|
autoHeight: true,
|
|
131
132
|
spaceBetween: 32,
|
|
132
|
-
|
|
133
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content" }), children: depositTokens === null || depositTokens === void 0 ? void 0 : depositTokens.map(function (item) {
|
|
133
|
+
}, disableSwipe: true, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content" }), children: depositTokens === null || depositTokens === void 0 ? void 0 : depositTokens.map(function (item) {
|
|
134
134
|
var stringifiedTokenData = JSON.stringify(item);
|
|
135
135
|
if (!item)
|
|
136
136
|
return null;
|
|
@@ -149,11 +149,11 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
149
149
|
alignSelf: "center",
|
|
150
150
|
borderRadius: theme.mixins.theBorderRadius.r12,
|
|
151
151
|
overflow: "hidden",
|
|
152
|
-
backgroundColor: theme.palette.background.
|
|
152
|
+
backgroundColor: theme.palette.background.white80,
|
|
153
153
|
backdropFilter: "blur(10px)",
|
|
154
154
|
}, children: (0, jsx_runtime_1.jsx)(QRCode_1.default, { value: qrCodeValue, title: "Deposit ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name), logo: (0, getIcon_1.default)("ton"), bgColor: "transparent" }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Network" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { component: "button", sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g2, cursor: "pointer", transition: "transform 0.3s ease-in-out", "&:active": {
|
|
155
155
|
transform: "translateX(0.5rem)",
|
|
156
|
-
} }), onClick: handleBack, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.name }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("right_arrow"), width: 10 })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Address" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all" }), children: addressByNetwork })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, backgroundColor: theme.palette.background.white16, borderRadius: theme.mixins.theBorderRadius.r12, padding: theme.mixins.customPadding.p8 }), children: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: ["Deposit", " ", (0, jsx_runtime_1.jsxs)("strong", { style: { color: theme.palette.text.white }, children: ["min ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value, " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name] }), " ", "and", " ", (0, jsx_runtime_1.jsx)("strong", { style: { color: theme.palette.text.white }, children: "select the correct network" }), ", or you will lose your assets."] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12, justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: qrCodeValue, children: (0, jsx_runtime_1.jsxs)(Button_1.default.Secondary, { className: "gap-1.5 flex items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
156
|
+
} }), onClick: handleBack, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.name }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("right_arrow"), width: 10 })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Address" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all" }), children: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: addressByNetwork || "", children: addressByNetwork }) })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, backgroundColor: theme.palette.background.white16, borderRadius: theme.mixins.theBorderRadius.r12, padding: theme.mixins.customPadding.p8 }), children: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: ["Deposit", " ", (0, jsx_runtime_1.jsxs)("strong", { style: { color: theme.palette.text.white }, children: ["min ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value, " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name] }), " ", "and", " ", (0, jsx_runtime_1.jsx)("strong", { style: { color: theme.palette.text.white }, children: "select the correct network" }), ", or you will lose your assets."] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12, justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: qrCodeValue, children: (0, jsx_runtime_1.jsxs)(Button_1.default.Secondary, { className: "gap-1.5 flex items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
157
157
|
fontSize: theme.typography.fontSize12,
|
|
158
158
|
fontWeight: theme.typography.fontWeight400,
|
|
159
159
|
leading: "typography.leading150",
|
|
@@ -74,7 +74,7 @@ function RequireConnect(_a) {
|
|
|
74
74
|
(_a = authViewRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
75
75
|
};
|
|
76
76
|
if (!isAuthenticated) {
|
|
77
|
-
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: authViewRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, __assign({}, rest, { sx: { position: "relative" }, children: [children, (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "absolute", inset: 0, zIndex: 10 } })] })), children: (0, jsx_runtime_1.jsx)(AuthView_1.default, { onBack: backAuthView }) }));
|
|
77
|
+
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: authViewRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, __assign({}, rest, { sx: { position: "relative" }, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: { pointerEvents: "none" }, children: children }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "absolute", inset: 0, zIndex: 10 } })] })), children: (0, jsx_runtime_1.jsx)(AuthView_1.default, { onBack: backAuthView }) }));
|
|
78
78
|
}
|
|
79
79
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
80
80
|
}
|
|
@@ -47,6 +47,8 @@ var TokenSelection = function (props) {
|
|
|
47
47
|
}, [balance, tokenData]);
|
|
48
48
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ onClick: function () { return onClick === null || onClick === void 0 ? void 0 : onClick(tokenData); }, sx: __assign({ backgroundColor: props.active
|
|
49
49
|
? "background.secondary16"
|
|
50
|
-
: "background.white16", border: "1px solid", borderColor: props.active ? "border.secondary" : "transparent", borderRadius: theme.mixins.theBorderRadius.r16, padding: theme.mixins.customPadding.p12, display: "flex", alignItems: "center", cursor: "pointer" }, sx) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 20, src: tokenData === null || tokenData === void 0 ? void 0 : tokenData.icon
|
|
50
|
+
: "background.white16", border: "1px solid", borderColor: props.active ? "border.secondary" : "transparent", borderRadius: theme.mixins.theBorderRadius.r16, padding: theme.mixins.customPadding.p12, display: "flex", alignItems: "center", cursor: "pointer" }, sx) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 20, src: tokenData === null || tokenData === void 0 ? void 0 : tokenData.icon, sx: {
|
|
51
|
+
borderRadius: theme.mixins.theBorderRadius.full,
|
|
52
|
+
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: tokenData === null || tokenData === void 0 ? void 0 : tokenData.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.valueDescription, children: tokenData === null || tokenData === void 0 ? void 0 : tokenData.full_name })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { marginLeft: "auto", alignItems: "end" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balance }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.valueDescription, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balanceInUSD, start: "~ $" }) })] })] })));
|
|
51
53
|
};
|
|
52
54
|
exports.default = TokenSelection;
|
package/dist/theme/mui/theme.js
CHANGED
|
@@ -30,6 +30,7 @@ var typography = {
|
|
|
30
30
|
};
|
|
31
31
|
var background = {
|
|
32
32
|
white: "#ffffff",
|
|
33
|
+
white80: "rgba(255, 255, 255, 0.8)",
|
|
33
34
|
white64: "rgba(255, 255, 255, 0.64)",
|
|
34
35
|
white24: "rgba(255, 255, 255, 0.24)",
|
|
35
36
|
white16: "rgba(255, 255, 255, 0.16)",
|
|
@@ -93,6 +94,19 @@ var customPadding = {
|
|
|
93
94
|
p40: "2.5rem",
|
|
94
95
|
p48: "3rem",
|
|
95
96
|
};
|
|
97
|
+
var customMargin = {
|
|
98
|
+
p4: "0.25rem",
|
|
99
|
+
p6: "0.375rem",
|
|
100
|
+
p8: "0.5rem",
|
|
101
|
+
p10: "0.625rem",
|
|
102
|
+
p12: "0.75rem",
|
|
103
|
+
p16: "1rem",
|
|
104
|
+
p20: "1.25rem",
|
|
105
|
+
p24: "1.5rem",
|
|
106
|
+
p32: "2rem",
|
|
107
|
+
p40: "2.5rem",
|
|
108
|
+
p48: "3rem",
|
|
109
|
+
};
|
|
96
110
|
var theBorderRadius = {
|
|
97
111
|
full: "999px",
|
|
98
112
|
r12: "0.75rem",
|
|
@@ -117,6 +131,7 @@ var theme = (0, styles_1.createTheme)({
|
|
|
117
131
|
mixins: {
|
|
118
132
|
pagePadding: pagePadding,
|
|
119
133
|
customPadding: customPadding,
|
|
134
|
+
customMargin: customMargin,
|
|
120
135
|
theBorderRadius: theBorderRadius,
|
|
121
136
|
gaps: gaps,
|
|
122
137
|
row: {
|