tek-wallet 0.0.56 → 0.0.58

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.
@@ -1,16 +1,63 @@
1
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
+ };
2
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
15
  };
5
16
  Object.defineProperty(exports, "__esModule", { value: true });
6
17
  var jsx_runtime_1 = require("react/jsx-runtime");
7
- var cn_1 = __importDefault(require("../../../utils/cn"));
8
- var clsx_1 = __importDefault(require("clsx"));
9
18
  var react_1 = require("react");
10
19
  var StatusDisplay_1 = require("../../../components/ui/StatusDisplay");
11
20
  var StatusDisplay_2 = __importDefault(require("../../../components/ui/StatusDisplay"));
21
+ var system_1 = require("@mui/system");
22
+ var theme_1 = __importDefault(require("../../../theme/mui/theme"));
23
+ var StyledChildPageLayout = (0, system_1.styled)("div")(function () { return ({
24
+ height: "100%",
25
+ width: "100%",
26
+ position: "relative",
27
+ overflowY: "auto",
28
+ }); });
29
+ var StyledHeader = (0, system_1.styled)("div")(function () { return ({
30
+ height: "3.125rem",
31
+ width: "100%",
32
+ position: "absolute",
33
+ top: 0,
34
+ left: 0,
35
+ zIndex: 50,
36
+ }); });
37
+ var StyledContent = (0, system_1.styled)("div")(function (props) { return (__assign({ height: "100%", width: "100%", overflowX: "hidden", overflowY: "auto" }, (props.hasHeader && !props.fullScreen
38
+ ? {
39
+ paddingTop: "3.125rem",
40
+ }
41
+ : {}))); });
42
+ var StyledFooter = (0, system_1.styled)("div")(function () { return ({
43
+ height: "3rem",
44
+ width: "100%",
45
+ position: "absolute",
46
+ bottom: 0,
47
+ left: 0,
48
+ zIndex: 50,
49
+ }); });
50
+ var StyledStatusOverlay = (0, system_1.styled)("div")(function () { return ({
51
+ position: "absolute",
52
+ inset: 0,
53
+ display: "flex",
54
+ alignItems: "center",
55
+ justifyContent: "center",
56
+ backgroundColor: "".concat(theme_1.default.palette.backgroundBlack24.main),
57
+ zIndex: 50,
58
+ }); });
12
59
  var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
13
- var header = props.header, footer = props.footer, fullScreen = props.fullScreen, children = props.children;
60
+ var header = props.header, footer = props.footer, fullScreen = props.fullScreen, children = props.children, sx = props.sx;
14
61
  var _a = (0, react_1.useState)(StatusDisplay_1.StatusDisplayType.Normal), status = _a[0], setStatus = _a[1];
15
62
  (0, react_1.useImperativeHandle)(ref, function () {
16
63
  return {
@@ -31,7 +78,7 @@ var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
31
78
  },
32
79
  };
33
80
  });
34
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, cn_1.default)("h-full w-full relative", props.className), children: [header && ((0, jsx_runtime_1.jsx)("div", { className: "h-[3.125rem] w-full absolute top-0 left-0 z-50", children: header })), (0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.default)("h-full w-full overflow-x-hidden overflow-y-auto", header && !fullScreen && "pt-[3.125rem]"), children: children }), footer && ((0, jsx_runtime_1.jsx)("div", { className: "h-12 w-full absolute bottom-0 left-0 z-50", children: footer })), status !== StatusDisplay_1.StatusDisplayType.Normal && ((0, jsx_runtime_1.jsx)("div", { className: (0, clsx_1.default)("absolute inset-0 flex items-center justify-center bg-ui-background-black-24 z-50"), children: (0, jsx_runtime_1.jsx)(StatusDisplay_2.default, { status: status }) }))] }));
81
+ return ((0, jsx_runtime_1.jsxs)(StyledChildPageLayout, { sx: sx, children: [header && (0, jsx_runtime_1.jsx)(StyledHeader, { children: header }), (0, jsx_runtime_1.jsx)(StyledContent, { hasHeader: !!header, fullScreen: fullScreen, children: children }), footer && (0, jsx_runtime_1.jsx)(StyledFooter, { children: footer }), status !== StatusDisplay_1.StatusDisplayType.Normal && ((0, jsx_runtime_1.jsx)(StyledStatusOverlay, { children: (0, jsx_runtime_1.jsx)(StatusDisplay_2.default, { status: status }) }))] }));
35
82
  });
