uikit 3.15.7-dev.05c3b3f6c → 3.15.7-dev.3ec9925a1
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/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 +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +2 -2
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +2 -2
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +2 -2
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +2 -2
- 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 +3 -4
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +82 -82
- package/dist/js/uikit-core.min.js +2 -2
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +84 -85
- package/dist/js/uikit.min.js +2 -2
- package/package.json +1 -1
- package/src/js/api/boot.js +6 -8
- package/src/js/api/component.js +18 -21
- package/src/js/api/instance.js +6 -11
- package/src/js/api/state.js +11 -11
- package/src/js/components/tooltip.js +2 -3
- package/src/js/core/accordion.js +41 -33
- package/src/js/core/icon.js +1 -1
- package/src/js/mixin/class.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.7-dev.
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(r,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],g):(r=typeof globalThis<"u"?globalThis:r||self,r.UIkitSlideshow_parallax=g(r.UIkit.util))})(this,function(r){"use strict";var g={props:{media:Boolean},data:{media:!1},connected(){const e=E(this.media,this.$el);if(this.matchMedia=!0,e){this.mediaObj=window.matchMedia(e);const t=()=>{this.matchMedia=this.mediaObj.matches,r.trigger(this.$el,r.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=r.on(this.mediaObj,"change",()=>{t(),this.$emit("resize")}),t()}},disconnected(){var e;(e=this.offMediaObj)==null||e.call(this)}};function E(e,t){if(r.isString(e)){if(r.startsWith(e,"@"))e=r.toFloat(r.css(t,"--uk-breakpoint-"+e.substr(1)));else if(isNaN(e))return e}return e&&r.isNumeric(e)?"(min-width: "+e+"px)":""}r.memoize(async e=>e?r.startsWith(e,"data:")?decodeURIComponent(e.split(",")[1]):(await fetch(e)).text():Promise.reject());function R(e){return Math.ceil(Math.max(0,...r.$$("[stroke]",e).map(t=>{try{return t.getTotalLength()}catch{return 0}})))}const y={x:F,y:F,rotate:F,scale:F,color:$,backgroundColor:$,borderColor:$,blur:l,hue:l,fopacity:l,grayscale:l,invert:l,saturate:l,sepia:l,opacity:H,stroke:L,bgx:j,bgy:j},{keys:P}=Object;var _={mixins:[g],props:W(P(y),"list"),data:W(P(y),void 0),computed:{props(e,t){const n={};for(const s in e)s in y&&!r.isUndefined(e[s])&&(n[s]=e[s].slice());const o={};for(const s in n)o[s]=y[s](s,t,n[s],n);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const e in this.getCss(0))r.css(this.$el,e,"")},getCss(e){const t={transform:"",filter:""};for(const n in this.props)this.props[n](t,e);return t}}};function F(e,t,n){let o=I(n)||{x:"px",y:"px",rotate:"deg"}[e]||"",s;return e==="x"||e==="y"?(e="translate"+r.ucfirst(e),s=a=>r.toFloat(r.toFloat(a).toFixed(o==="px"?0:6))):e==="scale"&&(o="",s=a=>I([a])?r.toPx(a,"width",t,!0)/t.offsetWidth:a),n.length===1&&n.unshift(e==="scale"?1:0),n=m(n,s),(a,i)=>{a.transform+=" "+e+"("+b(n,i)+o+")"}}function $(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n,o=>q(t,o)),(o,s)=>{const[a,i,c]=S(n,s),h=a.map((u,f)=>(u+=c*(i[f]-u),f===3?r.toFloat(u):parseInt(u,10))).join(",");o[e]="rgba("+h+")"}}function q(e,t){return x(e,"color",t).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(r.toFloat)}function l(e,t,n){n.length===1&&n.unshift(0);const o=I(n)||{blur:"px",hue:"deg"}[e]||"%";return e={fopacity:"opacity",hue:"hue-rotate"}[e]||e,n=m(n),(s,a)=>{const i=b(n,a);s.filter+=" "+e+"("+(i+o)+")"}}function H(e,t,n){return n.length===1&&n.unshift(x(t,e,"")),n=m(n),(o,s)=>{o[e]=b(n,s)}}function L(e,t,n){n.length===1&&n.unshift(0);const o=I(n),s=R(t);return n=m(n.reverse(),a=>(a=r.toFloat(a),o==="%"?a*s/100:a)),n.some(a=>{let[i]=a;return i})?(r.css(t,"strokeDasharray",s),(a,i)=>{a.strokeDashoffset=b(n,i)}):r.noop}function j(e,t,n,o){n.length===1&&n.unshift(0);const s=e==="bgy"?"height":"width";o[e]=m(n,c=>r.toPx(c,s,t));const a=["bgx","bgy"].filter(c=>c in o);if(a.length===2&&e==="bgx")return r.noop;if(x(t,"backgroundSize","")==="cover")return V(e,t,n,o);const i={};for(const c of a)i[c]=p(t,c);return O(a,i,o)}function V(e,t,n,o){const s=A(t);if(!s.width)return r.noop;const a={width:t.offsetWidth,height:t.offsetHeight},i=["bgx","bgy"].filter(f=>f in o),c={};for(const f of i){const d=o[f].map(J=>{let[K]=J;return K}),w=Math.min(...d),M=Math.max(...d),B=d.indexOf(w)<d.indexOf(M),N=M-w;c[f]=(B?-N:0)-(B?w:M)+"px",a[f==="bgy"?"height":"width"]+=N}const h=r.Dimensions.cover(s,a);for(const f of i){const d=f==="bgy"?"height":"width",w=h[d]-a[d];c[f]="max("+p(t,f)+",-"+w+"px) + "+c[f]}const u=O(i,c,o);return(f,d)=>{u(f,d),f.backgroundSize=h.width+"px "+h.height+"px",f.backgroundRepeat="no-repeat"}}function p(e,t){return x(e,"background-position-"+t.substr(-1),"")}function O(e,t,n){return function(o,s){for(const a of e){const i=b(n[a],s);o["background-position-"+a.substr(-1)]="calc("+t[a]+" + "+i+"px)"}}}const v={};function A(e){const t=r.css(e,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(v[t])return v[t];const n=new Image;return t&&(n.src=t,!n.naturalWidth)?(n.onload=()=>{v[t]=C(n),r.trigger(e,r.createEvent("load",!1))},C(n)):v[t]=C(n)}function C(e){return{width:e.naturalWidth,height:e.naturalHeight}}function m(e,t){t===void 0&&(t=r.toFloat);const n=[],{length:o}=e;let s=0;for(let a=0;a<o;a++){let[i,c]=r.isString(e[a])?e[a].trim().split(" "):[e[a]];if(i=t(i),c=c?r.toFloat(c)/100:null,a===0?c===null?c=0:c&&n.push([i,0]):a===o-1&&(c===null?c=1:c!==1&&(n.push([i,c]),c=1)),n.push([i,c]),c===null)s++;else if(s){const h=n[a-s-1][1],u=(c-h)/(s+1);for(let f=s;f>0;f--)n[a-f][1]=h+u*(s-f+1);s=0}}return n}function S(e,t){const n=r.findIndex(e.slice(1),o=>{let[,s]=o;return t<=s})+1;return[e[n-1][0],e[n][0],(t-e[n-1][1])/(e[n][1]-e[n-1][1])]}function b(e,t){const[n,o,s]=S(e,t);return r.isNumber(n)?n+Math.abs(n-o)*s*(n<o?1:-1):+o}const G=/^-?\d+(\S+)/;function I(e,t){for(const n of e){const o=n.match==null?void 0:n.match(G);if(o)return o[1]}return t}function x(e,t,n){const o=e.style[t],s=r.css(r.css(e,t,n),t);return e.style[t]=o,s}function W(e,t){return e.reduce((n,o)=>(n[o]=t,n),{})}var T={mixins:[_],data:{selItem:"!li"},beforeConnect(){this.item=r.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,duration:o,timing:s,dir:a}}=e;r.fastdom.read(()=>{const i=this.getCss(z(t,a,n)),c=this.getCss(D(t)?.5:a>0?1:0);r.fastdom.write(()=>{r.css(this.$el,i),r.Transition.start(this.$el,c,o,s).catch(r.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){r.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler(e){let{type:t,detail:{percent:n,dir:o}}=e;r.fastdom.read(()=>{const s=this.getCss(z(t,o,n));r.fastdom.write(()=>r.css(this.$el,s))})}}]};function D(e){return r.endsWith(e,"in")}function z(e,t,n){return n/=2,D(e)^t<0?n:1-n}return typeof window<"u"&&window.UIkit&&window.UIkit.component("slideshowParallax",T),T});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.7-dev.
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | 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')) :
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
var Class = {
|
|
10
10
|
connected() {
|
|
11
|
-
|
|
11
|
+
uikitUtil.addClass(this.$el, this.$options.id);
|
|
12
12
|
} };
|
|
13
13
|
|
|
14
14
|
var Animations$1 = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.7-dev.05c3b3f6c | 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)}},z={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 b(e){return"scale3d("+e+", "+e+", 1)"}function $(e,t,n,i){let{animation:l,easing:r}=i;const{percent:a,translate:f,show:c=s.noop}=l,g=c(n),m=new s.Deferred;return{dir:n,show(o,d,L){d===void 0&&(d=0);const x=L?"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(),m.resolve()},s.noop),m.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=f(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 S={connected(){var e;this.registerObserver(s.observeResize(((e=this.$options.resizeTargets)==null?void 0:e.call(this))||this.$el,()=>this.$emit("resize")))}},N={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)}}};const I={passive:!1,capture:!0},y={passive:!0,capture:!0},T="touchstart mousedown",w="touchmove mousemove",A="touchend touchcancel mouseup click input scroll";var C={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:T,delegate(){return this.selSlides},handler(e){!this.draggable||!s.isTouch(e)&&D(e.target)||s.closest(e.target,s.selInput)||e.button>0||this.length<2||this.start(e)}},{name:"dragstart",handler(e){e.preventDefault()}},{name:w,el(){return this.list},handler:s.noop,...I}],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,w,this.move,I),s.on(document,A,this.end,y),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 f=n[i],c=n[r],g=this.index!==r,m=i===r;let o;[this.index,this.prevIndex].filter(d=>!s.includes([r,i],d)).forEach(d=>{s.trigger(n[d],"itemhidden",[this]),m&&(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,!m&&s.trigger(f,"beforeitemhide",[this]),s.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),f,!m&&c),g&&(!m&&s.trigger(f,"itemhide",[this]),s.trigger(c,"itemshow",[this]))},end(){if(s.off(document,w,this.move,I),s.off(document,A,this.end,y),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 D(e){return s.css(e,"userSelect")!=="none"&&s.toNodes(e.childNodes).some(t=>t.nodeType===3&&t.textContent.trim())}var H={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))}}}},M={mixins:[N,C,H,S],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(e,t){let{velocity:n}=e;return P(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.$emit("resize")}},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],f=this.getIndex(e,this.index),c=this.slides[f];if(a===c){l();return}if(this.dir=O(e,r),this.prevIndex=r,this.index=f,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(m=>{requestAnimationFrame(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));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 O(e,t){return e==="next"?1:e==="previous"||e<t?-1:1}function P(e){return .5*e+300}var E={mixins:[M],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:z,Transitioner:$},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)}}},R={...z,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:b(1+.5),zIndex:0},{zIndex:-1}]},percent(e){return 1-s.css(e,"opacity")},translate(e){return[{opacity:1-e,transform:b(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}]}}},W={update:{write(){if(this.stack.length||this.dragging)return;const e=this.getValidIndex(this.index);!~this.prevIndex||this.index!==e?this.show(e):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},j={data:{preload:5},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).slice(0,this.preload-1).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)}))}}},B={mixins:[j],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}},_={mixins:[p,E,W,B],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:R},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",_),_});
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | 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.addClass(this.$el,this.$options.id)}},z={slide:{show(t){return[{transform:h(t*-100)},{transform:h()}]},percent(t){return v(t)},translate(t,e){return[{transform:h(e*-100*t)},{transform:h(e*100*(1-t))}]}}};function v(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)||0}function h(t,e){return t===void 0&&(t=0),e===void 0&&(e="%"),t+=t?e:"","translate3d("+t+", 0, 0)"}function b(t){return"scale3d("+t+", "+t+", 1)"}function $(t,e,n,i){let{animation:l,easing:r}=i;const{percent:a,translate:f,show:c=s.noop}=l,g=c(n),m=new s.Deferred;return{dir:n,show(o,d,L){d===void 0&&(d=0);const x=L?"linear":r;return o-=Math.round(o*s.clamp(d,-1,1)),this.translate(d),u(e,"itemin",{percent:d,duration:o,timing:x,dir:n}),u(t,"itemout",{percent:1-d,duration:o,timing:x,dir:n}),Promise.all([s.Transition.start(e,g[1],o,x),s.Transition.start(t,g[0],o,x)]).then(()=>{this.reset(),m.resolve()},s.noop),m.promise},cancel(){s.Transition.cancel([e,t])},reset(){for(const o in g[0])s.css([e,t],o,"")},forward(o,d){return d===void 0&&(d=this.percent()),s.Transition.cancel([e,t]),this.show(o,d,!0)},translate(o){this.reset();const d=f(o,n);s.css(e,d[1]),s.css(t,d[0]),u(e,"itemtranslatein",{percent:o,dir:n}),u(t,"itemtranslateout",{percent:1-o,dir:n})},percent(){return a(t||e,e,n)},getDistance(){return t==null?void 0:t.offsetWidth}}}function u(t,e,n){s.trigger(t,s.createEvent(e,!1,!1,n))}var S={connected(){var t;this.registerObserver(s.observeResize(((t=this.$options.resizeTargets)==null?void 0:t.call(this))||this.$el,()=>this.$emit("resize")))}},N={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)}}};const I={passive:!1,capture:!0},y={passive:!0,capture:!0},T="touchstart mousedown",w="touchmove mousemove",A="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 e=this[t];this[t]=n=>{const i=s.getEventPos(n).x*(s.isRtl?-1:1);this.prevPos=i===this.pos?this.prevPos:this.pos,this.pos=i,e(n)}}},events:[{name:T,delegate(){return this.selSlides},handler(t){!this.draggable||!s.isTouch(t)&&C(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:w,el(){return this.list},handler:s.noop,...I}],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,w,this.move,I),s.on(document,A,this.end,y),s.css(this.list,"userSelect","none")},move(t){const e=this.pos-this.drag;if(e===0||this.prevPos===this.pos||!this.dragging&&Math.abs(e)<this.threshold)return;s.css(this.list,"pointerEvents","none"),t.cancelable&&t.preventDefault(),this.dragging=!0,this.dir=e<0?1:-1;const{slides:n}=this;let{prevIndex:i}=this,l=Math.abs(e),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 f=n[i],c=n[r],g=this.index!==r,m=i===r;let o;[this.index,this.prevIndex].filter(d=>!s.includes([r,i],d)).forEach(d=>{s.trigger(n[d],"itemhidden",[this]),m&&(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,!m&&s.trigger(f,"beforeitemhide",[this]),s.trigger(c,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),f,!m&&c),g&&(!m&&s.trigger(f,"itemhide",[this]),s.trigger(c,"itemshow",[this]))},end(){if(s.off(document,w,this.move,I),s.off(document,A,this.end,y),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=(s.isRtl?this.dir*(s.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)}s.css(this.list,{userSelect:"",pointerEvents:""}),this.drag=this.percent=null}}};function C(t){return s.css(t,"userSelect")!=="none"&&s.toNodes(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}var H={data:{selNav:!1},computed:{nav(t,e){let{selNav:n}=t;return s.$(n,e)},selNavItem(t){let{attrItem:e}=t;return"["+e+"],[data-"+e+"]"},navItems(t,e){return s.$$(this.selNavItem,e)}},update:{write(){this.nav&&this.length!==this.nav.children.length&&s.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(t){t.preventDefault(),this.show(s.data(t.current,this.attrItem))}},{name:"itemshow",handler:"updateNav"}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const n=s.data(e,this.attrItem);s.toggleClass(e,this.clsActive,s.toNumber(n)===t),s.toggleClass(e,"uk-invisible",this.finite&&(n==="previous"&&t===0||n==="next"&&t>=this.maxIndex))}}}},M={mixins:[N,D,H,S],props:{clsActivated:Boolean,easing:String,index:Number,finite:Boolean,velocity:Number,selSlides:String},data:()=>({easing:"ease",finite:!1,velocity:1,index:0,prevIndex:-1,stack:[],percent:0,clsActive:"uk-active",clsActivated:!1,Transitioner:!1,transitionOptions:{}}),connected(){this.prevIndex=-1,this.index=this.getValidIndex(this.$props.index),this.stack=[]},disconnected(){s.removeClass(this.slides,this.clsActive)},computed:{duration(t,e){let{velocity:n}=t;return P(e.offsetWidth/n)},list(t,e){let{selList:n}=t;return s.$(n,e)},maxIndex(){return this.length-1},selSlides(t){let{selList:e,selSlides:n}=t;return e+" "+(n||"> *")},slides:{get(){return s.$$(this.selSlides,this.$el)},watch(){this.$emit("resize")}},length(){return this.slides.length}},methods:{show(t,e){if(e===void 0&&(e=!1),this.dragging||!this.length)return;const{stack:n}=this,i=e?0:n.length,l=()=>{n.splice(i,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&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],f=this.getIndex(t,this.index),c=this.slides[f];if(a===c){l();return}if(this.dir=O(t,r),this.prevIndex=r,this.index=f,a&&!s.trigger(a,"beforeitemhide",[this])||!s.trigger(c,"beforeitemshow",[this,a])){this.index=this.prevIndex,l();return}const g=this._show(a,c,e).then(()=>(a&&s.trigger(a,"itemhidden",[this]),s.trigger(c,"itemshown",[this]),new Promise(m=>{requestAnimationFrame(()=>{n.shift(),n.length?this.show(n.shift(),!0):this._transitioner=null,m()})})));return a&&s.trigger(a,"itemhide",[this]),s.trigger(c,"itemshow",[this]),g},getIndex(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.index),s.clamp(s.getIndex(t,this.slides,e,this.finite),0,this.maxIndex)},getValidIndex(t,e){return t===void 0&&(t=this.index),e===void 0&&(e=this.prevIndex),this.getIndex(t,e)},_show(t,e,n){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:n?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}),!n&&!t)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(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()},_translate(t,e,n){e===void 0&&(e=this.prevIndex),n===void 0&&(n=this.index);const i=this._getTransitioner(e!==n?e:!1,n);return i.translate(t),i},_getTransitioner(t,e,n,i){return t===void 0&&(t=this.prevIndex),e===void 0&&(e=this.index),n===void 0&&(n=this.dir||1),i===void 0&&(i=this.transitionOptions),new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,n*(s.isRtl?-1:1),i)}}};function O(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function P(t){return .5*t+300}var E={mixins:[M],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:z,Transitioner:$},computed:{animation(t){let{animation:e,Animations:n}=t;return{...n[e]||n.slide,name:e}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow(t){let{target:e}=t;s.addClass(e,this.clsActive)},itemshown(t){let{target:e}=t;s.addClass(e,this.clsActivated)},itemhidden(t){let{target:e}=t;s.removeClass(e,this.clsActive,this.clsActivated)}}},R={...z,fade:{show(){return[{opacity:0,zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,zIndex:0},{zIndex:-1}]}},scale:{show(){return[{opacity:0,transform:b(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:b(1+.5*t),zIndex:0},{zIndex:-1}]}},pull:{show(t){return t<0?[{transform:h(30),zIndex:-1},{transform:h(),zIndex:0}]:[{transform:h(-100),zIndex:0},{transform:h(),zIndex:-1}]},percent(t,e,n){return n<0?1-v(e):v(t)},translate(t,e){return e<0?[{transform:h(30*t),zIndex:-1},{transform:h(-100*(1-t)),zIndex:0}]:[{transform:h(-t*100),zIndex:0},{transform:h(30*(1-t)),zIndex:-1}]}},push:{show(t){return t<0?[{transform:h(100),zIndex:0},{transform:h(),zIndex:-1}]:[{transform:h(-30),zIndex:-1},{transform:h(),zIndex:0}]},percent(t,e,n){return n>0?1-v(e):v(t)},translate(t,e){return e<0?[{transform:h(t*100),zIndex:0},{transform:h(-30*(1-t)),zIndex:-1}]:[{transform:h(-30*t),zIndex:-1},{transform:h(100*(1-t)),zIndex:0}]}}},W={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"]}},j={data:{preload:5},methods:{lazyload(t,e){t===void 0&&(t=this.$el),e===void 0&&(e=this.$el),this.registerObserver(s.observeIntersection(t,(n,i)=>{for(const l of s.toNodes(s.isFunction(e)?e():e))s.$$('[loading="lazy"]',l).slice(0,this.preload-1).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)}))}}},B={mixins:[j],connected(){this.lazyload(this.slides,this.getAdjacentSlides)}},_={mixins:[p,E,W,B],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:R},update:{read(){if(!this.list)return!1;let[t,e]=this.ratio.split(":").map(Number);return e=e*this.list.offsetWidth/t||0,this.minHeight&&(e=Math.max(this.minHeight,e)),this.maxHeight&&(e=Math.min(this.maxHeight,e)),{height:e-s.boxModelAdjust(this.list,"height","content-box")}},write(t){let{height:e}=t;e>0&&s.css(this.list,"minHeight",e)},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",_),_});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.7-dev.
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | 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')) :
|
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
|
|
361
361
|
var Class = {
|
|
362
362
|
connected() {
|
|
363
|
-
|
|
363
|
+
uikitUtil.addClass(this.$el, this.$options.id);
|
|
364
364
|
} };
|
|
365
365
|
|
|
366
366
|
var Component = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.7-dev.
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | 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 B(n,"top","bottom")}function B(n,s,o){const t=[[]];for(const c of n){if(!e.isVisible(c))continue;let a=u(c);for(let r=t.length-1;r>=0;r--){const h=t[r];if(!h[0]){h.push(c);break}let d;if(h[0].offsetParent===c.offsetParent?d=u(h[0]):(a=u(c,!0),d=u(h[0],!0)),a[s]>=d[o]-1&&a[s]!==d[s]){t.push([c]);break}if(a[o]-1>d[s]||a[s]===d[s]){h.push(c);break}if(r===0){t.unshift([c]);break}}}return t}function u(n,s){s===void 0&&(s=!1);let{offsetTop:o,offsetLeft:t,offsetHeight:c,offsetWidth:a}=n;return s&&([o,t]=e.offsetPosition(n)),{top:o,left:t,bottom:o+c,right:t+a}}const w="uk-transition-leave",b="uk-transition-enter";function y(n,s,o,t){t===void 0&&(t=0);const c=v(s,!0),a={opacity:1},r={opacity:0},h=f=>()=>c===v(s)?f():Promise.reject(),d=h(async()=>{e.addClass(s,w),await Promise.all(C(s).map((f,p)=>new Promise(l=>setTimeout(()=>e.Transition.start(f,r,o/2,"ease").then(l),p*t)))),e.removeClass(s,w)}),i=h(async()=>{const f=e.height(s);e.addClass(s,b),n(),e.css(e.children(s),{opacity:0}),await R();const p=e.children(s),l=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,f);const m=C(s);e.css(p,r);const F=m.map(async(G,J)=>{await L(J*t),await e.Transition.start(G,a,o/2,"ease")});f!==l&&F.push(e.Transition.start(s,{height:l},o/2+m.length*t,"ease")),await Promise.all(F).then(()=>{e.removeClass(s,b),c===v(s)&&(e.css(s,{height:"",alignContent:""}),e.css(p,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,w)?T(s).then(i):e.hasClass(s,b)?T(s).then(d).then(i):d().then(i)}function v(n,s){return s&&(n.dataset.transition=1+v(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(t=>e.isInView(t)),"offsetLeft")),[])}function R(){return new Promise(n=>requestAnimationFrame(n))}function L(n){return new Promise(s=>setTimeout(s,n))}async function z(n,s,o){await I();let t=e.children(s);const c=t.map(f=>P(f,!0)),a=e.css(s,["height","padding"]);e.Transition.cancel(s),t.forEach(e.Transition.cancel),S(s),n(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.fastdom.flush();const r=e.css(s,["height","padding"]),[h,d]=H(s,t,c);t.forEach((f,p)=>d[p]&&e.css(f,d[p])),e.css(s,{display:"block",...a}),await I();const i=t.map((f,p)=>e.parent(f)===s&&e.Transition.start(f,h[p],o,"ease")).concat(e.Transition.start(s,r,o,"ease"));await Promise.all(i).then(()=>{t.forEach((f,p)=>e.parent(f)===s&&e.css(f,"display",h[p].opacity===0?"none":"")),S(s)},e.noop)}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 H(n,s,o){const t=s.map((a,r)=>e.parent(a)&&r in o?o[r]?e.isVisible(a)?x(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=e.parent(s[r])===n&&(o[r]||P(s[r]));if(!h)return!1;if(!a)delete h.opacity;else if(!("opacity"in a)){const{opacity:d}=h;d%1?a.opacity=1:delete h.opacity}return h});return[t,c]}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:t,left:c}=e.position(n),{marginLeft:a,marginTop:r}=e.css(n,["marginTop","marginLeft"]);return{top:t,left:c,height:s,width:o,marginLeft:a,marginTop:r,transform:""}}function I(){return new Promise(n=>requestAnimationFrame(n))}var N={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 c=arguments.length,a=new Array(c),r=0;r<c;r++)a[r]=arguments[r];return y(...a,40)}:o?z:()=>(n(),Promise.resolve()))(n,s,this.duration).then(()=>this.$update(s,"resize"),e.noop)}}},A={connected(){e.addClass(this.$el,this.$options.id)}},$={mixins:[A,N],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:t,offsetLeft:c},placeholder:a}=this;e.css(this.drag,{top:o-t,left:s-c});const r=this.getSortable(document.elementFromPoint(s,o));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=W(h,{x:s,y:o});if(h.length&&(!d||d===a))return;const i=this.getSortable(a),f=j(r.target,d,a,s,o,r===i&&n.moved!==d);f!==!1&&(f&&a===f||(r!==i?(i.remove(a),n.moved=d):delete n.moved,r.insert(a,f),this.touched.add(r)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:t}=n,[c]=this.items.filter(a=>e.within(s,a));!c||t||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=c,this.origin={target:s,index:e.index(c),...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=q(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]),M(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;V();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 D;function M(n){let s=Date.now();D=setInterval(()=>{let{x:o,y:t}=n;t+=document.scrollingElement.scrollTop;const c=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y),/auto|scroll/).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:i,height:f}=e.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(i>t&&i-35<t)r+=c;else return;if(r>0&&r<h-f)return a.scrollTop=r,!0})},15)}function V(){clearInterval(D)}function q(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 W(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function j(n,s,o,t,c,a){if(!e.children(n).length)return;const r=s.getBoundingClientRect();if(!a)return O(n,o)||c<r.top+r.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=E([r.top,r.bottom],[h.top,h.bottom]),i=d?t:c,f=d?"width":"height",p=d?"left":"top",l=d?"right":"bottom",m=h[f]<r[f]?r[f]-h[f]:0;return h[p]<r[p]?m&&i<r[p]+m?!1:s.nextElementSibling:m&&i>r[l]-m?!1:s}function O(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const t=e.children(n),c=t.some((a,r)=>{const h=a.getBoundingClientRect();return t.slice(r+1).some(d=>{const i=d.getBoundingClientRect();return!E([h.left,h.right],[i.left,i.right])})});return o&&e.remove(s),c}function E(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",$),$});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.7-dev.
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | 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')) :
|
|
@@ -382,14 +382,13 @@
|
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
this._unbind = uikitUtil.once(
|
|
385
|
-
document, "
|
|
385
|
+
document, "keydown " +
|
|
386
386
|
uikitUtil.pointerDown,
|
|
387
387
|
this.hide,
|
|
388
388
|
false,
|
|
389
389
|
(e) =>
|
|
390
390
|
e.type === uikitUtil.pointerDown && !uikitUtil.within(e.target, this.$el) ||
|
|
391
|
-
e.type === 'keydown' && e.keyCode === 27
|
|
392
|
-
e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name);
|
|
391
|
+
e.type === 'keydown' && e.keyCode === 27);
|
|
393
392
|
|
|
394
393
|
|
|
395
394
|
clearTimeout(this.showTimer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.7-dev.
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */(function(s,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],g):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitTooltip=g(s.UIkit.util))})(this,function(s){"use strict";var g={props:{container:Boolean},data:{container:!0},computed:{container(o){let{container:t}=o;return t===!0&&this.$container||t&&s.$(t)}}},E={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(o){let{animation:t}=o;return!!t[0]},hasTransition(o){let{animation:t}=o;return["slide","reveal"].some(e=>s.startsWith(t[0],e))}},methods:{toggleElement(o,t,e){return new Promise(n=>Promise.all(s.toNodes(o).map(i=>{const r=s.isBoolean(t)?t:!this.isToggled(i);if(!s.trigger(i,"before"+(r?"show":"hide"),[this]))return Promise.reject();const h=(s.isFunction(e)?e:e===!1||!this.hasAnimation?S:this.hasTransition?B:I)(i,r,this),c=r?this.clsEnter:this.clsLeave;s.addClass(i,c),s.trigger(i,r?"show":"hide",[this]);const a=()=>{s.removeClass(i,c),s.trigger(i,r?"shown":"hidden",[this])};return h?h.then(a,()=>(s.removeClass(i,c),Promise.reject())):a()})).then(n,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 e;this.cls?(e=s.includes(this.cls," ")||t!==s.hasClass(o,this.cls),e&&s.toggleClass(o,this.cls,s.includes(this.cls," ")?void 0:t)):(e=t===o.hidden,e&&(o.hidden=!t)),s.$$("[autofocus]",o).some(n=>s.isVisible(n)?n.focus()||!0:n.blur()),e&&s.trigger(o,"toggled",[t,this])}}};function S(o,t,e){let{_toggle:n}=e;return s.Animation.cancel(o),s.Transition.cancel(o),n(o,t)}async function B(o,t,e){var n;let{animation:i,duration:r,velocity:h,transition:c,_toggle:a}=e;const[f="reveal",l="top"]=((n=i[0])==null?void 0:n.split("-"))||[],u=[["left","right"],["top","bottom"]],y=u[s.includes(u[0],l)?0:1],$=y[1]===l,v=["width","height"][u.indexOf(y)],p="margin-"+y[0],b="margin-"+l;let m=s.dimensions(o)[v];const N=s.Transition.inProgress(o);await s.Transition.cancel(o),t&&a(o,!0);const j=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",p,b].map(_=>[_,o.style[_]])),w=s.dimensions(o),P=s.toFloat(s.css(o,p)),A=s.toFloat(s.css(o,b)),d=w[v]+A;!N&&!t&&(m+=A);const[T]=s.wrapInner(o,"<div>");s.css(T,{boxSizing:"border-box",height:w.height,width:w.width,...s.css(o,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",b])}),s.css(o,{padding:0,border:0,minWidth:0,minHeight:0,[b]:0,width:w.width,height:w.height,overflow:"hidden",[v]:m});const C=m/d;r=(h*d+r)*(t?1-C:C);const O={[v]:t?d:0};$&&(s.css(o,p,d-m+P),O[p]=t?P:d+P),!$^f==="reveal"&&(s.css(T,p,-d+m),s.Transition.start(T,{[p]:t?0:-d},r,c));try{await s.Transition.start(o,O,r,c)}finally{s.css(o,j),s.unwrap(T.firstChild),t||a(o,!1)}}function I(o,t,e){s.Animation.cancel(o);const{animation:n,duration:i,_toggle:r}=e;return t?(r(o,!0),s.Animation.in(o,n[0],i,e.origin)):s.Animation.out(o,n[1]||n[0],i,e.origin).then(()=>r(o,!1))}var L={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:"bottom-"+(s.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=s.includes(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(o,t,e){let n=[this.getPositionOffset(o),this.getShiftOffset(o)];const i=[this.flip&&"flip",this.shift&&"shift"],r={element:[this.inset?this.dir:s.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const l in r)r[l].reverse();n.reverse(),i.reverse()}const[h]=s.scrollParents(o,/auto|scroll/),{scrollTop:c,scrollLeft:a}=h,f=s.dimensions(o);s.css(o,{top:-f.height,left:-f.width}),s.positionAt(o,t,{attach:r,offset:n,boundary:e,placement:i,viewportOffset:this.getViewportOffset(o)}),h.scrollTop=c,h.scrollLeft=a},getPositionOffset(o){return s.toPx(this.offset===!1?s.css(o,"--uk-position-offset"):this.offset,this.axis==="x"?"width":"height",o)*(s.includes(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(o){return this.align==="center"?0:s.toPx(s.css(o,"--uk-position-shift-offset"),this.axis==="y"?"width":"height",o)*(s.includes(["left","top"],this.align)?1:-1)},getViewportOffset(o){return s.toPx(s.css(o,"--uk-position-viewport-offset"))}}},x={mixins:[g,E,L],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),D(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,"keydown "+s.pointerDown,this.hide,!1,o=>o.type===s.pointerDown&&!s.within(o.target,this.$el)||o.type==="keydown"&&o.keyCode===27),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[e,n]=F(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?s.flipPosition(e)+"-"+n:n+"-"+s.flipPosition(e)}),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 D(o){s.isFocusable(o)||s.attr(o,"tabindex","0")}function F(o,t,e){let[n,i]=e;const r=s.offset(o),h=s.offset(t),c=[["left","right"],["top","bottom"]];for(const f of c){if(r[f[0]]>=h[f[1]]){n=f[1];break}if(r[f[1]]<=h[f[0]]){n=f[0];break}}const a=s.includes(c[0],n)?c[1]:c[0];return r[a[0]]===h[a[0]]?i=a[0]:r[a[1]]===h[a[1]]?i=a[1]:i="center",[n,i]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",x),x});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.7-dev.
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.15.7-dev.
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | 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.15.7-dev.
|
|
1
|
+
/*! UIkit 3.15.7-dev.3ec9925a1 | 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() :
|
|
@@ -2536,7 +2536,7 @@
|
|
|
2536
2536
|
UIkit.prototype._initProps = function (props) {
|
|
2537
2537
|
let key;
|
|
2538
2538
|
|
|
2539
|
-
props = props || getProps(this.$options
|
|
2539
|
+
props = props || getProps(this.$options);
|
|
2540
2540
|
|
|
2541
2541
|
for (key in props) {
|
|
2542
2542
|
if (!isUndefined(props[key])) {
|
|
@@ -2587,9 +2587,9 @@
|
|
|
2587
2587
|
};
|
|
2588
2588
|
}
|
|
2589
2589
|
|
|
2590
|
-
function getProps(opts
|
|
2590
|
+
function getProps(opts) {
|
|
2591
2591
|
const data$1 = {};
|
|
2592
|
-
const { args = [], props = {}, el } = opts;
|
|
2592
|
+
const { args = [], props = {}, el, id } = opts;
|
|
2593
2593
|
|
|
2594
2594
|
if (!props) {
|
|
2595
2595
|
return data$1;
|
|
@@ -2612,7 +2612,7 @@
|
|
|
2612
2612
|
data$1[key] = value;
|
|
2613
2613
|
}
|
|
2614
2614
|
|
|
2615
|
-
const options = parseOptions(data(el,
|
|
2615
|
+
const options = parseOptions(data(el, id), args);
|
|
2616
2616
|
|
|
2617
2617
|
for (const key in options) {
|
|
2618
2618
|
const prop = camelize(key);
|
|
@@ -2740,24 +2740,24 @@
|
|
|
2740
2740
|
}
|
|
2741
2741
|
|
|
2742
2742
|
function initPropsObserver(component) {
|
|
2743
|
-
const { $
|
|
2744
|
-
const { attrs, props, el } = $options;
|
|
2743
|
+
const { $options, $props } = component;
|
|
2744
|
+
const { id, attrs, props, el } = $options;
|
|
2745
2745
|
|
|
2746
2746
|
if (!props || attrs === false) {
|
|
2747
2747
|
return;
|
|
2748
2748
|
}
|
|
2749
2749
|
|
|
2750
2750
|
const attributes = isArray(attrs) ? attrs : Object.keys(props);
|
|
2751
|
-
const filter = attributes.map((key) => hyphenate(key)).concat(
|
|
2751
|
+
const filter = attributes.map((key) => hyphenate(key)).concat(id);
|
|
2752
2752
|
|
|
2753
2753
|
const observer = new MutationObserver((records) => {
|
|
2754
|
-
const data = getProps($options
|
|
2754
|
+
const data = getProps($options);
|
|
2755
2755
|
if (
|
|
2756
2756
|
records.some((_ref3) => {let { attributeName } = _ref3;
|
|
2757
2757
|
const prop = attributeName.replace('data-', '');
|
|
2758
|
-
return (
|
|
2759
|
-
prop
|
|
2760
|
-
|
|
2758
|
+
return (prop === id ? attributes : [camelize(prop), camelize(attributeName)]).some(
|
|
2759
|
+
(prop) => !isUndefined(data[prop]) && data[prop] !== $props[prop]);
|
|
2760
|
+
|
|
2761
2761
|
}))
|
|
2762
2762
|
{
|
|
2763
2763
|
component.$reset();
|
|
@@ -2838,36 +2838,31 @@
|
|
|
2838
2838
|
|
|
2839
2839
|
UIkit.prototype.$getComponent = UIkit.getComponent;
|
|
2840
2840
|
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
$name: {
|
|
2846
|
-
get() {
|
|
2847
|
-
return componentName(this.$options.name);
|
|
2848
|
-
} } });
|
|
2849
|
-
|
|
2841
|
+
Object.defineProperty(
|
|
2842
|
+
UIkit.prototype,
|
|
2843
|
+
'$container',
|
|
2844
|
+
Object.getOwnPropertyDescriptor(UIkit, 'container'));
|
|
2850
2845
|
|
|
2851
2846
|
}
|
|
2852
2847
|
|
|
2848
|
+
const components$2 = {};
|
|
2853
2849
|
function componentAPI (UIkit) {
|
|
2854
|
-
const DATA = UIkit
|
|
2855
|
-
|
|
2856
|
-
const components = {};
|
|
2850
|
+
const { data: DATA, prefix: PREFIX } = UIkit;
|
|
2857
2851
|
|
|
2858
2852
|
UIkit.component = function (name, options) {
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
name = camelize(id);
|
|
2853
|
+
name = hyphenate(name);
|
|
2854
|
+
const id = PREFIX + name;
|
|
2862
2855
|
|
|
2863
2856
|
if (!options) {
|
|
2864
|
-
if (isPlainObject(components[
|
|
2865
|
-
components[
|
|
2857
|
+
if (isPlainObject(components$2[id])) {
|
|
2858
|
+
components$2[id] = components$2["data-" + id] = UIkit.extend(components$2[id]);
|
|
2866
2859
|
}
|
|
2867
2860
|
|
|
2868
|
-
return components[
|
|
2861
|
+
return components$2[id];
|
|
2869
2862
|
}
|
|
2870
2863
|
|
|
2864
|
+
name = camelize(name);
|
|
2865
|
+
|
|
2871
2866
|
UIkit[name] = function (element, data) {
|
|
2872
2867
|
const component = UIkit.component(name);
|
|
2873
2868
|
|
|
@@ -2894,15 +2889,16 @@
|
|
|
2894
2889
|
|
|
2895
2890
|
const opt = isPlainObject(options) ? { ...options } : options.options;
|
|
2896
2891
|
|
|
2892
|
+
opt.id = id;
|
|
2897
2893
|
opt.name = name;
|
|
2898
2894
|
|
|
2899
2895
|
opt.install == null ? void 0 : opt.install(UIkit, opt, name);
|
|
2900
2896
|
|
|
2901
2897
|
if (UIkit._initialized && !opt.functional) {
|
|
2902
|
-
requestAnimationFrame(() => UIkit[name]("[
|
|
2898
|
+
requestAnimationFrame(() => UIkit[name]("[" + id + "],[data-" + id + "]"));
|
|
2903
2899
|
}
|
|
2904
2900
|
|
|
2905
|
-
return components[
|
|
2901
|
+
return components$2[id] = components$2["data-" + id] = isPlainObject(options) ? opt : options;
|
|
2906
2902
|
};
|
|
2907
2903
|
|
|
2908
2904
|
UIkit.getComponents = (element) => (element == null ? void 0 : element[DATA]) || {};
|
|
@@ -2917,10 +2913,7 @@
|
|
|
2917
2913
|
|
|
2918
2914
|
for (const attribute of node.attributes) {
|
|
2919
2915
|
const name = getComponentName(attribute.name);
|
|
2920
|
-
|
|
2921
|
-
if (name && name in components) {
|
|
2922
|
-
UIkit[name](node);
|
|
2923
|
-
}
|
|
2916
|
+
name && UIkit[name](node);
|
|
2924
2917
|
}
|
|
2925
2918
|
};
|
|
2926
2919
|
|
|
@@ -2931,11 +2924,10 @@
|
|
|
2931
2924
|
};
|
|
2932
2925
|
}
|
|
2933
2926
|
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
});
|
|
2927
|
+
function getComponentName(attribute) {
|
|
2928
|
+
const cmp = components$2[attribute];
|
|
2929
|
+
return cmp && (isPlainObject(cmp) ? cmp : cmp.options).name;
|
|
2930
|
+
}
|
|
2939
2931
|
|
|
2940
2932
|
const UIkit = function (options) {
|
|
2941
2933
|
this._init(options);
|
|
@@ -2945,7 +2937,7 @@
|
|
|
2945
2937
|
UIkit.data = '__uikit__';
|
|
2946
2938
|
UIkit.prefix = 'uk-';
|
|
2947
2939
|
UIkit.options = {};
|
|
2948
|
-
UIkit.version = '3.15.7-dev.
|
|
2940
|
+
UIkit.version = '3.15.7-dev.3ec9925a1';
|
|
2949
2941
|
|
|
2950
2942
|
globalAPI(UIkit);
|
|
2951
2943
|
hooksAPI(UIkit);
|
|
@@ -2994,25 +2986,23 @@
|
|
|
2994
2986
|
}
|
|
2995
2987
|
}
|
|
2996
2988
|
|
|
2997
|
-
function applyAttributeMutation(_ref2) {
|
|
2989
|
+
function applyAttributeMutation(_ref2) {let { target, attributeName } = _ref2;
|
|
2998
2990
|
const name = getComponentName(attributeName);
|
|
2999
2991
|
|
|
3000
|
-
if (
|
|
3001
|
-
|
|
3002
|
-
|
|
2992
|
+
if (name) {var _UIkit$getComponent;
|
|
2993
|
+
if (hasAttr(target, attributeName)) {
|
|
2994
|
+
UIkit[name](target);
|
|
2995
|
+
return;
|
|
2996
|
+
}
|
|
3003
2997
|
|
|
3004
|
-
|
|
3005
|
-
UIkit[name](target);
|
|
3006
|
-
return;
|
|
2998
|
+
(_UIkit$getComponent = UIkit.getComponent(target, name)) == null ? void 0 : _UIkit$getComponent.$destroy();
|
|
3007
2999
|
}
|
|
3008
|
-
|
|
3009
|
-
(_UIkit$getComponent = UIkit.getComponent(target, name)) == null ? void 0 : _UIkit$getComponent.$destroy();
|
|
3010
3000
|
}
|
|
3011
3001
|
}
|
|
3012
3002
|
|
|
3013
3003
|
var Class = {
|
|
3014
3004
|
connected() {
|
|
3015
|
-
|
|
3005
|
+
addClass(this.$el, this.$options.id);
|
|
3016
3006
|
} };
|
|
3017
3007
|
|
|
3018
3008
|
var Lazyload = {
|
|
@@ -3362,52 +3352,46 @@
|
|
|
3362
3352
|
return this.targets + " " + this.$props.toggle;
|
|
3363
3353
|
},
|
|
3364
3354
|
|
|
3365
|
-
handler(e) {
|
|
3355
|
+
async handler(e) {var _this$_off;
|
|
3366
3356
|
e.preventDefault();
|
|
3367
|
-
|
|
3357
|
+
|
|
3358
|
+
(_this$_off = this._off) == null ? void 0 : _this$_off.call(this);
|
|
3359
|
+
this._off = keepScrollPosition(e.target);
|
|
3360
|
+
await this.toggle(index(this.toggles, e.current));
|
|
3361
|
+
this._off();
|
|
3368
3362
|
} }],
|
|
3369
3363
|
|
|
3370
3364
|
|
|
3371
3365
|
|
|
3372
3366
|
methods: {
|
|
3373
|
-
toggle(item, animate) {
|
|
3374
|
-
|
|
3367
|
+
async toggle(item, animate) {
|
|
3368
|
+
item = this.items[getIndex(item, this.items)];
|
|
3369
|
+
let items = [item];
|
|
3375
3370
|
const activeItems = filter(this.items, "." + this.clsOpen);
|
|
3376
3371
|
|
|
3377
3372
|
if (!this.multiple && !includes(activeItems, items[0])) {
|
|
3378
3373
|
items = items.concat(activeItems);
|
|
3379
3374
|
}
|
|
3380
3375
|
|
|
3381
|
-
if (
|
|
3382
|
-
!this.collapsible &&
|
|
3383
|
-
activeItems.length < 2 &&
|
|
3384
|
-
!filter(items, ":not(." + this.clsOpen + ")").length)
|
|
3385
|
-
{
|
|
3376
|
+
if (!this.collapsible && activeItems.length < 2 && includes(activeItems, item)) {
|
|
3386
3377
|
return;
|
|
3387
3378
|
}
|
|
3388
3379
|
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3380
|
+
await Promise.all(
|
|
3381
|
+
items.map((el) =>
|
|
3382
|
+
this.toggleElement(el, !includes(activeItems, el), (el, show) => {
|
|
3383
|
+
toggleClass(el, this.clsOpen, show);
|
|
3384
|
+
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3385
|
+
|
|
3386
|
+
if (animate === false || !this.animation) {
|
|
3387
|
+
hide($(this.content, el), !show);
|
|
3388
|
+
return;
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3391
|
+
return transition(el, show, this);
|
|
3392
|
+
})));
|
|
3393
3393
|
|
|
3394
|
-
if (animate === false || !this.animation) {
|
|
3395
|
-
hide($(this.content, el), !show);
|
|
3396
|
-
return;
|
|
3397
|
-
}
|
|
3398
3394
|
|
|
3399
|
-
return transition(el, show, this).then(() => {
|
|
3400
|
-
if (show) {
|
|
3401
|
-
const toggle = $(this.$props.toggle, el);
|
|
3402
|
-
requestAnimationFrame(() => {
|
|
3403
|
-
if (!isInView(toggle)) {
|
|
3404
|
-
scrollIntoView(toggle, { offset: this.offset });
|
|
3405
|
-
}
|
|
3406
|
-
});
|
|
3407
|
-
}
|
|
3408
|
-
}, noop);
|
|
3409
|
-
});
|
|
3410
|
-
}
|
|
3411
3395
|
} } };
|
|
3412
3396
|
|
|
3413
3397
|
|
|
@@ -3448,6 +3432,22 @@
|
|
|
3448
3432
|
}
|
|
3449
3433
|
}
|
|
3450
3434
|
|
|
3435
|
+
function keepScrollPosition(el) {
|
|
3436
|
+
const scrollParent = scrollParents(el)[0];
|
|
3437
|
+
let frame;
|
|
3438
|
+
(function scroll() {
|
|
3439
|
+
frame = requestAnimationFrame(() => {
|
|
3440
|
+
const { top } = el.getBoundingClientRect();
|
|
3441
|
+
if (top < 0) {
|
|
3442
|
+
scrollParent.scrollTop += top;
|
|
3443
|
+
}
|
|
3444
|
+
scroll();
|
|
3445
|
+
});
|
|
3446
|
+
})();
|
|
3447
|
+
|
|
3448
|
+
return () => requestAnimationFrame(() => cancelAnimationFrame(frame));
|
|
3449
|
+
}
|
|
3450
|
+
|
|
3451
3451
|
var alert = {
|
|
3452
3452
|
mixins: [Class, Togglable],
|
|
3453
3453
|
|
|
@@ -5427,7 +5427,7 @@
|
|
|
5427
5427
|
|
|
5428
5428
|
|
|
5429
5429
|
beforeConnect() {
|
|
5430
|
-
addClass(this.$el, this.$
|
|
5430
|
+
addClass(this.$el, this.$options.id);
|
|
5431
5431
|
} };
|
|
5432
5432
|
|
|
5433
5433
|
|