uikit 3.17.8 → 3.17.9-dev.337e68f15

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +16 -2
  2. package/dist/css/uikit-core-rtl.css +1 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -1
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +2 -2
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +15 -7
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +15 -7
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +2 -2
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +22 -26
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +22 -26
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +12 -4
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +22 -26
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +12 -4
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +4 -4
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +47 -31
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +74 -71
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +104 -107
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +12 -12
  43. package/src/js/api/component.js +2 -2
  44. package/src/js/api/events.js +1 -6
  45. package/src/js/api/instance.js +6 -3
  46. package/src/js/api/observables.js +2 -2
  47. package/src/js/api/options.js +15 -14
  48. package/src/js/api/props.js +32 -18
  49. package/src/js/components/filter.js +1 -2
  50. package/src/js/components/notification.js +1 -2
  51. package/src/js/components/sortable.js +4 -5
  52. package/src/js/components/tooltip.js +30 -35
  53. package/src/js/core/accordion.js +1 -2
  54. package/src/js/core/drop.js +23 -20
  55. package/src/js/core/dropnav.js +2 -3
  56. package/src/js/core/form-custom.js +5 -5
  57. package/src/js/core/icon.js +5 -6
  58. package/src/js/core/navbar.js +1 -2
  59. package/src/js/core/overflow-auto.js +3 -3
  60. package/src/js/core/scroll.js +1 -2
  61. package/src/js/core/scrollspy-nav.js +1 -2
  62. package/src/js/core/sticky.js +2 -5
  63. package/src/js/core/switcher.js +10 -12
  64. package/src/js/core/tab.js +2 -2
  65. package/src/js/core/toggle.js +3 -5
  66. package/src/js/mixin/animate.js +7 -7
  67. package/src/js/mixin/internal/animate-fade.js +2 -2
  68. package/src/js/mixin/modal.js +4 -6
  69. package/src/js/mixin/slider-drag.js +1 -2
  70. package/src/js/mixin/slider-nav.js +7 -8
  71. package/src/js/mixin/togglable.js +8 -8
  72. package/src/js/util/dimensions.js +4 -4
  73. package/src/js/util/event.js +6 -7
  74. package/src/js/util/lang.js +11 -11
  75. package/src/js/util/position.js +1 -2
  76. package/src/js/util/selector.js +2 -2
  77. package/src/js/util/style.js +2 -2
  78. package/src/js/util/viewport.js +20 -16
