diff --git a/notie.js b/notie.js index ccaac69..6cdeaa9 100644 --- a/notie.js +++ b/notie.js @@ -1 +1 @@ -var notie=function(t){function e(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){t.exports=o(2)},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e\n '+this.text+"\n \n ";var e=this.noties.firstChild;this.noties.insertBefore(this.notie,e),setTimeout(function(){t.notie.classList.add("notie-shown")},100),this.opts.autoHide&&this.startTimeout(),this.registerEvents()}},{key:"registerEvents",value:function(){var t=this;this.opts.autoHide?(this.events.mouseover=function(){clearTimeout(t.timeout),t.timeout=null},this.events.mouseleave=function(){return t.startTimeout()},this.notie.addEventListener("mouseover",this.events.mouseover,!1),this.notie.addEventListener("mouseleave",this.events.mouseleave,!1)):(this.notie.addEventListener("click",function(){return t.removeNotie()}),r(this.notie.querySelectorAll("[notie-prevent]"),function(t){t.addEventListener("click",function(t){return t.stopPropagation()},!1)}))}},{key:"startTimeout",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?this.opts.timeout:arguments[0];this.timeout=setTimeout(function(){t.removeNotie()},e)}},{key:"removeNotie",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?this.notie:arguments[0];e.classList.remove("notie-shown"),setTimeout(function(){t.noties.removeChild(e),e=null},200)}}]),t}()),x=function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=e.position,n=void 0===o?"top-right":o,i=e.type,r=void 0===i?"info":i,s=e.autoHide,a=void 0===s?!0:s,l=e.timeout,c=void 0===l?3e3:l;return new b(t,{type:r,position:n,autoHide:a,timeout:c})};e["default"]=x,t.exports=e["default"]},function(t,e,o){e=t.exports=o(1)(),e.push([t.id,".noties{position:fixed}.noties:empty{display:none}.noties-top-right{right:0;top:20px}.noties-top-right .notie{transform:translateX(100%)}.noties-top-right .notie.notie-shown{transform:translateX(-20px)}.noties-top-left{left:0;top:20px}.noties-top-left .notie{transform:translateX(-100%)}.noties-top-left .notie.notie-shown{transform:translateX(20px)}.noties-bottom-right{right:0;bottom:20px}.noties-bottom-right .notie{transform:translateX(100%)}.noties-bottom-right .notie.notie-shown{transform:translateX(-20px)}.noties-bottom-left{left:0;bottom:20px}.noties-bottom-left .notie{transform:translateX(-100%)}.noties-bottom-left .notie.notie-shown{transform:translateX(20px)}.noties-top-center{left:50%;transform:translateX(-50%);top:0}.noties-top-center .notie{transform:translateY(-100%)}.noties-top-center .notie.notie-shown{transform:translateY(20px)}.noties-bottom-center{left:50%;transform:translateX(-50%);bottom:0}.noties-bottom-center .notie{transform:translateY(100%)}.noties-bottom-center .notie.notie-shown{transform:translateY(-20px)}.notie{background-color:#ddd;opacity:0;transition:transform .3s,opacity .3s;border:1px solid #ddd;width:200px;max-width:80%;font:14px/1.4 Helvetica,serif;word-wrap:break-word}.notie:not(:last-child){margin-bottom:10px}.notie.notie-auto-hide-disabled{cursor:pointer}.notie.notie-shown{opacity:1}.notie .notie-body{padding:10px 12px}.notie .notie-svg{height:23px;display:block;float:left}.notie .notie-text{display:block;padding-left:30px;padding-top:2px}.notie svg{height:23px;width:23px}.notie.notie-info{background-color:#c6e4f4;border-color:#a9d3eb;color:#477dac;a{color:#477dac}}.notie.notie-error{background-color:#eac1bd;border-color:#d7a9a6;color:#ab2925;a{color:#ab2925}}.notie.notie-success{background-color:#d9f1cf;border-color:#c8e1bf;color:#748c6c;a{color:#748c6c}}.notie.notie-warning{background-color:#f7f2cf;border-color:#e8e2b2;color:#9c7d45;a{color:#9c7d45}}",""])},function(t,e,o){function n(t,e){for(var o=0;o=0&&x.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function c(t,e){var o,n,i;if(e.singleton){var r=b++;o=g||(g=a(e)),n=u.bind(null,o,r,!1),i=u.bind(null,o,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=l(e),n=p.bind(null,o),i=function(){s(o),o.href&&URL.revokeObjectURL(o.href)}):(o=a(e),n=f.bind(null,o),i=function(){s(o)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else i()}}function u(t,e,o,n){var i=o?"":n.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var r=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function f(t,e){var o=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}function p(t,e){var o=e.css,n=e.sourceMap;n&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var i=new Blob([o],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}var d={},h=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},v=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=h(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,b=0,x=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=v()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var o=i(t);return n(o,e),function(t){for(var r=[],s=0;s'},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''}]); \ No newline at end of file +var notie=function(t){function e(n){if(o[n])return o[n].exports;var i=o[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e,o){t.exports=o(2)},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e\n '+this.text+"\n \n ";var e=this.noties.firstChild;this.noties.insertBefore(this.notie,e),setTimeout(function(){t.notie.classList.add("notie-shown")},100),this.opts.autoHide&&this.startTimeout(),this.registerEvents()}},{key:"registerEvents",value:function(){var t=this;this.opts.autoHide?(this.events.mouseover=function(){clearTimeout(t.timeout),t.timeout=null},this.events.mouseleave=function(){return t.startTimeout()},this.notie.addEventListener("mouseover",this.events.mouseover,!1),this.notie.addEventListener("mouseleave",this.events.mouseleave,!1)):(this.notie.addEventListener("click",function(){return t.removeNotie()}),r(this.notie.querySelectorAll("[notie-prevent]"),function(t){t.addEventListener("click",function(t){return t.stopPropagation()},!1)}))}},{key:"startTimeout",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?this.opts.timeout:arguments[0];this.timeout=setTimeout(function(){t.removeNotie()},e)}},{key:"removeNotie",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?this.notie:arguments[0];e.classList.remove("notie-shown"),setTimeout(function(){t.noties.removeChild(e),e=null},200)}}]),t}()),x=function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=e.position,n=void 0===o?"top-right":o,i=e.type,r=void 0===i?"info":i,s=e.autoHide,a=void 0===s?!0:s,l=e.timeout,c=void 0===l?3e3:l,u=e.width,f=void 0===u?240:u;return new b(t,{type:r,position:n,autoHide:a,timeout:c,width:f})};e["default"]=x,t.exports=e["default"]},function(t,e,o){e=t.exports=o(1)(),e.push([t.id,".noties{position:fixed;max-width:80%}.noties:empty{display:none}.noties-top-right{right:0;top:20px}.noties-top-right .notie{transform:translateX(100%)}.noties-top-right .notie.notie-shown{transform:translateX(-20px)}.noties-top-left{left:0;top:20px}.noties-top-left .notie{transform:translateX(-100%)}.noties-top-left .notie.notie-shown{transform:translateX(20px)}.noties-bottom-right{right:0;bottom:20px}.noties-bottom-right .notie{transform:translateX(100%)}.noties-bottom-right .notie.notie-shown{transform:translateX(-20px)}.noties-bottom-left{left:0;bottom:20px}.noties-bottom-left .notie{transform:translateX(-100%)}.noties-bottom-left .notie.notie-shown{transform:translateX(20px)}.noties-top-center{left:50%;transform:translateX(-50%);top:0}.noties-top-center .notie{transform:translateY(-100%)}.noties-top-center .notie.notie-shown{transform:translateY(20px)}.noties-bottom-center{left:50%;transform:translateX(-50%);bottom:0}.noties-bottom-center .notie{transform:translateY(100%)}.noties-bottom-center .notie.notie-shown{transform:translateY(-20px)}.notie{background-color:#ddd;opacity:0;transition:transform .3s,opacity .3s;border:1px solid #ddd;font:14px/1.4 Helvetica,serif;word-wrap:break-word}.notie:not(:last-child){margin-bottom:10px}.notie.notie-auto-hide-disabled{cursor:pointer}.notie.notie-shown{opacity:1}.notie .notie-body{padding:10px 12px}.notie .notie-svg{height:23px;display:block;float:left}.notie .notie-text{display:block;padding-left:30px;padding-top:2px}.notie svg{height:23px;width:23px}.notie.notie-info{background-color:#c6e4f4;border-color:#a9d3eb;color:#477dac;a{color:#477dac}}.notie.notie-error{background-color:#eac1bd;border-color:#d7a9a6;color:#ab2925;a{color:#ab2925}}.notie.notie-success{background-color:#d9f1cf;border-color:#c8e1bf;color:#748c6c;a{color:#748c6c}}.notie.notie-warning{background-color:#f7f2cf;border-color:#e8e2b2;color:#9c7d45;a{color:#9c7d45}}",""])},function(t,e,o){function n(t,e){for(var o=0;o=0&&x.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function c(t,e){var o,n,i;if(e.singleton){var r=b++;o=g||(g=a(e)),n=u.bind(null,o,r,!1),i=u.bind(null,o,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=l(e),n=p.bind(null,o),i=function(){s(o),o.href&&URL.revokeObjectURL(o.href)}):(o=a(e),n=f.bind(null,o),i=function(){s(o)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else i()}}function u(t,e,o,n){var i=o?"":n.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var r=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function f(t,e){var o=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}function p(t,e){var o=e.css,n=e.sourceMap;n&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var i=new Blob([o],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}var d={},h=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},v=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=h(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,b=0,x=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=v()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var o=i(t);return n(o,e),function(t){for(var r=[],s=0;s'},function(t,e){t.exports=''},function(t,e){t.exports=''},function(t,e){t.exports=''}]); \ No newline at end of file