tek-wallet 0.0.152 → 0.0.153

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.
@@ -84,6 +84,7 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
84
84
  };
85
85
  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.jsx)(ModalLayout_1.default, { overrideHeader: (0, jsx_runtime_1.jsx)(BackHeader_1.default, { sx: {
86
86
  width: "100%",
87
+ paddingBottom: theme.mixins.customPadding.p16,
87
88
  display: "flex",
88
89
  }, overrideBack: handleBack, hideBack: currentStep === DepositStep.SELECT_TOKEN, center: DEPOSIT_STEP_NAME[currentStep], children: (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: { marginLeft: "auto" }, onClick: props.onClose }) }), onClose: close, children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperRef, swiperProps: { autoHeight: true }, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12, height: "fit-content" }), children: tokens === null || tokens === void 0 ? void 0 : tokens.map(function (item) {
89
90
  var stringifiedTokenData = JSON.stringify(__assign(__assign({}, item), { name: "Fake", fullname: "Fake fullname" }));
@@ -121,9 +122,10 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
121
122
  fontWeight: theme.typography.fontWeight400,
122
123
  leading: "typography.leading150",
123
124
  }, children: "@user1234we" })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
125
+ width: "fit-content",
126
+ height: "fit-content",
124
127
  alignSelf: "center",
125
- padding: "0.75rem",
126
- backgroundColor: "ui-background-white",
128
+ borderRadius: theme.mixins.theBorderRadius.r12,
127
129
  }, children: (0, jsx_runtime_1.jsx)(QRCode_1.default, {}) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
128
130
  display: "flex",
129
131
  flexDirection: "column",
@@ -2,6 +2,7 @@ import { GeneralProps } from "../../../types/ui";
2
2
  interface NetworkSelectionProps extends GeneralProps {
3
3
  active?: boolean;
4
4
  networkData?: string;
5
+ onClick?: (networkData?: NetworkData) => void;
5
6
  }
6
7
  export interface NetworkData {
7
8
  name: string;
@@ -35,19 +35,8 @@ var NetworkSelection = function (props) {
35
35
  var networkDataString = props.networkData, rest = __rest(props, ["networkData"]);
36
36
  var theme = (0, material_1.useTheme)();
37
37
  var networkData = (0, react_1.useMemo)(function () { return (0, parsePropsData_1.default)(networkDataString); }, [networkDataString]);
38
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({}, rest, { sx: {
39
- backgroundColor: "background.white16",
40
- padding: "0.5rem",
41
- borderRadius: theme.mixins.theBorderRadius.r12,
42
- border: "1px solid",
43
- borderColor: theme.palette.border.white,
44
- }, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: networkData === null || networkData === void 0 ? void 0 : networkData.icon, sx: { borderRadius: theme.mixins.theBorderRadius.full } }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
45
- fontSize: theme.typography.fontSize14,
46
- fontWeight: theme.typography.fontWeight500,
47
- leading: theme.typography.leading140,
48
- color: "text.white",
49
- whiteSpace: "nowrap",
50
- textTransform: "capitalize",
51
- }, children: networkData === null || networkData === void 0 ? void 0 : networkData.name })] })));
38
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({}, rest, { sx: __assign(__assign({}, theme.mixins.row), { backgroundColor: props.active
39
+ ? "background.secondary16"
40
+ : "background.white16", padding: "".concat(theme.mixins.customPadding.p16, " ").concat(theme.mixins.customPadding.p8), borderRadius: theme.mixins.theBorderRadius.r12, border: "1px solid", borderColor: props.active ? "border.secondary" : "border.white24", gap: theme.mixins.gaps.g8 }), onClick: function () { var _a; return (_a = props === null || props === void 0 ? void 0 : props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, networkData); }, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: networkData === null || networkData === void 0 ? void 0 : networkData.icon, sx: { borderRadius: theme.mixins.theBorderRadius.full }, width: 24 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: "text.white", whiteSpace: "nowrap", textTransform: "capitalize" }), children: networkData === null || networkData === void 0 ? void 0 : networkData.name })] })));
52
41
  };
