react-tooltip 3.8.4 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -3
- package/README.md +10 -5
- package/dist/index.js +19 -14
- package/dist/style.js +1 -1
- package/package.json +3 -4
- package/standalone/react-tooltip.js +1002 -9738
- package/standalone/react-tooltip.min.js +2 -8
- package/yarn.lock +117 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,55 @@
|
|
|
1
1
|
## Change Log
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### v3.9.0 (2018/11/07 00:43 +00:00)
|
|
4
|
+
- [#452](https://github.com/wwayne/react-tooltip/pull/452) docs(README.md): Updates demo url (@tjFogarty)
|
|
5
|
+
- [#439](https://github.com/wwayne/react-tooltip/pull/439) added support for passing options to sanitizeHtml (@icheishvili)
|
|
6
|
+
- [#433](https://github.com/wwayne/react-tooltip/pull/433) Use capture mode with globalEventOff (@apandichi)
|
|
7
|
+
|
|
8
|
+
### v3.8.4 (2018/09/12 18:00 +00:00)
|
|
9
|
+
- [#428](https://github.com/wwayne/react-tooltip/pull/428) fix(example): <p> warning from react, make text match code. (@aronhelser)
|
|
10
|
+
|
|
11
|
+
### v3.8.3 (2018/09/12 13:47 +00:00)
|
|
12
|
+
- [#426](https://github.com/wwayne/react-tooltip/pull/426) perf(Use sanitize-html-react instead of sanitize-html) (@jgerlier)
|
|
13
|
+
- [#425](https://github.com/wwayne/react-tooltip/pull/425) fix(index.js): fix state initialization (@MtBlue81)
|
|
14
|
+
|
|
15
|
+
### v3.8.2 (2018/09/11 17:55 +00:00)
|
|
16
|
+
- [#413](https://github.com/wwayne/react-tooltip/pull/413) fix(index.js): Use correct orientation when mouse enters (@an4ger)
|
|
17
|
+
|
|
18
|
+
### v3.8.1 (2018/09/06 14:07 +00:00)
|
|
19
|
+
- [#422](https://github.com/wwayne/react-tooltip/pull/422) fix(tooltip): sanitize HTML to prevent XSS (@wichniowski)
|
|
20
|
+
|
|
21
|
+
### v3.7.0 (2018/09/03 15:13 +00:00)
|
|
22
|
+
- [#416](https://github.com/wwayne/react-tooltip/pull/416) feat(mouseover): Add ability to hover on tooltip. (@RobertGary1)
|
|
23
|
+
- [#414](https://github.com/wwayne/react-tooltip/pull/414) Fixed jsdoc return typos (@AlexanderEllis)
|
|
24
|
+
- [#399](https://github.com/wwayne/react-tooltip/pull/399) Fixes Typos (@jstettner)
|
|
25
|
+
- [#391](https://github.com/wwayne/react-tooltip/pull/391) fix(positioning): make sure tooltip is oriented correctly when close to edge (@hassanbot)
|
|
26
|
+
|
|
27
|
+
### v3.6.1 (2018/06/05 13:46 +00:00)
|
|
28
|
+
- [#389](https://github.com/wwayne/react-tooltip/pull/389) fix(isCapture): guard use of currentTarget (@aronhelser)
|
|
29
|
+
- [#384](https://github.com/wwayne/react-tooltip/pull/384) Detach custom event listener (@P0lip)
|
|
30
|
+
|
|
31
|
+
### v3.6.0 (2018/05/15 18:03 +00:00)
|
|
32
|
+
- [#360](https://github.com/wwayne/react-tooltip/pull/360) Compute or enrich tip content (@austil)
|
|
33
|
+
|
|
34
|
+
### v3.5.1 (2018/05/03 18:11 +00:00)
|
|
35
|
+
- [#380](https://github.com/wwayne/react-tooltip/pull/380) fix(examples): add SVG example (@P0lip)
|
|
36
|
+
- [#379](https://github.com/wwayne/react-tooltip/pull/379) ci(gh-pages): Allow travis to publish new examples to github (@aronhelser)
|
|
37
|
+
- [#366](https://github.com/wwayne/react-tooltip/pull/366) Make getPosition() calculate offsets correctly for svg elements (@P0lip)
|
|
38
|
+
- [#310](https://github.com/wwayne/react-tooltip/pull/310) Update position with content (@stefanhayden)
|
|
39
|
+
- [#368](https://github.com/wwayne/react-tooltip/pull/368) Fix issue where tooltip won't show for adjacent elements. (@tishihar94)
|
|
40
|
+
- [#376](https://github.com/wwayne/react-tooltip/pull/376) Add displayName (@clehnert-psl)
|
|
41
|
+
- [#375](https://github.com/wwayne/react-tooltip/pull/375) test(scrolling): Add example showing tooltip inside scrolling div (@aronhelser)
|
|
42
|
+
|
|
43
|
+
### v3.5.0 (2018/04/11 18:04 +00:00)
|
|
44
|
+
- [#281](https://github.com/wwayne/react-tooltip/pull/281) Get tooltip content dynamically in the render method (@alfonsomunozpomer)
|
|
45
|
+
|
|
46
|
+
### v3.4.3 (2018/04/11 15:14 +00:00)
|
|
4
47
|
- [#207](https://github.com/wwayne/react-tooltip/pull/207) Return tooltip to original position when possible (@hassanbot)
|
|
5
48
|
- [#301](https://github.com/wwayne/react-tooltip/pull/301) insert css as first to allow easy css styling without important (@roblan)
|
|
6
49
|
|
|
7
50
|
### 3.4.2 (2018/04/09 18:58 +00:00)
|
|
8
51
|
- [#373](https://github.com/wwayne/react-tooltip/pull/373) fix(example): 'made dev' works again, small fixes. (@aronhelser)
|
|
9
|
-
- [#337](https://github.com/wwayne/react-tooltip/pull/337) Fix README show tip usage error (@
|
|
52
|
+
- [#337](https://github.com/wwayne/react-tooltip/pull/337) Fix README show tip usage error (@sivagao)
|
|
10
53
|
- [#359](https://github.com/wwayne/react-tooltip/pull/359) License should use H2 as the previous sections do (@konekoya)
|
|
11
54
|
|
|
12
55
|
### 3.4.1 (2018/04/05 17:24 +00:00)
|
|
@@ -89,7 +132,7 @@
|
|
|
89
132
|
- [#162](https://github.com/wwayne/react-tooltip/pull/162) Fix for #158, getposition error (@wwayne)
|
|
90
133
|
|
|
91
134
|
### 3.1.1 (2016/07/27 13:03 +00:00)
|
|
92
|
-
- [#151](https://github.com/wwayne/react-tooltip/pull/151) Update postion calculation so that it can calculate continous
|
|
135
|
+
- [#151](https://github.com/wwayne/react-tooltip/pull/151) Update postion calculation so that it can calculate continous tootlip (@wwayne)
|
|
93
136
|
|
|
94
137
|
### 3.1.0 (2016/07/27 08:49 +00:00)
|
|
95
138
|
- [#149](https://github.com/wwayne/react-tooltip/pull/149) Update algorithm for get positon to fix the shake problem #146 (@wwayne)
|
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ Notes:
|
|
|
50
50
|
* The option you set on `<ReactTooltip />` component will be implemented on every tooltip in a same page: `<ReactTooltip effect="solid" />`
|
|
51
51
|
* The option you set on a specific element, for example: `<a data-type="warning"></a>` will only affect this specific tooltip
|
|
52
52
|
|
|
53
|
-
Check example: [React-tooltip Test](
|
|
53
|
+
Check example: [React-tooltip Test](https://react-tooltip.netlify.com/)
|
|
54
54
|
|
|
55
55
|
Global|Specific |Type |Values | Description
|
|
56
56
|
|:---|:---|:---|:---|:----
|
|
@@ -64,22 +64,27 @@ Global|Specific |Type |Values | Description
|
|
|
64
64
|
offset | data-offset | Object | top, right, bottom, left | `data-offset="{'top': 10, 'left': 10}"` for specific and `offset={{top: 10, left: 10}}` for global
|
|
65
65
|
multiline | data-multiline | Bool | true, false | support `<br>`, `<br />` to make multiline
|
|
66
66
|
className | data-class | String | | extra custom class, can use !important to overwrite react-tooltip's default class
|
|
67
|
-
html | data-html | Bool | true, false | `<p data-tip="<p>HTML tooltip</p>" data-html={true}></p>` or `<ReactTooltip html={true}
|
|
67
|
+
html | data-html | Bool | true, false | `<p data-tip="<p>HTML tooltip</p>" data-html={true}></p>` or `<ReactTooltip html={true} />`, but see [Security Note](#security-note) below.
|
|
68
68
|
delayHide | data-delay-hide | Number | | `<p data-tip="tooltip" data-delay-hide='1000'></p>` or `<ReactTooltip delayHide={1000} />`
|
|
69
69
|
delayShow | data-delay-show | Number | | `<p data-tip="tooltip" data-delay-show='1000'></p>` or `<ReactTooltip delayShow={1000} />`
|
|
70
70
|
delayUpdate | data-delay-update | Number | | `<p data-tip="tooltip" data-delay-update='1000'></p>` or `<ReactTooltip delayUpdate={1000} />` Sets a delay in calling getContent if the tooltip is already shown and you mouse over another target
|
|
71
71
|
insecure | null | Bool | true, false | Whether to inject the style header into the page dynamically (violates CSP style-src but is a convenient default)
|
|
72
72
|
border | data-border | Bool | true, false | Add one pixel white border
|
|
73
73
|
getContent | null | Func or Array | (dataTip) => {}, [(dataTip) => {}, Interval] | Generate the tip content dynamically
|
|
74
|
-
afterShow | null | Func | () => {} | Function that will be called after tooltip show
|
|
75
|
-
afterHide | null | Func | () => {} | Function that will be called after tooltip hide
|
|
74
|
+
afterShow | null | Func | (evt) => {} | Function that will be called after tooltip show, with event that triggered show
|
|
75
|
+
afterHide | null | Func | (evt) => {} | Function that will be called after tooltip hide, with event that triggered hide
|
|
76
76
|
disable | data-tip-disable | Bool | true, false | Disable the tooltip behaviour, default is false
|
|
77
77
|
scrollHide | data-scroll-hide | Bool | true, false | Hide the tooltip when scrolling, default is true
|
|
78
78
|
resizeHide | null | Bool | true, false | Hide the tooltip when resizing the window, default is true
|
|
79
79
|
wrapper | null | String | div, span | Selecting the wrapper element of the react tooltip, default is div
|
|
80
|
+
clickable | null | Bool | true, false | Enables tooltip to respond to mouse (or touch) events, default is false
|
|
81
|
+
|
|
82
|
+
### Security Note
|
|
83
|
+
|
|
84
|
+
The `html` option allows a tooltip to directly display raw HTML. This is a security risk if any of that content is supplied by the user. Any user-supplied content must be sanitized, using a package like [sanitize-html-react](https://www.npmjs.com/package/sanitize-html-react). We chose not to include sanitization after discovering it [increased our package size](https://github.com/wwayne/react-tooltip/issues/429) too much - we don't want to penalize people who don't use the `html` option.
|
|
80
85
|
|
|
81
86
|
## Using react component as tooltip
|
|
82
|
-
Check the example [React-tooltip Test](
|
|
87
|
+
Check the example [React-tooltip Test](https://react-tooltip.netlify.com/)
|
|
83
88
|
|
|
84
89
|
##### Note:
|
|
85
90
|
1. **data-tip** is necessary, because `<ReactTooltip />` finds the tooltip via this attribute
|
package/dist/index.js
CHANGED
|
@@ -31,10 +31,6 @@ var _classnames = require('classnames');
|
|
|
31
31
|
|
|
32
32
|
var _classnames2 = _interopRequireDefault(_classnames);
|
|
33
33
|
|
|
34
|
-
var _sanitizeHtmlReact = require('sanitize-html-react');
|
|
35
|
-
|
|
36
|
-
var _sanitizeHtmlReact2 = _interopRequireDefault(_sanitizeHtmlReact);
|
|
37
|
-
|
|
38
34
|
var _staticMethods = require('./decorators/staticMethods');
|
|
39
35
|
|
|
40
36
|
var _staticMethods2 = _interopRequireDefault(_staticMethods);
|
|
@@ -191,9 +187,15 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
|
|
|
191
187
|
|
|
192
188
|
|
|
193
189
|
if (show && this.tooltipRef) {
|
|
194
|
-
/* old IE work around */
|
|
190
|
+
/* old IE or Firefox work around */
|
|
195
191
|
if (!this.tooltipRef.matches) {
|
|
196
|
-
|
|
192
|
+
/* old IE work around */
|
|
193
|
+
if (this.tooltipRef.msMatchesSelector) {
|
|
194
|
+
this.tooltipRef.matches = this.tooltipRef.msMatchesSelector;
|
|
195
|
+
} else {
|
|
196
|
+
/* old Firefox work around */
|
|
197
|
+
this.tooltipRef.matches = this.tooltipRef.mozMatchesSelector;
|
|
198
|
+
}
|
|
197
199
|
}
|
|
198
200
|
return this.tooltipRef.matches(':hover');
|
|
199
201
|
}
|
|
@@ -229,7 +231,8 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
|
|
|
229
231
|
|
|
230
232
|
var _props2 = this.props,
|
|
231
233
|
id = _props2.id,
|
|
232
|
-
globalEventOff = _props2.globalEventOff
|
|
234
|
+
globalEventOff = _props2.globalEventOff,
|
|
235
|
+
isCapture = _props2.isCapture;
|
|
233
236
|
|
|
234
237
|
var targetArray = this.getTargetArray(id);
|
|
235
238
|
|
|
@@ -256,7 +259,7 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
|
|
|
256
259
|
// Global event to hide tooltip
|
|
257
260
|
if (globalEventOff) {
|
|
258
261
|
window.removeEventListener(globalEventOff, this.hideTooltip);
|
|
259
|
-
window.addEventListener(globalEventOff, this.hideTooltip,
|
|
262
|
+
window.addEventListener(globalEventOff, this.hideTooltip, isCapture);
|
|
260
263
|
}
|
|
261
264
|
|
|
262
265
|
// Track removal of targetArray elements from DOM
|
|
@@ -456,7 +459,7 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
|
|
|
456
459
|
show: true
|
|
457
460
|
}, function () {
|
|
458
461
|
_this5.updatePosition();
|
|
459
|
-
if (isInvisible && afterShow) afterShow();
|
|
462
|
+
if (isInvisible && afterShow) afterShow(e);
|
|
460
463
|
});
|
|
461
464
|
}
|
|
462
465
|
};
|
|
@@ -533,7 +536,7 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
|
|
|
533
536
|
show: false
|
|
534
537
|
}, function () {
|
|
535
538
|
_this6.removeScrollListener();
|
|
536
|
-
if (isVisible && afterHide) afterHide();
|
|
539
|
+
if (isVisible && afterHide) afterHide(e);
|
|
537
540
|
});
|
|
538
541
|
};
|
|
539
542
|
|
|
@@ -638,7 +641,7 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
|
|
|
638
641
|
|
|
639
642
|
var placeholder = this.getTooltipContent();
|
|
640
643
|
var isEmptyTip = this.isEmptyTip(placeholder);
|
|
641
|
-
var tooltipClass = (0, _classnames2.default)('__react_component_tooltip', { 'show': this.state.show && !disable && !isEmptyTip }, { 'border': this.state.border }, { 'place-top': this.state.place === 'top' }, { 'place-bottom': this.state.place === 'bottom' }, { 'place-left': this.state.place === 'left' }, { 'place-right': this.state.place === 'right' }, { 'type-dark': this.state.type === 'dark' }, { 'type-success': this.state.type === 'success' }, { 'type-warning': this.state.type === 'warning' }, { 'type-error': this.state.type === 'error' }, { 'type-info': this.state.type === 'info' }, { 'type-light': this.state.type === 'light' }, { 'allow_hover': this.props.delayUpdate });
|
|
644
|
+
var tooltipClass = (0, _classnames2.default)('__react_component_tooltip', { 'show': this.state.show && !disable && !isEmptyTip }, { 'border': this.state.border }, { 'place-top': this.state.place === 'top' }, { 'place-bottom': this.state.place === 'bottom' }, { 'place-left': this.state.place === 'left' }, { 'place-right': this.state.place === 'right' }, { 'type-dark': this.state.type === 'dark' }, { 'type-success': this.state.type === 'success' }, { 'type-warning': this.state.type === 'warning' }, { 'type-error': this.state.type === 'error' }, { 'type-info': this.state.type === 'info' }, { 'type-light': this.state.type === 'light' }, { 'allow_hover': this.props.delayUpdate }, { 'allow_click': this.props.clickable });
|
|
642
645
|
|
|
643
646
|
var Wrapper = this.props.wrapper;
|
|
644
647
|
if (ReactTooltip.supportedWrappers.indexOf(Wrapper) < 0) {
|
|
@@ -653,7 +656,7 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
|
|
|
653
656
|
}
|
|
654
657
|
}, ariaProps, {
|
|
655
658
|
'data-id': 'tooltip',
|
|
656
|
-
dangerouslySetInnerHTML: { __html:
|
|
659
|
+
dangerouslySetInnerHTML: { __html: placeholder } }));
|
|
657
660
|
} else {
|
|
658
661
|
return _react2.default.createElement(
|
|
659
662
|
Wrapper,
|
|
@@ -698,11 +701,13 @@ var ReactTooltip = (0, _staticMethods2.default)(_class = (0, _windowListener2.de
|
|
|
698
701
|
disable: _propTypes2.default.bool,
|
|
699
702
|
scrollHide: _propTypes2.default.bool,
|
|
700
703
|
resizeHide: _propTypes2.default.bool,
|
|
701
|
-
wrapper: _propTypes2.default.string
|
|
704
|
+
wrapper: _propTypes2.default.string,
|
|
705
|
+
clickable: _propTypes2.default.bool
|
|
702
706
|
}, _class2.defaultProps = {
|
|
703
707
|
insecure: true,
|
|
704
708
|
resizeHide: true,
|
|
705
|
-
wrapper: 'div'
|
|
709
|
+
wrapper: 'div',
|
|
710
|
+
clickable: false
|
|
706
711
|
}, _class2.supportedWrappers = ['div', 'span'], _class2.displayName = 'ReactTooltip', _temp)) || _class) || _class) || _class) || _class) || _class) || _class;
|
|
707
712
|
|
|
708
713
|
/* export default not fit for standalone, it will exports {default:...} */
|
package/dist/style.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = '.__react_component_tooltip{border-radius:3px;display:inline-block;font-size:13px;left:-999em;opacity:0;padding:8px 21px;position:fixed;pointer-events:none;transition:opacity 0.3s ease-out;top:-999em;visibility:hidden;z-index:999}.__react_component_tooltip.allow_hover{pointer-events:auto}.__react_component_tooltip:before,.__react_component_tooltip:after{content:"";width:0;height:0;position:absolute}.__react_component_tooltip.show{opacity:0.9;margin-top:0px;margin-left:0px;visibility:visible}.__react_component_tooltip.type-dark{color:#fff;background-color:#222}.__react_component_tooltip.type-dark.place-top:after{border-top-color:#222;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-dark.place-bottom:after{border-bottom-color:#222;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-dark.place-left:after{border-left-color:#222;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-dark.place-right:after{border-right-color:#222;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-dark.border{border:1px solid #fff}.__react_component_tooltip.type-dark.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-dark.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-dark.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-dark.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-success{color:#fff;background-color:#8DC572}.__react_component_tooltip.type-success.place-top:after{border-top-color:#8DC572;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-success.place-bottom:after{border-bottom-color:#8DC572;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-success.place-left:after{border-left-color:#8DC572;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-success.place-right:after{border-right-color:#8DC572;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-success.border{border:1px solid #fff}.__react_component_tooltip.type-success.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-success.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-success.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-success.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-warning{color:#fff;background-color:#F0AD4E}.__react_component_tooltip.type-warning.place-top:after{border-top-color:#F0AD4E;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-warning.place-bottom:after{border-bottom-color:#F0AD4E;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-warning.place-left:after{border-left-color:#F0AD4E;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-warning.place-right:after{border-right-color:#F0AD4E;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-warning.border{border:1px solid #fff}.__react_component_tooltip.type-warning.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-warning.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-warning.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-warning.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-error{color:#fff;background-color:#BE6464}.__react_component_tooltip.type-error.place-top:after{border-top-color:#BE6464;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-error.place-bottom:after{border-bottom-color:#BE6464;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-error.place-left:after{border-left-color:#BE6464;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-error.place-right:after{border-right-color:#BE6464;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-error.border{border:1px solid #fff}.__react_component_tooltip.type-error.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-error.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-error.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-error.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-info{color:#fff;background-color:#337AB7}.__react_component_tooltip.type-info.place-top:after{border-top-color:#337AB7;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-info.place-bottom:after{border-bottom-color:#337AB7;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-info.place-left:after{border-left-color:#337AB7;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-info.place-right:after{border-right-color:#337AB7;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-info.border{border:1px solid #fff}.__react_component_tooltip.type-info.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-info.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-info.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-info.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-light{color:#222;background-color:#fff}.__react_component_tooltip.type-light.place-top:after{border-top-color:#fff;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-light.place-bottom:after{border-bottom-color:#fff;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-light.place-left:after{border-left-color:#fff;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-light.place-right:after{border-right-color:#fff;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-light.border{border:1px solid #222}.__react_component_tooltip.type-light.border.place-top:before{border-top:8px solid #222}.__react_component_tooltip.type-light.border.place-bottom:before{border-bottom:8px solid #222}.__react_component_tooltip.type-light.border.place-left:before{border-left:8px solid #222}.__react_component_tooltip.type-light.border.place-right:before{border-right:8px solid #222}.__react_component_tooltip.place-top{margin-top:-10px}.__react_component_tooltip.place-top:before{border-left:10px solid transparent;border-right:10px solid transparent;bottom:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-top:after{border-left:8px solid transparent;border-right:8px solid transparent;bottom:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-bottom{margin-top:10px}.__react_component_tooltip.place-bottom:before{border-left:10px solid transparent;border-right:10px solid transparent;top:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-bottom:after{border-left:8px solid transparent;border-right:8px solid transparent;top:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-left{margin-left:-10px}.__react_component_tooltip.place-left:before{border-top:6px solid transparent;border-bottom:6px solid transparent;right:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-left:after{border-top:5px solid transparent;border-bottom:5px solid transparent;right:-6px;top:50%;margin-top:-4px}.__react_component_tooltip.place-right{margin-left:10px}.__react_component_tooltip.place-right:before{border-top:6px solid transparent;border-bottom:6px solid transparent;left:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-right:after{border-top:5px solid transparent;border-bottom:5px solid transparent;left:-6px;top:50%;margin-top:-4px}.__react_component_tooltip .multi-line{display:block;padding:2px 0px;text-align:center}';
|
|
6
|
+
exports.default = '.__react_component_tooltip{border-radius:3px;display:inline-block;font-size:13px;left:-999em;opacity:0;padding:8px 21px;position:fixed;pointer-events:none;transition:opacity 0.3s ease-out;top:-999em;visibility:hidden;z-index:999}.__react_component_tooltip.allow_hover,.__react_component_tooltip.allow_click{pointer-events:auto}.__react_component_tooltip:before,.__react_component_tooltip:after{content:"";width:0;height:0;position:absolute}.__react_component_tooltip.show{opacity:0.9;margin-top:0px;margin-left:0px;visibility:visible}.__react_component_tooltip.type-dark{color:#fff;background-color:#222}.__react_component_tooltip.type-dark.place-top:after{border-top-color:#222;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-dark.place-bottom:after{border-bottom-color:#222;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-dark.place-left:after{border-left-color:#222;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-dark.place-right:after{border-right-color:#222;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-dark.border{border:1px solid #fff}.__react_component_tooltip.type-dark.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-dark.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-dark.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-dark.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-success{color:#fff;background-color:#8DC572}.__react_component_tooltip.type-success.place-top:after{border-top-color:#8DC572;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-success.place-bottom:after{border-bottom-color:#8DC572;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-success.place-left:after{border-left-color:#8DC572;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-success.place-right:after{border-right-color:#8DC572;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-success.border{border:1px solid #fff}.__react_component_tooltip.type-success.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-success.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-success.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-success.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-warning{color:#fff;background-color:#F0AD4E}.__react_component_tooltip.type-warning.place-top:after{border-top-color:#F0AD4E;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-warning.place-bottom:after{border-bottom-color:#F0AD4E;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-warning.place-left:after{border-left-color:#F0AD4E;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-warning.place-right:after{border-right-color:#F0AD4E;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-warning.border{border:1px solid #fff}.__react_component_tooltip.type-warning.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-warning.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-warning.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-warning.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-error{color:#fff;background-color:#BE6464}.__react_component_tooltip.type-error.place-top:after{border-top-color:#BE6464;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-error.place-bottom:after{border-bottom-color:#BE6464;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-error.place-left:after{border-left-color:#BE6464;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-error.place-right:after{border-right-color:#BE6464;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-error.border{border:1px solid #fff}.__react_component_tooltip.type-error.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-error.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-error.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-error.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-info{color:#fff;background-color:#337AB7}.__react_component_tooltip.type-info.place-top:after{border-top-color:#337AB7;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-info.place-bottom:after{border-bottom-color:#337AB7;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-info.place-left:after{border-left-color:#337AB7;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-info.place-right:after{border-right-color:#337AB7;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-info.border{border:1px solid #fff}.__react_component_tooltip.type-info.border.place-top:before{border-top:8px solid #fff}.__react_component_tooltip.type-info.border.place-bottom:before{border-bottom:8px solid #fff}.__react_component_tooltip.type-info.border.place-left:before{border-left:8px solid #fff}.__react_component_tooltip.type-info.border.place-right:before{border-right:8px solid #fff}.__react_component_tooltip.type-light{color:#222;background-color:#fff}.__react_component_tooltip.type-light.place-top:after{border-top-color:#fff;border-top-style:solid;border-top-width:6px}.__react_component_tooltip.type-light.place-bottom:after{border-bottom-color:#fff;border-bottom-style:solid;border-bottom-width:6px}.__react_component_tooltip.type-light.place-left:after{border-left-color:#fff;border-left-style:solid;border-left-width:6px}.__react_component_tooltip.type-light.place-right:after{border-right-color:#fff;border-right-style:solid;border-right-width:6px}.__react_component_tooltip.type-light.border{border:1px solid #222}.__react_component_tooltip.type-light.border.place-top:before{border-top:8px solid #222}.__react_component_tooltip.type-light.border.place-bottom:before{border-bottom:8px solid #222}.__react_component_tooltip.type-light.border.place-left:before{border-left:8px solid #222}.__react_component_tooltip.type-light.border.place-right:before{border-right:8px solid #222}.__react_component_tooltip.place-top{margin-top:-10px}.__react_component_tooltip.place-top:before{border-left:10px solid transparent;border-right:10px solid transparent;bottom:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-top:after{border-left:8px solid transparent;border-right:8px solid transparent;bottom:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-bottom{margin-top:10px}.__react_component_tooltip.place-bottom:before{border-left:10px solid transparent;border-right:10px solid transparent;top:-8px;left:50%;margin-left:-10px}.__react_component_tooltip.place-bottom:after{border-left:8px solid transparent;border-right:8px solid transparent;top:-6px;left:50%;margin-left:-8px}.__react_component_tooltip.place-left{margin-left:-10px}.__react_component_tooltip.place-left:before{border-top:6px solid transparent;border-bottom:6px solid transparent;right:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-left:after{border-top:5px solid transparent;border-bottom:5px solid transparent;right:-6px;top:50%;margin-top:-4px}.__react_component_tooltip.place-right{margin-left:10px}.__react_component_tooltip.place-right:before{border-top:6px solid transparent;border-bottom:6px solid transparent;left:-8px;top:50%;margin-top:-5px}.__react_component_tooltip.place-right:after{border-top:5px solid transparent;border-bottom:5px solid transparent;left:-6px;top:50%;margin-top:-4px}.__react_component_tooltip .multi-line{display:block;padding:2px 0px;text-align:center}';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-tooltip",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "react tooltip component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -54,8 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"classnames": "^2.2.5",
|
|
57
|
-
"prop-types": "^15.6.0"
|
|
58
|
-
"sanitize-html-react": "^1.13.0"
|
|
57
|
+
"prop-types": "^15.6.0"
|
|
59
58
|
},
|
|
60
59
|
"engines": {
|
|
61
60
|
"node": ">=4.2.1"
|
|
@@ -93,6 +92,6 @@
|
|
|
93
92
|
"snazzy": "^2.0.1",
|
|
94
93
|
"standard": "^5.2.2",
|
|
95
94
|
"uglifyjs": "^2.4.10",
|
|
96
|
-
"watchify": "^3.
|
|
95
|
+
"watchify": "^3.11.0"
|
|
97
96
|
}
|
|
98
97
|
}
|