36
83
  ChildPageLayout.displayName = "ChildPageLayout";
37
84
  exports.default = ChildPageLayout;
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  "use client";
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
3
  Object.defineProperty(exports, "__esModule", { value: true });
7
4
  var jsx_runtime_1 = require("react/jsx-runtime");
8
- var cn_1 = __importDefault(require("../../../utils/cn"));
5
+ var system_1 = require("@mui/system");
6
+ var StyledDefaultPageLayout = (0, system_1.styled)("div")(function () { return ({
7
+ padding: "1rem",
8
+ minHeight: "100",
9
+ }); });
9
10
  var DefaultPageLayout = function (props) {
10
- return (0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.default)("p-4", props.className), children: props.children });
11
+ return ((0, jsx_runtime_1.jsx)(StyledDefaultPageLayout, { sx: props.sx, children: props.children }));
11
12
  };
12
13
  exports.default = DefaultPageLayout;
@@ -0,0 +1,15 @@
1
+ import { GeneralProps } from "../../../types/ui";
2
+ interface PageLayoutProps extends GeneralProps {
3
+ header?: React.ReactNode;
4
+ footer?: React.ReactNode;
5
+ fullScreen?: boolean;
6
+ }
7
+ export type PageLayoutRef = {
8
+ showNormal: () => void;
9
+ showLoading: () => void;
10
+ showSuccess: () => void;
11
+ showError: () => void;
12
+ showWarning: () => void;
13
+ };
14
+ declare const PageLayout: import("react").ForwardRefExoticComponent<PageLayoutProps & import("react").RefAttributes<PageLayoutRef>>;
15
+ export default PageLayout;
@@ -0,0 +1,85 @@
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 react_1 = require("react");
19
+ var StatusDisplay_1 = require("../../../components/ui/StatusDisplay");
20
+ var StatusDisplay_2 = __importDefault(require("../../../components/ui/StatusDisplay"));
21
+ var system_1 = require("@mui/system");
22
+ var theme_1 = __importDefault(require("../../../theme/mui/theme"));
23
+ var StyledPageLayout = (0, system_1.styled)("div")(function () { return ({
24
+ height: "100%",
25
+ width: "100%",
26
+ position: "relative",
27
+ }); });
28
+ var StyledHeader = (0, system_1.styled)("div")(function () { return ({
29
+ height: "3.125rem",
30
+ width: "100%",
31
+ position: "absolute",
32
+ top: 0,
33
+ left: 0,
34
+ zIndex: 50,
35
+ }); });
36
+ var StyledContent = (0, system_1.styled)("div")(function (_a) {
37
+ var hasHeader = _a.hasHeader, fullScreen = _a.fullScreen;
38
+ return (__assign({ height: "100%", width: "100%", overflowX: "hidden", overflowY: "auto" }, (hasHeader &&
39
+ !fullScreen && {
40
+ paddingTop: "3.125rem",
41
+ })));
42
+ });
43
+ var StyledFooter = (0, system_1.styled)("div")(function () { return ({
44
+ height: "3rem",
45
+ width: "100%",
46
+ position: "absolute",
47
+ bottom: 0,
48
+ left: 0,
49
+ zIndex: 50,
50
+ }); });
51
+ var StyledStatusOverlay = (0, system_1.styled)("div")(function () { return ({
52
+ position: "absolute",
53
+ inset: 0,
54
+ display: "flex",
55
+ alignItems: "center",
56
+ justifyContent: "center",
57
+ backgroundColor: "".concat(theme_1.default.palette.textWhite.main),
58
+ zIndex: 50,
59
+ }); });
60
+ var PageLayout = (0, react_1.forwardRef)(function (props, ref) {
61
+ var header = props.header, footer = props.footer, fullScreen = props.fullScreen, children = props.children, sx = props.sx;
62
+ var _a = (0, react_1.useState)(StatusDisplay_1.StatusDisplayType.Normal), status = _a[0], setStatus = _a[1];
63
+ (0, react_1.useImperativeHandle)(ref, function () {
64
+ return {
65
+ showNormal: function () {
66
+ setStatus(StatusDisplay_1.StatusDisplayType.Normal);
67
+ },
68
+ showLoading: function () {
69
+ setStatus(StatusDisplay_1.StatusDisplayType.Loading);
70
+ },
71
+ showSuccess: function () {
72
+ setStatus(StatusDisplay_1.StatusDisplayType.Success);
73
+ },
74
+ showError: function () {
75
+ setStatus(StatusDisplay_1.StatusDisplayType.Error);
76
+ },
77
+ showWarning: function () {
78
+ setStatus(StatusDisplay_1.StatusDisplayType.Warning);
79
+ },
80
+ };
81
+ });
82
+ return ((0, jsx_runtime_1.jsxs)(StyledPageLayout, { sx: sx, children: [header && (0, jsx_runtime_1.jsx)(StyledHeader, { children: header }), (0, jsx_runtime_1.jsx)(StyledContent, { hasHeader: !!header, fullScreen: fullScreen, children: children }), footer && (0, jsx_runtime_1.jsx)(StyledFooter, { children: footer }), status !== StatusDisplay_1.StatusDisplayType.Normal && ((0, jsx_runtime_1.jsx)(StyledStatusOverlay, { children: (0, jsx_runtime_1.jsx)(StatusDisplay_2.default, { status: status }) }))] }));
83
+ });
84
+ PageLayout.displayName = "PageLayout";
85
+ exports.default = PageLayout;
@@ -29,7 +29,6 @@ exports.BUTTON_STATUS = void 0;
29
29
  var jsx_runtime_1 = require("react/jsx-runtime");
