tek-wallet 0.0.137 → 0.0.139

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,5 +1,8 @@
1
+ import { ReactEventHandler } from "react";
1
2
  import { GeneralProps } from "../../../types/ui";
2
3
  interface DepositFunctionProps extends GeneralProps {
4
+ onClose?: ReactEventHandler;
5
+ onOpen?: ReactEventHandler;
3
6
  }
4
7
  type DepositFunctionRef = {
5
8
  open: () => void;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __assign = (this && this.__assign) || function () {
3
4
  __assign = Object.assign || function(t) {
4
5
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -25,7 +26,6 @@ var react_2 = require("swiper/react");
25
26
  var BackHeader_1 = __importDefault(require("../BackHeader"));
26
27
  var ModalTitle_1 = __importDefault(require("../ModalTitle"));
27
28
  var QRCode_1 = __importDefault(require("../QRCode"));
28
- var HorizontalScroll_1 = __importDefault(require("../HorizontalScroll"));
29
29
  var Text_1 = __importDefault(require("../Text"));
30
30
  var material_1 = require("@mui/material");
31
31
  var CopyTextComponent_1 = __importDefault(require("../CopyTextComponent"));
@@ -64,109 +64,109 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
64
64
  open: open,
65
65
  close: close,
66
66
  }); });
