{"name":"rc-notification","version":"5.6.3","keywords":["react","react-component","react-notification","notification"],"license":"MIT","_id":"rc-notification@5.6.3","maintainers":[{"name":"benjycui","email":"benjytrys@gmail.com"},{"name":"yesmeck","email":"yesmeck@gmail.com"},{"name":"afc163","email":"afc163@gmail.com"},{"name":"valleykid","email":"valleykiddy@gmail.com"},{"name":"nikogu","email":"644506165@qq.com"},{"name":"paranoidjk","email":"hust2012jiangkai@gmail.com"},{"name":"zombiej","email":"smith3816@gmail.com"},{"name":"madccc","email":"1075746765@qq.com"}],"homepage":"http://github.com/react-component/notification","bugs":{"url":"http://github.com/react-component/notification/issues"},"dist":{"shasum":"5aca122b7e2fb73ae4ba77238a90e6e8c9c12b8d","tarball":"http://registry-npm.ywwl.com/rc-notification/download/rc-notification-5.6.3.tgz","fileCount":37,"integrity":"sha512-42szwnn8VYQoT6GnjO00i1iwqV9D1TTMvxObWsuLwgl0TsOokzhkYiufdtQBsJMFjJravS1hfDKVMHLKLcPE4g==","signatures":[{"sig":"MEUCIGYYveK49EY4QKq813TEOo60jKroAOPJMKnb4PzJRVttAiEAsIPq6dVaFjbpIUuptZRpQZf9nln5VGsyyBT95jfJkSU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89263,"size":15295,"noattachment":false,"key":"/rc-notification/-/rc-notification-5.6.3.tgz"},"main":"lib/index","module":"es/index","engines":{"node":">=8.x"},"gitHead":"f4c10c147d71e5316e084a256335b011ba096f14","scripts":{"lint":"eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js","test":"vitest --watch=false","build":"dumi build","start":"dumi dev","compile":"father build && lessc assets/index.less assets/index.css","prepare":"husky install","coverage":"vitest run --coverage","now-build":"npm run build","test:watch":"vitest","docs:deploy":"gh-pages -d .doc","prepublishOnly":"npm run compile && np --yolo --no-publish"},"typings":"es/index.d.ts","_npmUser":{"name":"zombiej","email":"smith3816@gmail.com"},"repository":{"url":"git+ssh://git@github.com/react-component/notification.git","type":"git"},"_npmVersion":"10.8.2","description":"notification ui component for react","directories":{},"lint-staged":{"**/*.{js,jsx,tsx,ts,md,json}":["prettier --write","git add"]},"_nodeVersion":"22.5.1","dependencies":{"rc-util":"^5.20.1","rc-motion":"^2.9.0","classnames":"2.x","@babel/runtime":"^7.10.1"},"_hasShrinkwrap":false,"devDependencies":{"np":"^10.0.5","dumi":"^2.1.0","less":"^4.2.0","husky":"^8.0.3","jsdom":"^24.0.0","react":"^18.0.0","eslint":"^7.8.1","father":"^4.0.0","vitest":"^0.34.2","gh-pages":"^3.1.0","prettier":"^3.0.2","cross-env":"^7.0.0","react-dom":"^18.0.0","typescript":"^5.4.5","lint-staged":"^14.0.1","@types/react":"^18.0.0","@umijs/fabric":"^2.0.0","@types/react-dom":"^18.0.0","@types/classnames":"^2.2.10","@vitest/coverage-v8":"^0.34.2","@testing-library/react":"^15.0.7","@testing-library/jest-dom":"^6.0.0","@rc-component/father-plugin":"^1.0.2","@types/testing-library__jest-dom":"^6.0.0"},"peerDependencies":{"react":">=16.9.0","react-dom":">=16.9.0"},"_npmOperationalInternal":{"tmp":"tmp/rc-notification_5.6.3_1738923812051_0.7731362748951018","host":"s3://npm-registry-packages-npm-production"},"readme":"# rc-notification\n\nReact Notification UI Component\n\n[![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] [![npm download][download-image]][download-url] [![bundle size][bundlephobia-image]][bundlephobia-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-notification.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-notification\n[github-actions-image]: https://github.com/react-component/notification/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/notification/actions\n[coveralls-image]: https://img.shields.io/coveralls/react-component/notification.svg?style=flat-square\n[coveralls-url]: https://coveralls.io/r/react-component/notification?branch=master\n[download-image]: https://img.shields.io/npm/dm/rc-notification.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-notification\n[bundlephobia-url]: https://bundlephobia.com/result?p=rc-notification\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-notification\n\n## Install\n\n[![rc-notification](https://nodei.co/npm/rc-notification.png)](https://npmjs.org/package/rc-notification)\n\n## Usage\n\n```js\nimport Notification from 'rc-notification';\n\nNotification.newInstance({}, notification => {\n  notification.notice({\n    content: 'content'\n  });\n});\n```\n\n## Compatibility\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/electron/electron_48x48.png\" alt=\"Electron\" width=\"24px\" height=\"24px\" />](http://godban.github.io/browsers-support-badges/)<br>Electron |\n| --- | --- | --- | --- | --- |\n| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |\n\n## Example\n\nhttp://localhost:8001\n\nonline example: https://notification-react-component.vercel.app\n\n## API\n\n### Notification.newInstance(props, (notification) => void) => void\n\nprops details:\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>prefixCls</td>\n          <td>String</td>\n          <td></td>\n          <td>prefix class name for notification container</td>\n        </tr>\n        <tr>\n          <td>style</td>\n          <td>Object</td>\n          <td>{'top': 65, left: '50%'}</td>\n          <td>additional style for notification container.</td>\n        </tr>\n        <tr>\n          <td>getContainer</td>\n          <td>getContainer(): HTMLElement</td>\n          <td></td>\n          <td>function returning html node which will act as notification container</td>\n        </tr>\n        <tr>\n          <td>maxCount</td>\n          <td>number</td>\n          <td></td>\n          <td>max notices show, drop first notice if exceed limit</td>\n        </tr>\n    </tbody>\n</table>\n\n### notification.notice(props)\n\nprops details:\n\n<table class=\"table table-bordered table-striped\">\n    <thead>\n    <tr>\n        <th style=\"width: 100px;\">name</th>\n        <th style=\"width: 50px;\">type</th>\n        <th style=\"width: 50px;\">default</th>\n        <th>description</th>\n    </tr>\n    </thead>\n    <tbody>\n        <tr>\n          <td>content</td>\n          <td>React.Element</td>\n          <td></td>\n          <td>content of notice</td>\n        </tr>\n        <tr>\n          <td>key</td>\n          <td>String</td>\n          <td></td>\n          <td>id of this notice</td>\n        </tr>\n        <tr>\n          <td>closable</td>\n          <td>Boolean</td>\n          <td></td>\n          <td>whether show close button</td>\n        </tr>\n        <tr>\n          <td>onClose</td>\n          <td>Function</td>\n          <td></td>\n          <td>called when notice close</td>\n        </tr>\n        <tr>\n          <td>duration</td>\n          <td>number</td>\n          <td>1.5</td>\n          <td>after duration of time, this notice will disappear.(seconds)</td>\n        </tr>\n        <tr>\n          <td>showProgress</td>\n          <td>boolean</td>\n          <td>false</td>\n          <td>show with progress bar for auto-closing notification</td>\n        </tr>\n        <tr>\n          <td>pauseOnHover</td>\n          <td>boolean</td>\n          <td>true</td>\n          <td>keep the timer running or not on hover</td>\n        </tr>\n        <tr>\n          <td>style</td>\n          <td>Object</td>\n          <td> { right: '50%' } </td>\n          <td>additional style for single notice node.</td>\n        </tr>\n        <tr>\n          <td>closeIcon</td>\n          <td>ReactNode</td>\n          <td></td>\n          <td>specific the close icon.</td>\n        </tr>\n        <tr>\n          <td>props</td>\n          <td>Object</td>\n          <td></td>\n          <td>An object that can contain <code>data-*</code>, <code>aria-*</code>, or <code>role</code> props, to be put on the notification <code>div</code>. This currently only allows <code>data-testid</code> instead of <code>data-*</code> in TypeScript. See https://github.com/microsoft/TypeScript/issues/28960.</td>\n        </tr>\n    </tbody>\n</table>\n\n### notification.removeNotice(key:string)\n\nremove single notice with specified key\n\n### notification.destroy()\n\ndestroy current notification\n\n## Test Case\n\n```\nnpm test\nnpm run chrome-test\n```\n\n## Coverage\n\n```\nnpm run coverage\n```\n\nopen coverage/ dir\n\n## License\n\nrc-notification is released under the MIT license.\n","publish_time":1738923812241,"_cnpm_publish_time":1738923812241,"dist-tags":{"latest":"5.6.4"}}