@@ -1 +1 @@
1
- /*! UIkit 3.17.8 | 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(s=>e.isVisible(s))}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
+ /*! UIkit 3.17.9-dev.337e68f15 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(s,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(s=typeof globalThis<"u"?globalThis:s||self,s.UIkitSortable=g(s.UIkit.util))})(this,function(s){"use strict";function g(o,e="update"){o._connected&&o._updates.length&&(o._queued||(o._queued=new Set,s.fastdom.read(()=>{o._connected&&R(o,o._queued),delete o._queued})),o._queued.add(e.type||e))}function R(o,e){for(const{read:n,write:t,events:c=[]}of o._updates){if(!e.has("update")&&!c.some(r=>e.has(r)))continue;let a;n&&(a=n.call(o,o._data,e),a&&s.isPlainObject(a)&&s.assign(o._data,a)),t&&a!==!1&&s.fastdom.write(()=>{o._connected&&t.call(o,o._data,e)})}}function B(o){return y(s.observeResize,o,"resize")}function N(o){return y(s.observeMutation,o)}function y(o,e,n){return{observe:o,handler(){g(this,n)},...e}}N({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),B({target:({$el:o})=>[o,...s.children(o)]});function C(o){const e=[[]],n=o.some((t,c)=>c&&o[c-1].offsetParent!==t.offsetParent);for(const t of o){if(!s.isVisible(t))continue;const c=b(t,n);for(let a=e.length-1;a>=0;a--){const r=e[a];if(!r[0]){r.push(t);break}const h=b(r[0],n);if(c.top>=h.bottom-1&&c.top!==h.top){e.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){e.unshift([t]);break}}}return e}function b(o,e=!1){let{offsetTop:n,offsetLeft:t,offsetHeight:c,offsetWidth:a}=o;return e&&([n,t]=s.offsetPosition(o)),{top:n,left:t,bottom:n+c,right:t+a}}const v="uk-transition-leave",w="uk-transition-enter";function P(o,e,n,t=0){const c=u(e,!0),a={opacity:1},r={opacity:0},h=l=>()=>c===u(e)?l():Promise.reject(),d=h(async()=>{s.addClass(e,v),await Promise.all(S(e).map((l,i)=>new Promise(f=>setTimeout(()=>s.Transition.start(l,r,n/2,"ease").then(f),i*t)))),s.removeClass(e,v)}),p=h(async()=>{const l=s.height(e);s.addClass(e,w),o(),s.css(s.children(e),{opacity:0}),await z();const i=s.children(e),f=s.height(e);s.css(e,"alignContent","flex-start"),s.height(e,l);const m=S(e);s.css(i,r);const _=m.map(async(Q,X)=>{await q(X*t),await s.Transition.start(Q,a,n/2,"ease")});l!==f&&_.push(s.Transition.start(e,{height:f},n/2+m.length*t,"ease")),await Promise.all(_).then(()=>{s.removeClass(e,w),c===u(e)&&(s.css(e,{height:"",alignContent:""}),s.css(i,{opacity:""}),delete e.dataset.transition)})});return s.hasClass(e,v)?T(e).then(p):s.hasClass(e,w)?T(e).then(d).then(p):d().then(p)}function u(o,e){return e&&(o.dataset.transition=1+u(o)),s.toNumber(o.dataset.transition)||0}function T(o){return Promise.all(s.children(o).filter(s.Transition.inProgress).map(e=>new Promise(n=>s.once(e,"transitionend transitioncanceled",n))))}function S(o){return C(s.children(o)).flat().filter(e=>s.isVisible(e))}function z(){return new Promise(o=>requestAnimationFrame(o))}function q(o){return new Promise(e=>setTimeout(e,o))}async function A(o,e,n){await D();let t=s.children(e);const c=t.map(f=>x(f,!0)),a={...s.css(e,["height","padding"]),display:"block"};await Promise.all(t.concat(e).map(s.Transition.cancel)),o(),t=t.concat(s.children(e).filter(f=>!s.includes(t,f))),await Promise.resolve(),s.fastdom.flush();const r=s.attr(e,"style"),h=s.css(e,["height","padding"]),[d,p]=H(e,t,c),l=t.map(f=>({style:s.attr(f,"style")}));t.forEach((f,m)=>p[m]&&s.css(f,p[m])),s.css(e,a),s.trigger(e,"scroll"),s.fastdom.flush(),await D();const i=t.map((f,m)=>s.parent(f)===e&&s.Transition.start(f,d[m],n,"ease")).concat(s.Transition.start(e,h,n,"ease"));try{await Promise.all(i),t.forEach((f,m)=>{s.attr(f,l[m]),s.parent(f)===e&&s.css(f,"display",d[m].opacity===0?"none":"")}),s.attr(e,"style",r)}catch{s.attr(t,"style",""),L(e,a)}}function x(o,e){const n=s.css(o,"zIndex");return s.isVisible(o)?{display:"",opacity:e?s.css(o,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:n==="auto"?s.index(o):n,...I(o)}:!1}function H(o,e,n){const t=e.map((a,r)=>s.parent(a)&&r in n?n[r]?s.isVisible(a)?I(a):{opacity:0}:{opacity:s.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=s.parent(e[r])===o&&(n[r]||x(e[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,e){for(const n in e)s.css(o,n,"")}function I(o){const{height:e,width:n}=s.offset(o);return{height:e,width:n,transform:"",...s.position(o),...s.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,e=this.$el){const n=this.animation;return(n==="fade"?P:n==="delayed-fade"?(...c)=>P(...c,40):n?A:()=>(o(),Promise.resolve()))(o,e,this.duration).catch(s.noop)}}},V={connected(){s.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 e=this[o];this[o]=n=>{s.assign(this.pos,s.getEventPos(n)),e(n)}}},events:{name:s.pointerDown,passive:!1,handler:"init"},computed:{target:(o,e)=>(e.tBodies||[e])[0],items(){return s.children(this.target)},isEmpty(){return s.isEmpty(this.items)},handles({handle:o},e){return o?s.$$(o,e):this.items}},watch:{isEmpty(o){s.toggleClass(this.target,this.clsEmpty,o)},handles(o,e){s.css(e,{touchAction:"",userSelect:""}),s.css(o,{touchAction:s.hasTouch?"none":"",userSelect:"none"})}},update:{write(o){if(!this.drag||!s.parent(this.placeholder))return;const{pos:{x:e,y:n},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;s.css(this.drag,{top:n-t,left:e-c});const r=this.getSortable(document.elementFromPoint(e,n));if(!r)return;const{items:h}=r;if(h.some(s.Transition.inProgress))return;const d=G(h,{x:e,y:n});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),l=J(r.target,d,a,e,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:e,button:n,defaultPrevented:t}=o,[c]=this.items.filter(a=>a.contains(e));!c||t||n>0||s.isInput(e)||e.closest(`.${this.clsNoDrag}`)||this.handle&&!e.closest(this.handle)||(o.preventDefault(),this.touched=new Set([this]),this.placeholder=c,this.origin={target:e,index:s.index(c),...this.pos},s.on(document,s.pointerMove,this.move),s.on(document,s.pointerUp,this.end),this.threshold||this.start(o))},start(o){this.drag=W(this.$container,this.placeholder);const{left:e,top:n}=this.placeholder.getBoundingClientRect();s.assign(this.origin,{offsetLeft:this.pos.x-e,offsetTop:this.pos.y-n}),s.addClass(this.drag,this.clsDrag,this.clsCustom),s.addClass(this.placeholder,this.clsPlaceholder),s.addClass(this.items,this.clsItem),s.addClass(document.documentElement,this.clsDragState),s.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(s.off(document,s.pointerMove,this.move),s.off(document,s.pointerUp,this.end),!this.drag)return;O();const o=this.getSortable(this.placeholder);this===o?this.origin.index!==s.index(this.placeholder)&&s.trigger(this.$el,"moved",[this,this.placeholder]):(s.trigger(o.$el,"added",[o,this.placeholder]),s.trigger(this.$el,"removed",[this,this.placeholder])),s.trigger(this.$el,"stop",[this,this.placeholder]),s.remove(this.drag),this.drag=null;for(const{clsPlaceholder:e,clsItem:n}of this.touched)for(const t of this.touched)s.removeClass(t.items,e,n);this.touched=null,s.removeClass(document.documentElement,this.clsDragState)},insert(o,e){s.addClass(this.items,this.clsItem);const n=()=>e?s.before(e,o):s.append(this.target,o);this.animate(n)},remove(o){this.target.contains(o)&&this.animate(()=>s.remove(o))},getSortable(o){do{const e=this.$getComponent(o,"sortable");if(e&&(e===this||this.group!==!1&&e.group===this.group))return e}while(o=s.parent(o))}}};let $;function j(o){let e=Date.now();$=setInterval(()=>{let{x:n,y:t}=o;t+=document.scrollingElement.scrollTop;const c=(Date.now()-e)*.3;e=Date.now(),s.scrollParents(document.elementFromPoint(n,o.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:p,height:l}=s.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,e){let n;if(s.isTag(e,"li","tr")){n=s.$("<div>"),s.append(n,e.cloneNode(!0).children);for(const t of e.getAttributeNames())s.attr(n,t,e.getAttribute(t))}else n=e.cloneNode(!0);return s.append(o,n),s.css(n,"margin","0","important"),s.css(n,{boxSizing:"border-box",width:e.offsetWidth,height:e.offsetHeight,padding:s.css(e,"padding")}),s.height(n.firstElementChild,s.height(e.firstElementChild)),n}function G(o,e){return o[s.findIndex(o,n=>s.pointInRect(e,n.getBoundingClientRect()))]}function J(o,e,n,t,c,a){if(!s.children(o).length)return;const r=e.getBoundingClientRect();if(!a)return K(o,n)||c<r.top+r.height/2?e:e.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:e.nextElementSibling:m&&p>r[f]-m?!1:e}function K(o,e){const n=s.children(o).length===1;n&&s.append(o,e);const t=s.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&&s.remove(e),c}function F(o,e){return o[1]>e[0]&&e[1]>o[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",E),E});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.17.8 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.17.9-dev.337e68f15 | 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,14 +6,36 @@
6
6
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitTooltip = factory(global.UIkit.util));
7
7
  })(this, (function (util) { 'use strict';
8
8
 
9
+ function parseOptions(options, args = []) {
10
+ try {
11
+ return options ? util.startsWith(options, "{") ? JSON.parse(options) : args.length && !util.includes(options, ":") ? { [args[0]]: options } : options.split(";").reduce((options2, option) => {
12
+ const [key, value] = option.split(/:(.*)/);
13
+ if (key && !util.isUndefined(value)) {
14
+ options2[key.trim()] = value.trim();
15
+ }
16
+ return options2;
17
+ }, {}) : {};
18
+ } catch (e) {
19
+ return {};
20
+ }
21
+ }
22
+
23
+ util.memoize((id, props) => {
24
+ const attributes = Object.keys(props);
25
+ const filter = attributes.concat(id).map((key) => [util.hyphenate(key), `data-${util.hyphenate(key)}`]).flat();
26
+ return { attributes, filter };
27
+ });
28
+
29
+ const ids = /* @__PURE__ */ Object.create(null);
9
30
  function generateId(instance, el = instance.$el, postfix = "") {
10
31
  if (el.id) {
11
32
  return el.id;
12
33
  }
13
34
  let id = `${instance.$options.id}-${instance._uid}${postfix}`;
14
- if (util.$(`#${id}`)) {
35
+ if (ids[id]) {
15
36
  id = generateId(instance, el, `${postfix}-2`);
16
37
  }
38
+ ids[id] = true;
17
39
  return id;
18
40
  }
19
41
 
@@ -300,41 +322,34 @@
300
322
 
301
323
  var Component = {
302
324
  mixins: [Container, Togglable, Position],
303
- args: "title",
304
- props: {
305
- delay: Number,
306
- title: String
307
- },
308
325
  data: {
309
326
  pos: "top",
310
- title: "",
311
- delay: 0,
312
327
  animation: ["uk-animation-scale-up"],
313
328
  duration: 100,
314
329
  cls: "uk-active"
315
330
  },
316
- beforeConnect() {
317
- this.id = generateId(this, {});
318
- this._hasTitle = util.hasAttr(this.$el, "title");
319
- util.attr(this.$el, {
320
- title: "",
321
- "aria-describedby": this.id
322
- });
331
+ connected() {
323
332
  makeFocusable(this.$el);
324
333
  },
325
334
  disconnected() {
326
335
  this.hide();
327
- if (!util.attr(this.$el, "title")) {
328
- util.attr(this.$el, "title", this._hasTitle ? this.title : null);
329
- }
330
336
  },
331
337
  methods: {
332
338
  show() {
333
- if (this.isToggled(this.tooltip || null) || !this.title) {
339
+ if (this.isToggled(this.tooltip || null)) {
340
+ return;
341
+ }
342
+ const { delay = 0, title } = parseProps(this.$options);
343
+ if (!title) {
334
344
  return;
335
345
  }
346
+ this.title = title;
347
+ this.id || (this.id = generateId(this, {}));
348
+ this._hasTitle = util.hasAttr(this.$el, "title");
349
+ util.attr(this.$el, { title: null, "aria-describedby": this.id });
350
+ util.once(this.$el, ["blur", util.pointerLeave], (e) => !util.isTouch(e) && this.hide());
336
351
  clearTimeout(this.showTimer);
337
- this.showTimer = setTimeout(this._show, this.delay);
352
+ this.showTimer = setTimeout(this._show, delay);
338
353
  },
339
354
  async hide() {
340
355
  if (util.matches(this.$el, "input:focus")) {
@@ -344,6 +359,7 @@
344
359
  if (this.isToggled(this.tooltip || null)) {
345
360
  await this.toggleElement(this.tooltip, false, false);
346
361
  }
362
+ util.attr(this.$el, { title: this._hasTitle ? this.title : null, "aria-describedby": null });
347
363
  util.remove(this.tooltip);
348
364
  this.tooltip = null;
349
365
  },
@@ -366,7 +382,7 @@
366
382
  `keydown ${util.pointerDown}`,
367
383
  this.hide,
368
384
  false,
369
- (e2) => e2.type === util.pointerDown && !util.within(e2.target, this.$el) || e2.type === "keydown" && e2.keyCode === keyMap.ESC
385
+ (e2) => e2.type === util.pointerDown && !this.$el.contains(e2.target) || e2.type === "keydown" && e2.keyCode === keyMap.ESC
370
386
  ),
371
387
  util.on([document, ...util.overflowParents(this.$el)], "scroll", update, {
372
388
  passive: true
@@ -382,17 +398,10 @@
382
398
  }
383
399
  },
384
400
  events: {
385
- focus: "show",
386
- blur: "hide",
387
- [`${util.pointerEnter} ${util.pointerLeave}`](e) {
388
- if (!util.isTouch(e)) {
389
- this[e.type === util.pointerEnter ? "show" : "hide"]();
390
- }
391
- },
392
401
  // Clicking a button does not give it focus on all browsers and platforms
393
402
  // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
394
- [util.pointerDown](e) {
395
- if (util.isTouch(e)) {
403
+ [`focus ${util.pointerEnter} ${util.pointerDown}`](e) {
404
+ if (!util.isTouch(e)) {
396
405
  this.show();
397
406
  }
398
407
  }
@@ -430,6 +439,13 @@
430
439
  }
431
440
  return [dir, align];
432
441
  }
442
+ function parseProps(options) {
443
+ const { el, id } = options;
444
+ return ["delay", "title"].reduce(
445
+ (obj, key) => ({ [key]: util.data(el, key), ...obj }),
446
+ parseOptions(util.data(el, id), ["title"])
447
+ );
448
+ }
433
449
 
434
450
  if (typeof window !== "undefined" && window.UIkit) {
435
451
  window.UIkit.component("tooltip", Component);
@@ -1 +1 @@
1
- /*! UIkit 3.17.8 | 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
+ /*! UIkit 3.17.9-dev.337e68f15 | https://www.getuikit.com | (c) 2014 - 2023 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((e,o)=>{const[n,r]=o.split(/:(.*)/);return n&&!t.isUndefined(r)&&(e[n.trim()]=r.trim()),e},{}):{}}catch{return{}}}t.memoize((s,i)=>{const e=Object.keys(i),o=e.concat(s).map(n=>[t.hyphenate(n),`data-${t.hyphenate(n)}`]).flat();return{attributes:e,filter:o}});const y=Object.create(null);function P(s,i=s.$el,e=""){if(i.id)return i.id;let o=`${s.$options.id}-${s._uid}${e}`;return y[o]&&(o=P(s,i,`${e}-2`)),y[o]=!0,o}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,e){let o=[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 c in r)r[c].reverse();o.reverse(),n.reverse()}const a=I(s),h=t.dimensions(s);t.css(s,{top:-h.height,left:-h.width}),t.positionAt(s,i,{attach:r,offset:o,boundary:e,placement:n,viewportOffset:this.getViewportOffset(s)}),a()},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 I(s){const i=t.scrollParent(s),{scrollTop:e}=i;return()=>{e!==i.scrollTop&&(i.scrollTop=e)}}var D={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 r=(t.isFunction(e)?e:e===!1||!this.hasAnimation?N:this.hasTransition?_:j)(o,n,this),a=n?this.clsEnter:this.clsLeave;t.addClass(o,a),t.trigger(o,n?"show":"hide",[this]);const h=()=>{t.removeClass(o,a),t.trigger(o,n?"shown":"hidden",[this])};return r?r.then(h,()=>(t.removeClass(o,a),Promise.reject())):h()})),!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 N(s,i,{_toggle:e}){return t.Animation.cancel(s),t.Transition.cancel(s),e(s,i)}async function _(s,i,{animation:e,duration:o,velocity:n,transition:r,_toggle:a}){var h;const[c="reveal",v="top"]=((h=e[0])==null?void 0:h.split("-"))||[],b=[["left","right"],["top","bottom"]],T=b[t.includes(b[0],v)?0:1],O=T[1]===v,m=["width","height"][b.indexOf(T)],f=`margin-${T[0]}`,w=`margin-${v}`;let l=t.dimensions(s)[m];const H=t.Transition.inProgress(s);await t.Transition.cancel(s),i&&a(s,!0);const V=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",f,w].map(S=>[S,s.style[S]])),g=t.dimensions(s),u=t.toFloat(t.css(s,f)),x=t.toFloat(t.css(s,w)),d=g[m]+x;!H&&!i&&(l+=x);const[$]=t.wrapInner(s,"<div>");t.css($,{boxSizing:"border-box",height:g.height,width:g.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:g.width,height:g.height,overflow:"hidden",[m]:l});const E=l/d;o=(n*d+o)*(i?1-E:E);const C={[m]:i?d:0};O&&(t.css(s,f,d-l+u),C[f]=i?u:d+u),!O^c==="reveal"&&(t.css($,f,-d+l),t.Transition.start($,{[f]:i?0:-d},o,r));try{await t.Transition.start(s,C,o,r)}finally{t.css(s,V),t.unwrap($.firstChild),i||a(s,!1)}}function j(s,i,e){const{animation:o,duration:n,_toggle:r}=e;return i?(r(s,!0),t.Animation.in(s,o[0],n,e.origin)):t.Animation.out(s,o[1]||o[0],n,e.origin).then(()=>r(s,!1))}const F={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var k={mixins:[A,D,B],data:{pos:"top",animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},connected(){L(this.$el)},disconnected(){this.hide()},methods:{show(){if(this.isToggled(this.tooltip||null))return;const{delay:s=0,title:i}=W(this.$options);i&&(this.title=i,this.id||(this.id=P(this,{})),this._hasTitle=t.hasAttr(this.$el,"title"),t.attr(this.$el,{title:null,"aria-describedby":this.id}),t.once(this.$el,["blur",t.pointerLeave],e=>!t.isTouch(e)&&this.hide()),clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,s))},async hide(){t.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&await this.toggleElement(this.tooltip,!1,!1),t.attr(this.$el,{title:this._hasTitle?this.title:null,"aria-describedby":null}),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]=U(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?`${t.flipPosition(o)}-${n}`:`${n}-${t.flipPosition(o)}`;const r=[t.once(document,`keydown ${t.pointerDown}`,this.hide,!1,a=>a.type===t.pointerDown&&!this.$el.contains(a.target)||a.type==="keydown"&&a.keyCode===F.ESC),t.on([document,...t.overflowParents(this.$el)],"scroll",e,{passive:!0})];t.once(this.tooltip,"hide",()=>r.forEach(a=>a()),{self:!0})}),await this.toggleElement(this.tooltip,!0)||this.hide()}},events:{[`focus ${t.pointerEnter} ${t.pointerDown}`](s){t.isTouch(s)||this.show()}}};function L(s){t.isFocusable(s)||t.attr(s,"tabindex","0")}function U(s,i,[e,o]){const n=t.offset(s),r=t.offset(i),a=[["left","right"],["top","bottom"]];for(const c of a){if(n[c[0]]>=r[c[1]]){e=c[1];break}if(n[c[1]]<=r[c[0]]){e=c[0];break}}const h=t.includes(a[0],e)?a[1]:a[0];return n[h[0]]===r[h[0]]?o=h[0]:n[h[1]]===r[h[1]]?o=h[1]:o="center",[e,o]}function W(s){const{el:i,id:e}=s;return["delay","title"].reduce((o,n)=>({[n]:t.data(i,n),...o}),p(t.data(i,e),["title"]))}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",k),k});
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.17.8 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.17.9-dev.337e68f15 | 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.8 | 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});
1
+ /*! UIkit 3.17.9-dev.337e68f15 | 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});