67
- return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, children: (0, jsx_runtime_1.jsxs)(ModalLayout_1.default, { title: "Select token", onClose: close, hideHeader: true, children: [(0, jsx_runtime_1.jsx)(CloseModal_1.default, { onClick: close, sx: {
67
+ return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: props.onOpen, onClose: props.onClose, children: (0, jsx_runtime_1.jsxs)(ModalLayout_1.default, { title: "Deposit", onClose: close, hideHeader: true, children: [(0, jsx_runtime_1.jsx)(CloseModal_1.default, { onClick: close, sx: {
68
68
  position: "absolute",
69
69
  right: "1rem",
70
70
  zIndex: 10,
71
- } }), (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperRef, initialActiveTab: currentStep, swiperProps: { autoHeight: true }, children: [(0, jsx_runtime_1.jsxs)(react_2.SwiperSlide, { children: [(0, jsx_runtime_1.jsx)(BackHeader_1.default, { sx: { paddingBottom: "1rem" }, hideBack: true, children: (0, jsx_runtime_1.jsx)(ModalTitle_1.default, { children: "Select token" }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
72
- display: "flex",
73
- flexDirection: "column",
74
- gap: "0.75rem",
75
- }, children: tokens === null || tokens === void 0 ? void 0 : tokens.map(function (item, index) {
76
- var stringifiedTokenData = JSON.stringify(__assign(__assign({}, item), { name: "Fake", fullname: "Fake fullname" }));
77
- return ((0, jsx_runtime_1.jsx)(TokenSelection_1.default, { tokenData: stringifiedTokenData, active: index === 1 }, item.id));
78
- }) })] }, "slice1"), (0, jsx_runtime_1.jsxs)(react_2.SwiperSlide, { children: [(0, jsx_runtime_1.jsx)(BackHeader_1.default, { sx: { paddingBottom: "1rem" }, overrideBack: prevStep, children: (0, jsx_runtime_1.jsx)(ModalTitle_1.default, { children: "Select network" }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
79
- display: "flex",
80
- flexDirection: "column",
81
- gap: "0.75rem",
82
- }, children: [(0, jsx_runtime_1.jsx)(HorizontalScroll_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
71
+ } }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { height: "50dvh" }, children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperRef, children: [(0, jsx_runtime_1.jsxs)(react_2.SwiperSlide, { children: [(0, jsx_runtime_1.jsx)(BackHeader_1.default, { sx: { paddingBottom: "1rem" }, hideBack: true, children: (0, jsx_runtime_1.jsx)(ModalTitle_1.default, { children: "Select token" }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { color: "red" }, onClick: function () { return console.warn(tokens); }, children: "Click" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
72
+ display: "flex",
73
+ flexDirection: "column",
74
+ gap: theme.mixins.gaps.g16,
75
+ }, children: tokens === null || tokens === void 0 ? void 0 : tokens.map(function (item, index) {
76
+ var stringifiedTokenData = JSON.stringify(__assign(__assign({}, item), { name: "Fake", fullname: "Fake fullname" }));
77
+ return ((0, jsx_runtime_1.jsx)(TokenSelection_1.default, { tokenData: stringifiedTokenData, active: index === 1 }, item.id));
78
+ }) })] }, DepositStep.SELECT_TOKEN), (0, jsx_runtime_1.jsxs)(react_2.SwiperSlide, { children: [(0, jsx_runtime_1.jsx)(BackHeader_1.default, { sx: { paddingBottom: "1rem" }, overrideBack: prevStep, children: (0, jsx_runtime_1.jsx)(ModalTitle_1.default, { children: "Select network" }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
79
+ display: "flex",
80
+ alignItems: "center",
81
+ gap: theme.mixins.gaps.g12,
82
+ }, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(function (item) {
83
+ return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { networkData: JSON.stringify({
84
+ name: "network ".concat(item),
85
+ icon: "https://via.placeholder.com/150",
86
+ }) }, item));
87
+ }) })] }, DepositStep.SELECT_NETWORK), (0, jsx_runtime_1.jsxs)(react_2.SwiperSlide, { children: [(0, jsx_runtime_1.jsx)(BackHeader_1.default, { sx: { paddingBottom: "1rem" }, overrideBack: prevStep, children: (0, jsx_runtime_1.jsx)(ModalTitle_1.default, { children: "Scan QR code" }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
88
+ display: "flex",
89
+ flexDirection: "column",
90
+ gap: theme.mixins.gaps.g16,
91
+ }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
92
+ width: "100%",
83
93
  display: "flex",
84
- alignItems: "center",
85
- gap: "0.5rem",
86
- }, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(function (item) {
87
- return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { networkData: JSON.stringify({
88
- name: "network ".concat(item),
89
- icon: "https://via.placeholder.com/150",
90
- }) }, item));
91
- }) }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
92
- width: "100%",
93
- display: "flex",
94
- flexDirection: "column",
95
- gap: "0.75rem",
96
- backgroundColor: "ui-background-222",
97
- borderRadius: "0.75rem",
98
- padding: "1.5rem",
99
- alignItems: "flex-start",
100
- }, id: "share-deposit-info", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
101
- display: "flex",
102
- flexDirection: "column",
103
- gap: "0.125rem",
104
- color: "text.white",
105
- alignSelf: "center",
106
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
107
- fontSize: theme.typography.fontSize12,
108
- fontWeight: theme.typography.fontWeight500,
109
- leading: "typography.leading150",
110
- }, children: "Harry Andrew" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
111
- fontSize: theme.typography.fontSize12,
112
- fontWeight: theme.typography.fontWeight400,
113
- leading: "typography.leading150",
114
- }, children: "@user1234we" })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
115
- alignSelf: "center",
116
- padding: "0.75rem",
117
- backgroundColor: "ui-background-white",
118
- }, children: (0, jsx_runtime_1.jsx)(QRCode_1.default, {}) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
119
- display: "flex",
120
- flexDirection: "column",
121
- gap: "0.125rem",
122
- color: "text.white",
123
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
124
- fontSize: theme.typography.fontSize10,
125
- leading: "typography.leading150",
126
- }, children: "Network" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
127
- fontSize: theme.typography.fontSize13,
128
- fontWeight: theme.typography.fontWeight500,
129
- leading: "typography.leading150",
130
- }, children: "Ethereum (ERC20)" })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
131
- display: "flex",
132
- flexDirection: "column",
133
- gap: "0.125rem",
134
- color: "text.white",
135
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
136
- fontSize: theme.typography.fontSize10,
137
- leading: "typography.leading150",
138
- }, children: "Address" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
139
- fontSize: theme.typography.fontSize13,
140
- fontWeight: theme.typography.fontWeight500,
141
- leading: "typography.leading150",
142
- wordBreak: "break-all",
143
- }, children: "tebfwe78w237dbyuc78wb4b3y8cbwebd8732w9bcubf638uegyg7dt63ged87dxi8w3gdyhf73" })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
144
- display: "flex",
145
- alignItems: "center",
146
- gap: "8px",
147
- backgroundColor: "ui-background-white-16",
148
- borderRadius: "12px",
149
- padding: "8px 12px",
150
- }, children: (0, jsx_runtime_1.jsxs)(Text_1.default, { className: "text-11 text-ui-text-white leading-140", children: ["Deposit min ", (0, jsx_runtime_1.jsx)("strong", { children: "0.001" }), " ETH and select the correct network, ", "or you'll lose your assets."] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
151
- display: "flex",
152
- alignItems: "center",
153
- gap: "0.75rem",
154
- justifyContent: "center",
155
- }, children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: "https://reactjs.org/", 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: {
94
+ flexDirection: "column",
95
+ gap: "0.75rem",
96
+ backgroundColor: "ui-background-222",
97
+ borderRadius: "0.75rem",
98
+ padding: "1.5rem",
99
+ alignItems: "flex-start",
100
+ }, id: "share-deposit-info", children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
101
+ display: "flex",
102
+ flexDirection: "column",
103
+ gap: "0.125rem",
104
+ color: "text.white",
105
+ alignSelf: "center",
106
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
107
+ fontSize: theme.typography.fontSize12,
108
+ fontWeight: theme.typography.fontWeight500,
109
+ leading: "typography.leading150",
110
+ }, children: "Harry Andrew" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
156
111
  fontSize: theme.typography.fontSize12,
157
112
  fontWeight: theme.typography.fontWeight400,
158
113
  leading: "typography.leading150",
159
- textTransform: "capitalize",
160
- }, children: "Copy" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copy"), width: 20 })] }) }), (0, jsx_runtime_1.jsx)(Share_1.default, { elementId: "share-deposit-info", children: (0, jsx_runtime_1.jsxs)(Button_1.default.Secondary, { sx: {
114
+ }, children: "@user1234we" })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
115
+ alignSelf: "center",
116
+ padding: "0.75rem",
117
+ backgroundColor: "ui-background-white",
118
+ }, children: (0, jsx_runtime_1.jsx)(QRCode_1.default, {}) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
119
+ display: "flex",
120
+ flexDirection: "column",
161
121
  gap: "0.125rem",
