tek-wallet 0.0.131 → 0.0.132
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.
- package/dist/components/ui/BackArrow/index.js +1 -1
- package/dist/components/ui/BackHeader/index.js +2 -2
- package/dist/components/ui/CloseModal/index.d.ts +5 -0
- package/dist/components/ui/CloseModal/index.js +35 -0
- package/dist/components/ui/CopyTextComponent/index.d.ts +8 -0
- package/dist/components/ui/CopyTextComponent/index.js +106 -0
- package/dist/components/ui/CustomTooltip/index.d.ts +10 -0
- package/dist/components/ui/CustomTooltip/index.js +81 -0
- package/dist/components/ui/DepositFunction/index.d.ts +9 -0
- package/dist/components/ui/DepositFunction/index.js +172 -0
- package/dist/components/ui/Formatter/index.d.ts +25 -0
- package/dist/components/ui/Formatter/index.js +54 -0
- package/dist/components/ui/HorizontalScroll/index.d.ts +5 -0
- package/dist/components/ui/HorizontalScroll/index.js +41 -0
- package/dist/components/ui/Icon/index.d.ts +2 -0
- package/dist/components/ui/Icon/index.js +7 -4
- package/dist/components/ui/ModalLayout/index.d.ts +8 -0
- package/dist/components/ui/ModalLayout/index.js +29 -0
- package/dist/components/ui/ModalTitle/index.d.ts +5 -0
- package/dist/components/ui/ModalTitle/index.js +36 -0
- package/dist/components/ui/NetworkSelection/index.d.ts +11 -0
- package/dist/components/ui/NetworkSelection/index.js +52 -0
- package/dist/components/ui/QRCode/index.d.ts +2 -0
- package/dist/components/ui/QRCode/index.js +19 -0
- package/dist/components/ui/Share/index.d.ts +11 -0
- package/dist/components/ui/Share/index.js +124 -0
- package/dist/components/ui/TokenSelection/index.d.ts +18 -0
- package/dist/components/ui/TokenSelection/index.js +53 -0
- package/dist/components/views/GetSeedPhraseWalletView/index.js +1 -1
- package/dist/hooks/useWallet.d.ts +2 -2
- package/dist/hooks/useWallet.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/theme/mui/theme.js +68 -14
- package/dist/utils/parsePropsData.d.ts +2 -0
- package/dist/utils/parsePropsData.js +10 -0
- package/package.json +3 -1
- package/dist/components/ui/TheBackground/index.d.ts +0 -5
- package/dist/components/ui/TheBackground/index.js +0 -23
|
@@ -30,6 +30,6 @@ var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
|
30
30
|
var Icon_1 = __importDefault(require("../Icon"));
|
|
31
31
|
var BackArrow = function (props) {
|
|
32
32
|
var rest = __rest(props, []);
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(Icon_1.default, __assign({ src: (0, getIcon_1.default)("arrow_back"),
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(Icon_1.default, __assign({ src: (0, getIcon_1.default)("arrow_back"), width: 24, sx: __assign({}, props.sx) }, rest)));
|
|
34
34
|
};
|
|
35
35
|
exports.default = BackArrow;
|
|
@@ -31,10 +31,10 @@ var BackHeader = function (props) {
|
|
|
31
31
|
}
|
|
32
32
|
router.back();
|
|
33
33
|
};
|
|
34
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ display: "flex", alignItems: "center", gap:
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ display: "flex", alignItems: "center", gap: theme.mixins.gaps.g16, height: "100%" }, props.sx), children: [!hideBack && ((0, jsx_runtime_1.jsxs)(material_1.Box, { component: "button", sx: {
|
|
35
35
|
display: "flex",
|
|
36
36
|
alignItems: "center",
|
|
37
|
-
gap:
|
|
37
|
+
gap: theme.mixins.gaps.g4,
|
|
38
38
|
cursor: "pointer",
|
|
39
39
|
"&:active": {
|
|
40
40
|
transform: "translateX(-0.25rem)",
|
|
@@ -0,0 +1,35 @@
|
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
29
|
+
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
30
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
31
|
+
var CloseModal = function (props) {
|
|
32
|
+
var rest = __rest(props, []);
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(Icon_1.default, __assign({ src: (0, getIcon_1.default)("close_modal"), sx: __assign({ width: "1.5rem", height: "1.5rem" }, props.sx) }, rest)));
|
|
34
|
+
};
|
|
35
|
+
exports.default = CloseModal;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GeneralProps } from "../../../types/ui";
|
|
2
|
+
interface CopyTextComponentProps extends GeneralProps {
|
|
3
|
+
value: string;
|
|
4
|
+
iconSuccess?: React.ReactNode;
|
|
5
|
+
hideTextMessage?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const CopyTextComponent: ({ value, iconSuccess, children, hideTextMessage, sx, }: CopyTextComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CopyTextComponent;
|
|
@@ -0,0 +1,106 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
+
function step(op) {
|
|
27
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
+
switch (op[0]) {
|
|
32
|
+
case 0: case 1: t = op; break;
|
|
33
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
+
default:
|
|
37
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
+
if (t[2]) _.ops.pop();
|
|
42
|
+
_.trys.pop(); continue;
|
|
43
|
+
}
|
|
44
|
+
op = body.call(thisArg, _);
|
|
45
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
54
|
+
var react_1 = require("react");
|
|
55
|
+
var material_1 = require("@mui/material");
|
|
56
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
57
|
+
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
58
|
+
var Text_1 = __importDefault(require("../Text"));
|
|
59
|
+
var CopyTextComponent = function (_a) {
|
|
60
|
+
var value = _a.value, iconSuccess = _a.iconSuccess, children = _a.children, hideTextMessage = _a.hideTextMessage, sx = _a.sx;
|
|
61
|
+
var theme = (0, material_1.useTheme)();
|
|
62
|
+
var _b = (0, react_1.useState)(false), showSuccess = _b[0], setShowSuccess = _b[1];
|
|
63
|
+
var CopyTextComponent = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
64
|
+
var err_1;
|
|
65
|
+
return __generator(this, function (_a) {
|
|
66
|
+
switch (_a.label) {
|
|
67
|
+
case 0:
|
|
68
|
+
_a.trys.push([0, 2, , 3]);
|
|
69
|
+
return [4 /*yield*/, navigator.clipboard.writeText(value)];
|
|
70
|
+
case 1:
|
|
71
|
+
_a.sent();
|
|
72
|
+
setShowSuccess(true);
|
|
73
|
+
setTimeout(function () {
|
|
74
|
+
setShowSuccess(false);
|
|
75
|
+
}, 800);
|
|
76
|
+
return [3 /*break*/, 3];
|
|
77
|
+
case 2:
|
|
78
|
+
err_1 = _a.sent();
|
|
79
|
+
console.error("Failed to copy: ", err_1);
|
|
80
|
+
return [3 /*break*/, 3];
|
|
81
|
+
case 3: return [2 /*return*/];
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}); };
|
|
85
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { onClick: CopyTextComponent, sx: __assign({ position: "relative", cursor: "pointer" }, sx), children: [children, (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
86
|
+
display: "flex",
|
|
87
|
+
alignItems: "center",
|
|
88
|
+
justifyContent: "center",
|
|
89
|
+
gap: theme.spacing(4),
|
|
90
|
+
opacity: showSuccess ? 1 : 0,
|
|
91
|
+
position: "absolute",
|
|
92
|
+
inset: 0,
|
|
93
|
+
backgroundColor: "rgb(0, 0, 0)",
|
|
94
|
+
backdropFilter: "blur(12px)",
|
|
95
|
+
WebkitBackdropFilter: "blur(12px)",
|
|
96
|
+
transition: "opacity 0.3s ease-in-out",
|
|
97
|
+
}, children: [iconSuccess || ((0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copied_check"), sx: {
|
|
98
|
+
width: "1rem",
|
|
99
|
+
height: "1rem",
|
|
100
|
+
} })), !hideTextMessage && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
101
|
+
color: "text.whiteText",
|
|
102
|
+
display: "inline-block",
|
|
103
|
+
fontSize: "0.8em",
|
|
104
|
+
}, children: "Copied" }))] })] }));
|
|
105
|
+
};
|
|
106
|
+
exports.default = CopyTextComponent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { PopoverProps } from "@mui/material/Popover";
|
|
3
|
+
interface CustomTooltipProps extends Omit<PopoverProps, "open"> {
|
|
4
|
+
trigger: React.ReactNode;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const CustomTooltip: ({ trigger, children, disabled, anchorOrigin, anchorPosition, transformOrigin, ...rest }: CustomTooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default CustomTooltip;
|
|
@@ -0,0 +1,81 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
47
|
+
var t = {};
|
|
48
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
49
|
+
t[p] = s[p];
|
|
50
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
51
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
52
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
53
|
+
t[p[i]] = s[p[i]];
|
|
54
|
+
}
|
|
55
|
+
return t;
|
|
56
|
+
};
|
|
57
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
58
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
59
|
+
};
|
|
60
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
62
|
+
var React = __importStar(require("react"));
|
|
63
|
+
var Popover_1 = __importDefault(require("@mui/material/Popover"));
|
|
64
|
+
var material_1 = require("@mui/material");
|
|
65
|
+
var CustomTooltip = function (_a) {
|
|
66
|
+
var trigger = _a.trigger, children = _a.children, disabled = _a.disabled, _b = _a.anchorOrigin, anchorOrigin = _b === void 0 ? {
|
|
67
|
+
vertical: "bottom",
|
|
68
|
+
horizontal: "center",
|
|
69
|
+
} : _b, anchorPosition = _a.anchorPosition, transformOrigin = _a.transformOrigin, rest = __rest(_a, ["trigger", "children", "disabled", "anchorOrigin", "anchorPosition", "transformOrigin"]);
|
|
70
|
+
var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
|
|
71
|
+
var handleClick = function (event) {
|
|
72
|
+
setAnchorEl(event.currentTarget);
|
|
73
|
+
};
|
|
74
|
+
var handleClose = function () {
|
|
75
|
+
setAnchorEl(null);
|
|
76
|
+
};
|
|
77
|
+
var open = Boolean(anchorEl);
|
|
78
|
+
var id = open ? "simple-popover" : undefined;
|
|
79
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { component: "button", disabled: disabled, "aria-describedby": id, onClick: handleClick, sx: { textAlign: "left" }, children: trigger }), (0, jsx_runtime_1.jsx)(Popover_1.default, __assign({ id: id, open: open, anchorEl: anchorEl, onClose: handleClose, anchorOrigin: anchorOrigin, anchorPosition: anchorPosition, transformOrigin: transformOrigin }, rest, { children: children }))] }));
|
|
80
|
+
};
|
|
81
|
+
exports.default = CustomTooltip;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GeneralProps } from "../../../types/ui";
|
|
2
|
+
interface DepositFunctionProps extends GeneralProps {
|
|
3
|
+
}
|
|
4
|
+
type DepositFunctionRef = {
|
|
5
|
+
open: () => void;
|
|
6
|
+
close: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare const DepositFunction: import("react").ForwardRefExoticComponent<DepositFunctionProps & import("react").RefAttributes<DepositFunctionRef>>;
|
|
9
|
+
export default DepositFunction;
|
|
@@ -0,0 +1,172 @@
|
|
|
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 DrawerComponent_1 = __importDefault(require("../DrawerComponent"));
|
|
20
|
+
var SwiperControlled_1 = __importDefault(require("../SwiperControlled"));
|
|
21
|
+
var useWalletData_1 = __importDefault(require("../../../hooks/useWalletData"));
|
|
22
|
+
var ModalLayout_1 = __importDefault(require("../ModalLayout"));
|
|
23
|
+
var CloseModal_1 = __importDefault(require("../CloseModal"));
|
|
24
|
+
var react_2 = require("swiper/react");
|
|
25
|
+
var BackHeader_1 = __importDefault(require("../BackHeader"));
|
|
26
|
+
var ModalTitle_1 = __importDefault(require("../ModalTitle"));
|
|
27
|
+
var QRCode_1 = __importDefault(require("../QRCode"));
|
|
28
|
+
var HorizontalScroll_1 = __importDefault(require("../HorizontalScroll"));
|
|
29
|
+
var Text_1 = __importDefault(require("../Text"));
|
|
30
|
+
var material_1 = require("@mui/material");
|
|
31
|
+
var CopyTextComponent_1 = __importDefault(require("../CopyTextComponent"));
|
|
32
|
+
var Button_1 = __importDefault(require("../Button"));
|
|
33
|
+
var Icon_1 = __importDefault(require("../Icon"));
|
|
34
|
+
var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
|
|
35
|
+
var Share_1 = __importDefault(require("../Share"));
|
|
36
|
+
var NetworkSelection_1 = __importDefault(require("../NetworkSelection"));
|
|
37
|
+
var TokenSelection_1 = __importDefault(require("../TokenSelection"));
|
|
38
|
+
var DepositStep;
|
|
39
|
+
(function (DepositStep) {
|
|
40
|
+
DepositStep[DepositStep["SELECT_TOKEN"] = 1] = "SELECT_TOKEN";
|
|
41
|
+
DepositStep[DepositStep["SELECT_NETWORK"] = 2] = "SELECT_NETWORK";
|
|
42
|
+
DepositStep[DepositStep["SHOW_QR_CODE"] = 3] = "SHOW_QR_CODE";
|
|
43
|
+
})(DepositStep || (DepositStep = {}));
|
|
44
|
+
var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
45
|
+
var drawerRef = (0, react_1.useRef)(null);
|
|
46
|
+
var swiperRef = (0, react_1.useRef)(null);
|
|
47
|
+
var theme = (0, material_1.useTheme)();
|
|
48
|
+
var _a = (0, react_1.useState)(DepositStep.SELECT_TOKEN), currentStep = _a[0], setCurrentStep = _a[1];
|
|
49
|
+
var tokens = (0, useWalletData_1.default)().tokens;
|
|
50
|
+
var open = function () {
|
|
51
|
+
var _a;
|
|
52
|
+
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
53
|
+
};
|
|
54
|
+
var close = function () {
|
|
55
|
+
var _a;
|
|
56
|
+
(_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
57
|
+
};
|
|
58
|
+
var prevStep = function () {
|
|
59
|
+
var _a;
|
|
60
|
+
(_a = swiperRef.current) === null || _a === void 0 ? void 0 : _a.prev();
|
|
61
|
+
setCurrentStep(currentStep - 1);
|
|
62
|
+
};
|
|
63
|
+
(0, react_1.useImperativeHandle)(ref, function () { return ({
|
|
64
|
+
open: open,
|
|
65
|
+
close: close,
|
|
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: {
|
|
68
|
+
position: "absolute",
|
|
69
|
+
right: "1rem",
|
|
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: {
|
|
83
|
+
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: {
|
|
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 })] }) })] })] })] }, "slice2")] })] }) }));
|
|
170
|
+
});
|
|
171
|
+
DepositFunction.displayName = "DepositFunction";
|
|
172
|
+
exports.default = DepositFunction;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
import { GeneralProps } from "../../../types/ui";
|
|
3
|
+
interface FormatterProps extends GeneralProps {
|
|
4
|
+
value?: number | string;
|
|
5
|
+
start?: string;
|
|
6
|
+
unit?: string;
|
|
7
|
+
unitCustomStyle?: string;
|
|
8
|
+
lengthValueAllowed?: number;
|
|
9
|
+
noUnitSpacing?: boolean;
|
|
10
|
+
allowShowZero?: boolean;
|
|
11
|
+
useCompact?: boolean;
|
|
12
|
+
disableTooltip?: boolean;
|
|
13
|
+
isUnitStyle?: boolean;
|
|
14
|
+
disableAdjustUnitColor?: boolean;
|
|
15
|
+
isLessThan?: boolean;
|
|
16
|
+
overrideLessThanClass?: string;
|
|
17
|
+
unitStyle?: CSSProperties;
|
|
18
|
+
useCompactOnThousand?: boolean;
|
|
19
|
+
startStyle?: CSSProperties;
|
|
20
|
+
hideStart?: boolean;
|
|
21
|
+
hideUnit?: boolean;
|
|
22
|
+
onClickUnit?: (data?: any) => any;
|
|
23
|
+
}
|
|
24
|
+
declare const Formatter: React.FC<FormatterProps>;
|
|
25
|
+
export default Formatter;
|
|
@@ -0,0 +1,54 @@
|
|
|
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 getStandardNumber_1 = __importDefault(require("../../../utils/getStandardNumber"));
|
|
9
|
+
var lengthFromDotToFirstNonZero_1 = __importDefault(require("../../../utils/lengthFromDotToFirstNonZero"));
|
|
10
|
+
var CustomTooltip_1 = __importDefault(require("../CustomTooltip"));
|
|
11
|
+
var cn_1 = __importDefault(require("../../../utils/cn"));
|
|
12
|
+
var material_1 = require("@mui/material");
|
|
13
|
+
var formatter_1 = __importDefault(require("../../../utils/formatter"));
|
|
14
|
+
var Formatter = function (_a) {
|
|
15
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
16
|
+
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, isUnitStyle = _a.isUnitStyle, unitCustomStyle = _a.unitCustomStyle, disableAdjustUnitColor = _a.disableAdjustUnitColor, isLessThan = _a.isLessThan, overrideLessThanClass = _a.overrideLessThanClass, unitStyle = _a.unitStyle, _u = _a.useCompactOnThousand, useCompactOnThousand = _u === void 0 ? false : _u, startStyle = _a.startStyle, hideStart = _a.hideStart, hideUnit = _a.hideUnit, onClickUnit = _a.onClickUnit;
|
|
17
|
+
var tokensRateState = {}.tokensRateState;
|
|
18
|
+
var userInfo = {}.userInfo;
|
|
19
|
+
// const { tokensRateState } = useRealtimeData();
|
|
20
|
+
// const { userInfo } = useGlobalData();
|
|
21
|
+
if (value === undefined)
|
|
22
|
+
return;
|
|
23
|
+
var rate = (start === null || start === void 0 ? void 0 : start.includes("$")) || ((_b = start === null || start === void 0 ? void 0 : start.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("usd"))
|
|
24
|
+
? +(((_d = tokensRateState === null || tokensRateState === void 0 ? void 0 : tokensRateState[(_c = userInfo === null || userInfo === void 0 ? void 0 : userInfo.settings) === null || _c === void 0 ? void 0 : _c.currency]) === null || _d === void 0 ? void 0 : _d.USD) || 1)
|
|
25
|
+
: 1;
|
|
26
|
+
var numberDisplay = Number(value) / rate;
|
|
27
|
+
var startDisplay = (start === null || start === void 0 ? void 0 : start.includes("$")) || ((_e = start === null || start === void 0 ? void 0 : start.toLowerCase()) === null || _e === void 0 ? void 0 : _e.includes("usd"))
|
|
28
|
+
? ((_g = (_f = userInfo === null || userInfo === void 0 ? void 0 : userInfo.settings) === null || _f === void 0 ? void 0 : _f.currency) === null || _g === void 0 ? void 0 : _g.toLowerCase()) == "usd"
|
|
29
|
+
? "$"
|
|
30
|
+
: ""
|
|
31
|
+
: start;
|
|
32
|
+
var unitDisplay = (start === null || start === void 0 ? void 0 : start.includes("$")) || ((_h = start === null || start === void 0 ? void 0 : start.toLowerCase()) === null || _h === void 0 ? void 0 : _h.includes("usd"))
|
|
33
|
+
? ((_k = (_j = userInfo === null || userInfo === void 0 ? void 0 : userInfo.settings) === null || _j === void 0 ? void 0 : _j.currency) === null || _k === void 0 ? void 0 : _k.toLowerCase()) == "usd"
|
|
34
|
+
? unit
|
|
35
|
+
: ((_l = userInfo === null || userInfo === void 0 ? void 0 : userInfo.settings) === null || _l === void 0 ? void 0 : _l.currency) && " ".concat((_m = userInfo === null || userInfo === void 0 ? void 0 : userInfo.settings) === null || _m === void 0 ? void 0 : _m.currency)
|
|
36
|
+
: unit;
|
|
37
|
+
var formattedNumber = (0, getStandardNumber_1.default)(numberDisplay);
|
|
38
|
+
var lengthFromDot = (0, lengthFromDotToFirstNonZero_1.default)(formattedNumber);
|
|
39
|
+
var lessThan = numberDisplay > 0 && numberDisplay < 0.01 && isLessThan;
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(CustomTooltip_1.default, { disabled: disableTooltip, trigger: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
41
|
+
whiteSpace: "nowrap",
|
|
42
|
+
}, children: numberDisplay === 0 && !allowShowZero ? ("--") : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [lessThan && ((0, jsx_runtime_1.jsx)("span", { className: (0, cn_1.default)("relative -top-0.5 font-primary mr-0.5", overrideLessThanClass), children: "< " })), !(numberDisplay === 0) && !hideStart && ((0, jsx_runtime_1.jsx)("span", { className: "font-primary", style: startStyle, children: startDisplay })), !lessThan && numberDisplay > 0 && numberDisplay < 0.000001 ? ((0, jsx_runtime_1.jsxs)("span", { className: "font-primary", children: ["0.0", (0, jsx_runtime_1.jsx)("sub", { children: lengthFromDot }), formattedNumber.slice(2 + lengthFromDot, lengthValueAllowed - 2 + lengthFromDot)] })) : ((0, jsx_runtime_1.jsx)("span", { className: "font-primary", children: lessThan
|
|
43
|
+
? "0.01"
|
|
44
|
+
: (0, formatter_1.default)(isLessThan
|
|
45
|
+
? Number(numberDisplay).toFixed(2)
|
|
46
|
+
: numberDisplay, useCompact, useCompactOnThousand, lengthValueAllowed) })), !hideUnit &&
|
|
47
|
+
!!unitDisplay &&
|
|
48
|
+
!noUnitSpacing &&
|
|
49
|
+
!(numberDisplay === 0) && ((0, jsx_runtime_1.jsx)("span", { className: (0, cn_1.default)("font-primary", unitCustomStyle, {
|
|
50
|
+
"text-secondary": isUnitStyle,
|
|
51
|
+
not_apply_adjust_color_tbk: disableAdjustUnitColor,
|
|
52
|
+
}), style: unitStyle, onClick: onClickUnit, children: unitDisplay }))] })) }), children: (0, jsx_runtime_1.jsx)(Formatter, { disableTooltip: true, start: start, value: value, lengthValueAllowed: 12, useCompact: false, unit: unit, allowShowZero: true, disableAdjustUnitColor: true, hideStart: hideStart, hideUnit: hideUnit }) }));
|
|
53
|
+
};
|
|
54
|
+
exports.default = Formatter;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var react_1 = require("react");
|
|
6
|
+
function HorizontalScroll(_a) {
|
|
7
|
+
var children = _a.children;
|
|
8
|
+
var scrollContainerRef = (0, react_1.useRef)(null);
|
|
9
|
+
var isDragging = (0, react_1.useRef)(false);
|
|
10
|
+
var startX = (0, react_1.useRef)(0);
|
|
11
|
+
var scrollLeft = (0, react_1.useRef)(0);
|
|
12
|
+
var handleMouseDown = function (e) {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
isDragging.current = true;
|
|
15
|
+
startX.current = e.pageX - (((_a = scrollContainerRef.current) === null || _a === void 0 ? void 0 : _a.offsetLeft) || 0);
|
|
16
|
+
scrollLeft.current = ((_b = scrollContainerRef.current) === null || _b === void 0 ? void 0 : _b.scrollLeft) || 0;
|
|
17
|
+
};
|
|
18
|
+
var handleMouseMove = function (e) {
|
|
19
|
+
var _a;
|
|
20
|
+
if (!isDragging.current)
|
|
21
|
+
return;
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
var x = e.pageX - (((_a = scrollContainerRef.current) === null || _a === void 0 ? void 0 : _a.offsetLeft) || 0);
|
|
24
|
+
var walk = (x - startX.current) * 2; // Adjust scroll speed by changing multiplier
|
|
25
|
+
if (scrollContainerRef.current) {
|
|
26
|
+
scrollContainerRef.current.scrollLeft = scrollLeft.current - walk;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var handleMouseUp = function () {
|
|
30
|
+
isDragging.current = false;
|
|
31
|
+
};
|
|
32
|
+
var handleMouseLeave = function () {
|
|
33
|
+
isDragging.current = false;
|
|
34
|
+
};
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "hide_scrollbar", ref: scrollContainerRef, onMouseDown: handleMouseDown, onMouseLeave: handleMouseLeave, onMouseUp: handleMouseUp, onMouseMove: handleMouseMove, onTouchMove: function (e) { return e.stopPropagation(); }, style: {
|
|
36
|
+
overflowX: "auto",
|
|
37
|
+
display: "flex",
|
|
38
|
+
cursor: "grab",
|
|
39
|
+
}, children: children }));
|
|
40
|
+
}
|
|
41
|
+
exports.default = HorizontalScroll;
|
|
@@ -2,6 +2,8 @@ import { GeneralProps } from "../../../types/ui";
|
|
|
2
2
|
export interface IconProps extends Omit<GeneralProps, "onClick">, React.ImgHTMLAttributes<HTMLImageElement> {
|
|
3
3
|
src?: string;
|
|
4
4
|
alt?: string;
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
5
7
|
}
|
|
6
8
|
declare const Icon: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
9
|
export default Icon;
|
|
@@ -25,9 +25,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
26
|
var material_1 = require("@mui/material");
|
|
27
27
|
var Icon = function (props) {
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
var _a, _b;
|
|
29
|
+
var src = props.src, alt = props.alt, onClick = props.onClick, width = props.width, height = props.height, rest = __rest(props, ["src", "alt", "onClick", "width", "height"]);
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, __assign({ component: "img", src: src, alt: alt, onClick: onClick }, rest, { sx: __assign({ display: "block", width: ((_a = width !== null && width !== void 0 ? width : height) !== null && _a !== void 0 ? _a : false)
|
|
31
|
+
? "".concat((width || height || 0) / 16, "rem")
|
|
32
|
+
: "auto", height: ((_b = height !== null && height !== void 0 ? height : width) !== null && _b !== void 0 ? _b : false)
|
|
33
|
+
? "".concat((height || width || 0) / 16, "rem")
|
|
34
|
+
: "auto" }, props.sx) })));
|
|
32
35
|
};
|
|
33
36
|
exports.default = Icon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GeneralProps } from "../../../types/ui";
|
|
2
|
+
interface ModalLayoutProps extends GeneralProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
hideHeader?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const ModalLayout: (props: ModalLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ModalLayout;
|