uikit 3.20.10-dev.de039bb62 → 3.20.11-dev.3a41e0fa6
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 +15 -3
- package/build/release.js +1 -1
- package/build/scope.js +4 -9
- 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 +2 -7
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +3 -3
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +3 -3
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +6 -6
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +6 -6
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +13 -8
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +6 -6
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +11 -8
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +5 -8
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- 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 +115 -111
- 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 +125 -124
- package/dist/js/uikit.min.js +1 -1
- package/package.json +4 -3
- package/src/js/api/observer.js +2 -2
- package/src/js/components/filter.js +1 -8
- package/src/js/components/internal/slider-transitioner.js +6 -0
- package/src/js/components/sortable.js +7 -9
- package/src/js/core/icon.js +2 -1
- package/src/js/core/svg.js +7 -3
- package/src/js/mixin/media.js +1 -1
- package/src/js/mixin/parallax.js +2 -2
- package/src/js/mixin/slider-parallax.js +5 -0
- package/src/js/mixin/slider.js +2 -2
- package/src/js/util/filter.js +3 -3
- package/src/js/util/selector.js +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.
|
|
1
|
+
/*! UIkit 3.20.11-dev.3a41e0fa6 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -492,11 +492,10 @@
|
|
|
492
492
|
},
|
|
493
493
|
move: throttle(function(e) {
|
|
494
494
|
uikitUtil.assign(this.pos, uikitUtil.getEventPos(e));
|
|
495
|
-
if (this.drag) {
|
|
496
|
-
this.$emit("move");
|
|
497
|
-
} else if (Math.abs(this.pos.x - this.origin.x) > this.threshold || Math.abs(this.pos.y - this.origin.y) > this.threshold) {
|
|
495
|
+
if (!this.drag && (Math.abs(this.pos.x - this.origin.x) > this.threshold || Math.abs(this.pos.y - this.origin.y) > this.threshold)) {
|
|
498
496
|
this.start(e);
|
|
499
497
|
}
|
|
498
|
+
this.$emit("move");
|
|
500
499
|
}),
|
|
501
500
|
end() {
|
|
502
501
|
uikitUtil.off(document, uikitUtil.pointerMove, this.move);
|
|
@@ -656,10 +655,8 @@
|
|
|
656
655
|
return function(...args) {
|
|
657
656
|
if (!throttled) {
|
|
658
657
|
throttled = true;
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
fn.call(this, ...args);
|
|
662
|
-
});
|
|
658
|
+
fn.call(this, ...args);
|
|
659
|
+
requestAnimationFrame(() => throttled = false);
|
|
663
660
|
}
|
|
664
661
|
};
|
|
665
662
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.20.10-dev.de039bb62 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(e,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],b):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=b(e.UIkit.util))})(this,function(e){"use strict";function b(o,s="update"){o._connected&&o._updates.length&&(o._queued||(o._queued=new Set,e.fastdom.read(()=>{o._connected&&z(o,o._queued),delete o._queued})),o._queued.add(s.type||s))}function z(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 q(o){return T(e.observeResize,o,"resize")}function C(o){return T(e.observeMutation,o)}function T(o,s,n){return{observe:o,handler(){b(this,n)},...s}}C({options:{childList:!0}}),C({options:{attributes:!0,attributeFilter:["style"]},target:({$el:o})=>[o,...e.children(o)]}),q({target:({$el:o})=>[o,...e.children(o)]});function S(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=v(t,n);for(let a=s.length-1;a>=0;a--){const r=s[a];if(!r[0]){r.push(t);break}const h=v(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=v(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 v(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}}async function A(o,s,n){await w();let t=e.children(s);const c=t.map(f=>x(f,!0)),a={...e.css(s,["height","padding"]),display:"block"},r=t.concat(s);await Promise.all(r.map(e.Transition.cancel)),e.css(r,"transitionProperty","none"),await o(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.css(r,"transitionProperty","");const h=e.attr(s,"style"),d=e.css(s,["height","padding"]),[p,l]=H(s,t,c),m=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,i)=>l[i]&&e.css(f,l[i])),e.css(s,a),e.trigger(s,"scroll"),await w();const g=t.map((f,i)=>e.parent(f)===s&&e.Transition.start(f,p[i],n,"ease")).concat(e.Transition.start(s,d,n,"ease"));try{await Promise.all(g),t.forEach((f,i)=>{e.attr(f,m[i]),e.parent(f)===s&&e.css(f,"display",p[i].opacity===0?"none":"")}),e.attr(s,"style",h)}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 w(){return new Promise(o=>requestAnimationFrame(o))}const y="uk-transition-leave",P="uk-transition-enter";function E(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,y),await Promise.all(_(s).map((l,m)=>new Promise(g=>setTimeout(()=>e.Transition.start(l,r,n/2,"ease").then(g),m*t)))),e.removeClass(s,y)}),p=h(async()=>{const l=e.height(s);e.addClass(s,P),o(),e.css(e.children(s),{opacity:0}),await w();const m=e.children(s),g=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,l);const f=_(s);e.css(m,r);const i=f.map(async(Q,X)=>{await M(X*t),await e.Transition.start(Q,a,n/2,"ease")});l!==g&&i.push(e.Transition.start(s,{height:g},n/2+f.length*t,"ease")),await Promise.all(i).then(()=>{e.removeClass(s,P),c===u(s)&&(e.css(s,{height:"",alignContent:""}),e.css(m,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,y)?D(s).then(p):e.hasClass(s,P)?D(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 D(o){return Promise.all(e.children(o).filter(e.Transition.inProgress).map(s=>new Promise(n=>e.once(s,"transitionend transitioncanceled",n))))}function _(o){return S(e.children(o)).flat().filter(e.isVisible)}function M(o){return new Promise(s=>setTimeout(s,o))}var R={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(o,s=this.$el){const n=this.animation;return(n==="fade"?E:n==="delayed-fade"?(...c)=>E(...c,40):n?A:()=>(o(),Promise.resolve()))(o,s,this.duration).catch(e.noop)}}},V={connected(){e.addClass(this.$el,this.$options.id)}},F={mixins:[V,R],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:{}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target:(o,s)=>(s.tBodies||[s])[0],items(){return e.children(this.target)},isEmpty(){return!this.items.length},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:"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=W(h,{x:s,y:n});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),l=G(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=>a.contains(s));!c||t||n>0||e.isInput(s)||s.closest(`.${this.clsNoDrag}`)||this.handle&&!s.closest(this.handle)||(o.preventDefault(),this.pos=e.getEventPos(o),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=O(this.$container,this.placeholder);const{left:s,top:n}=e.dimensions(this.placeholder);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]),B(this.pos),this.move(o)},move:K(function(o){e.assign(this.pos,e.getEventPos(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;j();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),s&&s.previousElementSibling!==o?this.animate(()=>e.before(s,o)):!s&&this.target.lastElementChild!==o&&this.animate(()=>e.append(this.target,o))},remove(o){this.target.contains(o)&&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 B(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 j(){clearInterval($)}function O(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 W(o,s){return o[e.findIndex(o,n=>e.pointInRect(s,e.dimensions(n)))]}function G(o,s,n,t,c,a){if(!e.children(o).length)return;const r=e.dimensions(s);if(!a)return J(o,n)||c<r.top+r.height/2?s:s.nextElementSibling;const h=e.dimensions(n),d=N([r.top,r.bottom],[h.top,h.bottom]),[p,l,m,g]=d?[t,"width","left","right"]:[c,"height","top","bottom"],f=h[l]<r[l]?r[l]-h[l]:0;return h[m]<r[m]?f&&p<r[m]+f?!1:s.nextElementSibling:f&&p>r[g]-f?!1:s}function J(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=e.dimensions(a);return t.slice(r+1).some(d=>{const p=e.dimensions(d);return!N([h.left,h.right],[p.left,p.right])})});return n&&e.remove(s),c}function N(o,s){return o[1]>s[0]&&s[1]>o[0]}function K(o){let s;return function(...n){s||(s=!0,requestAnimationFrame(()=>{s=!1,o.call(this,...n)}))}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",F),F});
|
|
1
|
+
/*! UIkit 3.20.11-dev.3a41e0fa6 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(e,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],b):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=b(e.UIkit.util))})(this,function(e){"use strict";function b(o,s="update"){o._connected&&o._updates.length&&(o._queued||(o._queued=new Set,e.fastdom.read(()=>{o._connected&&z(o,o._queued),delete o._queued})),o._queued.add(s.type||s))}function z(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 q(o){return T(e.observeResize,o,"resize")}function C(o){return T(e.observeMutation,o)}function T(o,s,n){return{observe:o,handler(){b(this,n)},...s}}C({options:{childList:!0}}),C({options:{attributes:!0,attributeFilter:["style"]},target:({$el:o})=>[o,...e.children(o)]}),q({target:({$el:o})=>[o,...e.children(o)]});function S(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=v(t,n);for(let a=s.length-1;a>=0;a--){const r=s[a];if(!r[0]){r.push(t);break}const h=v(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=v(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 v(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}}async function A(o,s,n){await w();let t=e.children(s);const c=t.map(f=>x(f,!0)),a={...e.css(s,["height","padding"]),display:"block"},r=t.concat(s);await Promise.all(r.map(e.Transition.cancel)),e.css(r,"transitionProperty","none"),await o(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.css(r,"transitionProperty","");const h=e.attr(s,"style"),d=e.css(s,["height","padding"]),[p,l]=H(s,t,c),m=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,i)=>l[i]&&e.css(f,l[i])),e.css(s,a),e.trigger(s,"scroll"),await w();const g=t.map((f,i)=>e.parent(f)===s&&e.Transition.start(f,p[i],n,"ease")).concat(e.Transition.start(s,d,n,"ease"));try{await Promise.all(g),t.forEach((f,i)=>{e.attr(f,m[i]),e.parent(f)===s&&e.css(f,"display",p[i].opacity===0?"none":"")}),e.attr(s,"style",h)}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 w(){return new Promise(o=>requestAnimationFrame(o))}const y="uk-transition-leave",P="uk-transition-enter";function E(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,y),await Promise.all(_(s).map((l,m)=>new Promise(g=>setTimeout(()=>e.Transition.start(l,r,n/2,"ease").then(g),m*t)))),e.removeClass(s,y)}),p=h(async()=>{const l=e.height(s);e.addClass(s,P),o(),e.css(e.children(s),{opacity:0}),await w();const m=e.children(s),g=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,l);const f=_(s);e.css(m,r);const i=f.map(async(Q,X)=>{await M(X*t),await e.Transition.start(Q,a,n/2,"ease")});l!==g&&i.push(e.Transition.start(s,{height:g},n/2+f.length*t,"ease")),await Promise.all(i).then(()=>{e.removeClass(s,P),c===u(s)&&(e.css(s,{height:"",alignContent:""}),e.css(m,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,y)?D(s).then(p):e.hasClass(s,P)?D(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 D(o){return Promise.all(e.children(o).filter(e.Transition.inProgress).map(s=>new Promise(n=>e.once(s,"transitionend transitioncanceled",n))))}function _(o){return S(e.children(o)).flat().filter(e.isVisible)}function M(o){return new Promise(s=>setTimeout(s,o))}var R={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(o,s=this.$el){const n=this.animation;return(n==="fade"?E:n==="delayed-fade"?(...c)=>E(...c,40):n?A:()=>(o(),Promise.resolve()))(o,s,this.duration).catch(e.noop)}}},V={connected(){e.addClass(this.$el,this.$options.id)}},F={mixins:[V,R],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:{}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target:(o,s)=>(s.tBodies||[s])[0],items(){return e.children(this.target)},isEmpty(){return!this.items.length},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:"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=W(h,{x:s,y:n});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),l=G(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=>a.contains(s));!c||t||n>0||e.isInput(s)||s.closest(`.${this.clsNoDrag}`)||this.handle&&!s.closest(this.handle)||(o.preventDefault(),this.pos=e.getEventPos(o),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=O(this.$container,this.placeholder);const{left:s,top:n}=e.dimensions(this.placeholder);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]),B(this.pos),this.move(o)},move:K(function(o){e.assign(this.pos,e.getEventPos(o)),!this.drag&&(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(o),this.$emit("move")}),end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;j();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),s&&s.previousElementSibling!==o?this.animate(()=>e.before(s,o)):!s&&this.target.lastElementChild!==o&&this.animate(()=>e.append(this.target,o))},remove(o){this.target.contains(o)&&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 B(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 j(){clearInterval($)}function O(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 W(o,s){return o[e.findIndex(o,n=>e.pointInRect(s,e.dimensions(n)))]}function G(o,s,n,t,c,a){if(!e.children(o).length)return;const r=e.dimensions(s);if(!a)return J(o,n)||c<r.top+r.height/2?s:s.nextElementSibling;const h=e.dimensions(n),d=N([r.top,r.bottom],[h.top,h.bottom]),[p,l,m,g]=d?[t,"width","left","right"]:[c,"height","top","bottom"],f=h[l]<r[l]?r[l]-h[l]:0;return h[m]<r[m]?f&&p<r[m]+f?!1:s.nextElementSibling:f&&p>r[g]-f?!1:s}function J(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=e.dimensions(a);return t.slice(r+1).some(d=>{const p=e.dimensions(d);return!N([h.left,h.right],[p.left,p.right])})});return n&&e.remove(s),c}function N(o,s){return o[1]>s[0]&&s[1]>o[0]}function K(o){let s;return function(...n){s||(s=!0,o.call(this,...n),requestAnimationFrame(()=>s=!1))}}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",F),F});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.
|
|
1
|
+
/*! UIkit 3.20.11-dev.3a41e0fa6 | https://www.getuikit.com | (c) 2014 - 2024 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.20.
|
|
1
|
+
/*! UIkit 3.20.11-dev.3a41e0fa6 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitTooltip=p(t.UIkit.util))})(this,function(t){"use strict";function p(s,i=[]){try{return s?t.startsWith(s,"{")?JSON.parse(s):i.length&&!t.includes(s,":")?{[i[0]]:s}:s.split(";").reduce((o,e)=>{const[n,r]=e.split(/:(.*)/);return n&&!t.isUndefined(r)&&(o[n.trim()]=r.trim()),o},{}):{}}catch{return{}}}t.memoize((s,i)=>{const o=Object.keys(i),e=o.concat(s).map(n=>[t.hyphenate(n),`data-${t.hyphenate(n)}`]).flat();return{attributes:o,filter:e}});let C=1;function S(s,i=null){return(i==null?void 0:i.id)||`${s.$options.id}-${C++}`}var A={props:{container:Boolean},data:{container:!0},computed:{container({container:s}){return s===!0&&this.$container||s&&t.$(s)}}},B={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,o){let e=[this.getPositionOffset(s),this.getShiftOffset(s)];const n=[this.flip&&"flip",this.shift&&"shift"],r={element:[this.inset?this.dir:t.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const a in r)r[a].reverse();e.reverse(),n.reverse()}const h=D(s),c=t.dimensions(s);t.css(s,{top:-c.height,left:-c.width}),t.positionAt(s,i,{attach:r,offset:e,boundary:o,placement:n,viewportOffset:this.getViewportOffset(s)}),h()},getPositionOffset(s=this.$el){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=this.$el){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 D(s){const i=t.scrollParent(s),{scrollTop:o}=i;return()=>{o!==i.scrollTop&&(i.scrollTop=o)}}var I={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-togglable-enter",clsLeave:"uk-togglable-leave"},computed:{hasAnimation:({animation:s})=>!!s[0],hasTransition:({animation:s})=>["slide","reveal"].some(i=>t.startsWith(s[0],i))},methods:{async toggleElement(s,i,o){try{return await Promise.all(t.toNodes(s).map(e=>{const n=t.isBoolean(i)?i:!this.isToggled(e);if(!t.trigger(e,`before${n?"show":"hide"}`,[this]))return Promise.reject();const r=(t.isFunction(o)?o:o===!1||!this.hasAnimation?N:this.hasTransition?F:L)(e,n,this),h=n?this.clsEnter:this.clsLeave;t.addClass(e,h),t.trigger(e,n?"show":"hide",[this]);const c=()=>{t.removeClass(e,h),t.trigger(e,n?"shown":"hidden",[this])};return r?r.then(c,()=>(t.removeClass(e,h),Promise.reject())):c()})),!0}catch{return!1}},isToggled(s=this.$el){return s=t.toNode(s),t.hasClass(s,this.clsEnter)?!0:t.hasClass(s,this.clsLeave)?!1:this.cls?t.hasClass(s,this.cls.split(" ")[0]):t.isVisible(s)},_toggle(s,i){if(!s)return;i=!!i;let o;this.cls?(o=t.includes(this.cls," ")||i!==t.hasClass(s,this.cls),o&&t.toggleClass(s,this.cls,t.includes(this.cls," ")?void 0:i)):(o=i===s.hidden,o&&(s.hidden=!i)),t.$$("[autofocus]",s).some(e=>t.isVisible(e)?e.focus()||!0:e.blur()),o&&t.trigger(s,"toggled",[i,this])}}};function N(s,i,{_toggle:o}){return t.Animation.cancel(s),t.Transition.cancel(s),o(s,i)}async function F(s,i,{animation:o,duration:e,velocity:n,transition:r,_toggle:h}){var c;const[a="reveal",$="top"]=((c=o[0])==null?void 0:c.split("-"))||[],b=[["left","right"],["top","bottom"]],T=b[t.includes(b[0],$)?0:1],P=T[1]===$,m=["width","height"][b.indexOf(T)],d=`margin-${T[0]}`,v=`margin-${$}`;let l=t.dimensions(s)[m];const H=t.Transition.inProgress(s);await t.Transition.cancel(s),i&&h(s,!0);const V=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",d,v].map(O=>[O,s.style[O]])),g=t.dimensions(s),y=t.toFloat(t.css(s,d)),k=t.toFloat(t.css(s,v)),f=g[m]+k;!H&&!i&&(l+=k);const[w]=t.wrapInner(s,"<div>");t.css(w,{boxSizing:"border-box",height:g.height,width:g.width,...t.css(s,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",v])}),t.css(s,{padding:0,border:0,minWidth:0,minHeight:0,[v]:0,width:g.width,height:g.height,overflow:"hidden",[m]:l});const x=l/f;e=(n*f+e)*(i?1-x:x);const E={[m]:i?f:0};P&&(t.css(s,d,f-l+y),E[d]=i?y:f+y),!P^a==="reveal"&&(t.css(w,d,-f+l),t.Transition.start(w,{[d]:i?0:-f},e,r));try{await t.Transition.start(s,E,e,r)}finally{t.css(s,V),t.unwrap(w.firstChild),i||h(s,!1)}}function L(s,i,o){const{animation:e,duration:n,_toggle:r}=o;return i?(r(s,!0),t.Animation.in(s,e[0],n,o.origin)):t.Animation.out(s,e[1]||e[0],n,o.origin).then(()=>r(s,!1))}const U={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var u={mixins:[A,I,B],data:{pos:"top",animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},connected(){j(this.$el)},disconnected(){this.hide()},methods:{show(){if(this.isToggled(this.tooltip||null))return;const{delay:s=0,title:i}=_(this.$options);if(!i)return;const o=t.attr(this.$el,"title"),e=t.on(this.$el,["blur",t.pointerLeave],r=>!t.isTouch(r)&&this.hide());this.reset=()=>{t.attr(this.$el,{title:o,"aria-describedby":null}),e()};const n=S(this);t.attr(this.$el,{title:null,"aria-describedby":n}),clearTimeout(this.showTimer),this.showTimer=setTimeout(()=>this._show(i,n),s)},async hide(){var s;t.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&await this.toggleElement(this.tooltip,!1,!1),(s=this.reset)==null||s.call(this),t.remove(this.tooltip),this.tooltip=null)},async _show(s,i){this.tooltip=t.append(this.container,`<div id="${i}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${s}</div> </div>`),t.on(this.tooltip,"toggled",(o,e)=>{if(!e)return;const n=()=>this.positionAt(this.tooltip,this.$el);n();const[r,h]=W(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?`${t.flipPosition(r)}-${h}`:`${h}-${t.flipPosition(r)}`;const c=[t.once(document,`keydown ${t.pointerDown}`,this.hide,!1,a=>a.type===t.pointerDown&&!this.$el.contains(a.target)||a.type==="keydown"&&a.keyCode===U.ESC),t.on([document,...t.overflowParents(this.$el)],"scroll",n,{passive:!0})];t.once(this.tooltip,"hide",()=>c.forEach(a=>a()),{self:!0})}),await this.toggleElement(this.tooltip,!0)||this.hide()}},events:{[`focus ${t.pointerEnter} ${t.pointerDown}`](s){(!t.isTouch(s)||s.type===t.pointerDown)&&this.show()}}};function j(s){t.isFocusable(s)||t.attr(s,"tabindex","0")}function W(s,i,[o,e]){const n=t.offset(s),r=t.offset(i),h=[["left","right"],["top","bottom"]];for(const a of h){if(n[a[0]]>=r[a[1]]){o=a[1];break}if(n[a[1]]<=r[a[0]]){o=a[0];break}}return e=(t.includes(h[0],o)?h[1]:h[0]).find(a=>n[a]===r[a])||"center",[o,e]}function _(s){const{el:i,id:o,data:e}=s;return["delay","title"].reduce((n,r)=>({[r]:t.data(i,r),...n}),{...p(t.data(i,o),["title"]),...e})}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",u),u});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.
|
|
1
|
+
/*! UIkit 3.20.11-dev.3a41e0fa6 | https://www.getuikit.com | (c) 2014 - 2024 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.20.
|
|
1
|
+
/*! UIkit 3.20.11-dev.3a41e0fa6 | https://www.getuikit.com | (c) 2014 - 2024 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 s,a,t;let n=0;return((t=((s=this.i18n)==null?void 0:s[e])||((a=this.$options.i18n)==null?void 0:a[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 a of e){if(this.maxSize&&this.maxSize*1e3<a.size){this.fail(this.t("invalidSize",this.maxSize));return}if(this.allow&&!h(this.allow,a.name)){this.fail(this.t("invalidName",this.allow));return}if(this.mime&&!h(this.mime,a.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),s=async a=>{const t=new FormData;a.forEach(n=>t.append(this.name,n));for(const n in this.params)t.append(n,this.params[n]);try{const n=await u(this.url,{data:t,method:this.method,responseType:this.type,beforeSend:p=>{const{xhr:c}=p;o.on(c.upload,"progress",this.progress);for(const m of["loadStart","load","loadEnd","abort"])o.on(c,m.toLowerCase(),this[m]);return this.beforeSend(p)}});this.complete(n),r.length?await s(r.shift()):this.completeAll(n)}catch(n){this.error(n)}};await s(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 s=[];for(let a=0;a<e.length;a+=r)s.push(e.slice(a,a+r));return s}function l(e){e.preventDefault(),e.stopPropagation()}async function u(e,r){const s={data:null,method:"GET",headers:{},xhr:new XMLHttpRequest,beforeSend:o.noop,responseType:"",...r};return await s.beforeSend(s),g(e,s)}function g(e,r){return new Promise((s,a)=>{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?s(t):a(o.assign(Error(t.statusText),{xhr:t,status:t.status}))}),o.on(t,"error",()=>a(o.assign(Error("Network Error"),{xhr:t}))),o.on(t,"timeout",()=>a(o.assign(Error("Network Timeout"),{xhr:t}))),t.send(r.data)})}return typeof window<"u"&&window.UIkit&&window.UIkit.component("upload",d),d});
|
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.
|
|
1
|
+
/*! UIkit 3.20.11-dev.3a41e0fa6 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -348,9 +348,9 @@
|
|
|
348
348
|
}
|
|
349
349
|
function getTargetedElement(el) {
|
|
350
350
|
if (isSameSiteAnchor(el)) {
|
|
351
|
-
|
|
352
|
-
const id = decodeURIComponent(
|
|
353
|
-
return
|
|
351
|
+
const { hash, ownerDocument } = toNode(el);
|
|
352
|
+
const id = decodeURIComponent(hash).slice(1);
|
|
353
|
+
return ownerDocument.getElementById(id) || ownerDocument.getElementsByName(id)[0];
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
|
|
@@ -389,9 +389,9 @@
|
|
|
389
389
|
};
|
|
390
390
|
});
|
|
391
391
|
const parsePositionSelector = memoize((selector) => {
|
|
392
|
-
selector = selector.
|
|
392
|
+
selector = selector.slice(1).trim();
|
|
393
393
|
const index2 = selector.indexOf(" ");
|
|
394
|
-
return ~index2 ? [selector.
|
|
394
|
+
return ~index2 ? [selector.slice(0, index2), selector.slice(index2 + 1)] : [selector, ""];
|
|
395
395
|
});
|
|
396
396
|
function _query(selector, context = document, queryFn) {
|
|
397
397
|
if (!selector || !isString(selector)) {
|
|
@@ -1866,7 +1866,7 @@
|
|
|
1866
1866
|
}
|
|
1867
1867
|
const key = `_observe${instance._observers.length}`;
|
|
1868
1868
|
if (isFunction(target) && !hasOwn(instance, key)) {
|
|
1869
|
-
registerComputed(instance, key, () => target.call(instance, instance));
|
|
1869
|
+
registerComputed(instance, key, () => toNodes(target.call(instance, instance)));
|
|
1870
1870
|
}
|
|
1871
1871
|
handler = isString(handler) ? instance[handler] : handler.bind(instance);
|
|
1872
1872
|
if (isFunction(options)) {
|
|
@@ -2164,7 +2164,7 @@
|
|
|
2164
2164
|
};
|
|
2165
2165
|
App.util = util;
|
|
2166
2166
|
App.options = {};
|
|
2167
|
-
App.version = "3.20.
|
|
2167
|
+
App.version = "3.20.11-dev.3a41e0fa6";
|
|
2168
2168
|
|
|
2169
2169
|
const PREFIX = "uk-";
|
|
2170
2170
|
const DATA = "__uikit__";
|
|
@@ -4416,6 +4416,111 @@
|
|
|
4416
4416
|
dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));
|
|
4417
4417
|
}
|
|
4418
4418
|
|
|
4419
|
+
function getMaxPathLength(el) {
|
|
4420
|
+
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
4421
|
+
}
|
|
4422
|
+
|
|
4423
|
+
var svg = {
|
|
4424
|
+
mixins: [Svg],
|
|
4425
|
+
args: "src",
|
|
4426
|
+
props: {
|
|
4427
|
+
src: String,
|
|
4428
|
+
icon: String,
|
|
4429
|
+
attributes: "list",
|
|
4430
|
+
strokeAnimation: Boolean
|
|
4431
|
+
},
|
|
4432
|
+
data: {
|
|
4433
|
+
strokeAnimation: false
|
|
4434
|
+
},
|
|
4435
|
+
observe: [
|
|
4436
|
+
mutation({
|
|
4437
|
+
async handler() {
|
|
4438
|
+
const svg = await this.svg;
|
|
4439
|
+
if (svg) {
|
|
4440
|
+
applyAttributes.call(this, svg);
|
|
4441
|
+
}
|
|
4442
|
+
},
|
|
4443
|
+
options: {
|
|
4444
|
+
attributes: true,
|
|
4445
|
+
attributeFilter: ["id", "class", "style"]
|
|
4446
|
+
}
|
|
4447
|
+
})
|
|
4448
|
+
],
|
|
4449
|
+
async connected() {
|
|
4450
|
+
if (includes(this.src, "#")) {
|
|
4451
|
+
[this.src, this.icon] = this.src.split("#");
|
|
4452
|
+
}
|
|
4453
|
+
const svg = await this.svg;
|
|
4454
|
+
if (svg) {
|
|
4455
|
+
applyAttributes.call(this, svg);
|
|
4456
|
+
if (this.strokeAnimation) {
|
|
4457
|
+
applyAnimation(svg);
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4460
|
+
},
|
|
4461
|
+
methods: {
|
|
4462
|
+
async getSvg() {
|
|
4463
|
+
if (isTag(this.$el, "img") && !this.$el.complete && this.$el.loading === "lazy") {
|
|
4464
|
+
await new Promise((resolve) => once(this.$el, "load", resolve));
|
|
4465
|
+
}
|
|
4466
|
+
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject("SVG not found.");
|
|
4467
|
+
}
|
|
4468
|
+
}
|
|
4469
|
+
};
|
|
4470
|
+
function applyAttributes(el) {
|
|
4471
|
+
const { $el } = this;
|
|
4472
|
+
addClass(el, attr($el, "class"), "uk-svg");
|
|
4473
|
+
for (let i = 0; i < $el.style.length; i++) {
|
|
4474
|
+
const prop = $el.style[i];
|
|
4475
|
+
css(el, prop, css($el, prop));
|
|
4476
|
+
}
|
|
4477
|
+
for (const attribute in this.attributes) {
|
|
4478
|
+
const [prop, value] = this.attributes[attribute].split(":", 2);
|
|
4479
|
+
attr(el, prop, value);
|
|
4480
|
+
}
|
|
4481
|
+
if (!this.$el.id) {
|
|
4482
|
+
removeAttr(el, "id");
|
|
4483
|
+
}
|
|
4484
|
+
}
|
|
4485
|
+
const loadSVG = memoize(async (src) => {
|
|
4486
|
+
if (src) {
|
|
4487
|
+
if (startsWith(src, "data:")) {
|
|
4488
|
+
return decodeURIComponent(src.split(",")[1]);
|
|
4489
|
+
} else {
|
|
4490
|
+
return (await fetch(src)).text();
|
|
4491
|
+
}
|
|
4492
|
+
} else {
|
|
4493
|
+
return Promise.reject();
|
|
4494
|
+
}
|
|
4495
|
+
});
|
|
4496
|
+
function parseSVG(svg, icon) {
|
|
4497
|
+
if (icon && includes(svg, "<symbol")) {
|
|
4498
|
+
svg = parseSymbols(svg)[icon] || svg;
|
|
4499
|
+
}
|
|
4500
|
+
return stringToSvg(svg);
|
|
4501
|
+
}
|
|
4502
|
+
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
4503
|
+
const parseSymbols = memoize(function(svg) {
|
|
4504
|
+
const symbols = {};
|
|
4505
|
+
symbolRe.lastIndex = 0;
|
|
4506
|
+
let match;
|
|
4507
|
+
while (match = symbolRe.exec(svg)) {
|
|
4508
|
+
symbols[match[3]] = `<svg ${match[1]}svg>`;
|
|
4509
|
+
}
|
|
4510
|
+
return symbols;
|
|
4511
|
+
});
|
|
4512
|
+
function applyAnimation(el) {
|
|
4513
|
+
const length = getMaxPathLength(el);
|
|
4514
|
+
if (length) {
|
|
4515
|
+
css(el, "--uk-animation-stroke", length);
|
|
4516
|
+
}
|
|
4517
|
+
}
|
|
4518
|
+
function stringToSvg(string) {
|
|
4519
|
+
const container = document.createElement("template");
|
|
4520
|
+
container.innerHTML = string;
|
|
4521
|
+
return container.content.firstElementChild;
|
|
4522
|
+
}
|
|
4523
|
+
|
|
4419
4524
|
const icons = {
|
|
4420
4525
|
spinner,
|
|
4421
4526
|
totop,
|
|
@@ -4586,7 +4691,7 @@
|
|
|
4586
4691
|
return null;
|
|
4587
4692
|
}
|
|
4588
4693
|
if (!parsed[icon]) {
|
|
4589
|
-
parsed[icon] =
|
|
4694
|
+
parsed[icon] = stringToSvg(icons[applyRtl(icon)] || icons[icon]);
|
|
4590
4695
|
}
|
|
4591
4696
|
return parsed[icon].cloneNode(true);
|
|
4592
4697
|
}
|
|
@@ -4858,7 +4963,7 @@
|
|
|
4858
4963
|
function toMedia(value, element) {
|
|
4859
4964
|
if (isString(value)) {
|
|
4860
4965
|
if (startsWith(value, "@")) {
|
|
4861
|
-
value = toFloat(css(element, `--uk-breakpoint-${value.
|
|
4966
|
+
value = toFloat(css(element, `--uk-breakpoint-${value.slice(1)}`));
|
|
4862
4967
|
} else if (isNaN(value)) {
|
|
4863
4968
|
return value;
|
|
4864
4969
|
}
|
|
@@ -6055,107 +6160,6 @@
|
|
|
6055
6160
|
}
|
|
6056
6161
|
}
|
|
6057
6162
|
|
|
6058
|
-
function getMaxPathLength(el) {
|
|
6059
|
-
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
6060
|
-
}
|
|
6061
|
-
|
|
6062
|
-
var svg = {
|
|
6063
|
-
mixins: [Svg],
|
|
6064
|
-
args: "src",
|
|
6065
|
-
props: {
|
|
6066
|
-
src: String,
|
|
6067
|
-
icon: String,
|
|
6068
|
-
attributes: "list",
|
|
6069
|
-
strokeAnimation: Boolean
|
|
6070
|
-
},
|
|
6071
|
-
data: {
|
|
6072
|
-
strokeAnimation: false
|
|
6073
|
-
},
|
|
6074
|
-
observe: [
|
|
6075
|
-
mutation({
|
|
6076
|
-
async handler() {
|
|
6077
|
-
const svg = await this.svg;
|
|
6078
|
-
if (svg) {
|
|
6079
|
-
applyAttributes.call(this, svg);
|
|
6080
|
-
}
|
|
6081
|
-
},
|
|
6082
|
-
options: {
|
|
6083
|
-
attributes: true,
|
|
6084
|
-
attributeFilter: ["id", "class", "style"]
|
|
6085
|
-
}
|
|
6086
|
-
})
|
|
6087
|
-
],
|
|
6088
|
-
async connected() {
|
|
6089
|
-
if (includes(this.src, "#")) {
|
|
6090
|
-
[this.src, this.icon] = this.src.split("#");
|
|
6091
|
-
}
|
|
6092
|
-
const svg = await this.svg;
|
|
6093
|
-
if (svg) {
|
|
6094
|
-
applyAttributes.call(this, svg);
|
|
6095
|
-
if (this.strokeAnimation) {
|
|
6096
|
-
applyAnimation(svg);
|
|
6097
|
-
}
|
|
6098
|
-
}
|
|
6099
|
-
},
|
|
6100
|
-
methods: {
|
|
6101
|
-
async getSvg() {
|
|
6102
|
-
if (isTag(this.$el, "img") && !this.$el.complete && this.$el.loading === "lazy") {
|
|
6103
|
-
await new Promise((resolve) => once(this.$el, "load", resolve));
|
|
6104
|
-
}
|
|
6105
|
-
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject("SVG not found.");
|
|
6106
|
-
}
|
|
6107
|
-
}
|
|
6108
|
-
};
|
|
6109
|
-
function applyAttributes(el) {
|
|
6110
|
-
const { $el } = this;
|
|
6111
|
-
addClass(el, attr($el, "class"), "uk-svg");
|
|
6112
|
-
for (let i = 0; i < $el.style.length; i++) {
|
|
6113
|
-
const prop = $el.style[i];
|
|
6114
|
-
css(el, prop, css($el, prop));
|
|
6115
|
-
}
|
|
6116
|
-
for (const attribute in this.attributes) {
|
|
6117
|
-
const [prop, value] = this.attributes[attribute].split(":", 2);
|
|
6118
|
-
attr(el, prop, value);
|
|
6119
|
-
}
|
|
6120
|
-
if (!this.$el.id) {
|
|
6121
|
-
removeAttr(el, "id");
|
|
6122
|
-
}
|
|
6123
|
-
}
|
|
6124
|
-
const loadSVG = memoize(async (src) => {
|
|
6125
|
-
if (src) {
|
|
6126
|
-
if (startsWith(src, "data:")) {
|
|
6127
|
-
return decodeURIComponent(src.split(",")[1]);
|
|
6128
|
-
} else {
|
|
6129
|
-
return (await fetch(src)).text();
|
|
6130
|
-
}
|
|
6131
|
-
} else {
|
|
6132
|
-
return Promise.reject();
|
|
6133
|
-
}
|
|
6134
|
-
});
|
|
6135
|
-
function parseSVG(svg, icon) {
|
|
6136
|
-
if (icon && includes(svg, "<symbol")) {
|
|
6137
|
-
svg = parseSymbols(svg)[icon] || svg;
|
|
6138
|
-
}
|
|
6139
|
-
svg = $(svg.substr(svg.indexOf("<svg")));
|
|
6140
|
-
return (svg == null ? void 0 : svg.hasChildNodes()) && svg;
|
|
6141
|
-
}
|
|
6142
|
-
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
6143
|
-
const parseSymbols = memoize(function(svg) {
|
|
6144
|
-
const symbols = {};
|
|
6145
|
-
symbolRe.lastIndex = 0;
|
|
6146
|
-
let match;
|
|
6147
|
-
while (match = symbolRe.exec(svg)) {
|
|
6148
|
-
symbols[match[3]] = `<svg ${match[1]}svg>`;
|
|
6149
|
-
}
|
|
6150
|
-
return symbols;
|
|
6151
|
-
});
|
|
6152
|
-
function applyAnimation(el) {
|
|
6153
|
-
const length = getMaxPathLength(el);
|
|
6154
|
-
if (length) {
|
|
6155
|
-
css(el, "--uk-animation-stroke", length);
|
|
6156
|
-
}
|
|
6157
|
-
}
|
|
6158
|
-
|
|
6159
6163
|
const selDisabled = ".uk-disabled *, .uk-disabled, [disabled]";
|
|
6160
6164
|
var Switcher = {
|
|
6161
6165
|
mixins: [Togglable],
|