tek-wallet 0.0.161 → 0.0.163
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.d.ts +1 -0
- package/dist/components/ui/ConfirmByPasscode/index.js +1 -1
- package/dist/components/ui/LoadingLayout/index.js +1 -1
- package/dist/components/ui/LockToken/index.js +6 -1
- package/dist/components/ui/ModalLayout/index.js +1 -1
- package/dist/components/ui/OTP/index.js +2 -2
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ import { ActionConfirm } from "../ConfirmLayout/type";
|
|
|
3
3
|
interface ConfirmByPasscodeProps extends GeneralProps {
|
|
4
4
|
onConfirmSuccess?: (value: string) => any;
|
|
5
5
|
action: ActionConfirm;
|
|
6
|
+
onClose?: () => void;
|
|
6
7
|
}
|
|
7
8
|
export interface ConfirmByPasscodeRef {
|
|
8
9
|
clearData: () => void;
|
|
@@ -128,7 +128,7 @@ var ConfirmByPasscode = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
130
|
}); };
|
|
131
|
-
return ((0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Confirm", 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)(LoadingLayout_1.default, { initLoading: false, ref: loadingRef, children: (0, jsx_runtime_1.jsx)(OTP_1.default, { value: otp, onChange: handleOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD }) })] }) }));
|
|
131
|
+
return ((0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Confirm", onClose: props.onClose, 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)(LoadingLayout_1.default, { initLoading: false, ref: loadingRef, children: (0, jsx_runtime_1.jsx)(OTP_1.default, { value: otp, onChange: handleOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD }) })] }) }));
|
|
132
132
|
});
|
|
133
133
|
ConfirmByPasscode.displayName = "ConfirmByPasscode";
|
|
134
134
|
exports.default = ConfirmByPasscode;
|
|
@@ -30,7 +30,7 @@ var LoadingLayout = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
30
30
|
setLoading(false);
|
|
31
31
|
},
|
|
32
32
|
}); });
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative", width: "
|
|
33
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative", width: "fit-content", height: "fit-content" }, sx), children: [children, loading && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({ position: "absolute", inset: 0 }, theme.mixins.whiteLoadingOverlay), { zIndex: 1000 }), children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.center), children: loadingMessage }) }))] }));
|
|
34
34
|
});
|
|
35
35
|
LoadingLayout.displayName = "LoadingLayout";
|
|
36
36
|
exports.default = LoadingLayout;
|
|
@@ -33,11 +33,16 @@ var LockToken = function (props) {
|
|
|
33
33
|
var _a;
|
|
34
34
|
(_a = confirmByPasscodeRef.current) === null || _a === void 0 ? void 0 : _a.clearData();
|
|
35
35
|
};
|
|
36
|
+
var closeAuthModal = function () {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
(_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
39
|
+
(_b = confirmByPasscodeRef.current) === null || _b === void 0 ? void 0 : _b.clearData();
|
|
40
|
+
};
|
|
36
41
|
var handleLockToken = function () {
|
|
37
42
|
var _a;
|
|
38
43
|
(_a = confirmByPasscodeDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
39
44
|
console.warn("🚀 ~ handleLockToken ~ lockData:", props.lockData);
|
|
40
45
|
};
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(ConfirmLayout_1.default, { action: type_1.ActionConfirm.LOCK, trigger: props.trigger, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsx)(LineValue_1.default, { field: "Amount", value: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: props.lockData.amount, unit: props.lockData.tokenSlug }) }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, children: "Confirm" }), onOpen: handleClearConfirmData, children: (0, jsx_runtime_1.jsx)(ConfirmByPasscode_1.default, { ref: confirmByPasscodeRef, action: type_1.ActionConfirm.LOCK, onConfirmSuccess: handleLockToken }) })] }) }) }));
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(ConfirmLayout_1.default, { action: type_1.ActionConfirm.LOCK, trigger: props.trigger, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsx)(LineValue_1.default, { field: "Amount", value: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: props.lockData.amount, unit: props.lockData.tokenSlug }) }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { trigger: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, children: "Confirm" }), onOpen: handleClearConfirmData, onClose: handleClearConfirmData, children: (0, jsx_runtime_1.jsx)(ConfirmByPasscode_1.default, { ref: confirmByPasscodeRef, action: type_1.ActionConfirm.LOCK, onConfirmSuccess: handleLockToken, onClose: closeAuthModal }) })] }) }) }));
|
|
42
47
|
};
|
|
43
48
|
exports.default = LockToken;
|
|
@@ -29,6 +29,6 @@ var ModalLayout = function (props) {
|
|
|
29
29
|
right: 0,
|
|
30
30
|
top: "50%",
|
|
31
31
|
transform: "translateY(-50%)",
|
|
32
|
-
}, onClick: props.onClose })] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: { my: "0.75rem" } })] })), props.overrideHeader, (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { flex: 1, overflowY: "auto" }, children: props.children })] }));
|
|
32
|
+
}, onClick: props.onClose })] }), props.title && (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: { my: "0.75rem" } })] })), props.overrideHeader, (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { flex: 1, overflowY: "auto" }, children: props.children })] }));
|
|
33
33
|
};
|
|
34
34
|
exports.default = ModalLayout;
|
|
@@ -46,9 +46,9 @@ var CustomOtpInput = function (props) {
|
|
|
46
46
|
outline: "none",
|
|
47
47
|
color: "#ffffff",
|
|
48
48
|
backgroundColor: "#ffffff29",
|
|
49
|
-
}, renderInput: function (props) { return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", __assign({}, props, { inputMode: "decimal" })), (0, jsx_runtime_1.jsx)("style", { children: "input::selection {\n background-color: transparent; \n color: white; \n }" })] })); } })));
|
|
49
|
+
}, renderInput: function (props) { return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("input", __assign({}, props, { inputMode: "decimal", autoComplete: "off" })), (0, jsx_runtime_1.jsx)("style", { children: "input::selection {\n background-color: transparent; \n color: white; \n }" })] })); } })));
|
|
50
50
|
default:
|
|
51
|
-
return ((0, jsx_runtime_1.jsx)(react_otp_input_1.default, __assign({}, rest, { renderInput: function (props) { return (0, jsx_runtime_1.jsx)("input", __assign({}, props, { inputMode: "text" })); } })));
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(react_otp_input_1.default, __assign({}, rest, { renderInput: function (props) { return ((0, jsx_runtime_1.jsx)("input", __assign({}, props, { inputMode: "text", autoComplete: "off" }))); } })));
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
exports.default = CustomOtpInput;
|