Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-tooltip

Package Overview
Dependencies
Maintainers
3
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-tooltip - npm Package Compare versions

Comparing version 3.4.5 to 3.4.6

es/index.js

13

lib/index.js
'use strict';
module.exports = require('./Tooltip');
Object.defineProperty(exports, "__esModule", {
value: true
});
var _Tooltip = require('./Tooltip');
var _Tooltip2 = _interopRequireDefault(_Tooltip);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
exports['default'] = _Tooltip2['default'];
module.exports = exports['default'];

2

lib/placements.js

@@ -88,2 +88,2 @@ 'use strict';

exports["default"] = placements;
exports['default'] = placements;

@@ -19,2 +19,6 @@ 'use strict';

var _createClass2 = require('babel-runtime/helpers/createClass');
var _createClass3 = _interopRequireDefault(_createClass2);
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

@@ -42,11 +46,13 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var Tooltip = function (_Component) {
(0, _inherits3["default"])(Tooltip, _Component);
(0, _inherits3['default'])(Tooltip, _Component);
function Tooltip() {
var _ref;
var _temp, _this, _ret;
(0, _classCallCheck3["default"])(this, Tooltip);
(0, _classCallCheck3['default'])(this, Tooltip);

@@ -57,3 +63,3 @@ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {

return _ret = (_temp = (_this = (0, _possibleConstructorReturn3["default"])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.getPopupElement = function () {
return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, (_ref = Tooltip.__proto__ || Object.getPrototypeOf(Tooltip)).call.apply(_ref, [this].concat(args))), _this), _this.getPopupElement = function () {
var _this$props = _this.props,

@@ -64,7 +70,7 @@ arrowContent = _this$props.arrowContent,

return [_react2["default"].createElement(
return [_react2['default'].createElement(
'div',
{ className: prefixCls + '-arrow', key: 'arrow' },
arrowContent
), _react2["default"].createElement(
), _react2['default'].createElement(
'div',

@@ -74,57 +80,60 @@ { className: prefixCls + '-inner', key: 'content' },

)];
}, _temp), (0, _possibleConstructorReturn3["default"])(_this, _ret);
}, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret);
}
Tooltip.prototype.getPopupDomNode = function getPopupDomNode() {
return this.refs.trigger.getPopupDomNode();
};
(0, _createClass3['default'])(Tooltip, [{
key: 'getPopupDomNode',
value: function getPopupDomNode() {
return this.refs.trigger.getPopupDomNode();
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
overlayClassName = _props.overlayClassName,
trigger = _props.trigger,
mouseEnterDelay = _props.mouseEnterDelay,
mouseLeaveDelay = _props.mouseLeaveDelay,
overlayStyle = _props.overlayStyle,
prefixCls = _props.prefixCls,
children = _props.children,
onVisibleChange = _props.onVisibleChange,
transitionName = _props.transitionName,
animation = _props.animation,
placement = _props.placement,
align = _props.align,
destroyTooltipOnHide = _props.destroyTooltipOnHide,
defaultVisible = _props.defaultVisible,
getTooltipContainer = _props.getTooltipContainer,
restProps = (0, _objectWithoutProperties3['default'])(_props, ['overlayClassName', 'trigger', 'mouseEnterDelay', 'mouseLeaveDelay', 'overlayStyle', 'prefixCls', 'children', 'onVisibleChange', 'transitionName', 'animation', 'placement', 'align', 'destroyTooltipOnHide', 'defaultVisible', 'getTooltipContainer']);
Tooltip.prototype.render = function render() {
var _props = this.props,
overlayClassName = _props.overlayClassName,
trigger = _props.trigger,
mouseEnterDelay = _props.mouseEnterDelay,
mouseLeaveDelay = _props.mouseLeaveDelay,
overlayStyle = _props.overlayStyle,
prefixCls = _props.prefixCls,
children = _props.children,
onVisibleChange = _props.onVisibleChange,
transitionName = _props.transitionName,
animation = _props.animation,
placement = _props.placement,
align = _props.align,
destroyTooltipOnHide = _props.destroyTooltipOnHide,
defaultVisible = _props.defaultVisible,
getTooltipContainer = _props.getTooltipContainer,
restProps = (0, _objectWithoutProperties3["default"])(_props, ['overlayClassName', 'trigger', 'mouseEnterDelay', 'mouseLeaveDelay', 'overlayStyle', 'prefixCls', 'children', 'onVisibleChange', 'transitionName', 'animation', 'placement', 'align', 'destroyTooltipOnHide', 'defaultVisible', 'getTooltipContainer']);
var extraProps = (0, _extends3["default"])({}, restProps);
if ('visible' in this.props) {
extraProps.popupVisible = this.props.visible;
var extraProps = (0, _extends3['default'])({}, restProps);
if ('visible' in this.props) {
extraProps.popupVisible = this.props.visible;
}
return _react2['default'].createElement(
_rcTrigger2['default'],
(0, _extends3['default'])({
popupClassName: overlayClassName,
ref: 'trigger',
prefixCls: prefixCls,
popup: this.getPopupElement,
action: trigger,
builtinPlacements: _placements.placements,
popupPlacement: placement,
popupAlign: align,
getPopupContainer: getTooltipContainer,
onPopupVisibleChange: onVisibleChange,
popupTransitionName: transitionName,
popupAnimation: animation,
defaultPopupVisible: defaultVisible,
destroyPopupOnHide: destroyTooltipOnHide,
mouseLeaveDelay: mouseLeaveDelay,
popupStyle: overlayStyle,
mouseEnterDelay: mouseEnterDelay
}, extraProps),
children
);
}
return _react2["default"].createElement(
_rcTrigger2["default"],
(0, _extends3["default"])({
popupClassName: overlayClassName,
ref: 'trigger',
prefixCls: prefixCls,
popup: this.getPopupElement,
action: trigger,
builtinPlacements: _placements.placements,
popupPlacement: placement,
popupAlign: align,
getPopupContainer: getTooltipContainer,
onPopupVisibleChange: onVisibleChange,
popupTransitionName: transitionName,
popupAnimation: animation,
defaultPopupVisible: defaultVisible,
destroyPopupOnHide: destroyTooltipOnHide,
mouseLeaveDelay: mouseLeaveDelay,
popupStyle: overlayStyle,
mouseEnterDelay: mouseEnterDelay
}, extraProps),
children
);
};
}]);
return Tooltip;

@@ -134,21 +143,21 @@ }(_react.Component);

Tooltip.propTypes = {
trigger: _propTypes2["default"].any,
children: _propTypes2["default"].any,
defaultVisible: _propTypes2["default"].bool,
visible: _propTypes2["default"].bool,
placement: _propTypes2["default"].string,
transitionName: _propTypes2["default"].string,
animation: _propTypes2["default"].any,
onVisibleChange: _propTypes2["default"].func,
afterVisibleChange: _propTypes2["default"].func,
overlay: _propTypes2["default"].oneOfType([_propTypes2["default"].node, _propTypes2["default"].func]).isRequired,
overlayStyle: _propTypes2["default"].object,
overlayClassName: _propTypes2["default"].string,
prefixCls: _propTypes2["default"].string,
mouseEnterDelay: _propTypes2["default"].number,
mouseLeaveDelay: _propTypes2["default"].number,
getTooltipContainer: _propTypes2["default"].func,
destroyTooltipOnHide: _propTypes2["default"].bool,
align: _propTypes2["default"].object,
arrowContent: _propTypes2["default"].any
trigger: _propTypes2['default'].any,
children: _propTypes2['default'].any,
defaultVisible: _propTypes2['default'].bool,
visible: _propTypes2['default'].bool,
placement: _propTypes2['default'].string,
transitionName: _propTypes2['default'].string,
animation: _propTypes2['default'].any,
onVisibleChange: _propTypes2['default'].func,
afterVisibleChange: _propTypes2['default'].func,
overlay: _propTypes2['default'].oneOfType([_propTypes2['default'].node, _propTypes2['default'].func]).isRequired,
overlayStyle: _propTypes2['default'].object,
overlayClassName: _propTypes2['default'].string,
prefixCls: _propTypes2['default'].string,
mouseEnterDelay: _propTypes2['default'].number,
mouseLeaveDelay: _propTypes2['default'].number,
getTooltipContainer: _propTypes2['default'].func,
destroyTooltipOnHide: _propTypes2['default'].bool,
align: _propTypes2['default'].object,
arrowContent: _propTypes2['default'].any
};

@@ -165,3 +174,3 @@ Tooltip.defaultProps = {

};
exports["default"] = Tooltip;
exports['default'] = Tooltip;
module.exports = exports['default'];
{
"name": "rc-tooltip",
"version": "3.4.5",
"version": "3.4.6",
"description": "React Tooltip",

@@ -13,5 +13,7 @@ "keywords": [

"lib",
"es",
"assets/*.css"
],
"main": "lib/index",
"module": "es/index",
"homepage": "http://github.com/react-component/tooltip",

@@ -36,10 +38,11 @@ "maintainers": [

"start": "rc-tools run server",
"compile": "rc-tools run compile --babel-runtime",
"pub": "rc-tools run pub --babel-runtime",
"lint": "rc-tools run lint",
"karma": "rc-tools run karma",
"saucelabs": "rc-tools run saucelabs",
"test": "rc-tools run test",
"karma": "rc-test run karma",
"saucelabs": "rc-test run saucelabs",
"test": "rc-test run test",
"prepublish": "rc-tools run guard",
"chrome-test": "rc-tools run chrome-test",
"coverage": "rc-tools run coverage"
"chrome-test": "rc-test run chrome-test",
"coverage": "rc-test run coverage"
},

@@ -53,3 +56,4 @@ "devDependencies": {

"pre-commit": "1.x",
"rc-tools": "5.x",
"rc-test": "^6.0.1",
"rc-tools": "6.x",
"react": "15.x",

@@ -56,0 +60,0 @@ "react-dom": "15.x"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc