@synerise/ds-tooltip 1.3.7 → 1.4.0
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/CHANGELOG.md +6 -0
- package/dist/Tooltip.const.d.ts +4 -0
- package/dist/Tooltip.const.js +5 -0
- package/dist/Tooltip.d.ts +2 -3
- package/dist/Tooltip.js +78 -75
- package/dist/Tooltip.styles.d.ts +1 -0
- package/dist/Tooltip.styles.js +11 -3
- package/dist/Tooltip.types.d.ts +13 -5
- package/dist/Tooltip.utils.d.ts +11 -0
- package/dist/Tooltip.utils.js +17 -0
- package/dist/TooltipContent.d.ts +3 -0
- package/dist/TooltipContent.js +39 -0
- package/package.json +9 -6
- package/dist/Tooltip.example.d.ts +0 -3
- package/dist/Tooltip.example.js +0 -8
- package/dist/style/index.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.4.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-tooltip@1.3.7...@synerise/ds-tooltip@1.4.0) (2026-02-05)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **tooltip:** migrate to popover ([53ecd29](https://github.com/synerise/synerise-design/commit/53ecd293fa31bdcfd921c6c5fd91db9c2c643eda))
|
|
11
|
+
|
|
6
12
|
## [1.3.7](https://github.com/synerise/synerise-design/compare/@synerise/ds-tooltip@1.3.6...@synerise/ds-tooltip@1.3.7) (2026-02-02)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @synerise/ds-tooltip
|
package/dist/Tooltip.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import '
|
|
3
|
-
|
|
4
|
-
declare const Tooltip: React.ForwardRefExoticComponent<Omit<import("antd/lib/tooltip").TooltipPropsWithTitle, "title"> & import("./Tooltip.types").TooltipExtendedProps & React.RefAttributes<HTMLElement>>;
|
|
2
|
+
import type { TooltipProps } from './Tooltip.types';
|
|
3
|
+
declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLElement>>;
|
|
5
4
|
export default Tooltip;
|
package/dist/Tooltip.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
var _excluded = ["type", "icon", "title", "shortCuts", "status", "description", "timeToHideAfterClick", "offset", "children", "button", "render", "image", "disabled"];
|
|
2
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import '
|
|
8
|
-
import Scrollbar from '@synerise/ds-scrollbar';
|
|
9
|
-
import { getPopupContainer } from '@synerise/ds-utils';
|
|
2
|
+
import React, { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { useTheme } from '@synerise/ds-core';
|
|
4
|
+
import { Popover, PopoverContent, PopoverTrigger, getPlacement } from '@synerise/ds-popover';
|
|
5
|
+
import { getPopupContainer as defaultGetPopupContainer } from '@synerise/ds-utils';
|
|
6
|
+
import { POPOVER_FLIP_CONFIG, POPOVER_SHIFT_CONFIG, POPOVER_TRANSITION_DURATION } from './Tooltip.const';
|
|
10
7
|
import * as S from './Tooltip.styles';
|
|
11
|
-
import
|
|
8
|
+
import { getOffsetConfig, getTransitionConfig } from './Tooltip.utils';
|
|
9
|
+
import { TooltipContent } from './TooltipContent';
|
|
12
10
|
var Tooltip = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
13
11
|
var _ref$type = _ref.type,
|
|
14
12
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
@@ -26,88 +24,93 @@ var Tooltip = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
26
24
|
render = _ref.render,
|
|
27
25
|
image = _ref.image,
|
|
28
26
|
disabled = _ref.disabled,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
_ref$placement = _ref.placement,
|
|
28
|
+
placement = _ref$placement === void 0 ? 'top' : _ref$placement,
|
|
29
|
+
_ref$trigger = _ref.trigger,
|
|
30
|
+
trigger = _ref$trigger === void 0 ? 'hover' : _ref$trigger,
|
|
31
|
+
open = _ref.open,
|
|
32
|
+
zIndex = _ref.zIndex,
|
|
33
|
+
onOpenChange = _ref.onOpenChange,
|
|
34
|
+
popoverProps = _ref.popoverProps,
|
|
35
|
+
getPopupContainer = _ref.getPopupContainer,
|
|
36
|
+
overlayStyle = _ref.overlayStyle;
|
|
37
|
+
var _useState = useState(open || false),
|
|
38
|
+
isOpen = _useState[0],
|
|
39
|
+
setIsOpen = _useState[1];
|
|
33
40
|
var timeoutClickRef = useRef(null);
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var shouldRenderDescription = type !== 'default' && description;
|
|
38
|
-
var tooltipComponent = /*#__PURE__*/React.createElement(S.TooltipComponent, {
|
|
39
|
-
onClick: captureClick,
|
|
40
|
-
tooltipType: type
|
|
41
|
-
}, /*#__PURE__*/React.createElement(S.TooltipContent, null, status && /*#__PURE__*/React.createElement(S.TooltipStatus, null, status), title && /*#__PURE__*/React.createElement(S.TooltipTitle, {
|
|
42
|
-
tooltipType: type
|
|
43
|
-
}, icon, /*#__PURE__*/React.createElement(S.TooltipTitleWrapper, null, title), shortCuts && /*#__PURE__*/React.createElement(S.TooltipHint, null, Array.isArray(shortCuts) ? shortCuts.map(function (hint, index) {
|
|
44
|
-
return /*#__PURE__*/React.createElement(S.TooltipKey, {
|
|
45
|
-
key: "key-" + index
|
|
46
|
-
}, hint);
|
|
47
|
-
}) : /*#__PURE__*/React.createElement(S.TooltipKey, null, shortCuts))), image && /*#__PURE__*/React.createElement(S.TooltipImage, {
|
|
48
|
-
extraMargin: !!shouldRenderDescription
|
|
49
|
-
}, image), shouldRenderDescription && /*#__PURE__*/React.createElement(S.TooltipDescription, {
|
|
50
|
-
tooltipType: type
|
|
51
|
-
}, type === 'largeScrollable' ? /*#__PURE__*/React.createElement(Scrollbar, {
|
|
52
|
-
absolute: true,
|
|
53
|
-
maxHeight: 90,
|
|
54
|
-
style: {
|
|
55
|
-
paddingRight: 16
|
|
56
|
-
}
|
|
57
|
-
}, /*#__PURE__*/React.createElement(React.Fragment, null, shouldRenderDescription)) : shouldRenderDescription)), button && /*#__PURE__*/React.createElement(S.TooltipButton, null, button));
|
|
58
|
-
var overlayClassName = useMemo(function () {
|
|
59
|
-
return "ds-tooltip-offset-" + offset + " ds-tooltip-type-" + type;
|
|
60
|
-
}, [offset, type]);
|
|
61
|
-
var tooltipContentExists = Boolean(description || title || icon);
|
|
41
|
+
var theme = useTheme();
|
|
42
|
+
var floatingPlacement = getPlacement(placement);
|
|
43
|
+
var tooltipContentExists = Boolean(description || title || icon || typeof render === 'function');
|
|
62
44
|
useEffect(function () {
|
|
63
45
|
return function () {
|
|
64
46
|
timeoutClickRef.current && clearTimeout(timeoutClickRef.current);
|
|
65
47
|
};
|
|
66
48
|
}, []);
|
|
49
|
+
useEffect(function () {
|
|
50
|
+
setIsOpen(!!open);
|
|
51
|
+
}, [open]);
|
|
67
52
|
var handleOnClickHideDelay = function handleOnClickHideDelay(visible) {
|
|
68
53
|
if (!visible) {
|
|
69
54
|
timeoutClickRef.current && clearTimeout(timeoutClickRef.current);
|
|
70
|
-
|
|
55
|
+
setIsOpen(false);
|
|
56
|
+
onOpenChange == null || onOpenChange(false);
|
|
71
57
|
} else {
|
|
72
|
-
|
|
58
|
+
setIsOpen(true);
|
|
73
59
|
timeoutClickRef.current = setTimeout(function () {
|
|
74
|
-
|
|
60
|
+
onOpenChange == null || onOpenChange(false);
|
|
61
|
+
setIsOpen(false);
|
|
75
62
|
}, timeToHideAfterClick);
|
|
76
63
|
}
|
|
77
64
|
};
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
65
|
+
var handleOpenChange = function handleOpenChange(newOpen) {
|
|
66
|
+
if (trigger === 'click' && timeToHideAfterClick) {
|
|
67
|
+
handleOnClickHideDelay(newOpen);
|
|
68
|
+
} else {
|
|
69
|
+
setIsOpen(newOpen);
|
|
70
|
+
onOpenChange == null || onOpenChange(newOpen);
|
|
82
71
|
}
|
|
83
72
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
73
|
+
var tooltipContent = useMemo(function () {
|
|
74
|
+
return render ? /*#__PURE__*/React.createElement(S.TooltipWrapper, {
|
|
75
|
+
style: overlayStyle
|
|
76
|
+
}, render()) : /*#__PURE__*/React.createElement(TooltipContent, {
|
|
77
|
+
title: title,
|
|
78
|
+
description: description,
|
|
79
|
+
icon: icon,
|
|
80
|
+
button: button,
|
|
81
|
+
shortCuts: shortCuts,
|
|
82
|
+
type: type,
|
|
83
|
+
image: image,
|
|
84
|
+
status: status,
|
|
85
|
+
overlayStyle: overlayStyle
|
|
86
|
+
});
|
|
87
|
+
}, [button, description, icon, image, render, shortCuts, status, overlayStyle, title, type]);
|
|
88
|
+
var isTriggeredByClick = Array.isArray(trigger) ? trigger.includes('click') : trigger === 'click';
|
|
89
|
+
var handleTriggerClick = function handleTriggerClick() {
|
|
90
|
+
isTriggeredByClick && handleOpenChange(!isOpen);
|
|
91
|
+
};
|
|
92
|
+
if (!tooltipContentExists || disabled) {
|
|
93
|
+
return children;
|
|
103
94
|
}
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
95
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popover, _extends({
|
|
96
|
+
placement: floatingPlacement,
|
|
97
|
+
trigger: trigger,
|
|
98
|
+
modal: false,
|
|
99
|
+
onOpenChange: handleOpenChange,
|
|
100
|
+
open: isOpen,
|
|
101
|
+
autoUpdate: true,
|
|
102
|
+
offsetConfig: getOffsetConfig(offset),
|
|
103
|
+
transitionDuration: POPOVER_TRANSITION_DURATION,
|
|
104
|
+
flipConfig: POPOVER_FLIP_CONFIG,
|
|
105
|
+
shiftConfig: POPOVER_SHIFT_CONFIG,
|
|
106
|
+
getTransitionConfig: getTransitionConfig,
|
|
107
|
+
getPopupContainer: getPopupContainer || defaultGetPopupContainer,
|
|
108
|
+
testId: "tooltip",
|
|
109
|
+
zIndex: zIndex || parseInt(theme.variables['zindex-tooltip'])
|
|
110
|
+
}, popoverProps), /*#__PURE__*/React.createElement(PopoverTrigger, {
|
|
111
|
+
ref: ref,
|
|
112
|
+
asChild: true,
|
|
113
|
+
onClick: handleTriggerClick
|
|
114
|
+
}, children), /*#__PURE__*/React.createElement(PopoverContent, null, tooltipContent)));
|
|
112
115
|
});
|
|
113
116
|
export default Tooltip;
|
package/dist/Tooltip.styles.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare const TooltipStatus: import("styled-components").StyledComponent<
|
|
|
14
14
|
export declare const TooltipImage: import("styled-components").StyledComponent<"div", any, {
|
|
15
15
|
extraMargin: boolean;
|
|
16
16
|
}, never>;
|
|
17
|
+
export declare const TooltipWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
18
|
export declare const TooltipComponent: import("styled-components").StyledComponent<"div", any, {
|
|
18
19
|
tooltipType: TooltipTypes;
|
|
19
20
|
}, never>;
|
package/dist/Tooltip.styles.js
CHANGED
|
@@ -46,10 +46,18 @@ export var TooltipImage = styled.div.withConfig({
|
|
|
46
46
|
})(["display:flex;align-items:center;flex-direction:column;", " img,video{max-width:100%;}"], function (props) {
|
|
47
47
|
return props.extraMargin && 'margin-bottom: 4px;';
|
|
48
48
|
});
|
|
49
|
-
export var
|
|
50
|
-
displayName: "
|
|
49
|
+
export var TooltipWrapper = styled.div.withConfig({
|
|
50
|
+
displayName: "Tooltipstyles__TooltipWrapper",
|
|
51
51
|
componentId: "sc-mghjny-9"
|
|
52
|
-
})(["
|
|
52
|
+
})(["box-shadow:", ";"], function (props) {
|
|
53
|
+
return props.theme.variables['box-shadow-2'];
|
|
54
|
+
});
|
|
55
|
+
export var TooltipComponent = styled(TooltipWrapper).withConfig({
|
|
56
|
+
displayName: "Tooltipstyles__TooltipComponent",
|
|
57
|
+
componentId: "sc-mghjny-10"
|
|
58
|
+
})(["font-size:11px;font-weight:500;min-height:24px;text-align:center;max-width:", ";width:max-content;background-color:rgba(56,67,80,0.9);min-height:24px;width:100%;border-radius:3px;color:", ";overflow:hidden;text-align:left;", "{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:", ";}"], function (props) {
|
|
59
|
+
return props.tooltipType === 'largeScrollable' ? '400px' : '250px';
|
|
60
|
+
}, function (props) {
|
|
53
61
|
return props.theme.palette['grey-200'];
|
|
54
62
|
}, TooltipContent, function (props) {
|
|
55
63
|
return props.tooltipType === 'default' ? '3px 8px' : '12px';
|
package/dist/Tooltip.types.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type LegacyTooltipPlacement, type PopoverOptions, type PopoverTriggerType } from '@synerise/ds-popover';
|
|
3
|
+
export type TooltipContentProps = Pick<TooltipProps, 'title' | 'description' | 'image' | 'icon' | 'shortCuts' | 'button' | 'status' | 'overlayStyle'> & Required<Pick<TooltipProps, 'type'>>;
|
|
3
4
|
export type TooltipTypes = 'default' | 'largeSimple' | 'largeScrollable';
|
|
4
|
-
export type
|
|
5
|
+
export type TooltipProps = {
|
|
5
6
|
type?: TooltipTypes;
|
|
6
7
|
icon?: ReactNode;
|
|
7
8
|
status?: ReactNode;
|
|
@@ -12,8 +13,15 @@ export type TooltipExtendedProps = {
|
|
|
12
13
|
timeToHideAfterClick?: number;
|
|
13
14
|
offset?: 'default' | 'small';
|
|
14
15
|
button?: ReactNode;
|
|
16
|
+
children?: ReactNode;
|
|
15
17
|
render?: () => ReactNode;
|
|
16
18
|
disabled?: boolean;
|
|
19
|
+
placement?: LegacyTooltipPlacement;
|
|
20
|
+
trigger?: PopoverTriggerType | PopoverTriggerType[];
|
|
21
|
+
zIndex?: number;
|
|
22
|
+
overlayStyle?: CSSProperties;
|
|
23
|
+
popoverProps?: Omit<PopoverOptions, 'zIndex' | 'getPopupContainer'>;
|
|
24
|
+
getPopupContainer?: PopoverOptions['getPopupContainer'];
|
|
25
|
+
open?: boolean;
|
|
26
|
+
onOpenChange?: (newOpen: boolean) => void;
|
|
17
27
|
};
|
|
18
|
-
export default TooltipExtendedProps;
|
|
19
|
-
export type TooltipProps = Omit<TooltipPropsWithTitle, 'title'> & TooltipExtendedProps;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type TooltipProps } from 'Tooltip.types';
|
|
2
|
+
import { type OffsetConfig } from '@synerise/ds-popover';
|
|
3
|
+
export declare const getTransitionConfig: () => {
|
|
4
|
+
open: {
|
|
5
|
+
opacity: number;
|
|
6
|
+
};
|
|
7
|
+
initial: {
|
|
8
|
+
opacity: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const getOffsetConfig: (offset: TooltipProps["offset"]) => OffsetConfig;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// import { type UseTransitionStylesProps } from '@floating-ui/react';
|
|
2
|
+
|
|
3
|
+
export var getTransitionConfig = function getTransitionConfig() {
|
|
4
|
+
return {
|
|
5
|
+
open: {
|
|
6
|
+
opacity: 1
|
|
7
|
+
},
|
|
8
|
+
initial: {
|
|
9
|
+
opacity: 0
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export var getOffsetConfig = function getOffsetConfig(offset) {
|
|
14
|
+
return {
|
|
15
|
+
mainAxis: offset === 'small' ? 4 : 8
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Scrollbar from '@synerise/ds-scrollbar';
|
|
3
|
+
import * as S from './Tooltip.styles';
|
|
4
|
+
export var TooltipContent = function TooltipContent(_ref) {
|
|
5
|
+
var type = _ref.type,
|
|
6
|
+
title = _ref.title,
|
|
7
|
+
button = _ref.button,
|
|
8
|
+
description = _ref.description,
|
|
9
|
+
shortCuts = _ref.shortCuts,
|
|
10
|
+
icon = _ref.icon,
|
|
11
|
+
status = _ref.status,
|
|
12
|
+
image = _ref.image,
|
|
13
|
+
overlayStyle = _ref.overlayStyle;
|
|
14
|
+
var captureClick = function captureClick(event) {
|
|
15
|
+
event.stopPropagation();
|
|
16
|
+
};
|
|
17
|
+
var shouldRenderDescription = type !== 'default' && description;
|
|
18
|
+
return /*#__PURE__*/React.createElement(S.TooltipComponent, {
|
|
19
|
+
onClick: captureClick,
|
|
20
|
+
tooltipType: type,
|
|
21
|
+
style: overlayStyle
|
|
22
|
+
}, /*#__PURE__*/React.createElement(S.TooltipContent, null, status && /*#__PURE__*/React.createElement(S.TooltipStatus, null, status), title && /*#__PURE__*/React.createElement(S.TooltipTitle, {
|
|
23
|
+
tooltipType: type
|
|
24
|
+
}, icon, /*#__PURE__*/React.createElement(S.TooltipTitleWrapper, null, title), shortCuts && /*#__PURE__*/React.createElement(S.TooltipHint, null, Array.isArray(shortCuts) ? shortCuts.map(function (hint, index) {
|
|
25
|
+
return /*#__PURE__*/React.createElement(S.TooltipKey, {
|
|
26
|
+
key: "key-" + index
|
|
27
|
+
}, hint);
|
|
28
|
+
}) : /*#__PURE__*/React.createElement(S.TooltipKey, null, shortCuts))), image && /*#__PURE__*/React.createElement(S.TooltipImage, {
|
|
29
|
+
extraMargin: !!shouldRenderDescription
|
|
30
|
+
}, image), shouldRenderDescription && /*#__PURE__*/React.createElement(S.TooltipDescription, {
|
|
31
|
+
tooltipType: type
|
|
32
|
+
}, type === 'largeScrollable' ? /*#__PURE__*/React.createElement(Scrollbar, {
|
|
33
|
+
absolute: true,
|
|
34
|
+
maxHeight: 90,
|
|
35
|
+
style: {
|
|
36
|
+
paddingRight: 16
|
|
37
|
+
}
|
|
38
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, shouldRenderDescription)) : shouldRenderDescription)), button && /*#__PURE__*/React.createElement(S.TooltipButton, null, button));
|
|
39
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-tooltip",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Tooltip UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -36,15 +36,18 @@
|
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@floating-ui/react": "^0.27.16",
|
|
39
|
-
"@synerise/ds-icon": "^1.11.
|
|
40
|
-
"@synerise/ds-
|
|
41
|
-
"@synerise/ds-
|
|
39
|
+
"@synerise/ds-icon": "^1.11.1",
|
|
40
|
+
"@synerise/ds-popover": "^1.4.0",
|
|
41
|
+
"@synerise/ds-scrollbar": "^1.2.8",
|
|
42
|
+
"@synerise/ds-utils": "^1.6.0"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
45
|
"@synerise/ds-core": "*",
|
|
45
|
-
"antd": "4.24.16",
|
|
46
46
|
"react": ">=16.9.0 <= 18.3.1",
|
|
47
47
|
"styled-components": "^5.3.3"
|
|
48
48
|
},
|
|
49
|
-
"
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@testing-library/user-event": "^14.6.1"
|
|
51
|
+
},
|
|
52
|
+
"gitHead": "ac8decd9736940735bf05198b24b3eeeb5900b18"
|
|
50
53
|
}
|
package/dist/Tooltip.example.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Tooltip from './Tooltip';
|
|
3
|
-
var TooltipExample = function TooltipExample() {
|
|
4
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
5
|
-
title: "lool"
|
|
6
|
-
}));
|
|
7
|
-
};
|
|
8
|
-
export default TooltipExample;
|
package/dist/style/index.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.ant-tooltip{box-sizing:border-box;margin:0;padding:0;color:#6a7580;font-size:13px;font-variant:tabular-nums;line-height:1.38;list-style:none;font-feature-settings:'tnum';position:absolute;z-index:991060;display:block;width:max-content;width:intrinsic;max-width:250px;visibility:visible}.ant-tooltip-content{position:relative}.ant-tooltip-hidden{display:none}.ant-tooltip-placement-top,.ant-tooltip-placement-topLeft,.ant-tooltip-placement-topRight{padding-bottom:4px}.ant-tooltip-placement-right,.ant-tooltip-placement-rightBottom,.ant-tooltip-placement-rightTop{padding-left:4px}.ant-tooltip-placement-bottom,.ant-tooltip-placement-bottomLeft,.ant-tooltip-placement-bottomRight{padding-top:4px}.ant-tooltip-placement-left,.ant-tooltip-placement-leftBottom,.ant-tooltip-placement-leftTop{padding-right:4px}.ant-tooltip-inner{min-width:30px;min-height:32px;padding:6px 8px;color:#fff;text-align:left;text-decoration:none;word-wrap:break-word;background-color:#384350;border-radius:3px;box-shadow:0 2px 6px rgba(171,178,183,.12)}.ant-tooltip-arrow{position:absolute;z-index:2;display:block;width:13.07106781px;height:13.07106781px;overflow:hidden;background:0 0;pointer-events:none}.ant-tooltip-arrow-content{--antd-arrow-background-color:linear-gradient(to right bottom, rgba(56, 67, 80, 0.9), #384350);position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:5px;height:5px;margin:auto;content:'';pointer-events:auto;border-radius:0 0 2px;pointer-events:none}.ant-tooltip-arrow-content::before{position:absolute;top:-5px;left:-5px;width:15px;height:15px;background:var(--antd-arrow-background-color);background-repeat:no-repeat;background-position:-4px -4px;content:'';clip-path:inset(33% 33%);clip-path:path('M 3.5355339059327373 11.464466094067262 A 5 5 0 0 1 7.071067811865475 10 L 8 10 A 2 2 0 0 0 10 8 L 10 7.071067811865475 A 5 5 0 0 1 11.464466094067262 3.5355339059327373 L 10.464466094067262 3.5355339059327373 L 3.5355339059327373 10.464466094067262 Z')}.ant-tooltip-placement-top .ant-tooltip-arrow,.ant-tooltip-placement-topLeft .ant-tooltip-arrow,.ant-tooltip-placement-topRight .ant-tooltip-arrow{bottom:0;transform:translateY(100%)}.ant-tooltip-placement-top .ant-tooltip-arrow-content,.ant-tooltip-placement-topLeft .ant-tooltip-arrow-content,.ant-tooltip-placement-topRight .ant-tooltip-arrow-content{box-shadow:3px 3px 7px rgba(0,0,0,.07);transform:translateY(-6.53553391px) rotate(45deg)}.ant-tooltip-placement-top .ant-tooltip-arrow{left:50%;transform:translateY(100%) translateX(-50%)}.ant-tooltip-placement-topLeft .ant-tooltip-arrow{left:13px}.ant-tooltip-placement-topRight .ant-tooltip-arrow{right:13px}.ant-tooltip-placement-right .ant-tooltip-arrow,.ant-tooltip-placement-rightBottom .ant-tooltip-arrow,.ant-tooltip-placement-rightTop .ant-tooltip-arrow{left:0;transform:translateX(-100%)}.ant-tooltip-placement-right .ant-tooltip-arrow-content,.ant-tooltip-placement-rightBottom .ant-tooltip-arrow-content,.ant-tooltip-placement-rightTop .ant-tooltip-arrow-content{box-shadow:-3px 3px 7px rgba(0,0,0,.07);transform:translateX(6.53553391px) rotate(135deg)}.ant-tooltip-placement-right .ant-tooltip-arrow{top:50%;transform:translateX(-100%) translateY(-50%)}.ant-tooltip-placement-rightTop .ant-tooltip-arrow{top:5px}.ant-tooltip-placement-rightBottom .ant-tooltip-arrow{bottom:5px}.ant-tooltip-placement-left .ant-tooltip-arrow,.ant-tooltip-placement-leftBottom .ant-tooltip-arrow,.ant-tooltip-placement-leftTop .ant-tooltip-arrow{right:0;transform:translateX(100%)}.ant-tooltip-placement-left .ant-tooltip-arrow-content,.ant-tooltip-placement-leftBottom .ant-tooltip-arrow-content,.ant-tooltip-placement-leftTop .ant-tooltip-arrow-content{box-shadow:3px -3px 7px rgba(0,0,0,.07);transform:translateX(-6.53553391px) rotate(315deg)}.ant-tooltip-placement-left .ant-tooltip-arrow{top:50%;transform:translateX(100%) translateY(-50%)}.ant-tooltip-placement-leftTop .ant-tooltip-arrow{top:5px}.ant-tooltip-placement-leftBottom .ant-tooltip-arrow{bottom:5px}.ant-tooltip-placement-bottom .ant-tooltip-arrow,.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow,.ant-tooltip-placement-bottomRight .ant-tooltip-arrow{top:0;transform:translateY(-100%)}.ant-tooltip-placement-bottom .ant-tooltip-arrow-content,.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow-content,.ant-tooltip-placement-bottomRight .ant-tooltip-arrow-content{box-shadow:-3px -3px 7px rgba(0,0,0,.07);transform:translateY(6.53553391px) rotate(225deg)}.ant-tooltip-placement-bottom .ant-tooltip-arrow{left:50%;transform:translateY(-100%) translateX(-50%)}.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow{left:13px}.ant-tooltip-placement-bottomRight .ant-tooltip-arrow{right:13px}.ant-tooltip-pink .ant-tooltip-inner{background-color:#eb2f96}.ant-tooltip-pink .ant-tooltip-arrow-content::before{background:#eb2f96}.ant-tooltip-magenta .ant-tooltip-inner{background-color:#eb2f96}.ant-tooltip-magenta .ant-tooltip-arrow-content::before{background:#eb2f96}.ant-tooltip-red .ant-tooltip-inner{background-color:#f5222d}.ant-tooltip-red .ant-tooltip-arrow-content::before{background:#f5222d}.ant-tooltip-volcano .ant-tooltip-inner{background-color:#fa541c}.ant-tooltip-volcano .ant-tooltip-arrow-content::before{background:#fa541c}.ant-tooltip-orange .ant-tooltip-inner{background-color:#fa8c16}.ant-tooltip-orange .ant-tooltip-arrow-content::before{background:#fa8c16}.ant-tooltip-yellow .ant-tooltip-inner{background-color:#fadb14}.ant-tooltip-yellow .ant-tooltip-arrow-content::before{background:#fadb14}.ant-tooltip-gold .ant-tooltip-inner{background-color:#faad14}.ant-tooltip-gold .ant-tooltip-arrow-content::before{background:#faad14}.ant-tooltip-cyan .ant-tooltip-inner{background-color:#13c2c2}.ant-tooltip-cyan .ant-tooltip-arrow-content::before{background:#13c2c2}.ant-tooltip-lime .ant-tooltip-inner{background-color:#a0d911}.ant-tooltip-lime .ant-tooltip-arrow-content::before{background:#a0d911}.ant-tooltip-green .ant-tooltip-inner{background-color:#52c41a}.ant-tooltip-green .ant-tooltip-arrow-content::before{background:#52c41a}.ant-tooltip-blue .ant-tooltip-inner{background-color:#1890ff}.ant-tooltip-blue .ant-tooltip-arrow-content::before{background:#1890ff}.ant-tooltip-geekblue .ant-tooltip-inner{background-color:#2f54eb}.ant-tooltip-geekblue .ant-tooltip-arrow-content::before{background:#2f54eb}.ant-tooltip-purple .ant-tooltip-inner{background-color:#722ed1}.ant-tooltip-purple .ant-tooltip-arrow-content::before{background:#722ed1}.ant-tooltip-rtl{direction:rtl}.ant-tooltip-rtl .ant-tooltip-inner{text-align:right}.ant-carousel{box-sizing:border-box;margin:0;padding:0;color:#6a7580;font-size:13px;font-variant:tabular-nums;line-height:1.38;list-style:none;font-feature-settings:'tnum'}.ant-carousel .slick-slider{position:relative;display:block;box-sizing:border-box;touch-action:pan-y;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.ant-carousel .slick-list{position:relative;display:block;margin:0;padding:0;overflow:hidden}.ant-carousel .slick-list:focus{outline:0}.ant-carousel .slick-list.dragging{cursor:pointer}.ant-carousel .slick-list .slick-slide{pointer-events:none}.ant-carousel .slick-list .slick-slide input.ant-checkbox-input,.ant-carousel .slick-list .slick-slide input.ant-radio-input{visibility:hidden}.ant-carousel .slick-list .slick-slide.slick-active{pointer-events:auto}.ant-carousel .slick-list .slick-slide.slick-active input.ant-checkbox-input,.ant-carousel .slick-list .slick-slide.slick-active input.ant-radio-input{visibility:visible}.ant-carousel .slick-list .slick-slide>div>div{vertical-align:bottom}.ant-carousel .slick-slider .slick-list,.ant-carousel .slick-slider .slick-track{transform:translate3d(0,0,0);touch-action:pan-y}.ant-carousel .slick-track{position:relative;top:0;left:0;display:block}.ant-carousel .slick-track::after,.ant-carousel .slick-track::before{display:table;content:''}.ant-carousel .slick-track::after{clear:both}.slick-loading .ant-carousel .slick-track{visibility:hidden}.ant-carousel .slick-slide{display:none;float:left;height:100%;min-height:1px}.ant-carousel .slick-slide img{display:block}.ant-carousel .slick-slide.slick-loading img{display:none}.ant-carousel .slick-slide.dragging img{pointer-events:none}.ant-carousel .slick-initialized .slick-slide{display:block}.ant-carousel .slick-loading .slick-slide{visibility:hidden}.ant-carousel .slick-vertical .slick-slide{display:block;height:auto}.ant-carousel .slick-arrow.slick-hidden{display:none}.ant-carousel .slick-next,.ant-carousel .slick-prev{position:absolute;top:50%;display:block;width:20px;height:20px;margin-top:-10px;padding:0;color:transparent;font-size:0;line-height:0;background:0 0;border:0;outline:0;cursor:pointer}.ant-carousel .slick-next:focus,.ant-carousel .slick-next:hover,.ant-carousel .slick-prev:focus,.ant-carousel .slick-prev:hover{color:transparent;background:0 0;outline:0}.ant-carousel .slick-next:focus::before,.ant-carousel .slick-next:hover::before,.ant-carousel .slick-prev:focus::before,.ant-carousel .slick-prev:hover::before{opacity:1}.ant-carousel .slick-next.slick-disabled::before,.ant-carousel .slick-prev.slick-disabled::before{opacity:.25}.ant-carousel .slick-prev{left:-25px}.ant-carousel .slick-prev::before{content:'←'}.ant-carousel .slick-next{right:-25px}.ant-carousel .slick-next::before{content:'→'}.ant-carousel .slick-dots{position:absolute;right:0;bottom:0;left:0;z-index:15;display:flex!important;justify-content:center;margin-right:15%;margin-bottom:0;margin-left:15%;padding-left:0;list-style:none}.ant-carousel .slick-dots-bottom{bottom:12px}.ant-carousel .slick-dots-top{top:12px;bottom:auto}.ant-carousel .slick-dots li{position:relative;display:inline-block;flex:0 1 auto;box-sizing:content-box;width:16px;height:3px;margin:0 4px;padding:0;text-align:center;text-indent:-999px;vertical-align:top;transition:all .5s}.ant-carousel .slick-dots li button{position:relative;display:block;width:100%;height:3px;padding:0;color:transparent;font-size:0;background:#fff;border:0;border-radius:1px;outline:0;cursor:pointer;opacity:.3;transition:all .5s}.ant-carousel .slick-dots li button:focus,.ant-carousel .slick-dots li button:hover{opacity:.75}.ant-carousel .slick-dots li button::after{position:absolute;top:-4px;right:-4px;bottom:-4px;left:-4px;content:''}.ant-carousel .slick-dots li.slick-active{width:24px}.ant-carousel .slick-dots li.slick-active button{background:#fff;opacity:1}.ant-carousel .slick-dots li.slick-active:focus,.ant-carousel .slick-dots li.slick-active:hover{opacity:1}.ant-carousel-vertical .slick-dots{top:50%;bottom:auto;flex-direction:column;width:3px;height:auto;margin:0;transform:translateY(-50%)}.ant-carousel-vertical .slick-dots-left{right:auto;left:12px}.ant-carousel-vertical .slick-dots-right{right:12px;left:auto}.ant-carousel-vertical .slick-dots li{width:3px;height:16px;margin:4px 0;vertical-align:baseline}.ant-carousel-vertical .slick-dots li button{width:3px;height:16px}.ant-carousel-vertical .slick-dots li.slick-active{width:3px;height:24px}.ant-carousel-vertical .slick-dots li.slick-active button{width:3px;height:24px}.ant-carousel-rtl{direction:rtl}.ant-carousel-rtl .ant-carousel .slick-track{right:0;left:auto}.ant-carousel-rtl .ant-carousel .slick-prev{right:-25px;left:auto}.ant-carousel-rtl .ant-carousel .slick-prev::before{content:'→'}.ant-carousel-rtl .ant-carousel .slick-next{right:auto;left:-25px}.ant-carousel-rtl .ant-carousel .slick-next::before{content:'←'}.ant-carousel-rtl.ant-carousel .slick-dots{flex-direction:row-reverse}.ant-carousel-rtl.ant-carousel-vertical .slick-dots{flex-direction:column}.ant-tooltip{transform:none!important;transform-origin:50%!important}.ant-tooltip.ant-tooltip{width:auto}.ant-tooltip.ds-tooltip-type-largeScrollable{max-width:400px}.ant-tooltip.ant-tooltip-placement-left,.ant-tooltip.ant-tooltip-placement-leftBottom,.ant-tooltip.ant-tooltip-placement-leftTop{padding:0 8px 0 0}.ant-tooltip.ant-tooltip-placement-left.ds-tooltip-offset-small,.ant-tooltip.ant-tooltip-placement-leftBottom.ds-tooltip-offset-small,.ant-tooltip.ant-tooltip-placement-leftTop.ds-tooltip-offset-small{padding:0 4px 0 0}.ant-tooltip.ant-tooltip-placement-right,.ant-tooltip.ant-tooltip-placement-rightBottom,.ant-tooltip.ant-tooltip-placement-rightTop{padding:0 0 0 8px}.ant-tooltip.ant-tooltip-placement-right.ds-tooltip-offset-small,.ant-tooltip.ant-tooltip-placement-rightBottom.ds-tooltip-offset-small,.ant-tooltip.ant-tooltip-placement-rightTop.ds-tooltip-offset-small{padding:0 0 0 4px}.ant-tooltip.ant-tooltip-placement-top,.ant-tooltip.ant-tooltip-placement-topLeft,.ant-tooltip.ant-tooltip-placement-topRight{padding:0 0 8px 0}.ant-tooltip.ant-tooltip-placement-top.ds-tooltip-offset-small,.ant-tooltip.ant-tooltip-placement-topLeft.ds-tooltip-offset-small,.ant-tooltip.ant-tooltip-placement-topRight.ds-tooltip-offset-small{padding:0 0 4px 0}.ant-tooltip.ant-tooltip-placement-bottom,.ant-tooltip.ant-tooltip-placement-bottomLeft,.ant-tooltip.ant-tooltip-placement-bottomRight{padding:8px 0 0 0}.ant-tooltip.ant-tooltip-placement-bottom.ds-tooltip-offset-small,.ant-tooltip.ant-tooltip-placement-bottomLeft.ds-tooltip-offset-small,.ant-tooltip.ant-tooltip-placement-bottomRight.ds-tooltip-offset-small{padding:4px 0 0 0}.ant-tooltip-inner{font-size:11px;font-weight:500;box-shadow:0 8px 16px rgba(171,178,183,.32);min-height:24px;text-align:center}.ant-tooltip-arrow{display:none}.ant-tooltip-inner{padding:0;background-color:transparent!important}
|