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/dist/index.es.js CHANGED
@@ -4,17 +4,14 @@ import { v4 } from 'uuid';
4
4
 
5
5
  function ownKeys$2(object, enumerableOnly) {
6
6
  var keys = Object.keys(object);
7
-
8
7
  if (Object.getOwnPropertySymbols) {
9
8
  var symbols = Object.getOwnPropertySymbols(object);
10
9
  enumerableOnly && (symbols = symbols.filter(function (sym) {
11
10
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
12
11
  })), keys.push.apply(keys, symbols);
13
12
  }
14
-
15
13
  return keys;
16
14
  }
17
-
18
15
  function _objectSpread2(target) {
19
16
  for (var i = 1; i < arguments.length; i++) {
20
17
  var source = null != arguments[i] ? arguments[i] : {};
@@ -24,16 +21,13 @@ function _objectSpread2(target) {
24
21
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
25
22
  });
26
23
  }
27
-
28
24
  return target;
29
25
  }
30
-
31
26
  function _classCallCheck(instance, Constructor) {
32
27
  if (!(instance instanceof Constructor)) {
33
28
  throw new TypeError("Cannot call a class as a function");
34
29
  }
35
30
  }
36
-
37
31
  function _defineProperties(target, props) {
38
32
  for (var i = 0; i < props.length; i++) {
39
33
  var descriptor = props[i];
@@ -43,7 +37,6 @@ function _defineProperties(target, props) {
43
37
  Object.defineProperty(target, descriptor.key, descriptor);
44
38
  }
45
39
  }
46
-
47
40
  function _createClass(Constructor, protoProps, staticProps) {
48
41
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
49
42
  if (staticProps) _defineProperties(Constructor, staticProps);
@@ -52,7 +45,6 @@ function _createClass(Constructor, protoProps, staticProps) {
52
45
  });
53
46
  return Constructor;
54
47
  }
