diff --git a/css/toast.css b/css/toast.css index 17f6541..2f1fb3b 100644 --- a/css/toast.css +++ b/css/toast.css @@ -1,3 +1,8 @@ +/** + * @author Script47 (https://github.com/Script47/Toast) + * @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component + * @version 0.6.0 + **/ #toast-container { position: sticky; z-index: 1055; diff --git a/dist/toast.min.css b/dist/toast.min.css index 45e9e20..90dcacc 100644 --- a/dist/toast.min.css +++ b/dist/toast.min.css @@ -1 +1,6 @@ +/** + * @author Script47 (https://github.com/Script47/Toast) + * @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component + * @version 0.6.0 + **/ #toast-container{position:sticky;z-index:1055;top:0}#toast-wrapper{position:absolute;top:0;right:0;margin:5px}#toast-container>#toast-wrapper>.toast{min-width:150px}#toast-container>#toast-wrapper>.toast>.toast-header strong{padding-right:20px} \ No newline at end of file diff --git a/dist/toast.min.js b/dist/toast.min.js index cc8e3df..01827d5 100644 --- a/dist/toast.min.js +++ b/dist/toast.min.js @@ -1,3 +1,8 @@ +/** + * @author Script47 (https://github.com/Script47/Toast) + * @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component + * @version 0.6.0 + **/ (function(b){b.toast=function(a){b("#toast-container").length||(b("body").prepend('
'),b("#toast-container").append('
'),b("body").on("hidden.bs.toast",".toast",function(){b(this).remove()}));var d="",e="",f="text-muted",g="",l=a.title||"Notice!",m=a.subtitle||"",h=a.content||"",k=a.delay||-1,c=a.img;switch(a.type||"info"){case "info":d="bg-info";g=f=e="text-white";break;case "success":d="bg-success"; g=f=e="text-white";break;case "warning":case "warn":d="bg-warning";g=f=e="text-white";break;case "error":case "danger":d="bg-danger",g=f=e="text-white"}a='";b("#toast-wrapper").append(a);b("#toast-wrapper .toast:last").toast("show")}})(jQuery); \ No newline at end of file diff --git a/js/toast.js b/js/toast.js index f8a63dc..1567b94 100644 --- a/js/toast.js +++ b/js/toast.js @@ -1,3 +1,8 @@ +/** + * @author Script47 (https://github.com/Script47/Toast) + * @description Toast - A Bootstrap 4.2+ jQuery plugin for the toast component + * @version 0.6.0 + **/ (function ($) { const TOAST_CONTAINER_HTML = '
'; const TOAST_WRAPPER_HTML = '
'; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..bfa7ce1 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,5 @@ +{ + "name": "toast", + "version": "0.5.0", + "lockfileVersion": 1 +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f00d02b --- /dev/null +++ b/package.json @@ -0,0 +1,28 @@ +{ + "name": "bs4-toast", + "version": "0.6.0", + "description": "Toast - A Bootstrap 4.2+ jQuery plugin for the toast component", + "main": "dist/toast.min.js", + "repository": { + "type": "git", + "url": "git+https://github.com/Script47/Toast.git" + }, + "keywords": [ + "bootstrap-4", + "bootstrap", + "toast", + "toast-notifications", + "snack", + "jquery-plugin" + ], + "author": "Script47 ", + "license": "MIT", + "bugs": { + "url": "https://github.com/Script47/Toast/issues" + }, + "homepage": "https://github.com/Script47/Toast", + "dependencies": { + "bootstrap": ">=4.2.0", + "jquery": ">=1.9.1" + } +} \ No newline at end of file