tek-wallet 0.0.481 → 0.0.482
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.
|
@@ -78,7 +78,7 @@ var Activities = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
78
78
|
spaceBetween: 40,
|
|
79
79
|
}, tabs: activityTypes === null || activityTypes === void 0 ? void 0 : activityTypes.map(function (type, index) {
|
|
80
80
|
return ((0, jsx_runtime_1.jsx)(material_1.Tab, { label: type.name, value: index, "data-index": index, sx: {
|
|
81
|
-
padding: "".concat(theme.mixins.customPadding.
|
|
81
|
+
padding: "".concat(theme.mixins.customPadding.p8, " ").concat(theme.mixins.customPadding.p16),
|
|
82
82
|
minHeight: "unset",
|
|
83
83
|
minWidth: "unset",
|
|
84
84
|
textTransform: "capitalize",
|
|
@@ -60,7 +60,7 @@ var CopyTextComponent = function (_a) {
|
|
|
60
60
|
var value = _a.value, iconSuccess = _a.iconSuccess, children = _a.children, hideTextMessage = _a.hideTextMessage, sx = _a.sx;
|
|
61
61
|
var theme = (0, material_1.useTheme)();
|
|
62
62
|
var _b = (0, react_1.useState)(false), showSuccess = _b[0], setShowSuccess = _b[1];
|
|
63
|
-
var
|
|
63
|
+
var copyText = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
64
64
|
var err_1;
|
|
65
65
|
return __generator(this, function (_a) {
|
|
66
66
|
switch (_a.label) {
|
|
@@ -82,25 +82,26 @@ var CopyTextComponent = function (_a) {
|
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
}); };
|
|
85
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { onClick:
|
|
85
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { onClick: copyText, sx: __assign({ position: "relative", cursor: "pointer" }, sx), children: [children, (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
86
86
|
display: "flex",
|
|
87
87
|
alignItems: "center",
|
|
88
88
|
justifyContent: "center",
|
|
89
89
|
gap: theme.mixins.gaps.g4,
|
|
90
90
|
opacity: showSuccess ? 1 : 0,
|
|
91
91
|
position: "absolute",
|
|
92
|
-
inset:
|
|
93
|
-
|
|
92
|
+
inset: 0,
|
|
93
|
+
transform: "translateY(-100%) scale(".concat(showSuccess ? 1 : 0, ")"),
|
|
94
|
+
transformOrigin: "center bottom",
|
|
95
|
+
backgroundColor: theme.palette.background.black,
|
|
94
96
|
backdropFilter: "blur(12px)",
|
|
95
97
|
borderRadius: theme.mixins.customRadius.r12,
|
|
96
|
-
transition: "opacity 0.3s ease-in-out",
|
|
98
|
+
transition: "opacity 0.3s ease-in-out, transform 0.3s ease-in-out",
|
|
97
99
|
}, children: [iconSuccess || ((0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copied_check"), sx: {
|
|
98
100
|
width: "1rem",
|
|
99
101
|
height: "1rem",
|
|
100
102
|
} })), !hideTextMessage && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
101
|
-
color:
|
|
102
|
-
|
|
103
|
-
fontSize: "0.8em",
|
|
103
|
+
color: theme.palette.text.white,
|
|
104
|
+
fontSize: theme.typography.fontSize12,
|
|
104
105
|
}, children: "Copied" }))] })] }));
|
|
105
106
|
};
|
|
106
107
|
exports.default = CopyTextComponent;
|
|
@@ -6,5 +6,9 @@ interface CustomTooltipProps extends Omit<PopoverProps, "open"> {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
export interface CustomTooltipRef {
|
|
10
|
+
open: React.ReactEventHandler;
|
|
11
|
+
close: React.ReactEventHandler;
|
|
12
|
+
}
|
|
13
|
+
declare const CustomTooltip: React.ForwardRefExoticComponent<Omit<CustomTooltipProps, "ref"> & React.RefAttributes<CustomTooltipRef>>;
|
|
10
14
|
export default CustomTooltip;
|
|
@@ -62,24 +62,30 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
62
62
|
var React = __importStar(require("react"));
|
|
63
63
|
var Popover_1 = __importDefault(require("@mui/material/Popover"));
|
|
64
64
|
var material_1 = require("@mui/material");
|
|
65
|
-
var CustomTooltip = function (_a) {
|
|
65
|
+
var CustomTooltip = React.forwardRef(function (_a, ref) {
|
|
66
66
|
var trigger = _a.trigger, children = _a.children, disabled = _a.disabled, _b = _a.anchorOrigin, anchorOrigin = _b === void 0 ? {
|
|
67
67
|
vertical: "bottom",
|
|
68
68
|
horizontal: "center",
|
|
69
69
|
} : _b, anchorPosition = _a.anchorPosition, transformOrigin = _a.transformOrigin, rest = __rest(_a, ["trigger", "children", "disabled", "anchorOrigin", "anchorPosition", "transformOrigin"]);
|
|
70
70
|
var _c = React.useState(null), anchorEl = _c[0], setAnchorEl = _c[1];
|
|
71
|
-
var
|
|
71
|
+
var handleOpen = function (event) {
|
|
72
|
+
event.stopPropagation();
|
|
72
73
|
setAnchorEl(event.currentTarget);
|
|
73
74
|
};
|
|
74
75
|
var handleClose = function () {
|
|
75
76
|
setAnchorEl(null);
|
|
76
77
|
};
|
|
78
|
+
React.useImperativeHandle(ref, function () { return ({
|
|
79
|
+
open: handleOpen,
|
|
80
|
+
close: handleClose,
|
|
81
|
+
}); });
|
|
77
82
|
var open = Boolean(anchorEl);
|
|
78
83
|
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:
|
|
84
|
+
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: handleOpen, 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, sx: {
|
|
80
85
|
"& .MuiPopover-paper": {
|
|
81
86
|
backgroundColor: "transparent",
|
|
82
87
|
},
|
|
83
88
|
} }, rest, { children: children }))] }));
|
|
84
|
-
};
|
|
89
|
+
});
|
|
90
|
+
CustomTooltip.displayName = "CustomTooltip";
|
|
85
91
|
exports.default = CustomTooltip;
|