{"_id":"@chcodes-hamza/notifications-toast","_rev":"1-6351ce24920ef408f197e7cf4e04c373","name":"@chcodes-hamza/notifications-toast","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@chcodes-hamza/notifications-toast","version":"1.0.0","description":"toast notification libraby and custom element","main":"dist/Toast.js","module":"dist/Toast.js","type":"module","scripts":{"dev":"rollup -c rollup.config.js --watch","build":"rollup -c rollup.config.js","prepublishOnly":"rm -rf dist && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Hamza-chaouch/notifications-lib-element.git"},"keywords":["custom-elements","js","toast","notification"],"author":{"name":"CHAOUCH Hamza"},"license":"ISC","bugs":{"url":"https://github.com/Hamza-chaouch/notifications-lib-element/issues"},"homepage":"https://github.com/Hamza-chaouch/notifications-lib-element#readme","devDependencies":{"rollup-plugin-import-assert":"^2.1.3","rollup-plugin-postcss":"^4.0.2"},"gitHead":"a7e5151ec91136d8198f5fb2a39e6f361da914ee","_id":"@chcodes-hamza/notifications-toast@1.0.0","_nodeVersion":"16.15.1","_npmVersion":"8.13.1","dist":{"integrity":"sha512-w+BukQiWhgdgawmDIZ1euCRlZGF+NtwGG5Qli0fe+ht6imMoexsmGi/Zbgdrs5Chngq73eNCQp5K+UYeCmhaWQ==","shasum":"8d282ec130663ad61c8e93193c571bd1c5d0892b","tarball":"https://registry.npmjs.org/@chcodes-hamza/notifications-toast/-/notifications-toast-1.0.0.tgz","fileCount":3,"unpackedSize":13483,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgbwX8+R9IWkDgrXr+D7olfDIBkU23w8KLyMSl6BXm1AIgaMdSQwWIHyer/l5kzsR/6VUX2/E5n14L6+cO4dDtbCc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjzXQ3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrFLBAAmJWZE5wDTqD42qH53UN4zHqdSe7wnsTB4H7LNGYx98j7JPma\r\nLdkHl7x9NFXJ2Lylos1gUPL3vu3Q65hRpJsLph+HUtLxEX0tWlB2Qy9jVYlN\r\nxn2dccnDs8aUA4msIiBvQrUQo6oH0IhRtyaWrJXdawtBubaQkukOQdxfABzj\r\n8WZ7Jw3jK+AYLMIg5P2EzgVKUnnp2iBQBIGPZnDnS0PTrgS9kztSAENwJNkn\r\n3HYnQ5UxTtpb7ttccuNKzoWnynMjNoq0gBz1UWCNulQUfllrTWxjcLa5S7TK\r\nW228H3VCmDbLHEUA3WBsnUIRrliABHCl3/8ttpjFCnrz+DhiMWvOBgIpIHDr\r\n/OfEERW0GuNVMaKs90gOeBaeAulJg8zlJfGP0/Vhczj2B1uGuHSRlsveLIMd\r\nDavH3j7SslOjnG28qZd/MTD2ep44JDcOGIU9SsEUVXIZ0A47XncJPNoxqtbz\r\nznNc3LX0GZ6mml88Kp3FDjToz4jxZQ+i3ZJ3eVVQSKOPLljXbJVUHwFChHWv\r\nIxHWQfIN+qnkWD2jE5o50TY2qJkQugjx5toIFFb/ar2sCRwd/oWiM7x1Ip7x\r\nfVg5NWvomOO3c5S2Grd1sB0lyrwBTSle21w9HJNhSrfsOXyBzkWqcqMjVdpH\r\niCH/pFqJ9hw5GY+va4Xlq41f+ERJ80a5v2c=\r\n=v+Q7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"chcodes-hamza","email":"contact@ch-codes.com"},"directories":{},"maintainers":[{"name":"chcodes-hamza","email":"contact@ch-codes.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/notifications-toast_1.0.0_1674409014846_0.716754842032727"},"_hasShrinkwrap":false},"1.0.1":{"name":"@chcodes-hamza/notifications-toast","version":"1.0.1","description":"toast notification libraby and custom element","main":"dist/Toast.js","module":"dist/Toast.js","type":"module","scripts":{"dev":"rollup -c rollup.config.js --watch","build":"rollup -c rollup.config.js","prepublishOnly":"rm -rf dist && npm run build"},"repository":{"type":"git","url":"git+https://github.com/Hamza-chaouch/notifications-lib-element.git"},"keywords":["custom-elements","js","toast","notification"],"author":{"name":"CHAOUCH Hamza"},"license":"ISC","bugs":{"url":"https://github.com/Hamza-chaouch/notifications-lib-element/issues"},"homepage":"https://github.com/Hamza-chaouch/notifications-lib-element#readme","devDependencies":{"rollup-plugin-import-assert":"^2.1.3","rollup-plugin-postcss":"^4.0.2"},"gitHead":"72ada908d7278264c94a41d64a9727ecb0e7eb7c","_id":"@chcodes-hamza/notifications-toast@1.0.1","_nodeVersion":"16.15.1","_npmVersion":"8.13.1","dist":{"integrity":"sha512-R+sLGCDvcE95MfgnmUCbpDvrOBuXQpikYOEWgEbWd3hTXbvhXT3OEGr5buvKMx/6FEonW8vEbSaQ1uZwCQFQ2g==","shasum":"76b286e4fac4f12fecf66458476bada1ad909735","tarball":"https://registry.npmjs.org/@chcodes-hamza/notifications-toast/-/notifications-toast-1.0.1.tgz","fileCount":3,"unpackedSize":13407,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA+FAwpr9ADPVHY8+3jto4wtHE0sZZ0TdPakT+uorwTAAiAlzuQDcl9l1++6rbf+T0iFsSMykcRX3aBB0rTAKWFQOg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjzYTHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSzA/9EgJpG3QDBUPO2Qlqtp87U7vRf6VhpGZMxEy57xNCWcOybz8l\r\nQP+8EyrwazP6t00EsLQxpkl7jBzgboKE+zjiyao/vECblIL4aWctH0+m2+nr\r\njw+sSR2Nqlbyuecge454ILb9YhPaOshRnrj0zq6qwzESRcsDLzMDi0dvXd0w\r\nxZpvvrIHJWj0CHuyd1U/r5btyQVJAB6a9rGtyDISuP+TmmdL/ZuAB5Kt4t1D\r\necUbSA2bZYOPcU5qrYT+hqK9rPWovS2rQsb8IYVOWYYVh96EVo8fGGJZhOCr\r\nF8wc2eznKgBVIvXyEpvqqCcQDaG3eMD4D3FBvo1lW6C1m0H0VSUHL8hzVcf0\r\nQINkfcElAnzoOLci3wjGSwAk3dJKMRdXjPQfL08kKjBrfDw7LQqUiqJJunB9\r\nq4wobDEc9M3q/DTJD4n+PsyXn+gkKbrowx+YSnfyHsYtHwUkwRNJ+k4pa28E\r\nhM4sKdeEMzTYc67RBRXK9GM7BZFqTsyoh9whVVwwWnr9SCZaFBhRZcrVkqqM\r\n8Tary1d+BXCnDRBVpMIbzmhxTdOmwjVyZCu48gviwp4kulsa6jHE5j8fFe2v\r\nZCL/9F/iHkiM4n3uaSl8PbNefrZx9/NgTPasD4T+m/M2hpSlHc+lP+y8gVLe\r\n3pru3dmgyL/1OyrraTbKPJqR1r9pdJPa29E=\r\n=hlda\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"chcodes-hamza","email":"contact@ch-codes.com"},"directories":{},"maintainers":[{"name":"chcodes-hamza","email":"contact@ch-codes.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/notifications-toast_1.0.1_1674413255708_0.6867347822970291"},"_hasShrinkwrap":false}},"time":{"created":"2023-01-22T17:36:54.776Z","1.0.0":"2023-01-22T17:36:55.010Z","modified":"2023-01-22T18:47:35.947Z","1.0.1":"2023-01-22T18:47:35.841Z"},"maintainers":[{"name":"chcodes-hamza","email":"contact@ch-codes.com"}],"description":"toast notification libraby and custom element","homepage":"https://github.com/Hamza-chaouch/notifications-lib-element#readme","keywords":["custom-elements","js","toast","notification"],"repository":{"type":"git","url":"git+https://github.com/Hamza-chaouch/notifications-lib-element.git"},"author":{"name":"CHAOUCH Hamza"},"bugs":{"url":"https://github.com/Hamza-chaouch/notifications-lib-element/issues"},"license":"ISC","readme":"# **Toast notification library & Custom element** \r\n![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/Hamza-chaouch/notifications-lib-element/main)  \r\n![npm](https://img.shields.io/badge/npm-1.0.0-green)\r\n\r\n\r\nThis is a library which a class or a custom web component to display toast notifications in the positions that you configure.\r\n\r\n\r\n![](preview.PNG)\r\n\r\n## Usage \r\n\r\n### With npm\r\nInstall the package using npm or yarn\r\n\r\n```bash\r\nnpm i  @chcodes-hamza/notifications-toast\r\n# or\r\nyarn add  @chcodes-hamza/notifications-toast\r\n```\r\n\r\nThen import it in your script\r\n\r\n```js\r\nimport \"./node_modules/@chcodes-hamza/notifications-toast/dist/Toast.js\"\r\n```\r\n\r\n### With unpkg.com\r\n\r\n```html\r\n<script type=\"module\" src=\"https://unpkg.com/@chcodes-hamza/notifications-toast\"></script>\r\n```\r\n\r\nThen use the custom element in your html  `<toast-notifications> </toast-notifications>`.\r\n\r\n```html\r\n<toast-notifications options='{\r\n      \"text\": \"Custom element\",\r\n      \"position\": \"top-right\",\r\n      \"pauseOnHover\": true,\r\n      \"pauseOnFocusLoss\": true,\r\n      \"autoClose\": 5000,\r\n      \"type\":\"sucess\"\r\n    }'></toast-notifications>\r\n```\r\n\r\n## Customization\r\n### Attributes\r\n\r\n| Attribute | Type | Description                                 |\r\n|-----------|------|---------------------------------------------|\r\n| options   | JSON | a JSON object that contains many properties |\r\n\r\n#### Options Object: \r\n\r\n| Option       | Default          | Description                                                                                                               |\r\n|--------------|------------------|---------------------------------------------------------------------------------------------------------------------------|\r\n| text         | empty            | the text displayed in the toast                                                                                           |\r\n| position     | top-right        | the postion where the toast will be displayed (top-right, top-left, top-center ,bottom-center, bottom-left , bottom-right) |\r\n| pauseOnHover | true             | the toast progress bar stops when it s hovred                                                                             |\r\n| pauseOnFocusLoss | true             | the toast progress bar stops when you leave the current window                                                            |\r\n| autoClose    | 5000 ms          | the toast will be closed automaticly after the 5000ms if you wnat to make it disappear manually put it false              |\r\n| type         | default template | customize the type of the toast (danger, info , success, warning)                                                         |\r\n| showProgress | true             | enable the progress bar in the toast bottom                                                                               |\r\n|  canClose | true             | give ability to close the toast                                                                                           |\r\n|  onClose | ()=>{}           | customize the action after the toast is closed, callback as input                                                         |\r\n\r\n\r\n\r\n\r\n### CSS Custom Properties\r\n\r\n\r\n|  Property   |\r\n|-----|\r\n|  --text-color-default   |\r\n|  --chcodes-notif-default   |\r\n|  --chcodes-notif-default-progress   |\r\n|   --chcodes-notif-info  |\r\n|   --chcodes-notif-info-progress  |\r\n|  --chcodes-notif-danger   |\r\n|  --chcodes-notif-danger-progress   |\r\n| --chcodes-notif-warning  |\r\n| --chcodes-notif-warning-progress  |\r\n| --chcodes-notif-sucess  |\r\n| --chcodes-notif-sucess-progress  |\r\n\r\n\r\n\r\n","readmeFilename":"readme.md"}