react-tooltip 4.3.1 → 4.4.2

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.
@@ -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
- ) => ({ left: number; top: number; });
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,6 +1,6 @@
1
1
  {
2
2
  "name": "react-tooltip",
3
- "version": "4.3.1",
3
+ "version": "4.4.2",
4
4
  "description": "react tooltip component",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "prop-types": "^15.8.1",
60
- "uuid": "9.0.0"
60
+ "uuid": "^7.0.3"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@babel/cli": "7.19.3",