30
30
  var cn_1 = __importDefault(require("../../../utils/cn"));
31
31
  var material_1 = require("@mui/material");
32
- var theme_1 = __importDefault(require("../../../theme/mui/theme"));
33
32
  var BUTTON_STATUS;
34
33
  (function (BUTTON_STATUS) {
35
34
  BUTTON_STATUS["LOADING"] = "loading";
@@ -52,8 +51,8 @@ Button.Secondary = function (props) {
52
51
  var className = props.className, rest = __rest(props, ["className"]);
53
52
  return ((0, jsx_runtime_1.jsx)(Button, __assign({}, rest, { variant: "contained", color: "secondary", className: (0, cn_1.default)("text-16 leading-120 !capitalize font-500 px-4 py-2.5", className), sx: {
54
53
  borderRadius: "999px",
55
- backgroundColor: "color-mix(in srgb, ".concat(theme_1.default.palette.secondary.main, " 16%, transparent)"),
56
- color: theme_1.default.palette.secondary.main,
54
+ // backgroundColor: `color-mix(in srgb, ${theme.palette.secondary.main} 16%, transparent)`,
55
+ // color: theme.palette.secondary.main,
57
56
  } })));
58
57
  };
59
58
  Button.Secondary.displayName = "Button.Secondary";
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  var jsx_runtime_1 = require("react/jsx-runtime");
7
- var cn_1 = __importDefault(require("../../../utils/cn"));
4
+ var system_1 = require("@mui/system");
5
+ var StyledImage = (0, system_1.styled)("img")(function () { return ({
6
+ display: "block",
7
+ }); });
8
8
  var Image = function (props) {
9
- return (
10
- // eslint-disable-next-line @next/next/no-img-element
11
- (0, jsx_runtime_1.jsx)("img", { onClick: props.onClick, className: (0, cn_1.default)("block", props.className), src: props.src, alt: props.alt }));
9
+ return ((0, jsx_runtime_1.jsx)(StyledImage, { onClick: props.onClick, src: props.src, alt: props.alt, sx: props.sx }));
12
10
  };
13
11
  exports.default = Image;
@@ -21,17 +21,14 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  }
22
22
  return t;
23
23
  };
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
24
  Object.defineProperty(exports, "__esModule", { value: true });
28
25
  var jsx_runtime_1 = require("react/jsx-runtime");
29
- var cn_1 = __importDefault(require("../../../utils/cn"));
30
26
  var react_1 = require("react");
27
+ var system_1 = require("@mui/system");
28
+ var StyledText = (0, system_1.styled)("span")(function () { return ({}); });
31
29
  var Text = (0, react_1.forwardRef)(function (_a, ref) {
32
- var tag = _a.tag, children = _a.children, className = _a.className, rest = __rest(_a, ["tag", "children", "className"]);
33
- var Tag = tag || "span";
34
- return ((0, jsx_runtime_1.jsx)(Tag, __assign({ ref: ref, className: (0, cn_1.default)("", className) }, rest, { children: children })));
30
+ var children = _a.children, sx = _a.sx, rest = __rest(_a, ["children", "sx"]);
31
+ return ((0, jsx_runtime_1.jsx)(StyledText, __assign({ ref: ref, sx: sx }, rest, { children: children })));
35
32
  });
