tek-wallet 0.0.256 → 0.0.258

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.
@@ -23,11 +23,14 @@ var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
23
23
  var AnalyticGroup = function (props) {
24
24
  var theme = (0, material_1.useTheme)();
25
25
  var sx = props.sx;
26
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, sx), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: "Total Amount" }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.row), theme.mixins.value), children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { value: 1000000 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: { fontWeight: "typography.fontWeight400", fontSize: "0.8em" }, children: "USD" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("bottom_arrow"), width: 8 })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4, fontSize: theme.typography.fontSize12 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
27
- fontWeight: "typography.fontWeight500",
28
- leading: "typography.lineHeight140",
29
- fontSize: "typography.fontSize14",
26
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, sx), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: "Total Amount" }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.mixins.row), theme.mixins.value), { fontSize: theme.typography.fontSize20 }), children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: { fontWeight: theme.typography.fontWeight700 }, value: 1000000 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
27
+ fontWeight: theme.typography.fontWeight400,
28
+ fontSize: "0.8em",
29
+ }, children: "USD" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("bottom_arrow"), width: 8 })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4, fontSize: theme.typography.fontSize12 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
30
+ fontWeight: theme.typography.fontWeight500,
31
+ leading: theme.typography.leading140,
32
+ fontSize: theme.typography.fontSize14,
30
33
  textTransform: "capitalize",
31
- }, children: props.timeRange }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_increase"), width: 12 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({ color: theme.palette.text.increase }, theme.mixins.value), { borderBottom: "1px dashed ".concat(theme.palette.text.increase) }), children: "5.63 (+3,22%)" })] })] }));
34
+ }, children: props.timeRange }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_increase"), width: 12 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: theme.palette.text.increase, borderBottom: "1px dashed currentColor" }), children: "5.63 (+3,22%)" })] })] }));
32
35
  };
33
36
  exports.default = AnalyticGroup;
@@ -247,19 +247,19 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
247
247
  display: "flex",
248
248
  justifyContent: "center",
249
249
  }, trigger: (0, jsx_runtime_1.jsxs)(Button_1.default.Text, { sx: {
250
- fontSize: "typography.fontSize12",
250
+ fontSize: theme.typography.fontSize12,
251
251
  textTransform: "none",
252
252
  }, children: [amount ? "Edit" : "+ Set", " amount"] }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.fieldTitle), children: [amount ? "Edit" : "+ Set", " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name, " ", "amount"] }), (0, jsx_runtime_1.jsx)(material_1.Input, { placeholder: "".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value, " - ").concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value), sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize16 }), value: inputAmount, onChange: handleChangeAmount }), amountError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: amountError })), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { width: "100%", mt: theme.mixins.customMargin.m8, gap: theme.mixins.gaps.g12 }), children: [!!amount && ((0, jsx_runtime_1.jsx)(Button_1.default.Text, { onClick: handleUnset, children: "Unset" })), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { flex: 1 }, onClick: handleContinue, status: !!amountError
253
253
  ? Button_1.BUTTON_STATUS.DISABLED
254
254
  : Button_1.BUTTON_STATUS.ENABLED, children: "Continue" })] })] }) }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12, justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: qrCodeValue, 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: {
255
255
  fontSize: theme.typography.fontSize12,
256
256
  fontWeight: theme.typography.fontWeight400,
257
- leading: "typography.leading150",
257
+ leading: theme.typography.leading160,
258
258
  textTransform: "capitalize",
259
259
  }, 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: __assign({ gap: theme.mixins.gaps.g4 }, theme.mixins.row), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
260
260
  fontSize: theme.typography.fontSize12,
261
261
  fontWeight: theme.typography.fontWeight400,
262
- leading: "typography.leading150",
262
+ leading: theme.typography.leading160,
263
263
  textTransform: "capitalize",
264
264
  }, children: "Share" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("share"), width: 20 })] }) })] })] }) }, DepositStep.SHOW_QR_CODE)] }, depositTokens === null || depositTokens === void 0 ? void 0 : depositTokens.length) }) }) }));
265
265
  });
@@ -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 __importDefault = (this && this.__importDefault) || function (mod) {
4
15
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
16
  };
@@ -12,7 +23,7 @@ var material_1 = require("@mui/material");
12
23
  var formatter_1 = __importDefault(require("../../../utils/formatter"));
