tek-wallet 0.0.64 → 0.0.66

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.
@@ -20,6 +20,7 @@ var StatusDisplay_1 = require("../../../components/ui/StatusDisplay");
20
20
  var StatusDisplay_2 = __importDefault(require("../../../components/ui/StatusDisplay"));
21
21
  var theme_1 = __importDefault(require("../../../theme/mui/theme"));
22
22
  var material_1 = require("@mui/material");
23
+ var getImage_1 = __importDefault(require("../../../utils/getImage"));
23
24
  var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
24
25
  var header = props.header, footer = props.footer, fullScreen = props.fullScreen, children = props.children, sx = props.sx;
25
26
  var _a = (0, react_1.useState)(StatusDisplay_1.StatusDisplayType.Normal), status = _a[0], setStatus = _a[1];
@@ -42,18 +43,20 @@ var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
42
43
  },
43
44
  };
44
45
  });
45
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ height: "100%", width: "100%", position: "relative", overflowY: "auto" }, sx), children: [header && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
46
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative", backgroundImage: "url(".concat((0, getImage_1.default)("main_bg", "jpg"), ")"), backgroundSize: "cover", backgroundPosition: "center", backgroundRepeat: "no-repeat", height: "100dvh", width: "100vw" }, sx), children: [header && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
46
47
  height: "3.125rem",
47
48
  width: "100%",
48
49
  position: "absolute",
49
50
  top: 0,
50
51
  left: 0,
51
52
  zIndex: 50,
52
- }, children: header })), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ height: "100%", width: "100%", overflowX: "hidden", overflowY: "auto" }, (header && !fullScreen
53
- ? {
54
- paddingTop: "3.125rem",
55
- }
56
- : {})), children: children }), footer && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
53
+ }, children: header })), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
54
+ height: "100%",
55
+ width: "100%",
56
+ overflowX: "hidden",
57
+ overflowY: "auto",
58
+ paddingTop: header && !fullScreen ? "3.125rem" : 0,
59
+ }, children: children }), footer && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
57
60
  height: "3rem",
58
61
  width: "100%",
59
62
  position: "absolute",
@@ -5,8 +5,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
5
5
  var system_1 = require("@mui/system");
6
6
  var StyledDefaultPageLayout = (0, system_1.styled)("div")(function () { return ({
7
7
  padding: "1rem",
8
- minHeight: "100dvh",
9
- minWidth: "100vw",
8
+ minHeight: "100%",
9
+ width: "100%",
10
10
  }); });
11
11
  var DefaultPageLayout = function (props) {
12
12
  return ((0, jsx_runtime_1.jsx)(StyledDefaultPageLayout, { sx: props.sx, children: props.children }));
@@ -60,8 +60,6 @@ var SwiperControlled = (0, react_2.forwardRef)(function (props, ref) {
60
60
  };
61
61
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { width: "100%" }, children: [props.tabs && ((0, jsx_runtime_1.jsxs)(material_1.Tabs, { className: (0, cn_1.default)(props.tabsClassName), value: activeTab, onChange: handleTabChange, children: __spreadArray([], props.tabs, true) })), (0, jsx_runtime_1.jsx)(react_1.Swiper, __assign({}, props.swiperProps, { onSlideChange: handleSlideChange, ref: swiperRef, initialSlide: activeTab, style: {
62
62
  width: "100%",
63
- border: "2px blue solid",
64
- maxWidth: "100vw",
65
63
  }, allowTouchMove: !props.disableSwipe, children: props.children }))] }));
66
64
  });
67
65
  SwiperControlled.displayName = "SwiperControlled";
