tek-wallet 0.0.136 → 0.0.138

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;
@@ -26,7 +26,6 @@ var react_2 = require("swiper/react");
26
26
  var BackHeader_1 = __importDefault(require("../BackHeader"));
27
27
  var ModalTitle_1 = __importDefault(require("../ModalTitle"));
28
28
  var QRCode_1 = __importDefault(require("../QRCode"));
29
- var HorizontalScroll_1 = __importDefault(require("../HorizontalScroll"));
30
29
  var Text_1 = __importDefault(require("../Text"));
31
30
  var material_1 = require("@mui/material");
32
31
  var CopyTextComponent_1 = __importDefault(require("../CopyTextComponent"));
@@ -65,31 +64,33 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
65
64
  open: open,
66
65
  close: close,
67
66
  }); });
68
- 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: {
69
68
  position: "absolute",
70
69
  right: "1rem",
71
70
  zIndex: 10,
72
- } }), (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: {
71
+ } }), (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperRef,
72
+ // initialActiveTab={currentStep}
73
+ 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: {
73
74
  display: "flex",
74
75
  flexDirection: "column",
75
- gap: "0.75rem",
76
+ gap: theme.mixins.gaps.g16,
76
77
  }, children: tokens === null || tokens === void 0 ? void 0 : tokens.map(function (item, index) {
77
78
  var stringifiedTokenData = JSON.stringify(__assign(__assign({}, item), { name: "Fake", fullname: "Fake fullname" }));
78
79
  return ((0, jsx_runtime_1.jsx)(TokenSelection_1.default, { tokenData: stringifiedTokenData, active: index === 1 }, item.id));
79
- }) })] }, "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: {
80
+ }) })] }, 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: {
81
+ display: "flex",
82
+ alignItems: "center",
83
+ gap: theme.mixins.gaps.g12,
84
+ }, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(function (item) {
85
+ return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { networkData: JSON.stringify({
86
+ name: "network ".concat(item),
87
+ icon: "https://via.placeholder.com/150",
88
+ }) }, item));
89
+ }) })] }, 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: {
80
90
  display: "flex",
81
91
  flexDirection: "column",
82
- gap: "0.75rem",
83
- }, children: [(0, jsx_runtime_1.jsx)(HorizontalScroll_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
84
- display: "flex",
85
- alignItems: "center",
86
- gap: "0.5rem",
87
- }, children: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(function (item) {
88
- return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { networkData: JSON.stringify({
89
- name: "network ".concat(item),
90
- icon: "https://via.placeholder.com/150",
91
- }) }, item));
92
- }) }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
92
+ gap: theme.mixins.gaps.g16,
93
+ }, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
93
94
  width: "100%",
94
95
  display: "flex",
95
96
  flexDirection: "column",
@@ -167,7 +168,7 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
167
168
  fontWeight: theme.typography.fontWeight400,
168
169
  leading: "typography.leading150",
169
170
  textTransform: "capitalize",
170
- }, children: "Share" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copy"), width: 20 })] }) })] })] })] }, "slice2")] })] }) }));
171
+ }, children: "Share" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copy"), width: 20 })] }) })] })] })] }, DepositStep.SHOW_QR_CODE)] })] }) }));
171
172
  });
172
173
  DepositFunction.displayName = "DepositFunction";
173
174
  exports.default = DepositFunction;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.136",
3
+ "version": "0.0.138",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",