uikit 3.14.2-dev.5f6f1e6a6 → 3.14.2-dev.854a8e6b0
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 +4 -0
- package/build/util.js +8 -2
- package/dist/css/uikit-core-rtl.css +21 -11
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +21 -11
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +23 -23
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +23 -23
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -2
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -2
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -2
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -2
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -2
- package/dist/js/components/parallax.js +2 -2
- package/dist/js/components/parallax.min.js +1 -2
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -2
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -2
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -2
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -2
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -2
- package/dist/js/components/tooltip.js +15 -5
- package/dist/js/components/tooltip.min.js +1 -2
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -2
- package/dist/js/uikit-core.js +33 -22
- package/dist/js/uikit-core.min.js +1 -2
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -2
- package/dist/js/uikit.js +34 -23
- package/dist/js/uikit.min.js +1 -2
- package/package.json +2 -2
- package/src/js/components/parallax.js +1 -1
- package/src/js/mixin/position.js +16 -6
- package/src/js/util/position.js +15 -13
- package/src/js/util/viewport.js +6 -7
- package/src/less/components/drop.less +2 -1
- package/src/less/components/dropdown.less +2 -1
- package/src/less/components/navbar.less +28 -10
- package/src/less/theme/navbar.less +3 -10
- package/src/scss/components/drop.scss +2 -1
- package/src/scss/components/dropdown.scss +2 -1
- package/src/scss/components/navbar.scss +28 -10
- package/src/scss/mixins-theme.scss +0 -10
- package/src/scss/theme/navbar.scss +3 -0
- package/src/scss/variables-theme.scss +7 -1
- package/src/scss/variables.scss +7 -1
- package/tests/navbar.html +15 -59
|
@@ -1,2 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.2-dev.5f6f1e6a6 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("uikit-util")):"function"==typeof define&&define.amd?define("uikitslideshow",["uikit-util"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).UIkitSlideshow=e(t.UIkit.util)}(this,(function(t){"use strict";var e={connected(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},i={slide:{show:t=>[{transform:n(-100*t)},{transform:n()}],percent:t=>s(t),translate:(t,e)=>[{transform:n(-100*e*t)},{transform:n(100*e*(1-t))}]}};function s(e){return Math.abs(t.css(e,"transform").split(",")[4]/e.offsetWidth)||0}function n(t,e){return void 0===t&&(t=0),void 0===e&&(e="%"),"translate3d("+(t+=t?e:"")+", 0, 0)"}function r(t){return"scale3d("+t+", "+t+", 1)"}function h(e,i,s){t.trigger(e,t.createEvent(i,!1,!1,s))}var a={connected(){var e;this.registerObserver(t.observeResize((null==(e=this.$options.resizeTargets)?void 0:e.call(this))||this.$el,(()=>this.$emit("resize"))))}};var o={mixins:[{mixins:[{props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){this.autoplay&&this.startAutoplay()},disconnected(){this.stopAutoplay()},update(){t.attr(this.slides,"tabindex","-1")},events:[{name:"visibilitychange",el:()=>document,filter(){return this.autoplay},handler(){document.hidden?this.stopAutoplay():this.startAutoplay()}}],methods:{startAutoplay(){this.stopAutoplay(),this.interval=setInterval((()=>(!this.draggable||!t.$(":focus",this.$el))&&(!this.pauseOnHover||!t.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 i=this[e];this[e]=e=>{const s=t.getEventPos(e).x*(t.isRtl?-1:1);this.prevPos=s===this.pos?this.prevPos:this.pos,this.pos=s,i(e)}}},events:[{name:t.pointerDown,delegate(){return this.selSlides},handler(e){var i;!this.draggable||!t.isTouch(e)&&(i=e.target,!i.children.length&&i.childNodes.length)||t.closest(e.target,t.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(t){t.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,t.on(document,t.pointerMove,this.move,{passive:!1}),t.on(document,t.pointerUp+" "+t.pointerCancel+" input",this.end,!0),t.css(this.list,"userSelect","none")},move(e){const i=this.pos-this.drag;if(0===i||this.prevPos===this.pos||!this.dragging&&Math.abs(i)<this.threshold)return;t.css(this.list,"pointerEvents","none"),e.cancelable&&e.preventDefault(),this.dragging=!0,this.dir=i<0?1:-1;const{slides:s}=this;let{prevIndex:n}=this,r=Math.abs(i),h=this.getIndex(n+this.dir,n),a=this._getDistance(n,h)||s[n].offsetWidth;for(;h!==n&&r>a;)this.drag-=a*this.dir,n=h,r-=a,h=this.getIndex(n+this.dir,n),a=this._getDistance(n,h)||s[n].offsetWidth;this.percent=r/a;const o=s[n],d=s[h],l=this.index!==h,c=n===h;let p;[this.index,this.prevIndex].filter((e=>!t.includes([h,n],e))).forEach((e=>{t.trigger(s[e],"itemhidden",[this]),c&&(p=!0,this.prevIndex=n)})),(this.index===n&&this.prevIndex!==n||p)&&t.trigger(s[this.index],"itemshown",[this]),l&&(this.prevIndex=n,this.index=h,!c&&t.trigger(o,"beforeitemhide",[this]),t.trigger(d,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),o,!c&&d),l&&(!c&&t.trigger(o,"itemhide",[this]),t.trigger(d,"itemshow",[this]))},end(){if(t.off(document,t.pointerMove,this.move,{passive:!1}),t.off(document,t.pointerUp+" "+t.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=(t.isRtl?this.dir*(t.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)}t.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}},{data:{selNav:!1},computed:{nav(e,i){let{selNav:s}=e;return t.$(s,i)},selNavItem(t){let{attrItem:e}=t;return"["+e+"],[data-"+e+"]"},navItems(e,i){return t.$$(this.selNavItem,i)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&t.html(this.nav,this.slides.map(((t,e)=>"<li "+this.attrItem+'="'+e+'"><a href></a></li>')).join("")),this.navItems.concat(this.nav).forEach((t=>t&&(t.hidden=!this.maxIndex))),this.updateNav()},events:["resize"]},events:[{name:"click",delegate(){return this.selNavItem},handler(e){e.preventDefault(),this.show(t.data(e.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const e=this.getValidIndex();for(const i of this.navItems){const s=t.data(i,this.attrItem);t.toggleClass(i,this.clsActive,t.toNumber(s)===e),t.toggleClass(i,"uk-invisible",this.finite&&("previous"===s&&0===e||"next"===s&&e>=this.maxIndex))}}}},a],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(){t.removeClass(this.slides,this.clsActive)},computed:{duration(t,e){let{velocity:i}=t;return.5*(e.offsetWidth/i)+300},list(e,i){let{selList:s}=e;return t.$(s,i)},maxIndex(){return this.length-1},selSlides(t){let{selList:e,selSlides:i}=t;return e+" "+(i||"> *")},slides:{get(){return t.$$(this.selSlides,this.$el)},watch(){this.$reset()}},length(){return this.slides.length}},methods:{show(e,i){if(void 0===i&&(i=!1),this.dragging||!this.length)return;const{stack:s}=this,n=i?0:s.length,r=()=>{s.splice(n,1),s.length&&this.show(s.shift(),!0)};if(s[i?"unshift":"push"](e),!i&&s.length>1)return void(2===s.length&&this._transitioner.forward(Math.min(this.duration,200)));const h=this.getIndex(this.index),a=t.hasClass(this.slides,this.clsActive)&&this.slides[h],o=this.getIndex(e,this.index),d=this.slides[o];if(a===d)return void r();if(this.dir=function(t,e){return"next"===t?1:"previous"===t||t<e?-1:1}(e,h),this.prevIndex=h,this.index=o,a&&!t.trigger(a,"beforeitemhide",[this])||!t.trigger(d,"beforeitemshow",[this,a]))return this.index=this.prevIndex,void r();const l=this._show(a,d,i).then((()=>(a&&t.trigger(a,"itemhidden",[this]),t.trigger(d,"itemshown",[this]),new Promise((e=>{t.fastdom.write((()=>{s.shift(),s.length?this.show(s.shift(),!0):this._transitioner=null,e()}))})))));return a&&t.trigger(a,"itemhide",[this]),t.trigger(d,"itemshow",[this]),l},getIndex(e,i){return void 0===e&&(e=this.index),void 0===i&&(i=this.index),t.clamp(t.getIndex(e,this.slides,i,this.finite),0,this.maxIndex)},getValidIndex(t,e){return void 0===t&&(t=this.index),void 0===e&&(e=this.prevIndex),this.getIndex(t,e)},_show(t,e,i){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:i?e.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}),!i&&!t)return this._translate(1),Promise.resolve();const{length:s}=this.stack;return this._transitioner[s>1?"forward":"show"](s>1?Math.min(this.duration,75+75/(s-1)):this.duration,this.percent)},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_translate(t,e,i){void 0===e&&(e=this.prevIndex),void 0===i&&(i=this.index);const s=this._getTransitioner(e!==i&&e,i);return s.translate(t),s},_getTransitioner(e,i,s,n){return void 0===e&&(e=this.prevIndex),void 0===i&&(i=this.index),void 0===s&&(s=this.dir||1),void 0===n&&(n=this.transitionOptions),new this.Transitioner(t.isNumber(e)?this.slides[e]:e,t.isNumber(i)?this.slides[i]:i,s*(t.isRtl?-1:1),n)}}}],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:i,Transitioner:function(e,i,s,n){let{animation:r,easing:a}=n;const{percent:o,translate:d,show:l=t.noop}=r,c=l(s),p=new t.Deferred;return{dir:s,show(n,r,o){void 0===r&&(r=0);const d=o?"linear":a;return n-=Math.round(n*t.clamp(r,-1,1)),this.translate(r),h(i,"itemin",{percent:r,duration:n,timing:d,dir:s}),h(e,"itemout",{percent:1-r,duration:n,timing:d,dir:s}),Promise.all([t.Transition.start(i,c[1],n,d),t.Transition.start(e,c[0],n,d)]).then((()=>{this.reset(),p.resolve()}),t.noop),p.promise},cancel(){t.Transition.cancel([i,e])},reset(){for(const s in c[0])t.css([i,e],s,"")},forward(s,n){return void 0===n&&(n=this.percent()),t.Transition.cancel([i,e]),this.show(s,n,!0)},translate(n){this.reset();const r=d(n,s);t.css(i,r[1]),t.css(e,r[0]),h(i,"itemtranslatein",{percent:n,dir:s}),h(e,"itemtranslateout",{percent:1-n,dir:s})},percent:()=>o(e||i,i,s),getDistance:()=>null==e?void 0:e.offsetWidth}}},computed:{animation(t){let{animation:e,Animations:i}=t;return{...i[e]||i.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(e){let{target:i}=e;t.addClass(i,this.clsActive)},itemshown(e){let{target:i}=e;t.addClass(i,this.clsActivated)},itemhidden(e){let{target:i}=e;t.removeClass(i,this.clsActive,this.clsActivated)}}},d={...i,fade:{show:()=>[{opacity:0,zIndex:0},{zIndex:-1}],percent:e=>1-t.css(e,"opacity"),translate:t=>[{opacity:1-t,zIndex:0},{zIndex:-1}]},scale:{show:()=>[{opacity:0,transform:r(1.5),zIndex:0},{zIndex:-1}],percent:e=>1-t.css(e,"opacity"),translate:t=>[{opacity:1-t,transform:r(1+.5*t),zIndex:0},{zIndex:-1}]},pull:{show:t=>t<0?[{transform:n(30),zIndex:-1},{transform:n(),zIndex:0}]:[{transform:n(-100),zIndex:0},{transform:n(),zIndex:-1}],percent:(t,e,i)=>i<0?1-s(e):s(t),translate:(t,e)=>e<0?[{transform:n(30*t),zIndex:-1},{transform:n(-100*(1-t)),zIndex:0}]:[{transform:n(100*-t),zIndex:0},{transform:n(30*(1-t)),zIndex:-1}]},push:{show:t=>t<0?[{transform:n(100),zIndex:0},{transform:n(),zIndex:-1}]:[{transform:n(-30),zIndex:-1},{transform:n(),zIndex:0}],percent:(t,e,i)=>i>0?1-s(e):s(t),translate:(t,e)=>e<0?[{transform:n(100*t),zIndex:0},{transform:n(-30*(1-t)),zIndex:-1}]:[{transform:n(-30*t),zIndex:-1},{transform:n(100*(1-t)),zIndex:0}]}},l={mixins:[e,o,{update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex(this.index);~this.prevIndex&&this.index===t||this.show(t)},events:["resize"]}},{mixins:[{methods:{lazyload(e,i){void 0===e&&(e=this.$el),void 0===i&&(i=this.$el),this.registerObserver(t.observeIntersection(e,((e,s)=>{for(const e of t.toNodes(t.isFunction(i)?i():i))t.$$('[loading="lazy"]',e).forEach((e=>t.removeAttr(e,"loading")));for(const t of e.filter((t=>{let{isIntersecting:e}=t;return e})).map((t=>{let{target:e}=t;return e})))s.unobserve(t)})))}}}],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}}],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:d},update:{read(){if(!this.list)return!1;let[e,i]=this.ratio.split(":").map(Number);return i=i*this.list.offsetWidth/e||0,this.minHeight&&(i=Math.max(this.minHeight,i)),this.maxHeight&&(i=Math.min(this.maxHeight,i)),{height:i-t.boxModelAdjust(this.list,"height","content-box")}},write(e){let{height:i}=e;i>0&&t.css(this.list,"minHeight",i)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map((t=>this.slides[this.getIndex(this.index+t)]))}}};return"undefined"!=typeof window&&window.UIkit&&window.UIkit.component("slideshow",l),l}));
|
|
1
|
+
/*! UIkit 3.14.2-dev.854a8e6b0 | 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==null?void 0: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.14.2-dev.
|
|
1
|
+
/*! UIkit 3.14.2-dev.854a8e6b0 | 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,2 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.2-dev.
|
|
2
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("uikit-util")):"function"==typeof define&&define.amd?define("uikitsortable",["uikit-util"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).UIkitSortable=e(t.UIkit.util)}(this,(function(t){"use strict";function e(e){return function(e,s,n){const o=[[]];for(const r of e){if(!t.isVisible(r))continue;let e=i(r);for(let t=o.length-1;t>=0;t--){const a=o[t];if(!a[0]){a.push(r);break}let h;if(a[0].offsetParent===r.offsetParent?h=i(a[0]):(e=i(r,!0),h=i(a[0],!0)),e[s]>=h[n]-1&&e[s]!==h[s]){o.push([r]);break}if(e[n]-1>h[s]||e[s]===h[s]){a.push(r);break}if(0===t){o.unshift([r]);break}}}return o}(e,"top","bottom")}function i(e,i){void 0===i&&(i=!1);let{offsetTop:s,offsetLeft:n,offsetHeight:o,offsetWidth:r}=e;return i&&([s,n]=t.offsetPosition(e)),{top:s,left:n,bottom:s+o,right:n+r}}const s="uk-transition-leave",n="uk-transition-enter";function o(e,i,o,l){void 0===l&&(l=0);const c=r(i,!0),d={opacity:1},u={opacity:0},p=t=>()=>c===r(i)?t():Promise.reject(),m=p((()=>(t.addClass(i,s),Promise.all(h(i).map(((e,i)=>new Promise((s=>setTimeout((()=>t.Transition.start(e,u,o/2,"ease").then(s)),i*l)))))).then((()=>t.removeClass(i,s)))))),f=p((()=>{const s=t.height(i);return t.addClass(i,n),e(),t.css(t.children(i),{opacity:0}),new Promise((e=>requestAnimationFrame((()=>{const a=t.children(i),p=t.height(i);t.css(i,"alignContent","flex-start"),t.height(i,s);const m=h(i);t.css(a,u);const f=m.map(((e,i)=>new Promise((s=>setTimeout((()=>t.Transition.start(e,d,o/2,"ease").then(s)),i*l)))));s!==p&&f.push(t.Transition.start(i,{height:p},o/2+m.length*l,"ease")),Promise.all(f).then((()=>{t.removeClass(i,n),c===r(i)&&(t.css(i,{height:"",alignContent:""}),t.css(a,{opacity:""}),delete i.dataset.transition),e()}))}))))}));return t.hasClass(i,s)?a(i).then(f):t.hasClass(i,n)?a(i).then(m).then(f):m().then(f)}function r(e,i){return i&&(e.dataset.transition=1+r(e)),t.toNumber(e.dataset.transition)||0}function a(e){return Promise.all(t.children(e).filter(t.Transition.inProgress).map((e=>new Promise((i=>t.once(e,"transitionend transitioncanceled",i))))))}function h(i){return e(t.children(i)).reduce(((e,i)=>e.concat(t.sortBy(i.filter((e=>t.isInView(e))),"offsetLeft"))),[])}function l(e,i,s){return new Promise((n=>requestAnimationFrame((()=>{let o=t.children(i);const r=o.map((t=>c(t,!0))),a=t.css(i,["height","padding"]);t.Transition.cancel(i),o.forEach(t.Transition.cancel),d(i),e(),o=o.concat(t.children(i).filter((e=>!t.includes(o,e)))),Promise.resolve().then((()=>{t.fastdom.flush();const e=t.css(i,["height","padding"]),[h,l]=function(e,i,s){const n=i.map(((e,i)=>!(!t.parent(e)||!(i in s))&&(s[i]?t.isVisible(e)?u(e):{opacity:0}:{opacity:t.isVisible(e)?1:0}))),o=n.map(((n,o)=>{const r=t.parent(i[o])===e&&(s[o]||c(i[o]));if(!r)return!1;if(n){if(!("opacity"in n)){const{opacity:t}=r;t%1?n.opacity=1:delete r.opacity}}else delete r.opacity;return r}));return[n,o]}(i,o,r);o.forEach(((e,i)=>l[i]&&t.css(e,l[i]))),t.css(i,{display:"block",...a}),requestAnimationFrame((()=>{const r=o.map(((e,n)=>t.parent(e)===i&&t.Transition.start(e,h[n],s,"ease"))).concat(t.Transition.start(i,e,s,"ease"));Promise.all(r).then((()=>{o.forEach(((e,s)=>t.parent(e)===i&&t.css(e,"display",0===h[s].opacity?"none":""))),d(i)}),t.noop).then(n)}))}))}))))}function c(e,i){const s=t.css(e,"zIndex");return!!t.isVisible(e)&&{display:"",opacity:i?t.css(e,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:"auto"===s?t.index(e):s,...u(e)}}function d(e){t.css(e.children,{height:"",left:"",opacity:"",pointerEvents:"",position:"",top:"",marginTop:"",marginLeft:"",transform:"",width:"",zIndex:""}),t.css(e,{height:"",display:"",padding:""})}function u(e){const{height:i,width:s}=t.offset(e),{top:n,left:o}=t.position(e),{marginLeft:r,marginTop:a}=t.css(e,["marginTop","marginLeft"]);return{top:n,left:o,height:i,width:s,marginLeft:r,marginTop:a,transform:""}}var p={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(e,i){void 0===i&&(i=this.$el);const s=this.animation,n="fade"===s?o:"delayed-fade"===s?function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return o(...e,40)}:s?l:()=>(e(),Promise.resolve());return n(e,i,this.duration).then((()=>this.$update(i,"resize")),t.noop)}}},m={mixins:[{connected(){!t.hasClass(this.$el,this.$name)&&t.addClass(this.$el,this.$name)}},p],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 e of["init","start","move","end"]){const i=this[e];this[e]=e=>{t.assign(this.pos,t.getEventPos(e)),i(e)}}},events:{name:t.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return t.children(this.target)},isEmpty:{get(){return t.isEmpty(this.items)},watch(e){t.toggleClass(this.target,this.clsEmpty,e)},immediate:!0},handles:{get(e,i){let{handle:s}=e;return s?t.$$(s,i):this.items},watch(e,i){t.css(i,{touchAction:"",userSelect:""}),t.css(e,{touchAction:t.hasTouch?"none":"",userSelect:"none"})},immediate:!0}},update:{write(e){if(!this.drag||!t.parent(this.placeholder))return;const{pos:{x:i,y:s},origin:{offsetTop:n,offsetLeft:o},placeholder:r}=this;t.css(this.drag,{top:s-n,left:i-o});const a=this.getSortable(document.elementFromPoint(i,s));if(!a)return;const{items:h}=a;if(h.some(t.Transition.inProgress))return;const l=function(e,i){return e[t.findIndex(e,(e=>t.pointInRect(i,e.getBoundingClientRect())))]}(h,{x:i,y:s});if(h.length&&(!l||l===r))return;const c=this.getSortable(r),d=function(e,i,s,n,o,r){if(!t.children(e).length)return;const a=i.getBoundingClientRect();if(!r)return function(e,i){const s=1===t.children(e).length;s&&t.append(e,i);const n=t.children(e),o=n.some(((t,e)=>{const i=t.getBoundingClientRect();return n.slice(e+1).some((t=>{const e=t.getBoundingClientRect();return!g([i.left,i.right],[e.left,e.right])}))}));s&&t.remove(i);return o}(e,s)||o<a.top+a.height/2?i:i.nextElementSibling;const h=s.getBoundingClientRect(),l=g([a.top,a.bottom],[h.top,h.bottom]),c=l?n:o,d=l?"width":"height",u=l?"left":"top",p=l?"right":"bottom",m=h[d]<a[d]?a[d]-h[d]:0;if(h[u]<a[u])return!(m&&c<a[u]+m)&&i.nextElementSibling;if(m&&c>a[p]-m)return!1;return i}(a.target,l,r,i,s,a===c&&e.moved!==l);!1!==d&&(d&&r===d||(a!==c?(c.remove(r),e.moved=l):delete e.moved,a.insert(r,d),this.touched.add(a)))},events:["move"]},methods:{init(e){const{target:i,button:s,defaultPrevented:n}=e,[o]=this.items.filter((e=>t.within(i,e)));!o||n||s>0||t.isInput(i)||t.within(i,"."+this.clsNoDrag)||this.handle&&!t.within(i,this.handle)||(e.preventDefault(),this.touched=new Set([this]),this.placeholder=o,this.origin={target:i,index:t.index(o),...this.pos},t.on(document,t.pointerMove,this.move),t.on(document,t.pointerUp,this.end),this.threshold||this.start(e))},start(e){this.drag=function(e,i){const s=t.append(e,i.outerHTML.replace(/(^<)(?:li|tr)|(?:li|tr)(\/>$)/g,"$1div$2"));return t.css(s,"margin","0","important"),t.css(s,{boxSizing:"border-box",width:i.offsetWidth,height:i.offsetHeight,padding:t.css(i,"padding")}),t.height(s.firstElementChild,t.height(i.firstElementChild)),s}(this.$container,this.placeholder);const{left:i,top:s}=this.placeholder.getBoundingClientRect();t.assign(this.origin,{offsetLeft:this.pos.x-i,offsetTop:this.pos.y-s}),t.addClass(this.drag,this.clsDrag,this.clsCustom),t.addClass(this.placeholder,this.clsPlaceholder),t.addClass(this.items,this.clsItem),t.addClass(document.documentElement,this.clsDragState),t.trigger(this.$el,"start",[this,this.placeholder]),function(e){let i=Date.now();f=setInterval((()=>{let{x:s,y:n}=e;n+=t.scrollTop(window);const o=.3*(Date.now()-i);i=Date.now(),t.scrollParents(document.elementFromPoint(s,e.y),/auto|scroll/).reverse().some((e=>{let{scrollTop:i,scrollHeight:s}=e;const{top:r,bottom:a,height:h}=t.offsetViewport(e);if(r<n&&r+35>n)i-=o;else{if(!(a>n&&a-35<n))return;i+=o}if(i>0&&i<s-h)return t.scrollTop(e,i),!0}))}),15)}(this.pos),this.move(e)},move(t){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(t)},end(){if(t.off(document,t.pointerMove,this.move),t.off(document,t.pointerUp,this.end),!this.drag)return;clearInterval(f);const e=this.getSortable(this.placeholder);this===e?this.origin.index!==t.index(this.placeholder)&&t.trigger(this.$el,"moved",[this,this.placeholder]):(t.trigger(e.$el,"added",[e,this.placeholder]),t.trigger(this.$el,"removed",[this,this.placeholder])),t.trigger(this.$el,"stop",[this,this.placeholder]),t.remove(this.drag),this.drag=null;for(const{clsPlaceholder:e,clsItem:i}of this.touched)for(const s of this.touched)t.removeClass(s.items,e,i);this.touched=null,t.removeClass(document.documentElement,this.clsDragState)},insert(e,i){t.addClass(this.items,this.clsItem);this.animate((()=>i?t.before(i,e):t.append(this.target,e)))},remove(e){t.within(e,this.target)&&this.animate((()=>t.remove(e)))},getSortable(e){do{const t=this.$getComponent(e,"sortable");if(t&&(t===this||!1!==this.group&&t.group===this.group))return t}while(e=t.parent(e))}}};let f;function g(t,e){return t[1]>e[0]&&e[1]>t[0]}return"undefined"!=typeof window&&window.UIkit&&window.UIkit.component("sortable",m),m}));
|
|
1
|
+
/*! UIkit 3.14.2-dev.854a8e6b0 | 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.14.2-dev.
|
|
1
|
+
/*! UIkit 3.14.2-dev.854a8e6b0 | 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')) :
|
|
@@ -247,12 +247,22 @@
|
|
|
247
247
|
positionAt(element, target, boundary) {
|
|
248
248
|
const [dir, align] = this.pos;
|
|
249
249
|
|
|
250
|
-
|
|
250
|
+
const mainAxisOffset =
|
|
251
|
+
uikitUtil.toPx(
|
|
251
252
|
this.offset === false ? uikitUtil.getCssVar('position-offset', element) : this.offset,
|
|
252
253
|
this.axis === 'x' ? 'width' : 'height',
|
|
253
|
-
element)
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
element) * (
|
|
255
|
+
uikitUtil.includes(['left', 'top'], dir) ? -1 : 1);
|
|
256
|
+
|
|
257
|
+
const crossAxisOffset = uikitUtil.includes(['center', 'justify'], align) ?
|
|
258
|
+
0 :
|
|
259
|
+
uikitUtil.toPx(
|
|
260
|
+
uikitUtil.getCssVar('position-shift-offset', element),
|
|
261
|
+
this.axis === 'y' ? 'width' : 'height',
|
|
262
|
+
element) * (
|
|
263
|
+
uikitUtil.includes(['left', 'top'], align) ? 1 : -1);
|
|
264
|
+
|
|
265
|
+
let offset = [mainAxisOffset, crossAxisOffset];
|
|
256
266
|
|
|
257
267
|
const attach = {
|
|
258
268
|
element: [uikitUtil.flipPosition(dir), align],
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.2-dev.
|
|
2
|
-
!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("uikit-util")):"function"==typeof define&&define.amd?define("uikittooltip",["uikit-util"],i):(t="undefined"!=typeof globalThis?globalThis:t||self).UIkitTooltip=i(t.UIkit.util)}(this,(function(t){"use strict";var i={mixins:[{props:{container:Boolean},data:{container:!0},computed:{container(i){let{container:o}=i;return!0===o&&this.$container||o&&t.$(o)}}},{props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:"",boxShadow:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0,boxShadow:"none"}},computed:{hasAnimation(t){let{animation:i}=t;return!!i[0]},hasTransition(t){let{animation:i}=t;return this.hasAnimation&&!0===i[0]}},methods:{toggleElement(i,o,e){return new Promise((s=>Promise.all(t.toNodes(i).map((i=>{const s=t.isBoolean(o)?o:!this.isToggled(i);if(!t.trigger(i,"before"+(s?"show":"hide"),[this]))return Promise.reject();e||(t.Animation.cancel(i),t.Transition.cancel(i));const n=(t.isFunction(e)?e:!1!==e&&this.hasAnimation?this.hasTransition?function(i){let{isToggled:o,duration:e,velocity:s,initProps:n,hideProps:h,transition:a,_toggle:l}=i;return(i,r)=>{const d=t.Transition.inProgress(i),p=i.hasChildNodes()?t.toFloat(t.css(i.firstElementChild,"marginTop"))+t.toFloat(t.css(i.lastElementChild,"marginBottom")):0,c=t.isVisible(i)?t.height(i)+(d?0:p):0;t.Transition.cancel(i),o(i)||l(i,!0),t.height(i,""),t.fastdom.flush();const u=t.height(i)+(d?0:p);return e=s*i.offsetHeight+e,t.height(i,c),(r?t.Transition.start(i,{...n,overflow:"hidden",height:u},Math.round(e*(1-c/u)),a):t.Transition.start(i,h,Math.round(e*(c/u)),a).then((()=>l(i,!1)))).then((()=>t.css(i,n)))}}(this):(h=this,(i,o)=>{t.Animation.cancel(i);const{animation:e,duration:s,_toggle:n}=h;return o?(n(i,!0),t.Animation.in(i,e[0],s,h.origin)):t.Animation.out(i,e[1]||e[0],s,h.origin).then((()=>n(i,!1)))}):this._toggle)(i,s);var h;const a=s?this.clsEnter:this.clsLeave;t.addClass(i,a),t.trigger(i,s?"show":"hide",[this]);const l=()=>{t.removeClass(i,a),t.trigger(i,s?"shown":"hidden",[this]),this.$update(i)};return n?n.then(l,(()=>(t.removeClass(i,a),Promise.reject()))):l()}))).then(s,t.noop)))},isToggled(i){return void 0===i&&(i=this.$el),[i]=t.toNodes(i),!!t.hasClass(i,this.clsEnter)||!t.hasClass(i,this.clsLeave)&&(this.cls?t.hasClass(i,this.cls.split(" ")[0]):t.isVisible(i))},_toggle(i,o){if(!i)return;let e;o=Boolean(o),this.cls?(e=t.includes(this.cls," ")||o!==t.hasClass(i,this.cls),e&&t.toggleClass(i,this.cls,t.includes(this.cls," ")?void 0:o)):(e=o===i.hidden,e&&(i.hidden=!o)),t.$$("[autofocus]",i).some((i=>t.isVisible(i)?i.focus()||!0:i.blur())),e&&(t.trigger(i,"toggled",[o,this]),this.$update(i))}}},{props:{pos:String,offset:null,flip:Boolean},data:{pos:"bottom-"+(t.isRtl?"right":"left"),flip:!0,offset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),this.axis=t.includes(["top","bottom"],this.pos[0])?"y":"x"},methods:{positionAt(i,o,e){const[s,n]=this.pos;let h=t.toPx(!1===this.offset?t.getCssVar("position-offset",i):this.offset,"x"===this.axis?"width":"height",i);h=[t.includes(["left","top"],s)?-h:+h,0];const a={element:[t.flipPosition(s),n],target:[s,n]};if("y"===this.axis){for(const t in a)a[t]=a[t].reverse();h=h.reverse()}t.positionAt(i,o,{attach:a,offset:h,boundary:e,flip:this.flip,viewportOffset:t.toPx(t.getCssVar("position-viewport-offset",i))})}}}],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},beforeConnect(){var i;this._hasTitle=t.hasAttr(this.$el,"title"),t.attr(this.$el,"title",""),this.updateAria(!1),i=this.$el,t.isFocusable(i)||t.attr(i,"tabindex","0")},disconnected(){this.hide(),t.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){!this.isToggled(this.tooltip||null)&&this.title&&(this._unbind=t.once(document,"show keydown "+t.pointerDown,this.hide,!1,(i=>i.type===t.pointerDown&&!t.within(i.target,this.$el)||"keydown"===i.type&&27===i.keyCode||"show"===i.type&&i.detail[0]!==this&&i.detail[0].$name===this.$name)),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){t.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&(await this.toggleElement(this.tooltip,!1,!1),t.remove(this.tooltip),this.tooltip=null,this._unbind()))},_show(){this.tooltip=t.append(this.container,'<div class="uk-'+this.$options.name+'"> <div class="uk-'+this.$options.name+'-inner">'+this.title+"</div> </div>"),t.on(this.tooltip,"toggled",((i,o)=>{if(this.updateAria(o),!o)return;this.positionAt(this.tooltip,this.$el);const[e,s]=function(i,o,e){let[s,n]=e;const h=t.offset(i),a=t.offset(o),l=[["left","right"],["top","bottom"]];for(const t of l){if(h[t[0]]>=a[t[1]]){s=t[1];break}if(h[t[1]]<=a[t[0]]){s=t[0];break}}const r=t.includes(l[0],s)?l[1]:l[0];n=h[r[0]]===a[r[0]]?r[0]:h[r[1]]===a[r[1]]?r[1]:"center";return[s,n]}(this.tooltip,this.$el,this.pos);this.origin="y"===this.axis?t.flipPosition(e)+"-"+s:s+"-"+t.flipPosition(e)})),this.toggleElement(this.tooltip,!0)},updateAria(i){t.attr(this.$el,"aria-expanded",i)}},events:{focus:"show",blur:"hide",[t.pointerEnter+" "+t.pointerLeave](i){t.isTouch(i)||this[i.type===t.pointerEnter?"show":"hide"]()},[t.pointerDown](i){t.isTouch(i)&&this.show()}}};return"undefined"!=typeof window&&window.UIkit&&window.UIkit.component("tooltip",i),i}));
|
|
1
|
+
/*! UIkit 3.14.2-dev.854a8e6b0 | 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:t}=o;return t===!0&&this.$container||t&&s.$(t)}}},T={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglabe-enter",clsLeave:"uk-togglabe-leave",initProps:{overflow:"",height:"",paddingTop:"",paddingBottom:"",marginTop:"",marginBottom:"",boxShadow:""},hideProps:{overflow:"hidden",height:0,paddingTop:0,paddingBottom:0,marginTop:0,marginBottom:0,boxShadow:"none"}},computed:{hasAnimation(o){let{animation:t}=o;return!!t[0]},hasTransition(o){let{animation:t}=o;return this.hasAnimation&&t[0]===!0}},methods:{toggleElement(o,t,r){return new Promise(a=>Promise.all(s.toNodes(o).map(n=>{const i=s.isBoolean(t)?t:!this.isToggled(n);if(!s.trigger(n,"before"+(i?"show":"hide"),[this]))return Promise.reject();r||(s.Animation.cancel(n),s.Transition.cancel(n));const d=(s.isFunction(r)?r:r===!1||!this.hasAnimation?this._toggle:this.hasTransition?u(this):v(this))(n,i),h=i?this.clsEnter:this.clsLeave;s.addClass(n,h),s.trigger(n,i?"show":"hide",[this]);const e=()=>{s.removeClass(n,h),s.trigger(n,i?"shown":"hidden",[this]),this.$update(n)};return d?d.then(e,()=>(s.removeClass(n,h),Promise.reject())):e()})).then(a,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,t){if(!o)return;t=Boolean(t);let r;this.cls?(r=s.includes(this.cls," ")||t!==s.hasClass(o,this.cls),r&&s.toggleClass(o,this.cls,s.includes(this.cls," ")?void 0:t)):(r=t===o.hidden,r&&(o.hidden=!t)),s.$$("[autofocus]",o).some(a=>s.isVisible(a)?a.focus()||!0:a.blur()),r&&(s.trigger(o,"toggled",[t,this]),this.$update(o))}}};function u(o){let{isToggled:t,duration:r,velocity:a,initProps:n,hideProps:i,transition:d,_toggle:h}=o;return(e,f)=>{const l=s.Transition.inProgress(e),w=e.hasChildNodes()?s.toFloat(s.css(e.firstElementChild,"marginTop"))+s.toFloat(s.css(e.lastElementChild,"marginBottom")):0,p=s.isVisible(e)?s.height(e)+(l?0:w):0;s.Transition.cancel(e),t(e)||h(e,!0),s.height(e,""),s.fastdom.flush();const g=s.height(e)+(l?0:w);return r=a*e.offsetHeight+r,s.height(e,p),(f?s.Transition.start(e,{...n,overflow:"hidden",height:g},Math.round(r*(1-p/g)),d):s.Transition.start(e,i,Math.round(r*(p/g)),d).then(()=>h(e,!1))).then(()=>s.css(e,n))}}function v(o){return(t,r)=>{s.Animation.cancel(t);const{animation:a,duration:n,_toggle:i}=o;return r?(i(t,!0),s.Animation.in(t,a[0],n,o.origin)):s.Animation.out(t,a[1]||a[0],n,o.origin).then(()=>i(t,!1))}}var b={props:{pos:String,offset:null,flip:Boolean},data:{pos:"bottom-"+(s.isRtl?"right":"left"),flip:!0,offset:!1},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,t,r){const[a,n]=this.pos,i=s.toPx(this.offset===!1?s.getCssVar("position-offset",o):this.offset,this.axis==="x"?"width":"height",o)*(s.includes(["left","top"],a)?-1:1),d=s.includes(["center","justify"],n)?0:s.toPx(s.getCssVar("position-shift-offset",o),this.axis==="y"?"width":"height",o)*(s.includes(["left","top"],n)?1:-1);let h=[i,d];const e={element:[s.flipPosition(a),n],target:[a,n]};if(this.axis==="y"){for(const f in e)e[f]=e[f].reverse();h=h.reverse()}s.positionAt(o,t,{attach:e,offset:h,boundary:r,flip:this.flip,viewportOffset:s.toPx(s.getCssVar("position-viewport-offset",o))})}}},m={mixins:[c,T,b],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),y(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,t)=>{if(this.updateAria(t),!t)return;this.positionAt(this.tooltip,this.$el);const[r,a]=$(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?s.flipPosition(r)+"-"+a:a+"-"+s.flipPosition(r)}),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 y(o){s.isFocusable(o)||s.attr(o,"tabindex","0")}function $(o,t,r){let[a,n]=r;const i=s.offset(o),d=s.offset(t),h=[["left","right"],["top","bottom"]];for(const f of h){if(i[f[0]]>=d[f[1]]){a=f[1];break}if(i[f[1]]<=d[f[0]]){a=f[0];break}}const e=s.includes(h[0],a)?h[1]:h[0];return i[e[0]]===d[e[0]]?n=e[0]:i[e[1]]===d[e[1]]?n=e[1]:n="center",[a,n]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",m),m});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.2-dev.
|
|
1
|
+
/*! UIkit 3.14.2-dev.854a8e6b0 | 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,2 +1 @@
|
|
|
1
|
-
/*! UIkit 3.14.2-dev.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("uikit-util")):"function"==typeof define&&define.amd?define("uikitupload",["uikit-util"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).UIkitUpload=t(e.UIkit.util)}(this,(function(e){"use strict";var t={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:e.noop,beforeAll:e.noop,beforeSend:e.noop,complete:e.noop,completeAll:e.noop,error:e.noop,fail:e.noop,load:e.noop,loadEnd:e.noop,loadStart:e.noop,progress:e.noop},events:{change(t){e.matches(t.target,'input[type="file"]')&&(t.preventDefault(),t.target.files&&this.upload(t.target.files),t.target.value="")},drop(t){o(t);const i=t.dataTransfer;null!=i&&i.files&&(e.removeClass(this.$el,this.clsDragover),this.upload(i.files))},dragenter(e){o(e)},dragover(t){o(t),e.addClass(this.$el,this.clsDragover)},dragleave(t){o(t),e.removeClass(this.$el,this.clsDragover)}},methods:{async upload(t){if(!(t=e.toArray(t)).length)return;e.trigger(this.$el,"upload",[t]);for(const e of t){if(this.maxSize&&1e3*this.maxSize<e.size)return void this.fail(this.msgInvalidSize.replace("%s",this.maxSize));if(this.allow&&!i(this.allow,e.name))return void this.fail(this.msgInvalidName.replace("%s",this.allow));if(this.mime&&!i(this.mime,e.type))return void this.fail(this.msgInvalidMime.replace("%s",this.mime))}this.multiple||(t=t.slice(0,1)),this.beforeAll(this,t);const o=function(e,t){const i=[];for(let o=0;o<e.length;o+=t)i.push(e.slice(o,o+t));return i}(t,this.concurrent),a=async t=>{const i=new FormData;t.forEach((e=>i.append(this.name,e)));for(const e in this.params)i.append(e,this.params[e]);try{const t=await e.ajax(this.url,{data:i,method:this.method,responseType:this.type,beforeSend:t=>{const{xhr:i}=t;i.upload&&e.on(i.upload,"progress",this.progress);for(const t of["loadStart","load","loadEnd","abort"])e.on(i,t.toLowerCase(),this[t]);return this.beforeSend(t)}});this.complete(t),o.length?await a(o.shift()):this.completeAll(t)}catch(e){this.error(e)}};await a(o.shift())}}};function i(e,t){return t.match(new RegExp("^"+e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1.")+"$","i"))}function o(e){e.preventDefault(),e.stopPropagation()}return"undefined"!=typeof window&&window.UIkit&&window.UIkit.component("upload",t),t}));
|
|
1
|
+
/*! UIkit 3.14.2-dev.854a8e6b0 | 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});
|
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.2-dev.
|
|
1
|
+
/*! UIkit 3.14.2-dev.854a8e6b0 | 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() :
|
|
@@ -1916,21 +1916,20 @@
|
|
|
1916
1916
|
['width', 'x', 'left', 'right'],
|
|
1917
1917
|
['height', 'y', 'top', 'bottom']])
|
|
1918
1918
|
{
|
|
1919
|
-
if (!isWindow(
|
|
1919
|
+
if (!isWindow(viewportElement)) {
|
|
1920
1920
|
rect[start] += toFloat(css(viewportElement, "border" + ucfirst(start) + "Width"));
|
|
1921
|
+
} else {
|
|
1922
|
+
// iOS 12 returns <body> as scrollingElement
|
|
1923
|
+
viewportElement = viewportElement.document.documentElement;
|
|
1921
1924
|
}
|
|
1922
|
-
rect[prop] = rect[dir] =
|
|
1923
|
-
viewportElement[(isWindow(viewportElement) ? 'inner' : 'client') + ucfirst(prop)];
|
|
1925
|
+
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1924
1926
|
rect[end] = rect[prop] + rect[start];
|
|
1925
1927
|
}
|
|
1926
1928
|
return rect;
|
|
1927
1929
|
}
|
|
1928
1930
|
|
|
1929
1931
|
function scrollingElement(element) {
|
|
1930
|
-
|
|
1931
|
-
document: { scrollingElement } } =
|
|
1932
|
-
toWindow(element);
|
|
1933
|
-
return scrollingElement;
|
|
1932
|
+
return toWindow(element).document.scrollingElement;
|
|
1934
1933
|
}
|
|
1935
1934
|
|
|
1936
1935
|
function getViewport$1(scrollElement) {
|
|
@@ -2078,19 +2077,21 @@
|
|
|
2078
2077
|
return false;
|
|
2079
2078
|
}
|
|
2080
2079
|
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2080
|
+
if (flip === true || includes(flip, dirs[1 - i][1])) {
|
|
2081
|
+
const newPos = attachToWithFlip(element, target, {
|
|
2082
|
+
...options,
|
|
2083
|
+
attach: {
|
|
2084
|
+
element: elAttach.map(flipDir).reverse(),
|
|
2085
|
+
target: targetAttach.map(flipDir).reverse() },
|
|
2086
2086
|
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2087
|
+
offset: elOffset.reverse(),
|
|
2088
|
+
flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
|
|
2089
|
+
recursion: true });
|
|
2090
2090
|
|
|
2091
2091
|
|
|
2092
|
-
|
|
2093
|
-
|
|
2092
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2093
|
+
return newPos;
|
|
2094
|
+
}
|
|
2094
2095
|
}
|
|
2095
2096
|
}
|
|
2096
2097
|
|
|
@@ -2948,7 +2949,7 @@
|
|
|
2948
2949
|
UIkit.data = '__uikit__';
|
|
2949
2950
|
UIkit.prefix = 'uk-';
|
|
2950
2951
|
UIkit.options = {};
|
|
2951
|
-
UIkit.version = '3.14.2-dev.
|
|
2952
|
+
UIkit.version = '3.14.2-dev.854a8e6b0';
|
|
2952
2953
|
|
|
2953
2954
|
globalAPI(UIkit);
|
|
2954
2955
|
hooksAPI(UIkit);
|
|
@@ -3593,12 +3594,22 @@
|
|
|
3593
3594
|
positionAt(element, target, boundary) {
|
|
3594
3595
|
const [dir, align] = this.pos;
|
|
3595
3596
|
|
|
3596
|
-
|
|
3597
|
+
const mainAxisOffset =
|
|
3598
|
+
toPx(
|
|
3597
3599
|
this.offset === false ? getCssVar('position-offset', element) : this.offset,
|
|
3598
3600
|
this.axis === 'x' ? 'width' : 'height',
|
|
3599
|
-
element)
|
|
3601
|
+
element) * (
|
|
3602
|
+
includes(['left', 'top'], dir) ? -1 : 1);
|
|
3603
|
+
|
|
3604
|
+
const crossAxisOffset = includes(['center', 'justify'], align) ?
|
|
3605
|
+
0 :
|
|
3606
|
+
toPx(
|
|
3607
|
+
getCssVar('position-shift-offset', element),
|
|
3608
|
+
this.axis === 'y' ? 'width' : 'height',
|
|
3609
|
+
element) * (
|
|
3610
|
+
includes(['left', 'top'], align) ? 1 : -1);
|
|
3600
3611
|
|
|
3601
|
-
offset = [
|
|
3612
|
+
let offset = [mainAxisOffset, crossAxisOffset];
|
|
3602
3613
|
|
|
3603
3614
|
const attach = {
|
|
3604
3615
|
element: [flipPosition(dir), align],
|