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

rc-tooltip

Package Overview
Dependencies
Maintainers
7
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 4.0.3 to 4.1.0

4

es/Tooltip.d.ts

@@ -20,3 +20,5 @@ import React from 'react';

getTooltipContainer?: (node: HTMLElement) => HTMLElement;
destroyTooltipOnHide?: boolean;
destroyTooltipOnHide?: boolean | {
keepParent?: boolean;
};
align?: AlignType;

@@ -23,0 +25,0 @@ arrowContent?: React.ReactNode;

@@ -0,1 +1,3 @@

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

@@ -69,2 +71,13 @@

var destroyTooltip = false;
var autoDestroy = false;
if (typeof destroyTooltipOnHide === 'boolean') {
destroyTooltip = destroyTooltipOnHide;
} else if (destroyTooltipOnHide && _typeof(destroyTooltipOnHide) === 'object') {
var keepParent = destroyTooltipOnHide.keepParent;
destroyTooltip = keepParent === true;
autoDestroy = keepParent === false;
}
return React.createElement(Trigger, Object.assign({

@@ -85,3 +98,4 @@ popupClassName: overlayClassName,

defaultPopupVisible: defaultVisible,
destroyPopupOnHide: destroyTooltipOnHide,
destroyPopupOnHide: destroyTooltip,
autoDestroy: autoDestroy,
mouseLeaveDelay: mouseLeaveDelay,

@@ -88,0 +102,0 @@ popupStyle: overlayStyle,

@@ -20,3 +20,5 @@ import React from 'react';

getTooltipContainer?: (node: HTMLElement) => HTMLElement;
destroyTooltipOnHide?: boolean;
destroyTooltipOnHide?: boolean | {
keepParent?: boolean;
};
align?: AlignType;

@@ -23,0 +25,0 @@ arrowContent?: React.ReactNode;

"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {

@@ -24,2 +22,4 @@ value: true

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

@@ -88,2 +88,13 @@

var destroyTooltip = false;
var autoDestroy = false;
if (typeof destroyTooltipOnHide === 'boolean') {
destroyTooltip = destroyTooltipOnHide;
} else if (destroyTooltipOnHide && _typeof(destroyTooltipOnHide) === 'object') {
var keepParent = destroyTooltipOnHide.keepParent;
destroyTooltip = keepParent === true;
autoDestroy = keepParent === false;
}
return _react.default.createElement(_rcTrigger.default, Object.assign({

@@ -104,3 +115,4 @@ popupClassName: overlayClassName,

defaultPopupVisible: defaultVisible,
destroyPopupOnHide: destroyTooltipOnHide,
destroyPopupOnHide: destroyTooltip,
autoDestroy: autoDestroy,
mouseLeaveDelay: mouseLeaveDelay,

@@ -107,0 +119,0 @@ popupStyle: overlayStyle,

{
"name": "rc-tooltip",
"version": "4.0.3",
"version": "4.1.0",
"description": "React Tooltip",

@@ -40,3 +40,3 @@ "keywords": [

"dependencies": {
"rc-trigger": "^4.0.0"
"rc-trigger": "^4.2.1"
},

@@ -43,0 +43,0 @@ "devDependencies": {

@@ -185,5 +185,5 @@ # rc-tooltip

<td>destroyTooltipOnHide</td>
<td>boolean</td>
<td>boolean | { keepParent: boolean }</td>
<td>false</td>
<td>whether destroy tooltip when tooltip is hidden</td>
<td>whether destroy tooltip when tooltip is hidden.In general, destroyTooltipOnHide will only remove itself instead of parent container of it.Parent container will be removed include tooltip when keepParent is true</td>
</tr>

@@ -190,0 +190,0 @@ <tr>

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