uikit 3.13.10 → 3.13.11-dev.eb080f280
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -1
- package/dist/css/uikit-core-rtl.css +46 -8
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +46 -8
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +46 -6
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +46 -6
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +7 -3
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +7 -3
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +18 -11
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +18 -11
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +18 -11
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +2 -2
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +62 -30
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +349 -253
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +392 -259
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/sortable.js +2 -3
- package/src/js/components/tooltip.js +38 -3
- package/src/js/core/drop.js +20 -10
- package/src/js/core/navbar.js +18 -6
- package/src/js/core/scrollspy-nav.js +4 -9
- package/src/js/core/sticky.js +55 -21
- package/src/js/mixin/media.js +12 -9
- package/src/js/mixin/modal.js +6 -2
- package/src/js/mixin/parallax.js +5 -1
- package/src/js/mixin/position.js +24 -24
- package/src/js/uikit-core.js +0 -4
- package/src/js/util/lang.js +0 -4
- package/src/js/util/position.js +180 -125
- package/src/js/util/viewport.js +42 -22
- package/src/less/components/drop.less +0 -1
- package/src/less/components/dropdown.less +11 -1
- package/src/less/components/icon.less +3 -0
- package/src/less/components/nav.less +22 -0
- package/src/less/components/navbar.less +26 -2
- package/src/less/components/search.less +2 -0
- package/src/less/components/sticky.less +8 -3
- package/src/less/theme/dropdown.less +4 -0
- package/src/less/theme/nav.less +6 -0
- package/src/less/theme/navbar.less +4 -0
- package/src/less/theme/search.less +6 -0
- package/src/scss/components/drop.scss +0 -1
- package/src/scss/components/dropdown.scss +11 -1
- package/src/scss/components/icon.scss +3 -0
- package/src/scss/components/nav.scss +22 -0
- package/src/scss/components/navbar.scss +26 -2
- package/src/scss/components/search.scss +2 -0
- package/src/scss/components/sticky.scss +8 -3
- package/src/scss/mixins-theme.scss +5 -0
- package/src/scss/mixins.scss +5 -0
- package/src/scss/theme/dropdown.scss +4 -0
- package/src/scss/theme/nav.scss +6 -0
- package/src/scss/theme/navbar.scss +4 -0
- package/src/scss/theme/search.scss +6 -0
- package/src/scss/variables-theme.scss +5 -1
- package/src/scss/variables.scss +5 -1
- package/tests/animation.html +216 -214
- package/tests/dropdown.html +16 -2
- package/tests/nav.html +27 -0
- package/tests/navbar.html +55 -4
- package/tests/parallax.html +4 -4
- package/tests/position.html +38 -39
- package/tests/sticky-navbar.html +6 -6
- package/tests/sticky-parallax.html +23 -7
- package/tests/sticky.html +300 -49
- package/src/js/core/core.js +0 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.13.10 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],v):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=v(e.UIkit.util))})(this,function(e){"use strict";var v={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},S={connected(){var s;this.registerObserver(e.observeResize(((s=this.$options.resizeTargets)==null?void 0:s.call(this))||this.$el,()=>this.$emit("resize")))}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!e.$(":focus",this.$el))&&(!this.pauseOnHover||!e.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},D={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const s of["start","move","end"]){const t=this[s];this[s]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:e.pointerDown,delegate(){return this.selSlides},handler(s){!this.draggable||!e.isTouch(s)&&T(s.target)||e.closest(s.target,e.selInput)||s.button>0||this.length<2||this.start(s)}},{name:"dragstart",handler(s){s.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,e.pointerMove,this.move,{passive:!1}),e.on(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),e.css(this.list,"userSelect","none")},move(s){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;e.css(this.list,"pointerEvents","none"),s.cancelable&&s.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,d=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&d>h;)this.drag-=h*this.dir,i=r,d-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=d/h;const l=n[i],c=n[r],f=this.index!==r,o=i===r;let a;[this.index,this.prevIndex].filter(g=>!e.includes([r,i],g)).forEach(g=>{e.trigger(n[g],"itemhidden",[this]),o&&(a=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||a)&&e.trigger(n[this.index],"itemshown",[this]),f&&(this.prevIndex=i,this.index=r,!o&&e.trigger(l,"beforeitemhide",[this]),e.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!o&&c),f&&(!o&&e.trigger(l,"itemhide",[this]),e.trigger(c,"itemshow",[this]))},end(){if(e.off(document,e.pointerMove,this.move,{passive:!1}),e.off(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const s=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=s?this.index:this.prevIndex,s&&(this.percent=1-this.percent),this.show(this.dir>0&&!s||this.dir<0&&s?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function T(s){return!s.children.length&&s.childNodes.length}var z={data:{selNav:!1},computed:{nav(s,t){let{selNav:n}=s;return e.$(n,t)},selNavItem(s){let{attrItem:t}=s;return"["+t+"],[data-"+t+"]"},navItems(s,t){return e.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&e.html(this.nav,this.slides.map((s,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(s=>s&&(s.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(s){s.preventDefault(),this.show(e.data(s.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const s=this.getValidIndex();for(const t of this.navItems){const n=e.data(t,this.attrItem);e.toggleClass(t,this.clsActive,e.toNumber(n)===s),e.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&s===0||n==="next"&&s>=this.maxIndex))}}}},O={mixins:[R,D,z,S],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration(s,t){let{velocity:n}=s;return b(t.offsetWidth/n)},list(s,t){let{selList:n}=s;return e.$(n,t)},maxIndex(){return this.length-1},selSlides(s){let{selList:t,selSlides:n}=s;return t+" "+(n||"> *")},slides:{get(){return e.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(s,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,d=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](s),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[r],l=this.getIndex(s,this.index),c=this.slides[l];if(h===c){d();return}if(this.dir=W(s,r),this.prevIndex=r,this.index=l,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,d();return}const f=this._show(h,c,t).then(()=>(h&&e.trigger(h,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),new Promise(o=>{e.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,o()})})));return h&&e.trigger(h,"itemhide",[this]),e.trigger(c,"itemshow",[this]),f},getIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.index),e.clamp(e.getIndex(s,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(s,t)},_show(s,t,n){if(this._transitioner=this._getTransitioner(s,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!s)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(s,t){return this._getTransitioner(s,s!==t&&t).getDistance()},_translate(s,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(s),i},_getTransitioner(s,t,n,i){return s===void 0&&(s=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(e.isNumber(s)?this.slides[s]:s,e.isNumber(t)?this.slides[t]:t,n*(e.isRtl?-1:1),i)}}};function W(s,t){return s==="next"?1:s==="previous"||s<t?-1:1}function b(s){return .5*s+300}var E={update:{write(){if(this.stack.length||this.dragging)return;const s=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==s)&&this.show(s)},events:["resize"]}},P={methods:{lazyload(s,t){s===void 0&&(s=this.$el),t===void 0&&(t=this.$el),this.registerObserver(e.observeIntersection(s,(n,i)=>{for(const d of e.toNodes(e.isFunction(t)?t():t))e.$$('[loading="lazy"]',d).forEach(r=>e.removeAttr(r,"loading"));for(const d of n.filter(r=>{let{isIntersecting:h}=r;return h}).map(r=>{let{target:h}=r;return h}))i.unobserve(d)}))}}},B={mixins:[P],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function y(s,t){return s===void 0&&(s=0),t===void 0&&(t="%"),s+=s?t:"","translate3d("+s+", 0, 0)"}function L(s,t,n,i){let{center:d,easing:r,list:h}=i;const l=new e.Deferred,c=s?p(s,h,d):p(t,h,d)+e.dimensions(t).width*n,f=t?p(t,h,d):c+e.dimensions(s).width*n*(e.isRtl?-1:1);return{dir:n,show(o,a,g){a===void 0&&(a=0);const m=g?"linear":r;return o-=Math.round(o*e.clamp(a,-1,1)),this.translate(a),a=s?a:e.clamp(a,0,1),u(this.getItemIn(),"itemin",{percent:a,duration:o,timing:m,dir:n}),s&&u(this.getItemIn(!0),"itemout",{percent:1-a,duration:o,timing:m,dir:n}),e.Transition.start(h,{transform:y(-f*(e.isRtl?-1:1),"px")},o,m).then(l.resolve,e.noop),l.promise},cancel(){e.Transition.cancel(h)},reset(){e.css(h,"transform","")},forward(o,a){return a===void 0&&(a=this.percent()),e.Transition.cancel(h),this.show(o,a,!0)},translate(o){const a=this.getDistance()*n*(e.isRtl?-1:1);e.css(h,"transform",y(e.clamp(-f+(a-a*o),-I(h),e.dimensions(h).width)*(e.isRtl?-1:1),"px"));const g=this.getActives(),m=this.getItemIn(),H=this.getItemIn(!0);o=s?e.clamp(o,-1,1):0;for(const x of e.children(h)){const C=e.includes(g,x),M=x===m,N=x===H,q=M||!N&&(C||n*(e.isRtl?-1:1)===-1^w(x,h)>w(s||t));u(x,"itemtranslate"+(q?"in":"out"),{dir:n,percent:N?1-o:M?o:C?1:0})}},percent(){return Math.abs((e.css(h,"transform").split(",")[4]*(e.isRtl?-1:1)+c)/(f-c))},getDistance(){return Math.abs(f-c)},getItemIn(o){o===void 0&&(o=!1);let a=this.getActives(),g=_(h,p(t||s,h,d));if(o){const m=a;a=g,g=m}return g[e.findIndex(g,m=>!e.includes(a,m))]},getActives(){return _(h,p(s||t,h,d))}}}function p(s,t,n){const i=w(s,t);return n?i-V(s,t):Math.min(i,A(t))}function A(s){return Math.max(0,I(s)-e.dimensions(s).width)}function I(s){return e.children(s).reduce((t,n)=>e.dimensions(n).width+t,0)}function V(s,t){return e.dimensions(t).width/2-e.dimensions(s).width/2}function w(s,t){return s&&(e.position(s).left+(e.isRtl?e.dimensions(s).width-e.dimensions(t).width:0))*(e.isRtl?-1:1)||0}function _(s,t){t-=1;const n=e.dimensions(s).width,i=t+n+2;return e.children(s).filter(d=>{const r=w(d,s),h=r+Math.min(e.dimensions(d).width,n);return r>=t&&h<=i})}function u(s,t,n){e.trigger(s,e.createEvent(t,!1,!1,n))}var $={mixins:[v,O,E,B],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:L},computed:{avgWidth(){return I(this.list)/this.length},finite(s){let{finite:t}=s;return t||Math.ceil(I(this.list))<Math.trunc(e.dimensions(this.list).width+j(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let s=0;const t=A(this.list),n=e.findIndex(this.slides,i=>{if(s>=t)return!0;s+=e.dimensions(i).width});return~n?n:this.length-1},sets(s){let{sets:t}=s;if(!t)return;let n=0;const i=[],d=e.dimensions(this.list).width;for(let r in this.slides){const h=e.dimensions(this.slides[r]).width;n+h>d&&(n=0),this.center?n<d/2&&n+h+e.dimensions(this.slides[+r+1]).width/2>d/2&&(i.push(+r),n=d/2-h/2):n===0&&i.push(Math.min(+r,this.maxIndex)),n+=h}if(i.length)return i},transitionOptions(){return{center:this.center,list:this.list}}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$("."+this.clsContainer,this.$el))},update:{write(){for(const s of this.navItems){const t=e.toNumber(e.data(s,this.attrItem));t!==!1&&(s.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!e.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(s){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let i=0;i<t;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");s.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((d,r)=>e.css(d,"order",this.dir>0&&r<s?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[s];let n=e.dimensions(this.list).width/2-e.dimensions(t).width/2,i=0;for(;n>0;){const d=this.getIndex(--i+s,s),r=this.slides[d];e.css(r,"order",d>s?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const s=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)e.toggleClass(n,t,e.includes(s,n))},getValidIndex(s,t){if(s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),s=this.getIndex(s,t),!this.sets)return s;let n;do{if(e.includes(this.sets,s))return s;n=s,s=this.getIndex(s+this.dir,t)}while(s!==n);return s},getAdjacentSlides(){const{width:s}=e.dimensions(this.list),t=-s,n=s*2,i=e.dimensions(this.slides[this.index]).width,d=this.center?s/2-i/2:0,r=new Set;for(const h of[-1,1]){let l=d+(h>0?i:0),c=0;do{const f=this.slides[this.getIndex(this.index+h+c++*h)];l+=e.dimensions(f).width*h,r.add(f)}while(this.slides.length>c&&l>t&&l<n)}return Array.from(r)}}};function j(s){return Math.max(0,...e.children(s).map(t=>e.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",$),$});
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,v){typeof exports=="object"&&typeof module<"u"?module.exports=v(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslider",["uikit-util"],v):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlider=v(e.UIkit.util))})(this,function(e){"use strict";var v={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},S={connected(){var s;this.registerObserver(e.observeResize(((s=this.$options.resizeTargets)==null?void 0:s.call(this))||this.$el,()=>this.$emit("resize")))}},R={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){e.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!e.$(":focus",this.$el))&&(!this.pauseOnHover||!e.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},D={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const s of["start","move","end"]){const t=this[s];this[s]=n=>{const i=e.getEventPos(n).x*(e.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:e.pointerDown,delegate(){return this.selSlides},handler(s){!this.draggable||!e.isTouch(s)&&T(s.target)||e.closest(s.target,e.selInput)||s.button>0||this.length<2||this.start(s)}},{name:"dragstart",handler(s){s.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,e.on(document,e.pointerMove,this.move,{passive:!1}),e.on(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),e.css(this.list,"userSelect","none")},move(s){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;e.css(this.list,"pointerEvents","none"),s.cancelable&&s.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,d=Math.abs(t),r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&d>h;)this.drag-=h*this.dir,i=r,d-=h,r=this.getIndex(i+this.dir,i),h=this._getDistance(i,r)||n[i].offsetWidth;this.percent=d/h;const l=n[i],c=n[r],f=this.index!==r,o=i===r;let a;[this.index,this.prevIndex].filter(g=>!e.includes([r,i],g)).forEach(g=>{e.trigger(n[g],"itemhidden",[this]),o&&(a=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||a)&&e.trigger(n[this.index],"itemshown",[this]),f&&(this.prevIndex=i,this.index=r,!o&&e.trigger(l,"beforeitemhide",[this]),e.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),l,!o&&c),f&&(!o&&e.trigger(l,"itemhide",[this]),e.trigger(c,"itemshow",[this]))},end(){if(e.off(document,e.pointerMove,this.move,{passive:!1}),e.off(document,e.pointerUp+" "+e.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const s=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=s?this.index:this.prevIndex,s&&(this.percent=1-this.percent),this.show(this.dir>0&&!s||this.dir<0&&s?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function T(s){return!s.children.length&&s.childNodes.length}var z={data:{selNav:!1},computed:{nav(s,t){let{selNav:n}=s;return e.$(n,t)},selNavItem(s){let{attrItem:t}=s;return"["+t+"],[data-"+t+"]"},navItems(s,t){return e.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&e.html(this.nav,this.slides.map((s,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(s=>s&&(s.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(s){s.preventDefault(),this.show(e.data(s.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const s=this.getValidIndex();for(const t of this.navItems){const n=e.data(t,this.attrItem);e.toggleClass(t,this.clsActive,e.toNumber(n)===s),e.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&s===0||n==="next"&&s>=this.maxIndex))}}}},O={mixins:[R,D,z,S],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){e.removeClass(this.slides,this.clsActive)},computed:{duration(s,t){let{velocity:n}=s;return b(t.offsetWidth/n)},list(s,t){let{selList:n}=s;return e.$(n,t)},maxIndex(){return this.length-1},selSlides(s){let{selList:t,selSlides:n}=s;return t+" "+(n||"> *")},slides:{get(){return e.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(s,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,d=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](s),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[r],l=this.getIndex(s,this.index),c=this.slides[l];if(h===c){d();return}if(this.dir=W(s,r),this.prevIndex=r,this.index=l,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,h])){this.index=this.prevIndex,d();return}const f=this._show(h,c,t).then(()=>(h&&e.trigger(h,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),new Promise(o=>{e.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,o()})})));return h&&e.trigger(h,"itemhide",[this]),e.trigger(c,"itemshow",[this]),f},getIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.index),e.clamp(e.getIndex(s,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(s,t){return s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(s,t)},_show(s,t,n){if(this._transitioner=this._getTransitioner(s,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!s)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(s,t){return this._getTransitioner(s,s!==t&&t).getDistance()},_translate(s,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(s),i},_getTransitioner(s,t,n,i){return s===void 0&&(s=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(e.isNumber(s)?this.slides[s]:s,e.isNumber(t)?this.slides[t]:t,n*(e.isRtl?-1:1),i)}}};function W(s,t){return s==="next"?1:s==="previous"||s<t?-1:1}function b(s){return .5*s+300}var E={update:{write(){if(this.stack.length||this.dragging)return;const s=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==s)&&this.show(s)},events:["resize"]}},P={methods:{lazyload(s,t){s===void 0&&(s=this.$el),t===void 0&&(t=this.$el),this.registerObserver(e.observeIntersection(s,(n,i)=>{for(const d of e.toNodes(e.isFunction(t)?t():t))e.$$('[loading="lazy"]',d).forEach(r=>e.removeAttr(r,"loading"));for(const d of n.filter(r=>{let{isIntersecting:h}=r;return h}).map(r=>{let{target:h}=r;return h}))i.unobserve(d)}))}}},B={mixins:[P],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}};function y(s,t){return s===void 0&&(s=0),t===void 0&&(t="%"),s+=s?t:"","translate3d("+s+", 0, 0)"}function L(s,t,n,i){let{center:d,easing:r,list:h}=i;const l=new e.Deferred,c=s?p(s,h,d):p(t,h,d)+e.dimensions(t).width*n,f=t?p(t,h,d):c+e.dimensions(s).width*n*(e.isRtl?-1:1);return{dir:n,show(o,a,g){a===void 0&&(a=0);const m=g?"linear":r;return o-=Math.round(o*e.clamp(a,-1,1)),this.translate(a),a=s?a:e.clamp(a,0,1),u(this.getItemIn(),"itemin",{percent:a,duration:o,timing:m,dir:n}),s&&u(this.getItemIn(!0),"itemout",{percent:1-a,duration:o,timing:m,dir:n}),e.Transition.start(h,{transform:y(-f*(e.isRtl?-1:1),"px")},o,m).then(l.resolve,e.noop),l.promise},cancel(){e.Transition.cancel(h)},reset(){e.css(h,"transform","")},forward(o,a){return a===void 0&&(a=this.percent()),e.Transition.cancel(h),this.show(o,a,!0)},translate(o){const a=this.getDistance()*n*(e.isRtl?-1:1);e.css(h,"transform",y(e.clamp(-f+(a-a*o),-I(h),e.dimensions(h).width)*(e.isRtl?-1:1),"px"));const g=this.getActives(),m=this.getItemIn(),H=this.getItemIn(!0);o=s?e.clamp(o,-1,1):0;for(const x of e.children(h)){const C=e.includes(g,x),M=x===m,N=x===H,q=M||!N&&(C||n*(e.isRtl?-1:1)===-1^w(x,h)>w(s||t));u(x,"itemtranslate"+(q?"in":"out"),{dir:n,percent:N?1-o:M?o:C?1:0})}},percent(){return Math.abs((e.css(h,"transform").split(",")[4]*(e.isRtl?-1:1)+c)/(f-c))},getDistance(){return Math.abs(f-c)},getItemIn(o){o===void 0&&(o=!1);let a=this.getActives(),g=_(h,p(t||s,h,d));if(o){const m=a;a=g,g=m}return g[e.findIndex(g,m=>!e.includes(a,m))]},getActives(){return _(h,p(s||t,h,d))}}}function p(s,t,n){const i=w(s,t);return n?i-V(s,t):Math.min(i,A(t))}function A(s){return Math.max(0,I(s)-e.dimensions(s).width)}function I(s){return e.children(s).reduce((t,n)=>e.dimensions(n).width+t,0)}function V(s,t){return e.dimensions(t).width/2-e.dimensions(s).width/2}function w(s,t){return s&&(e.position(s).left+(e.isRtl?e.dimensions(s).width-e.dimensions(t).width:0))*(e.isRtl?-1:1)||0}function _(s,t){t-=1;const n=e.dimensions(s).width,i=t+n+2;return e.children(s).filter(d=>{const r=w(d,s),h=r+Math.min(e.dimensions(d).width,n);return r>=t&&h<=i})}function u(s,t,n){e.trigger(s,e.createEvent(t,!1,!1,n))}var $={mixins:[v,O,E,B],props:{center:Boolean,sets:Boolean},data:{center:!1,sets:!1,attrItem:"uk-slider-item",selList:".uk-slider-items",selNav:".uk-slider-nav",clsContainer:"uk-slider-container",Transitioner:L},computed:{avgWidth(){return I(this.list)/this.length},finite(s){let{finite:t}=s;return t||Math.ceil(I(this.list))<Math.trunc(e.dimensions(this.list).width+j(this.list)+this.center)},maxIndex(){if(!this.finite||this.center&&!this.sets)return this.length-1;if(this.center)return e.last(this.sets);let s=0;const t=A(this.list),n=e.findIndex(this.slides,i=>{if(s>=t)return!0;s+=e.dimensions(i).width});return~n?n:this.length-1},sets(s){let{sets:t}=s;if(!t)return;let n=0;const i=[],d=e.dimensions(this.list).width;for(let r in this.slides){const h=e.dimensions(this.slides[r]).width;n+h>d&&(n=0),this.center?n<d/2&&n+h+e.dimensions(this.slides[+r+1]).width/2>d/2&&(i.push(+r),n=d/2-h/2):n===0&&i.push(Math.min(+r,this.maxIndex)),n+=h}if(i.length)return i},transitionOptions(){return{center:this.center,list:this.list}}},connected(){e.toggleClass(this.$el,this.clsContainer,!e.$("."+this.clsContainer,this.$el))},update:{write(){for(const s of this.navItems){const t=e.toNumber(e.data(s,this.attrItem));t!==!1&&(s.hidden=!this.maxIndex||t>this.maxIndex||this.sets&&!e.includes(this.sets,t))}this.length&&!this.dragging&&!this.stack.length&&(this.reorder(),this._translate(1)),this.updateActiveClasses()},events:["resize"]},events:{beforeitemshow(s){!this.dragging&&this.sets&&this.stack.length<2&&!e.includes(this.sets,this.index)&&(this.index=this.getValidIndex());const t=Math.abs(this.index-this.prevIndex+(this.dir>0&&this.index<this.prevIndex||this.dir<0&&this.index>this.prevIndex?(this.maxIndex+1)*this.dir:0));if(!this.dragging&&t>1){for(let i=0;i<t;i++)this.stack.splice(1,0,this.dir>0?"next":"previous");s.preventDefault();return}const n=this.dir<0||!this.slides[this.prevIndex]?this.index:this.prevIndex;this.duration=b(this.avgWidth/this.velocity)*(e.dimensions(this.slides[n]).width/this.avgWidth),this.reorder()},itemshow(){~this.prevIndex&&e.addClass(this._getTransitioner().getItemIn(),this.clsActive)},itemshown(){this.updateActiveClasses()}},methods:{reorder(){if(this.finite){e.css(this.slides,"order","");return}const s=this.dir>0&&this.slides[this.prevIndex]?this.prevIndex:this.index;if(this.slides.forEach((d,r)=>e.css(d,"order",this.dir>0&&r<s?1:this.dir<0&&r>=this.index?-1:"")),!this.center)return;const t=this.slides[s];let n=e.dimensions(this.list).width/2-e.dimensions(t).width/2,i=0;for(;n>0;){const d=this.getIndex(--i+s,s),r=this.slides[d];e.css(r,"order",d>s?-2:-1),n-=e.dimensions(r).width}},updateActiveClasses(){const s=this._getTransitioner(this.index).getActives(),t=[this.clsActive,(!this.sets||e.includes(this.sets,e.toFloat(this.index)))&&this.clsActivated||""];for(const n of this.slides)e.toggleClass(n,t,e.includes(s,n))},getValidIndex(s,t){if(s===void 0&&(s=this.index),t===void 0&&(t=this.prevIndex),s=this.getIndex(s,t),!this.sets)return s;let n;do{if(e.includes(this.sets,s))return s;n=s,s=this.getIndex(s+this.dir,t)}while(s!==n);return s},getAdjacentSlides(){const{width:s}=e.dimensions(this.list),t=-s,n=s*2,i=e.dimensions(this.slides[this.index]).width,d=this.center?s/2-i/2:0,r=new Set;for(const h of[-1,1]){let l=d+(h>0?i:0),c=0;do{const f=this.slides[this.getIndex(this.index+h+c++*h)];l+=e.dimensions(f).width*h,r.add(f)}while(this.slides.length>c&&l>t&&l<n)}return Array.from(r)}}};function j(s){return Math.max(0,...e.children(s).map(t=>e.dimensions(t).width))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slider",$),$});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -17,16 +17,19 @@
|
|
|
17
17
|
|
|
18
18
|
connected() {
|
|
19
19
|
const media = toMedia(this.media);
|
|
20
|
-
this.
|
|
21
|
-
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
this.matchMedia = true;
|
|
21
|
+
if (media) {
|
|
22
|
+
this.mediaObj = window.matchMedia(media);
|
|
23
|
+
const handler = () => {
|
|
24
|
+
this.matchMedia = this.mediaObj.matches;
|
|
25
|
+
uikitUtil.trigger(this.$el, uikitUtil.createEvent('mediachange', false, true, [this.mediaObj]));
|
|
26
|
+
};
|
|
27
|
+
this.offMediaObj = uikitUtil.on(this.mediaObj, 'change', () => {
|
|
28
|
+
handler();
|
|
29
|
+
this.$emit('resize');
|
|
30
|
+
});
|
|
26
31
|
handler();
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
handler();
|
|
32
|
+
}
|
|
30
33
|
},
|
|
31
34
|
|
|
32
35
|
disconnected() {var _this$offMediaObj;
|
|
@@ -137,12 +140,16 @@
|
|
|
137
140
|
|
|
138
141
|
|
|
139
142
|
function transformFn(prop, el, stops) {
|
|
140
|
-
|
|
143
|
+
let unit = getUnit(stops) || { x: 'px', y: 'px', rotate: 'deg' }[prop] || '';
|
|
141
144
|
let transformFn;
|
|
142
145
|
|
|
143
146
|
if (prop === 'x' || prop === 'y') {
|
|
144
147
|
prop = "translate" + uikitUtil.ucfirst(prop);
|
|
145
148
|
transformFn = (stop) => uikitUtil.toFloat(uikitUtil.toFloat(stop).toFixed(unit === 'px' ? 0 : 6));
|
|
149
|
+
} else if (prop === 'scale') {
|
|
150
|
+
unit = '';
|
|
151
|
+
transformFn = (stop) =>
|
|
152
|
+
getUnit([stop]) ? uikitUtil.toPx(stop, 'width', el, true) / el.offsetWidth : stop;
|
|
146
153
|
}
|
|
147
154
|
|
|
148
155
|
if (stops.length === 1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlideshow_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const e=R(this.media);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function R(e){if(r.isString(e)){if(r.startsWith(e,"@")){const t="breakpoint-"+e.substr(1);e=r.toFloat(r.getCssVar(t))}else if(isNaN(e))return e}return e&&r.isNumeric(e)?"(min-width: "+e+"px)":""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function V(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const y={x:F,y:F,rotate:F,scale:F,color:P,backgroundColor:P,borderColor:P,blur:m,hue:m,fopacity:m,grayscale:m,invert:m,saturate:m,sepia:m,opacity:L,stroke:A,bgx:O,bgy:O},{keys:M}=Object;var q={mixins:[g],props:W(M(y),"list"),data:W(M(y),void 0),computed:{props(e,t){return M(y).reduce((n,a)=>(r.isUndefined(e[a])||(n[a]=y[a](a,t,e[a].slice())),n),{})}},events:{load(){this.$emit()}},methods:{reset(){r.each(this.getCss(0),(e,t)=>r.css(this.$el,t,""))},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t}}};function F(e,t,n){let a=I(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",o;return e==="x"||e==="y"?(e="translate"+r.ucfirst(e),o=s=>r.toFloat(r.toFloat(s).toFixed(a==="px"?0:6))):e==="scale"&&(a="",o=s=>I([s])?r.toPx(s,"width",t,!0)/t.offsetWidth:s),n.length===1&&n.unshift(e==="scale"?1:0),n=l(n,o),(s,c)=>{s.transform+=" "+e+"("+x(n,c)+a+")"}}function P(e,t,n){return n.length===1&&n.unshift(b(t,e,"")),n=l(n,a=>H(t,a)),(a,o)=>{const[s,c,i]=S(n,o),h=s.map((d,f)=>(d+=i*(c[f]-d),f===3?r.toFloat(d):parseInt(d,10))).join(",");a[e]="rgba("+h+")"}}function H(e,t){return b(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function m(e,t,n){n.length===1&&n.unshift(0);const a=I(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=l(n),(o,s)=>{const c=x(n,s);o.filter+=" "+e+"("+(c+a)+")"}}function L(e,t,n){return n.length===1&&n.unshift(b(t,e,"")),n=l(n),(a,o)=>{a[e]=x(n,o)}}function A(e,t,n){n.length===1&&n.unshift(0);const a=I(n),o=V(t);return n=l(n.reverse(),s=>(s=r.toFloat(s),a==="%"?s*o/100:s)),n.some(s=>{let[c]=s;return c})?(r.css(t,"strokeDasharray",o),(s,c)=>{s.strokeDashoffset=x(n,c)}):r.noop}function O(e,t,n){n.length===1&&n.unshift(0),e=e.substr(-1);const a=e==="y"?"height":"width";n=l(n,s=>r.toPx(s,a,t));const o=b(t,"background-position-"+e,"");return b(t,"backgroundSize","")==="cover"?G(e,t,n,o,a):D(e,n,o)}function G(e,t,n,a,o){const s=J(t);if(!s.width)return r.noop;const c=n.map(u=>{let[j]=u;return j}),i=Math.min(...c),h=Math.max(...c),d=c.indexOf(i)<c.indexOf(h),f=h-i;let _=(d?-f:0)-(d?i:h);const w={width:t.offsetWidth,height:t.offsetHeight},B=r.Dimensions.cover(s,w),v=B[o]-w[o];if(v<f)w[o]=B[o]+f-v;else if(v>f){const u=w[o]/r.toPx(a,o,t,!0);u&&(_-=(v-f)/u)}const E=r.Dimensions.cover(s,w),Q=D(e,n,_+"px");return(u,j)=>{Q(u,j),u.backgroundSize=E.width+"px "+E.height+"px",u.backgroundRepeat="no-repeat"}}function D(e,t,n){return function(a,o){a["background-position-"+e]="calc("+n+" + "+x(t,o)+"px)"}}const C={};function J(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(C[t])return C[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{C[t]=$(n),r.trigger(e,r.createEvent("load",!1))},$(n)):C[t]=$(n)}function $(e){return{width:e.naturalWidth,height:e.naturalHeight}}function l(e,t){t===void 0&&(t=r.toFloat);const n=[],{length:a}=e;let o=0;for(let s=0;s<a;s++){let[c,i]=r.isString(e[s])?e[s].trim().split(" "):[e[s]];if(c=t(c),i=i?r.toFloat(i)/100:null,s===0?i===null?i=0:i&&n.push([c,0]):s===a-1&&(i===null?i=1:i!==1&&(n.push([c,i]),i=1)),n.push([c,i]),i===null)o++;else if(o){const h=n[s-o-1][1],d=(i-h)/(o+1);for(let f=o;f>0;f--)n[s-f][1]=h+d*(o-f+1);o=0}}return n}function S(e,t){const n=r.findIndex(e.slice(1),a=>{let[,o]=a;return t<=o})+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function x(e,t){const[n,a,o]=S(e,t);return r.isNumber(n)?n+Math.abs(n-a)*o*(n<a?1:-1):+a}const K=/^-?\d+([^\s]*)/;function I(e,t){for(const n of e){const a=n.match==null?void 0:n.match(K);if(a)return a[1]}return t}function b(e,t,n){const a=e.style[t],o=r.css(r.css(e,t,n),t);return e.style[t]=a,o}function W(e,t){return e.reduce((n,a)=>(n[a]=t,n),{})}var T={mixins:[q],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,duration:a,timing:o,dir:s}}=e;r.fastdom.read(()=>{const c=this.getCss(N(t,s,n)),i=this.getCss(z(t)?.5:s>0?1:0);r.fastdom.write(()=>{r.css(this.$el,c),r.Transition.start(this.$el,i,a,o).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,dir:a}}=e;r.fastdom.read(()=>{const o=this.getCss(N(t,a,n));r.fastdom.write(()=>r.css(this.$el,o))})}}]};function z(e){return r.endsWith(e,"in")}function N(e,t,n){return n/=2,z(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",T),T});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.13.10 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},I={slide:{show(e){return[{transform:h(e*-100)},{transform:h()}]},percent(e){return v(e)},translate(e,t){return[{transform:h(t*-100*e)},{transform:h(t*100*(1-e))}]}}};function v(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function h(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function w(e){return"scale3d("+e+", "+e+", 1)"}function b(e,t,n,i){let{animation:l,easing:r}=i;const{percent:a,translate:m,show:c=s.noop}=l,g=c(n),f=new s.Deferred;return{dir:n,show(o,d,E){d===void 0&&(d=0);const x=E?"linear":r;return o-=Math.round(o*s.clamp(d,-1,1)),this.translate(d),u(t,"itemin",{percent:d,duration:o,timing:x,dir:n}),u(e,"itemout",{percent:1-d,duration:o,timing:x,dir:n}),Promise.all([s.Transition.start(t,g[1],o,x),s.Transition.start(e,g[0],o,x)]).then(()=>{this.reset(),f.resolve()},s.noop),f.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const o in g[0])s.css([t,e],o,"")},forward(o,d){return d===void 0&&(d=this.percent()),s.Transition.cancel([t,e]),this.show(o,d,!0)},translate(o){this.reset();const d=m(o,n);s.css(t,d[1]),s.css(e,d[0]),u(t,"itemtranslatein",{percent:o,dir:n}),u(e,"itemtranslateout",{percent:1-o,dir:n})},percent(){return a(e||t,t,n)},getDistance(){return e?.offsetWidth}}}function u(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var y={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},A={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},_={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const i=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&$(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,l=Math.abs(t),r=this.getIndex(i+this.dir,i),a=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&l>a;)this.drag-=a*this.dir,i=r,l-=a,r=this.getIndex(i+this.dir,i),a=this._getDistance(i,r)||n[i].offsetWidth;this.percent=l/a;const m=n[i],c=n[r],g=this.index!==r,f=i===r;let o;[this.index,this.prevIndex].filter(d=>!s.includes([r,i],d)).forEach(d=>{s.trigger(n[d],"itemhidden",[this]),f&&(o=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||o)&&s.trigger(n[this.index],"itemshown",[this]),g&&(this.prevIndex=i,this.index=r,!f&&s.trigger(m,"beforeitemhide",[this]),s.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),m,!f&&c),g&&(!f&&s.trigger(m,"itemhide",[this]),s.trigger(c,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function $(e){return!e.children.length&&e.childNodes.length}var N={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},S={mixins:[A,_,N,y],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return T(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,l=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[r],m=this.getIndex(e,this.index),c=this.slides[m];if(a===c){l();return}if(this.dir=C(e,r),this.prevIndex=r,this.index=m,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(c,"beforeitemshow",[this,a])){this.index=this.prevIndex,l();return}const g=this._show(a,c,t).then(()=>(a&&s.trigger(a,"itemhidden",[this]),s.trigger(c,"itemshown",[this]),new Promise(f=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,f()})})));return a&&s.trigger(a,"itemhide",[this]),s.trigger(c,"itemshow",[this]),g},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(e),i},_getTransitioner(e,t,n,i){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),i)}}};function C(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function T(e){return .5*e+300}var D={mixins:[S],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:I,Transitioner:b},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:t}=e;s.addClass(t,this.clsActive)},itemshown(e){let{target:t}=e;s.addClass(t,this.clsActivated)},itemhidden(e){let{target:t}=e;s.removeClass(t,this.clsActive,this.clsActivated)}}},H={...I,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:w(1+.5),zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:w(1+.5*e),zIndex:0},{zIndex:-1}]}},pull:{show(e){return e<0?[{transform:h(30),zIndex:-1},{transform:h(),zIndex:0}]:[{transform:h(-100),zIndex:0},{transform:h(),zIndex:-1}]},percent(e,t,n){return n<0?1-v(t):v(e)},translate(e,t){return t<0?[{transform:h(30*e),zIndex:-1},{transform:h(-100*(1-e)),zIndex:0}]:[{transform:h(-e*100),zIndex:0},{transform:h(30*(1-e)),zIndex:-1}]}},push:{show(e){return e<0?[{transform:h(100),zIndex:0},{transform:h(),zIndex:-1}]:[{transform:h(-30),zIndex:-1},{transform:h(),zIndex:0}]},percent(e,t,n){return n>0?1-v(t):v(e)},translate(e,t){return t<0?[{transform:h(e*100),zIndex:0},{transform:h(-30*(1-e)),zIndex:-1}]:[{transform:h(-30*e),zIndex:-1},{transform:h(100*(1-e)),zIndex:0}]}}},M={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==e)&&this.show(e)},events:["resize"]}},O={methods:{lazyload(e,t){e===void 0&&(e=this.$el),t===void 0&&(t=this.$el),this.registerObserver(s.observeIntersection(e,(n,i)=>{for(const l of s.toNodes(s.isFunction(t)?t():t))s.$$('[loading="lazy"]',l).forEach(r=>s.removeAttr(r,"loading"));for(const l of n.filter(r=>{let{isIntersecting:a}=r;return a}).map(r=>{let{target:a}=r;return a}))i.unobserve(l)}))}}},P={mixins:[O],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}},z={mixins:[p,D,M,P],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:H},update:{read(){if(!this.list)return!1;let[e,t]=this.ratio.split(":").map(Number);return t=t*this.list.offsetWidth/e||0,this.minHeight&&(t=Math.max(this.minHeight,t)),this.maxHeight&&(t=Math.min(this.maxHeight,t)),{height:t-s.boxModelAdjust(this.list,"height","content-box")}},write(e){let{height:t}=e;t>0&&s.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(e=>this.slides[this.getIndex(this.index+e)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",z),z});
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSlideshow=p(s.UIkit.util))})(this,function(s){"use strict";var p={connected(){!s.hasClass(this.$el,this.$name)&&s.addClass(this.$el,this.$name)}},I={slide:{show(e){return[{transform:h(e*-100)},{transform:h()}]},percent(e){return v(e)},translate(e,t){return[{transform:h(t*-100*e)},{transform:h(t*100*(1-e))}]}}};function v(e){return Math.abs(s.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function h(e,t){return e===void 0&&(e=0),t===void 0&&(t="%"),e+=e?t:"","translate3d("+e+", 0, 0)"}function w(e){return"scale3d("+e+", "+e+", 1)"}function b(e,t,n,i){let{animation:l,easing:r}=i;const{percent:a,translate:m,show:c=s.noop}=l,g=c(n),f=new s.Deferred;return{dir:n,show(o,d,E){d===void 0&&(d=0);const x=E?"linear":r;return o-=Math.round(o*s.clamp(d,-1,1)),this.translate(d),u(t,"itemin",{percent:d,duration:o,timing:x,dir:n}),u(e,"itemout",{percent:1-d,duration:o,timing:x,dir:n}),Promise.all([s.Transition.start(t,g[1],o,x),s.Transition.start(e,g[0],o,x)]).then(()=>{this.reset(),f.resolve()},s.noop),f.promise},cancel(){s.Transition.cancel([t,e])},reset(){for(const o in g[0])s.css([t,e],o,"")},forward(o,d){return d===void 0&&(d=this.percent()),s.Transition.cancel([t,e]),this.show(o,d,!0)},translate(o){this.reset();const d=m(o,n);s.css(t,d[1]),s.css(e,d[0]),u(t,"itemtranslatein",{percent:o,dir:n}),u(e,"itemtranslateout",{percent:1-o,dir:n})},percent(){return a(e||t,t,n)},getDistance(){return e?.offsetWidth}}}function u(e,t,n){s.trigger(e,s.createEvent(t,!1,!1,n))}var y={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},A={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){s.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el(){return document},filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval(()=>(!this.draggable||!s.$(":focus",this.$el))&&(!this.pauseOnHover||!s.matches(this.$el,":hover"))&&!this.stack.length&&this.show("next"),this.autoplayInterval)},stopAutoplay(){this.interval&&clearInterval(this.interval)}}},_={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const e of["start","move","end"]){const t=this[e];this[e]=n=>{const i=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,t(n)}}},events:[{name:s.pointerDown,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&$(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}}],methods:{start(){this.drag=this.pos,this._transitioner?(this.percent=this._transitioner.percent(),this.drag+=this._transitioner.getDistance()*this.percent*this.dir,this._transitioner.cancel(),this._transitioner.translate(this.percent),this.dragging=!0,this.stack=[]):this.prevIndex=this.index,s.on(document,s.pointerMove,this.move,{passive:!1}),s.on(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),s.css(this.list,"userSelect","none")},move(e){const t=this.pos-this.drag;if(t===0||this.prevPos===this.pos||!this.dragging&&Math.abs(t)<this.threshold)return;s.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=t<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,l=Math.abs(t),r=this.getIndex(i+this.dir,i),a=this._getDistance(i,r)||n[i].offsetWidth;for(;r!==i&&l>a;)this.drag-=a*this.dir,i=r,l-=a,r=this.getIndex(i+this.dir,i),a=this._getDistance(i,r)||n[i].offsetWidth;this.percent=l/a;const m=n[i],c=n[r],g=this.index!==r,f=i===r;let o;[this.index,this.prevIndex].filter(d=>!s.includes([r,i],d)).forEach(d=>{s.trigger(n[d],"itemhidden",[this]),f&&(o=!0,this.prevIndex=i)}),(this.index===i&&this.prevIndex!==i||o)&&s.trigger(n[this.index],"itemshown",[this]),g&&(this.prevIndex=i,this.index=r,!f&&s.trigger(m,"beforeitemhide",[this]),s.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),m,!f&&c),g&&(!f&&s.trigger(m,"itemhide",[this]),s.trigger(c,"itemshow",[this]))},end(){if(s.off(document,s.pointerMove,this.move,{passive:!1}),s.off(document,s.pointerUp+" "+s.pointerCancel+" input",this.end,!0),this.dragging)if(this.dragging=null,this.index===this.prevIndex)this.percent=1-this.percent,this.dir*=-1,this._show(!1,this.index,!0),this._transitioner=null;else{const e=(s.isRtl?this.dir*(s.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=e?this.index:this.prevIndex,e&&(this.percent=1-this.percent),this.show(this.dir>0&&!e||this.dir<0&&e?"next":"previous",!0)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function $(e){return!e.children.length&&e.childNodes.length}var N={data:{selNav:!1},computed:{nav(e,t){let{selNav:n}=e;return s.$(n,t)},selNavItem(e){let{attrItem:t}=e;return"["+t+"],[data-"+t+"]"},navItems(e,t){return s.$$(this.selNavItem,t)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.html(this.nav,this.slides.map((e,t)=>"<li "+this.attrItem+'="'+t+'"><a href></a></li>').join("")),this.navItems.concat(this.nav).forEach(e=>e&&(e.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(s.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const t of this.navItems){const n=s.data(t,this.attrItem);s.toggleClass(t,this.clsActive,s.toNumber(n)===e),s.toggleClass(t,"uk-invisible",this.finite&&(n==="previous"&&e===0||n==="next"&&e>=this.maxIndex))}}}},S={mixins:[A,_,N,y],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return T(t.offsetWidth/n)},list(e,t){let{selList:n}=e;return s.$(n,t)},maxIndex(){return this.length-1},selSlides(e){let{selList:t,selSlides:n}=e;return t+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(e,t){if(t===void 0&&(t=!1),this.dragging||!this.length)return;const{stack:n}=this,i=t?0:n.length,l=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[t?"unshift":"push"](e),!t&&n.length>1){n.length===2&&this._transitioner.forward(Math.min(this.duration,200));return}const r=this.getIndex(this.index),a=s.hasClass(this.slides,this.clsActive)&&this.slides[r],m=this.getIndex(e,this.index),c=this.slides[m];if(a===c){l();return}if(this.dir=C(e,r),this.prevIndex=r,this.index=m,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(c,"beforeitemshow",[this,a])){this.index=this.prevIndex,l();return}const g=this._show(a,c,t).then(()=>(a&&s.trigger(a,"itemhidden",[this]),s.trigger(c,"itemshown",[this]),new Promise(f=>{s.fastdom.write(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,f()})})));return a&&s.trigger(a,"itemhide",[this]),s.trigger(c,"itemshow",[this]),g},getIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.index),s.clamp(s.getIndex(e,this.slides,t,this.finite),0,this.maxIndex)},getValidIndex(e,t){return e===void 0&&(e=this.index),t===void 0&&(t=this.prevIndex),this.getIndex(e,t)},_show(e,t,n){if(this._transitioner=this._getTransitioner(e,t,this.dir,{easing:n?t.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!n&&!e)return this._translate(1),Promise.resolve();const{length:i}=this.stack;return this._transitioner[i>1?"forward":"show"](i>1?Math.min(this.duration,75+75/(i-1)):this.duration,this.percent)},_getDistance(e,t){return this._getTransitioner(e,e!==t&&t).getDistance()},_translate(e,t,n){t===void 0&&(t=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(t!==n?t:!1,n);return i.translate(e),i},_getTransitioner(e,t,n,i){return e===void 0&&(e=this.prevIndex),t===void 0&&(t=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(s.isNumber(e)?this.slides[e]:e,s.isNumber(t)?this.slides[t]:t,n*(s.isRtl?-1:1),i)}}};function C(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function T(e){return .5*e+300}var D={mixins:[S],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:I,Transitioner:b},computed:{animation(e){let{animation:t,Animations:n}=e;return{...n[t]||n.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:t}=e;s.addClass(t,this.clsActive)},itemshown(e){let{target:t}=e;s.addClass(t,this.clsActivated)},itemhidden(e){let{target:t}=e;s.removeClass(t,this.clsActive,this.clsActivated)}}},H={...I,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:w(1+.5),zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:w(1+.5*e),zIndex:0},{zIndex:-1}]}},pull:{show(e){return e<0?[{transform:h(30),zIndex:-1},{transform:h(),zIndex:0}]:[{transform:h(-100),zIndex:0},{transform:h(),zIndex:-1}]},percent(e,t,n){return n<0?1-v(t):v(e)},translate(e,t){return t<0?[{transform:h(30*e),zIndex:-1},{transform:h(-100*(1-e)),zIndex:0}]:[{transform:h(-e*100),zIndex:0},{transform:h(30*(1-e)),zIndex:-1}]}},push:{show(e){return e<0?[{transform:h(100),zIndex:0},{transform:h(),zIndex:-1}]:[{transform:h(-30),zIndex:-1},{transform:h(),zIndex:0}]},percent(e,t,n){return n>0?1-v(t):v(e)},translate(e,t){return t<0?[{transform:h(e*100),zIndex:0},{transform:h(-30*(1-e)),zIndex:-1}]:[{transform:h(-30*e),zIndex:-1},{transform:h(100*(1-e)),zIndex:0}]}}},M={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);(!~this.prevIndex||this.index!==e)&&this.show(e)},events:["resize"]}},O={methods:{lazyload(e,t){e===void 0&&(e=this.$el),t===void 0&&(t=this.$el),this.registerObserver(s.observeIntersection(e,(n,i)=>{for(const l of s.toNodes(s.isFunction(t)?t():t))s.$$('[loading="lazy"]',l).forEach(r=>s.removeAttr(r,"loading"));for(const l of n.filter(r=>{let{isIntersecting:a}=r;return a}).map(r=>{let{target:a}=r;return a}))i.unobserve(l)}))}}},P={mixins:[O],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}},z={mixins:[p,D,M,P],props:{ratio:String,minHeight:Number,maxHeight:Number},data:{ratio:"16:9",minHeight:!1,maxHeight:!1,selList:".uk-slideshow-items",attrItem:"uk-slideshow-item",selNav:".uk-slideshow-nav",Animations:H},update:{read(){if(!this.list)return!1;let[e,t]=this.ratio.split(":").map(Number);return t=t*this.list.offsetWidth/e||0,this.minHeight&&(t=Math.max(this.minHeight,t)),this.maxHeight&&(t=Math.min(this.maxHeight,t)),{height:t-s.boxModelAdjust(this.list,"height","content-box")}},write(e){let{height:t}=e;t>0&&s.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(e=>this.slides[this.getIndex(this.index+e)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",z),z});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -659,7 +659,7 @@
|
|
|
659
659
|
some((scrollEl) => {
|
|
660
660
|
let { scrollTop: scroll, scrollHeight } = scrollEl;
|
|
661
661
|
|
|
662
|
-
const { top, bottom, height } = uikitUtil.
|
|
662
|
+
const { top, bottom, height } = uikitUtil.offsetViewport(scrollEl);
|
|
663
663
|
|
|
664
664
|
if (top < y && top + 35 > y) {
|
|
665
665
|
scroll -= dist;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(n){return F(n,"top","bottom")}function F(n,s,o){const a=[[]];for(const r of n){if(!e.isVisible(r))continue;let c=v(r);for(let t=a.length-1;t>=0;t--){const h=a[t];if(!h[0]){h.push(r);break}let d;if(h[0].offsetParent===r.offsetParent?d=v(h[0]):(c=v(r,!0),d=v(h[0],!0)),c[s]>=d[o]-1&&c[s]!==d[s]){a.push([r]);break}if(c[o]-1>d[s]||c[s]===d[s]){h.push(r);break}if(t===0){a.unshift([r]);break}}}return a}function v(n,s){s===void 0&&(s=!1);let{offsetTop:o,offsetLeft:a,offsetHeight:r,offsetWidth:c}=n;return s&&([o,a]=e.offsetPosition(n)),{top:o,left:a,bottom:o+r,right:a+c}}const b="uk-transition-leave",w="uk-transition-enter";function y(n,s,o,a){a===void 0&&(a=0);const r=u(s,!0),c={opacity:1},t={opacity:0},h=f=>()=>r===u(s)?f():Promise.reject(),d=h(()=>(e.addClass(s,b),Promise.all(C(s).map((f,p)=>new Promise(m=>setTimeout(()=>e.Transition.start(f,t,o/2,"ease").then(m),p*a)))).then(()=>e.removeClass(s,b)))),i=h(()=>{const f=e.height(s);return e.addClass(s,w),n(),e.css(e.children(s),{opacity:0}),new Promise(p=>requestAnimationFrame(()=>{const m=e.children(s),l=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,f);const E=C(s);e.css(m,t);const B=E.map((j,O)=>new Promise(G=>setTimeout(()=>e.Transition.start(j,c,o/2,"ease").then(G),O*a)));f!==l&&B.push(e.Transition.start(s,{height:l},o/2+E.length*a,"ease")),Promise.all(B).then(()=>{e.removeClass(s,w),r===u(s)&&(e.css(s,{height:"",alignContent:""}),e.css(m,{opacity:""}),delete s.dataset.transition),p()})}))});return e.hasClass(s,b)?T(s).then(i):e.hasClass(s,w)?T(s).then(d).then(i):d().then(i)}function u(n,s){return s&&(n.dataset.transition=1+u(n)),e.toNumber(n.dataset.transition)||0}function T(n){return Promise.all(e.children(n).filter(e.Transition.inProgress).map(s=>new Promise(o=>e.once(s,"transitionend transitioncanceled",o))))}function C(n){return g(e.children(n)).reduce((s,o)=>s.concat(e.sortBy(o.filter(a=>e.isInView(a)),"offsetLeft")),[])}function R(n,s,o){return new Promise(a=>requestAnimationFrame(()=>{let r=e.children(s);const c=r.map(h=>P(h,!0)),t=e.css(s,["height","padding"]);e.Transition.cancel(s),r.forEach(e.Transition.cancel),S(s),n(),r=r.concat(e.children(s).filter(h=>!e.includes(r,h))),Promise.resolve().then(()=>{e.fastdom.flush();const h=e.css(s,["height","padding"]),[d,i]=L(s,r,c);r.forEach((f,p)=>i[p]&&e.css(f,i[p])),e.css(s,{display:"block",...t}),requestAnimationFrame(()=>{const f=r.map((p,m)=>e.parent(p)===s&&e.Transition.start(p,d[m],o,"ease")).concat(e.Transition.start(s,h,o,"ease"));Promise.all(f).then(()=>{r.forEach((p,m)=>e.parent(p)===s&&e.css(p,"display",d[m].opacity===0?"none":"")),S(s)},e.noop).then(a)})})}))}function P(n,s){const o=e.css(n,"zIndex");return e.isVisible(n)?{display:"",opacity:s?e.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(n):o,...x(n)}:!1}function L(n,s,o){const a=s.map((c,t)=>e.parent(c)&&t in o?o[t]?e.isVisible(c)?x(c):{opacity:0}:{opacity:e.isVisible(c)?1:0}:!1),r=a.map((c,t)=>{const h=e.parent(s[t])===n&&(o[t]||P(s[t]));if(!h)return!1;if(!c)delete h.opacity;else if(!("opacity"in c)){const{opacity:d}=h;d%1?c.opacity=1:delete h.opacity}return h});return[a,r]}function S(n){e.css(n.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),e.css(n,{height:"",display:"",padding:""})}function x(n){const{height:s,width:o}=e.offset(n),{top:a,left:r}=e.position(n),{marginLeft:c,marginTop:t}=e.css(n,["marginTop","marginLeft"]);return{top:a,left:r,height:s,width:o,marginLeft:c,marginTop:t,transform:""}}var z={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,s){s===void 0&&(s=this.$el);const o=this.animation;return(o==="fade"?y:o==="delayed-fade"?function(){for(var r=arguments.length,c=new Array(r),t=0;t<r;t++)c[t]=arguments[t];return y(...c,40)}:o?R:()=>(n(),Promise.resolve()))(n,s,this.duration).then(()=>this.$update(s,"resize"),e.noop)}}},H={connected(){!e.hasClass(this.$el,this.$name)&&e.addClass(this.$el,this.$name)}},I={mixins:[H,z],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const n of["init","start","move","end"]){const s=this[n];this[n]=o=>{e.assign(this.pos,e.getEventPos(o)),s(o)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return e.children(this.target)},isEmpty:{get(){return e.isEmpty(this.items)},watch(n){e.toggleClass(this.target,this.clsEmpty,n)},immediate:!0},handles:{get(n,s){let{handle:o}=n;return o?e.$$(o,s):this.items},watch(n,s){e.css(s,{touchAction:"",userSelect:""}),e.css(n,{touchAction:e.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write(n){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:o},origin:{offsetTop:a,offsetLeft:r},placeholder:c}=this;e.css(this.drag,{top:o-a,left:s-r});const t=this.getSortable(document.elementFromPoint(s,o));if(!t)return;const{items:h}=t;if(h.some(e.Transition.inProgress))return;const d=V(h,{x:s,y:o});if(h.length&&(!d||d===c))return;const i=this.getSortable(c),f=q(t.target,d,c,s,o,t===i&&n.moved!==d);f!==!1&&(f&&c===f||(t!==i?(i.remove(c),n.moved=d):delete n.moved,t.insert(c,f),this.touched.add(t)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:a}=n,[r]=this.items.filter(c=>e.within(s,c));!r||a||o>0||e.isInput(s)||e.within(s,"."+this.clsNoDrag)||this.handle&&!e.within(s,this.handle)||(n.preventDefault(),this.touched=new Set([this]),this.placeholder=r,this.origin={target:s,index:e.index(r),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(n))},start(n){this.drag=M(this.$container,this.placeholder);const{left:s,top:o}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-o}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),N(this.pos),this.move(n)},move(n){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(n)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;A();const n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:o}of this.touched)for(const a of this.touched)e.removeClass(a.items,s,o);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(n,s){e.addClass(this.items,this.clsItem);const o=()=>s?e.before(s,n):e.append(this.target,n);this.animate(o)},remove(n){!e.within(n,this.target)||this.animate(()=>e.remove(n))},getSortable(n){do{const s=this.$getComponent(n,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(n=e.parent(n))}}};let $;function N(n){let s=Date.now();$=setInterval(()=>{let{x:o,y:a}=n;a+=e.scrollTop(window);const r=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y),/auto|scroll/).reverse().some(c=>{let{scrollTop:t,scrollHeight:h}=c;const{top:d,bottom:i,height:f}=e.offsetViewport(c);if(d<a&&d+35>a)t-=r;else if(i>a&&i-35<a)t+=r;else return;if(t>0&&t<h-f)return e.scrollTop(c,t),!0})},15)}function A(){clearInterval($)}function M(n,s){const o=e.append(n,s.outerHTML.replace(/(^<)(?:li|tr)|(?:li|tr)(\/>$)/g,"$1div$2"));return e.css(o,"margin","0","important"),e.css(o,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(o.firstElementChild,e.height(s.firstElementChild)),o}function V(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function q(n,s,o,a,r,c){if(!e.children(n).length)return;const t=s.getBoundingClientRect();if(!c)return W(n,o)||r<t.top+t.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=D([t.top,t.bottom],[h.top,h.bottom]),i=d?a:r,f=d?"width":"height",p=d?"left":"top",m=d?"right":"bottom",l=h[f]<t[f]?t[f]-h[f]:0;return h[p]<t[p]?l&&i<t[p]+l?!1:s.nextElementSibling:l&&i>t[m]-l?!1:s}function W(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const a=e.children(n),r=a.some((c,t)=>{const h=c.getBoundingClientRect();return a.slice(t+1).some(d=>{const i=d.getBoundingClientRect();return!D([h.left,h.right],[i.left,i.right])})});return o&&e.remove(s),r}function D(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",I),I});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -216,50 +216,49 @@
|
|
|
216
216
|
data: {
|
|
217
217
|
pos: "bottom-" + (uikitUtil.isRtl ? 'right' : 'left'),
|
|
218
218
|
flip: true,
|
|
219
|
-
offset: false
|
|
219
|
+
offset: false,
|
|
220
|
+
viewportPadding: 10 },
|
|
220
221
|
|
|
221
222
|
|
|
222
223
|
connected() {
|
|
223
224
|
this.pos = this.$props.pos.split('-').concat('center').slice(0, 2);
|
|
224
|
-
this.
|
|
225
|
-
this.align = this.pos[1];
|
|
225
|
+
this.axis = uikitUtil.includes(['top', 'bottom'], this.pos[0]) ? 'y' : 'x';
|
|
226
226
|
},
|
|
227
227
|
|
|
228
228
|
methods: {
|
|
229
229
|
positionAt(element, target, boundary) {
|
|
230
|
-
const
|
|
231
|
-
const dir = this.pos[0];
|
|
232
|
-
const align = this.pos[1];
|
|
230
|
+
const [dir, align] = this.pos;
|
|
233
231
|
|
|
234
232
|
let { offset } = this;
|
|
235
233
|
if (!uikitUtil.isNumeric(offset)) {
|
|
236
234
|
const node = uikitUtil.$(offset);
|
|
237
235
|
offset = node ?
|
|
238
|
-
uikitUtil.offset(node)[axis === 'x' ? 'left' : 'top'] -
|
|
239
|
-
uikitUtil.offset(target)[axis === 'x' ? 'right' : 'bottom'] :
|
|
236
|
+
uikitUtil.offset(node)[this.axis === 'x' ? 'left' : 'top'] -
|
|
237
|
+
uikitUtil.offset(target)[this.axis === 'x' ? 'right' : 'bottom'] :
|
|
240
238
|
0;
|
|
241
239
|
}
|
|
242
240
|
offset = uikitUtil.toPx(offset) + uikitUtil.toPx(uikitUtil.getCssVar('position-offset', element));
|
|
241
|
+
offset = [uikitUtil.includes(['left', 'top'], dir) ? -offset : +offset, 0];
|
|
243
242
|
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
axis === '
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
243
|
+
const attach = {
|
|
244
|
+
element: [uikitUtil.flipPosition(dir), align],
|
|
245
|
+
target: [dir, align] };
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
if (this.axis === 'y') {
|
|
249
|
+
for (const prop in attach) {
|
|
250
|
+
attach[prop] = attach[prop].reverse();
|
|
251
|
+
}
|
|
252
|
+
offset = offset.reverse();
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
uikitUtil.positionAt(element, target, {
|
|
256
|
+
attach,
|
|
257
|
+
offset,
|
|
258
|
+
boundary,
|
|
259
|
+
viewportPadding: this.viewportPadding,
|
|
260
|
+
flip: this.flip });
|
|
260
261
|
|
|
261
|
-
getAxis() {
|
|
262
|
-
return this.dir === 'top' || this.dir === 'bottom' ? 'y' : 'x';
|
|
263
262
|
} } };
|
|
264
263
|
|
|
265
264
|
var Component = {
|
|
@@ -348,10 +347,12 @@
|
|
|
348
347
|
|
|
349
348
|
this.positionAt(this.tooltip, this.$el);
|
|
350
349
|
|
|
350
|
+
const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
|
|
351
|
+
|
|
351
352
|
this.origin =
|
|
352
|
-
this.
|
|
353
|
-
uikitUtil.flipPosition(
|
|
354
|
-
|
|
353
|
+
this.axis === 'y' ?
|
|
354
|
+
uikitUtil.flipPosition(dir) + "-" + align :
|
|
355
|
+
align + "-" + uikitUtil.flipPosition(dir);
|
|
355
356
|
});
|
|
356
357
|
|
|
357
358
|
this.toggleElement(this.tooltip, true);
|
|
@@ -388,6 +389,37 @@
|
|
|
388
389
|
}
|
|
389
390
|
}
|
|
390
391
|
|
|
392
|
+
function getAlignment(el, target, _ref) {let [dir, align] = _ref;
|
|
393
|
+
const elOffset = uikitUtil.offset(el);
|
|
394
|
+
const targetOffset = uikitUtil.offset(target);
|
|
395
|
+
const properties = [
|
|
396
|
+
['left', 'right'],
|
|
397
|
+
['top', 'bottom']];
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
for (const props of properties) {
|
|
401
|
+
if (elOffset[props[0]] >= targetOffset[props[1]]) {
|
|
402
|
+
dir = props[1];
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
if (elOffset[props[1]] <= targetOffset[props[0]]) {
|
|
406
|
+
dir = props[0];
|
|
407
|
+
break;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const props = uikitUtil.includes(properties[0], dir) ? properties[1] : properties[0];
|
|
412
|
+
if (elOffset[props[0]] === targetOffset[props[0]]) {
|
|
413
|
+
align = props[0];
|
|
414
|
+
} else if (elOffset[props[1]] === targetOffset[props[1]]) {
|
|
415
|
+
align = props[1];
|
|
416
|
+
} else {
|
|
417
|
+
align = 'center';
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
return [dir, align];
|
|
421
|
+
}
|
|
422
|
+
|
|
391
423
|
if (typeof window !== 'undefined' && window.UIkit) {
|
|
392
424
|
window.UIkit.component('tooltip', Component);
|
|
393
425
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,c){typeof exports=="object"&&typeof module<"u"?module.exports=c(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],c):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitTooltip=c(s.UIkit.util))})(this,function(s){"use strict";var c={props:{container:Boolean},data:{container:!0},computed:{container(o){let{container:e}=o;return e===!0&&this.$container||e&&s.$(e)}}},w={props:{cls:Boolean,animation:"list",duration:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,origin:!1,transition:"linear",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0}},computed:{hasAnimation(o){let{animation:e}=o;return!!e[0]},hasTransition(o){let{animation:e}=o;return this.hasAnimation&&e[0]===!0}},methods:{toggleElement(o,e,i){return new Promise(r=>Promise.all(s.toNodes(o).map(a=>{const n=s.isBoolean(e)?e:!this.isToggled(a);if(!s.trigger(a,"before"+(n?"show":"hide"),[this]))return Promise.reject();const h=(s.isFunction(i)?i:i===!1||!this.hasAnimation?this._toggle:this.hasTransition?T(this):u(this))(a,n),t=n?this.clsEnter:this.clsLeave;s.addClass(a,t),s.trigger(a,n?"show":"hide",[this]);const d=()=>{s.removeClass(a,t),s.trigger(a,n?"shown":"hidden",[this]),this.$update(a)};return h?h.then(d,()=>(s.removeClass(a,t),Promise.reject())):d()})).then(r,s.noop))},isToggled(o){return o===void 0&&(o=this.$el),[o]=s.toNodes(o),s.hasClass(o,this.clsEnter)?!0:s.hasClass(o,this.clsLeave)?!1:this.cls?s.hasClass(o,this.cls.split(" ")[0]):s.isVisible(o)},_toggle(o,e){if(!o)return;e=Boolean(e);let i;this.cls?(i=s.includes(this.cls," ")||e!==s.hasClass(o,this.cls),i&&s.toggleClass(o,this.cls,s.includes(this.cls," ")?void 0:e)):(i=e===o.hidden,i&&(o.hidden=!e)),s.$$("[autofocus]",o).some(r=>s.isVisible(r)?r.focus()||!0:r.blur()),i&&(s.trigger(o,"toggled",[e,this]),this.$update(o))}}};function T(o){let{isToggled:e,duration:i,initProps:r,hideProps:a,transition:n,_toggle:h}=o;return(t,d)=>{const p=s.Transition.inProgress(t),l=t.hasChildNodes()?s.toFloat(s.css(t.firstElementChild,"marginTop"))+s.toFloat(s.css(t.lastElementChild,"marginBottom")):0,f=s.isVisible(t)?s.height(t)+(p?0:l):0;s.Transition.cancel(t),e(t)||h(t,!0),s.height(t,""),s.fastdom.flush();const g=s.height(t)+(p?0:l);return s.height(t,f),(d?s.Transition.start(t,{...r,overflow:"hidden",height:g},Math.round(i*(1-f/g)),n):s.Transition.start(t,a,Math.round(i*(f/g)),n).then(()=>h(t,!1))).then(()=>s.css(t,r))}}function u(o){return(e,i)=>{s.Animation.cancel(e);const{animation:r,duration:a,_toggle:n}=o;return i?(n(e,!0),s.Animation.in(e,r[0],a,o.origin)):s.Animation.out(e,r[1]||r[0],a,o.origin).then(()=>n(e,!1))}}var v={props:{pos:String,offset:null,flip:Boolean},data:{pos:"bottom-"+(s.isRtl?"right":"left"),flip:!0,offset:!1,viewportPadding:10},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),this.axis=s.includes(["top","bottom"],this.pos[0])?"y":"x"},methods:{positionAt(o,e,i){const[r,a]=this.pos;let{offset:n}=this;if(!s.isNumeric(n)){const t=s.$(n);n=t?s.offset(t)[this.axis==="x"?"left":"top"]-s.offset(e)[this.axis==="x"?"right":"bottom"]:0}n=s.toPx(n)+s.toPx(s.getCssVar("position-offset",o)),n=[s.includes(["left","top"],r)?-n:+n,0];const h={element:[s.flipPosition(r),a],target:[r,a]};if(this.axis==="y"){for(const t in h)h[t]=h[t].reverse();n=n.reverse()}s.positionAt(o,e,{attach:h,offset:n,boundary:i,viewportPadding:this.viewportPadding,flip:this.flip})}}},m={mixins:[c,w,v],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},beforeConnect(){this._hasTitle=s.hasAttr(this.$el,"title"),s.attr(this.$el,"title",""),this.updateAria(!1),b(this.$el)},disconnected(){this.hide(),s.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(this._unbind=s.once(document,"show keydown "+s.pointerDown,this.hide,!1,o=>o.type===s.pointerDown&&!s.within(o.target,this.$el)||o.type==="keydown"&&o.keyCode===27||o.type==="show"&&o.detail[0]!==this&&o.detail[0].$name===this.$name),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){s.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&(await this.toggleElement(this.tooltip,!1,!1),s.remove(this.tooltip),this.tooltip=null,this._unbind()))},_show(){this.tooltip=s.append(this.container,'<div class="uk-'+this.$options.name+'"> <div class="uk-'+this.$options.name+'-inner">'+this.title+"</div> </div>"),s.on(this.tooltip,"toggled",(o,e)=>{if(this.updateAria(e),!e)return;this.positionAt(this.tooltip,this.$el);const[i,r]=$(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?s.flipPosition(i)+"-"+r:r+"-"+s.flipPosition(i)}),this.toggleElement(this.tooltip,!0)},updateAria(o){s.attr(this.$el,"aria-expanded",o)}},events:{focus:"show",blur:"hide",[s.pointerEnter+" "+s.pointerLeave](o){s.isTouch(o)||this[o.type===s.pointerEnter?"show":"hide"]()},[s.pointerDown](o){s.isTouch(o)&&this.show()}}};function b(o){s.isFocusable(o)||s.attr(o,"tabindex","0")}function $(o,e,i){let[r,a]=i;const n=s.offset(o),h=s.offset(e),t=[["left","right"],["top","bottom"]];for(const p of t){if(n[p[0]]>=h[p[1]]){r=p[1];break}if(n[p[1]]<=h[p[0]]){r=p[0];break}}const d=s.includes(t[0],r)?t[1]:t[0];return n[d[0]]===h[d[0]]?a=d[0]:n[d[1]]===h[d[1]]?a=d[1]:a="center",[r,a]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",m),m});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.13.
|
|
1
|
+
/*! UIkit 3.13.11-dev.eb080f280 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(o,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],n):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitUpload=n(o.UIkit.util))})(this,function(o){"use strict";var n={props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime:String,msgInvalidMime:String,msgInvalidName:String,msgInvalidSize:String,multiple:Boolean,name:String,params:Object,type:String,url:String},data:{allow:!1,clsDragover:"uk-dragover",concurrent:1,maxSize:0,method:"POST",mime:!1,msgInvalidMime:"Invalid File Type: %s",msgInvalidName:"Invalid File Name: %s",msgInvalidSize:"Invalid File Size: %s Kilobytes Max",multiple:!1,name:"files[]",params:{},type:"",url:"",abort:o.noop,beforeAll:o.noop,beforeSend:o.noop,complete:o.noop,completeAll:o.noop,error:o.noop,fail:o.noop,load:o.noop,loadEnd:o.noop,loadStart:o.noop,progress:o.noop},events:{change(e){!o.matches(e.target,'input[type="file"]')||(e.preventDefault(),e.target.files&&this.upload(e.target.files),e.target.value="")},drop(e){i(e);const t=e.dataTransfer;!(t!=null&&t.files)||(o.removeClass(this.$el,this.clsDragover),this.upload(t.files))},dragenter(e){i(e)},dragover(e){i(e),o.addClass(this.$el,this.clsDragover)},dragleave(e){i(e),o.removeClass(this.$el,this.clsDragover)}},methods:{async upload(e){if(e=o.toArray(e),!e.length)return;o.trigger(this.$el,"upload",[e]);for(const a of e){if(this.maxSize&&this.maxSize*1e3<a.size){this.fail(this.msgInvalidSize.replace("%s",this.maxSize));return}if(this.allow&&!d(this.allow,a.name)){this.fail(this.msgInvalidName.replace("%s",this.allow));return}if(this.mime&&!d(this.mime,a.type)){this.fail(this.msgInvalidMime.replace("%s",this.mime));return}}this.multiple||(e=e.slice(0,1)),this.beforeAll(this,e);const t=c(e,this.concurrent),s=async a=>{const l=new FormData;a.forEach(r=>l.append(this.name,r));for(const r in this.params)l.append(r,this.params[r]);try{const r=await o.ajax(this.url,{data:l,method:this.method,responseType:this.type,beforeSend:h=>{const{xhr:p}=h;p.upload&&o.on(p.upload,"progress",this.progress);for(const m of["loadStart","load","loadEnd","abort"])o.on(p,m.toLowerCase(),this[m]);return this.beforeSend(h)}});this.complete(r),t.length?await s(t.shift()):this.completeAll(r)}catch(r){this.error(r)}};await s(t.shift())}}};function d(e,t){return t.match(new RegExp("^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function c(e,t){const s=[];for(let a=0;a<e.length;a+=t)s.push(e.slice(a,a+t));return s}function i(e){e.preventDefault(),e.stopPropagation()}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",n),n});
|