55
-
56
48
  function _defineProperty(obj, key, value) {
57
49
  if (key in obj) {
58
50
  Object.defineProperty(obj, key, {
@@ -64,32 +56,26 @@ function _defineProperty(obj, key, value) {
64
56
  } else {
65
57
  obj[key] = value;
66
58
  }
67
-
68
59
  return obj;
69
60
  }
70
-
71
61
  function _extends() {
72
62
  _extends = Object.assign ? Object.assign.bind() : function (target) {
73
63
  for (var i = 1; i < arguments.length; i++) {
74
64
  var source = arguments[i];
75
-
76
65
  for (var key in source) {
77
66
  if (Object.prototype.hasOwnProperty.call(source, key)) {
78
67
  target[key] = source[key];
79
68
  }
80
69
  }
81
70
  }
82
-
83
71
  return target;
84
72
  };
85
73
  return _extends.apply(this, arguments);
86
74
  }
87
-
88
75
  function _inherits(subClass, superClass) {
89
76
  if (typeof superClass !== "function" && superClass !== null) {
90
77
  throw new TypeError("Super expression must either be null or a function");
91
78
  }
92
-
93
79
  subClass.prototype = Object.create(superClass && superClass.prototype, {
94
80
  constructor: {
95
81
  value: subClass,
@@ -102,14 +88,12 @@ function _inherits(subClass, superClass) {
102
88
  });
103
89
  if (superClass) _setPrototypeOf(subClass, superClass);
104
90
  }
105
-
106
91
  function _getPrototypeOf(o) {
107
92
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
108
93
  return o.__proto__ || Object.getPrototypeOf(o);
109
94
  };
110
95
  return _getPrototypeOf(o);
111
96
  }
112
-
113
97
  function _setPrototypeOf(o, p) {
114
98
  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
115
99
  o.__proto__ = p;
@@ -117,12 +101,10 @@ function _setPrototypeOf(o, p) {
117
101
  };
118
102
  return _setPrototypeOf(o, p);
119
103
  }
120
-
121
104
  function _isNativeReflectConstruct() {
122
105
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
123
106
  if (Reflect.construct.sham) return false;
124
107
  if (typeof Proxy === "function") return true;
125
-
126
108
  try {
127
109
  Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
128
110
  return true;
@@ -130,44 +112,34 @@ function _isNativeReflectConstruct() {
130
112
  return false;
131
113
  }
132
114
  }
133
-
134
115
  function _assertThisInitialized(self) {
135
116
  if (self === void 0) {
136
117
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
137
118
  }
138
-
139
119
  return self;
140
120
  }
141
-
142
121
  function _possibleConstructorReturn(self, call) {
143
122
  if (call && (typeof call === "object" || typeof call === "function")) {
144
123
  return call;
145
124
  } else if (call !== void 0) {
146
125
  throw new TypeError("Derived constructors may only return object or undefined");
147
126
  }
148
-
149
127
  return _assertThisInitialized(self);
150
128
  }
151
-
152
129
  function _createSuper(Derived) {
153
130
  var hasNativeReflectConstruct = _isNativeReflectConstruct();
154
-
155
131
  return function _createSuperInternal() {
156
132
  var Super = _getPrototypeOf(Derived),
157
- result;
158
-
133
+ result;
159
134
  if (hasNativeReflectConstruct) {
160
135
  var NewTarget = _getPrototypeOf(this).constructor;
161
-
162
136
  result = Reflect.construct(Super, arguments, NewTarget);
163
137
  } else {
164
138
  result = Super.apply(this, arguments);
165
139
  }
166
-
167
140
  return _possibleConstructorReturn(this, result);
168
141
  };
169
142
  }
170
-
171
143
  function _unsupportedIterableToArray(o, minLen) {
172
144
  if (!o) return;
173
145
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -176,25 +148,18 @@ function _unsupportedIterableToArray(o, minLen) {
176
148
  if (n === "Map" || n === "Set") return Array.from(o);
177
149
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
178
150
  }
179
-
180
151
  function _arrayLikeToArray(arr, len) {
181
152
  if (len == null || len > arr.length) len = arr.length;
182
-
183
153
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
184
-
185
154
  return arr2;
186
155
  }
187
-
188
156
  function _createForOfIteratorHelper(o, allowArrayLike) {
189
157
  var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
190
-
191
158
  if (!it) {
192
159
  if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
193
160
  if (it) o = it;
194
161
  var i = 0;
195
-
196
162
  var F = function () {};
197
-
198
163
  return {
199
164
  s: F,
200
165
  n: function () {
@@ -212,13 +177,11 @@ function _createForOfIteratorHelper(o, allowArrayLike) {
212
177
  f: F
213
178
  };
214
179
  }
215
-
216
180
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
217
181
  }
218
-
219
182
  var normalCompletion = true,
220
- didErr = false,
221
- err;
183
+ didErr = false,
184
+ err;
222
185
  return {
223
186
  s: function () {
224
187
  it = it.call(o);
@@ -250,7 +213,7 @@ var check = function (it) {
250
213
 
251
214
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
252
215
  var global$a =
253
- // eslint-disable-next-line es-x/no-global-this -- safe
216
+ // eslint-disable-next-line es/no-global-this -- safe
254
217
  check(typeof globalThis == 'object' && globalThis) ||
255
218
  check(typeof window == 'object' && window) ||
256
219
  // eslint-disable-next-line no-restricted-globals -- safe
@@ -273,14 +236,14 @@ var fails$8 = fails$9;
273
236
 
274
237
  // Detect IE8's incomplete defineProperty implementation
275
238
  var descriptors = !fails$8(function () {
276
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
239
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
277
240
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
278
241
  });
279
242
 
280
243
  var fails$7 = fails$9;
281
244
 
282
245
  var functionBindNative = !fails$7(function () {
283
- // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
246
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
284
247
  var test = (function () { /* empty */ }).bind();
285
248
  // eslint-disable-next-line no-prototype-builtins -- safe
286
249
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -297,7 +260,7 @@ var functionCall = NATIVE_BIND$2 ? call$4.bind(call$4) : function () {
297
260
  var objectPropertyIsEnumerable = {};
298
261
 
299
262
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
300
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
263
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
301
264
  var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
302
265
 
303
266
  // Nashorn ~ JDK8 bug
@@ -322,33 +285,40 @@ var createPropertyDescriptor$2 = function (bitmap, value) {
322
285
  var NATIVE_BIND$1 = functionBindNative;
323
286
 
324
287
  var FunctionPrototype$1 = Function.prototype;
325
- var bind$2 = FunctionPrototype$1.bind;
326
288
  var call$3 = FunctionPrototype$1.call;
327
- var uncurryThis$c = NATIVE_BIND$1 && bind$2.bind(call$3, call$3);
289
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$3, call$3);
328
290
 
329
- var functionUncurryThis = NATIVE_BIND$1 ? function (fn) {
330
- return fn && uncurryThis$c(fn);
331
- } : function (fn) {
332
- return fn && function () {
291
+ var functionUncurryThisRaw = function (fn) {
292
+ return NATIVE_BIND$1 ? uncurryThisWithBind(fn) : function () {
333
293
  return call$3.apply(fn, arguments);
334
294
  };
335
295
  };
336
296
 
337
- var uncurryThis$b = functionUncurryThis;
297
+ var uncurryThisRaw$1 = functionUncurryThisRaw;
338
298
 
339
- var toString$1 = uncurryThis$b({}.toString);
340
- var stringSlice = uncurryThis$b(''.slice);
299
+ var toString$1 = uncurryThisRaw$1({}.toString);
300
+ var stringSlice = uncurryThisRaw$1(''.slice);
341
301
 
342
- var classofRaw$1 = function (it) {
302
+ var classofRaw$2 = function (it) {
343
303
  return stringSlice(toString$1(it), 8, -1);
344
304
  };
345
305
 
346
- var uncurryThis$a = functionUncurryThis;
306
+ var classofRaw$1 = classofRaw$2;
307
+ var uncurryThisRaw = functionUncurryThisRaw;
308
+
309
+ var functionUncurryThis = function (fn) {
310
+ // Nashorn bug:
311
+ // https://github.com/zloirock/core-js/issues/1128
312
+ // https://github.com/zloirock/core-js/issues/1130
313
+ if (classofRaw$1(fn) === 'Function') return uncurryThisRaw(fn);
314
+ };
315
+
316
+ var uncurryThis$9 = functionUncurryThis;
347
317
  var fails$6 = fails$9;
348
- var classof$3 = classofRaw$1;
318
+ var classof$3 = classofRaw$2;
349
319
 
350
320
  var $Object$3 = Object;
351
- var split = uncurryThis$a(''.split);
321
+ var split = uncurryThis$9(''.split);
352
322
 
353
323
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
354
324
  var indexedObject = fails$6(function () {
@@ -359,12 +329,20 @@ var indexedObject = fails$6(function () {
359
329
  return classof$3(it) == 'String' ? split(it, '') : $Object$3(it);
360
330
  } : $Object$3;
361
331
 
332
+ // we can't use just `it == null` since of `document.all` special case
333
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
334
+ var isNullOrUndefined$2 = function (it) {
335
+ return it === null || it === undefined;
336
+ };
337
+
338
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
339
+
362
340
  var $TypeError$5 = TypeError;
363
341
 
364
342
  // `RequireObjectCoercible` abstract operation
365
343
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
366
344
  var requireObjectCoercible$2 = function (it) {
367
- if (it == undefined) throw $TypeError$5("Can't call method on " + it);
345
+ if (isNullOrUndefined$1(it)) throw $TypeError$5("Can't call method on " + it);
368
346
  return it;
369
347
  };
370
348
 
@@ -376,15 +354,36 @@ var toIndexedObject$4 = function (it) {
376
354
  return IndexedObject$1(requireObjectCoercible$1(it));
377
355
  };
378
356
 
357
+ var documentAll$2 = typeof document == 'object' && document.all;
358
+
359
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
360
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
361
+
362
+ var documentAll_1 = {
363
+ all: documentAll$2,
364
+ IS_HTMLDDA: IS_HTMLDDA
365
+ };
366
+
367
+ var $documentAll$1 = documentAll_1;
368
+
369
+ var documentAll$1 = $documentAll$1.all;
370
+
379
371
  // `IsCallable` abstract operation
380
372
  // https://tc39.es/ecma262/#sec-iscallable
381
- var isCallable$c = function (argument) {
373
+ var isCallable$c = $documentAll$1.IS_HTMLDDA ? function (argument) {
374
+ return typeof argument == 'function' || argument === documentAll$1;
375
+ } : function (argument) {
382
376
  return typeof argument == 'function';
383
377
  };
384
378
 
385
379
  var isCallable$b = isCallable$c;
380
+ var $documentAll = documentAll_1;
381
+
382
+ var documentAll = $documentAll.all;
386
383
 
387
- var isObject$6 = function (it) {
384
+ var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
385
+ return typeof it == 'object' ? it !== null : isCallable$b(it) || it === documentAll;
386
+ } : function (it) {
388
387
  return typeof it == 'object' ? it !== null : isCallable$b(it);
389
388
  };
390
389
 
@@ -399,9 +398,9 @@ var getBuiltIn$5 = function (namespace, method) {
399
398
  return arguments.length < 2 ? aFunction(global$9[namespace]) : global$9[namespace] && global$9[namespace][method];
400
399
  };
401
400
 
402
- var uncurryThis$9 = functionUncurryThis;
401
+ var uncurryThis$8 = functionUncurryThis;
403
402
 
404
- var objectIsPrototypeOf = uncurryThis$9({}.isPrototypeOf);
403
+ var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
405
404
 
406
405
  var getBuiltIn$4 = getBuiltIn$5;
407
406
 
@@ -435,13 +434,13 @@ if (!version && userAgent) {
435
434
 
436
435
  var engineV8Version = version;
437
436
 
438
- /* eslint-disable es-x/no-symbol -- required for testing */
437
+ /* eslint-disable es/no-symbol -- required for testing */
439
438
 
440
439
  var V8_VERSION = engineV8Version;
441
440
  var fails$5 = fails$9;
442
441
 
443
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
444
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$5(function () {
442
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
443
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
445
444
  var symbol = Symbol();
446
445
  // Chrome 38 Symbol has incorrect toString conversion
447
446
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -450,9 +449,9 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$5(function () {
450
449
  !Symbol.sham && V8_VERSION && V8_VERSION < 41;
451
450
  });
452
451
 
453
- /* eslint-disable es-x/no-symbol -- required for testing */
452
+ /* eslint-disable es/no-symbol -- required for testing */
454
453
 
455
- var NATIVE_SYMBOL$1 = nativeSymbol;
454
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
456
455
 
457
456
  var useSymbolAsUid = NATIVE_SYMBOL$1
458
457
  && !Symbol.sham
@@ -494,12 +493,13 @@ var aCallable$2 = function (argument) {
494
493
  };
495
494
 
496
495
  var aCallable$1 = aCallable$2;
496
+ var isNullOrUndefined = isNullOrUndefined$2;
497
497
 
498
498
  // `GetMethod` abstract operation
499
499
  // https://tc39.es/ecma262/#sec-getmethod
500
500
  var getMethod$1 = function (V, P) {
501
501
  var func = V[P];
502
- return func == null ? undefined : aCallable$1(func);
502
+ return isNullOrUndefined(func) ? undefined : aCallable$1(func);
503
503
  };
504
504
 
505
505
  var call$2 = functionCall;
@@ -522,7 +522,7 @@ var shared$3 = {exports: {}};
522
522
 
523
523
  var global$7 = global$a;
524
524
 
525
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
525
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
526
526
  var defineProperty$2 = Object.defineProperty;
527
527
 
528
528
  var defineGlobalProperty$3 = function (key, value) {
@@ -546,10 +546,10 @@ var store$2 = sharedStore;
546
546
  (shared$3.exports = function (key, value) {
547
547
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
548
548
  })('versions', []).push({
549
- version: '3.24.1',
549
+ version: '3.25.5',
550
550
  mode: 'global',
551
551
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
552
- license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
552
+ license: 'https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE',
553
553
  source: 'https://github.com/zloirock/core-js'
554
554
  });
555
555
 
@@ -563,23 +563,23 @@ var toObject$2 = function (argument) {
563
563
  return $Object$1(requireObjectCoercible(argument));
564
564
  };
565
565
 
566
- var uncurryThis$8 = functionUncurryThis;
566
+ var uncurryThis$7 = functionUncurryThis;
567
567
  var toObject$1 = toObject$2;
568
568
 
569
- var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
569
+ var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
570
570
 
571
571
  // `HasOwnProperty` abstract operation
572
572
  // https://tc39.es/ecma262/#sec-hasownproperty
573
- // eslint-disable-next-line es-x/no-object-hasown -- safe
573
+ // eslint-disable-next-line es/no-object-hasown -- safe
574
574
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
575
575
  return hasOwnProperty(toObject$1(it), key);
576
576
  };
577
577
 
578
- var uncurryThis$7 = functionUncurryThis;
578
+ var uncurryThis$6 = functionUncurryThis;
579
579
 
580
580
  var id = 0;
581
581
  var postfix = Math.random();
582
- var toString = uncurryThis$7(1.0.toString);
582
+ var toString = uncurryThis$6(1.0.toString);
583
583
 
584
584
  var uid$2 = function (key) {
585
585
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
@@ -589,7 +589,7 @@ var global$5 = global$a;
589
589
  var shared$2 = shared$3.exports;
590
590
  var hasOwn$6 = hasOwnProperty_1;
591
591
  var uid$1 = uid$2;
592
- var NATIVE_SYMBOL = nativeSymbol;
592
+ var NATIVE_SYMBOL = symbolConstructorDetection;
593
593
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
594
594
 
595
595
  var WellKnownSymbolsStore = shared$2('wks');
@@ -663,7 +663,7 @@ var createElement = documentCreateElement$1;
663
663
 
664
664
  // Thanks to IE8 for its funny defineProperty
665
665
  var ie8DomDefine = !DESCRIPTORS$7 && !fails$4(function () {
666
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
666
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
667
667
  return Object.defineProperty(createElement('div'), 'a', {
668
668
  get: function () { return 7; }
669
669
  }).a != 7;
@@ -678,7 +678,7 @@ var toPropertyKey$1 = toPropertyKey$2;
678
678
  var hasOwn$5 = hasOwnProperty_1;
679
679
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
680
680
 
681
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
681
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
682
682
  var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
683
683
 
684
684
  // `Object.getOwnPropertyDescriptor` method
@@ -700,7 +700,7 @@ var fails$3 = fails$9;
700
700
  // V8 ~ Chrome 36-
701
701
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
702
702
  var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
703
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
703
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
704
704
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
705
705
  value: 42,
706
706
  writable: false
@@ -725,9 +725,9 @@ var anObject$3 = anObject$4;
725
725
  var toPropertyKey = toPropertyKey$2;
726
726
 
727
727
  var $TypeError = TypeError;
728
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
728
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
729
729
  var $defineProperty = Object.defineProperty;
730
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
730
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
731
731
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
732
732
  var ENUMERABLE = 'enumerable';
733
733
  var CONFIGURABLE$1 = 'configurable';
@@ -779,7 +779,7 @@ var DESCRIPTORS$2 = descriptors;
779
779
  var hasOwn$4 = hasOwnProperty_1;
780
780
 
781
781
  var FunctionPrototype = Function.prototype;
782
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
782
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
783
783
  var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
784
784
 
785
785
  var EXISTS = hasOwn$4(FunctionPrototype, 'name');
@@ -793,11 +793,11 @@ var functionName = {
793
793
  CONFIGURABLE: CONFIGURABLE
794
794
  };
795
795
 
796
- var uncurryThis$6 = functionUncurryThis;
796
+ var uncurryThis$5 = functionUncurryThis;
797
797
  var isCallable$6 = isCallable$c;
798
798
  var store$1 = sharedStore;
799
799
 
800
- var functionToString = uncurryThis$6(Function.toString);
800
+ var functionToString = uncurryThis$5(Function.toString);
801
801
 
802
802
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
803
803
  if (!isCallable$6(store$1.inspectSource)) {
@@ -806,15 +806,14 @@ if (!isCallable$6(store$1.inspectSource)) {
806
806
  };
807
807
  }
808
808
 
809
- var inspectSource$3 = store$1.inspectSource;
809
+ var inspectSource$2 = store$1.inspectSource;
810
810
 
811
811
  var global$3 = global$a;
812
812
  var isCallable$5 = isCallable$c;
813
- var inspectSource$2 = inspectSource$3;
814
813
 
815
814
  var WeakMap$1 = global$3.WeakMap;
816
815
 
817
- var nativeWeakMap = isCallable$5(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
816
+ var weakMapBasicDetection = isCallable$5(WeakMap$1) && /native code/.test(String(WeakMap$1));
818
817
 
819
818
  var shared$1 = shared$3.exports;
820
819
  var uid = uid$2;
@@ -827,9 +826,8 @@ var sharedKey$2 = function (key) {
827
826
 
828
827
  var hiddenKeys$4 = {};
829
828
 
830
- var NATIVE_WEAK_MAP = nativeWeakMap;
829
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
831
830
  var global$2 = global$a;
832
- var uncurryThis$5 = functionUncurryThis;
833
831
  var isObject$1 = isObject$6;
834
832
  var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
835
833
  var hasOwn$3 = hasOwnProperty_1;
@@ -857,26 +855,28 @@ var getterFor = function (TYPE) {
857
855
 
858
856
  if (NATIVE_WEAK_MAP || shared.state) {
859
857
  var store = shared.state || (shared.state = new WeakMap());
860
- var wmget = uncurryThis$5(store.get);
861
- var wmhas = uncurryThis$5(store.has);
862
- var wmset = uncurryThis$5(store.set);
858
+ /* eslint-disable no-self-assign -- prototype methods protection */
859
+ store.get = store.get;
860
+ store.has = store.has;
861
+ store.set = store.set;
862
+ /* eslint-enable no-self-assign -- prototype methods protection */
863
863
  set = function (it, metadata) {
864
- if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
864
+ if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
865
865
  metadata.facade = it;
866
- wmset(store, it, metadata);
866
+ store.set(it, metadata);
867
867
  return metadata;
868
868
  };
869
869
  get = function (it) {
870
- return wmget(store, it) || {};
870
+ return store.get(it) || {};
871
871
  };
872
872
  has = function (it) {
873
- return wmhas(store, it);
873
+ return store.has(it);
874
874
  };
875
875
  } else {
876
876
  var STATE = sharedKey$1('state');
877
877
  hiddenKeys$3[STATE] = true;
878
878
  set = function (it, metadata) {
879
- if (hasOwn$3(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
879
+ if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
880
880
  metadata.facade = it;
881
881
  createNonEnumerableProperty$1(it, STATE, metadata);
882
882
  return metadata;
@@ -902,12 +902,12 @@ var isCallable$4 = isCallable$c;
902
902
  var hasOwn$2 = hasOwnProperty_1;
903
903
  var DESCRIPTORS$1 = descriptors;
904
904
  var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
905
- var inspectSource$1 = inspectSource$3;
905
+ var inspectSource$1 = inspectSource$2;
906
906
  var InternalStateModule = internalState;
907
907
 
908
908
  var enforceInternalState = InternalStateModule.enforce;
909
909
  var getInternalState = InternalStateModule.get;
910
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
910
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
911
911
  var defineProperty$1 = Object.defineProperty;
912
912
 
913
913
  var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$2(function () {
@@ -982,7 +982,7 @@ var floor = Math.floor;
982
982
 
983
983
  // `Math.trunc` method
984
984
  // https://tc39.es/ecma262/#sec-math.trunc
985
- // eslint-disable-next-line es-x/no-math-trunc -- safe
985
+ // eslint-disable-next-line es/no-math-trunc -- safe
986
986
  var mathTrunc = Math.trunc || function trunc(x) {
987
987
  var n = +x;
988
988
  return (n > 0 ? floor : ceil)(n);
@@ -1101,14 +1101,14 @@ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
1101
1101
 
1102
1102
  // `Object.getOwnPropertyNames` method
1103
1103
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
1104
- // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
1104
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1105
1105
  objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1106
1106
  return internalObjectKeys$1(O, hiddenKeys$1);
1107
1107
  };
1108
1108
 
1109
1109
  var objectGetOwnPropertySymbols = {};
1110
1110
 
1111
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
1111
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1112
1112
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1113
1113
 
1114
1114
  var getBuiltIn$2 = getBuiltIn$5;
@@ -1235,11 +1235,11 @@ var functionBindContext = function (fn, that) {
1235
1235
  };
1236
1236
  };
1237
1237
 
1238
- var classof$2 = classofRaw$1;
1238
+ var classof$2 = classofRaw$2;
1239
1239
 
1240
1240
  // `IsArray` abstract operation
1241
1241
  // https://tc39.es/ecma262/#sec-isarray
1242
- // eslint-disable-next-line es-x/no-array-isarray -- safe
1242
+ // eslint-disable-next-line es/no-array-isarray -- safe
1243
1243
  var isArray$1 = Array.isArray || function isArray(argument) {
1244
1244
  return classof$2(argument) == 'Array';
1245
1245
  };
@@ -1255,7 +1255,7 @@ var toStringTagSupport = String(test) === '[object z]';
1255
1255
 
1256
1256
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1257
1257
  var isCallable$1 = isCallable$c;
1258
- var classofRaw = classofRaw$1;
1258
+ var classofRaw = classofRaw$2;
1259
1259
  var wellKnownSymbol$2 = wellKnownSymbol$5;
1260
1260
 
1261
1261
  var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
@@ -1288,7 +1288,7 @@ var fails = fails$9;
1288
1288
  var isCallable = isCallable$c;
1289
1289
  var classof = classof$1;
1290
1290
  var getBuiltIn$1 = getBuiltIn$5;
1291
- var inspectSource = inspectSource$3;
1291
+ var inspectSource = inspectSource$2;
1292
1292
 
1293
1293
  var noop = function () { /* empty */ };
1294
1294
  var empty = [];
@@ -1448,7 +1448,7 @@ var enumBugKeys$1 = enumBugKeys$3;
1448
1448
 
1449
1449
  // `Object.keys` method
1450
1450
  // https://tc39.es/ecma262/#sec-object.keys
1451
- // eslint-disable-next-line es-x/no-object-keys -- safe
1451
+ // eslint-disable-next-line es/no-object-keys -- safe
1452
1452
  var objectKeys$1 = Object.keys || function keys(O) {
1453
1453
  return internalObjectKeys(O, enumBugKeys$1);
1454
1454
  };
@@ -1462,7 +1462,7 @@ var objectKeys = objectKeys$1;
1462
1462
 
1463
1463
  // `Object.defineProperties` method
1464
1464
  // https://tc39.es/ecma262/#sec-object.defineproperties
1465
- // eslint-disable-next-line es-x/no-object-defineproperties -- safe
1465
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1466
1466
  objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1467
1467
  anObject$1(O);
1468
1468
  var props = toIndexedObject(Properties);
@@ -1550,7 +1550,7 @@ hiddenKeys[IE_PROTO] = true;
1550
1550
 
1551
1551
  // `Object.create` method
1552
1552
  // https://tc39.es/ecma262/#sec-object.create
1553
- // eslint-disable-next-line es-x/no-object-create -- safe
1553
+ // eslint-disable-next-line es/no-object-create -- safe
1554
1554
  var objectCreate = Object.create || function create(O, Properties) {
1555
1555
  var result;
1556
1556
  if (O !== null) {
@@ -1616,13 +1616,11 @@ var CONSTANT = {
1616
1616
  /**
1617
1617
  * Static methods for react-tooltip
1618
1618
  */
1619
-
1620
1619
  var dispatchGlobalEvent = function dispatchGlobalEvent(eventName, opts) {
1621
1620
  // Compatible with IE
1622
1621
  // @see http://stackoverflow.com/questions/26596123/internet-explorer-9-10-11-event-constructor-doesnt-work
1623
1622
  // @see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
1624
1623
  var event;
1625
-
1626
1624
  if (typeof window.CustomEvent === 'function') {
1627
1625
  event = new window.CustomEvent(eventName, {
1628
1626
  detail: opts
@@ -1631,10 +1629,8 @@ var dispatchGlobalEvent = function dispatchGlobalEvent(eventName, opts) {
1631
1629
  event = document.createEvent('Event');
1632
1630
  event.initEvent(eventName, false, true, opts);
1633
1631
  }
1634
-
1635
1632
  window.dispatchEvent(event);
1636
1633
  };
1637
-
1638
1634
  function staticMethods (target) {
1639
1635
  /**
1640
1636
  * Hide all tooltip
@@ -1645,45 +1641,40 @@ function staticMethods (target) {
1645
1641
  target: target
1646
1642
  });
1647
1643
  };
1644
+
1648
1645
  /**
1649
1646
  * Rebuild all tooltip
1650
1647
  * @trigger ReactTooltip.rebuild()
1651
1648
  */
1652
-
1653
-
1654
1649
  target.rebuild = function () {
1655
1650
  dispatchGlobalEvent(CONSTANT.GLOBAL.REBUILD);
1656
1651
  };
1652
+
1657
1653
  /**
1658
1654
  * Show specific tooltip
1659
1655
  * @trigger ReactTooltip.show()
1660
1656
  */
1661
-
1662
-
1663
1657
  target.show = function (target) {
1664
1658
  dispatchGlobalEvent(CONSTANT.GLOBAL.SHOW, {
1665
1659
  target: target
1666
1660
  });
1667
1661
  };
1668
-
1669
1662
  target.prototype.globalRebuild = function () {
1670
1663
  if (this.mount) {
1671
1664
  this.unbindListener();
1672
1665
  this.bindListener();
1673
1666
  }
1674
1667
  };
1675
-
1676
1668
  target.prototype.globalShow = function (event) {
1677
1669
  if (this.mount) {
1678
- var hasTarget = event && event.detail && event.detail.target && true || false; // Create a fake event, specific show will limit the type to `solid`
1670
+ var hasTarget = event && event.detail && event.detail.target && true || false;
1671
+ // Create a fake event, specific show will limit the type to `solid`
1679
1672
  // only `float` type cares e.clientX e.clientY
1680
-
1681
1673
  this.showTooltip({
1682
1674
  currentTarget: hasTarget && event.detail.target
1683
1675
  }, true);
1684
1676
  }
1685
1677
  };
1686
-
1687
1678
  target.prototype.globalHide = function (event) {
1688
1679
  if (this.mount) {
1689
1680
  var hasTarget = event && event.detail && event.detail.target && true || false;
@@ -1701,31 +1692,32 @@ function windowListener (target) {
1701
1692
  target.prototype.bindWindowEvents = function (resizeHide) {
1702
1693
  // ReactTooltip.hide
1703
1694
  window.removeEventListener(CONSTANT.GLOBAL.HIDE, this.globalHide);
1704
- window.addEventListener(CONSTANT.GLOBAL.HIDE, this.globalHide, false); // ReactTooltip.rebuild
1695
+ window.addEventListener(CONSTANT.GLOBAL.HIDE, this.globalHide, false);
1705
1696
 
1697
+ // ReactTooltip.rebuild
1706
1698
  window.removeEventListener(CONSTANT.GLOBAL.REBUILD, this.globalRebuild);
1707
- window.addEventListener(CONSTANT.GLOBAL.REBUILD, this.globalRebuild, false); // ReactTooltip.show
1699
+ window.addEventListener(CONSTANT.GLOBAL.REBUILD, this.globalRebuild, false);
1708
1700
 
1701
+ // ReactTooltip.show
1709
1702
  window.removeEventListener(CONSTANT.GLOBAL.SHOW, this.globalShow);
1710
- window.addEventListener(CONSTANT.GLOBAL.SHOW, this.globalShow, false); // Resize
1703
+ window.addEventListener(CONSTANT.GLOBAL.SHOW, this.globalShow, false);
1711
1704
 
1705
+ // Resize
1712
1706
  if (resizeHide) {
1713
1707
  window.removeEventListener('resize', this.onWindowResize);
1714
1708
  window.addEventListener('resize', this.onWindowResize, false);
1715
1709
  }
1716
1710
  };
1717
-
1718
1711
  target.prototype.unbindWindowEvents = function () {
1719
1712
  window.removeEventListener(CONSTANT.GLOBAL.HIDE, this.globalHide);
1720
1713
  window.removeEventListener(CONSTANT.GLOBAL.REBUILD, this.globalRebuild);
1721
1714
  window.removeEventListener(CONSTANT.GLOBAL.SHOW, this.globalShow);
1722
1715
  window.removeEventListener('resize', this.onWindowResize);
1723
1716
  };
1717
+
1724
1718
  /**
1725
1719
  * invoked by resize event of window
1726
1720
  */
1727
-
1728
-
1729
1721
  target.prototype.onWindowResize = function () {
1730
1722
  if (!this.mount) return;
1731
1723
  this.hideTooltip();
@@ -1739,13 +1731,13 @@ function windowListener (target) {
1739
1731
  * - `event` {String}
1740
1732
  * - `eventOff` {String}
1741
1733
  */
1734
+
1742
1735
  var checkStatus = function checkStatus(dataEventOff, e) {
1743
1736
  var show = this.state.show;
1744
1737
  var id = this.props.id;
1745
1738
  var isCapture = this.isCapture(e.currentTarget);
1746
1739
  var currentItem = e.currentTarget.getAttribute('currentItem');
1747
1740
  if (!isCapture) e.stopPropagation();
1748
-
1749
1741
  if (show && currentItem === 'true') {
1750
1742
  if (!dataEventOff) this.hideTooltip(e);
1751
1743
  } else {
@@ -1754,7 +1746,6 @@ var checkStatus = function checkStatus(dataEventOff, e) {
1754
1746
  this.showTooltip(e);
1755
1747
  }
1756
1748
  };
1757
-
1758
1749
  var setUntargetItems = function setUntargetItems(currentTarget, targetArray) {
1759
1750
  for (var i = 0; i < targetArray.length; i++) {
1760
1751
  if (currentTarget !== targetArray[i]) {
@@ -1764,7 +1755,6 @@ var setUntargetItems = function setUntargetItems(currentTarget, targetArray) {
1764
1755
  }
1765
1756
  }
1766
1757
  };
1767
-
1768
1758
  var customListeners = {
1769
1759
  id: '9b69f92e-d3fe-498b-b1b4-c5e63a51b0cf',
1770
1760
  set: function set(target, event, listener) {
@@ -1781,7 +1771,6 @@ var customListeners = {
1781
1771
  },
1782
1772
  get: function get(target, event) {
1783
1773
  var map = target[this.id];
1784
-
1785
1774
  if (map !== undefined) {
1786
1775
  return map[event];
1787
1776
  }
@@ -1792,15 +1781,13 @@ function customEvent (target) {
1792
1781
  var event = this.state.event;
1793
1782
  return event || !!ele.getAttribute('data-event');
1794
1783
  };
1795
- /* Bind listener for custom event */
1796
-
1797
1784
 
1785
+ /* Bind listener for custom event */
1798
1786
  target.prototype.customBindListener = function (ele) {
1799
1787
  var _this = this;
1800
-
1801
1788
  var _this$state = this.state,
1802
- event = _this$state.event,
1803
- eventOff = _this$state.eventOff;
1789
+ event = _this$state.event,
1790
+ eventOff = _this$state.eventOff;
1804
1791
  var dataEvent = ele.getAttribute('data-event') || event;
1805
1792
  var dataEventOff = ele.getAttribute('data-event-off') || eventOff;
1806
1793
  dataEvent.split(' ').forEach(function (event) {
@@ -1809,7 +1796,6 @@ function customEvent (target) {
1809
1796
  customListeners.set(ele, event, customListener);
1810
1797
  ele.addEventListener(event, customListener, false);
1811
1798
  });
1812
-
1813
1799
  if (dataEventOff) {
1814
1800
  dataEventOff.split(' ').forEach(function (event) {
1815
1801
  ele.removeEventListener(event, _this.hideTooltip);
@@ -1817,13 +1803,12 @@ function customEvent (target) {
1817
1803
  });
1818
1804
  }
1819
1805
  };
1820
- /* Unbind listener for custom event */
1821
-
1822
1806
 
1807
+ /* Unbind listener for custom event */
1823
1808
  target.prototype.customUnbindListener = function (ele) {
1824
1809
  var _this$state2 = this.state,
1825
- event = _this$state2.event,
1826
- eventOff = _this$state2.eventOff;
1810
+ event = _this$state2.event,
1811
+ eventOff = _this$state2.eventOff;
1827
1812
  var dataEvent = event || ele.getAttribute('data-event');
1828
1813
  var dataEventOff = eventOff || ele.getAttribute('data-event-off');
1829
1814
  ele.removeEventListener(dataEvent, customListeners.get(ele, event));
@@ -1834,6 +1819,7 @@ function customEvent (target) {
1834
1819
  /**
1835
1820
  * Util method to judge if it should follow capture model
1836
1821
  */
1822
+
1837
1823
  function isCapture (target) {
1838
1824
  target.prototype.isCapture = function (currentTarget) {
1839
1825
  return currentTarget && currentTarget.getAttribute('data-iscapture') === 'true' || this.props.isCapture || false;
@@ -1843,6 +1829,7 @@ function isCapture (target) {
1843
1829
  /**
1844
1830
  * Util method to get effect
1845
1831
  */
1832
+
1846
1833
  function getEffect (target) {
1847
1834
  target.prototype.getEffect = function (currentTarget) {
1848
1835
  var dataEffect = currentTarget.getAttribute('data-effect');
@@ -1853,10 +1840,8 @@ function getEffect (target) {
1853
1840
  /**
1854
1841
  * Util method to get effect
1855
1842
  */
1856
-
1857
1843
  var makeProxy = function makeProxy(e) {
1858
1844
  var proxy = {};
1859
-
1860
1845
  for (var key in e) {
1861
1846
  if (typeof e[key] === 'function') {
1862
1847
  proxy[key] = e[key].bind(e);
@@ -1864,44 +1849,37 @@ var makeProxy = function makeProxy(e) {
1864
1849
  proxy[key] = e[key];
1865
1850
  }
1866
1851
  }
1867
-
1868
1852
  return proxy;
1869
1853
  };
1870
-
1871
1854
  var bodyListener = function bodyListener(callback, options, e) {
1872
1855
  var _options$respectEffec = options.respectEffect,
1873
- respectEffect = _options$respectEffec === void 0 ? false : _options$respectEffec,
1874
- _options$customEvent = options.customEvent,
1875
- customEvent = _options$customEvent === void 0 ? false : _options$customEvent;
1856
+ respectEffect = _options$respectEffec === void 0 ? false : _options$respectEffec,
1857
+ _options$customEvent = options.customEvent,
1858
+ customEvent = _options$customEvent === void 0 ? false : _options$customEvent;
1876
1859
  var id = this.props.id;
1877
1860
  var tip = null;
1878
1861
  var forId;
1879
1862
  var target = e.target;
1880
- var lastTarget; // walk up parent chain until tip is found
1863
+ var lastTarget;
1864
+ // walk up parent chain until tip is found
1881
1865
  // there is no match if parent visible area is matched by mouse position, so some corner cases might not work as expected
1882
-
1883
1866
  while (tip === null && target !== null) {
1884
1867
  lastTarget = target;
1885
1868
  tip = target.getAttribute('data-tip') || null;
1886
1869
  forId = target.getAttribute('data-for') || null;
1887
1870
  target = target.parentElement;
1888
1871
  }
1889
-
1890
1872
  target = lastTarget || e.target;
1891
-
1892
1873
  if (this.isCustomEvent(target) && !customEvent) {
1893
1874
  return;
1894
1875
  }
1895
-
1896
1876
  var isTargetBelongsToTooltip = id == null && forId == null || forId === id;
1897
-
1898
1877
  if (tip != null && (!respectEffect || this.getEffect(target) === 'float') && isTargetBelongsToTooltip) {
1899
1878
  var proxy = makeProxy(e);
1900
1879
  proxy.currentTarget = target;
1901
1880
  callback(proxy);
1902
1881
  }
1903
1882
  };
1904
-
1905
1883
  var findCustomEvents = function findCustomEvents(targetArray, dataAttribute) {
1906
1884
  var events = {};
1907
1885
  targetArray.forEach(function (target) {
@@ -1912,24 +1890,20 @@ var findCustomEvents = function findCustomEvents(targetArray, dataAttribute) {
1912
1890
  });
1913
1891
  return events;
1914
1892
  };
1915
-
1916
1893
  var getBody = function getBody() {
1917
1894
  return document.getElementsByTagName('body')[0];
1918
1895
  };
1919
-
1920
1896
  function bodyMode (target) {
1921
1897
  target.prototype.isBodyMode = function () {
1922
1898
  return !!this.props.bodyMode;
1923
1899
  };
1924
-
1925
1900
  target.prototype.bindBodyListener = function (targetArray) {
1926
1901
  var _this = this;
1927
-
1928
1902
  var _this$state = this.state,
1929
- event = _this$state.event,
1930
- eventOff = _this$state.eventOff,
1931
- possibleCustomEvents = _this$state.possibleCustomEvents,
1932
- possibleCustomEventsOff = _this$state.possibleCustomEventsOff;
1903
+ event = _this$state.event,
1904
+ eventOff = _this$state.eventOff,
1905
+ possibleCustomEvents = _this$state.possibleCustomEvents,
1906
+ possibleCustomEventsOff = _this$state.possibleCustomEventsOff;
1933
1907
  var body = getBody();
1934
1908
  var customEvents = findCustomEvents(targetArray, 'data-event');
1935
1909
  var customEventsOff = findCustomEvents(targetArray, 'data-event-off');
@@ -1943,7 +1917,6 @@ function bodyMode (target) {
1943
1917
  });
1944
1918
  this.unbindBodyListener(body);
1945
1919
  var listeners = this.bodyModeListeners = {};
1946
-
1947
1920
  if (event == null) {
1948
1921
  listeners.mouseover = bodyListener.bind(this, this.showTooltip, {});
1949
1922
  listeners.mousemove = bodyListener.bind(this, this.updateTooltip, {
@@ -1951,7 +1924,6 @@ function bodyMode (target) {
1951
1924
  });
1952
1925
  listeners.mouseout = bodyListener.bind(this, this.hideTooltip, {});
1953
1926
  }
1954
-
1955
1927
  for (var _event in customEvents) {
1956
1928
  listeners[_event] = bodyListener.bind(this, function (e) {
1957
1929
  var targetEventOff = e.currentTarget.getAttribute('data-event-off') || eventOff;
@@ -1960,22 +1932,18 @@ function bodyMode (target) {
1960
1932
  customEvent: true
1961
1933
  });
1962
1934
  }
1963
-
1964
1935
  for (var _event2 in customEventsOff) {
1965
1936
  listeners[_event2] = bodyListener.bind(this, this.hideTooltip, {
1966
1937
  customEvent: true
1967
1938
  });
1968
1939
  }
1969
-
1970
1940
  for (var _event3 in listeners) {
1971
1941
  body.addEventListener(_event3, listeners[_event3]);
1972
1942
  }
1973
1943
  };
1974
-
1975
1944
  target.prototype.unbindBodyListener = function (body) {
1976
1945
  body = body || getBody();
1977
1946
  var listeners = this.bodyModeListeners;
1978
-
1979
1947
  for (var event in listeners) {
1980
1948
  body.removeEventListener(event, listeners[event]);
1981
1949
  }
@@ -1990,27 +1958,23 @@ function bodyMode (target) {
1990
1958
  *
1991
1959
  * If MutationObserver is not available, this feature just doesn't work.
1992
1960
  */
1961
+
1993
1962
  // https://hacks.mozilla.org/2012/05/dom-mutationobserver-reacting-to-dom-changes-without-killing-browser-performance/
1994
1963
  var getMutationObserverClass = function getMutationObserverClass() {
1995
1964
  return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
1996
1965
  };
1997
-
1998
1966
  function trackRemoval (target) {
1999
1967
  target.prototype.bindRemovalTracker = function () {
2000
1968
  var _this = this;
2001
-
2002
1969
  var MutationObserver = getMutationObserverClass();
2003
1970
  if (MutationObserver == null) return;
2004
1971
  var observer = new MutationObserver(function (mutations) {
2005
1972
  for (var m1 = 0; m1 < mutations.length; m1++) {
2006
1973
  var mutation = mutations[m1];
2007
-
2008
1974
  for (var m2 = 0; m2 < mutation.removedNodes.length; m2++) {
2009
1975
  var element = mutation.removedNodes[m2];
2010
-
2011
1976
  if (element === _this.state.currentTarget) {
2012
1977
  _this.hideTooltip();
2013
-
2014
1978
  return;
2015
1979
  }
2016
1980
  }
@@ -2022,7 +1986,6 @@ function trackRemoval (target) {
2022
1986
  });
2023
1987
  this.removalTracker = observer;
2024
1988
  };
2025
-
2026
1989
  target.prototype.unbindRemovalTracker = function () {
2027
1990
  if (this.removalTracker) {
2028
1991
  this.removalTracker.disconnect();
@@ -2049,50 +2012,43 @@ function trackRemoval (target) {
2049
2012
  */
2050
2013
  function getPosition (e, target, node, place, desiredPlace, effect, offset) {
2051
2014
  var _getDimensions = getDimensions(node),
2052
- tipWidth = _getDimensions.width,
2053
- tipHeight = _getDimensions.height;
2054
-
2015
+ tipWidth = _getDimensions.width,
2016
+ tipHeight = _getDimensions.height;
2055
2017
  var _getDimensions2 = getDimensions(target),
2056
- targetWidth = _getDimensions2.width,
2057
- targetHeight = _getDimensions2.height;
2058
-
2018
+ targetWidth = _getDimensions2.width,
2019
+ targetHeight = _getDimensions2.height;
2059
2020
  var _getCurrentOffset = getCurrentOffset(e, target, effect),
2060
- mouseX = _getCurrentOffset.mouseX,
2061
- mouseY = _getCurrentOffset.mouseY;
2062
-
2021
+ mouseX = _getCurrentOffset.mouseX,
2022
+ mouseY = _getCurrentOffset.mouseY;
2063
2023
  var defaultOffset = getDefaultPosition(effect, targetWidth, targetHeight, tipWidth, tipHeight);
2064
-
2065
2024
  var _calculateOffset = calculateOffset(offset),
2066
- extraOffsetX = _calculateOffset.extraOffsetX,
2067
- extraOffsetY = _calculateOffset.extraOffsetY;
2068
-
2025
+ extraOffsetX = _calculateOffset.extraOffsetX,
2026
+ extraOffsetY = _calculateOffset.extraOffsetY;
2069
2027
  var windowWidth = window.innerWidth;
2070
2028
  var windowHeight = window.innerHeight;
2071
-
2072
2029
  var _getParent = getParent(node),
2073
- parentTop = _getParent.parentTop,
2074
- parentLeft = _getParent.parentLeft; // Get the edge offset of the tooltip
2075
-
2030
+ parentTop = _getParent.parentTop,
2031
+ parentLeft = _getParent.parentLeft;
2076
2032
 
2033
+ // Get the edge offset of the tooltip
2077
2034
  var getTipOffsetLeft = function getTipOffsetLeft(place) {
2078
2035
  var offsetX = defaultOffset[place].l;
2079
2036
  return mouseX + offsetX + extraOffsetX;
2080
2037
  };
2081
-
2082
2038
  var getTipOffsetRight = function getTipOffsetRight(place) {
2083
2039
  var offsetX = defaultOffset[place].r;
2084
2040
  return mouseX + offsetX + extraOffsetX;
2085
2041
  };
2086
-
2087
2042
  var getTipOffsetTop = function getTipOffsetTop(place) {
2088
2043
  var offsetY = defaultOffset[place].t;
2089
2044
  return mouseY + offsetY + extraOffsetY;
2090
2045
  };
2091
-
2092
2046
  var getTipOffsetBottom = function getTipOffsetBottom(place) {
2093
2047
  var offsetY = defaultOffset[place].b;
2094
2048
  return mouseY + offsetY + extraOffsetY;
2095
- }; //
2049
+ };
2050
+
2051
+ //
2096
2052
  // Functions to test whether the tooltip's sides are inside
2097
2053
  // the client window for a given orientation p
2098
2054
  //
@@ -2106,70 +2062,56 @@ function getPosition (e, target, node, place, desiredPlace, effect, offset) {
2106
2062
  // |
2107
2063
  // Bottom side
2108
2064
  //
2109
-
2110
-
2111
2065
  var outsideLeft = function outsideLeft(p) {
2112
2066
  return getTipOffsetLeft(p) < 0;
2113
2067
  };
2114
-
2115
2068
  var outsideRight = function outsideRight(p) {
2116
2069
  return getTipOffsetRight(p) > windowWidth;
2117
2070
  };
2118
-
2119
2071
  var outsideTop = function outsideTop(p) {
2120
2072
  return getTipOffsetTop(p) < 0;
2121
2073
  };
2122
-
2123
2074
  var outsideBottom = function outsideBottom(p) {
2124
2075
  return getTipOffsetBottom(p) > windowHeight;
2125
- }; // Check whether the tooltip with orientation p is completely inside the client window
2126
-
2076
+ };
2127
2077
 
2078
+ // Check whether the tooltip with orientation p is completely inside the client window
2128
2079
  var outside = function outside(p) {
2129
2080
  return outsideLeft(p) || outsideRight(p) || outsideTop(p) || outsideBottom(p);
2130
2081
  };
2131
-
2132
2082
  var inside = function inside(p) {
2133
2083
  return !outside(p);
2134
2084
  };
2135
-
2136
2085
  var placeIsInside = {
2137
2086
  top: inside('top'),
2138
2087
  bottom: inside('bottom'),
2139
2088
  left: inside('left'),
2140
2089
  right: inside('right')
2141
2090
  };
2142
-
2143
2091
  function choose() {
2144
2092
  var allPlaces = desiredPlace.split(',').concat(place, ['top', 'bottom', 'left', 'right']);
2145
-
2146
2093
  var _iterator = _createForOfIteratorHelper(allPlaces),
2147
- _step;
2148
-
2094
+ _step;
2149
2095
  try {
2150
2096
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
2151
2097
  var d = _step.value;
2152
2098
  if (placeIsInside[d]) return d;
2153
- } // if nothing is inside, just use the old place.
2154
-
2099
+ }
2100
+ // if nothing is inside, just use the old place.
2155
2101
  } catch (err) {
2156
2102
  _iterator.e(err);
2157
2103
  } finally {
2158
2104
  _iterator.f();
2159
2105
  }
2160
-
2161
2106
  return place;
2162
2107
  }
2163
-
2164
2108
  var chosen = choose();
2165
2109
  var isNewState = false;
2166
2110
  var newPlace;
2167
-
2168
2111
  if (chosen && chosen !== place) {
2169
2112
  isNewState = true;
2170
2113
  newPlace = chosen;
2171
2114
  }
2172
-
2173
2115
  if (isNewState) {
2174
2116
  return {
2175
2117
  isNewState: true,
@@ -2178,7 +2120,6 @@ function getPosition (e, target, node, place, desiredPlace, effect, offset) {
2178
2120
  }
2179
2121
  };
2180
2122
  }
2181
-
2182
2123
  return {
2183
2124
  isNewState: false,
2184
2125
  position: {
@@ -2187,43 +2128,38 @@ function getPosition (e, target, node, place, desiredPlace, effect, offset) {
2187
2128
  }
2188
2129
  };
2189
2130
  }
2190
-
2191
2131
  var getDimensions = function getDimensions(node) {
2192
2132
  var _node$getBoundingClie = node.getBoundingClientRect(),
2193
- height = _node$getBoundingClie.height,
2194
- width = _node$getBoundingClie.width;
2195
-
2133
+ height = _node$getBoundingClie.height,
2134
+ width = _node$getBoundingClie.width;
2196
2135
  return {
2197
2136
  height: parseInt(height, 10),
2198
2137
  width: parseInt(width, 10)
2199
2138
  };
2200
- }; // Get current mouse offset
2201
-
2139
+ };
2202
2140
 
2141
+ // Get current mouse offset
2203
2142
  var getCurrentOffset = function getCurrentOffset(e, currentTarget, effect) {
2204
2143
  var boundingClientRect = currentTarget.getBoundingClientRect();
2205
2144
  var targetTop = boundingClientRect.top;
2206
2145
  var targetLeft = boundingClientRect.left;
2207
-
2208
2146
  var _getDimensions3 = getDimensions(currentTarget),
2209
- targetWidth = _getDimensions3.width,
2210
- targetHeight = _getDimensions3.height;
2211
-
2147
+ targetWidth = _getDimensions3.width,
2148
+ targetHeight = _getDimensions3.height;
2212
2149
  if (effect === 'float') {
2213
2150
  return {
2214
2151
  mouseX: e.clientX,
2215
2152
  mouseY: e.clientY
2216
2153
  };
2217
2154
  }
2218
-
2219
2155
  return {
2220
2156
  mouseX: targetLeft + targetWidth / 2,
2221
2157
  mouseY: targetTop + targetHeight / 2
2222
2158
  };
2223
- }; // List all possibility of tooltip final offset
2224
- // This is useful in judging if it is necessary for tooltip to switch position when out of window
2225
-
2159
+ };
2226
2160
 
2161
+ // List all possibility of tooltip final offset
2162
+ // This is useful in judging if it is necessary for tooltip to switch position when out of window
2227
2163
  var getDefaultPosition = function getDefaultPosition(effect, targetWidth, targetHeight, tipWidth, tipHeight) {
2228
2164
  var top;
2229
2165
  var right;
@@ -2284,24 +2220,21 @@ var getDefaultPosition = function getDefaultPosition(effect, targetWidth, target
2284
2220
  b: tipHeight / 2
2285
2221
  };
2286
2222
  }
2287
-
2288
2223
  return {
2289
2224
  top: top,
2290
2225
  bottom: bottom,
2291
2226
  left: left,
2292
2227
  right: right
2293
2228
  };
2294
- }; // Consider additional offset into position calculation
2295
-
2229
+ };
2296
2230
 
2231
+ // Consider additional offset into position calculation
2297
2232
  var calculateOffset = function calculateOffset(offset) {
2298
2233
  var extraOffsetX = 0;
2299
2234
  var extraOffsetY = 0;
2300
-
2301
2235
  if (Object.prototype.toString.apply(offset) === '[object String]') {
2302
2236
  offset = JSON.parse(offset.toString().replace(/'/g, '"'));
2303
2237
  }
2304
-
2305
2238
  for (var key in offset) {
2306
2239
  if (key === 'top') {
2307
2240
  extraOffsetY -= parseInt(offset[key], 10);
@@ -2313,25 +2246,22 @@ var calculateOffset = function calculateOffset(offset) {
2313
2246
  extraOffsetX += parseInt(offset[key], 10);
2314
2247
  }
2315
2248
  }
2316
-
2317
2249
  return {
2318
2250
  extraOffsetX: extraOffsetX,
2319
2251
  extraOffsetY: extraOffsetY
2320
2252
  };
2321
- }; // Get the offset of the parent elements
2322
-
2253
+ };
2323
2254
 
2255
+ // Get the offset of the parent elements
2324
2256
  var getParent = function getParent(currentTarget) {
2325
2257
  var currentParent = currentTarget;
2326
-
2327
2258
  while (currentParent) {
2328
- var computedStyle = window.getComputedStyle(currentParent); // transform and will-change: transform change the containing block
2259
+ var computedStyle = window.getComputedStyle(currentParent);
2260
+ // transform and will-change: transform change the containing block
2329
2261
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_Block
2330
-
2331
2262
  if (computedStyle.getPropertyValue('transform') !== 'none' || computedStyle.getPropertyValue('will-change') === 'transform') break;
2332
2263
  currentParent = currentParent.parentElement;
2333
2264
  }
2334
-
2335
2265
  var parentTop = currentParent && currentParent.getBoundingClientRect().top || 0;
2336
2266
  var parentLeft = currentParent && currentParent.getBoundingClientRect().left || 0;
2337
2267
  return {
@@ -2356,17 +2286,15 @@ var getParent = function getParent(currentTarget) {
2356
2286
  function TipContent(tip, children, getContent, multiline) {
2357
2287
  if (children) return children;
2358
2288
  if (getContent !== undefined && getContent !== null) return getContent; // getContent can be 0, '', etc.
2359
-
2360
2289
  if (getContent === null) return null; // Tip not exist and children is null or undefined
2361
2290
 
2362
2291
  var regexp = /<br\s*\/?>/;
2363
-
2364
2292
  if (!multiline || multiline === 'false' || !regexp.test(tip)) {
2365
2293
  // No trim(), so that user can keep their input
2366
2294
  return tip;
2367
- } // Multiline tooltip content
2368
-
2295
+ }
2369
2296
 
2297
+ // Multiline tooltip content
2370
2298
  return tip.split(regexp).map(function (d, i) {
2371
2299
  return /*#__PURE__*/React.createElement("span", {
2372
2300
  key: i,
@@ -2397,13 +2325,12 @@ function parseAria(props) {
2397
2325
  * @see https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/core/createArrayFromMixed.js#L24
2398
2326
  * NodeLists are functions in Safari
2399
2327
  */
2328
+
2400
2329
  function nodeListToArray (nodeList) {
2401
2330
  var length = nodeList.length;
2402
-
2403
2331
  if (nodeList.hasOwnProperty) {
2404
2332
  return Array.prototype.slice.call(nodeList);
2405
2333
  }
2406
-
2407
2334
  return new Array(length).fill().map(function (index) {
2408
2335
  return nodeList[index];
2409
2336
  });
@@ -2464,14 +2391,13 @@ var DEFAULT_PADDING = '8px 21px';
2464
2391
  /**
2465
2392
  * Generates the specific tooltip style for use on render.
2466
2393
  */
2467
-
2468
2394
  function generateTooltipStyle(uuid, customColors, type, hasBorder, padding) {
2469
2395
  return generateStyle(uuid, getPopupColors(customColors, type, hasBorder), padding);
2470
2396
  }
2397
+
2471
2398
  /**
2472
2399
  * Generates the tooltip style rules based on the element-specified "data-type" property.
2473
2400
  */
2474
-
2475
2401
  function generateStyle(uuid, colors) {
2476
2402
  var padding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_PADDING;
2477
2403
  var textColor = colors.text;
@@ -2480,22 +2406,18 @@ function generateStyle(uuid, colors) {
2480
2406
  var arrowColor = colors.arrow;
2481
2407
  return "\n \t.".concat(uuid, " {\n\t color: ").concat(textColor, ";\n\t background: ").concat(backgroundColor, ";\n\t border: 1px solid ").concat(borderColor, ";\n\t padding: ").concat(padding, ";\n \t}\n\n \t.").concat(uuid, ".place-top {\n margin-top: -10px;\n }\n .").concat(uuid, ".place-top::before {\n border-top: 8px solid ").concat(borderColor, ";\n }\n .").concat(uuid, ".place-top::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n bottom: -6px;\n left: 50%;\n margin-left: -8px;\n border-top-color: ").concat(arrowColor, ";\n border-top-style: solid;\n border-top-width: 6px;\n }\n\n .").concat(uuid, ".place-bottom {\n margin-top: 10px;\n }\n .").concat(uuid, ".place-bottom::before {\n border-bottom: 8px solid ").concat(borderColor, ";\n }\n .").concat(uuid, ".place-bottom::after {\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n top: -6px;\n left: 50%;\n margin-left: -8px;\n border-bottom-color: ").concat(arrowColor, ";\n border-bottom-style: solid;\n border-bottom-width: 6px;\n }\n\n .").concat(uuid, ".place-left {\n margin-left: -10px;\n }\n .").concat(uuid, ".place-left::before {\n border-left: 8px solid ").concat(borderColor, ";\n }\n .").concat(uuid, ".place-left::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n right: -6px;\n top: 50%;\n margin-top: -4px;\n border-left-color: ").concat(arrowColor, ";\n border-left-style: solid;\n border-left-width: 6px;\n }\n\n .").concat(uuid, ".place-right {\n margin-left: 10px;\n }\n .").concat(uuid, ".place-right::before {\n border-right: 8px solid ").concat(borderColor, ";\n }\n .").concat(uuid, ".place-right::after {\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n left: -6px;\n top: 50%;\n margin-top: -4px;\n border-right-color: ").concat(arrowColor, ";\n border-right-style: solid;\n border-right-width: 6px;\n }\n ");
2482
2408
  }
2483
-
2484
2409
  function getPopupColors(customColors, type, hasBorder) {
2485
2410
  var textColor = customColors.text;
2486
2411
  var backgroundColor = customColors.background;
2487
2412
  var borderColor = customColors.border;
2488
2413
  var arrowColor = customColors.arrow ? customColors.arrow : customColors.background;
2489
2414
  var colors = getDefaultPopupColors(type);
2490
-
2491
2415
  if (textColor) {
2492
2416
  colors.text = textColor;
2493
2417
  }
2494
-
2495
2418
  if (backgroundColor) {
2496
2419
  colors.background = backgroundColor;
2497
2420
  }
2498
-
2499
2421
  if (hasBorder) {
2500
2422
  if (borderColor) {
2501
2423
  colors.border = borderColor;
@@ -2503,27 +2425,21 @@ function getPopupColors(customColors, type, hasBorder) {
2503
2425
  colors.border = type === 'light' ? 'black' : 'white';
2504
2426
  }
2505
2427
  }
2506
-
2507
2428
  if (arrowColor) {
2508
2429
  colors.arrow = arrowColor;
2509
2430
  }
2510
-
2511
2431
  return colors;
2512
2432
  }
2513
2433
 
2514
2434
  var _class, _class2;
2515
- /* Polyfill */
2516
2435
 
2436
+ /* Polyfill */
2517
2437
  var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_class = isCapture(_class = getEffect(_class = bodyMode(_class = trackRemoval(_class = (_class2 = /*#__PURE__*/function (_React$Component) {
2518
2438
  _inherits(ReactTooltip, _React$Component);
2519
-
2520
2439
  var _super = _createSuper(ReactTooltip);
2521
-
2522
2440
  function ReactTooltip(props) {
2523
2441
  var _this;
2524
-
2525
2442
  _classCallCheck(this, ReactTooltip);
2526
-
2527
2443
  _this = _super.call(this, props);
2528
2444
  _this.state = {
2529
2445
  uuid: props.uuid || generateUUID(),
@@ -2536,6 +2452,7 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2536
2452
  // float or fixed
2537
2453
  show: false,
2538
2454
  border: false,
2455
+ borderClass: 'border',
2539
2456
  customColors: {},
2540
2457
  offset: {},
2541
2458
  padding: props.padding,
@@ -2558,9 +2475,7 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2558
2475
  originTooltip: null,
2559
2476
  isMultiline: false
2560
2477
  };
2561
-
2562
2478
  _this.bind(['showTooltip', 'updateTooltip', 'hideTooltip', 'hideTooltipOnScroll', 'getTooltipContent', 'globalRebuild', 'globalShow', 'globalHide', 'onWindowResize', 'mouseOnToolTip']);
2563
-
2564
2479
  _this.mount = true;
2565
2480
  _this.delayShowLoop = null;
2566
2481
  _this.delayHideLoop = null;
@@ -2568,16 +2483,14 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2568
2483
  _this.intervalUpdateContent = null;
2569
2484
  return _this;
2570
2485
  }
2486
+
2571
2487
  /**
2572
2488
  * For unify the bind and unbind listener
2573
2489
  */
2574
-
2575
-
2576
2490
  _createClass(ReactTooltip, [{
2577
2491
  key: "bind",
2578
2492
  value: function bind(methodArray) {
2579
2493
  var _this2 = this;
2580
-
2581
2494
  methodArray.forEach(function (method) {
2582
2495
  _this2[method] = _this2[method].bind(_this2);
2583
2496
  });
@@ -2586,13 +2499,11 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2586
2499
  key: "componentDidMount",
2587
2500
  value: function componentDidMount() {
2588
2501
  var _this$props = this.props;
2589
- _this$props.insecure;
2590
- var resizeHide = _this$props.resizeHide;
2502
+ _this$props.insecure;
2503
+ var resizeHide = _this$props.resizeHide;
2591
2504
  this.mount = true;
2592
2505
  this.bindListener(); // Bind listener for tooltip
2593
-
2594
2506
  this.bindWindowEvents(resizeHide); // Bind global event for static method
2595
-
2596
2507
  this.injectStyles(); // Inject styles for each DOM root having tooltip.
2597
2508
  }
2598
2509
  }, {
@@ -2604,39 +2515,33 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2604
2515
  this.removeScrollListener(this.state.currentTarget);
2605
2516
  this.unbindWindowEvents();
2606
2517
  }
2607
- /* Look for the closest DOM root having tooltip and inject styles. */
2608
2518
 
2519
+ /* Look for the closest DOM root having tooltip and inject styles. */
2609
2520
  }, {
2610
2521
  key: "injectStyles",
2611
2522
  value: function injectStyles() {
2612
2523
  var tooltipRef = this.tooltipRef;
2613
-
2614
2524
  if (!tooltipRef) {
2615
2525
  return;
2616
2526
  }
2617
-
2618
2527
  var parentNode = tooltipRef.parentNode;
2619
-
2620
2528
  while (parentNode.parentNode) {
2621
2529
  parentNode = parentNode.parentNode;
2622
2530
  }
2623
-
2624
2531
  var domRoot;
2625
-
2626
2532
  switch (parentNode.constructor.name) {
2627
2533
  case 'Document':
2628
2534
  case 'HTMLDocument':
2629
2535
  case undefined:
2630
2536
  domRoot = parentNode.head;
2631
2537
  break;
2632
-
2633
2538
  case 'ShadowRoot':
2634
2539
  default:
2635
2540
  domRoot = parentNode;
2636
2541
  break;
2637
- } // Prevent styles duplication.
2638
-
2542
+ }
2639
2543
 
2544
+ // Prevent styles duplication.
2640
2545
  if (!domRoot.querySelector('style[data-react-tooltip]')) {
2641
2546
  var style = document.createElement('style');
2642
2547
  style.textContent = baseCss;
@@ -2644,16 +2549,15 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2644
2549
  domRoot.appendChild(style);
2645
2550
  }
2646
2551
  }
2552
+
2647
2553
  /**
2648
2554
  * Return if the mouse is on the tooltip.
2649
2555
  * @returns {boolean} true - mouse is on the tooltip
2650
2556
  */
2651
-
2652
2557
  }, {
2653
2558
  key: "mouseOnToolTip",
2654
2559
  value: function mouseOnToolTip() {
2655
2560
  var show = this.state.show;
2656
-
2657
2561
  if (show && this.tooltipRef) {
2658
2562
  /* old IE or Firefox work around */
2659
2563
  if (!this.tooltipRef.matches) {
@@ -2665,30 +2569,27 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2665
2569
  this.tooltipRef.matches = this.tooltipRef.mozMatchesSelector;
2666
2570
  }
2667
2571
  }
2668
-
2669
2572
  return this.tooltipRef.matches(':hover');
2670
2573
  }
2671
-
2672
2574
  return false;
2673
2575
  }
2576
+
2674
2577
  /**
2675
2578
  * Pick out corresponded target elements
2676
2579
  */
2677
-
2678
2580
  }, {
2679
2581
  key: "getTargetArray",
2680
2582
  value: function getTargetArray(id) {
2681
2583
  var targetArray = [];
2682
2584
  var selector;
2683
-
2684
2585
  if (!id) {
2685
2586
  selector = '[data-tip]:not([data-for])';
2686
2587
  } else {
2687
2588
  var escaped = id.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
2688
2589
  selector = "[data-tip][data-for=\"".concat(escaped, "\"]");
2689
- } // Scan document for shadow DOM elements
2690
-
2590
+ }
2691
2591
 
2592
+ // Scan document for shadow DOM elements
2692
2593
  nodeListToArray(document.getElementsByTagName('*')).filter(function (element) {
2693
2594
  return element.shadowRoot;
2694
2595
  }).forEach(function (element) {
@@ -2696,101 +2597,87 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2696
2597
  });
2697
2598
  return targetArray.concat(nodeListToArray(document.querySelectorAll(selector)));
2698
2599
  }
2600
+
2699
2601
  /**
2700
2602
  * Bind listener to the target elements
2701
2603
  * These listeners used to trigger showing or hiding the tooltip
2702
2604
  */
2703
-
2704
2605
  }, {
2705
2606
  key: "bindListener",
2706
2607
  value: function bindListener() {
2707
2608
  var _this3 = this;
2708
-
2709
2609
  var _this$props2 = this.props,
2710
- id = _this$props2.id,
2711
- globalEventOff = _this$props2.globalEventOff,
2712
- isCapture = _this$props2.isCapture;
2610
+ id = _this$props2.id,
2611
+ globalEventOff = _this$props2.globalEventOff,
2612
+ isCapture = _this$props2.isCapture;
2713
2613
  var targetArray = this.getTargetArray(id);
2714
2614
  targetArray.forEach(function (target) {
2715
2615
  if (target.getAttribute('currentItem') === null) {
2716
2616
  target.setAttribute('currentItem', 'false');
2717
2617
  }
2718
-
2719
2618
  _this3.unbindBasicListener(target);
2720
-
2721
2619
  if (_this3.isCustomEvent(target)) {
2722
2620
  _this3.customUnbindListener(target);
2723
2621
  }
2724
2622
  });
2725
-
2726
2623
  if (this.isBodyMode()) {
2727
2624
  this.bindBodyListener(targetArray);
2728
2625
  } else {
2729
2626
  targetArray.forEach(function (target) {
2730
2627
  var isCaptureMode = _this3.isCapture(target);
2731
-
2732
2628
  var effect = _this3.getEffect(target);
2733
-
2734
2629
  if (_this3.isCustomEvent(target)) {
2735
2630
  _this3.customBindListener(target);
2736
-
2737
2631
  return;
2738
2632
  }
2739
-
2740
2633
  target.addEventListener('mouseenter', _this3.showTooltip, isCaptureMode);
2741
2634
  target.addEventListener('focus', _this3.showTooltip, isCaptureMode);
2742
-
2743
2635
  if (effect === 'float') {
2744
2636
  target.addEventListener('mousemove', _this3.updateTooltip, isCaptureMode);
2745
2637
  }
2746
-
2747
2638
  target.addEventListener('mouseleave', _this3.hideTooltip, isCaptureMode);
2748
2639
  target.addEventListener('blur', _this3.hideTooltip, isCaptureMode);
2749
2640
  });
2750
- } // Global event to hide tooltip
2751
-
2641
+ }
2752
2642
 
2643
+ // Global event to hide tooltip
2753
2644
  if (globalEventOff) {
2754
2645
  window.removeEventListener(globalEventOff, this.hideTooltip);
2755
2646
  window.addEventListener(globalEventOff, this.hideTooltip, isCapture);
2756
- } // Track removal of targetArray elements from DOM
2757
-
2647
+ }
2758
2648
 
2649
+ // Track removal of targetArray elements from DOM
2759
2650
  this.bindRemovalTracker();
2760
2651
  }
2652
+
2761
2653
  /**
2762
2654
  * Unbind listeners on target elements
2763
2655
  */
2764
-
2765
2656
  }, {
2766
2657
  key: "unbindListener",
2767
2658
  value: function unbindListener() {
2768
2659
  var _this4 = this;
2769
-
2770
2660
  var _this$props3 = this.props,
2771
- id = _this$props3.id,
2772
- globalEventOff = _this$props3.globalEventOff;
2773
-
2661
+ id = _this$props3.id,
2662
+ globalEventOff = _this$props3.globalEventOff;
2774
2663
  if (this.isBodyMode()) {
2775
2664
  this.unbindBodyListener();
2776
2665
  } else {
2777
2666
  var targetArray = this.getTargetArray(id);
2778
2667
  targetArray.forEach(function (target) {
2779
2668
  _this4.unbindBasicListener(target);
2780
-
2781
2669
  if (_this4.isCustomEvent(target)) _this4.customUnbindListener(target);
2782
2670
  });
2783
2671
  }
2784
-
2785
2672
  if (globalEventOff) window.removeEventListener(globalEventOff, this.hideTooltip);
2786
2673
  this.unbindRemovalTracker();
2787
2674
  }
2675
+
2788
2676
  /**
2789
2677
  * Invoke this before bind listener and unmount the component
2790
2678
  * it is necessary to invoke this even when binding custom event
2791
2679
  * so that the tooltip can switch between custom and default listener
2792
2680
  */
2793
-
2794
2681
  }, {
2795
2682
  key: "unbindBasicListener",
2796
2683
  value: function unbindBasicListener(target) {
@@ -2803,11 +2690,11 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2803
2690
  key: "getTooltipContent",
2804
2691
  value: function getTooltipContent() {
2805
2692
  var _this$props4 = this.props,
2806
- getContent = _this$props4.getContent,
2807
- children = _this$props4.children; // Generate tooltip content
2693
+ getContent = _this$props4.getContent,
2694
+ children = _this$props4.children;
2808
2695
 
2696
+ // Generate tooltip content
2809
2697
  var content;
2810
-
2811
2698
  if (getContent) {
2812
2699
  if (Array.isArray(getContent)) {
2813
2700
  content = getContent[0] && getContent[0](this.state.originTooltip);
@@ -2815,7 +2702,6 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2815
2702
  content = getContent(this.state.originTooltip);
2816
2703
  }
2817
2704
  }
2818
-
2819
2705
  return TipContent(this.state.originTooltip, children, content, this.state.isMultiline);
2820
2706
  }
2821
2707
  }, {
@@ -2823,17 +2709,16 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2823
2709
  value: function isEmptyTip(placeholder) {
2824
2710
  return typeof placeholder === 'string' && placeholder === '' || placeholder === null;
2825
2711
  }
2712
+
2826
2713
  /**
2827
2714
  * When mouse enter, show the tooltip
2828
2715
  */
2829
-
2830
2716
  }, {
2831
2717
  key: "showTooltip",
2832
2718
  value: function showTooltip(e, isGlobalCall) {
2833
2719
  if (!this.tooltipRef) {
2834
2720
  return;
2835
2721
  }
2836
-
2837
2722
  if (isGlobalCall) {
2838
2723
  // Don't trigger other elements belongs to other ReactTooltip
2839
2724
  var targetArray = this.getTargetArray(this.props.id);
@@ -2841,48 +2726,46 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2841
2726
  return ele === e.currentTarget;
2842
2727
  });
2843
2728
  if (!isMyElement) return;
2844
- } // Get the tooltip content
2729
+ }
2730
+ // Get the tooltip content
2845
2731
  // calculate in this phrase so that tip width height can be detected
2846
-
2847
-
2848
2732
  var _this$props5 = this.props,
2849
- multiline = _this$props5.multiline,
2850
- getContent = _this$props5.getContent;
2733
+ multiline = _this$props5.multiline,
2734
+ getContent = _this$props5.getContent;
2851
2735
  var originTooltip = e.currentTarget.getAttribute('data-tip');
2852
- var isMultiline = e.currentTarget.getAttribute('data-multiline') || multiline || false; // If it is focus event or called by ReactTooltip.show, switch to `solid` effect
2736
+ var isMultiline = e.currentTarget.getAttribute('data-multiline') || multiline || false;
2853
2737
 
2854
- var switchToSolid = e instanceof window.FocusEvent || isGlobalCall; // if it needs to skip adding hide listener to scroll
2738
+ // If it is focus event or called by ReactTooltip.show, switch to `solid` effect
2739
+ var switchToSolid = e instanceof window.FocusEvent || isGlobalCall;
2855
2740
 
2741
+ // if it needs to skip adding hide listener to scroll
2856
2742
  var scrollHide = true;
2857
-
2858
2743
  if (e.currentTarget.getAttribute('data-scroll-hide')) {
2859
2744
  scrollHide = e.currentTarget.getAttribute('data-scroll-hide') === 'true';
2860
2745
  } else if (this.props.scrollHide != null) {
2861
2746
  scrollHide = this.props.scrollHide;
2862
- } // adding aria-describedby to target to make tooltips read by screen readers
2863
-
2747
+ }
2864
2748
 
2749
+ // adding aria-describedby to target to make tooltips read by screen readers
2865
2750
  if (e && e.currentTarget && e.currentTarget.setAttribute) {
2866
2751
  e.currentTarget.setAttribute('aria-describedby', this.props.id || this.state.uuid);
2867
- } // Make sure the correct place is set
2868
-
2752
+ }
2869
2753
 
2754
+ // Make sure the correct place is set
2870
2755
  var desiredPlace = e.currentTarget.getAttribute('data-place') || this.props.place || 'top';
2871
2756
  var effect = switchToSolid && 'solid' || this.getEffect(e.currentTarget);
2872
2757
  var offset = e.currentTarget.getAttribute('data-offset') || this.props.offset || {};
2873
2758
  var result = getPosition(e, e.currentTarget, this.tooltipRef, desiredPlace.split(',')[0], desiredPlace, effect, offset);
2874
-
2875
2759
  if (result.position && this.props.overridePosition) {
2876
2760
  result.position = this.props.overridePosition(result.position, e, e.currentTarget, this.tooltipRef, desiredPlace, desiredPlace, effect, offset);
2877
2761
  }
2762
+ var place = result.isNewState ? result.newState.place : desiredPlace.split(',')[0];
2878
2763
 
2879
- var place = result.isNewState ? result.newState.place : desiredPlace.split(',')[0]; // To prevent previously created timers from triggering
2880
-
2764
+ // To prevent previously created timers from triggering
2881
2765
  this.clearTimer();
2882
2766
  var target = e.currentTarget;
2883
2767
  var reshowDelay = this.state.show ? target.getAttribute('data-delay-update') || this.props.delayUpdate : 0;
2884
2768
  var self = this;
2885
-
2886
2769
  var updateState = function updateState() {
2887
2770
  self.setState({
2888
2771
  originTooltip: originTooltip,
@@ -2904,6 +2787,7 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2904
2787
  delayHide: target.getAttribute('data-delay-hide') || self.props.delayHide || 0,
2905
2788
  delayUpdate: target.getAttribute('data-delay-update') || self.props.delayUpdate || 0,
2906
2789
  border: (target.getAttribute('data-border') ? target.getAttribute('data-border') === 'true' : self.props.border) || false,
2790
+ borderClass: target.getAttribute('data-border-class') || self.props.borderClass || 'border',
2907
2791
  extraClass: target.getAttribute('data-class') || self.props["class"] || self.props.className || '',
2908
2792
  disable: (target.getAttribute('data-tip-disable') ? target.getAttribute('data-tip-disable') === 'true' : self.props.disable) || false,
2909
2793
  currentTarget: target
@@ -2911,9 +2795,7 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2911
2795
  if (scrollHide) {
2912
2796
  self.addScrollListener(self.state.currentTarget);
2913
2797
  }
2914
-
2915
2798
  self.updateTooltip(e);
2916
-
2917
2799
  if (getContent && Array.isArray(getContent)) {
2918
2800
  self.intervalUpdateContent = setInterval(function () {
2919
2801
  if (self.mount) {
@@ -2928,48 +2810,45 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2928
2810
  }, getContent[1]);
2929
2811
  }
2930
2812
  });
2931
- }; // If there is no delay call immediately, don't allow events to get in first.
2932
-
2813
+ };
2933
2814
 
2815
+ // If there is no delay call immediately, don't allow events to get in first.
2934
2816
  if (reshowDelay) {
2935
2817
  this.delayReshow = setTimeout(updateState, reshowDelay);
2936
2818
  } else {
2937
2819
  updateState();
2938
2820
  }
2939
2821
  }
2822
+
2940
2823
  /**
2941
2824
  * When mouse hover, update tool tip
2942
2825
  */
2943
-
2944
2826
  }, {
2945
2827
  key: "updateTooltip",
2946
2828
  value: function updateTooltip(e) {
2947
2829
  var _this5 = this;
2948
-
2949
2830
  var _this$state = this.state,
2950
- delayShow = _this$state.delayShow,
2951
- disable = _this$state.disable;
2831
+ delayShow = _this$state.delayShow,
2832
+ disable = _this$state.disable;
2952
2833
  var _this$props6 = this.props,
2953
- afterShow = _this$props6.afterShow,
2954
- disableProp = _this$props6.disable;
2834
+ afterShow = _this$props6.afterShow,
2835
+ disableProp = _this$props6.disable;
2955
2836
  var placeholder = this.getTooltipContent();
2956
- var eventTarget = e.currentTarget || e.target; // Check if the mouse is actually over the tooltip, if so don't hide the tooltip
2837
+ var eventTarget = e.currentTarget || e.target;
2957
2838
 
2839
+ // Check if the mouse is actually over the tooltip, if so don't hide the tooltip
2958
2840
  if (this.mouseOnToolTip()) {
2959
2841
  return;
2960
- } // if the tooltip is empty, disable the tooltip
2961
-
2842
+ }
2962
2843
 
2844
+ // if the tooltip is empty, disable the tooltip
2963
2845
  if (this.isEmptyTip(placeholder) || disable || disableProp) {
2964
2846
  return;
2965
2847
  }
2966
-
2967
2848
  var delayTime = !this.state.show ? parseInt(delayShow, 10) : 0;
2968
-
2969
2849
  var updateState = function updateState() {
2970
2850
  if (Array.isArray(placeholder) && placeholder.length > 0 || placeholder) {
2971
2851
  var isInvisible = !_this5.state.show;
2972
-
2973
2852
  _this5.setState({
2974
2853
  currentEvent: e,
2975
2854
  currentTarget: eventTarget,
@@ -2983,11 +2862,9 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2983
2862
  });
2984
2863
  }
2985
2864
  };
2986
-
2987
2865
  if (this.delayShowLoop) {
2988
2866
  clearTimeout(this.delayShowLoop);
2989
2867
  }
2990
-
2991
2868
  if (delayTime) {
2992
2869
  this.delayShowLoop = setTimeout(updateState, delayTime);
2993
2870
  } else {
@@ -2995,15 +2872,14 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
2995
2872
  updateState();
2996
2873
  }
2997
2874
  }
2875
+
2998
2876
  /*
2999
2877
  * If we're mousing over the tooltip remove it when we leave.
3000
2878
  */
3001
-
3002
2879
  }, {
3003
2880
  key: "listenForTooltipExit",
3004
2881
  value: function listenForTooltipExit() {
3005
2882
  var show = this.state.show;
3006
-
3007
2883
  if (show && this.tooltipRef) {
3008
2884
  this.tooltipRef.addEventListener('mouseleave', this.hideTooltip);
3009
2885
  }
@@ -3012,20 +2888,18 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
3012
2888
  key: "removeListenerForTooltipExit",
3013
2889
  value: function removeListenerForTooltipExit() {
3014
2890
  var show = this.state.show;
3015
-
3016
2891
  if (show && this.tooltipRef) {
3017
2892
  this.tooltipRef.removeEventListener('mouseleave', this.hideTooltip);
3018
2893
  }
3019
2894
  }
2895
+
3020
2896
  /**
3021
2897
  * When mouse leave, hide tooltip
3022
2898
  */
3023
-
3024
2899
  }, {
3025
2900
  key: "hideTooltip",
3026
2901
  value: function hideTooltip(e, hasTarget) {
3027
2902
  var _this6 = this;
3028
-
3029
2903
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
3030
2904
  isScroll: false
3031
2905
  };
@@ -3033,12 +2907,11 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
3033
2907
  var isScroll = options.isScroll;
3034
2908
  var delayHide = isScroll ? 0 : this.state.delayHide;
3035
2909
  var _this$props7 = this.props,
3036
- afterHide = _this$props7.afterHide,
3037
- disableProp = _this$props7.disable;
2910
+ afterHide = _this$props7.afterHide,
2911
+ disableProp = _this$props7.disable;
3038
2912
  var placeholder = this.getTooltipContent();
3039
2913
  if (!this.mount) return;
3040
2914
  if (this.isEmptyTip(placeholder) || disable || disableProp) return; // if the tooltip is empty, disable the tooltip
3041
-
3042
2915
  if (hasTarget) {
3043
2916
  // Don't trigger other elements belongs to other ReactTooltip
3044
2917
  var targetArray = this.getTargetArray(this.props.id);
@@ -3046,47 +2919,40 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
3046
2919
  return ele === e.currentTarget;
3047
2920
  });
3048
2921
  if (!isMyElement || !this.state.show) return;
3049
- } // clean up aria-describedby when hiding tooltip
3050
-
2922
+ }
3051
2923
 
2924
+ // clean up aria-describedby when hiding tooltip
3052
2925
  if (e && e.currentTarget && e.currentTarget.removeAttribute) {
3053
2926
  e.currentTarget.removeAttribute('aria-describedby');
3054
2927
  }
3055
-
3056
2928
  var resetState = function resetState() {
3057
- var isVisible = _this6.state.show; // Check if the mouse is actually over the tooltip, if so don't hide the tooltip
3058
-
2929
+ var isVisible = _this6.state.show;
2930
+ // Check if the mouse is actually over the tooltip, if so don't hide the tooltip
3059
2931
  if (_this6.mouseOnToolTip()) {
3060
2932
  _this6.listenForTooltipExit();
3061
-
3062
2933
  return;
3063
2934
  }
3064
-
3065
2935
  _this6.removeListenerForTooltipExit();
3066
-
3067
2936
  _this6.setState({
3068
2937
  show: false
3069
2938
  }, function () {
3070
2939
  _this6.removeScrollListener(_this6.state.currentTarget);
3071
-
3072
2940
  if (isVisible && afterHide) {
3073
2941
  afterHide(e);
3074
2942
  }
3075
2943
  });
3076
2944
  };
3077
-
3078
2945
  this.clearTimer();
3079
-
3080
2946
  if (delayHide) {
3081
2947
  this.delayHideLoop = setTimeout(resetState, parseInt(delayHide, 10));
3082
2948
  } else {
3083
2949
  resetState();
3084
2950
  }
3085
2951
  }
2952
+
3086
2953
  /**
3087
2954
  * When scroll, hide tooltip
3088
2955
  */
3089
-
3090
2956
  }, {
3091
2957
  key: "hideTooltipOnScroll",
3092
2958
  value: function hideTooltipOnScroll(event, hasTarget) {
@@ -3094,11 +2960,11 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
3094
2960
  isScroll: true
3095
2961
  });
3096
2962
  }
2963
+
3097
2964
  /**
3098
2965
  * Add scroll event listener when tooltip show
3099
2966
  * automatically hide the tooltip when scrolling
3100
2967
  */
3101
-
3102
2968
  }, {
3103
2969
  key: "addScrollListener",
3104
2970
  value: function addScrollListener(currentTarget) {
@@ -3110,43 +2976,43 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
3110
2976
  value: function removeScrollListener(currentTarget) {
3111
2977
  var isCaptureMode = this.isCapture(currentTarget);
3112
2978
  window.removeEventListener('scroll', this.hideTooltipOnScroll, isCaptureMode);
3113
- } // Calculation the position
2979
+ }
3114
2980
 
2981
+ // Calculation the position
3115
2982
  }, {
3116
2983
  key: "updatePosition",
3117
2984
  value: function updatePosition(callbackAfter) {
3118
2985
  var _this7 = this;
3119
-
3120
2986
  var _this$state2 = this.state,
3121
- currentEvent = _this$state2.currentEvent,
3122
- currentTarget = _this$state2.currentTarget,
3123
- place = _this$state2.place,
3124
- desiredPlace = _this$state2.desiredPlace,
3125
- effect = _this$state2.effect,
3126
- offset = _this$state2.offset;
2987
+ currentEvent = _this$state2.currentEvent,
2988
+ currentTarget = _this$state2.currentTarget,
2989
+ place = _this$state2.place,
2990
+ desiredPlace = _this$state2.desiredPlace,
2991
+ effect = _this$state2.effect,
2992
+ offset = _this$state2.offset;
3127
2993
  var node = this.tooltipRef;
3128
2994
  var result = getPosition(currentEvent, currentTarget, node, place, desiredPlace, effect, offset);
3129
-
3130
2995
  if (result.position && this.props.overridePosition) {
3131
2996
  result.position = this.props.overridePosition(result.position, currentEvent, currentTarget, node, place, desiredPlace, effect, offset);
3132
2997
  }
3133
-
3134
2998
  if (result.isNewState) {
3135
2999
  // Switch to reverse placement
3136
3000
  return this.setState(result.newState, function () {
3137
3001
  _this7.updatePosition(callbackAfter);
3138
3002
  });
3139
3003
  }
3004
+ if (callbackAfter && typeof callbackAfter === 'function') {
3005
+ callbackAfter();
3006
+ }
3140
3007
 
3141
- callbackAfter(); // Set tooltip position
3142
-
3008
+ // Set tooltip position
3143
3009
  node.style.left = result.position.left + 'px';
3144
3010
  node.style.top = result.position.top + 'px';
3145
3011
  }
3012
+
3146
3013
  /**
3147
3014
  * CLear all kinds of timeout of interval
3148
3015
  */
3149
-
3150
3016
  }, {
3151
3017
  key: "clearTimer",
3152
3018
  value: function clearTimer() {
@@ -3154,17 +3020,14 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
3154
3020
  clearTimeout(this.delayShowLoop);
3155
3021
  this.delayShowLoop = null;
3156
3022
  }
3157
-
3158
3023
  if (this.delayHideLoop) {
3159
3024
  clearTimeout(this.delayHideLoop);
3160
3025
  this.delayHideLoop = null;
3161
3026
  }
3162
-
3163
3027
  if (this.delayReshow) {
3164
3028
  clearTimeout(this.delayReshow);
3165
3029
  this.delayReshow = null;
3166
3030
  }
3167
-
3168
3031
  if (this.intervalUpdateContent) {
3169
3032
  clearInterval(this.intervalUpdateContent);
3170
3033
  this.intervalUpdateContent = null;
@@ -3174,7 +3037,6 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
3174
3037
  key: "hasCustomColors",
3175
3038
  value: function hasCustomColors() {
3176
3039
  var _this8 = this;
3177
-
3178
3040
  return Boolean(Object.keys(this.state.customColors).find(function (color) {
3179
3041
  return color !== 'border' && _this8.state.customColors[color];
3180
3042
  }) || this.state.border && this.state.customColors['border']);
@@ -3183,27 +3045,24 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
3183
3045
  key: "render",
3184
3046
  value: function render() {
3185
3047
  var _this9 = this;
3186
-
3187
3048
  var _this$state3 = this.state,
3188
- extraClass = _this$state3.extraClass,
3189
- html = _this$state3.html,
3190
- ariaProps = _this$state3.ariaProps,
3191
- disable = _this$state3.disable,
3192
- uuid = _this$state3.uuid;
3049
+ extraClass = _this$state3.extraClass,
3050
+ html = _this$state3.html,
3051
+ ariaProps = _this$state3.ariaProps,
3052
+ disable = _this$state3.disable,
3053
+ uuid = _this$state3.uuid;
3193
3054
  var content = this.getTooltipContent();
3194
3055
  var isEmptyTip = this.isEmptyTip(content);
3195
3056
  var style = generateTooltipStyle(this.state.uuid, this.state.customColors, this.state.type, this.state.border, this.state.padding);
3196
- var tooltipClass = '__react_component_tooltip' + " ".concat(this.state.uuid) + (this.state.show && !disable && !isEmptyTip ? ' show' : '') + (this.state.border ? ' border' : '') + " place-".concat(this.state.place) + // top, bottom, left, right
3197
- " type-".concat(this.hasCustomColors() ? 'custom' : this.state.type) + ( // dark, success, warning, error, info, light, custom
3057
+ var tooltipClass = '__react_component_tooltip' + " ".concat(this.state.uuid) + (this.state.show && !disable && !isEmptyTip ? ' show' : '') + (this.state.border ? ' ' + this.state.borderClass : '') + " place-".concat(this.state.place) + // top, bottom, left, right
3058
+ " type-".concat(this.hasCustomColors() ? 'custom' : this.state.type) + (
3059
+ // dark, success, warning, error, info, light, custom
3198
3060
  this.props.delayUpdate ? ' allow_hover' : '') + (this.props.clickable ? ' allow_click' : '');
3199
3061
  var Wrapper = this.props.wrapper;
3200
-
3201
3062
  if (ReactTooltip.supportedWrappers.indexOf(Wrapper) < 0) {
3202
3063
  Wrapper = ReactTooltip.defaultProps.wrapper;
3203
3064
  }
3204
-
3205
3065
  var wrapperClassName = [tooltipClass, extraClass].filter(Boolean).join(' ');
3206
-
3207
3066
  if (html) {
3208
3067
  var htmlContent = "".concat(content, "\n<style aria-hidden=\"true\">").concat(style, "</style>");
3209
3068
  return /*#__PURE__*/React.createElement(Wrapper, _extends({
@@ -3248,6 +3107,7 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
3248
3107
  padding: PropTypes.string,
3249
3108
  multiline: PropTypes.bool,
3250
3109
  border: PropTypes.bool,
3110
+ borderClass: PropTypes.string,
3251
3111
  textColor: PropTypes.string,
3252
3112
  backgroundColor: PropTypes.string,
3253
3113
  borderColor: PropTypes.string,
@@ -3286,17 +3146,14 @@ var ReactTooltip = staticMethods(_class = windowListener(_class = customEvent(_c
3286
3146
  var isChanged = Object.keys(newAriaProps).some(function (props) {
3287
3147
  return newAriaProps[props] !== ariaProps[props];
3288
3148
  });
3289
-
3290
3149
  if (!isChanged) {
3291
3150
  return null;
3292
3151
  }
3293
-
3294
3152
  return _objectSpread2(_objectSpread2({}, prevState), {}, {
3295
3153
  ariaProps: newAriaProps
3296
3154
  });
3297
3155
  }
3298
3156
  }]);
3299
-
3300
3157
  return ReactTooltip;
3301
3158
  }(React.Component), _defineProperty(_class2, "defaultProps", {
3302
3159
  insecure: true,