tek-wallet 0.0.205 → 0.0.206
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/components/ui/ConfirmByPasscode/index.js +1 -1
- package/dist/components/ui/DepositFunction/index.js +8 -6
- package/dist/components/ui/EmptyData/index.d.ts +11 -0
- package/dist/components/ui/EmptyData/index.js +26 -0
- package/dist/components/ui/LineValue/index.js +1 -2
- package/package.json +1 -1
|
@@ -193,7 +193,7 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
193
193
|
}
|
|
194
194
|
});
|
|
195
195
|
}); };
|
|
196
|
-
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: handleOnOpen, onClose: handleOnClose, children: (0, jsx_runtime_1.jsx)(LoadingLayout_1.default, { initLoading: false, ref: loadingRef, sx: { width: "100%" }, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Authentication", onClose: handleClose, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { justifyContent: "center", alignItems: "center", gap: "1rem", width: "100%" }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: ["Enter your passcode to confirm", " ", (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { fontWeight: theme.typography.fontWeight600 }, children: action })] }), (0, jsx_runtime_1.jsx)(OTP_1.default, { value: otp, onChange: handleOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD }), !!authError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: authError }))] }) }) }) }));
|
|
196
|
+
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: handleOnOpen, onClose: handleOnClose, children: (0, jsx_runtime_1.jsx)(LoadingLayout_1.default, { initLoading: false, ref: loadingRef, sx: { width: "100%" }, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Authentication", onClose: handleClose, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { justifyContent: "center", alignItems: "center", gap: "1rem", width: "100%" }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.sessionTitle), children: ["Enter your passcode to confirm", " ", (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { fontWeight: theme.typography.fontWeight600 }, children: action })] }), (0, jsx_runtime_1.jsx)(OTP_1.default, { value: otp, onChange: handleOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD }), !!authError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.validationError), { alignSelf: "flex-start" }), children: authError }))] }) }) }) }));
|
|
197
197
|
});
|
|
198
198
|
ConfirmByPasscode.displayName = "ConfirmByPasscode";
|
|
199
199
|
exports.default = ConfirmByPasscode;
|
|
@@ -37,6 +37,8 @@ var TokenSelection_1 = __importDefault(require("../TokenSelection"));
|
|
|
37
37
|
var CloseModal_1 = __importDefault(require("../CloseModal"));
|
|
38
38
|
var useDepositData_1 = __importDefault(require("../../../hooks/useDepositData"));
|
|
39
39
|
var RequireConnect_1 = __importDefault(require("../RequireConnect"));
|
|
40
|
+
var WaitingData_1 = __importDefault(require("../WaitingData"));
|
|
41
|
+
var EmptyData_1 = __importDefault(require("../EmptyData"));
|
|
40
42
|
var DepositStep;
|
|
41
43
|
(function (DepositStep) {
|
|
42
44
|
DepositStep[DepositStep["SELECT_TOKEN"] = 1] = "SELECT_TOKEN";
|
|
@@ -134,12 +136,12 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
134
136
|
}, 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: {
|
|
135
137
|
autoHeight: true,
|
|
136
138
|
spaceBetween: 32,
|
|
137
|
-
}, disableSwipe: true, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
}, disableSwipe: true, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content" }), children: [!depositTokens && (0, jsx_runtime_1.jsx)(WaitingData_1.default, {}), (depositTokens === null || depositTokens === void 0 ? void 0 : depositTokens.length) === 0 && (0, jsx_runtime_1.jsx)(EmptyData_1.default, {}), depositTokens === null || depositTokens === void 0 ? void 0 : depositTokens.map(function (item) {
|
|
140
|
+
var stringifiedTokenData = JSON.stringify(item);
|
|
141
|
+
if (!item)
|
|
142
|
+
return null;
|
|
143
|
+
return ((0, jsx_runtime_1.jsx)(TokenSelection_1.default, { onClick: handleSelectToken, tokenData: stringifiedTokenData, active: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.id) === item.id }, item.id));
|
|
144
|
+
})] }) }, DepositStep.SELECT_TOKEN), (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 }), children: networks === null || networks === void 0 ? void 0 : networks.map(function (item) {
|
|
143
145
|
if (!item)
|
|
144
146
|
return null;
|
|
145
147
|
return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { onClick: handleSelectNetwork, networkData: JSON.stringify(item), active: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.id) === item.id }, item.id));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GeneralProps, UnknownFunction } from "../../../types/ui";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export interface EmptyDataProps extends GeneralProps {
|
|
4
|
+
icon?: string;
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
action?: UnknownFunction;
|
|
8
|
+
actionText?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function EmptyData(props: EmptyDataProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default EmptyData;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
+
var material_1 = require("@mui/material");
|
|
19
|
+
var Text_1 = __importDefault(require("../Text"));
|
|
20
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
21
|
+
var Button_1 = __importDefault(require("../Button"));
|
|
22
|
+
function EmptyData(props) {
|
|
23
|
+
var theme = (0, material_1.useTheme)();
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center", justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 48, src: props.icon }), (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
|
+
}
|
|
26
|
+
exports.default = EmptyData;
|
|
@@ -21,7 +21,6 @@ var material_1 = require("@mui/material");
|
|
|
21
21
|
var LineValue = function (props) {
|
|
22
22
|
var theme = (0, material_1.useTheme)();
|
|
23
23
|
var field = props.field, value = props.value, valueDescription = props.valueDescription;
|
|
24
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "start", gap: theme.mixins.gaps.g16 }), props.sx), children: [!!field && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: field })), !!value ||
|
|
25
|
-
(!!valueDescription && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { alignItems: "end", gap: theme.mixins.gaps.g2 }), children: [!!value && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: value })), !!valueDescription && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: valueDescription }))] })))] }));
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { alignItems: "start", gap: theme.mixins.gaps.g16 }), props.sx), children: [!!field && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: field })), (!!value || !!valueDescription) && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { alignItems: "end", gap: theme.mixins.gaps.g2 }), children: [!!value && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.value), children: value })), !!valueDescription && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: valueDescription }))] }))] }));
|
|
26
25
|
};
|
|
27
26
|
exports.default = LineValue;
|