36
33
  Text.displayName = "Text";
37
34
  exports.default = Text;
@@ -4,10 +4,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var jsx_runtime_1 = require("react/jsx-runtime");
7
- var cn_1 = __importDefault(require("../../../utils/cn"));
8
7
  var getImage_1 = __importDefault(require("../../../utils/getImage"));
8
+ var system_1 = require("@mui/system");
9
+ var StyledTheBackground = (0, system_1.styled)("div")(function () { return ({
10
+ backgroundImage: "url(".concat((0, getImage_1.default)("main_bg", "jpg"), ")"),
11
+ backgroundSize: "cover",
12
+ backgroundPosition: "center",
13
+ backgroundRepeat: "no-repeat",
14
+ }); });
9
15
  var TheBackground = function (props) {
10
- return ((0, jsx_runtime_1.jsx)("div", { className: (0, cn_1.default)("bg-cover bg-center bg-no-repeat", props.className), style: {
16
+ return ((0, jsx_runtime_1.jsx)(StyledTheBackground, { sx: props.sx, style: {
11
17
  backgroundImage: "url(".concat((0, getImage_1.default)("main_bg", "jpg"), ")"),
12
18
  }, children: props.children }));
13
19
  };
@@ -1,5 +1,16 @@
1
1
  "use strict";
2
2
  "use client";
3
+ var __assign = (this && this.__assign) || function () {
4
+ __assign = Object.assign || function(t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
+ t[p] = s[p];
9
+ }
10
+ return t;
11
+ };
12
+ return __assign.apply(this, arguments);
13
+ };
3
14
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
15
  if (k2 === undefined) k2 = k;
5
16
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -38,7 +49,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
49
  };
39
50
  Object.defineProperty(exports, "__esModule", { value: true });
40
51
  var jsx_runtime_1 = require("react/jsx-runtime");
41
- var cn_1 = __importDefault(require("../../../utils/cn"));
42
52
  var DefaultPageLayout_1 = __importDefault(require("../../../components/layouts/DefaultPageLayout"));
43
53
  var Image_1 = __importDefault(require("../../../components/ui/Image"));
44
54
  var Button_1 = __importDefault(require("../../../components/ui/Button"));
@@ -49,6 +59,13 @@ var react_1 = require("react");
49
59
  var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
50
60
  var TheBackground_1 = __importDefault(require("../../ui/TheBackground"));
51
61
  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
+ }); });
52
69
  var AuthView = function (props) {
53
70
  var createWalletDrawerRef = (0, react_1.useRef)(null);
54
71
  var importWalletDrawerRef = (0, react_1.useRef)(null);
@@ -60,6 +77,17 @@ var AuthView = function (props) {
60
77
  var _a;
61
78
  (_a = importWalletDrawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
62
79
  };
63
- return ((0, jsx_runtime_1.jsx)(TheBackground_1.default, { children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { className: (0, cn_1.default)("flex flex-col gap-4 pb-bottom-page min-h-[100dvh]", props.className), children: [(0, jsx_runtime_1.jsx)(Image_1.default, { src: (0, getIcon_1.default)("eth"), className: "w-[80%] aspect-square fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" }), (0, jsx_runtime_1.jsxs)("div", { className: "info_group flex flex-col gap-3 mt-auto", children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: createWalletDrawerRef, trigger: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { className: "!w-full", 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, { className: "!w-full", 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, { className: "text-center text-12 text-ui-text-white", children: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, eos odio. Accusamus ea praesentium unde deserunt delectus, nihil corporis, mollitia ipsum impedit cupiditate eveniet vero esse facilis, incidunt in sequi?" })] })] }) }));
80
+ 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: "var(--bottom-page)", minHeight: "100dvh" }, props.sx), children: [(0, jsx_runtime_1.jsx)(Image_1.default, { src: (0, getIcon_1.default)("eth"), sx: {
81
+ width: "80%",
82
+ aspectRatio: "1/1",
83
+ position: "fixed",
84
+ top: "50%",
85
+ left: "50%",
86
+ transform: "translate(-50%, -50%)",
87
+ } }), (0, jsx_runtime_1.jsxs)(InfoGroup, { children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { 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: {
88
+ textAlign: "center",
89
+ fontSize: "0.75rem",
90
+ color: "text.white",
91
+ }, children: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Adipisci, eos odio. Accusamus ea praesentium unde deserunt delectus, nihil corporis, mollitia ipsum impedit cupiditate eveniet vero esse facilis, incidunt in sequi?" })] })] }) }));
64
92
  };
65
93
  exports.default = AuthView;
@@ -1,5 +1,16 @@
1
1
  "use strict";
2
2
  "use client";
3
+ var __assign = (this && this.__assign) || function () {
4
+ __assign = Object.assign || function(t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
+ t[p] = s[p];
9
+ }
10
+ return t;
11
+ };
12
+ return __assign.apply(this, arguments);
13
+ };
3
14
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
15
  if (k2 === undefined) k2 = k;
5
16
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -75,7 +86,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
75
86
  Object.defineProperty(exports, "__esModule", { value: true });
76
87
  exports.ImportWalletViewStep = void 0;
77
88
  var jsx_runtime_1 = require("react/jsx-runtime");
78
- var cn_1 = __importDefault(require("../../../utils/cn"));
79
89
  var DefaultPageLayout_1 = __importDefault(require("../../../components/layouts/DefaultPageLayout"));
80
90
  var SwiperControlled_1 = __importDefault(require("../../../components/ui/SwiperControlled"));
81
91
  var react_1 = require("swiper/react");
@@ -88,6 +98,7 @@ var Text_1 = __importDefault(require("../../../components/ui/Text"));
88
98
  var createWalletService_1 = __importDefault(require("../../../services/axios/create-wallet-service/createWalletService"));
89
99
  var importWalletIntenalService_1 = __importDefault(require("../../../services/axios/import-wallet-service/importWalletIntenalService"));
90
100
  var useWalletData_1 = __importDefault(require("../../../hooks/useWalletData"));
101
+ var material_1 = require("@mui/material");
91
102
  var ImportWalletViewStep;
92
103
  (function (ImportWalletViewStep) {
93
104
  ImportWalletViewStep[ImportWalletViewStep["CREATE_PASSCODE"] = 0] = "CREATE_PASSCODE";
@@ -186,6 +197,34 @@ var ImportWalletView = function (props) {
186
197
  return [2 /*return*/];
187
198
  });
188
199
  }); };
189
- return ((0, jsx_runtime_1.jsx)(TheBackground_1.default, { className: "h-[100dvh] w-[100vw]", 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, { className: (0, cn_1.default)("flex flex-col gap-4 size-full", props.className), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperControlledRef, className: "size-full", disableSwipe: true, children: [(0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center justify-center h-full gap-6", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { className: "text-ui-text-white font-600 text-16", 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, { className: "text-ui-text-white font-400 text-14 text-center", 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)("div", { className: "flex flex-col items-center justify-center h-full gap-6", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { className: "text-ui-text-white font-600 text-16", 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, { className: "text-ui-text-white font-400 text-14 text-center", children: "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Necessitatibus, eos! Dolore quae vero in ducimus doloribus" })] }) })] }) }) }) }));
200
+ return ((0, jsx_runtime_1.jsx)(TheBackground_1.default, { sx: {
201
+ height: "100%",
202
+ width: "100%",
203
+ }, 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)("div", { className: "flex flex-col items-center justify-center h-full gap-6", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
204
+ color: "text.white",
205
+ fontWeight: "600",
206
+ fontSize: "16px",
207
+ }, 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: {
208
+ color: "text.white",
209
+ fontWeight: "400",
210
+ fontSize: "14px",
211
+ textAlign: "center",
212
+ }, 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: {
213
+ display: "flex",
214
+ flexDirection: "column",
215
+ itemsCenter: "center",
216
+ justifyContent: "center",
217
+ hFull: "100%",
218
+ gap: "1rem",
219
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
220
+ color: "text.white",
221
+ fontWeight: "600",
222
+ fontSize: "16px",
223
+ }, 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: {
224
+ color: "text.white",
225
+ fontWeight: "400",
226
+ fontSize: "14px",
227
+ textAlign: "center",
228
+ }, children: "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Necessitatibus, eos! Dolore quae vero in ducimus doloribus" })] }) })] }) }) }) }));
190
229
  };
191
230
  exports.default = ImportWalletView;
@@ -42,7 +42,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
42
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
43
  exports.CreateWalletViewStep = void 0;
44
44
  var jsx_runtime_1 = require("react/jsx-runtime");
45
- var cn_1 = __importDefault(require("../../../utils/cn"));
46
45
  var DefaultPageLayout_1 = __importDefault(require("../../../components/layouts/DefaultPageLayout"));
47
46
  var SwiperControlled_1 = __importDefault(require("../../../components/ui/SwiperControlled"));
48
47
  var react_1 = require("swiper/react");
@@ -53,6 +52,7 @@ var react_2 = require("react");
53
52
  var Text_1 = __importDefault(require("../../../components/ui/Text"));
54
53
  var Button_1 = __importDefault(require("../../ui/Button"));
55
54
  var importWalletIntenalService_1 = __importDefault(require("../../../services/axios/import-wallet-service/importWalletIntenalService"));
55
+ var material_1 = require("@mui/material");
56
56
  var CreateWalletViewStep;
57
57
  (function (CreateWalletViewStep) {
58
58
  CreateWalletViewStep[CreateWalletViewStep["CREATE_PASSCODE"] = 0] = "CREATE_PASSCODE";
@@ -96,6 +96,36 @@ var CreateWalletView = function (props) {
96
96
  }
97
97
  });
98
98
  }); };
