uikit 3.17.1 → 3.17.2-dev.a0d91caa0
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 +7 -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 +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +44 -8
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +50 -26
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +51 -29
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +2 -4
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +43 -5
- 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 +46 -14
- 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 +46 -14
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +45 -7
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +3 -7
- 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 +37 -83
- 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 +100 -168
- package/dist/js/uikit.min.js +1 -1
- package/package.json +4 -4
- package/src/js/api/observables.js +2 -1
- package/src/js/components/filter.js +2 -6
- package/src/js/components/lightbox-panel.js +1 -3
- package/src/js/components/lightbox.js +1 -3
- package/src/js/components/notification.js +1 -4
- package/src/js/components/parallax.js +1 -3
- package/src/js/components/sortable.js +3 -5
- package/src/js/core/accordion.js +1 -3
- package/src/js/core/cover.js +6 -6
- package/src/js/core/dropnav.js +1 -3
- package/src/js/core/form-custom.js +1 -3
- package/src/js/core/height-match.js +3 -4
- package/src/js/core/leader.js +1 -3
- package/src/js/core/navbar.js +4 -9
- package/src/js/core/offcanvas.js +7 -15
- package/src/js/core/overflow-auto.js +2 -6
- package/src/js/core/scrollspy-nav.js +2 -4
- package/src/js/core/scrollspy.js +1 -3
- package/src/js/core/sticky.js +1 -3
- package/src/js/core/switcher.js +4 -8
- package/src/js/core/toggle.js +1 -1
- package/src/js/mixin/modal.js +1 -3
- package/src/js/mixin/slider-nav.js +2 -6
- package/src/js/mixin/slider.js +2 -6
- package/src/js/mixin/togglable.js +3 -6
- package/src/js/util/viewport.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | 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')) :
|
|
@@ -111,6 +111,46 @@
|
|
|
111
111
|
util.trigger(el, util.createEvent(type, false, false, data));
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
function callUpdate(instance, e = "update") {
|
|
115
|
+
if (!instance._connected) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (!instance._updates.length) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (!instance._queued) {
|
|
122
|
+
instance._queued = /* @__PURE__ */ new Set();
|
|
123
|
+
util.fastdom.read(() => {
|
|
124
|
+
if (instance._connected) {
|
|
125
|
+
runUpdates(instance, instance._queued);
|
|
126
|
+
}
|
|
127
|
+
delete instance._queued;
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
instance._queued.add(e.type || e);
|
|
131
|
+
}
|
|
132
|
+
function runUpdates(instance, types) {
|
|
133
|
+
for (const { read, write, events = [] } of instance._updates) {
|
|
134
|
+
if (!types.has("update") && !events.some((type) => types.has(type))) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
let result;
|
|
138
|
+
if (read) {
|
|
139
|
+
result = read.call(instance, instance._data, types);
|
|
140
|
+
if (result && util.isPlainObject(result)) {
|
|
141
|
+
util.assign(instance._data, result);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (write && result !== false) {
|
|
145
|
+
util.fastdom.write(() => {
|
|
146
|
+
if (instance._connected) {
|
|
147
|
+
write.call(instance, instance._data, types);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
114
154
|
function resize(options) {
|
|
115
155
|
return observe(util.observeResize, options, "resize");
|
|
116
156
|
}
|
|
@@ -135,7 +175,7 @@
|
|
|
135
175
|
return {
|
|
136
176
|
observe: observe2,
|
|
137
177
|
handler() {
|
|
138
|
-
this
|
|
178
|
+
callUpdate(this, emit);
|
|
139
179
|
},
|
|
140
180
|
...options
|
|
141
181
|
};
|
|
@@ -405,15 +445,11 @@
|
|
|
405
445
|
role: "region"
|
|
406
446
|
},
|
|
407
447
|
computed: {
|
|
408
|
-
nav({ selNav }, $el)
|
|
409
|
-
return util.$(selNav, $el);
|
|
410
|
-
},
|
|
448
|
+
nav: ({ selNav }, $el) => util.$(selNav, $el),
|
|
411
449
|
navChildren() {
|
|
412
450
|
return util.children(this.nav);
|
|
413
451
|
},
|
|
414
|
-
selNavItem({ attrItem }) {
|
|
415
|
-
return `[${attrItem}],[data-${attrItem}]`;
|
|
416
|
-
},
|
|
452
|
+
selNavItem: ({ attrItem }) => `[${attrItem}],[data-${attrItem}]`,
|
|
417
453
|
navItems(_, $el) {
|
|
418
454
|
return util.$$(this.selNavItem, $el);
|
|
419
455
|
}
|
|
@@ -593,12 +629,8 @@
|
|
|
593
629
|
util.removeClass(this.slides, this.clsActive);
|
|
594
630
|
},
|
|
595
631
|
computed: {
|
|
596
|
-
duration({ velocity }, $el)
|
|
597
|
-
|
|
598
|
-
},
|
|
599
|
-
list({ selList }, $el) {
|
|
600
|
-
return util.$(selList, $el);
|
|
601
|
-
},
|
|
632
|
+
duration: ({ velocity }, $el) => speedUp($el.offsetWidth / velocity),
|
|
633
|
+
list: ({ selList }, $el) => util.$(selList, $el),
|
|
602
634
|
maxIndex() {
|
|
603
635
|
return this.length - 1;
|
|
604
636
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.1 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,f){typeof exports=="object"&&typeof module<"u"?module.exports=f(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow",["uikit-util"],f):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSlideshow=f(e.UIkit.util))})(this,function(e){"use strict";var f={connected(){e.addClass(this.$el,this.$options.id)}},C={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},$={slide:{show(t){return[{transform:h(t*-100)},{transform:h()}]},percent(t){return g(t)},translate(t,s){return[{transform:h(s*-100*t)},{transform:h(s*100*(1-t))}]}}};function g(t){return Math.abs(e.css(t,"transform").split(",")[4]/t.offsetWidth)}function h(t=0,s="%"){return t+=t?s:"",`translate3d(${t}, 0, 0)`}function z(t){return`scale3d(${t}, ${t}, 1)`}function H(t,s,i,{animation:n,easing:d}){const{percent:r,translate:c,show:a=e.noop}=n,p=a(i);let l;return{dir:i,show(o,m=0,x){const I=x?"linear":d;return o-=Math.round(o*e.clamp(m,-1,1)),this.translate(m),v(s,"itemin",{percent:m,duration:o,timing:I,dir:i}),v(t,"itemout",{percent:1-m,duration:o,timing:I,dir:i}),new Promise(G=>{l||(l=G),Promise.all([e.Transition.start(s,p[1],o,I),e.Transition.start(t,p[0],o,I)]).then(()=>{this.reset(),l()},e.noop)})},cancel(){return e.Transition.cancel([s,t])},reset(){for(const o in p[0])e.css([s,t],o,"")},async forward(o,m=this.percent()){return await this.cancel(),this.show(o,m,!0)},translate(o){this.reset();const m=c(o,i);e.css(s,m[1]),e.css(t,m[0]),v(s,"itemtranslatein",{percent:o,dir:i}),v(t,"itemtranslateout",{percent:1-o,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 A(e.observeResize,t,"resize")}function D(t){return A(e.observeIntersection,t)}function E(t={}){return D({handler:function(s,i){const{targets:n=this.$el,preload:d=5}=t;for(const r of e.toNodes(e.isFunction(n)?n(this):n))e.$$('[loading="lazy"]',r).slice(0,d-1).forEach(c=>e.removeAttr(c,"loading"));for(const r of s.filter(({isIntersecting:c})=>c).map(({target:c})=>c))i.unobserve(r)},...t})}function A(t,s,i){return{observe:t,handler(){this.$emit(i)},...s}}var M={props:{i18n:Object},data:{i18n:null},methods:{t(t,...s){var i,n,d;let r=0;return((d=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:d.replace(/%s/g,()=>s[r++]||""))||""}}},O={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},_={passive:!0,capture:!0},P="touchstart mousedown",b="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var R={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:P,passive:!0,delegate(){return`${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,N,this.end,_),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,d=Math.abs(s),r=this.getIndex(n+this.dir),c=this._getDistance(n,r);for(;r!==n&&d>c;)this.drag-=c*this.dir,n=r,d-=c,r=this.getIndex(n+this.dir),c=this._getDistance(n,r);this.percent=d/c;const a=i[n],p=i[r],l=this.index!==r,o=n===r;let m;for(const x of[this.index,this.prevIndex])e.includes([r,n],x)||(e.trigger(i[x],"itemhidden",[this]),o&&(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,!o&&e.trigger(a,"beforeitemhide",[this]),e.trigger(p,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),a,!o&&p),l&&(!o&&e.trigger(a,"itemhide",[this]),e.trigger(p,"itemshow",[this]))},end(){if(e.off(document,b,this.move,w),e.off(document,N,this.end,_),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=`${t.$options.id}-${t._uid}${i}`;return e.$(`#${n}`)&&(n=y(t,s,`${i}-2`)),n}const u={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var W={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 d,r=null;if(e.isNumeric(i)){const c=e.toNumber(i),a=this.slides[c];a&&(a.id||(a.id=y(this,a,`-item-${i}`)),r=a.id),d=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),d=this.t(i);e.attr(n,{"aria-controls":r,"aria-label":e.attr(n,"aria-label")||d})}},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 d=i===u.HOME?0:i===u.END?"last":i===u.LEFT?"previous":i===u.RIGHT?"next":-1;~d&&(t.preventDefault(),this.show(d))}}],methods:{updateNav(){const t=this.getValidIndex();for(const s of this.navItems){const i=e.data(s,this.attrItem),n=e.$("a,button",s)||s;if(e.isNumeric(i)){const r=e.toNumber(i)===t;e.toggleClass(s,this.clsActive,r),e.attr(n,{"aria-selected":r,tabindex:r?null:-1}),r&&n&&e.matches(e.parent(s),":focus-within")&&n.focus()}else e.toggleClass(s,"uk-invisible",this.finite&&(i==="previous"&&t===0||i==="next"&&t>=this.maxIndex))}}}},L={mixins:[O,R,W,M],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 j(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,d=s?0:n.length,r=()=>{n.splice(d,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 c=this.getIndex(this.index),a=e.hasClass(this.slides,this.clsActive)&&this.slides[c],p=this.getIndex(t,this.index),l=this.slides[p];if(a===l){r();return}if(this.dir=B(t,c),this.prevIndex=c,this.index=p,a&&!e.trigger(a,"beforeitemhide",[this])||!e.trigger(l,"beforeitemshow",[this,a])){this.index=this.prevIndex,r();return}const o=this._show(a,l,s).then(()=>{a&&e.trigger(a,"itemhidden",[this]),e.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return a&&e.trigger(a,"itemhide",[this]),e.trigger(l,"itemshow",[this]),o},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 B(t,s){return t==="next"?1:t==="previous"||t<s?-1:1}function j(t){return .5*t+300}var F={mixins:[L],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:$,Transitioner:H},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)}}},V={observe:E({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},q={...$,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:h(30),zIndex:-1},{transform:h(),zIndex:0}]:[{transform:h(-100),zIndex:0},{transform:h(),zIndex:-1}]},percent(t,s,i){return i<0?1-g(s):g(t)},translate(t,s){return s<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,s,i){return i>0?1-g(s):g(t)},translate(t,s){return s<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}]}}};const k=e.inBrowser&&CSS.supports("aspect-ratio","1/1");var S={mixins:[f,F,C,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:q},watch:{list(t){t&&k&&e.css(t,{aspectRatio:this.ratio.replace(":","/"),minHeight:this.minHeight||"",maxHeight:this.maxHeight||"",minWidth:"100%",maxWidth:"100%"})}},update:{read(){if(!this.list||k)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
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | https://www.getuikit.com | (c) 2014 - 2023 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)}},C={update:{write(){if(this.stack.length||this.dragging)return;const t=this.getValidIndex();!~this.prevIndex||this.index!==t?this.show(t):this._translate(1,this.prevIndex,this.index)},events:["resize"]}},y={slide:{show(t){return[{transform:c(t*-100)},{transform:c()}]},percent(t){return g(t)},translate(t,e){return[{transform:c(e*-100*t)},{transform:c(e*100*(1-t))}]}}};function g(t){return Math.abs(s.css(t,"transform").split(",")[4]/t.offsetWidth)}function c(t=0,e="%"){return t+=t?e:"",`translate3d(${t}, 0, 0)`}function $(t){return`scale3d(${t}, ${t}, 1)`}function H(t,e,i,{animation:n,easing:a}){const{percent:r,translate:o,show:h=s.noop}=n,m=h(i);let l;return{dir:i,show(d,f=0,x){const I=x?"linear":a;return d-=Math.round(d*s.clamp(f,-1,1)),this.translate(f),v(e,"itemin",{percent:f,duration:d,timing:I,dir:i}),v(t,"itemout",{percent:1-f,duration:d,timing:I,dir:i}),new Promise(J=>{l||(l=J),Promise.all([s.Transition.start(e,m[1],d,I),s.Transition.start(t,m[0],d,I)]).then(()=>{this.reset(),l()},s.noop)})},cancel(){return s.Transition.cancel([e,t])},reset(){for(const d in m[0])s.css([e,t],d,"")},async forward(d,f=this.percent()){return await this.cancel(),this.show(d,f,!0)},translate(d){this.reset();const f=o(d,i);s.css(e,f[1]),s.css(t,f[0]),v(e,"itemtranslatein",{percent:d,dir:i}),v(t,"itemtranslateout",{percent:1-d,dir:i})},percent(){return r(t||e,e,i)},getDistance(){return t==null?void 0:t.offsetWidth}}}function v(t,e,i){s.trigger(t,s.createEvent(e,!1,!1,i))}function T(t,e="update"){t._connected&&t._updates.length&&(t._queued||(t._queued=new Set,s.fastdom.read(()=>{t._connected&&D(t,t._queued),delete t._queued})),t._queued.add(e.type||e))}function D(t,e){for(const{read:i,write:n,events:a=[]}of t._updates){if(!e.has("update")&&!a.some(o=>e.has(o)))continue;let r;i&&(r=i.call(t,t._data,e),r&&s.isPlainObject(r)&&s.assign(t._data,r)),n&&r!==!1&&s.fastdom.write(()=>{t._connected&&n.call(t,t._data,e)})}}function E(t){return z(s.observeResize,t,"resize")}function M(t){return z(s.observeIntersection,t)}function O(t={}){return M({handler:function(e,i){const{targets:n=this.$el,preload:a=5}=t;for(const r of s.toNodes(s.isFunction(n)?n(this):n))s.$$('[loading="lazy"]',r).slice(0,a-1).forEach(o=>s.removeAttr(o,"loading"));for(const r of e.filter(({isIntersecting:o})=>o).map(({target:o})=>o))i.unobserve(r)},...t})}function z(t,e,i){return{observe:t,handler(){T(this,i)},...e}}var P={props:{i18n:Object},data:{i18n:null},methods:{t(t,...e){var i,n,a;let r=0;return((a=((i=this.i18n)==null?void 0:i[t])||((n=this.$options.i18n)==null?void 0:n[t]))==null?void 0:a.replace(/%s/g,()=>e[r++]||""))||""}}},U={props:{autoplay:Boolean,autoplayInterval:Number,pauseOnHover:Boolean},data:{autoplay:!1,autoplayInterval:7e3,pauseOnHover:!0},connected(){s.attr(this.list,"aria-live",this.autoplay?"off":"polite"),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.stack.length||this.draggable&&s.matches(this.$el,":focus-within")||this.pauseOnHover&&s.matches(this.$el,":hover")||this.show("next")},this.autoplayInterval)},stopAutoplay(){clearInterval(this.interval)}}};const w={passive:!1,capture:!0},A={passive:!0,capture:!0},R="touchstart mousedown",b="touchmove mousemove",N="touchend touchcancel mouseup click input scroll";var W={props:{draggable:Boolean},data:{draggable:!0,threshold:10},created(){for(const t of["start","move","end"]){const e=this[t];this[t]=i=>{const n=s.getEventPos(i).x*(s.isRtl?-1:1);this.prevPos=n===this.pos?this.prevPos:this.pos,this.pos=n,e(i)}}},events:[{name:R,passive:!0,delegate(){return`${this.selList} > *`},handler(t){!this.draggable||!s.isTouch(t)&&q(t.target)||s.closest(t.target,s.selInput)||t.button>0||this.length<2||this.start(t)}},{name:"dragstart",handler(t){t.preventDefault()}},{name:b,el(){return this.list},handler:s.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,s.on(document,b,this.move,w),s.on(document,N,this.end,A),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;let{slides:i,prevIndex:n}=this,a=Math.abs(e),r=this.getIndex(n+this.dir),o=this._getDistance(n,r);for(;r!==n&&a>o;)this.drag-=o*this.dir,n=r,a-=o,r=this.getIndex(n+this.dir),o=this._getDistance(n,r);this.percent=a/o;const h=i[n],m=i[r],l=this.index!==r,d=n===r;let f;for(const x of[this.index,this.prevIndex])s.includes([r,n],x)||(s.trigger(i[x],"itemhidden",[this]),d&&(f=!0,this.prevIndex=n));(this.index===n&&this.prevIndex!==n||f)&&s.trigger(i[this.index],"itemshown",[this]),l&&(this.prevIndex=n,this.index=r,!d&&s.trigger(h,"beforeitemhide",[this]),s.trigger(m,"beforeitemshow",[this])),this._transitioner=this._translate(Math.abs(this.percent),h,!d&&m),l&&(!d&&s.trigger(h,"itemhide",[this]),s.trigger(m,"itemshow",[this]))},end(){if(s.off(document,b,this.move,w),s.off(document,N,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=(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},_getDistance(t,e){return this._getTransitioner(t,t!==e&&e).getDistance()||this.slides[t].offsetWidth}}};function q(t){return s.css(t,"userSelect")!=="none"&&s.toArray(t.childNodes).some(e=>e.nodeType===3&&e.textContent.trim())}function _(t,e=t.$el,i=""){if(e.id)return e.id;let n=`${t.$options.id}-${t._uid}${i}`;return s.$(`#${n}`)&&(n=_(t,e,`${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},e)=>s.$(t,e),navChildren(){return s.children(this.nav)},selNavItem:({attrItem:t})=>`[${t}],[data-${t}]`,navItems(t,e){return s.$$(this.selNavItem,e)}},watch:{nav(t,e){s.attr(t,"role","tablist"),e&&this.$emit()},list(t){s.attr(t,"role","presentation")},navChildren(t){s.attr(t,"role","presentation")},navItems(t){for(const e of t){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;let a,r=null;if(s.isNumeric(i)){const o=s.toNumber(i),h=this.slides[o];h&&(h.id||(h.id=_(this,h,`-item-${i}`)),r=h.id),a=this.t("slideX",s.toFloat(i)+1),s.attr(n,"role","tab")}else this.list&&(this.list.id||(this.list.id=_(this,this.list,"-items")),r=this.list.id),a=this.t(i);s.attr(n,{"aria-controls":r,"aria-label":s.attr(n,"aria-label")||a})}},slides(t){t.forEach((e,i)=>s.attr(e,{role:this.nav?"tabpanel":"group","aria-label":this.t("slideLabel",i+1,this.length),"aria-roledescription":this.nav?null:"slide"}))},length(t){const e=this.navChildren.length;if(this.nav&&t!==e){s.empty(this.nav);for(let i=0;i<t;i++)s.append(this.nav,`<li ${this.attrItem}="${i}"><a href></a></li>`)}}},connected(){s.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){s.closest(t.target,"a,button")&&(t.type==="click"||t.keyCode===u.SPACE)&&(t.preventDefault(),this.show(s.data(t.current,this.attrItem)))}},{name:"itemshow",handler:"updateNav"},{name:"keydown",delegate(){return this.selNavItem},handler(t){const{current:e,keyCode:i}=t,n=s.data(e,this.attrItem);if(!s.isNumeric(n))return;let a=i===u.HOME?0:i===u.END?"last":i===u.LEFT?"previous":i===u.RIGHT?"next":-1;~a&&(t.preventDefault(),this.show(a))}}],methods:{updateNav(){const t=this.getValidIndex();for(const e of this.navItems){const i=s.data(e,this.attrItem),n=s.$("a,button",e)||e;if(s.isNumeric(i)){const r=s.toNumber(i)===t;s.toggleClass(e,this.clsActive,r),s.attr(n,{"aria-selected":r,tabindex:r?null:-1}),r&&n&&s.matches(s.parent(e),":focus-within")&&n.focus()}else s.toggleClass(e,"uk-invisible",this.finite&&(i==="previous"&&t===0||i==="next"&&t>=this.maxIndex))}}}},B={mixins:[U,W,L,P],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(){s.removeClass(this.slides,this.clsActive)},computed:{duration:({velocity:t},e)=>F(e.offsetWidth/t),list:({selList:t},e)=>s.$(t,e),maxIndex(){return this.length-1},slides(){return s.children(this.list)},length(){return this.slides.length}},watch:{slides(t,e){e&&this.$emit()}},observe:E(),methods:{show(t,e=!1){var i;if(this.dragging||!this.length)return;const{stack:n}=this,a=e?0:n.length,r=()=>{n.splice(a,1),n.length&&this.show(n.shift(),!0)};if(n[e?"unshift":"push"](t),!e&&n.length>1){n.length===2&&((i=this._transitioner)==null||i.forward(Math.min(this.duration,200)));return}const o=this.getIndex(this.index),h=s.hasClass(this.slides,this.clsActive)&&this.slides[o],m=this.getIndex(t,this.index),l=this.slides[m];if(h===l){r();return}if(this.dir=j(t,o),this.prevIndex=o,this.index=m,h&&!s.trigger(h,"beforeitemhide",[this])||!s.trigger(l,"beforeitemshow",[this,h])){this.index=this.prevIndex,r();return}const d=this._show(h,l,e).then(()=>{h&&s.trigger(h,"itemhidden",[this]),s.trigger(l,"itemshown",[this]),n.shift(),this._transitioner=null,requestAnimationFrame(()=>n.length&&this.show(n.shift(),!0))});return h&&s.trigger(h,"itemhide",[this]),s.trigger(l,"itemshow",[this]),d},getIndex(t=this.index,e=this.index){return s.clamp(s.getIndex(t,this.slides,e,this.finite),0,Math.max(0,this.maxIndex))},getValidIndex(t=this.index,e=this.prevIndex){return this.getIndex(t,e)},_show(t,e,i){if(this._transitioner=this._getTransitioner(t,e,this.dir,{easing:i?e.offsetWidth<600?"cubic-bezier(0.25, 0.46, 0.45, 0.94)":"cubic-bezier(0.165, 0.84, 0.44, 1)":this.easing,...this.transitionOptions}),!i&&!t)return this._translate(1),Promise.resolve();const{length: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,e=this.prevIndex,i=this.index){const n=this._getTransitioner(e===i?!1:e,i);return n.translate(t),n},_getTransitioner(t=this.prevIndex,e=this.index,i=this.dir||1,n=this.transitionOptions){return new this.Transitioner(s.isNumber(t)?this.slides[t]:t,s.isNumber(e)?this.slides[e]:e,i*(s.isRtl?-1:1),n)}}};function j(t,e){return t==="next"?1:t==="previous"||t<e?-1:1}function F(t){return .5*t+300}var V={mixins:[B],props:{animation:String},data:{animation:"slide",clsActivated:"uk-transition-active",Animations:y,Transitioner:H},computed:{animation({animation:t,Animations:e}){return{...e[t]||e.slide,name:t}},transitionOptions(){return{animation:this.animation}}},events:{beforeitemshow({target:t}){s.addClass(t,this.clsActive)},itemshown({target:t}){s.addClass(t,this.clsActivated)},itemhidden({target:t}){s.removeClass(t,this.clsActive,this.clsActivated)}}},G={observe:O({target:({slides:t})=>t,targets:t=>t.getAdjacentSlides()})},X={...y,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:$(1+.5),zIndex:0},{zIndex:-1}]},percent(t){return 1-s.css(t,"opacity")},translate(t){return[{opacity:1-t,transform:$(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,e,i){return i<0?1-g(e):g(t)},translate(t,e){return e<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,e,i){return i>0?1-g(e):g(t)},translate(t,e){return e<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}]}}};const k=s.inBrowser&&CSS.supports("aspect-ratio","1/1");var S={mixins:[p,V,C,G],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:X},watch:{list(t){t&&k&&s.css(t,{aspectRatio:this.ratio.replace(":","/"),minHeight:this.minHeight||"",maxHeight:this.maxHeight||"",minWidth:"100%",maxWidth:"100%"})}},update:{read(){if(!this.list||k)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({height:t}){t>0&&s.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.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | 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,46 @@
|
|
|
6
6
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitSortable = factory(global.UIkit.util));
|
|
7
7
|
})(this, (function (uikitUtil) { 'use strict';
|
|
8
8
|
|
|
9
|
+
function callUpdate(instance, e = "update") {
|
|
10
|
+
if (!instance._connected) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (!instance._updates.length) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (!instance._queued) {
|
|
17
|
+
instance._queued = /* @__PURE__ */ new Set();
|
|
18
|
+
uikitUtil.fastdom.read(() => {
|
|
19
|
+
if (instance._connected) {
|
|
20
|
+
runUpdates(instance, instance._queued);
|
|
21
|
+
}
|
|
22
|
+
delete instance._queued;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
instance._queued.add(e.type || e);
|
|
26
|
+
}
|
|
27
|
+
function runUpdates(instance, types) {
|
|
28
|
+
for (const { read, write, events = [] } of instance._updates) {
|
|
29
|
+
if (!types.has("update") && !events.some((type) => types.has(type))) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
let result;
|
|
33
|
+
if (read) {
|
|
34
|
+
result = read.call(instance, instance._data, types);
|
|
35
|
+
if (result && uikitUtil.isPlainObject(result)) {
|
|
36
|
+
uikitUtil.assign(instance._data, result);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (write && result !== false) {
|
|
40
|
+
uikitUtil.fastdom.write(() => {
|
|
41
|
+
if (instance._connected) {
|
|
42
|
+
write.call(instance, instance._data, types);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
9
49
|
function resize(options) {
|
|
10
50
|
return observe(uikitUtil.observeResize, options, "resize");
|
|
11
51
|
}
|
|
@@ -16,7 +56,7 @@
|
|
|
16
56
|
return {
|
|
17
57
|
observe: observe2,
|
|
18
58
|
handler() {
|
|
19
|
-
this
|
|
59
|
+
callUpdate(this, emit);
|
|
20
60
|
},
|
|
21
61
|
...options
|
|
22
62
|
};
|
|
@@ -354,17 +394,15 @@
|
|
|
354
394
|
handler: "init"
|
|
355
395
|
},
|
|
356
396
|
computed: {
|
|
357
|
-
target()
|
|
358
|
-
return (this.$el.tBodies || [this.$el])[0];
|
|
359
|
-
},
|
|
397
|
+
target: (_, $el) => ($el.tBodies || [$el])[0],
|
|
360
398
|
items() {
|
|
361
399
|
return uikitUtil.children(this.target);
|
|
362
400
|
},
|
|
363
401
|
isEmpty() {
|
|
364
402
|
return uikitUtil.isEmpty(this.items);
|
|
365
403
|
},
|
|
366
|
-
handles({ handle }, el) {
|
|
367
|
-
return handle ? uikitUtil.$$(handle, el) : this.items;
|
|
404
|
+
handles({ handle }, $el) {
|
|
405
|
+
return handle ? uikitUtil.$$(handle, $el) : this.items;
|
|
368
406
|
}
|
|
369
407
|
},
|
|
370
408
|
watch: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.1 | 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 B(n){return y(e.observeMutation,n)}function y(n,s,o){return{observe:n,handler(){this.$emit(o)},...s}}B({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),g({target:({$el:n})=>[n,...e.children(n)]});function C(n){const s=[[]],o=n.some((t,c)=>c&&n[c-1].offsetParent!==t.offsetParent);for(const t of n){if(!e.isVisible(t))continue;const c=u(t,o);for(let a=s.length-1;a>=0;a--){const r=s[a];if(!r[0]){r.push(t);break}const h=u(r[0],o);if(c.top>=h.bottom-1&&c.top!==h.top){s.push([t]);break}if(c.bottom-1>h.top||c.top===h.top){let d=r.length-1;for(;d>=0;d--){const p=u(r[d],o);if(c.left>=p.left)break}r.splice(d+1,0,t);break}if(a===0){s.unshift([t]);break}}}return s}function u(n,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 v="uk-transition-leave",w="uk-transition-enter";function P(n,s,o,t=0){const c=b(s,!0),a={opacity:1},r={opacity:0},h=i=>()=>c===b(s)?i():Promise.reject(),d=h(async()=>{e.addClass(s,v),await Promise.all(S(s).map((i,l)=>new Promise(f=>setTimeout(()=>e.Transition.start(i,r,o/2,"ease").then(f),l*t)))),e.removeClass(s,v)}),p=h(async()=>{const i=e.height(s);e.addClass(s,w),n(),e.css(e.children(s),{opacity:0}),await N();const l=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,i);const m=S(s);e.css(l,r);const R=m.map(async(K,Q)=>{await z(Q*t),await e.Transition.start(K,a,o/2,"ease")});i!==f&&R.push(e.Transition.start(s,{height:f},o/2+m.length*t,"ease")),await Promise.all(R).then(()=>{e.removeClass(s,w),c===b(s)&&(e.css(s,{height:"",alignContent:""}),e.css(l,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,v)?T(s).then(p):e.hasClass(s,w)?T(s).then(d).then(p):d().then(p)}function b(n,s){return s&&(n.dataset.transition=1+b(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 S(n){return C(e.children(n)).flat().filter(e.isInView)}function N(){return new Promise(n=>requestAnimationFrame(n))}function z(n){return new Promise(s=>setTimeout(s,n))}async function A(n,s,o){await $();let t=e.children(s);const c=t.map(f=>x(f,!0)),a={...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,p]=H(s,t,c),i=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,m)=>p[m]&&e.css(f,p[m])),e.css(s,a),e.trigger(s,"scroll"),e.fastdom.flush(),await $();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,i[m]),e.parent(f)===s&&e.css(f,"display",d[m].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),L(s,a)}}function x(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,...I(n)}:!1}function H(n,s,o){const t=s.map((a,r)=>e.parent(a)&&r in o?o[r]?e.isVisible(a)?I(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=e.parent(s[r])===n&&(o[r]||x(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 L(n,s){for(const o in s)e.css(n,o,"")}function I(n){const{height:s,width:o}=e.offset(n);return{height:s,width:o,transform:"",...e.position(n),...e.css(n,["marginTop","marginLeft"])}}function $(){return new Promise(n=>requestAnimationFrame(n))}var M={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"?(...c)=>P(...c,40):o?A:()=>(n(),Promise.resolve()))(n,s,this.duration).catch(e.noop)}}},V={connected(){e.addClass(this.$el,this.$options.id)}},D={mixins:[V,M],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: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 p=this.getSortable(a),i=G(r.target,d,a,s,o,r===p&&n.moved!==d);i!==!1&&(i&&a===i||(r!==p?(p.remove(a),n.moved=d):delete n.moved,r.insert(a,i),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=O(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]),j(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;q();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 E;function j(n){let s=Date.now();E=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)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:p,height:i}=e.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(p>t&&p-35<t)r+=c;else return;if(r>0&&r<h-i)return a.scrollTop=r,!0})},15)}function q(){clearInterval(E)}function O(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 W(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function G(n,s,o,t,c,a){if(!e.children(n).length)return;const r=s.getBoundingClientRect();if(!a)return J(n,o)||c<r.top+r.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=F([r.top,r.bottom],[h.top,h.bottom]),[p,i,l,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],m=h[i]<r[i]?r[i]-h[i]:0;return h[l]<r[l]?m&&p<r[l]+m?!1:s.nextElementSibling:m&&p>r[f]-m?!1:s}function J(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 p=d.getBoundingClientRect();return!F([h.left,h.right],[p.left,p.right])})});return o&&e.remove(s),c}function F(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",D),D});
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | 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(o,s="update"){o._connected&&o._updates.length&&(o._queued||(o._queued=new Set,e.fastdom.read(()=>{o._connected&&R(o,o._queued),delete o._queued})),o._queued.add(s.type||s))}function R(o,s){for(const{read:n,write:t,events:c=[]}of o._updates){if(!s.has("update")&&!c.some(r=>s.has(r)))continue;let a;n&&(a=n.call(o,o._data,s),a&&e.isPlainObject(a)&&e.assign(o._data,a)),t&&a!==!1&&e.fastdom.write(()=>{o._connected&&t.call(o,o._data,s)})}}function B(o){return y(e.observeResize,o,"resize")}function N(o){return y(e.observeMutation,o)}function y(o,s,n){return{observe:o,handler(){g(this,n)},...s}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),B({target:({$el:o})=>[o,...e.children(o)]});function C(o){const s=[[]],n=o.some((t,c)=>c&&o[c-1].offsetParent!==t.offsetParent);for(const t of o){if(!e.isVisible(t))continue;const c=b(t,n);for(let a=s.length-1;a>=0;a--){const r=s[a];if(!r[0]){r.push(t);break}const h=b(r[0],n);if(c.top>=h.bottom-1&&c.top!==h.top){s.push([t]);break}if(c.bottom-1>h.top||c.top===h.top){let d=r.length-1;for(;d>=0;d--){const p=b(r[d],n);if(c.left>=p.left)break}r.splice(d+1,0,t);break}if(a===0){s.unshift([t]);break}}}return s}function b(o,s=!1){let{offsetTop:n,offsetLeft:t,offsetHeight:c,offsetWidth:a}=o;return s&&([n,t]=e.offsetPosition(o)),{top:n,left:t,bottom:n+c,right:t+a}}const w="uk-transition-leave",v="uk-transition-enter";function P(o,s,n,t=0){const c=u(s,!0),a={opacity:1},r={opacity:0},h=l=>()=>c===u(s)?l():Promise.reject(),d=h(async()=>{e.addClass(s,w),await Promise.all(S(s).map((l,i)=>new Promise(f=>setTimeout(()=>e.Transition.start(l,r,n/2,"ease").then(f),i*t)))),e.removeClass(s,w)}),p=h(async()=>{const l=e.height(s);e.addClass(s,v),o(),e.css(e.children(s),{opacity:0}),await z();const i=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,l);const m=S(s);e.css(i,r);const _=m.map(async(Q,X)=>{await q(X*t),await e.Transition.start(Q,a,n/2,"ease")});l!==f&&_.push(e.Transition.start(s,{height:f},n/2+m.length*t,"ease")),await Promise.all(_).then(()=>{e.removeClass(s,v),c===u(s)&&(e.css(s,{height:"",alignContent:""}),e.css(i,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,w)?T(s).then(p):e.hasClass(s,v)?T(s).then(d).then(p):d().then(p)}function u(o,s){return s&&(o.dataset.transition=1+u(o)),e.toNumber(o.dataset.transition)||0}function T(o){return Promise.all(e.children(o).filter(e.Transition.inProgress).map(s=>new Promise(n=>e.once(s,"transitionend transitioncanceled",n))))}function S(o){return C(e.children(o)).flat().filter(e.isInView)}function z(){return new Promise(o=>requestAnimationFrame(o))}function q(o){return new Promise(s=>setTimeout(s,o))}async function A(o,s,n){await D();let t=e.children(s);const c=t.map(f=>x(f,!0)),a={...e.css(s,["height","padding"]),display:"block"};await Promise.all(t.concat(s).map(e.Transition.cancel)),o(),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,p]=H(s,t,c),l=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,m)=>p[m]&&e.css(f,p[m])),e.css(s,a),e.trigger(s,"scroll"),e.fastdom.flush(),await D();const i=t.map((f,m)=>e.parent(f)===s&&e.Transition.start(f,d[m],n,"ease")).concat(e.Transition.start(s,h,n,"ease"));try{await Promise.all(i),t.forEach((f,m)=>{e.attr(f,l[m]),e.parent(f)===s&&e.css(f,"display",d[m].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),L(s,a)}}function x(o,s){const n=e.css(o,"zIndex");return e.isVisible(o)?{display:"",opacity:s?e.css(o,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:n==="auto"?e.index(o):n,...I(o)}:!1}function H(o,s,n){const t=s.map((a,r)=>e.parent(a)&&r in n?n[r]?e.isVisible(a)?I(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=e.parent(s[r])===o&&(n[r]||x(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 L(o,s){for(const n in s)e.css(o,n,"")}function I(o){const{height:s,width:n}=e.offset(o);return{height:s,width:n,transform:"",...e.position(o),...e.css(o,["marginTop","marginLeft"])}}function D(){return new Promise(o=>requestAnimationFrame(o))}var M={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(o,s=this.$el){const n=this.animation;return(n==="fade"?P:n==="delayed-fade"?(...c)=>P(...c,40):n?A:()=>(o(),Promise.resolve()))(o,s,this.duration).catch(e.noop)}}},V={connected(){e.addClass(this.$el,this.$options.id)}},E={mixins:[V,M],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 o of["init","start","move","end"]){const s=this[o];this[o]=n=>{e.assign(this.pos,e.getEventPos(n)),s(n)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target:(o,s)=>(s.tBodies||[s])[0],items(){return e.children(this.target)},isEmpty(){return e.isEmpty(this.items)},handles({handle:o},s){return o?e.$$(o,s):this.items}},watch:{isEmpty(o){e.toggleClass(this.target,this.clsEmpty,o)},handles(o,s){e.css(s,{touchAction:"",userSelect:""}),e.css(o,{touchAction:e.hasTouch?"none":"",userSelect:"none"})}},update:{write(o){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:n},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;e.css(this.drag,{top:n-t,left:s-c});const r=this.getSortable(document.elementFromPoint(s,n));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=G(h,{x:s,y:n});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),l=J(r.target,d,a,s,n,r===p&&o.moved!==d);l!==!1&&(l&&a===l||(r!==p?(p.remove(a),o.moved=d):delete o.moved,r.insert(a,l),this.touched.add(r)))},events:["move"]},methods:{init(o){const{target:s,button:n,defaultPrevented:t}=o,[c]=this.items.filter(a=>e.within(s,a));!c||t||n>0||e.isInput(s)||e.within(s,`.${this.clsNoDrag}`)||this.handle&&!e.within(s,this.handle)||(o.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(o))},start(o){this.drag=W(this.$container,this.placeholder);const{left:s,top:n}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-n}),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]),j(this.pos),this.move(o)},move(o){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(o)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;O();const o=this.getSortable(this.placeholder);this===o?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(o.$el,"added",[o,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:n}of this.touched)for(const t of this.touched)e.removeClass(t.items,s,n);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(o,s){e.addClass(this.items,this.clsItem);const n=()=>s?e.before(s,o):e.append(this.target,o);this.animate(n)},remove(o){e.within(o,this.target)&&this.animate(()=>e.remove(o))},getSortable(o){do{const s=this.$getComponent(o,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(o=e.parent(o))}}};let $;function j(o){let s=Date.now();$=setInterval(()=>{let{x:n,y:t}=o;t+=document.scrollingElement.scrollTop;const c=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(n,o.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:p,height:l}=e.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(p>t&&p-35<t)r+=c;else return;if(r>0&&r<h-l)return a.scrollTop=r,!0})},15)}function O(){clearInterval($)}function W(o,s){let n;if(e.isTag(s,"li","tr")){n=e.$("<div>"),e.append(n,s.cloneNode(!0).children);for(const t of s.getAttributeNames())e.attr(n,t,s.getAttribute(t))}else n=s.cloneNode(!0);return e.append(o,n),e.css(n,"margin","0","important"),e.css(n,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(n.firstElementChild,e.height(s.firstElementChild)),n}function G(o,s){return o[e.findIndex(o,n=>e.pointInRect(s,n.getBoundingClientRect()))]}function J(o,s,n,t,c,a){if(!e.children(o).length)return;const r=s.getBoundingClientRect();if(!a)return K(o,n)||c<r.top+r.height/2?s:s.nextElementSibling;const h=n.getBoundingClientRect(),d=F([r.top,r.bottom],[h.top,h.bottom]),[p,l,i,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],m=h[l]<r[l]?r[l]-h[l]:0;return h[i]<r[i]?m&&p<r[i]+m?!1:s.nextElementSibling:m&&p>r[f]-m?!1:s}function K(o,s){const n=e.children(o).length===1;n&&e.append(o,s);const t=e.children(o),c=t.some((a,r)=>{const h=a.getBoundingClientRect();return t.slice(r+1).some(d=>{const p=d.getBoundingClientRect();return!F([h.left,h.right],[p.left,p.right])})});return n&&e.remove(s),c}function F(o,s){return o[1]>s[0]&&s[1]>o[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",E),E});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | 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')) :
|
|
@@ -127,12 +127,8 @@
|
|
|
127
127
|
clsLeave: "uk-togglabe-leave"
|
|
128
128
|
},
|
|
129
129
|
computed: {
|
|
130
|
-
hasAnimation({ animation })
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
hasTransition({ animation }) {
|
|
134
|
-
return ["slide", "reveal"].some((transition) => util.startsWith(animation[0], transition));
|
|
135
|
-
}
|
|
130
|
+
hasAnimation: ({ animation }) => !!animation[0],
|
|
131
|
+
hasTransition: ({ animation }) => ["slide", "reveal"].some((transition) => util.startsWith(animation[0], transition))
|
|
136
132
|
},
|
|
137
133
|
methods: {
|
|
138
134
|
async toggleElement(targets, toggle, animate) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | 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=`${s.$options.id}-${s._uid}${e}`;return t.$(`#${o}`)&&(o=d(s,i,`${e}-2`)),o}var S={props:{container:Boolean},data:{container:!0},computed:{container({container:s}){return s===!0&&this.$container||s&&t.$(s)}}},A={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:`bottom-${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"],h={element:[this.inset?this.dir:t.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const c in h)h[c].reverse();o.reverse(),n.reverse()}const r=O(s),a=t.dimensions(s);t.css(s,{top:-a.height,left:-a.width}),t.positionAt(s,i,{attach:h,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})=>!!s[0],hasTransition:({animation:s})=>["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${n?"show":"hide"}`,[this]))return Promise.reject();const h=(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 a=()=>{t.removeClass(o,r),t.trigger(o,n?"shown":"hidden",[this])};return h?h.then(a,()=>(t.removeClass(o,r),Promise.reject())):a()})),!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:h,_toggle:r}){var a;const[c="reveal",v="top"]=((a=e[0])==null?void 0:a.split("-"))||[],b=[["left","right"],["top","bottom"]],T=b[t.includes(b[0],v)?0:1],k=T[1]===v,m=["width","height"][b.indexOf(T)],p=`margin-${T[0]}`,w=`margin-${v}`;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),y=t.toFloat(t.css(s,p)),u=t.toFloat(t.css(s,w)),f=l[m]+u;!U&&!i&&(g+=u);const[$]=t.wrapInner(s,"<div>");t.css($,{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};k&&(t.css(s,p,f-g+y),x[p]=i?y:f+y),!k^c==="reveal"&&(t.css($,p,-f+g),t.Transition.start($,{[p]:i?0:-f},o,h));try{await t.Transition.start(s,x,o,h)}finally{t.css(s,j),t.unwrap($.firstChild),i||r(s,!1)}}function N(s,i,e){const{animation:o,duration:n,_toggle:h}=e;return i?(h(s,!0),t.Animation.in(s,o[0],n,e.origin)):t.Animation.out(s,o[1]||o[0],n,e.origin).then(()=>h(s,!1))}const _={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var P={mixins:[S,B,A],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="${this.id}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${this.title}</div> </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"?`${t.flipPosition(o)}-${n}`:`${n}-${t.flipPosition(o)}`;const h=[t.once(document,`keydown ${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",()=>h.forEach(r=>r()),{self:!0})}),await this.toggleElement(this.tooltip,!0)||this.hide()}},events:{focus:"show",blur:"hide",[`${t.pointerEnter} ${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),h=t.offset(i),r=[["left","right"],["top","bottom"]];for(const c of r){if(n[c[0]]>=h[c[1]]){e=c[1];break}if(n[c[1]]<=h[c[0]]){e=c[0];break}}const a=t.includes(r[0],e)?r[1]:r[0];return n[a[0]]===h[a[0]]?o=a[0]:n[a[1]]===h[a[1]]?o=a[1]:o="center",[e,o]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",P),P});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | 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')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.17.
|
|
1
|
+
/*! UIkit 3.17.2-dev.a0d91caa0 | 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:m}=p;o.on(m.upload,"progress",this.progress);for(const c of["loadStart","load","loadEnd","abort"])o.on(m,c.toLowerCase(),this[c]);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(`^${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});
|