{"_id":"@andfaulkner/cogo-toast","_rev":"2-0478a8a297b46f88439a887cb37a137d","name":"@andfaulkner/cogo-toast","dist-tags":{"latest":"4.3.1"},"versions":{"4.3.0":{"name":"@andfaulkner/cogo-toast","description":"Beautiful, Zero Configuration, Toast Messages - Built with React","version":"4.3.0","license":"MIT","scripts":{"setup":"yarn install && cd docs && yarn install","add-contributor":"all-contributors add","dev-npm":"rollup -c -w","dev-docs":"cd docs && yarn run dev","dev":"concurrently --kill-others-on-fail \"yarn run dev-npm\" \"yarn run dev-docs\"","build":"rollup -c","minify-cjs":"uglifyjs --compress --mangle -o dist/index.js -- dist/index.js","minify-es":"terser --compress --mangle --comments /$^/ -o dist/index.es.js -- dist/index.es.js","minify":"concurrently --kill-others-on-fail \"yarn run minify-cjs\" \"yarn run minify-es\"","postbuild":"yarn run minify","predeploy":"cd docs && yarn install && yarn run deploy","deploy":"gh-pages -t -d docs/out"},"peerDependencies":{"prop-types":"^15.6.2 || ^15.7.0","react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"devDependencies":{"@babel/core":"7.9.6","@babel/preset-env":"7.9.6","@babel/preset-react":"7.9.4","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","@rollup/plugin-typescript":"^2.1.0","@rollup/plugin-url":"^5.0.0","@types/jest":"^25.2.2","@types/prop-types":"^15.7.3","@types/react":"^16.9.35","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^2.33.0","@typescript-eslint/parser":"^2.33.0","@svgr/rollup":"5.4.0","all-contributors-cli":"^6.14.2","babel-eslint":"10.1.0","concurrently":"5.2.0","cross-env":"7.0.2","eslint":"^7.0.0","eslint-config-airbnb":"^18.1.0","eslint-config-prettier":"^6.11.0","eslint-config-react-app":"^5.2.1","eslint-plugin-import":"^2.20.2","eslint-plugin-jest":"^23.13.1","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-prettier":"^3.1.3","eslint-plugin-react":"^7.20.0","eslint-plugin-react-hooks":"^4.0.2","gh-pages":"2.2.0","prettier":"^2.0.5","prettier-eslint-cli":"^5.0.0","prop-types":"^15.7.2","react":"16.12.0","react-dom":"16.12.0","react-scripts":"3.4.1","rollup":"^2.10.2","rollup-plugin-peer-deps-external":"^2.2.2","rollup-plugin-postcss":"3.1.1","terser":"4.6.13","typescript":"^3.9.2","tslib":"^2.0.0","uglify-js":"^3.9.3"},"main":"dist/index.js","module":"dist/index.es.js","jsnext:main":"dist/index.es.js","homepage":"https://cogoport.github.io/cogo-toast/","bugs":{"url":"https://github.com/Cogoport/cogo-toast/issues"},"repository":{"type":"git","url":"git+https://github.com/Cogoport/cogo-toast.git"},"keywords":["react","toast","react-toast","toast-react","toastr","toast messages","messages","notifications","react notifications","component","components","react component","react components","ui"],"author":{"name":"Cogoport","email":"developers@cogoport.io","url":"https://cogoport.io/"},"contributors":[{"name":"Cogoport","email":"developers@cogoport.io","url":"https://cogoport.io/"},{"name":"anmolmahatpurkar","email":"anmol@cogoport.com","url":"https://github.com/anmolmahatpurkar"}],"gitHead":"cbf8c9d23eb2f1f928811062692caa35a94beb42","_id":"@andfaulkner/cogo-toast@4.3.0","_nodeVersion":"16.15.1","_npmVersion":"8.18.0","dist":{"integrity":"sha512-PaZHo/NHpuZJorMTxGC/ioydTbbQa7uWDlu6hSoekEjhSSU6ZvPwbs35LDJhWUp2DO+AJoWszW5WFlOE3tQJSg==","shasum":"d691028e82aa3ee8209be28c9e20c576c5ff756b","tarball":"https://registry.npmjs.org/@andfaulkner/cogo-toast/-/cogo-toast-4.3.0.tgz","fileCount":4,"unpackedSize":13454,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOMdeVklNboAAF6iSvhSs/P4+LiC81Z1inh3csh9JisgIhAOVzP+zqkAr4rSbMvNASGec/2ZyudPIeQ09vx00zywye"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpGTKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpT5hAAheRiRvGbcEE7oPKeNUAa8mv2NREoPfiUkaAG1owSL4WL96ov\r\nLU02f8RH6cIdqob5lhvNr32o+L6a5NRyafK+c+ZH07w1jv4lpjNajH3GnDKL\r\nESj95y7afM83LJASa0DJ23bKRDEihi9UlmSxcnqcGyM8A9Ow1JBszvDuEa74\r\nibsEM1ZsX0E2gTkNJiOTTYN4EzupL72wHYOiwmKr0xDlAdWaYwGpeZ6JiVg/\r\n4KnxI2BhAAK4Q0tt5p7Ih9P1WTP21/F2MWMykRec1vTaKJv1xmY7WW5V+kcP\r\nyq6tjKZ0mQk1ptsfBiumKcFnom/7kHf0jwSuxdnlZlUiYzkPpUPHor6ew45B\r\nna/FtPe8yiJYcAac5UybmBUl33pCSbItMlfrsbdaYMOs8XsePISQ/gNLTHdD\r\nddRTzG3RJBiQ7ANfJXPrj8nRmVAFs9tduAMMzWPKk6LNstLL2RVMh/2axl2S\r\n4C8ZopkNyvl0shvODdilWtPDqDf8o86aQewb9hO3InyV+QsDF6z+AwTn470/\r\nxvCj/5W1SntV8bdylJCddsUJhDU9EVTZpjH9eqeM5eJvIrUIiEvXR1wxclzV\r\n9wXuz4GSKwUPxowz2H1CM3rKS9LjOosB3YGdSjUIRTd7h0x9neZ3xd3RZc7j\r\nuJv5W/6rFZfFmp/1g6mcDkBvjgbvDdN4eec=\r\n=DG3L\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{},"directories":{},"maintainers":[{"name":"andfaulkner","email":"andfaulkner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cogo-toast_4.3.0_1671718090302_0.7697463707346661"},"_hasShrinkwrap":false},"4.3.1":{"name":"@andfaulkner/cogo-toast","description":"Beautiful, Zero Configuration, Toast Messages - Built with React","version":"4.3.1","license":"MIT","scripts":{"setup":"yarn install && cd docs && yarn install","add-contributor":"all-contributors add","dev-npm":"rollup -c -w","dev-docs":"cd docs && yarn run dev","dev":"concurrently --kill-others-on-fail \"yarn run dev-npm\" \"yarn run dev-docs\"","build":"rollup -c","minify-cjs":"uglifyjs --compress --mangle -o dist/index.js -- dist/index.js","minify-es":"terser --compress --mangle --comments /$^/ -o dist/index.es.js -- dist/index.es.js","minify":"concurrently --kill-others-on-fail \"yarn run minify-cjs\" \"yarn run minify-es\"","postbuild":"yarn run minify","predeploy":"cd docs && yarn install && yarn run deploy","deploy":"gh-pages -t -d docs/out"},"peerDependencies":{"prop-types":"^15.6.2 || ^15.7.0","react":"^16.8.0 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.0 || ^17.0.0 || ^18.0.0"},"devDependencies":{"@babel/core":"7.9.6","@babel/preset-env":"7.9.6","@babel/preset-react":"7.9.4","@rollup/plugin-commonjs":"^11.1.0","@rollup/plugin-node-resolve":"^7.1.3","@rollup/plugin-typescript":"^2.1.0","@rollup/plugin-url":"^5.0.0","@types/jest":"^25.2.2","@types/prop-types":"^15.7.3","@types/react":"^16.9.35","@types/react-dom":"^16.9.8","@typescript-eslint/eslint-plugin":"^2.33.0","@typescript-eslint/parser":"^2.33.0","@svgr/rollup":"5.4.0","all-contributors-cli":"^6.14.2","babel-eslint":"10.1.0","concurrently":"5.2.0","cross-env":"7.0.2","eslint":"^7.0.0","eslint-config-airbnb":"^18.1.0","eslint-config-prettier":"^6.11.0","eslint-config-react-app":"^5.2.1","eslint-plugin-import":"^2.20.2","eslint-plugin-jest":"^23.13.1","eslint-plugin-jsx-a11y":"^6.2.3","eslint-plugin-prettier":"^3.1.3","eslint-plugin-react":"^7.20.0","eslint-plugin-react-hooks":"^4.0.2","gh-pages":"2.2.0","prettier":"^2.0.5","prettier-eslint-cli":"^5.0.0","prop-types":"^15.7.2","react":"16.12.0","react-dom":"16.12.0","react-scripts":"3.4.1","rollup":"^2.10.2","rollup-plugin-peer-deps-external":"^2.2.2","rollup-plugin-postcss":"3.1.1","terser":"4.6.13","typescript":"^3.9.2","tslib":"^2.0.0","uglify-js":"^3.9.3"},"main":"dist/index.js","module":"dist/index.es.js","jsnext:main":"dist/index.es.js","homepage":"https://cogoport.github.io/cogo-toast/","bugs":{"url":"https://github.com/andfaulkner/cogo-toast/issues"},"repository":{"type":"git","url":"git+https://github.com/andfaulkner/cogo-toast.git"},"keywords":["react","toast","react-toast","toast-react","toastr","toast messages","messages","notifications","react notifications","component","components","react component","react components","ui"],"author":{"name":"Cogoport","email":"developers@cogoport.io","url":"https://cogoport.io/"},"contributors":[{"name":"Cogoport","email":"developers@cogoport.io","url":"https://cogoport.io/"},{"name":"anmolmahatpurkar","email":"anmol@cogoport.com","url":"https://github.com/anmolmahatpurkar"}],"gitHead":"441d9af5115269ed01fb5b45c066c4993fab2ccc","_id":"@andfaulkner/cogo-toast@4.3.1","_nodeVersion":"16.15.1","_npmVersion":"8.18.0","dist":{"integrity":"sha512-VHF6M/k0IX+A3ZyKEdrqTA8Y9Keslr6gslCcqyPYjTpIvxxPqhI5S+7CZbR137BfQrigMKSdx5ZdRDAAdSofCw==","shasum":"b676cdfa91de36912e73df62a4e82277d5da4b57","tarball":"https://registry.npmjs.org/@andfaulkner/cogo-toast/-/cogo-toast-4.3.1.tgz","fileCount":6,"unpackedSize":34797,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtWb930PMBtxAVme1GMyPpnlO3f57XqSECgB2qvjq2RAIgAdaaChJSpuEHU1BOoG59laE5E3sc+i1iP59x/5BnQoc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjpX7NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpwFw/6AgGW1tII+UngXALB5C1X6h96cR7XQO8QMVMwR2M0rMKmpO54\r\nileqnbaE6K7Cyg9ZngW7bhIakDeZZVeE0/bGoXob0Tgh7CSKKCghilc4polV\r\n53rfBfurjaPdcJSkWVpJjfWQbE0H7vYYcQiAMixWH/EY3h4rnPSOCoQQzIdC\r\ntUnHgQL4VGa5SRRVK4Vf+xv7nnLT6S9oXvPXHtTQglsv6x/0Q1h5zWdntgnL\r\nraQD0pzEUuhlnMEbYiItFNZ51zVg9DPEiymKrC0fuNCnNzWpPMGy52AZDvNA\r\ncrpe+m3vOm4jSRIFlGX+DgqKvX5h7Y3KgZ9vsXD671HV8pIkCHlAnQU2tfOi\r\n7wKokpSJHXdYV7WXzK1tyPXOBCR8tuM0Yj+Nn2Cdn0VTT0s7wI4ImY4CPx2z\r\n/GFDDxWFG8ETJc/Nw7kM1ze3KWDoG4+RVp+B91WRelcuZdmVA4eTXR98S6I2\r\nKEkJH7gAe8qGhgjtqIePkRtLbQjmMeJPVF08YkTmJIioIDVTHD6WKT408BVg\r\nqadsFkweV7xSY7PguX4ESZHjs+7sWmALMDk9/Bs44qg/mRa/dbCtoZQBBAAP\r\nOc0qU1NwcsCzbh0DFTP2BP1ZBo4Dbp6yQWjFiUp2W8TOs9Z7dAKtPBDBL3lG\r\nB3TQU4U6GJbEdF7SzQc8tOW6khQGZU6SDEw=\r\n=aQYd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"andfaulkner","email":"andfaulkner@gmail.com"},"directories":{},"maintainers":[{"name":"andfaulkner","email":"andfaulkner@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cogo-toast_4.3.1_1671790284921_0.5975706398091132"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-22T14:08:10.301Z","4.3.0":"2022-12-22T14:08:10.496Z","modified":"2022-12-23T10:11:25.165Z","4.3.1":"2022-12-23T10:11:25.071Z"},"maintainers":[{"name":"andfaulkner","email":"andfaulkner@gmail.com"}],"description":"Beautiful, Zero Configuration, Toast Messages - Built with React","homepage":"https://cogoport.github.io/cogo-toast/","keywords":["react","toast","react-toast","toast-react","toastr","toast messages","messages","notifications","react notifications","component","components","react component","react components","ui"],"repository":{"type":"git","url":"git+https://github.com/andfaulkner/cogo-toast.git"},"contributors":[{"name":"Cogoport","email":"developers@cogoport.io","url":"https://cogoport.io/"},{"name":"anmolmahatpurkar","email":"anmol@cogoport.com","url":"https://github.com/anmolmahatpurkar"}],"author":{"name":"Cogoport","email":"developers@cogoport.io","url":"https://cogoport.io/"},"bugs":{"url":"https://github.com/andfaulkner/cogo-toast/issues"},"license":"MIT","readme":"<p align=\"center\"><a href=\"https://cogoport.github.io/cogo-toast/\" target=\"_blank\"><img src=\"https://cogoport.github.io/cogo-toast/meta/android-chrome-96x96.png\" alt=\"cogo-toast\" title=\"cogo-toast\" width=\"120\"></a></p>\n<h1 align=\"center\">Cogo Toast</h1>\n<p align=\"center\" style=\"font-size: 1.2rem;\">Beautiful, Zero Configuration, Toast Messages for React ~4kb gzip (with styles and icons)</p>\n<p align=\"center\"><a href=\"https://cogoport.github.io/cogo-toast/\">https://cogoport.github.io/cogo-toast/</a></p>\n\n[![Dependencies](https://img.shields.io/david/Cogoport/cogo-toast.svg)](https://david-dm.org/Cogoport/cogo-toast.svg)\n[![npm package](https://img.shields.io/npm/v/cogo-toast/latest.svg)](https://www.npmjs.com/package/cogo-toast)\n[![Small size](https://img.badgesize.io/https://unpkg.com/cogo-toast/dist/index.js?compression=gzip)](https://unpkg.com/cogo-toast/dist/index.js)\n[![npm downloads](https://img.shields.io/npm/dm/cogo-toast.svg)](https://www.npmjs.com/package/cogo-toast)\n![Code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)\n[![License](https://img.shields.io/npm/l/@xstyled/styled-components.svg)](https://github.com/Cogoport/cogo-toast/blob/master/LICENSE)\n\n<p align=\"center\">\n<a href=\"https://cogoport.github.io/cogo-toast/\" target=\"_blank\"><img src=\"docs/public/images/preview.gif\" alt=\"cogo-toast-preview\" title=\"cogo-toast-preview\"></a>\n</p>\n\n### Install via NPM:\n\n```bash\nnpm install --save cogo-toast\n```\n\n### Install via Yarn:\n\n```bash\nyarn add cogo-toast\n```\n\n#### Note:\n\nThe latest version `^3.0.0` makes the use of React Hooks internally.\n\nTo use this package in projects that don't support hooks, use `v2.0.1` instead.\n\n```bash\nyarn add cogo-toast@2.0.1\n```\n\n## Usage\n\nIts Plug and Play. No configuration required. Just import and you are good to go.\n\n```javascript\nimport cogoToast from 'cogo-toast';\n\ncogoToast.success('This is a success message!');\n```\n\n### 5 Built in Types\n\nThere are 5 built-in types to handle the most common cases in any application.\n\n```javascript\ncogoToast.success('This is a success message');\n\ncogoToast.info('This is a info message');\n\ncogoToast.loading('This is a loading message');\n\ncogoToast.warn('This is a warn message');\n\ncogoToast.error('This is a error message');\n```\n\n### Use JSX\n\n**cogoToast** is built using React. Which means any valid jsx can be used as the message in cogoToast\n\n```javascript\ncogoToast.info(\n  <div>\n    <b>Awesome!</b>\n    <div>Isn't it?</div>\n  </div>,\n);\n```\n\n### Returns a Promise\n\nReturns a promise which resolves when the toast is about to hide.\n\nThis can be useful to do some action when the toast has completed showing.\n\n```javascript\ncogoToast.loading('Loading your data...').then(() => {\n  cogoToast.success('Data Successfully Loaded');\n});\n```\n\n### Hide on Click\n\n```javascript\nconst { hide } = cogoToast.success('This is a success message.', {\n  onClick: () => {\n    hide();\n  },\n});\n```\n\n### Completely Customizable\n\nThe second parameter to the function is an options object that can be passed in for customization.\n\n```javascript\ncogoToast.info('This is an info message', options);\n```\n\n#### All Available Options\n\nHere's a list of all the available options, to customize the toast to your needs.\n\n|    Options    |                                               Type                                               |                          Default                           |\n| :-----------: | :----------------------------------------------------------------------------------------------: | :--------------------------------------------------------: |\n|   hideAfter   |                                        Number in Seconds                                         | `3` <br />(Can be `0` to disable auto-hiding of the toast) |\n|   position    | `'top-left', 'top-center', 'top-right',` <br /> `'bottom-left', 'bottom-center', 'bottom-right'` |                       `'top-center'`                       |\n|    heading    |                                              String                                              |                            `''`                            |\n|  renderIcon   |                                       Function<ReactNode>                                        |                   Icon Based on the Type                   |\n|      bar      |           Object <br /> `{ size: '2px', style: 'solid/dashed/dotted', color: '#hex' }`           |                     Based on the Type                      |\n| onClick() |                                             Function                                             |                           `null`                           |\n| role |                                             aria-role                                             |                           `status`                           |\n| toastContainerID |                   The dom element in which the toast container is added                                         |                           `ct-container`                           |\n\n### Custom Styling\n\nYou can provide your own custom styling by extending the `ct-toast` class in your css styles.\n\nFor all classnames, refer to [/src/styles/styles.css](/src/styles/styles.css)\n\n#### Customize each type of Toast seperately\n\nCustomize each type of Toast seperately, by extending the `ct-toast-<type>` class. For example, in your CSS,\n\n```\nct-toast-success {\n  color: #FFFFFF;\n  background: #6EC05F;\n}\n```\n\n### Only ~ 4kb gzip (with Styles and Icons)\n\nThe package contains the minified build file, along with the SVG Icons and the Styles, built into the Code, with a total of only ~4kb gzip.\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tr>\n    <td align=\"center\"><a href=\"https://github.com/anmdotdev\"><img src=\"https://avatars2.githubusercontent.com/u/36692003?v=4\" width=\"100px;\" alt=\"Anmol Mahatpurkar\"/><br /><sub><b>Anmol Mahatpurkar</b></sub></a><br /><a href=\"https://github.com/Cogoport/cogo-toast/commits?author=anmolmahatpurkar\" title=\"Code\">💻</a> <a href=\"#design-anmolmahatpurkar\" title=\"Design\">🎨</a> <a href=\"https://github.com/Cogoport/cogo-toast/commits?author=anmolmahatpurkar\" title=\"Documentation\">📖</a></td>\n    <td align=\"center\"><a href=\"https://balazsorban.com\"><img src=\"https://avatars1.githubusercontent.com/u/18369201?v=4\" width=\"100px;\" alt=\"Balázs Orbán\"/><br /><sub><b>Balázs Orbán</b></sub></a><br /><a href=\"https://github.com/Cogoport/cogo-toast/commits?author=balazsorban44\" title=\"Code\">💻</a></td>\n    <td align=\"center\"><a href=\"https://github.com/Keaws\"><img src=\"https://avatars1.githubusercontent.com/u/5289466?v=4\" width=\"100px;\" alt=\"Vitalii Kalchuk\"/><br /><sub><b>Vitalii Kalchuk</b></sub></a><br /><a href=\"https://github.com/Cogoport/cogo-toast/commits?author=Keaws\" title=\"Code\">💻</a></td>\n    <td align=\"center\"><a href=\"http://www.apathak.com\"><img src=\"https://avatars1.githubusercontent.com/u/24917309?v=4\" width=\"100px;\" alt=\"Amar Pathak\"/><br /><sub><b>Amar Pathak</b></sub></a><br /><a href=\"https://github.com/Cogoport/cogo-toast/commits?author=amarpathak\" title=\"Documentation\">📖</a></td>\n    <td align=\"center\"><a href=\"https://github.com/nataly87s\"><img src=\"https://avatars2.githubusercontent.com/u/7895237?s=460&v=4\" width=\"100px;\" alt=\"Nataly Shrits\"/><br /><sub><b>Nataly Shrits</b></sub></a><br /><a href=\"https://github.com/Cogoport/cogo-toast/commits?author=nataly87s\" title=\"Code\">💻</a></td>\n  </tr>\n</table>\n\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n","readmeFilename":"README.md"}