infinity-forge 7.3.2 → 7.3.5
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/system/hooks/ui/use-table/components/table/index.js +1 -1
- package/dist/system/hooks/ui/use-table/components/table/index.js.map +1 -1
- package/dist/system/hooks/ui/use-table/components/table/styles.js +1 -1
- package/dist/system/hooks/ui/use-table/components/table/styles.js.map +1 -1
- package/dist/system/hooks/ui/use-table/components/table/tr/children-tr/index.js.map +1 -1
- package/dist/system/hooks/ui/use-table/components/table/tr/children-tr/styles.js +1 -1
- package/dist/system/hooks/ui/use-table/components/table/tr/children-tr/styles.js.map +1 -1
- package/dist/system/hooks/ui/use-table/components/table/tr/index.js +8 -3
- package/dist/system/hooks/ui/use-table/components/table/tr/index.js.map +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/days/index.d.ts +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/days/index.js +2 -2
- package/dist/ui/components/form/input-date-picker/calendar/days/index.js.map +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/interface.d.ts +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/months/index.d.ts +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/months/index.js +2 -3
- package/dist/ui/components/form/input-date-picker/calendar/months/index.js.map +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/years/index.d.ts +1 -1
- package/dist/ui/components/form/input-date-picker/calendar/years/index.js +3 -3
- package/dist/ui/components/form/input-date-picker/calendar/years/index.js.map +1 -1
- package/dist/ui/components/form/input-date-picker/component.js +2 -2
- package/dist/ui/components/form/text-editor/react-quill.css +922 -0
- package/dist/ui/components/pop-confirm/component.d.ts +2 -2
- package/dist/ui/components/pop-confirm/component.js +35 -36
- package/dist/ui/components/pop-confirm/component.js.map +1 -1
- package/dist/ui/components/pop-confirm/styles.d.ts +1 -4
- package/dist/ui/components/pop-confirm/styles.js +1 -5
- package/dist/ui/components/pop-confirm/styles.js.map +1 -1
- package/dist/ui/components/tooltip/component.js +2 -2
- package/dist/ui/components/tooltip/component.js.map +1 -1
- package/dist/ui/components/tooltip/hooks/use-tool-tip.d.ts +1 -0
- package/dist/ui/components/tooltip/hooks/use-tool-tip.js +5 -1
- package/dist/ui/components/tooltip/hooks/use-tool-tip.js.map +1 -1
- package/dist/ui/components/tooltip/interfaces.d.ts +2 -1
- package/dist/ui/styles/fonts.css +763 -0
- package/dist/ui/styles/reset.css +351 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { IToolTipProps } from '../tooltip/index.js';
|
|
2
3
|
interface IPopconfirm {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
title?: ReactNode;
|
|
@@ -8,7 +9,6 @@ interface IPopconfirm {
|
|
|
8
9
|
onCancel?: (prop?: any) => void;
|
|
9
10
|
cancelText?: string;
|
|
10
11
|
okText?: string;
|
|
11
|
-
placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
12
12
|
}
|
|
13
|
-
export declare function Popconfirm({
|
|
13
|
+
export declare function Popconfirm({ title, children, onConfirm, okText, cancelText, onCancel, description, icon, ...rest }: IPopconfirm & Omit<IToolTipProps, 'content' | 'trigger'>): import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -1,4 +1,15 @@
|
|
|
1
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
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -32,46 +43,34 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
43
|
return result;
|
|
33
44
|
};
|
|
34
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
|
+
};
|
|
35
57
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
58
|
exports.Popconfirm = Popconfirm;
|
|
37
59
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
60
|
+
var ui_1 = require("../../../ui/index.js");
|
|
61
|
+
var tooltip_1 = require("../tooltip/index.js");
|
|
40
62
|
var S = __importStar(require("./styles.js"));
|
|
41
|
-
var hooks_1 = require("../../../ui/hooks/index.js");
|
|
42
63
|
function Popconfirm(_a) {
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}, [onConfirm, handleClose]);
|
|
55
|
-
var handleCancel = (0, react_1.useCallback)(function () {
|
|
56
|
-
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
57
|
-
handleClose();
|
|
58
|
-
}, [onCancel, handleClose]);
|
|
59
|
-
(0, react_1.useEffect)(function () {
|
|
60
|
-
if (!open)
|
|
61
|
-
return;
|
|
62
|
-
var handleClickOutside = function (event) {
|
|
63
|
-
if (triggerRef.current &&
|
|
64
|
-
!triggerRef.current.contains(event.target) &&
|
|
65
|
-
boxRef.current &&
|
|
66
|
-
!boxRef.current.contains(event.target)) {
|
|
67
|
-
handleClose();
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
71
|
-
return function () {
|
|
72
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
73
|
-
};
|
|
74
|
-
}, [open, handleClose]);
|
|
75
|
-
return ((0, jsx_runtime_1.jsxs)(S.Popconfirm, { "$isExiting": open, "$placement": placement, children: [(0, jsx_runtime_1.jsx)("div", { className: 'trigger', ref: triggerRef, onClick: function () { return setOpen(function (prev) { return !prev; }); }, children: children }), shouldRender && ((0, jsx_runtime_1.jsxs)("div", { className: 'box', ref: boxRef, children: [(0, jsx_runtime_1.jsxs)("div", { children: [icon || (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: 'IconExclamation', color: '#faad14' }), (0, jsx_runtime_1.jsxs)("div", { className: 'text-box', children: [title && (0, jsx_runtime_1.jsx)("span", { className: 'title', children: title }), description && (0, jsx_runtime_1.jsx)("span", { className: 'description', children: description })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: 'actions', children: [(0, jsx_runtime_1.jsx)("button", { className: 'cancel-btn', type: 'button', onClick: handleCancel, children: cancelText }), (0, jsx_runtime_1.jsx)("button", { className: 'confirm-btn', type: 'button', onClick: handleConfirm, children: okText })] })] }))] }));
|
|
64
|
+
var title = _a.title, children = _a.children, onConfirm = _a.onConfirm, _b = _a.okText, okText = _b === void 0 ? 'Sim' : _b, _c = _a.cancelText, cancelText = _c === void 0 ? 'Não' : _c, onCancel = _a.onCancel, description = _a.description, icon = _a.icon, rest = __rest(_a, ["title", "children", "onConfirm", "okText", "cancelText", "onCancel", "description", "icon"]);
|
|
65
|
+
return ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, __assign({}, rest, { trigger: (0, jsx_runtime_1.jsx)("div", { className: 'trigger', children: children }), ContentWithTooltipProps: function (_a) {
|
|
66
|
+
var closeToolTip = _a.closeToolTip;
|
|
67
|
+
return ((0, jsx_runtime_1.jsxs)(S.Popconfirm, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'box', children: [(0, jsx_runtime_1.jsxs)("div", { children: [icon || (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconExclamation', color: '#faad14' }), (0, jsx_runtime_1.jsxs)("div", { className: 'text-box', children: [title && (0, jsx_runtime_1.jsx)("span", { className: 'title', children: title }), description && (0, jsx_runtime_1.jsx)("span", { className: 'description', children: description })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: 'actions', children: [(0, jsx_runtime_1.jsx)("button", { className: 'cancel-btn', type: 'button', onClick: function () {
|
|
68
|
+
closeToolTip();
|
|
69
|
+
onCancel && onCancel();
|
|
70
|
+
}, children: cancelText }), (0, jsx_runtime_1.jsx)("button", { className: 'confirm-btn', type: 'button', onClick: function () {
|
|
71
|
+
closeToolTip();
|
|
72
|
+
onConfirm && onConfirm();
|
|
73
|
+
}, children: okText })] })] }), ' '] }));
|
|
74
|
+
} })));
|
|
76
75
|
}
|
|
77
76
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/ui/components/pop-confirm/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/ui/components/pop-confirm/component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,gCAoDC;;AApED,2BAA2B;AAC3B,sCAAmD;AAEnD,0CAA6B;AAa7B,SAAgB,UAAU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: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components
|
|
2
|
-
$isExiting?: boolean;
|
|
3
|
-
$placement?: string;
|
|
4
|
-
}>> & string;
|
|
1
|
+
export declare const Popconfirm: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, never>> & string;
|
|
@@ -8,7 +8,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
};
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.Popconfirm = void 0;
|
|
11
|
-
var keyframes_1 = require("../../../ui/styles/keyframes.js");
|
|
12
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
13
12
|
// Add this to your styled component
|
|
14
13
|
var getPlacementStyles = function (placement) {
|
|
@@ -41,9 +40,6 @@ var getPlacementStyles = function (placement) {
|
|
|
41
40
|
return { top: '100%', left: '50%' };
|
|
42
41
|
}
|
|
43
42
|
};
|
|
44
|
-
exports.Popconfirm = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n
|
|
45
|
-
var $isExiting = _a.$isExiting;
|
|
46
|
-
return ($isExiting ? keyframes_1.expandAnimation : keyframes_1.condenseAnimation);
|
|
47
|
-
});
|
|
43
|
+
exports.Popconfirm = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\n .box {\n width: fit-content;\n min-width: max-content;\n border-radius: 6px;\n font-size: 14px;\n\n > div {\n display: flex;\n align-items: start;\n gap: 8px;\n }\n\n svg {\n width: 14px;\n height: auto;\n display: flex;\n }\n\n .text-box {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n .title {\n font-weight: 600;\n line-height: 1;\n margin-bottom: 5px;\n }\n\n & + * {\n margin-top: 8px;\n }\n }\n\n .actions {\n width: fit-content;\n margin: 4px 0 0 auto;\n\n button {\n border: none;\n padding: 0;\n background: none;\n padding: 0 6px;\n border-radius: 4px;\n transition: 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.cancel-btn {\n border: 1px solid rgba(0, 0, 0, 0.2);\n\n &:hover {\n color: #4096ff;\n border-color: #4096ff;\n }\n }\n\n &.confirm-btn {\n background: #1677ff;\n color: #fff;\n\n &:hover {\n opacity: 0.8;\n }\n }\n }\n }\n }\n"], ["\n\n .box {\n width: fit-content;\n min-width: max-content;\n border-radius: 6px;\n font-size: 14px;\n\n > div {\n display: flex;\n align-items: start;\n gap: 8px;\n }\n\n svg {\n width: 14px;\n height: auto;\n display: flex;\n }\n\n .text-box {\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n .title {\n font-weight: 600;\n line-height: 1;\n margin-bottom: 5px;\n }\n\n & + * {\n margin-top: 8px;\n }\n }\n\n .actions {\n width: fit-content;\n margin: 4px 0 0 auto;\n\n button {\n border: none;\n padding: 0;\n background: none;\n padding: 0 6px;\n border-radius: 4px;\n transition: 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &.cancel-btn {\n border: 1px solid rgba(0, 0, 0, 0.2);\n\n &:hover {\n color: #4096ff;\n border-color: #4096ff;\n }\n }\n\n &.confirm-btn {\n background: #1677ff;\n color: #fff;\n\n &:hover {\n opacity: 0.8;\n }\n }\n }\n }\n }\n"])));
|
|
48
44
|
var templateObject_1;
|
|
49
45
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/ui/components/pop-confirm/styles.ts"],"names":[],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/ui/components/pop-confirm/styles.ts"],"names":[],"mappings":";;;;;;;;;;AACA,wEAAsC;AAEtC,oCAAoC;AACpC,IAAM,kBAAkB,GAAG,UAAC,SAAiB;IAC3C,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,KAAK;YACR,OAAO,EAA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AAC;AACH,CAAC,CAAA;AAEY,QAAA,UAAU,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,4xCAAA,ytCAuEtC,KAAA"}
|
|
@@ -71,7 +71,7 @@ function Tooltip(props) {
|
|
|
71
71
|
}
|
|
72
72
|
function TooltipContent(_a) {
|
|
73
73
|
var trigger = _a.trigger, content = _a.content, bgColor = _a.bgColor, idTooltip = _a.idTooltip, enableHover = _a.enableHover, enableArrow = _a.enableArrow, _b = _a.position, position = _b === void 0 ? 'auto' : _b, _c = _a.closeOnClick, closeOnClick = _c === void 0 ? false : _c, ContentWithTooltipProps = _a.ContentWithTooltipProps, rest = __rest(_a, ["trigger", "content", "bgColor", "idTooltip", "enableHover", "enableArrow", "position", "closeOnClick", "ContentWithTooltipProps"]);
|
|
74
|
-
var _d = (0, use_tool_tip_1.useToolTip)(position, rest), isOpen = _d.isOpen, toolTipRef = _d.toolTipRef, contentRef = _d.contentRef, handleToggle = _d.handleToggle, tooltipStyle = _d.tooltipStyle;
|
|
74
|
+
var _d = (0, use_tool_tip_1.useToolTip)(position, rest), isOpen = _d.isOpen, toolTipRef = _d.toolTipRef, contentRef = _d.contentRef, handleToggle = _d.handleToggle, tooltipStyle = _d.tooltipStyle, closeToolTip = _d.closeToolTip;
|
|
75
75
|
(0, react_1.useEffect)(function () {
|
|
76
76
|
var handleClickContent = function (event) {
|
|
77
77
|
if (contentRef.current && contentRef.current.contains(event.target)) {
|
|
@@ -83,7 +83,7 @@ function TooltipContent(_a) {
|
|
|
83
83
|
}
|
|
84
84
|
return function () { return document.removeEventListener('click', handleClickContent); };
|
|
85
85
|
}, [closeOnClick, contentRef, isOpen]);
|
|
86
|
-
var tooltipContent = isOpen && ((0, jsx_runtime_1.jsx)(S.TooltipContent, { "$zIndex": utils_1.zIndexInfinityForge.tooltip, id: idTooltip, ref: contentRef, "$bgColor": bgColor, className: position, "$enableArrow": enableArrow, style: tooltipStyle, children: ContentWithTooltipProps ? ((0, jsx_runtime_1.jsx)(ContentWithTooltipProps, { handleToggle: handleToggle, toolTipRef: contentRef })) : (content) }));
|
|
86
|
+
var tooltipContent = isOpen && ((0, jsx_runtime_1.jsx)(S.TooltipContent, { "$zIndex": utils_1.zIndexInfinityForge.tooltip, id: idTooltip, ref: contentRef, "$bgColor": bgColor, className: position, "$enableArrow": enableArrow, style: tooltipStyle, children: ContentWithTooltipProps ? ((0, jsx_runtime_1.jsx)(ContentWithTooltipProps, { closeToolTip: closeToolTip, handleToggle: handleToggle, toolTipRef: contentRef })) : (content) }));
|
|
87
87
|
(0, react_1.useEffect)(function () {
|
|
88
88
|
var interval = setInterval(function () {
|
|
89
89
|
if (process.browser) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/ui/components/tooltip/component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,0BAMC;;AAjBD,+BAAiC;AACjC,wDAAgC;AAEhC,oDAAyC;AACzC,qDAAiD;AAIjD,0CAA6B;AAC7B,oCAAgD;AAEhD,SAAgB,OAAO,CAAC,KAAoB;IAC1C,OAAO,CACL,uBAAC,sBAAK,IAAC,IAAI,EAAC,SAAS,YACnB,uBAAC,cAAc,eAAK,KAAK,EAAI,GACvB,CACT,CAAA;AACH,CAAC;AAED,SAAS,cAAc,CAAC,EAWR;IAVd,IAAA,OAAO,aAAA,EACP,OAAO,aAAA,EACP,OAAO,aAAA,EACP,SAAS,eAAA,EACT,WAAW,iBAAA,EACX,WAAW,iBAAA,EACX,gBAAiB,EAAjB,QAAQ,mBAAG,MAAM,KAAA,EACjB,oBAAoB,EAApB,YAAY,mBAAG,KAAK,KAAA,EACpB,uBAAuB,6BAAA,EACpB,IAAI,cAVe,mIAWvB,CADQ;IAED,IAAA,
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/ui/components/tooltip/component.tsx"],"names":[],"mappings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,QAAQ,CAAC,CAAA;QACzB,CAAC;QAED,OAAO,cAAM,OAAA,aAAa,CAAC,QAAQ,CAAC,EAAvB,CAAuB,CAAA;IACtC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;IAEZ,OAAO,CACL,wBAAC,CAAC,CAAC,gBAAgB,IACjB,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,cAAM,OAAA,YAAY,CAAC,IAAI,CAAC,EAAlB,CAAkB,CAAC,CAAC,CAAC,SAAS,EAC5D,YAAY,EAAE;YACZ,WAAW,IAAI,YAAY,CAAC,IAAI,CAAC,CAAA;QACnC,CAAC,EACD,YAAY,EAAE;YACZ,WAAW,IAAI,YAAY,CAAC,KAAK,CAAC,CAAA;QACpC,CAAC,aAEA,OAAO,IAAI,OAAO,EAElB,MAAM,IAAI,mBAAQ,CAAC,YAAY,CAAC,cAAc,EAAE,QAAQ,CAAC,IAAI,CAAC,IAC5C,CACtB,CAAA;AACH,CAAC"}
|
|
@@ -4,5 +4,6 @@ export declare function useToolTip(position: PositionProp, rest: any): {
|
|
|
4
4
|
contentRef: import("react").RefObject<HTMLDivElement>;
|
|
5
5
|
toolTipRef: import("react").RefObject<HTMLDivElement>;
|
|
6
6
|
tooltipStyle: import("react").CSSProperties;
|
|
7
|
+
closeToolTip: () => void;
|
|
7
8
|
handleToggle: (state?: boolean) => void;
|
|
8
9
|
};
|
|
@@ -18,8 +18,11 @@ function useToolTip(position, rest) {
|
|
|
18
18
|
var _b = (0, react_1.useState)({}), tooltipStyle = _b[0], setTooltipStyle = _b[1];
|
|
19
19
|
var toolTipRef = (0, react_1.useRef)(null);
|
|
20
20
|
var contentRef = (0, react_1.useRef)(null);
|
|
21
|
-
|
|
21
|
+
var handleToggle = (0, react_1.useCallback)(function (state) {
|
|
22
22
|
setIsOpen(function (prev) { return (typeof state === 'boolean' ? state : !prev); });
|
|
23
|
+
}, [isOpen]);
|
|
24
|
+
function closeToolTip() {
|
|
25
|
+
setTimeout(function () { return setIsOpen(false); }, 0);
|
|
23
26
|
}
|
|
24
27
|
function handleClickOutside(event) {
|
|
25
28
|
var _a;
|
|
@@ -122,6 +125,7 @@ function useToolTip(position, rest) {
|
|
|
122
125
|
contentRef: contentRef,
|
|
123
126
|
toolTipRef: toolTipRef,
|
|
124
127
|
tooltipStyle: tooltipStyle,
|
|
128
|
+
closeToolTip: closeToolTip,
|
|
125
129
|
handleToggle: handleToggle,
|
|
126
130
|
};
|
|
127
131
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tool-tip.js","sourceRoot":"","sources":["../../../../../src/ui/components/tooltip/hooks/use-tool-tip.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"use-tool-tip.js","sourceRoot":"","sources":["../../../../../src/ui/components/tooltip/hooks/use-tool-tip.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAIA,gCA0IC;AA9ID,+BAAgE;AAIhE,SAAgB,UAAU,CAAC,QAAsB,EAAE,IAAS;IACpD,IAAA,KAAsB,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAApC,MAAM,QAAA,EAAE,SAAS,QAAmB,CAAA;IACrC,IAAA,KAAkC,IAAA,gBAAQ,EAAsB,EAAE,CAAC,EAAlE,YAAY,QAAA,EAAE,eAAe,QAAqC,CAAA;IAEzE,IAAM,UAAU,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAA;IAC/C,IAAM,UAAU,GAAG,IAAA,cAAM,EAAiB,IAAI,CAAC,CAAA;IAE/C,IAAM,YAAY,GAAG,IAAA,mBAAW,EAAC,UAAC,KAAe;QAC/C,SAAS,CAAC,UAAC,IAAI,IAAK,OAAA,CAAC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAA5C,CAA4C,CAAC,CAAA;IACnE,CAAC,EAAE,CAAC,MAAM,CA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C,CAAC,CAAA;IAEZ,OAAO;QACL,MAAM,QAAA;QACN,UAAU,YAAA;QACV,UAAU,YAAA;QACV,YAAY,cAAA;QACZ,YAAY,cAAA;QACZ,YAAY,cAAA;KACb,CAAA;AACH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MutableRefObject } from "react";
|
|
2
2
|
export type PositionProp = 'top-left' | 'top-center' | 'top-right' | 'left-center' | 'right-center' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'auto';
|
|
3
3
|
export interface IToolTipProps {
|
|
4
|
-
content
|
|
4
|
+
content?: any;
|
|
5
5
|
bgColor?: string;
|
|
6
6
|
idTooltip: string;
|
|
7
7
|
enableArrow?: boolean;
|
|
@@ -12,6 +12,7 @@ export interface IToolTipProps {
|
|
|
12
12
|
style?: React.CSSProperties;
|
|
13
13
|
ContentWithTooltipProps?: (props: {
|
|
14
14
|
handleToggle: (state?: boolean) => void;
|
|
15
|
+
closeToolTip: () => void;
|
|
15
16
|
toolTipRef: MutableRefObject<HTMLDivElement>;
|
|
16
17
|
}) => React.ReactNode;
|
|
17
18
|
}
|