@@ -57,16 +57,10 @@ var DrawerComponent_1 = __importStar(require("../../../components/ui/DrawerCompo
57
57
  var CreateWalletView_1 = __importDefault(require("../CreateWalletView"));
58
58
  var react_1 = require("react");
59
59
  var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
60
- var TheBackground_1 = __importDefault(require("../../ui/TheBackground"));
61
60
  var ImportWalletView_1 = __importDefault(require("../ImportWalletView"));
62
- var system_1 = require("@mui/system");
63
- var InfoGroup = (0, system_1.styled)(system_1.Box)(function () { return ({
64
- display: "flex",
65
- flexDirection: "column",
66
- gap: "0.75rem",
67
- marginTop: "auto",
68
- border: "2px red solid",
69
- }); });
61
+ var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
62
+ var material_1 = require("@mui/material");
63
+ var PageHeader_1 = __importDefault(require("../../ui/PageHeader"));
70
64
  var AuthView = function (props) {
71
65
  var createWalletDrawerRef = (0, react_1.useRef)(null);
72
66
  var importWalletDrawerRef = (0, react_1.useRef)(null);
@@ -78,14 +72,20 @@ var AuthView = function (props) {
78
72
  var _a;
79
73
  (_a = importWalletDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
80
74
  };
81
- return ((0, jsx_runtime_1.jsx)(TheBackground_1.default, { children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { sx: __assign({ display: "flex", flexDirection: "column", gap: "1rem", paddingBottom: "2.25rem" }, props.sx), children: [(0, jsx_runtime_1.jsx)(Image_1.default, { src: (0, getIcon_1.default)("eth"), sx: {
75
+ return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Connect Wallet" }), children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { sx: __assign({ display: "flex", flexDirection: "column", gap: "1rem", paddingBottom: "2.25rem" }, props.sx), children: [(0, jsx_runtime_1.jsx)(Image_1.default, { src: (0, getIcon_1.default)("eth"), sx: {
82
76
  width: "80%",
83
77
  aspectRatio: "1",
84
78
  position: "fixed",
85
79
  top: "50%",
86
80
  left: "50%",
87
81
  transform: "translate(-50%, -50%)",
88
- } }), (0, jsx_runtime_1.jsxs)(InfoGroup, { children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { sx: {
82
+ } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
83
+ display: "flex",
84
+ flexDirection: "column",
85
+ gap: "1rem",
86
+ border: "2px blue solid",
87
+ marginTop: "auto",
88
+ }, children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { sx: {
89
89
  width: "100%",
90
90
  border: "2px red solid",
91
91
  }, ref: createWalletDrawerRef, trigger: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, children: "Create a new wallet" }), direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, children: (0, jsx_runtime_1.jsx)(CreateWalletView_1.default, { onBack: onBackCreateWallet }) }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: importWalletDrawerRef, trigger: (0, jsx_runtime_1.jsx)(Button_1.default.Secondary, { sx: { width: "100%" }, children: "I have a wallet" }), direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, children: (0, jsx_runtime_1.jsx)(ImportWalletView_1.default, { onBack: onBackImportWallet }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
@@ -89,7 +89,6 @@ var jsx_runtime_1 = require("react/jsx-runtime");
89
89
  var DefaultPageLayout_1 = __importDefault(require("../../../components/layouts/DefaultPageLayout"));
90
90
  var SwiperControlled_1 = __importDefault(require("../../../components/ui/SwiperControlled"));
91
91
  var react_1 = require("swiper/react");
92
- var TheBackground_1 = __importDefault(require("../../../components/ui/TheBackground"));
93
92
  var ChildPageLayout_1 = __importDefault(require("../../../components/layouts/ChildPageLayout"));
94
93
  var PageHeader_1 = __importDefault(require("../../../components/ui/PageHeader"));
95
94
  var OTP_1 = __importStar(require("../../../components/ui/OTP"));
@@ -197,37 +196,37 @@ var ImportWalletView = function (props) {
197
196
  return [2 /*return*/];
198
197
  });
199
198
  }); };
200
- return ((0, jsx_runtime_1.jsx)(TheBackground_1.default, { children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { ref: childPageLayoutRef, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { overrideBack: handleBack, title: "Passcode" }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: __assign({ display: "flex", flexDirection: "column", gap: "1rem", height: "100%" }, props.sx), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperControlledRef, disableSwipe: true, children: [(0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
201
- display: "flex",
202
- flexDirection: "column",
203
- justifyContent: "center",
204
- height: "100%",
205
- gap: "1rem",
206
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
207
- color: "text.white",
208
- fontWeight: "600",
209
- fontSize: "16px",
210
- }, children: "Create Passcode" }), (0, jsx_runtime_1.jsx)(OTP_1.default, { value: otp, onChange: handleOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
211
- color: "text.white",
212
- fontWeight: "400",
213
- fontSize: "14px",
214
- textAlign: "center",
215
- }, children: "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Necessitatibus, eos! Dolore quae vero in ducimus doloribus" })] }) }), (0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
216
- display: "flex",
217
- flexDirection: "column",
218
- alignItems: "center",
219
- justifyContent: "center",
220
- height: "100%",
221
- gap: "1rem",
222
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
223
- color: "text.white",
224
- fontWeight: "600",
225
- fontSize: "16px",
226
- }, children: "Confirm Passcode" }), (0, jsx_runtime_1.jsx)(OTP_1.default, { value: confirmOtp, onChange: handleConfirmOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
227
- color: "text.white",
228
- fontWeight: "400",
229
- fontSize: "14px",
230
- textAlign: "center",
231
- }, children: "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Necessitatibus, eos! Dolore quae vero in ducimus doloribus" })] }) })] }) }) }) }));
199
+ return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { ref: childPageLayoutRef, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { overrideBack: handleBack, title: "Passcode" }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: __assign({ display: "flex", flexDirection: "column", gap: "1rem" }, props.sx), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperControlledRef, disableSwipe: true, children: [(0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
200
+ display: "flex",
201
+ flexDirection: "column",
202
+ justifyContent: "center",
203
+ height: "100%",
204
+ gap: "1rem",
205
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
206
+ color: "text.white",
207
+ fontWeight: "600",
208
+ fontSize: "16px",
209
+ }, children: "Create Passcode" }), (0, jsx_runtime_1.jsx)(OTP_1.default, { value: otp, onChange: handleOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
210
+ color: "text.white",
211
+ fontWeight: "400",
212
+ fontSize: "14px",
213
+ textAlign: "center",
214
+ }, children: "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Necessitatibus, eos! Dolore quae vero in ducimus doloribus" })] }) }), (0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
215
+ display: "flex",
216
+ flexDirection: "column",
217
+ alignItems: "center",
218
+ justifyContent: "center",
219
+ height: "100%",
220
+ gap: "1rem",
221
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
222
+ color: "text.white",
223
+ fontWeight: "600",
224
+ fontSize: "16px",
225
+ }, children: "Confirm Passcode" }), (0, jsx_runtime_1.jsx)(OTP_1.default, { value: confirmOtp, onChange: handleConfirmOtpChange, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
226
+ color: "text.white",
227
+ fontWeight: "400",
228
+ fontSize: "14px",
229
+ textAlign: "center",
230
+ }, children: "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Necessitatibus, eos! Dolore quae vero in ducimus doloribus" })] }) })] }) }) }));
232
231
  };
233
232
  exports.default = ImportWalletView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.64",
3
+ "version": "0.0.66",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",