uikit 3.16.24-dev.d6158da87 → 3.16.25-dev.12f581d90
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/.eslintrc.json +0 -9
- package/.prettierrc.json +3 -4
- package/CHANGELOG.md +2 -1
- package/build/build.js +2 -2
- package/build/less.js +2 -2
- package/build/prefix.js +3 -3
- package/build/release.js +7 -7
- package/build/scope.js +3 -3
- package/build/scss.js +9 -9
- package/build/util.js +11 -11
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +2 -2
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +18 -18
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +351 -350
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +353 -352
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +6 -6
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +69 -69
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +37 -37
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +222 -224
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +37 -37
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +300 -302
- 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 +95 -95
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +2 -2
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +452 -449
- 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 +6837 -6836
- package/dist/js/uikit.min.js +1 -1
- package/package.json +8 -7
- package/src/js/api/app.js +1 -1
- package/src/js/api/boot.js +2 -2
- package/src/js/api/component.js +1 -1
- package/src/js/api/computed.js +2 -2
- package/src/js/api/events.js +2 -2
- package/src/js/api/global.js +3 -3
- package/src/js/api/hooks.js +4 -4
- package/src/js/api/instance.js +3 -3
- package/src/js/api/log.js +1 -1
- package/src/js/api/observables.js +1 -1
- package/src/js/api/observer.js +2 -2
- package/src/js/api/options.js +2 -2
- package/src/js/api/props.js +2 -2
- package/src/js/api/state.js +2 -2
- package/src/js/components/countdown.js +1 -1
- package/src/js/components/filter.js +5 -5
- package/src/js/components/internal/lightbox-animations.js +1 -1
- package/src/js/components/internal/slider-transitioner.js +6 -6
- package/src/js/components/internal/slideshow-animations.js +1 -1
- package/src/js/components/lightbox-panel.js +10 -10
- package/src/js/components/lightbox.js +2 -2
- package/src/js/components/notification.js +4 -4
- package/src/js/components/parallax.js +3 -3
- package/src/js/components/slider-parallax.js +1 -1
- package/src/js/components/slider.js +12 -12
- package/src/js/components/slideshow.js +3 -3
- package/src/js/components/sortable.js +4 -4
- package/src/js/components/tooltip.js +6 -6
- package/src/js/components/upload.js +4 -4
- package/src/js/core/accordion.js +8 -8
- package/src/js/core/alert.js +2 -2
- package/src/js/core/cover.js +1 -1
- package/src/js/core/drop.js +12 -12
- package/src/js/core/dropnav.js +7 -7
- package/src/js/core/form-custom.js +1 -1
- package/src/js/core/grid.js +9 -9
- package/src/js/core/height-match.js +2 -2
- package/src/js/core/height-viewport.js +1 -1
- package/src/js/core/icon.js +23 -23
- package/src/js/core/img.js +2 -2
- package/src/js/core/index.js +16 -14
- package/src/js/core/leader.js +2 -2
- package/src/js/core/modal.js +7 -7
- package/src/js/core/navbar.js +4 -4
- package/src/js/core/offcanvas.js +3 -3
- package/src/js/core/overflow-auto.js +3 -3
- package/src/js/core/responsive.js +3 -3
- package/src/js/core/scrollspy-nav.js +1 -1
- package/src/js/core/scrollspy.js +1 -1
- package/src/js/core/sticky.js +12 -12
- package/src/js/core/svg.js +4 -4
- package/src/js/core/switcher.js +7 -7
- package/src/js/core/tab.js +2 -2
- package/src/js/core/toggle.js +5 -5
- package/src/js/core/video.js +1 -1
- package/src/js/mixin/animate.js +1 -1
- package/src/js/mixin/i18n.js +1 -1
- package/src/js/mixin/internal/animate-fade.js +14 -14
- package/src/js/mixin/internal/animate-slide.js +1 -1
- package/src/js/mixin/internal/scroll.js +1 -1
- package/src/js/mixin/modal.js +15 -12
- package/src/js/mixin/parallax.js +2 -2
- package/src/js/mixin/position.js +2 -2
- package/src/js/mixin/slider-drag.js +1 -1
- package/src/js/mixin/slider-nav.js +8 -9
- package/src/js/mixin/slider.js +9 -9
- package/src/js/mixin/slideshow.js +1 -1
- package/src/js/mixin/togglable.js +4 -4
- package/src/js/uikit-core.js +2 -2
- package/src/js/uikit.js +2 -2
- package/src/js/util/animation.js +8 -8
- package/src/js/util/class.js +1 -1
- package/src/js/util/dimensions.js +5 -5
- package/src/js/util/dom.js +3 -3
- package/src/js/util/event.js +3 -3
- package/src/js/util/filter.js +1 -1
- package/src/js/util/lang.js +4 -4
- package/src/js/util/observer.js +2 -2
- package/src/js/util/player.js +1 -1
- package/src/js/util/position.js +5 -5
- package/src/js/util/selector.js +1 -1
- package/src/js/util/style.js +1 -1
- package/src/js/util/svg.js +2 -2
- package/src/js/util/viewport.js +6 -6
- package/tests/js/index.js +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.24-dev.d6158da87 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlideshow=p(e.UIkit.util))})(this,function(e){"use strict";var p={connected(){e.addClass(this.$el,this.$options.id)}},$={slide:{show(t){return[{transform:d(t*-100)},{transform:d()}]},percent(t){return g(t)},translate(t,s){return[{transform:d(s*-100*t)},{transform:d(s*100*(1-t))}]}}};function g(t){return Math.abs(e.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function d(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function z(t){return`scale3d(${t}, ${t}, 1)`}function S(t,s,i,{animation:n,easing:o}){const{percent:r,translate:l,show:a=e.noop}=n,f=a(i);let c;return{dir:i,show(h,m=0,x){const I=x?"linear":o;return h-=Math.round(h*e.clamp(m,-1,1)),this.translate(m),v(s,"itemin",{percent:m,duration:h,timing:I,dir:i}),v(t,"itemout",{percent:1-m,duration:h,timing:I,dir:i}),new Promise(q=>{c||(c=q),Promise.all([e.Transition.start(s,f[1],h,I),e.Transition.start(t,f[0],h,I)]).then(()=>{this.reset(),c()},e.noop)})},cancel(){return e.Transition.cancel([s,t])},reset(){for(const h in f[0])e.css([s,t],h,"")},async forward(h,m=this.percent()){return await this.cancel(),this.show(h,m,!0)},translate(h){this.reset();const m=l(h,i);e.css(s,m[1]),e.css(t,m[0]),v(s,"itemtranslatein",{percent:h,dir:i}),v(t,"itemtranslateout",{percent:1-h,dir:i})},percent(){return r(t||s,s,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function v(t,s,i){e.trigger(t,e.createEvent(s,!1,!1,i))}var C={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var i,n,o;let r=0;return((o=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:o.replace(/%s/g,()=>s[r++]||""))||""}}};const u={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};function w(t,s=t.$el,i=""){if(s.id)return s.id;let n=`${t.$options.id}-${t._uid}${i}`;return e.$(`#${n}`)&&(n=w(t,s,`${i}-2`)),n}var T={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav({selNav:t},s){return e.$(t,s)},navChildren(){return e.children(this.nav)},selNavItem({attrItem:t}){return`[${t}],[data-${t}]`},navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const i=e.data(s,this.attrItem),n=e.$("a,button",s)||s;let o,r=null;if(e.isNumeric(i)){const l=e.toNumber(i),a=this.slides[l];a&&(a.id||(a.id=w(this,a,`-item-${i}`)),r=a.id),o=this.t("slideX",e.toFloat(i)+1),e.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=w(this,this.list,"-items")),r=this.list.id),o=this.t(i);e.attr(n,{"aria-controls":r,"aria-label":e.attr(n,"aria-label")||o})}},slides(t){t.forEach((s,i)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let i=0;i<t;i++)e.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){e.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){e.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===u.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:i}=t,n=e.data(s,this.attrItem);if(!e.isNumeric(n))return;let o=i===u.HOME?0:i===u.END?"last":i===u.LEFT?"previous":i===u.RIGHT?"next":-1;~o&&(t.preventDefault(),this.show(o))}}],methods:{updateNav(){const t=this.getValidIndex();let s,i;for(const n of this.navItems){const o=e.data(n,this.attrItem),r=e.$("a,button",n)||n;if(e.isNumeric(o)){const a=e.toNumber(o)===t;e.toggleClass(n,this.clsActive,a),e.attr(r,{"aria-selected":a,tabindex:a?null:-1}),a&&(i=r),s||(s=e.matches(r,":focus"))}else e.toggleClass(n,"uk-invisible",this.finite&&(o==="previous"&&t===0||o==="next"&&t>=this.maxIndex));s&&i&&i.focus()}}}};const b={passive:!1,capture:!0},A={passive:!0,capture:!0},E="touchstart mousedown",y="touchmove mousemove",_="touchend touchcancel mouseup click input scroll";var D={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=i=>{const n=e.getEventPos(i).x*(e.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,s(i)}}},events:[{name:E,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!e.isTouch(t)&&H(t.target)||e.closest(t.target,e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:y,el(){return this.list},handler:e.noop,...b}],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,y,this.move,b),e.on(document,_,this.end,A),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:i,prevIndex:n}=this,o=Math.abs(s),r=this.getIndex(n+this.dir),l=this._getDistance(n,r);for(;r!==n&&o>l;)this.drag-=l*this.dir,n=r,o-=l,r=this.getIndex(n+this.dir),l=this._getDistance(n,r);this.percent=o/l;const a=i[n],f=i[r],c=this.index!==r,h=n===r;let m;for(const x of[this.index,this.prevIndex])e.includes([r,n],x)||(e.trigger(i[x],"itemhidden",[this]),h&&(m=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||m)&&e.trigger(i[this.index],"itemshown",[this]),c&&(this.prevIndex=n,this.index=r,!h&&e.trigger(a,"beforeitemhide",[this]),e.trigger(f,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!h&&f),c&&(!h&&e.trigger(a,"itemhide",[this]),e.trigger(f,"itemshow",[this]))},end(){if(e.off(document,y,this.move,b),e.off(document,_,this.end,A),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 t=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function H(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}var M={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),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.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};function O(t){return N(e.observeResize,t,"resize")}function P(t){return N(e.observeIntersection,t)}function U(t={}){return P({handler:function(s,i){const{targets:n=this.$el,preload:o=5}=t;for(const r of e.toNodes(e.isFunction(n)?n(this):n))e.$$('[loading="lazy"]',r).slice(0,o-1).forEach(l=>e.removeAttr(l,"loading"));for(const r of s.filter(({isIntersecting:l})=>l).map(({target:l})=>l))i.unobserve(r)},...t})}function N(t,s,i){return{observe:t,handler(){this.$emit(i)},...s}}var L={mixins:[M,D,T,C],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},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({velocity:t},s){return W(s.offsetWidth/t)},list({selList:t},s){return e.$(t,s)},maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:O(),methods:{show(t,s=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,o=s?0:n.length,r=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](t),!s&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const l=this.getIndex(this.index),a=e.hasClass(this.slides,this.clsActive)&&this.slides[l],f=this.getIndex(t,this.index),c=this.slides[f];if(a===c){r();return}if(this.dir=R(t,l),this.prevIndex=l,this.index=f,a&&!e.trigger(a,"beforeitemhide",[this])||!e.trigger(c,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const h=this._show(a,c,s).then(()=>{a&&e.trigger(a,"itemhidden",[this]),e.trigger(c,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return a&&e.trigger(a,"itemhide",[this]),e.trigger(c,"itemshow",[this]),h},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,i){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:i?s.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:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,i=this.index){const n=this._getTransitioner(s===i?!1:s,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,s=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,i*(e.isRtl?-1:1),n)}}};function R(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function W(t){return .5*t+300}var B={mixins:[L],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:$,Transitioner:S},computed:{animation({animation:t,Animations:s}){return{...s[t]||s.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){e.addClass(t,this.clsActive)},itemshown({target:t}){e.addClass(t,this.clsActivated)},itemhidden({target:t}){e.removeClass(t,this.clsActive,this.clsActivated)}}},j={...$,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:z(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:z(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:d(30),zIndex:-1},{transform:d(),zIndex:0}]:[{transform:d(-100),zIndex:0},{transform:d(),zIndex:-1}]},percent(t,s,i){return i<0?1-g(s):g(t)},translate(t,s){return s<0?[{transform:d(30*t),zIndex:-1},{transform:d(-100*(1-t)),zIndex:0}]:[{transform:d(-t*100),zIndex:0},{transform:d(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:d(100),zIndex:0},{transform:d(),zIndex:-1}]:[{transform:d(-30),zIndex:-1},{transform:d(),zIndex:0}]},percent(t,s,i){return i>0?1-g(s):g(t)},translate(t,s){return s<0?[{transform:d(t*100),zIndex:0},{transform:d(-30*(1-t)),zIndex:-1}]:[{transform:d(-30*t),zIndex:-1},{transform:d(100*(1-t)),zIndex:0}]}}},F={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex(this.index);!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},V={observe:U({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},k={mixins:[p,B,F,V],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:j},update:{read(){if(!this.list)return!1;let[t,s]=this.ratio.split(":").map(Number);return s=s*this.list.offsetWidth/t||0,this.minHeight&&(s=Math.max(this.minHeight,s)),this.maxHeight&&(s=Math.min(this.maxHeight,s)),{height:s-e.boxModelAdjust(this.list,"height","content-box")}},write({height:t}){t>0&&e.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",k),k});
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],p):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlideshow=p(e.UIkit.util))})(this,function(e){"use strict";var p={connected(){e.addClass(this.$el,this.$options.id)}},$={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex(this.index);!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},z={slide:{show(t){return[{transform:c(t*-100)},{transform:c()}]},percent(t){return g(t)},translate(t,s){return[{transform:c(s*-100*t)},{transform:c(s*100*(1-t))}]}}};function g(t){return Math.abs(e.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function c(t=0,s="%"){return t+=t?s:"","translate3d(".concat(t,", 0, 0)")}function A(t){return"scale3d(".concat(t,", ").concat(t,", 1)")}function C(t,s,i,{animation:n,easing:o}){const{percent:r,translate:a,show:h=e.noop}=n,f=h(i);let l;return{dir:i,show(d,m=0,x){const I=x?"linear":o;return d-=Math.round(d*e.clamp(m,-1,1)),this.translate(m),v(s,"itemin",{percent:m,duration:d,timing:I,dir:i}),v(t,"itemout",{percent:1-m,duration:d,timing:I,dir:i}),new Promise(q=>{l||(l=q),Promise.all([e.Transition.start(s,f[1],d,I),e.Transition.start(t,f[0],d,I)]).then(()=>{this.reset(),l()},e.noop)})},cancel(){return e.Transition.cancel([s,t])},reset(){for(const d in f[0])e.css([s,t],d,"")},async forward(d,m=this.percent()){return await this.cancel(),this.show(d,m,!0)},translate(d){this.reset();const m=a(d,i);e.css(s,m[1]),e.css(t,m[0]),v(s,"itemtranslatein",{percent:d,dir:i}),v(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return r(t||s,s,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function v(t,s,i){e.trigger(t,e.createEvent(s,!1,!1,i))}function T(t){return _(e.observeResize,t,"resize")}function E(t){return _(e.observeIntersection,t)}function D(t={}){return E({handler:function(s,i){const{targets:n=this.$el,preload:o=5}=t;for(const r of e.toNodes(e.isFunction(n)?n(this):n))e.$$('[loading="lazy"]',r).slice(0,o-1).forEach(a=>e.removeAttr(a,"loading"));for(const r of s.filter(({isIntersecting:a})=>a).map(({target:a})=>a))i.unobserve(r)},...t})}function _(t,s,i){return{observe:t,handler(){this.$emit(i)},...s}}var H={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var i,n,o;let r=0;return((o=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:o.replace(/%s/g,()=>s[r++]||""))||""}}},M={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){e.attr(this.list,"aria-live",this.autoplay?"off":"polite"),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.stack.length||this.draggable&&e.matches(this.$el,":focus-within")||this.pauseOnHover&&e.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const w={passive:!1,capture:!0},N={passive:!0,capture:!0},O="touchstart mousedown",b="touchmove mousemove",k="touchend touchcancel mouseup click input scroll";var P={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const s=this[t];this[t]=i=>{const n=e.getEventPos(i).x*(e.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,s(i)}}},events:[{name:O,passive:!0,delegate(){return"".concat(this.selList," > *")},handler(t){!this.draggable||!e.isTouch(t)&&U(t.target)||e.closest(t.target,e.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:b,el(){return this.list},handler:e.noop,...w}],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,b,this.move,w),e.on(document,k,this.end,N),e.css(this.list,"userSelect","none")},move(t){const s=this.pos-this.drag;if(s===0||this.prevPos===this.pos||!this.dragging&&Math.abs(s)<this.threshold)return;e.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=s<0?1:-1;let{slides:i,prevIndex:n}=this,o=Math.abs(s),r=this.getIndex(n+this.dir),a=this._getDistance(n,r);for(;r!==n&&o>a;)this.drag-=a*this.dir,n=r,o-=a,r=this.getIndex(n+this.dir),a=this._getDistance(n,r);this.percent=o/a;const h=i[n],f=i[r],l=this.index!==r,d=n===r;let m;for(const x of[this.index,this.prevIndex])e.includes([r,n],x)||(e.trigger(i[x],"itemhidden",[this]),d&&(m=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||m)&&e.trigger(i[this.index],"itemshown",[this]),l&&(this.prevIndex=n,this.index=r,!d&&e.trigger(h,"beforeitemhide",[this]),e.trigger(f,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&f),l&&(!d&&e.trigger(h,"itemhide",[this]),e.trigger(f,"itemshow",[this]))},end(){if(e.off(document,b,this.move,w),e.off(document,k,this.end,N),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 t=(e.isRtl?this.dir*(e.isRtl?1:-1):this.dir)<0==this.prevPos>this.pos;this.index=t?this.index:this.prevIndex,t&&(this.percent=1-this.percent),this.show(this.dir>0&&!t||this.dir<0&&t?"next":"previous",!0)}e.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null},_getDistance(t,s){return this._getTransitioner(t,t!==s&&s).getDistance()||this.slides[t].offsetWidth}}};function U(t){return e.css(t,"userSelect")!=="none"&&e.toArray(t.childNodes).some(s=>s.nodeType===3&&s.textContent.trim())}function y(t,s=t.$el,i=""){if(s.id)return s.id;let n="".concat(t.$options.id,"-").concat(t._uid).concat(i);return e.$("#".concat(n))&&(n=y(t,s,"".concat(i,"-2"))),n}const u={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var L={i18n:{next:"Next slide",previous:"Previous slide",slideX:"Slide %s",slideLabel:"%s of %s",role:"String"},data:{selNav:!1,role:"region"},computed:{nav({selNav:t},s){return e.$(t,s)},navChildren(){return e.children(this.nav)},selNavItem({attrItem:t}){return"[".concat(t,"],[data-").concat(t,"]")},navItems(t,s){return e.$$(this.selNavItem,s)}},watch:{nav(t,s){e.attr(t,"role","tablist"),s&&this.$emit()},list(t){e.attr(t,"role","presentation")},navChildren(t){e.attr(t,"role","presentation")},navItems(t){for(const s of t){const i=e.data(s,this.attrItem),n=e.$("a,button",s)||s;let o,r=null;if(e.isNumeric(i)){const a=e.toNumber(i),h=this.slides[a];h&&(h.id||(h.id=y(this,h,"-item-".concat(i))),r=h.id),o=this.t("slideX",e.toFloat(i)+1),e.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=y(this,this.list,"-items")),r=this.list.id),o=this.t(i);e.attr(n,{"aria-controls":r,"aria-label":e.attr(n,"aria-label")||o})}},slides(t){t.forEach((s,i)=>e.attr(s,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const s=this.navChildren.length;if(this.nav&&t!==s){e.empty(this.nav);for(let i=0;i<t;i++)e.append(this.nav,"<li ".concat(this.attrItem,'="').concat(i,'"><a href></a></li>'))}}},connected(){e.attr(this.$el,{role:this.role,"aria-roledescription":"carousel"})},update:[{write(){this.navItems.concat(this.nav).forEach(t=>t&&(t.hidden=!this.maxIndex)),this.updateNav()},events:["resize"]}],events:[{name:"click keydown",delegate(){return this.selNavItem},handler(t){e.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===u.SPACE)&&(t.preventDefault(),this.show(e.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:s,keyCode:i}=t,n=e.data(s,this.attrItem);if(!e.isNumeric(n))return;let o=i===u.HOME?0:i===u.END?"last":i===u.LEFT?"previous":i===u.RIGHT?"next":-1;~o&&(t.preventDefault(),this.show(o))}}],methods:{updateNav(){const t=this.getValidIndex();let s;for(const i of this.navItems){const n=e.data(i,this.attrItem),o=e.$("a,button",i)||i;if(e.isNumeric(n)){const a=e.toNumber(n)===t;e.toggleClass(i,this.clsActive,a),e.attr(o,{"aria-selected":a,tabindex:a?null:-1}),a&&(s||(s=e.matches(e.parent(i),":focus-within")&&o))}else e.toggleClass(i,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex));s&&e.isInView(s)&&s.focus()}}}},R={mixins:[M,P,L,H],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number},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({velocity:t},s){return B(s.offsetWidth/t)},list({selList:t},s){return e.$(t,s)},maxIndex(){return this.length-1},slides(){return e.children(this.list)},length(){return this.slides.length}},watch:{slides(t,s){s&&this.$emit()}},observe:T(),methods:{show(t,s=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,o=s?0:n.length,r=()=>{n.splice(o,1),n.length&&this.show(n.shift(),!0)};if(n[s?"unshift":"push"](t),!s&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const a=this.getIndex(this.index),h=e.hasClass(this.slides,this.clsActive)&&this.slides[a],f=this.getIndex(t,this.index),l=this.slides[f];if(h===l){r();return}if(this.dir=W(t,a),this.prevIndex=a,this.index=f,h&&!e.trigger(h,"beforeitemhide",[this])||!e.trigger(l,"beforeitemshow",[this,h])){this.index=this.prevIndex,r();return}const d=this._show(h,l,s).then(()=>{h&&e.trigger(h,"itemhidden",[this]),e.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&e.trigger(h,"itemhide",[this]),e.trigger(l,"itemshow",[this]),d},getIndex(t=this.index,s=this.index){return e.clamp(e.getIndex(t,this.slides,s,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,s=this.prevIndex){return this.getIndex(t,s)},_show(t,s,i){if(this._transitioner=this._getTransitioner(t,s,this.dir,{easing:i?s.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:n}=this.stack;return this._transitioner[n>1?"forward":"show"](n>1?Math.min(this.duration,75+75/(n-1)):this.duration,this.percent)},_translate(t,s=this.prevIndex,i=this.index){const n=this._getTransitioner(s===i?!1:s,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,s=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(e.isNumber(t)?this.slides[t]:t,e.isNumber(s)?this.slides[s]:s,i*(e.isRtl?-1:1),n)}}};function W(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function B(t){return .5*t+300}var j={mixins:[R],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:z,Transitioner:C},computed:{animation({animation:t,Animations:s}){return{...s[t]||s.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){e.addClass(t,this.clsActive)},itemshown({target:t}){e.addClass(t,this.clsActivated)},itemhidden({target:t}){e.removeClass(t,this.clsActive,this.clsActivated)}}},F={observe:D({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},V={...z,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:A(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-e.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:A(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:c(30),zIndex:-1},{transform:c(),zIndex:0}]:[{transform:c(-100),zIndex:0},{transform:c(),zIndex:-1}]},percent(t,s,i){return i<0?1-g(s):g(t)},translate(t,s){return s<0?[{transform:c(30*t),zIndex:-1},{transform:c(-100*(1-t)),zIndex:0}]:[{transform:c(-t*100),zIndex:0},{transform:c(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:c(100),zIndex:0},{transform:c(),zIndex:-1}]:[{transform:c(-30),zIndex:-1},{transform:c(),zIndex:0}]},percent(t,s,i){return i>0?1-g(s):g(t)},translate(t,s){return s<0?[{transform:c(t*100),zIndex:0},{transform:c(-30*(1-t)),zIndex:-1}]:[{transform:c(-30*t),zIndex:-1},{transform:c(100*(1-t)),zIndex:0}]}}},S={mixins:[p,j,$,F],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:V},update:{read(){if(!this.list)return!1;let[t,s]=this.ratio.split(":").map(Number);return s=s*this.list.offsetWidth/t||0,this.minHeight&&(s=Math.max(this.minHeight,s)),this.maxHeight&&(s=Math.min(this.maxHeight,s)),{height:s-e.boxModelAdjust(this.list,"height","content-box")}},write({height:t}){t>0&&e.css(this.list,"minHeight",t)},events:["resize"]},methods:{getAdjacentSlides(){return[1,-1].map(t=>this.slides[this.getIndex(this.index+t)])}}};return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshow",S),S});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
init(e) {
|
|
452
452
|
const { target, button, defaultPrevented } = e;
|
|
453
453
|
const [placeholder] = this.items.filter((el) => uikitUtil.within(target, el));
|
|
454
|
-
if (!placeholder || defaultPrevented || button > 0 || uikitUtil.isInput(target) || uikitUtil.within(target,
|
|
454
|
+
if (!placeholder || defaultPrevented || button > 0 || uikitUtil.isInput(target) || uikitUtil.within(target, ".".concat(this.clsNoDrag)) || this.handle && !uikitUtil.within(target, this.handle)) {
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
457
|
e.preventDefault();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 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 y(e.observeResize,n,"resize")}function N(n){return y(e.observeMutation,n)}function y(n,s,o){return{observe:n,handler(){this.$emit(o)},...s}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),g({target:({$el:n})=>[n,...e.children(n)]});function C(n){return T(n,"top","bottom")}function z(n){const s=[];for(const o of n){const t=T(o,"left","right");for(let a=0;a<t.length;a++)s[a]=s[a]?s[a].concat(t[a]):t[a]}return e.isRtl?s.reverse():s}function T(n,s,o){const t=[[]];for(const a of n){if(!e.isVisible(a))continue;let c=u(a);for(let r=t.length-1;r>=0;r--){const h=t[r];if(!h[0]){h.push(a);break}let d;if(h[0].offsetParent===a.offsetParent?d=u(h[0]):(c=u(a,!0),d=u(h[0],!0)),c[s]>=d[o]-1&&c[s]!==d[s]){t.push([a]);break}if(c[o]-1>d[s]||c[s]===d[s]){h.push(a);break}if(r===0){t.unshift([a]);break}}}return t}function u(n,s=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:a,offsetWidth:c}=n;return s&&([o,t]=e.offsetPosition(n)),{top:o,left:t,bottom:o+a,right:t+c}}const v="uk-transition-leave",w="uk-transition-enter";function P(n,s,o,t=0){const a=b(s,!0),c={opacity:1},r={opacity:0},h=p=>()=>a===b(s)?p():Promise.reject(),d=h(async()=>{e.addClass(s,v),await Promise.all(x(s).map((p,l)=>new Promise(f=>setTimeout(()=>e.Transition.start(p,r,o/2,"ease").then(f),l*t)))),e.removeClass(s,v)}),i=h(async()=>{const p=e.height(s);e.addClass(s,w),n(),e.css(e.children(s),{opacity:0}),await A();const l=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,p);const m=x(s);e.css(l,r);const R=m.map(async(X,Y)=>{await H(Y*t),await e.Transition.start(X,c,o/2,"ease")});p!==f&&R.push(e.Transition.start(s,{height:f},o/2+m.length*t,"ease")),await Promise.all(R).then(()=>{e.removeClass(s,w),a===b(s)&&(e.css(s,{height:"",alignContent:""}),e.css(l,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,v)?S(s).then(i):e.hasClass(s,w)?S(s).then(d).then(i):d().then(i)}function b(n,s){return s&&(n.dataset.transition=1+b(n)),e.toNumber(n.dataset.transition)||0}function S(n){return Promise.all(e.children(n).filter(e.Transition.inProgress).map(s=>new Promise(o=>e.once(s,"transitionend transitioncanceled",o))))}function x(n){return C(e.children(n)).reduce((s,o)=>s.concat(e.sortBy(o.filter(t=>e.isInView(t)),"offsetLeft")),[])}function A(){return new Promise(n=>requestAnimationFrame(n))}function H(n){return new Promise(s=>setTimeout(s,n))}async function L(n,s,o){await D();let t=e.children(s);const a=t.map(f=>I(f,!0)),c={...e.css(s,["height","padding"]),display:"block"};await Promise.all(t.concat(s).map(e.Transition.cancel)),n(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.fastdom.flush();const r=e.attr(s,"style"),h=e.css(s,["height","padding"]),[d,i]=M(s,t,a),p=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,m)=>i[m]&&e.css(f,i[m])),e.css(s,c),e.trigger(s,"scroll"),e.fastdom.flush(),await D();const l=t.map((f,m)=>e.parent(f)===s&&e.Transition.start(f,d[m],o,"ease")).concat(e.Transition.start(s,h,o,"ease"));try{await Promise.all(l),t.forEach((f,m)=>{e.attr(f,p[m]),e.parent(f)===s&&e.css(f,"display",d[m].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),V(s,c)}}function I(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,...$(n)}:!1}function M(n,s,o){const t=s.map((c,r)=>e.parent(c)&&r in o?o[r]?e.isVisible(c)?$(c):{opacity:0}:{opacity:e.isVisible(c)?1:0}:!1),a=t.map((c,r)=>{const h=e.parent(s[r])===n&&(o[r]||I(s[r]));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[t,a]}function V(n,s){for(const o in s)e.css(n,o,"")}function $(n){const{height:s,width:o}=e.offset(n);return{height:s,width:o,transform:"",...e.position(n),...e.css(n,["marginTop","marginLeft"])}}function D(){return new Promise(n=>requestAnimationFrame(n))}var j={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,s=this.$el){const o=this.animation;return(o==="fade"?P:o==="delayed-fade"?(...a)=>P(...a,40):o?L:()=>(n(),Promise.resolve()))(n,s,this.duration).catch(e.noop)}}},q={connected(){e.addClass(this.$el,this.$options.id)}},E={mixins:[q,j],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(){return e.isEmpty(this.items)},handles({handle:n},s){return n?e.$$(n,s):this.items}},watch:{isEmpty(n){e.toggleClass(this.target,this.clsEmpty,n)},handles(n,s){e.css(s,{touchAction:"",userSelect:""}),e.css(n,{touchAction:e.hasTouch?"none":"",userSelect:"none"})}},update:{write(n){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:o},origin:{offsetTop:t,offsetLeft:a},placeholder:c}=this;e.css(this.drag,{top:o-t,left:s-a});const r=this.getSortable(document.elementFromPoint(s,o));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=J(h,{x:s,y:o});if(h.length&&(!d||d===c))return;const i=this.getSortable(c),p=K(r.target,d,c,s,o,r===i&&n.moved!==d);p!==!1&&(p&&c===p||(r!==i?(i.remove(c),n.moved=d):delete n.moved,r.insert(c,p),this.touched.add(r)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:t}=n,[a]=this.items.filter(c=>e.within(s,c));!a||t||o>0||e.isInput(s)||e.within(s,".".concat(this.clsNoDrag))||this.handle&&!e.within(s,this.handle)||(n.preventDefault(),this.touched=new Set([this]),this.placeholder=a,this.origin={target:s,index:e.index(a),...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=G(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]),W(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;O();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 t of this.touched)e.removeClass(t.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 F;function W(n){let s=Date.now();F=setInterval(()=>{let{x:o,y:t}=n;t+=document.scrollingElement.scrollTop;const a=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y)).reverse().some(c=>{let{scrollTop:r,scrollHeight:h}=c;const{top:d,bottom:i,height:p}=e.offsetViewport(c);if(d<t&&d+35>t)r-=a;else if(i>t&&i-35<t)r+=a;else return;if(r>0&&r<h-p)return c.scrollTop=r,!0})},15)}function O(){clearInterval(F)}function G(n,s){let o;if(e.isTag(s,"li","tr")){o=e.$("<div>"),e.append(o,s.cloneNode(!0).children);for(const t of s.getAttributeNames())e.attr(o,t,s.getAttribute(t))}else o=s.cloneNode(!0);return e.append(n,o),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 J(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function K(n,s,o,t,a,c){if(!e.children(n).length)return;const r=s.getBoundingClientRect();if(!c)return Q(n,o)||a<r.top+r.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=B([r.top,r.bottom],[h.top,h.bottom]),[i,p,l,f]=d?[t,"width","left","right"]:[a,"height","top","bottom"],m=h[p]<r[p]?r[p]-h[p]:0;return h[l]<r[l]?m&&i<r[l]+m?!1:s.nextElementSibling:m&&i>r[f]-m?!1:s}function Q(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const t=e.children(n),a=t.some((c,r)=>{const h=c.getBoundingClientRect();return t.slice(r+1).some(d=>{const i=d.getBoundingClientRect();return!B([h.left,h.right],[i.left,i.right])})});return o&&e.remove(s),a}function B(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",E),E});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitTooltip = factory(global.UIkit.util));
|
|
7
7
|
})(this, (function (util) { 'use strict';
|
|
8
8
|
|
|
9
|
+
function generateId(instance, el = instance.$el, postfix = "") {
|
|
10
|
+
if (el.id) {
|
|
11
|
+
return el.id;
|
|
12
|
+
}
|
|
13
|
+
let id = "".concat(instance.$options.id, "-").concat(instance._uid).concat(postfix);
|
|
14
|
+
if (util.$("#".concat(id))) {
|
|
15
|
+
id = generateId(instance, el, "".concat(postfix, "-2"));
|
|
16
|
+
}
|
|
17
|
+
return id;
|
|
18
|
+
}
|
|
19
|
+
|
|
9
20
|
var Container = {
|
|
10
21
|
props: {
|
|
11
22
|
container: Boolean
|
|
@@ -20,6 +31,82 @@
|
|
|
20
31
|
}
|
|
21
32
|
};
|
|
22
33
|
|
|
34
|
+
var Position = {
|
|
35
|
+
props: {
|
|
36
|
+
pos: String,
|
|
37
|
+
offset: null,
|
|
38
|
+
flip: Boolean,
|
|
39
|
+
shift: Boolean,
|
|
40
|
+
inset: Boolean
|
|
41
|
+
},
|
|
42
|
+
data: {
|
|
43
|
+
pos: "bottom-".concat(util.isRtl ? "right" : "left"),
|
|
44
|
+
offset: false,
|
|
45
|
+
flip: true,
|
|
46
|
+
shift: true,
|
|
47
|
+
inset: false
|
|
48
|
+
},
|
|
49
|
+
connected() {
|
|
50
|
+
this.pos = this.$props.pos.split("-").concat("center").slice(0, 2);
|
|
51
|
+
[this.dir, this.align] = this.pos;
|
|
52
|
+
this.axis = util.includes(["top", "bottom"], this.dir) ? "y" : "x";
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
positionAt(element, target, boundary) {
|
|
56
|
+
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
57
|
+
const placement = [this.flip && "flip", this.shift && "shift"];
|
|
58
|
+
const attach = {
|
|
59
|
+
element: [this.inset ? this.dir : util.flipPosition(this.dir), this.align],
|
|
60
|
+
target: [this.dir, this.align]
|
|
61
|
+
};
|
|
62
|
+
if (this.axis === "y") {
|
|
63
|
+
for (const prop in attach) {
|
|
64
|
+
attach[prop].reverse();
|
|
65
|
+
}
|
|
66
|
+
offset.reverse();
|
|
67
|
+
placement.reverse();
|
|
68
|
+
}
|
|
69
|
+
const restoreScrollPosition = storeScrollPosition(element);
|
|
70
|
+
const elDim = util.dimensions(element);
|
|
71
|
+
util.css(element, { top: -elDim.height, left: -elDim.width });
|
|
72
|
+
util.positionAt(element, target, {
|
|
73
|
+
attach,
|
|
74
|
+
offset,
|
|
75
|
+
boundary,
|
|
76
|
+
placement,
|
|
77
|
+
viewportOffset: this.getViewportOffset(element)
|
|
78
|
+
});
|
|
79
|
+
restoreScrollPosition();
|
|
80
|
+
},
|
|
81
|
+
getPositionOffset(element) {
|
|
82
|
+
return util.toPx(
|
|
83
|
+
this.offset === false ? util.css(element, "--uk-position-offset") : this.offset,
|
|
84
|
+
this.axis === "x" ? "width" : "height",
|
|
85
|
+
element
|
|
86
|
+
) * (util.includes(["left", "top"], this.dir) ? -1 : 1) * (this.inset ? -1 : 1);
|
|
87
|
+
},
|
|
88
|
+
getShiftOffset(element) {
|
|
89
|
+
return this.align === "center" ? 0 : util.toPx(
|
|
90
|
+
util.css(element, "--uk-position-shift-offset"),
|
|
91
|
+
this.axis === "y" ? "width" : "height",
|
|
92
|
+
element
|
|
93
|
+
) * (util.includes(["left", "top"], this.align) ? 1 : -1);
|
|
94
|
+
},
|
|
95
|
+
getViewportOffset(element) {
|
|
96
|
+
return util.toPx(util.css(element, "--uk-position-viewport-offset"));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
function storeScrollPosition(element) {
|
|
101
|
+
const scrollElement = util.scrollParent(element);
|
|
102
|
+
const { scrollTop } = scrollElement;
|
|
103
|
+
return () => {
|
|
104
|
+
if (scrollTop !== scrollElement.scrollTop) {
|
|
105
|
+
scrollElement.scrollTop = scrollTop;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
23
110
|
var Togglable = {
|
|
24
111
|
props: {
|
|
25
112
|
cls: Boolean,
|
|
@@ -53,7 +140,7 @@
|
|
|
53
140
|
await Promise.all(
|
|
54
141
|
util.toNodes(targets).map((el) => {
|
|
55
142
|
const show = util.isBoolean(toggle) ? toggle : !this.isToggled(el);
|
|
56
|
-
if (!util.trigger(el,
|
|
143
|
+
if (!util.trigger(el, "before".concat(show ? "show" : "hide"), [this])) {
|
|
57
144
|
return Promise.reject();
|
|
58
145
|
}
|
|
59
146
|
const promise = (util.isFunction(animate) ? animate : animate === false || !this.hasAnimation ? toggleInstant : this.hasTransition ? toggleTransition : toggleAnimation)(el, show, this);
|
|
@@ -115,8 +202,8 @@
|
|
|
115
202
|
const end = dir[1] === startProp;
|
|
116
203
|
const props = ["width", "height"];
|
|
117
204
|
const dimProp = props[dirs.indexOf(dir)];
|
|
118
|
-
const marginProp =
|
|
119
|
-
const marginStartProp =
|
|
205
|
+
const marginProp = "margin-".concat(dir[0]);
|
|
206
|
+
const marginStartProp = "margin-".concat(startProp);
|
|
120
207
|
let currentDim = util.dimensions(el)[dimProp];
|
|
121
208
|
const inProgress = util.Transition.inProgress(el);
|
|
122
209
|
await util.Transition.cancel(el);
|
|
@@ -204,82 +291,6 @@
|
|
|
204
291
|
);
|
|
205
292
|
}
|
|
206
293
|
|
|
207
|
-
var Position = {
|
|
208
|
-
props: {
|
|
209
|
-
pos: String,
|
|
210
|
-
offset: null,
|
|
211
|
-
flip: Boolean,
|
|
212
|
-
shift: Boolean,
|
|
213
|
-
inset: Boolean
|
|
214
|
-
},
|
|
215
|
-
data: {
|
|
216
|
-
pos: `bottom-${util.isRtl ? "right" : "left"}`,
|
|
217
|
-
offset: false,
|
|
218
|
-
flip: true,
|
|
219
|
-
shift: true,
|
|
220
|
-
inset: false
|
|
221
|
-
},
|
|
222
|
-
connected() {
|
|
223
|
-
this.pos = this.$props.pos.split("-").concat("center").slice(0, 2);
|
|
224
|
-
[this.dir, this.align] = this.pos;
|
|
225
|
-
this.axis = util.includes(["top", "bottom"], this.dir) ? "y" : "x";
|
|
226
|
-
},
|
|
227
|
-
methods: {
|
|
228
|
-
positionAt(element, target, boundary) {
|
|
229
|
-
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
230
|
-
const placement = [this.flip && "flip", this.shift && "shift"];
|
|
231
|
-
const attach = {
|
|
232
|
-
element: [this.inset ? this.dir : util.flipPosition(this.dir), this.align],
|
|
233
|
-
target: [this.dir, this.align]
|
|
234
|
-
};
|
|
235
|
-
if (this.axis === "y") {
|
|
236
|
-
for (const prop in attach) {
|
|
237
|
-
attach[prop].reverse();
|
|
238
|
-
}
|
|
239
|
-
offset.reverse();
|
|
240
|
-
placement.reverse();
|
|
241
|
-
}
|
|
242
|
-
const restoreScrollPosition = storeScrollPosition(element);
|
|
243
|
-
const elDim = util.dimensions(element);
|
|
244
|
-
util.css(element, { top: -elDim.height, left: -elDim.width });
|
|
245
|
-
util.positionAt(element, target, {
|
|
246
|
-
attach,
|
|
247
|
-
offset,
|
|
248
|
-
boundary,
|
|
249
|
-
placement,
|
|
250
|
-
viewportOffset: this.getViewportOffset(element)
|
|
251
|
-
});
|
|
252
|
-
restoreScrollPosition();
|
|
253
|
-
},
|
|
254
|
-
getPositionOffset(element) {
|
|
255
|
-
return util.toPx(
|
|
256
|
-
this.offset === false ? util.css(element, "--uk-position-offset") : this.offset,
|
|
257
|
-
this.axis === "x" ? "width" : "height",
|
|
258
|
-
element
|
|
259
|
-
) * (util.includes(["left", "top"], this.dir) ? -1 : 1) * (this.inset ? -1 : 1);
|
|
260
|
-
},
|
|
261
|
-
getShiftOffset(element) {
|
|
262
|
-
return this.align === "center" ? 0 : util.toPx(
|
|
263
|
-
util.css(element, "--uk-position-shift-offset"),
|
|
264
|
-
this.axis === "y" ? "width" : "height",
|
|
265
|
-
element
|
|
266
|
-
) * (util.includes(["left", "top"], this.align) ? 1 : -1);
|
|
267
|
-
},
|
|
268
|
-
getViewportOffset(element) {
|
|
269
|
-
return util.toPx(util.css(element, "--uk-position-viewport-offset"));
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
function storeScrollPosition(element) {
|
|
274
|
-
const scrollElement = util.scrollParent(element);
|
|
275
|
-
const { scrollTop } = scrollElement;
|
|
276
|
-
return () => {
|
|
277
|
-
if (scrollTop !== scrollElement.scrollTop) {
|
|
278
|
-
scrollElement.scrollTop = scrollTop;
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
|
|
283
294
|
const keyMap = {
|
|
284
295
|
TAB: 9,
|
|
285
296
|
ESC: 27,
|
|
@@ -292,17 +303,6 @@
|
|
|
292
303
|
DOWN: 40
|
|
293
304
|
};
|
|
294
305
|
|
|
295
|
-
function generateId(instance, el = instance.$el, postfix = "") {
|
|
296
|
-
if (el.id) {
|
|
297
|
-
return el.id;
|
|
298
|
-
}
|
|
299
|
-
let id = `${instance.$options.id}-${instance._uid}${postfix}`;
|
|
300
|
-
if (util.$(`#${id}`)) {
|
|
301
|
-
id = generateId(instance, el, `${postfix}-2`);
|
|
302
|
-
}
|
|
303
|
-
return id;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
306
|
var Component = {
|
|
307
307
|
mixins: [Container, Togglable, Position],
|
|
308
308
|
args: "title",
|
|
@@ -355,7 +355,7 @@
|
|
|
355
355
|
async _show() {
|
|
356
356
|
this.tooltip = util.append(
|
|
357
357
|
this.container,
|
|
358
|
-
|
|
358
|
+
'<div id="'.concat(this.id, '" class="uk-').concat(this.$options.name, '" role="tooltip">\n <div class="uk-').concat(this.$options.name, '-inner">').concat(this.title, "</div>\n </div>")
|
|
359
359
|
);
|
|
360
360
|
util.on(this.tooltip, "toggled", (e, toggled) => {
|
|
361
361
|
if (!toggled) {
|
|
@@ -364,11 +364,11 @@
|
|
|
364
364
|
const update = () => this.positionAt(this.tooltip, this.$el);
|
|
365
365
|
update();
|
|
366
366
|
const [dir, align] = getAlignment(this.tooltip, this.$el, this.pos);
|
|
367
|
-
this.origin = this.axis === "y" ?
|
|
367
|
+
this.origin = this.axis === "y" ? "".concat(util.flipPosition(dir), "-").concat(align) : "".concat(align, "-").concat(util.flipPosition(dir));
|
|
368
368
|
const handlers = [
|
|
369
369
|
util.once(
|
|
370
370
|
document,
|
|
371
|
-
|
|
371
|
+
"keydown ".concat(util.pointerDown),
|
|
372
372
|
this.hide,
|
|
373
373
|
false,
|
|
374
374
|
(e2) => e2.type === util.pointerDown && !util.within(e2.target, this.$el) || e2.type === "keydown" && e2.keyCode === keyMap.ESC
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
events: {
|
|
390
390
|
focus: "show",
|
|
391
391
|
blur: "hide",
|
|
392
|
-
[
|
|
392
|
+
["".concat(util.pointerEnter, " ").concat(util.pointerLeave)](e) {
|
|
393
393
|
if (!util.isTouch(e)) {
|
|
394
394
|
this[e.type === util.pointerEnter ? "show" : "hide"]();
|
|
395
395
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(t,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],d):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitTooltip=d(t.UIkit.util))})(this,function(t){"use strict";function d(s,i=s.$el,e=""){if(i.id)return i.id;let o="".concat(s.$options.id,"-").concat(s._uid).concat(e);return t.$("#".concat(o))&&(o=d(s,i,"".concat(e,"-2"))),o}var A={props:{container:Boolean},data:{container:!0},computed:{container({container:s}){return s===!0&&this.$container||s&&t.$(s)}}},S={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:"bottom-".concat(t.isRtl?"right":"left"),offset:!1,flip:!0,shift:!0,inset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),[this.dir,this.align]=this.pos,this.axis=t.includes(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(s,i,e){let o=[this.getPositionOffset(s),this.getShiftOffset(s)];const n=[this.flip&&"flip",this.shift&&"shift"],a={element:[this.inset?this.dir:t.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const h in a)a[h].reverse();o.reverse(),n.reverse()}const r=O(s),c=t.dimensions(s);t.css(s,{top:-c.height,left:-c.width}),t.positionAt(s,i,{attach:a,offset:o,boundary:e,placement:n,viewportOffset:this.getViewportOffset(s)}),r()},getPositionOffset(s){return t.toPx(this.offset===!1?t.css(s,"--uk-position-offset"):this.offset,this.axis==="x"?"width":"height",s)*(t.includes(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(s){return this.align==="center"?0:t.toPx(t.css(s,"--uk-position-shift-offset"),this.axis==="y"?"width":"height",s)*(t.includes(["left","top"],this.align)?1:-1)},getViewportOffset(s){return t.toPx(t.css(s,"--uk-position-viewport-offset"))}}};function O(s){const i=t.scrollParent(s),{scrollTop:e}=i;return()=>{e!==i.scrollTop&&(i.scrollTop=e)}}var B={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"},computed:{hasAnimation({animation:s}){return!!s[0]},hasTransition({animation:s}){return["slide","reveal"].some(i=>t.startsWith(s[0],i))}},methods:{async toggleElement(s,i,e){try{return await Promise.all(t.toNodes(s).map(o=>{const n=t.isBoolean(i)?i:!this.isToggled(o);if(!t.trigger(o,"before".concat(n?"show":"hide"),[this]))return Promise.reject();const a=(t.isFunction(e)?e:e===!1||!this.hasAnimation?I:this.hasTransition?D:N)(o,n,this),r=n?this.clsEnter:this.clsLeave;t.addClass(o,r),t.trigger(o,n?"show":"hide",[this]);const c=()=>{t.removeClass(o,r),t.trigger(o,n?"shown":"hidden",[this])};return a?a.then(c,()=>(t.removeClass(o,r),Promise.reject())):c()})),!0}catch{return!1}},isToggled(s=this.$el){return s=t.toNode(s),t.hasClass(s,this.clsEnter)?!0:t.hasClass(s,this.clsLeave)?!1:this.cls?t.hasClass(s,this.cls.split(" ")[0]):t.isVisible(s)},_toggle(s,i){if(!s)return;i=!!i;let e;this.cls?(e=t.includes(this.cls," ")||i!==t.hasClass(s,this.cls),e&&t.toggleClass(s,this.cls,t.includes(this.cls," ")?void 0:i)):(e=i===s.hidden,e&&(s.hidden=!i)),t.$$("[autofocus]",s).some(o=>t.isVisible(o)?o.focus()||!0:o.blur()),e&&t.trigger(s,"toggled",[i,this])}}};function I(s,i,{_toggle:e}){return t.Animation.cancel(s),t.Transition.cancel(s),e(s,i)}async function D(s,i,{animation:e,duration:o,velocity:n,transition:a,_toggle:r}){var c;const[h="reveal",b="top"]=((c=e[0])==null?void 0:c.split("-"))||[],T=[["left","right"],["top","bottom"]],y=T[t.includes(T[0],b)?0:1],u=y[1]===b,m=["width","height"][T.indexOf(y)],p="margin-".concat(y[0]),w="margin-".concat(b);let g=t.dimensions(s)[m];const U=t.Transition.inProgress(s);await t.Transition.cancel(s),i&&r(s,!0);const j=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",p,w].map(C=>[C,s.style[C]])),l=t.dimensions(s),P=t.toFloat(t.css(s,p)),$=t.toFloat(t.css(s,w)),f=l[m]+$;!U&&!i&&(g+=$);const[v]=t.wrapInner(s,"<div>");t.css(v,{boxSizing:"border-box",height:l.height,width:l.width,...t.css(s,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",w])}),t.css(s,{padding:0,border:0,minWidth:0,minHeight:0,[w]:0,width:l.width,height:l.height,overflow:"hidden",[m]:g});const E=g/f;o=(n*f+o)*(i?1-E:E);const x={[m]:i?f:0};u&&(t.css(s,p,f-g+P),x[p]=i?P:f+P),!u^h==="reveal"&&(t.css(v,p,-f+g),t.Transition.start(v,{[p]:i?0:-f},o,a));try{await t.Transition.start(s,x,o,a)}finally{t.css(s,j),t.unwrap(v.firstChild),i||r(s,!1)}}function N(s,i,e){t.Animation.cancel(s);const{animation:o,duration:n,_toggle:a}=e;return i?(a(s,!0),t.Animation.in(s,o[0],n,e.origin)):t.Animation.out(s,o[1]||o[0],n,e.origin).then(()=>a(s,!1))}const _={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var k={mixins:[A,B,S],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.id=d(this,{}),this._hasTitle=t.hasAttr(this.$el,"title"),t.attr(this.$el,{title:"","aria-describedby":this.id}),F(this.$el)},disconnected(){this.hide(),t.attr(this.$el,"title")||t.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(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)},async _show(){this.tooltip=t.append(this.container,'<div id="'.concat(this.id,'" class="uk-').concat(this.$options.name,'" role="tooltip">\n <div class="uk-').concat(this.$options.name,'-inner">').concat(this.title,"</div>\n </div>")),t.on(this.tooltip,"toggled",(s,i)=>{if(!i)return;const e=()=>this.positionAt(this.tooltip,this.$el);e();const[o,n]=L(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?"".concat(t.flipPosition(o),"-").concat(n):"".concat(n,"-").concat(t.flipPosition(o));const a=[t.once(document,"keydown ".concat(t.pointerDown),this.hide,!1,r=>r.type===t.pointerDown&&!t.within(r.target,this.$el)||r.type==="keydown"&&r.keyCode===_.ESC),t.on([document,...t.overflowParents(this.$el)],"scroll",e,{passive:!0})];t.once(this.tooltip,"hide",()=>a.forEach(r=>r()),{self:!0})}),await this.toggleElement(this.tooltip,!0)||this.hide()}},events:{focus:"show",blur:"hide",["".concat(t.pointerEnter," ").concat(t.pointerLeave)](s){t.isTouch(s)||this[s.type===t.pointerEnter?"show":"hide"]()},[t.pointerDown](s){t.isTouch(s)&&this.show()}}};function F(s){t.isFocusable(s)||t.attr(s,"tabindex","0")}function L(s,i,[e,o]){const n=t.offset(s),a=t.offset(i),r=[["left","right"],["top","bottom"]];for(const h of r){if(n[h[0]]>=a[h[1]]){e=h[1];break}if(n[h[1]]<=a[h[0]]){e=h[0];break}}const c=t.includes(r[0],e)?r[1]:r[0];return n[c[0]]===a[c[0]]?o=c[0]:n[c[1]]===a[c[1]]?o=c[1]:o="center",[e,o]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",k),k});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
function match(pattern, path) {
|
|
165
165
|
return path.match(
|
|
166
166
|
new RegExp(
|
|
167
|
-
|
|
167
|
+
"^".concat(pattern.replace(/\//g, "\\/").replace(/\*\*/g, "(\\/[^\\/]+)*").replace(/\*/g, "[^\\/]+").replace(/((?!\\))\?/g, "$1."), "$"),
|
|
168
168
|
"i"
|
|
169
169
|
)
|
|
170
170
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.25-dev.12f581d90 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(o,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],i):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitUpload=i(o.UIkit.util))})(this,function(o){"use strict";var i={props:{i18n:Object},data:{i18n:null},methods:{t(e,...r){var a,s,t;let n=0;return((t=((a=this.i18n)==null?void 0:a[e])||((s=this.$options.i18n)==null?void 0:s[e]))==null?void 0:t.replace(/%s/g,()=>r[n++]||""))||""}}},d={mixins:[i],i18n:{invalidMime:"Invalid File Type: %s",invalidName:"Invalid File Name: %s",invalidSize:"Invalid File Size: %s Kilobytes Max"},props:{allow:String,clsDragover:String,concurrent:Number,maxSize:Number,method:String,mime: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,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){l(e);const r=e.dataTransfer;r!=null&&r.files&&(o.removeClass(this.$el,this.clsDragover),this.upload(r.files))},dragenter(e){l(e)},dragover(e){l(e),o.addClass(this.$el,this.clsDragover)},dragleave(e){l(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 s of e){if(this.maxSize&&this.maxSize*1e3<s.size){this.fail(this.t("invalidSize",this.maxSize));return}if(this.allow&&!h(this.allow,s.name)){this.fail(this.t("invalidName",this.allow));return}if(this.mime&&!h(this.mime,s.type)){this.fail(this.t("invalidMime",this.mime));return}}this.multiple||(e=e.slice(0,1)),this.beforeAll(this,e);const r=f(e,this.concurrent),a=async s=>{const t=new FormData;s.forEach(n=>t.append(this.name,n));for(const n in this.params)t.append(n,this.params[n]);try{const n=await u(this.url,{data:t,method:this.method,responseType:this.type,beforeSend:p=>{const{xhr:c}=p;o.on(c.upload,"progress",this.progress);for(const m of["loadStart","load","loadEnd","abort"])o.on(c,m.toLowerCase(),this[m]);return this.beforeSend(p)}});this.complete(n),r.length?await a(r.shift()):this.completeAll(n)}catch(n){this.error(n)}};await a(r.shift())}}};function h(e,r){return r.match(new RegExp("^".concat(e.replace(/\//g,"\\/").replace(/\*\*/g,"(\\/[^\\/]+)*").replace(/\*/g,"[^\\/]+").replace(/((?!\\))\?/g,"$1."),"$"),"i"))}function f(e,r){const a=[];for(let s=0;s<e.length;s+=r)a.push(e.slice(s,s+r));return a}function l(e){e.preventDefault(),e.stopPropagation()}function u(e,r){const a={data:null,method:"GET",headers:{},xhr:new XMLHttpRequest,beforeSend:o.noop,responseType:"",...r};return Promise.resolve().then(()=>a.beforeSend(a)).then(()=>g(e,a))}function g(e,r){return new Promise((a,s)=>{const{xhr:t}=r;for(const n in r)if(n in t)try{t[n]=r[n]}catch{}t.open(r.method.toUpperCase(),e);for(const n in r.headers)t.setRequestHeader(n,r.headers[n]);o.on(t,"load",()=>{t.status===0||t.status>=200&&t.status<300||t.status===304?a(t):s(o.assign(Error(t.statusText),{xhr:t,status:t.status}))}),o.on(t,"error",()=>s(o.assign(Error("Network Error"),{xhr:t}))),o.on(t,"timeout",()=>s(o.assign(Error("Network Timeout"),{xhr:t}))),t.send(r.data)})}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",d),d});
|