53
42
  exports.default = NetworkSelection;
@@ -1,18 +1,30 @@
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
4
  var qrcode_react_1 = require("qrcode.react");
8
- var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
5
+ // import getIcon from "../../../utils/getIcon";
9
6
  function QRCode() {
10
- return ((0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeCanvas, { className: "", value: "https://reactjs.org/", size: 160, imageSettings: {
11
- src: (0, getIcon_1.default)("eth"),
7
+ return (
8
+ // <QRCodeCanvas
9
+ // className=""
10
+ // value="https://reactjs.org/"
11
+ // size={160}
12
+ // imageSettings={{
13
+ // src: getIcon("eth"),
14
+ // x: undefined,
15
+ // y: undefined,
16
+ // height: 32,
17
+ // width: 32,
18
+ // excavate: true,
19
+ // }}
20
+ // />
21
+ (0, jsx_runtime_1.jsx)(qrcode_react_1.QRCodeCanvas, { value: "https://picturesofpeoplescanningqrcodes.tumblr.com/", title: "Title for my QR Code", size: 128, bgColor: "#ffffff", fgColor: "#000000", level: "H", minVersion: 8, marginSize: 2, imageSettings: {
22
+ src: "https://static.zpao.com/favicon.png",
12
23
  x: undefined,
13
24
  y: undefined,
14
- height: 32,
15
- width: 32,
25
+ height: 24,
26
+ width: 24,
27
+ opacity: 1.2,
16
28
  excavate: true,
17
29
  } }));
18
30
  }
@@ -36,10 +36,8 @@ var TokenSelection = function (props) {
36
36
  var tokenDataString = props.tokenData, sx = props.sx, rest = __rest(props, ["tokenData", "sx"]);
37
37
  var theme = (0, material_1.useTheme)();
38
38
  var tokenData = (0, react_1.useMemo)(function () { return (0, parsePropsData_1.default)(tokenDataString); }, [tokenDataString]);
39
- return ((0, jsx_runtime_1.jsxs)(material_1.Box
40
- // onClick={() => props?.onClick?.(tokenData)}
41
- , __assign({
42
- // onClick={() => props?.onClick?.(tokenData)}
43
- sx: __assign({ backgroundColor: "background.white16", border: "1px solid", borderColor: props.active ? "border.secondary" : "transparent", borderRadius: theme.mixins.theBorderRadius.r12, padding: theme.mixins.customPadding.p12, display: "flex", alignItems: "center", cursor: "pointer" }, sx) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 20 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: tokenData === null || tokenData === void 0 ? void 0 : tokenData.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.valueDescription, children: "tokenData.name" })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { marginLeft: "auto" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: 20000 }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.valueDescription, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: 2000 }) })] })] })));
39
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ onClick: function () { var _a; return (_a = props === null || props === void 0 ? void 0 : props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, tokenData); }, sx: __assign({ backgroundColor: props.active
40
+ ? "background.secondary16"
41
+ : "background.white16", border: "1px solid", borderColor: props.active ? "border.secondary" : "transparent", borderRadius: theme.mixins.theBorderRadius.r12, padding: theme.mixins.customPadding.p12, display: "flex", alignItems: "center", cursor: "pointer" }, sx) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 20 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.mixins.column), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: tokenData === null || tokenData === void 0 ? void 0 : tokenData.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.valueDescription, children: "tokenData.name" })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { marginLeft: "auto", alignItems: "end" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.value, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: 20000 }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.valueDescription, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: 2000 }) })] })] })));
44
42
  };
45
43
  exports.default = TokenSelection;
@@ -81,6 +81,10 @@ var pagePadding = {
81
81
  paddingBottom: "2rem",
82
82
  };
83
83
  var customPadding = {
84
+ p4: "0.25rem",
85
+ p6: "0.375rem",
86
+ p8: "0.5rem",
87
+ p10: "0.625rem",
84
88
  p12: "0.75rem",
85
89
  p16: "1rem",
86
90
  p20: "1.25rem",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.152",
3
+ "version": "0.0.153",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",