react-tooltip 4.3.0 → 4.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/README.md +5 -2
- package/dist/index.es.js +264 -407
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +264 -407
- package/dist/index.js.map +1 -1
- package/dist/react-tooltip.d.ts +13 -10
- package/package.json +35 -33
package/dist/react-tooltip.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export interface TooltipProps {
|
|
|
30
30
|
multiline?: boolean;
|
|
31
31
|
// Add 1px white border
|
|
32
32
|
border?: boolean;
|
|
33
|
+
// A custom class name to use for the border
|
|
34
|
+
borderClass?: string;
|
|
33
35
|
// Popup text color
|
|
34
36
|
textColor?: string;
|
|
35
37
|
// Popup background color
|
|
@@ -57,15 +59,15 @@ export interface TooltipProps {
|
|
|
57
59
|
// Time delay for showing popup
|
|
58
60
|
delayShow?: number;
|
|
59
61
|
// Custom event to trigger tooltip
|
|
60
|
-
event?: string;
|
|
62
|
+
event?: keyof HTMLElementEventMap | string;
|
|
61
63
|
// Custom event to hide tooltip
|
|
62
64
|
// (this requires the event prop as well)
|
|
63
|
-
eventOff?: string;
|
|
65
|
+
eventOff?: keyof HTMLElementEventMap | string;
|
|
64
66
|
// When set to true, custom event's propagation
|
|
65
67
|
// mode will be captue
|
|
66
68
|
isCapture?: boolean;
|
|
67
69
|
// Global event to hide tooltip
|
|
68
|
-
globalEventOff?: string;
|
|
70
|
+
globalEventOff?: keyof HTMLElementEventMap | string;
|
|
69
71
|
// Function to dynamically generate the tooltip content
|
|
70
72
|
getContent?: GetContent;
|
|
71
73
|
// Callback after tooltip is shown
|
|
@@ -74,7 +76,7 @@ export interface TooltipProps {
|
|
|
74
76
|
afterHide?: VoidFunc;
|
|
75
77
|
// Callback to override the tooltip position
|
|
76
78
|
overridePosition?: (
|
|
77
|
-
position: { left: number; top: number
|
|
79
|
+
position: { left: number; top: number },
|
|
78
80
|
currentEvent: Event,
|
|
79
81
|
currentTarget: EventTarget,
|
|
80
82
|
// node is the ref argument, and the wrapper
|
|
@@ -83,8 +85,8 @@ export interface TooltipProps {
|
|
|
83
85
|
place: Place,
|
|
84
86
|
desiredPlace: Place,
|
|
85
87
|
effect: Effect,
|
|
86
|
-
offset: Offset
|
|
87
|
-
) =>
|
|
88
|
+
offset: Offset
|
|
89
|
+
) => { left: number; top: number };
|
|
88
90
|
// Manually disable the tooltip behavior
|
|
89
91
|
disable?: boolean;
|
|
90
92
|
// Hide the tooltip when scrolling;
|
|
@@ -94,7 +96,7 @@ export interface TooltipProps {
|
|
|
94
96
|
// default = true
|
|
95
97
|
resizeHide?: boolean;
|
|
96
98
|
// The tooltip parent component;
|
|
97
|
-
// default = 'div'
|
|
99
|
+
// default = 'div'
|
|
98
100
|
wrapper?: 'div' | 'span';
|
|
99
101
|
// Listen to body events vs. individual events
|
|
100
102
|
bodyMode?: boolean;
|
|
@@ -109,9 +111,10 @@ export interface TooltipProps {
|
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
// ReactTooltip component is the default export
|
|
114
|
+
// You can overview demo examples here: https://bddeu.csb.app
|
|
112
115
|
export default class ReactTooltip extends React.Component<TooltipProps> {
|
|
113
116
|
// static methods
|
|
114
|
-
static show: (target: Element) => {};
|
|
115
|
-
static hide: (target?: Element) => {};
|
|
116
|
-
static rebuild: () => {};
|
|
117
|
+
static show: (target: Element) => {};
|
|
118
|
+
static hide: (target?: Element) => {};
|
|
119
|
+
static rebuild: () => {};
|
|
117
120
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-tooltip",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "react tooltip component",
|
|
5
|
+
"private": false,
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"types": "dist/react-tooltip.d.ts",
|
|
7
8
|
"module": "dist/index.es.js",
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
"build:watch": "rollup -c -w",
|
|
23
24
|
"start": "npm-run-all clean build:watch",
|
|
24
25
|
"gh-pages": "gh-pages -d example",
|
|
25
|
-
"github-changes": "github-changes -o
|
|
26
|
+
"github-changes": "github-changes -o ReactTooltip -r react-tooltip -a --only-pulls --use-commit-body",
|
|
26
27
|
"copy:types": "cpy ./react-tooltip.d.ts ./dist --parents --dot",
|
|
27
28
|
"cm": "git cz",
|
|
28
29
|
"semantic-release": "semantic-release",
|
|
@@ -33,22 +34,19 @@
|
|
|
33
34
|
"path": "node_modules/cz-conventional-changelog"
|
|
34
35
|
}
|
|
35
36
|
},
|
|
36
|
-
"repository":
|
|
37
|
-
"type": "git",
|
|
38
|
-
"url": "https://github.com/wwayne/react-tooltip"
|
|
39
|
-
},
|
|
37
|
+
"repository": "https://github.com/ReactTooltip/react-tooltip",
|
|
40
38
|
"keywords": [
|
|
41
39
|
"react",
|
|
42
40
|
"react-component",
|
|
43
41
|
"tooltip",
|
|
44
42
|
"react-tooltip"
|
|
45
43
|
],
|
|
46
|
-
"author": "
|
|
44
|
+
"author": "ReactTooltip",
|
|
47
45
|
"license": "MIT",
|
|
48
46
|
"bugs": {
|
|
49
|
-
"url": "https://github.com/
|
|
47
|
+
"url": "https://github.com/ReactTooltip/react-tooltip/issues"
|
|
50
48
|
},
|
|
51
|
-
"homepage": "https://github.com/
|
|
49
|
+
"homepage": "https://github.com/ReactTooltip/react-tooltip#readme",
|
|
52
50
|
"browserify-shim": {
|
|
53
51
|
"react": "global:React",
|
|
54
52
|
"react-dom": "global:ReactDOM"
|
|
@@ -59,29 +57,33 @@
|
|
|
59
57
|
},
|
|
60
58
|
"dependencies": {
|
|
61
59
|
"prop-types": "^15.8.1",
|
|
62
|
-
"uuid": "
|
|
60
|
+
"uuid": "8.3.2"
|
|
63
61
|
},
|
|
64
62
|
"devDependencies": {
|
|
65
|
-
"@babel/cli": "
|
|
66
|
-
"@babel/core": "
|
|
67
|
-
"@babel/eslint-parser": "
|
|
63
|
+
"@babel/cli": "7.19.3",
|
|
64
|
+
"@babel/core": "7.19.3",
|
|
65
|
+
"@babel/eslint-parser": "7.19.1",
|
|
68
66
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
69
|
-
"@babel/plugin-proposal-decorators": "
|
|
70
|
-
"@babel/plugin-proposal-
|
|
67
|
+
"@babel/plugin-proposal-decorators": "7.19.3",
|
|
68
|
+
"@babel/plugin-proposal-json-strings": "^7.18.6",
|
|
69
|
+
"@babel/plugin-proposal-object-rest-spread": "7.19.4",
|
|
70
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
71
71
|
"@babel/plugin-syntax-import-meta": "^7.10.4",
|
|
72
|
+
"@babel/preset-env": "^7.19.4",
|
|
73
|
+
"@babel/preset-react": "^7.18.6",
|
|
72
74
|
"@babel/register": "^7.18.9",
|
|
73
|
-
"@commitlint/cli": "
|
|
74
|
-
"@commitlint/config-conventional": "
|
|
75
|
-
"@commitlint/travis-cli": "
|
|
76
|
-
"@rollup/plugin-commonjs": "
|
|
75
|
+
"@commitlint/cli": "17.1.2",
|
|
76
|
+
"@commitlint/config-conventional": "17.1.0",
|
|
77
|
+
"@commitlint/travis-cli": "17.1.2",
|
|
78
|
+
"@rollup/plugin-commonjs": "23.0.0",
|
|
77
79
|
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
78
80
|
"@semantic-release/changelog": "^6.0.1",
|
|
79
81
|
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
80
82
|
"@semantic-release/git": "^10.0.1",
|
|
81
83
|
"@semantic-release/npm": "^9.0.1",
|
|
82
84
|
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
83
|
-
"@svgr/rollup": "
|
|
84
|
-
"@testing-library/react": "
|
|
85
|
+
"@svgr/rollup": "6.4.0",
|
|
86
|
+
"@testing-library/react": "13.4.0",
|
|
85
87
|
"babel-loader": "8.2.5",
|
|
86
88
|
"babelify": "^10.0.0",
|
|
87
89
|
"browserify": "^17.0.0",
|
|
@@ -90,13 +92,13 @@
|
|
|
90
92
|
"chai-enzyme": "^1.0.0-beta.1",
|
|
91
93
|
"chai-spies": "^1.0.0",
|
|
92
94
|
"commitizen": "4.2.5",
|
|
93
|
-
"concurrently": "
|
|
94
|
-
"core-js": "
|
|
95
|
-
"cpy-cli": "
|
|
95
|
+
"concurrently": "7.4.0",
|
|
96
|
+
"core-js": "3.25.5",
|
|
97
|
+
"cpy-cli": "4.2.0",
|
|
96
98
|
"cz-conventional-changelog": "^3.3.0",
|
|
97
99
|
"enzyme": "^3.11.0",
|
|
98
100
|
"enzyme-adapter-react-16": "^1.15.6",
|
|
99
|
-
"eslint": "
|
|
101
|
+
"eslint": "8.25.0",
|
|
100
102
|
"eslint-config-jss": ">=5.0.1",
|
|
101
103
|
"eslint-config-prettier": ">=8.5.0",
|
|
102
104
|
"eslint-config-standard": "^17.0.0",
|
|
@@ -104,21 +106,21 @@
|
|
|
104
106
|
"eslint-plugin-import": ">=2.26.0",
|
|
105
107
|
"eslint-plugin-node": ">=11.1.0",
|
|
106
108
|
"eslint-plugin-prettier": "4.2.1",
|
|
107
|
-
"eslint-plugin-promise": "
|
|
108
|
-
"eslint-plugin-react": "
|
|
109
|
+
"eslint-plugin-promise": "6.1.0",
|
|
110
|
+
"eslint-plugin-react": "7.31.10",
|
|
109
111
|
"gh-pages": "4.0.0",
|
|
110
112
|
"github-changes": "^2.0.3",
|
|
111
113
|
"http-server": "^14.1.1",
|
|
112
114
|
"husky": "^8.0.0",
|
|
113
115
|
"ignore-styles": "5.0.1",
|
|
114
|
-
"jsdom": "
|
|
116
|
+
"jsdom": "20.0.1",
|
|
115
117
|
"lint-staged": "^13.0.3",
|
|
116
118
|
"mocha": "^10.0.0",
|
|
117
119
|
"mocha-each": "^2.0.1",
|
|
118
120
|
"mocha-jsdom": "^2.0.0",
|
|
119
121
|
"npm-run-all": "^4.1.5",
|
|
120
122
|
"postcss-nested": "^5.0.6",
|
|
121
|
-
"postcss-scss": "
|
|
123
|
+
"postcss-scss": "4.0.5",
|
|
122
124
|
"postcss-simple-vars": "^6.0.3",
|
|
123
125
|
"prettier": "2.7.1",
|
|
124
126
|
"pretty-quick": "^3.1.3",
|
|
@@ -131,14 +133,14 @@
|
|
|
131
133
|
"rollup-plugin-eslint": "7.0.0",
|
|
132
134
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
133
135
|
"rollup-plugin-postcss": "^4.0.2",
|
|
134
|
-
"rollup-plugin-sass": "
|
|
136
|
+
"rollup-plugin-sass": "1.12.16",
|
|
135
137
|
"rollup-plugin-stylelint": "1.0.0",
|
|
136
138
|
"rollup-plugin-url": "^3.0.1",
|
|
137
|
-
"sass": "
|
|
138
|
-
"semantic-release": "
|
|
139
|
+
"sass": "1.55.0",
|
|
140
|
+
"semantic-release": "19.0.5",
|
|
139
141
|
"snazzy": "^9.0.0",
|
|
140
142
|
"standard": "^17.0.0",
|
|
141
|
-
"stylelint": "14.
|
|
143
|
+
"stylelint": "14.13.0",
|
|
142
144
|
"stylelint-config-standard": "26.0.0",
|
|
143
145
|
"uglifyjs": "^2.4.10",
|
|
144
146
|
"watchify": "^4.0.0"
|