@synerise/ds-tooltip 1.2.1 → 1.3.1
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 +22 -0
- package/README.md +1 -1
- package/dist/Tooltip.d.ts +1 -2
- package/dist/Tooltip.js +13 -5
- package/package.json +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.3.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-tooltip@1.3.0...@synerise/ds-tooltip@1.3.1) (2025-11-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* package.json - missing deps ([77c6563](https://github.com/synerise/synerise-design/commit/77c6563cded8c1f4aae754b91cfdd6f2ce5539c5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [1.3.0](https://github.com/synerise/synerise-design/compare/@synerise/ds-tooltip@1.2.1...@synerise/ds-tooltip@1.3.0) (2025-11-06)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **dropdown:** dropdownMenu component ([f0ec827](https://github.com/synerise/synerise-design/commit/f0ec82792cdcb021fa9a454912f6e7a892e53895))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [1.2.1](https://github.com/synerise/synerise-design/compare/@synerise/ds-tooltip@1.2.0...@synerise/ds-tooltip@1.2.1) (2025-10-10)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @synerise/ds-tooltip
|
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ Tooltip UI Component
|
|
|
30
30
|
| overlayStyle | Style of the tooltip card | object | - |
|
|
31
31
|
| placement | The position of the tooltip relative to the target. | `top` / `left` / `right` / `bottom` / `topLeft` / `topRight` / `bottomLeft` / `bottomRight` / `leftTop` / `leftBottom` / `rightTop` / `rightBottom` | `top` |
|
|
32
32
|
| title | tooltip title text | string | - |
|
|
33
|
-
| trigger | Tooltip trigger mode | `hover`, `focus`, `click`,
|
|
33
|
+
| trigger | Tooltip trigger mode | `hover`, `focus`, `click`, | `hover` |
|
|
34
34
|
| tutorialAutoplay | Whether to autoplay tutorial | boolean | `false` |
|
|
35
35
|
| tutorialAutoplaySpeed | speed of autoplay [ms] | number | 5000 |
|
|
36
36
|
| tutorials | steps of tutorial | Tutorials[] | - |
|
package/dist/Tooltip.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@synerise/ds-core/dist/js/style';
|
|
3
|
-
import type { TooltipProps } from './Tooltip.types';
|
|
4
3
|
import './style/index.less';
|
|
5
|
-
declare const Tooltip: (
|
|
4
|
+
declare const Tooltip: React.ForwardRefExoticComponent<Omit<import("antd/lib/tooltip").TooltipPropsWithTitle, "title"> & import("./Tooltip.types").TooltipExtendedProps & React.RefAttributes<HTMLElement>>;
|
|
6
5
|
export default Tooltip;
|
package/dist/Tooltip.js
CHANGED
|
@@ -2,13 +2,14 @@ var _excluded = ["type", "icon", "title", "shortCuts", "status", "description",
|
|
|
2
2
|
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
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import AntdTooltip from 'antd/lib/tooltip';
|
|
5
|
-
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
+
import React, { cloneElement, forwardRef, isValidElement, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
+
import { useMergeRefs } from '@floating-ui/react';
|
|
6
7
|
import '@synerise/ds-core/dist/js/style';
|
|
7
8
|
import Scrollbar from '@synerise/ds-scrollbar';
|
|
8
9
|
import { getPopupContainer } from '@synerise/ds-utils';
|
|
9
10
|
import * as S from './Tooltip.styles';
|
|
10
11
|
import "./style/index.css";
|
|
11
|
-
var Tooltip = function
|
|
12
|
+
var Tooltip = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
12
13
|
var _ref$type = _ref.type,
|
|
13
14
|
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
14
15
|
icon = _ref.icon,
|
|
@@ -80,6 +81,13 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
80
81
|
handleOnClickHideDelay(visible);
|
|
81
82
|
}
|
|
82
83
|
};
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
85
|
+
var childrenRef = children == null ? void 0 : children.ref;
|
|
86
|
+
var mergedRef = useMergeRefs([ref, childrenRef]);
|
|
87
|
+
var tooltipTrigger = ref && /*#__PURE__*/isValidElement(children) ? /*#__PURE__*/cloneElement(children, {
|
|
88
|
+
// @ts-expect-error unknown literal property
|
|
89
|
+
mergedRef: mergedRef
|
|
90
|
+
}) : children;
|
|
83
91
|
if (render !== undefined) {
|
|
84
92
|
return /*#__PURE__*/React.createElement(AntdTooltip, _extends({
|
|
85
93
|
overlayClassName: overlayClassName,
|
|
@@ -92,7 +100,7 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
92
100
|
maxWidth: 'unset'
|
|
93
101
|
},
|
|
94
102
|
getPopupContainer: getPopupContainer
|
|
95
|
-
}, handleHideAfterClick, props),
|
|
103
|
+
}, handleHideAfterClick, props), tooltipTrigger);
|
|
96
104
|
}
|
|
97
105
|
return tooltipContentExists && !disabled ? /*#__PURE__*/React.createElement(AntdTooltip, _extends({
|
|
98
106
|
overlayClassName: overlayClassName,
|
|
@@ -101,6 +109,6 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
101
109
|
offset: [0, 0]
|
|
102
110
|
},
|
|
103
111
|
getPopupContainer: getPopupContainer
|
|
104
|
-
}, handleHideAfterClick, props),
|
|
105
|
-
};
|
|
112
|
+
}, handleHideAfterClick, props), tooltipTrigger) : /*#__PURE__*/React.createElement(React.Fragment, null, tooltipTrigger);
|
|
113
|
+
});
|
|
106
114
|
export default Tooltip;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-tooltip",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Tooltip UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -35,7 +35,9 @@
|
|
|
35
35
|
],
|
|
36
36
|
"types": "dist/index.d.ts",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@
|
|
38
|
+
"@floating-ui/react": "^0.27.16",
|
|
39
|
+
"@synerise/ds-icon": "^1.9.0",
|
|
40
|
+
"@synerise/ds-scrollbar": "^1.2.1",
|
|
39
41
|
"@synerise/ds-utils": "^1.5.0"
|
|
40
42
|
},
|
|
41
43
|
"peerDependencies": {
|
|
@@ -44,5 +46,5 @@
|
|
|
44
46
|
"react": ">=16.9.0 <= 18.3.1",
|
|
45
47
|
"styled-components": "^5.3.3"
|
|
46
48
|
},
|
|
47
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "d5bd7fbc9d840ac30e2b79b36c451b486e178445"
|
|
48
50
|
}
|