99
- return ((0, jsx_runtime_1.jsx)(TheBackground_1.default, { className: "h-[100dvh] w-[100vw]", children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { ref: childPageLayoutRef, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { overrideBack: props.onBack, title: "Import wallet" }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { className: (0, cn_1.default)("flex flex-col gap-4 size-full", props.className), children: (0, jsx_runtime_1.jsx)(SwiperControlled_1.default, { ref: swiperControlledRef, className: "size-full", disableSwipe: true, children: (0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col justify-center h-full gap-3", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { className: "text-ui-text-white font-500 text-16", children: "Your seed phrase" }), (0, jsx_runtime_1.jsx)("div", { className: "w-full h-fit", children: (0, jsx_runtime_1.jsx)("textarea", { value: seedPhrase, onChange: handleChangeSeedPhrase, rows: 8, className: "w-full h-full bg-ui-background-primary rounded-lg p-4", placeholder: "Enter your seed phrase" }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { className: "text-ui-text-white font-400 text-13 text-center", children: "Your seed phrase is a list of words that are used to create your wallet. It is important to keep it safe and private." }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { className: "w-full mt-auto", onClick: handleImportWallet, children: "Import" })] }) }) }) }) }) }));
99
+ return ((0, jsx_runtime_1.jsx)(TheBackground_1.default, { sx: {
100
+ height: "100%",
101
+ width: "100%",
102
+ }, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { ref: childPageLayoutRef, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { overrideBack: props.onBack, title: "Import wallet" }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
103
+ display: "flex",
104
+ flexDirection: "column",
105
+ gap: "1rem",
106
+ height: "100%",
107
+ width: "100%",
108
+ }, children: (0, jsx_runtime_1.jsx)(SwiperControlled_1.default, { ref: swiperControlledRef,
109
+ // className="size-full"
110
+ disableSwipe: true, children: (0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
111
+ display: "flex",
112
+ flexDirection: "column",
113
+ justifyContent: "center",
114
+ hFull: "100%",
115
+ gap: "1rem",
116
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
117
+ color: "text.white",
118
+ fontWeight: "500",
119
+ fontSize: "16px",
120
+ }, children: "Your seed phrase" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
121
+ width: "100%",
122
+ height: "fit-content",
123
+ }, children: (0, jsx_runtime_1.jsx)(material_1.TextareaAutosize, { value: seedPhrase, onChange: handleChangeSeedPhrase, minRows: 8, maxRows: 8, placeholder: "Enter your seed phrase", style: {
124
+ width: "100%",
125
+ height: "100%",
126
+ backgroundColor: "ui.background.primary",
127
+ borderRadius: "lg",
128
+ padding: "4px",
129
+ } }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { className: "text-ui-text-white font-400 text-13 text-center", children: "Your seed phrase is a list of words that are used to create your wallet. It is important to keep it safe and private." }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { className: "w-full mt-auto", onClick: handleImportWallet, children: "Import" })] }) }) }) }) }) }));
100
130
  };