122
+ color: "text.white",
123
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
124
+ fontSize: theme.typography.fontSize10,
125
+ leading: "typography.leading150",
126
+ }, children: "Network" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
127
+ fontSize: theme.typography.fontSize13,
128
+ fontWeight: theme.typography.fontWeight500,
129
+ leading: "typography.leading150",
130
+ }, children: "Ethereum (ERC20)" })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
162
131
  display: "flex",
163
- alignItems: "center",
132
+ flexDirection: "column",
133
+ gap: "0.125rem",
134
+ color: "text.white",
164
135
  }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
165
- fontSize: theme.typography.fontSize12,
166
- fontWeight: theme.typography.fontWeight400,
136
+ fontSize: theme.typography.fontSize10,
137
+ leading: "typography.leading150",
138
+ }, children: "Address" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
139
+ fontSize: theme.typography.fontSize13,
140
+ fontWeight: theme.typography.fontWeight500,
167
141
  leading: "typography.leading150",
168
- textTransform: "capitalize",
169
- }, children: "Share" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copy"), width: 20 })] }) })] })] })] }, "slice2")] })] }) }));
142
+ wordBreak: "break-all",
143
+ }, children: "tebfwe78w237dbyuc78wb4b3y8cbwebd8732w9bcubf638uegyg7dt63ged87dxi8w3gdyhf73" })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
144
+ display: "flex",
145
+ alignItems: "center",
146
+ gap: "8px",
147
+ backgroundColor: "ui-background-white-16",
148
+ borderRadius: "12px",
149
+ padding: "8px 12px",
150
+ }, children: (0, jsx_runtime_1.jsxs)(Text_1.default, { className: "text-11 text-ui-text-white leading-140", children: ["Deposit min ", (0, jsx_runtime_1.jsx)("strong", { children: "0.001" }), " ETH and select the correct network, ", "or you'll lose your assets."] }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
151
+ display: "flex",
152
+ alignItems: "center",
153
+ gap: "0.75rem",
154
+ justifyContent: "center",
155
+ }, children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: "https://reactjs.org/", 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
+ fontSize: theme.typography.fontSize12,
157
+ fontWeight: theme.typography.fontWeight400,
158
+ leading: "typography.leading150",
159
+ textTransform: "capitalize",
160
+ }, children: "Copy" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copy"), width: 20 })] }) }), (0, jsx_runtime_1.jsx)(Share_1.default, { elementId: "share-deposit-info", children: (0, jsx_runtime_1.jsxs)(Button_1.default.Secondary, { sx: {
161
+ gap: "0.125rem",
162
+ display: "flex",
163
+ alignItems: "center",
164
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
165
+ fontSize: theme.typography.fontSize12,
166
+ fontWeight: theme.typography.fontWeight400,
167
+ leading: "typography.leading150",
168
+ textTransform: "capitalize",
169
+ }, children: "Share" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copy"), width: 20 })] }) })] })] })] }, DepositStep.SHOW_QR_CODE)] }) })] }) }));
170
170
  });
171
171
  DepositFunction.displayName = "DepositFunction";
172
172
  exports.default = DepositFunction;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.137",
3
+ "version": "0.0.139",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",