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 5.0.2 to 5.1.0

CHANGELOG.md

8

es/Tooltip.d.ts
import * as React from 'react';
import { TriggerProps } from 'rc-trigger';
import { AlignType, AnimationType, ActionType } from 'rc-trigger/lib/interface';
import type { TriggerProps } from 'rc-trigger';
import type { AlignType, AnimationType, ActionType } from 'rc-trigger/lib/interface';
export interface TooltipProps extends Pick<TriggerProps, 'onPopupAlign' | 'builtinPlacements'> {

@@ -9,4 +9,8 @@ trigger?: ActionType | ActionType[];

placement?: string;
/** @deprecated Use `motion` instead */
transitionName?: string;
/** @deprecated Use `motion` instead */
animation?: AnimationType;
/** Config popup motion */
motion?: TriggerProps['popupMotion'];
onVisibleChange?: (visible: boolean) => void;

@@ -13,0 +17,0 @@ afterVisibleChange?: (visible: boolean) => void;

@@ -0,1 +1,2 @@

import _extends from "@babel/runtime/helpers/esm/extends";
import _typeof from "@babel/runtime/helpers/esm/typeof";

@@ -26,2 +27,3 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";

animation = props.animation,
motion = props.motion,
_props$placement = props.placement,

@@ -36,3 +38,3 @@ placement = _props$placement === void 0 ? 'right' : _props$placement,

overlayInnerStyle = props.overlayInnerStyle,
restProps = _objectWithoutProperties(props, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle"]);
restProps = _objectWithoutProperties(props, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle"]);

@@ -78,3 +80,3 @@ var domRef = useRef(null);

return /*#__PURE__*/React.createElement(Trigger, Object.assign({
return /*#__PURE__*/React.createElement(Trigger, _extends({
popupClassName: overlayClassName,

@@ -93,2 +95,3 @@ prefixCls: prefixCls,

popupAnimation: animation,
popupMotion: motion,
defaultPopupVisible: defaultVisible,

@@ -95,0 +98,0 @@ destroyPopupOnHide: destroyTooltip,

import * as React from 'react';
import { TriggerProps } from 'rc-trigger';
import { AlignType, AnimationType, ActionType } from 'rc-trigger/lib/interface';
import type { TriggerProps } from 'rc-trigger';
import type { AlignType, AnimationType, ActionType } from 'rc-trigger/lib/interface';
export interface TooltipProps extends Pick<TriggerProps, 'onPopupAlign' | 'builtinPlacements'> {

@@ -9,4 +9,8 @@ trigger?: ActionType | ActionType[];

placement?: string;
/** @deprecated Use `motion` instead */
transitionName?: string;
/** @deprecated Use `motion` instead */
animation?: AnimationType;
/** Config popup motion */
motion?: TriggerProps['popupMotion'];
onVisibleChange?: (visible: boolean) => void;

@@ -13,0 +17,0 @@ afterVisibleChange?: (visible: boolean) => void;

@@ -12,2 +12,4 @@ "use strict";

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));

@@ -43,2 +45,3 @@

animation = props.animation,
motion = props.motion,
_props$placement = props.placement,

@@ -53,3 +56,3 @@ placement = _props$placement === void 0 ? 'right' : _props$placement,

overlayInnerStyle = props.overlayInnerStyle,
restProps = (0, _objectWithoutProperties2.default)(props, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle"]);
restProps = (0, _objectWithoutProperties2.default)(props, ["overlayClassName", "trigger", "mouseEnterDelay", "mouseLeaveDelay", "overlayStyle", "prefixCls", "children", "onVisibleChange", "afterVisibleChange", "transitionName", "animation", "motion", "placement", "align", "destroyTooltipOnHide", "defaultVisible", "getTooltipContainer", "overlayInnerStyle"]);
var domRef = (0, React.useRef)(null);

@@ -93,3 +96,3 @@ (0, React.useImperativeHandle)(ref, function () {

return /*#__PURE__*/React.createElement(_rcTrigger.default, Object.assign({
return /*#__PURE__*/React.createElement(_rcTrigger.default, (0, _extends2.default)({
popupClassName: overlayClassName,

@@ -108,2 +111,3 @@ prefixCls: prefixCls,

popupAnimation: animation,
popupMotion: motion,
defaultPopupVisible: defaultVisible,

@@ -110,0 +114,0 @@ destroyPopupOnHide: destroyTooltip,

{
"name": "rc-tooltip",
"version": "5.0.2",
"version": "5.1.0",
"description": "React Tooltip",

@@ -30,9 +30,10 @@ "keywords": [

"scripts": {
"build": "father doc build --storybook",
"start": "dumi dev",
"docs:build": "dumi build",
"docs:deploy": "gh-pages -d .doc",
"compile": "father build && lessc assets/bootstrap.less assets/bootstrap.css && lessc assets/bootstrap_white.less assets/bootstrap_white.css",
"coverage": "father test --coverage",
"lint": "eslint src/ examples/ --ext .tsx,.ts,.jsx,.js",
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
"now-build": "npm run build",
"prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish",
"start": "cross-env NODE_ENV=development father doc dev --storybook",
"test": "father test"

@@ -50,2 +51,3 @@ },

"cross-env": "^7.0.0",
"dumi": "^1.1.0",
"enzyme": "^3.10.0",

@@ -56,2 +58,4 @@ "enzyme-adapter-react-16": "^1.15.1",

"father": "^2.23.1",
"father-build": "^1.18.6",
"gh-pages": "^3.1.0",
"less": "^3.11.1",

@@ -61,3 +65,3 @@ "np": "^7.1.0",

"react-dom": "^16.10.2",
"typescript": "^4.0.3"
"typescript": "^4.0.5"
},

@@ -64,0 +68,0 @@ "maintainers": [

# rc-tooltip
---
React Tooltip
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![gemnasium deps][gemnasium-image]][gemnasium-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url]
[![NPM version][npm-image]][npm-url] [![dumi](https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square)](https://github.com/umijs/dumi) [![build status][github-actions-image]][github-actions-url] [![Test coverage][coveralls-image]][coveralls-url] [![gemnasium deps][gemnasium-image]][gemnasium-url] [![node version][node-image]][node-url] [![npm download][download-image]][download-url]
[npm-image]: https://img.shields.io/npm/v/rc-tooltip.svg?style=flat-square
[npm-url]: https://npmjs.org/package/rc-tooltip
[travis-image]: https://img.shields.io/travis/react-component/tooltip.svg?style=flat-square
[travis-url]: https://travis-ci.org/react-component/tooltip
[github-actions-image]: https://github.com/react-component/tooltip/workflows/CI/badge.svg
[github-actions-url]: https://github.com/react-component/tooltip/actions
[coveralls-image]: https://img.shields.io/coveralls/react-component/tooltip.svg?style=flat-square

@@ -211,3 +205,3 @@ [coveralls-url]: https://coveralls.io/r/react-component/tooltip?branch=master

For accessibility purpose you can use the `id` prop to link your tooltip with another element. For example attaching it to an input element:
```jsx
```js
<Tooltip

@@ -214,0 +208,0 @@ ...

Sorry, the diff of this file is not supported yet

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