13
24
  var Formatter = function (_a) {
14
25
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
15
- var value = _a.value, _o = _a.start, start = _o === void 0 ? "" : _o, _p = _a.unit, unit = _p === void 0 ? "" : _p, _q = _a.lengthValueAllowed, lengthValueAllowed = _q === void 0 ? 2 : _q, _r = _a.noUnitSpacing, noUnitSpacing = _r === void 0 ? false : _r, _s = _a.allowShowZero, allowShowZero = _s === void 0 ? false : _s, _t = _a.useCompact, useCompact = _t === void 0 ? true : _t, disableTooltip = _a.disableTooltip, isLessThan = _a.isLessThan, unitStyle = _a.unitStyle, _u = _a.useCompactOnThousand, useCompactOnThousand = _u === void 0 ? false : _u, startStyle = _a.startStyle, hideStart = _a.hideStart, hideUnit = _a.hideUnit, onClickUnit = _a.onClickUnit;
26
+ var value = _a.value, _o = _a.start, start = _o === void 0 ? "" : _o, _p = _a.unit, unit = _p === void 0 ? "" : _p, _q = _a.lengthValueAllowed, lengthValueAllowed = _q === void 0 ? 2 : _q, _r = _a.noUnitSpacing, noUnitSpacing = _r === void 0 ? false : _r, _s = _a.allowShowZero, allowShowZero = _s === void 0 ? false : _s, _t = _a.useCompact, useCompact = _t === void 0 ? true : _t, disableTooltip = _a.disableTooltip, isLessThan = _a.isLessThan, unitStyle = _a.unitStyle, _u = _a.useCompactOnThousand, useCompactOnThousand = _u === void 0 ? false : _u, startStyle = _a.startStyle, hideStart = _a.hideStart, hideUnit = _a.hideUnit, onClickUnit = _a.onClickUnit, sx = _a.sx;
16
27
  var tokensRateState = {}.tokensRateState;
17
28
  var userInfo = {}.userInfo;
18
29
  // const { tokensRateState } = useRealtimeData();
@@ -36,9 +47,7 @@ var Formatter = function (_a) {
36
47
  var formattedNumber = (0, getStandardNumber_1.default)(numberDisplay);
37
48
  var lengthFromDot = (0, lengthFromDotToFirstNonZero_1.default)(formattedNumber);
38
49
  var lessThan = numberDisplay > 0 && numberDisplay < 0.01 && isLessThan;
39
- return ((0, jsx_runtime_1.jsx)(CustomTooltip_1.default, { disabled: disableTooltip, trigger: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
40
- whiteSpace: "nowrap",
41
- }, children: numberDisplay === 0 && !allowShowZero ? ("--") : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [lessThan && ((0, jsx_runtime_1.jsx)(material_1.Box, { component: "span", sx: {
50
+ return ((0, jsx_runtime_1.jsx)(CustomTooltip_1.default, { disabled: disableTooltip, trigger: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ whiteSpace: "nowrap" }, sx), children: numberDisplay === 0 && !allowShowZero ? ("--") : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [lessThan && ((0, jsx_runtime_1.jsx)(material_1.Box, { component: "span", sx: {
42
51
  position: "relative",
43
52
  top: "-0.125rem",
44
53
  mr: "0.125rem",
@@ -24,8 +24,8 @@ var FunctionItem = function (props) {
24
24
  borderRadius: theme.mixins.theBorderRadius.full,
25
25
  }, width: 44 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
26
26
  color: "text.white",
27
- fontSize: "typography.fontSize13",
28
- lineHeight: "typography.lineHeight140",
27
+ fontSize: theme.typography.fontSize13,
28
+ lineHeight: theme.typography.leading140,
29
29
  }, children: props.label })] }));
30
30
  };
31
31
  exports.default = FunctionItem;
@@ -33,6 +33,6 @@ var Text_1 = __importDefault(require("../Text"));
33
33
  function ListItemCustom(_a) {
34
34
  var title = _a.title, description = _a.description, icon = _a.icon, rightIcon = _a.rightIcon, hideDefaultRightIcon = _a.hideDefaultRightIcon, sx = _a.sx, rest = __rest(_a, ["title", "description", "icon", "rightIcon", "hideDefaultRightIcon", "sx"]);
35
35
  var theme = (0, material_1.useTheme)();
36
- return ((0, jsx_runtime_1.jsxs)(material_1.ListItem, __assign({}, rest, { sx: __assign(__assign({}, theme.mixins.row), sx), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 32, src: icon }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, alignItems: "start", flex: 1 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.listTitle), children: title }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.listDescription), children: description })] }), rightIcon !== null && rightIcon !== void 0 ? rightIcon : (!hideDefaultRightIcon && ((0, jsx_runtime_1.jsx)(Icon_1.default, { width: 10, src: (0, getIcon_1.default)("arrow-right"), sx: { ml: "auto" } })))] })));
36
+ return ((0, jsx_runtime_1.jsxs)(material_1.ListItem, __assign({}, rest, { sx: __assign(__assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g12, backgroundColor: "background.white16", borderRadius: theme.mixins.theBorderRadius.r12 }), sx), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 32, src: icon }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g2, alignItems: "start", flex: 1 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.listTitle), children: title }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.listDescription), children: description })] }), rightIcon !== null && rightIcon !== void 0 ? rightIcon : (!hideDefaultRightIcon && ((0, jsx_runtime_1.jsx)(Icon_1.default, { width: 10, src: (0, getIcon_1.default)("arrow-right"), sx: { ml: "auto" } })))] })));
37
37
  }