101
131
  exports.default = CreateWalletView;
@@ -6,8 +6,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  var jsx_runtime_1 = require("react/jsx-runtime");
8
8
  var WalletDataProvider_1 = __importDefault(require("../WalletDataProvider"));
9
+ var mui_1 = __importDefault(require("../../theme/mui"));
9
10
  function TekWalletProvider(_a) {
10
11
  var children = _a.children;
11
- return (0, jsx_runtime_1.jsx)(WalletDataProvider_1.default, { children: children });
12
+ return ((0, jsx_runtime_1.jsx)(WalletDataProvider_1.default, { children: (0, jsx_runtime_1.jsx)(mui_1.default, { children: children }) }));
12
13
  }
13
14
  exports.default = TekWalletProvider;
@@ -5,10 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  var jsx_runtime_1 = require("react/jsx-runtime");
8
- var styles_1 = require("@mui/material/styles");
8
+ var material_1 = require("@mui/material");
9
9
  var theme_1 = __importDefault(require("./theme"));
10
10
  function MuiThemeProvider(_a) {
11
11
  var children = _a.children;
12
- return (0, jsx_runtime_1.jsx)(styles_1.ThemeProvider, { theme: theme_1.default, children: children });
12
+ return (0, jsx_runtime_1.jsx)(material_1.ThemeProvider, { theme: theme_1.default, children: children });
13
13
  }
