| Current Path : /home/eolienneia/www/templates/yootheme/vendor/assets/uikit/dist/js/components/ |
| Current File : /home/eolienneia/www/templates/yootheme/vendor/assets/uikit/dist/js/components/notification.min.js |
/*! UIkit 3.11.2-dev.4c11be04b | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(t,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitnotification",["uikit-util"],i):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitNotification=i(t.UIkit.util))})(this,function(t){"use strict";var i={props:{container:Boolean},data:{container:!0},computed:{container:function(e){var n=e.container;return n===!0&&this.$container||n&&t.$(n)}}},r,c={mixins:[i],functional:!0,args:["message","status"],data:{message:"",status:"",timeout:5e3,group:null,pos:"top-center",clsContainer:"uk-notification",clsClose:"uk-notification-close",clsMsg:"uk-notification-message"},install:f,computed:{marginProp:function(e){var n=e.pos;return"margin"+(t.startsWith(n,"top")?"Top":"Bottom")},startProps:function(){var e;return e={opacity:0},e[this.marginProp]=-this.$el.offsetHeight,e}},created:function(){var e=t.$("."+this.clsContainer+"-"+this.pos,this.container)||t.append(this.container,'<div class="'+this.clsContainer+" "+this.clsContainer+"-"+this.pos+'" style="display: block"></div>');this.$mount(t.append(e,'<div class="'+this.clsMsg+(this.status?" "+this.clsMsg+"-"+this.status:"")+'"> <a href class="'+this.clsClose+'" data-uk-close></a> <div>'+this.message+"</div> </div>"))},connected:function(){var e=this,n,s=t.toFloat(t.css(this.$el,this.marginProp));t.Transition.start(t.css(this.$el,this.startProps),(n={opacity:1},n[this.marginProp]=s,n)).then(function(){e.timeout&&(e.timer=setTimeout(e.close,e.timeout))})},events:(r={click:function(e){t.closest(e.target,'a[href="#"],a[href=""]')&&e.preventDefault(),this.close()}},r[t.pointerEnter]=function(){this.timer&&clearTimeout(this.timer)},r[t.pointerLeave]=function(){this.timeout&&(this.timer=setTimeout(this.close,this.timeout))},r),methods:{close:function(e){var n=this,s=function(a){var o=t.parent(a);t.trigger(a,"close",[n]),t.remove(a),o&&!o.hasChildNodes()&&t.remove(o)};this.timer&&clearTimeout(this.timer),e?s(this.$el):t.Transition.start(this.$el,this.startProps).then(s)}}};function f(e){e.notification.closeAll=function(n,s){t.apply(document.body,function(a){var o=e.getComponent(a,"notification");o&&(!n||n===o.group)&&o.close(s)})}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("notification",c),c});