38
38
  exports.default = ListItemCustom;
@@ -30,7 +30,7 @@ var LoadingLayout = (0, react_1.forwardRef)(function (props, ref) {
30
30
  setLoading(false);
31
31
  },
32
32
  }); });
33
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative", width: "fit-content", height: "fit-content" }, sx), children: [children, loading && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.whiteLoadingOverlay), theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "secondary", size: 20 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.center), { fontSize: "typography.fontSize12", color: "text.secondary" }), children: loadingMessage })] }))] }));
33
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ position: "relative", width: "fit-content", height: "fit-content" }, sx), children: [children, loading && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.whiteLoadingOverlay), theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "secondary", size: 20 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.center), { fontSize: theme.typography.fontSize12, color: "text.secondary" }), children: loadingMessage })] }))] }));
34
34
  });
35
35
  LoadingLayout.displayName = "LoadingLayout";
36
36
  exports.default = LoadingLayout;
@@ -113,7 +113,7 @@ var TimeFilter = function (_a) {
113
113
  border: "none",
114
114
  }, children: (0, jsx_runtime_1.jsx)(material_1.Chip, { label: type, variant: "outlined", sx: {
115
115
  textTransform: "capitalize",
116
- leading: "typography.lineHeight100",
116
+ leading: theme.typography.leading100,
117
117
  borderColor: "currentColor",
118
118
  color: (value === null || value === void 0 ? void 0 : value.type) === type ? "text.white" : "text.white64",
119
119
  }, onClick: function () { } }) }, type));
@@ -28,16 +28,16 @@ var TokensBoard = function () {
28
28
  display: "grid",
29
29
  gridTemplateColumns: "1.55fr 1fr 1fr",
30
30
  gap: theme.mixins.gaps.g12,
31
- fontSize: "typography.fontSize11",
31
+ fontSize: theme.typography.fontSize11,
32
32
  color: "text.white",
33
- lineHeight: "140%",
33
+ lineHeight: theme.typography.leading140,
34
34
  }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: { textAlign: "left" }, children: "Name" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { textAlign: "left" }, children: "Listing Price" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { textAlign: "right" }, children: "PnL" })] })), tokens === null || tokens === void 0 ? void 0 : tokens.map(function (item) {
35
35
  var stringifiedTokenData = JSON.stringify(__assign({}, item));
36
36
  return (0, jsx_runtime_1.jsx)(TokenItem_1.default, { tokenData: stringifiedTokenData }, item.id);
37
37
  }), !tokens && (0, jsx_runtime_1.jsx)(WaitingData_1.default, { className: "m-auto" })] }), !!tokens && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
38
- fontSize: "typography.fontSize12",
38
+ fontSize: theme.typography.fontSize12,
39
39
  color: "text.secondary",
40
- lineHeight: "140%",
40
+ lineHeight: theme.typography.leading140,
41
41
  width: "fit-content",
42
42
  px: theme.mixins.customPadding.p5,
43
43
  }, children: "View all assets" }))] }));
@@ -217,11 +217,14 @@ var theme = (0, styles_1.createTheme)({
217
217
  color: "text.white",
218
218
  fontWeight: typography.fontWeight500,
219
219
  fontSize: typography.fontSize14,
220
+ lineHeight: typography.leading140,
221
+ textTransform: "capitalize",
220
222
  },
221
223
  listDescription: {
222
224
  color: "text.white64",
223
225
  fontWeight: typography.fontWeight400,
224
226
  fontSize: typography.fontSize12,
227
+ lineHeight: typography.leading140,
225
228
  },
226
229
  smallButton: {
227
230
  fontSize: typography.fontSize11,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.256",
3
+ "version": "0.0.258",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",