{"name":"rc-tooltip","version":"5.3.1","description":"React Tooltip","keywords":["react","react-component","react-tooltip","tooltip"],"homepage":"http://github.com/react-component/tooltip","bugs":{"url":"http://github.com/react-component/tooltip/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/react-component/tooltip.git"},"license":"MIT","main":"lib/index","module":"es/index","scripts":{"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/ --ext .tsx,.ts,.jsx,.js","now-build":"npm run build","prepublishOnly":"npm run compile && np --no-cleanup --yolo --no-publish","test":"father test"},"dependencies":{"@babel/runtime":"^7.11.2","classnames":"^2.3.1","rc-trigger":"^5.3.1"},"devDependencies":{"@testing-library/react":"^13.4.0","@types/jest":"^26.0.0","@types/react":"^18.0.26","@types/react-dom":"^18.0.10","@types/warning":"^3.0.0","cross-env":"^7.0.0","dumi":"^2.1.1","eslint":"^7.1.0","father":"^2.23.1","father-build":"^1.18.6","gh-pages":"^3.1.0","less":"^3.11.1","np":"^7.1.0","react":"^18.2.0","react-dom":"^18.2.0","typescript":"^4.0.5"},"maintainers":[{"name":"silentcloud","email":"rjmuqiang@gmail.com"},{"name":"benjycui","email":"benjytrys@gmail.com"},{"name":"yesmeck","email":"yesmeck@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"yiminghe","email":"yiminghe@gmail.com"},{"name":"paranoidjk","email":"hust2012jiangkai@gmail.com"},{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"madccc","email":"1075746765@qq.com"}],"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"types":"./lib/index.d.ts","gitHead":"72554ebb0750990a36744158757a0a8cb969a616","_id":"rc-tooltip@5.3.1","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-e6H0dMD38EPaSPD2XC8dRfct27VvT2TkPdoBSuNl3RRZ5tspiY/c5xYEmGC0IrABvMBgque4Mr2SMZuliCvoiQ==","shasum":"3dde4e1865f79cd23f202bba4e585c2a1173024b","tarball":"http://registry-npm.ywwl.com/rc-tooltip/download/rc-tooltip-5.3.1.tgz","fileCount":23,"unpackedSize":50448,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGnyXK0kVZRUNMSJon7wfZVtQ4h43bVcEgyy65fNjBrQAiAu7xm7EkxrWSshqXWFuhhwQMjiCj2HkMRCdOHyErVPuA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjx46jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1sQ//RrwuyMgEv4uEiIqX8iEOSasyR6GT+x8ENkL/QaqvQ7f+7OsB\r\nXyWZpC1YlDtk4fwy6laKJKF4JRuZrjLd0rV1bxFpeXVJ/jQt5zSevbJEtLDf\r\n8r/zApCi5D4TKKQOXJpk3lOtWtzJEe7AeZadn8DPhXSMSmeiZUwgA9vd22Ee\r\noyUCkGUwWJTxoEJyTjo9hoeNHnlYYqtqCJoX1ONg8rf61G8YwNuaOddbl8+n\r\nfB2z+4vSHQcKkYq+sTLTcKVu4wEqP8ABsxnPhg/np2kliOOq215PHbzvqsTo\r\nXi7tRMwJWQCgz8V2VRGVMdNtdImtIX/1jN6CwcNn6hoya+/nuCWh3tlVp9d0\r\nggy6tdiFrxEOQRlKnBTpK2XXe4DS8EuT64G0zYGtFUZm4Ld1duhy4s+7SLdN\r\nZV44rtMkp8inlc94c5mdNirta0AD54BiJaoIWV3f7CDgn7gINpypacfDKuJm\r\nXLq6gKY/JcmPNfOcbFlZxUG5U0wT0JCWToPk/Sif5OKderECerLrFzrEHr7i\r\nHQ2NAjWYl75xsUBCl7mFa3A6zzGyDcOHPadhR6a102+7EbbZ9CEW2zLUFMGC\r\nGLk0DPAYQjmtwhXt+Iyy03qpJHVCJztgzNKPcNtqUaeHLuX7m2nm/DKh+Brv\r\nIZ9BFdBw+H560IjBhNOrxUmOuaI8LXRNOtQ=\r\n=2Gfk\r\n-----END PGP SIGNATURE-----\r\n","size":9357,"noattachment":false,"key":"/rc-tooltip/-/rc-tooltip-5.3.1.tgz"},"_npmUser":{"name":"madccc","email":"1075746765@qq.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rc-tooltip_5.3.1_1674022563680_0.6863553610054973"},"_hasShrinkwrap":false,"readme":"# rc-tooltip\n\nReact Tooltip\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-tooltip.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-tooltip\n[travis-image]: https://img.shields.io/travis/react-component/tooltip/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/tooltip\n[github-actions-image]: https://github.com/react-component/tooltip/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/tooltip/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/tooltip/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/tooltip\n[david-url]: https://david-dm.org/react-component/tooltip\n[david-image]: https://david-dm.org/react-component/tooltip/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/tooltip?type=dev\n[david-dev-image]: https://david-dm.org/react-component/tooltip/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-tooltip.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-tooltip\n[bundlephobia-url]: https://bundlephobia.com/package/rc-tooltip\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-tooltip\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\n## Screenshot\n\n<img src=\"https://gtms03.alicdn.com/tps/i3/TB1NQUSHpXXXXaUXFXXlQqyZXXX-1312-572.png\" width=\"600\"/>\n\n## Browsers support\n\n| [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png\" alt=\"IE / Edge\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png\" alt=\"Firefox\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png\" alt=\"Chrome\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png\" alt=\"Safari\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src=\"https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png\" alt=\"Opera\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)</br>Opera |\n| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| IE 8 + ✔                                                                                                                                                                                                        | Firefox 31.0+ ✔                                                                                                                                                                                                   | Chrome 31.0+ ✔                                                                                                                                                                                                | Safari 7.0+ ✔                                                                                                                                                                                                 | Opera 30.0+ ✔                                                                                                                                                                                             |\n\n## Install\n\n[![rc-tooltip](https://nodei.co/npm/rc-tooltip.png)](https://npmjs.org/package/rc-tooltip)\n\n## Usage\n\n```js\nvar Tooltip = require('rc-tooltip');\nvar React = require('react');\nvar ReactDOM = require('react-dom');\n\n// By default, the tooltip has no style.\n// Consider importing the stylesheet it comes with:\n// 'rc-tooltip/assets/bootstrap_white.css'\n\nReactDOM.render(\n  <Tooltip placement=\"left\" trigger={['click']} overlay={<span>tooltip</span>}>\n    <a href=\"#\">hover</a>\n  </Tooltip>,\n  container,\n);\n```\n\n## Examples\n\n`npm start` and then go to\n<http://localhost:8000/demo>\n\nOnline demo: <https://react-component.github.io/tooltip/demo>\n\n## API\n\n### Props\n\n| name                 | type                                      | default             | description                                                                                                                                                      |\n| -------------------- | ----------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| trigger              | string \\| string\\[]                       | 'hover'             | which actions cause tooltip shown. enum of 'hover','click','focus'                                                                                               |\n| visible              | boolean                                   | false               | whether tooltip is visible                                                                                                                                       |\n| defaultVisible       | boolean                                   | false               | whether tooltip is visible by default                                                                                                                            |\n| placement            | string                                    | 'right'             | tooltip placement. enum of 'top','left','right','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom' |\n| motion               | object                                    |                     | Config popup motion. Please ref demo for example                                                                                                                 |\n| onVisibleChange      | (visible: boolean) => void;               |                     | Callback when visible change                                                                                                                                     |\n| afterVisibleChange   | (visible: boolean) => void;               |                     | Callback after visible change                                                                                                                                    |\n| overlay              | ReactNode \\| () => ReactNode              |                     | tooltip overlay content                                                                                                                                          |\n| overlayStyle         | object                                    |                     | style of tooltip overlay                                                                                                                                         |\n| overlayClassName     | string                                    |                     | className of tooltip overlay                                                                                                                                     |\n| prefixCls            | string                                    | 'rc-tooltip'        | prefix class name of tooltip                                                                                                                                     |\n| mouseEnterDelay      | number                                    | 0                   | delay time (in second) before tooltip shows when mouse enter                                                                                                     |\n| mouseLeaveDelay      | number                                    | 0.1                 | delay time (in second) before tooltip hides when mouse leave                                                                                                     |\n| getTooltipContainer  | (triggerNode: HTMLElement) => HTMLElement | () => document.body | get container of tooltip, default to body                                                                                                                        |\n| destroyTooltipOnHide | boolean                                   | false               | destroy tooltip when it is hidden                                                                                                                                |\n| align                | object                                    |                     | align config of tooltip. Please ref demo for usage example                                                                                                       |\n| showArrow            | boolean \\| object                         | false               | whether to show arrow of tooltip                                                                                                                                 |\n| zIndex               | number                                    |                     | config popup tooltip zIndex                                                                                                                                      |\n\n## Important Note\n\n`Tooltip` requires a child node that accepts an `onMouseEnter`, `onMouseLeave`, `onFocus`, `onClick` event. This means the child node must be a built-in component like `div` or `span`, or a custom component that passes its props to its built-in component child.\n\n## Accessibility\n\nFor accessibility purpose you can use the `id` prop to link your tooltip with another element. For example attaching it to an input element:\n\n```js\n<Tooltip\n    ...\n    id={this.props.name}>\n    <input type=\"text\"\n           ...\n           aria-describedby={this.props.name}/>\n</Tooltip>\n```\n\nIf you do it like this, a screenreader would read the content of your tooltip if you focus the input element.\n\n**NOTE:** `role=\"tooltip\"` is also added to expose the purpose of the tooltip element to a screenreader.\n\n## Development\n\n```bash\nnpm install\nnpm start\n```\n\n## Test Case\n\n```bash\nnpm test\nnpm run chrome-test\n```\n\n## Coverage\n\n```bash\nnpm run coverage\n```\n\n## License\n\n`rc-tooltip` is released under the MIT license.\n","publish_time":1674022563843,"_cnpm_publish_time":1674022563843,"dist-tags":{"latest":"6.4.0"}}