14
14
  exports.default = MuiThemeProvider;
@@ -9,6 +9,12 @@ var theme = (0, styles_1.createTheme)({
9
9
  secondary: {
10
10
  main: "#01FF00",
11
11
  },
12
+ textWhite: {
13
+ main: "#ffffff",
14
+ },
15
+ backgroundBlack24: {
16
+ main: "rgba(0, 0, 0, 0.24)",
17
+ },
12
18
  },
13
19
  });
14
20
  exports.default = theme;
@@ -1,6 +1,8 @@
1
+ import { SxProps } from "@mui/system";
1
2
  export type UnknownFunction = (data?: unknown) => unknown;
2
3
  export type GeneralProps = {
3
4
  children?: React.ReactNode;
4
- className?: string;
5
5
  onClick?: UnknownFunction;
6
+ sx?: SxProps;
7
+ className?: string;
6
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "publish:patch": "npm run version:patch && npm publish",
16
16
  "publish:minor": "npm run version:minor && npm publish",
17
17
  "publish:major": "npm run version:major && npm publish",
18
- "release": "npm run clean && npm run build && cp -r src/styles dist/styles && npm version patch"
18
+ "release": "npm run clean && npm run build && npm version patch"
19
19
  },
20
20
  "keywords": [
21
21
  "react",
@@ -30,6 +30,7 @@
30
30
  "@emotion/react": "^11.14.0",
31
31
  "@emotion/styled": "^11.14.0",
32
32
  "@mui/material": "^6.4.7",
33
+ "@mui/system": "^7.0.2",
33
34
  "axios": "^1.8.4",
34
35
  "clsx": "^2.1.1",
35
36
  "date-fns": "^4.1.0",
@@ -38,6 +39,7 @@
38
39
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
39
40
  "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
40
41
  "react-otp-input": "^3.1.1",
42
+ "styled-components": "^6.1.17",
41
43
  "swiper": "^11.2.4"
42
44
  },
43
45
  "peerDependencies": {
@@ -1,5 +0,0 @@
1
- import { GeneralProps } from "../../../types/ui";
2
- interface MainLayoutProps extends GeneralProps {
3
- }
4
- declare const MainLayout: (props: MainLayoutProps) => import("react/jsx-runtime").JSX.Element;
5
- export default MainLayout;
@@ -1,13 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __importDefault = (this && this.__importDefault) || function (mod) {
4
- return (mod && mod.__esModule) ? mod : { "default": mod };
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- var jsx_runtime_1 = require("react/jsx-runtime");
8
- var TheBackground_1 = __importDefault(require("../../ui/TheBackground"));
9
- var clsx_1 = __importDefault(require("clsx"));
10
- var MainLayout = function (props) {
11
- return ((0, jsx_runtime_1.jsx)(TheBackground_1.default, { className: (0, clsx_1.default)("size-full flex flex-col", props.className), children: (0, jsx_runtime_1.jsx)("main", { className: "h-[calc(100dvh)] w-full overflow-y-auto overflow-x-hidden", children: props.children }) }));
12
- };
13
- exports.default = MainLayout;
@@ -1,3 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;