@frankenstyle/uikit 0.0.2 → 0.0.3
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/.prettierignore +0 -1
- package/CHANGELOG.md +62 -0
- package/README.md +0 -1
- package/build/publishDev.js +2 -3
- package/build/release.js +12 -7
- package/build/util.js +6 -6
- package/dist/css/uikit-rtl.css +105 -92
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +105 -92
- 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 +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +35 -30
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +35 -30
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +2 -2
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -7
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -7
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +41 -42
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -7
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +34 -35
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +5 -6
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +2 -2
- 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 +123 -70
- 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 +131 -74
- package/dist/js/uikit.min.js +1 -1
- package/package.json +23 -24
- package/src/images/components/accordion-icon.svg +20 -0
- package/src/js/components/internal/slider-transitioner.js +1 -1
- package/src/js/components/slider.js +6 -7
- package/src/js/components/sortable.js +5 -6
- package/src/js/core/accordion.js +14 -10
- package/src/js/core/drop.js +8 -1
- package/src/js/core/height-viewport.js +12 -1
- package/src/js/core/icon.js +4 -2
- package/src/js/core/index.js +1 -0
- package/src/js/core/overflow-fade.js +83 -8
- package/src/js/mixin/slider-drag.js +21 -14
- package/src/js/mixin/slider-nav.js +16 -18
- package/src/js/util/attr.js +1 -5
- package/src/less/components/accordion.less +110 -46
- package/src/less/components/card.less +1 -1
- package/src/less/components/form.less +10 -7
- package/src/less/components/lightbox.less +0 -5
- package/src/less/components/nav.less +1 -1
- package/src/less/components/overlay.less +2 -2
- package/src/less/components/utility.less +7 -4
- package/src/less/theme/accordion.less +31 -38
- package/src/scss/components/accordion.scss +77 -30
- package/src/scss/components/form.scss +4 -4
- package/src/scss/components/lightbox.scss +0 -5
- package/src/scss/components/nav.scss +1 -1
- package/src/scss/components/utility.scss +7 -4
- package/src/scss/mixins-theme.scss +39 -23
- package/src/scss/mixins.scss +38 -15
- package/src/scss/variables-theme.scss +20 -18
- package/src/scss/variables.scss +18 -14
- package/tests/accordion.html +76 -17
- package/tests/card.html +87 -1
- package/tests/height-viewport.html +12 -3
- package/tests/index.html +7 -7
- package/tests/navbar.html +1 -1
- package/tests/overlay.html +181 -13
- package/tests/parallax.html +1 -1
- package/tests/position.html +16 -16
- package/tests/sticky.html +2 -2
- package/tests/tab.html +1 -1
- package/tests/thumbnav.html +2 -2
- package/tests/toggle.html +2 -2
- package/tests/transition.html +19 -19
- package/tests/upload.html +2 -2
- package/src/images/backgrounds/accordion-close.svg +0 -4
- package/src/images/backgrounds/accordion-open.svg +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 0.0.2 | https://www.getuikit.com | (c) 2014 - 2025 YOOtheme | MIT License */(function(e,w){typeof exports=="object"&&typeof module<"u"?module.exports=w(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],w):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=w(e.UIkit.util))})(this,function(e){"use strict";function w(o,s="update"){o._connected&&o._updates.length&&(o._updateCount||(o._updateCount=0,requestAnimationFrame(()=>o._updateCount=0)),o._queued||(o._queued=new Set,e.fastdom.read(()=>{o._connected&&A(o,o._queued),o._queued=null})),o._updateCount++<20&&o._queued.add(s.type||s))}function A(o,s){for(const{read:n,write:t,events:c=[]}of o._updates){if(!s.has("update")&&!c.some(a=>s.has(a)))continue;let r;n&&(r=n.call(o,o._data,s),r&&e.isPlainObject(r)&&e.assign(o._data,r)),t&&r!==!1&&e.fastdom.write(()=>{o._connected&&t.call(o,o._data,s)})}}function H(o){return I(e.observeResize,o,"resize")}function x(o){return I(e.observeMutation,o)}function I(o,s,n){return{observe:o,handler(){w(this,n)},...s}}x({options:{childList:!0}}),x({options:{attributes:!0,attributeFilter:["style"]}}),H({handler(o){for(const{borderBoxSize:[{inlineSize:s,blockSize:n}]}of o)if(s||n){this.$emit("resize");return}},target:({$el:o})=>[o,...e.children(o)]});function L(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=P(t,n);for(let r=s.length-1;r>=0;r--){const a=s[r];if(!a[0]){a.push(t);break}const h=P(a[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 f=a.length-1;for(;f>=0;f--){const p=P(a[f],n);if(c.left>=p.left)break}a.splice(f+1,0,t);break}if(r===0){s.unshift([t]);break}}}return s}function P(o,s=!1){let{offsetTop:n,offsetLeft:t,offsetHeight:c,offsetWidth:r}=o;return s&&([n,t]=e.offsetPosition(o)),{top:n,left:t,bottom:n+c,right:t+r}}function D(){return new Promise(o=>requestAnimationFrame(o))}function y(o){return new Promise(s=>setTimeout(s,o))}const C="uk-transition-leave",S="uk-transition-enter";function E(o,s,n,t=0){const c=T(s,!0),r={opacity:1},a={opacity:0},h=()=>c===T(s),f=i=>()=>h()?i():Promise.reject(),p=f(async()=>{e.addClass(s,C),await(t?F(s).reduce(async(i,g,l,u)=>{if(await i,!e.isInView(g)||!h()){e.css(g,a);return}await y(t);const d=e.Transition.start(g,a,n/2,"ease");u.length-1===l&&await d},Promise.resolve()):e.Transition.start(s,a,n/2,"ease")),e.removeClass(s,C)}),m=f(async()=>{const i=e.height(s);e.addClass(s,S),o(),e.css(t?e.children(s):s,a),e.height(s,i),await y(),e.height(s,"");const g=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,i);let l=[],u=n/2;if(t){const d=F(s);e.css(e.children(s),a),l=d.reduce(async(b,v,Y,Z)=>{if(await b,!e.isInView(v)||!h()){e.resetProps(v,r);return}await y(t);const k=e.Transition.start(v,r,n/2,"ease").then(()=>h()&&e.resetProps(v,r));Z.length-1===Y&&await k},Promise.resolve()),u+=d.length*t}if(!t||i!==g){const d={height:g,...t?{}:r};l.push(e.Transition.start(s,d,u,"ease"))}await Promise.all(l),e.removeClass(s,S),h()&&(e.resetProps(s,{height:"",alignContent:"",...r}),delete s.dataset.transition)});return e.hasClass(s,C)?_(s).then(m):e.hasClass(s,S)?_(s).then(p).then(m):p().then(m)}function T(o,s){return s&&(o.dataset.transition=1+T(o)),e.toNumber(o.dataset.transition)||0}function _(o){return Promise.all(e.children(o).filter(e.Transition.inProgress).map(s=>new Promise(n=>e.once(s,"transitionend transitioncanceled",n))))}function F(o){return L(e.children(o)).flat().filter(e.isVisible)}async function M(o,s,n){await D();let t=e.children(s);const c=t.map(d=>$(d,!0)),r={...e.css(s,["height","padding"]),display:"block"},a=t.filter(d=>e.isInView(d)),h=t.concat(s);await Promise.all(h.map(e.Transition.cancel)),e.css(h,"transitionProperty","none"),await o();const f=e.children(s).filter(d=>!e.includes(t,d));t=t.concat(f),await Promise.resolve(),e.css(h,"transitionProperty","");const p=e.attr(s,"style"),m=e.css(s,["height","padding"]),[i,g]=B(s,t,c),l=t.map(d=>({style:e.attr(d,"style")}));a.push(...t.filter(d=>e.isInView(d))),t.forEach((d,b)=>g[b]&&e.css(d,g[b])),e.css(s,r),e.trigger(s,"scroll"),await D();const u=t.map((d,b)=>{if(e.parent(d)===s&&a.includes(d))return e.Transition.start(d,i[b],n,"ease",!f.includes(d))}).concat(e.Transition.start(s,m,n,"ease",!0));try{await Promise.all(u),t.forEach((d,b)=>{e.attr(d,l[b]),e.parent(d)===s&&e.css(d,"display",i[b].opacity===0?"none":"")}),e.attr(s,"style",p)}catch{e.attr(t,"style",""),e.resetProps(s,r)}}function $(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,...z(o)}:!1}function B(o,s,n){const t=s.map((r,a)=>e.parent(r)&&a in n?n[a]?e.isVisible(r)?z(r):{opacity:0}:{opacity:e.isVisible(r)?1:0}:!1),c=t.map((r,a)=>{const h=e.parent(s[a])===o&&(n[a]||$(s[a]));if(!h)return!1;if(!r)delete h.opacity;else if(!("opacity"in r)){const{opacity:f}=h;f%1?r.opacity=1:delete h.opacity}return h});return[t,c]}function z(o){const{height:s,width:n}=e.dimensions(o);let{top:t,left:c}=e.position(o);const r=e.offsetViewport(o.ownerDocument);return t=e.clamp(t,r.top-s-r.height,r.bottom+r.height),c=e.clamp(c,r.left-n-r.width,r.right+r.width),{height:s,width:n,top:t,left:c,transform:"",...e.css(o,["marginTop","marginLeft"])}}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?M:()=>(o(),Promise.resolve()))(o,s,this.duration).catch(e.noop)}}},j={connected(){e.addClass(this.$el,this.$options.id)}},N={mixins:[j,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(o){this.init(o)}},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){const n={touchAction:"none",userSelect:"none"};e.resetProps(s,n),e.css(o,n)}},update:{write(o){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:n},origin:{offsetTop:t,offsetLeft:c},placeholder:r}=this;e.css(this.drag,{top:n-t,left:s-c});const a=this.getSortable(document.elementFromPoint(s,n));if(!a)return;const{items:h}=a;if(h.some(e.Transition.inProgress))return;const f=J(h,{x:s,y:n});if(h.length&&(!f||f===r))return;const p=this.getSortable(r),m=K(a.target,f,r,s,n,a===p&&o.moved!==f);m!==!1&&(m&&r===m||(a!==p?(p.remove(r),o.moved=f):delete o.moved,a.insert(r,m),this.touched.add(a)))},events:["move"]},methods:{init(o){const{target:s,button:n,defaultPrevented:t}=o,[c]=this.items.filter(r=>r.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=G(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]),O(this.pos),this.move(o)},move:X(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;W();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 V;function O(o){let s=Date.now();V=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(r=>{let{scrollTop:a,scrollHeight:h}=r;const{top:f,bottom:p,height:m}=e.offsetViewport(r);if(f<t&&f+35>t)a-=c;else if(p>t&&p-35<t)a+=c;else return;if(a>0&&a<h-m)return r.scrollTop=a,!0})},15)}function W(){clearInterval(V)}function G(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 J(o,s){return o[e.findIndex(o,n=>e.pointInRect(s,e.dimensions(n)))]}function K(o,s,n,t,c,r){if(!e.children(o).length)return;const a=e.dimensions(s);if(!r)return Q(o,n)||c<a.top+a.height/2?s:s.nextElementSibling;const h=e.dimensions(n),f=q([a.top,a.bottom],[h.top,h.bottom]),[p,m,i,g]=f?[t,"width","left","right"]:[c,"height","top","bottom"],l=h[m]<a[m]?a[m]-h[m]:0;return h[i]<a[i]?l&&p<a[i]+l?!1:s.nextElementSibling:l&&p>a[g]-l?!1:s}function Q(o,s){const n=e.children(o).length===1;n&&e.append(o,s);const t=e.children(o),c=t.some((r,a)=>{const h=e.dimensions(r);return t.slice(a+1).some(f=>{const p=e.dimensions(f);return!q([h.left,h.right],[p.left,p.right])})});return n&&e.remove(s),c}function q(o,s){return o[1]>s[0]&&s[1]>o[0]}function X(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",N),N});
|
|
1
|
+
/*! UIkit 0.0.3 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */(function(e,w){typeof exports=="object"&&typeof module<"u"?module.exports=w(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],w):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=w(e.UIkit.util))})(this,function(e){"use strict";function w(o,s="update"){o._connected&&o._updates.length&&(o._updateCount||(o._updateCount=0,requestAnimationFrame(()=>o._updateCount=0)),o._queued||(o._queued=new Set,e.fastdom.read(()=>{o._connected&&A(o,o._queued),o._queued=null})),o._updateCount++<20&&o._queued.add(s.type||s))}function A(o,s){for(const{read:n,write:t,events:c=[]}of o._updates){if(!s.has("update")&&!c.some(a=>s.has(a)))continue;let r;n&&(r=n.call(o,o._data,s),r&&e.isPlainObject(r)&&e.assign(o._data,r)),t&&r!==!1&&e.fastdom.write(()=>{o._connected&&t.call(o,o._data,s)})}}function H(o){return I(e.observeResize,o,"resize")}function x(o){return I(e.observeMutation,o)}function I(o,s,n){return{observe:o,handler(){w(this,n)},...s}}x({options:{childList:!0}}),x({options:{attributes:!0,attributeFilter:["style"]}}),H({handler(o){for(const{borderBoxSize:[{inlineSize:s,blockSize:n}]}of o)if(s||n){this.$emit("resize");return}},target:({$el:o})=>[o,...e.children(o)]});function L(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=y(t,n);for(let r=s.length-1;r>=0;r--){const a=s[r];if(!a[0]){a.push(t);break}const h=y(a[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 f=a.length-1;for(;f>=0;f--){const p=y(a[f],n);if(c.left>=p.left)break}a.splice(f+1,0,t);break}if(r===0){s.unshift([t]);break}}}return s}function y(o,s=!1){let{offsetTop:n,offsetLeft:t,offsetHeight:c,offsetWidth:r}=o;return s&&([n,t]=e.offsetPosition(o)),{top:n,left:t,bottom:n+c,right:t+r}}function D(){return new Promise(o=>requestAnimationFrame(o))}function P(o){return new Promise(s=>setTimeout(s,o))}const C="uk-transition-leave",S="uk-transition-enter";function E(o,s,n,t=0){const c=T(s,!0),r={opacity:1},a={opacity:0},h=()=>c===T(s),f=l=>()=>h()?l():Promise.reject(),p=f(async()=>{e.addClass(s,C),await(t?F(s).reduce(async(l,i,b,u)=>{if(await l,!e.isInView(i)||!h()){e.css(i,a);return}await P(t);const d=e.Transition.start(i,a,n/2,"ease");u.length-1===b&&await d},Promise.resolve()):e.Transition.start(s,a,n/2,"ease")),e.removeClass(s,C)}),m=f(async()=>{const l=e.height(s);e.addClass(s,S),o(),e.css(t?e.children(s):s,a),e.height(s,l),await P(),e.height(s,"");const i=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,l);let b=[],u=n/2;if(t){const d=F(s);e.css(e.children(s),a),b=d.reduce(async(g,v,Y,Z)=>{if(await g,!e.isInView(v)||!h()){e.resetProps(v,r);return}await P(t);const k=e.Transition.start(v,r,n/2,"ease").then(()=>h()&&e.resetProps(v,r));Z.length-1===Y&&await k},Promise.resolve()),u+=d.length*t}if(!t||l!==i){const d={height:i,...t?{}:r};b.push(e.Transition.start(s,d,u,"ease"))}await Promise.all(b),e.removeClass(s,S),h()&&(e.resetProps(s,{height:"",alignContent:"",...r}),delete s.dataset.transition)});return e.hasClass(s,C)?_(s).then(m):e.hasClass(s,S)?_(s).then(p).then(m):p().then(m)}function T(o,s){return s&&(o.dataset.transition=1+T(o)),e.toNumber(o.dataset.transition)||0}function _(o){return Promise.all(e.children(o).filter(e.Transition.inProgress).map(s=>new Promise(n=>e.once(s,"transitionend transitioncanceled",n))))}function F(o){return L(e.children(o)).flat().filter(e.isVisible)}async function M(o,s,n){await D();let t=e.children(s);const c=t.map(d=>$(d,!0)),r={...e.css(s,["height","padding"]),display:"block"},a=t.filter(d=>e.isInView(d)),h=t.concat(s);await Promise.all(h.map(e.Transition.cancel)),e.css(h,"transitionProperty","none"),await o();const f=e.children(s).filter(d=>!e.includes(t,d));t=t.concat(f),await Promise.resolve(),e.css(h,"transitionProperty","");const p=e.attr(s,"style"),m=e.css(s,["height","padding"]),[l,i]=B(s,t,c),b=t.map(d=>({style:e.attr(d,"style")}));a.push(...t.filter(d=>e.isInView(d))),t.forEach((d,g)=>i[g]&&e.css(d,i[g])),e.css(s,r),e.trigger(s,"scroll"),await D();const u=t.map((d,g)=>{if(e.parent(d)===s&&a.includes(d))return e.Transition.start(d,l[g],n,"ease",!f.includes(d))}).concat(e.Transition.start(s,m,n,"ease",!0));try{await Promise.all(u),t.forEach((d,g)=>{e.attr(d,b[g]),e.parent(d)===s&&e.css(d,"display",l[g].opacity===0?"none":"")}),e.attr(s,"style",p)}catch{e.attr(t,"style",""),e.resetProps(s,r)}}function $(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,...z(o)}:!1}function B(o,s,n){const t=s.map((r,a)=>e.parent(r)&&a in n?n[a]?e.isVisible(r)?z(r):{opacity:0}:{opacity:e.isVisible(r)?1:0}:!1),c=t.map((r,a)=>{const h=e.parent(s[a])===o&&(n[a]||$(s[a]));if(!h)return!1;if(!r)delete h.opacity;else if(!("opacity"in r)){const{opacity:f}=h;f%1?r.opacity=1:delete h.opacity}return h});return[t,c]}function z(o){const{height:s,width:n}=e.dimensions(o);let{top:t,left:c}=e.position(o);const r=e.offsetViewport(o.ownerDocument);return t=e.clamp(t,r.top-s-r.height,r.bottom+r.height),c=e.clamp(c,r.left-n-r.width,r.right+r.width),{height:s,width:n,top:t,left:c,transform:"",...e.css(o,["marginTop","marginLeft"])}}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?M:()=>(o(),Promise.resolve()))(o,s,this.duration).catch(e.noop)}}},j={connected(){e.addClass(this.$el,this.$options.id)}},N={mixins:[j,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(o){this.init(o)}},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){const n={touchAction:"none",userSelect:"none"};e.resetProps(s,n),e.css(o,n)}},update:{write(o){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:n},origin:{offsetTop:t,offsetLeft:c},placeholder:r}=this;e.css(this.drag,{top:n-t,left:s-c});const a=this.getSortable(document.elementFromPoint(s,n));if(!a)return;const{items:h}=a;if(h.some(e.Transition.inProgress))return;const f=J(h,{x:s,y:n});if(h.length&&(!f||f===r))return;const p=this.getSortable(r),m=K(a.target,f,r,{x:s,y:n},a===p&&o.moved!==f);m!==!1&&(m&&r===m||(a!==p?(p.remove(r),o.moved=f):delete o.moved,a.insert(r,m),this.touched.add(a)))},events:["move"]},methods:{init(o){const{target:s,button:n,defaultPrevented:t}=o,[c]=this.items.filter(r=>r.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=G(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]),O(this.pos),this.move(o)},move:X(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;W();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 V;function O(o){let s=Date.now();V=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(r=>{let{scrollTop:a,scrollHeight:h}=r;const{top:f,bottom:p,height:m}=e.offsetViewport(r);if(f<t&&f+35>t)a-=c;else if(p>t&&p-35<t)a+=c;else return;if(a>0&&a<h-m)return r.scrollTop=a,!0})},15)}function W(){clearInterval(V)}function G(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 J(o,s){return o[e.findIndex(o,n=>e.pointInRect(s,e.dimensions(n)))]}function K(o,s,n,t,c){if(!e.children(o).length)return;const r=e.dimensions(s);if(!c)return Q(o,n)||t.y<r.top+r.height/2?s:s.nextElementSibling;const a=e.dimensions(n),h=q([r.top,r.bottom],[a.top,a.bottom]),[f,p,m,l]=h?[t.x,"width","left","right"]:[t.y,"height","top","bottom"],i=a[p]<r[p]?r[p]-a[p]:0;return a[m]<r[m]?i&&f<r[m]+i?!1:s.nextElementSibling:i&&f>r[l]-i?!1:s}function Q(o,s){const n=e.children(o).length===1;n&&e.append(o,s);const t=e.children(o),c=t.some((r,a)=>{const h=e.dimensions(r);return t.slice(a+1).some(f=>{const p=e.dimensions(f);return!q([h.left,h.right],[p.left,p.right])})});return n&&e.remove(s),c}function q(o,s){return o[1]>s[0]&&s[1]>o[0]}function X(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",N),N});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 0.0.
|
|
1
|
+
/*! UIkit 0.0.3 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
async _show(title, id) {
|
|
363
363
|
this.tooltip = util.append(
|
|
364
364
|
this.container,
|
|
365
|
-
`<div id="${id}" class="uk-${this.$options.name}" role="tooltip">
|
|
365
|
+
`<div id="${id}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${title}</div> </div>`
|
|
366
366
|
);
|
|
367
367
|
util.on(this.tooltip, "toggled", (e, toggled) => {
|
|
368
368
|
if (!toggled) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 0.0.
|
|
1
|
+
/*! UIkit 0.0.3 | https://www.getuikit.com | (c) 2014 - 2026 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 E=1;function A(s,i=null){return(i==null?void 0:i.id)||`${s.$options.id}-${E++}`}var B={props:{container:Boolean},data:{container:!0},computed:{container({container:s}){return s===!0&&this.$container||s&&t.$(s)}}},I={props:{pos:String,offset:Boolean,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=T(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 T(s){const i=t.scrollParent(s),{scrollTop:o}=i,e=()=>{o!==i.scrollTop&&(i.scrollTop=o)};return()=>{e(),setTimeout(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-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?_:this.hasTransition?j:F)(e,n,this),h=n?this.clsEnter:this.clsLeave;t.addClass(e,h),t.trigger(e,n?"show":"hide",[this]);const c=()=>{var a;if(t.removeClass(e,h),t.trigger(e,n?"shown":"hidden",[this]),n){const l=T(e);(a=t.$$("[autofocus]",e).find(t.isVisible))==null||a.focus(),l()}};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)),o&&t.trigger(s,"toggled",[i,this])}}};function _(s,i,{_toggle:o}){return t.Animation.cancel(s),t.Transition.cancel(s),o(s,i)}async function j(s,i,{animation:o,duration:e,velocity:n,transition:r,_toggle:h}){var c;const[a="reveal",l="top"]=((c=o[0])==null?void 0:c.split("-"))||[],b=[["left","right"],["top","bottom"]],y=b[t.includes(b[0],l)?0:1],k=y[1]===l,v=["width","height"][b.indexOf(y)],f=`margin-${y[0]}`,w=`margin-${l}`;let g=t.dimensions(s)[v];const W=t.Transition.inProgress(s);await t.Transition.cancel(s),i&&h(s,!0);const z=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",f,w].map(O=>[O,s.style[O]])),m=t.dimensions(s),u=t.toFloat(t.css(s,f)),x=t.toFloat(t.css(s,w)),d=m[v]+x;!W&&!i&&(g+=x);const[$]=t.wrapInner(s,"<div>");t.css($,{boxSizing:"border-box",height:m.height,width:m.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:m.width,height:m.height,overflow:"hidden",[v]:g});const S=g/d;e=(n*d+e)*(i?1-S:S);const C={[v]:i?d:0};k&&(t.css(s,f,d-g+u),C[f]=i?u:d+u),!k^a==="reveal"&&(t.css($,f,-d+g),t.Transition.start($,{[f]:i?0:-d},e,r));try{await t.Transition.start(s,C,e,r)}finally{t.css(s,z),t.unwrap($.firstChild),i||h(s,!1)}}function F(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 L={ESC:27};var P={mixins:[B,D,I],data:{pos:"top",animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},connected(){N(this.$el)},disconnected(){this.hide()},methods:{show(){if(this.isToggled(this.tooltip||null))return;const{delay:s=0,title:i}=V(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=A(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]=U(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===L.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)&&document.readyState!=="loading"&&this.show()}}};function N(s){t.isFocusable(s)||(s.tabIndex=0)}function U(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 V(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",P),P});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 0.0.
|
|
1
|
+
/*! UIkit 0.0.3 | https://www.getuikit.com | (c) 2014 - 2026 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 0.0.
|
|
1
|
+
/*! UIkit 0.0.3 | https://www.getuikit.com | (c) 2014 - 2026 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++]||""))||""}}},p={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&&!d(this.allow,a.name)){this.fail(this.t("invalidName",this.allow));return}if(this.mime&&!d(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:h=>{const{xhr:c}=h;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(h)}});this.complete(n),r.length?await s(r.shift()):this.completeAll(n)}catch(n){this.error(n)}};await s(r.shift())}}};function d(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",p),p});
|
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 0.0.
|
|
1
|
+
/*! UIkit 0.0.3 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -245,9 +245,6 @@
|
|
|
245
245
|
return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
|
|
246
246
|
} else {
|
|
247
247
|
for (const el of toNodes(element)) {
|
|
248
|
-
if (isFunction(value)) {
|
|
249
|
-
value = value.call(el, attr(el, name));
|
|
250
|
-
}
|
|
251
248
|
if (value === null) {
|
|
252
249
|
removeAttr(el, name);
|
|
253
250
|
} else {
|
|
@@ -2166,7 +2163,7 @@
|
|
|
2166
2163
|
};
|
|
2167
2164
|
App.util = util;
|
|
2168
2165
|
App.options = {};
|
|
2169
|
-
App.version = "0.0.
|
|
2166
|
+
App.version = "0.0.3";
|
|
2170
2167
|
|
|
2171
2168
|
const PREFIX = "uk-";
|
|
2172
2169
|
const DATA = "__uikit__";
|
|
@@ -2789,8 +2786,8 @@
|
|
|
2789
2786
|
collapsible: true,
|
|
2790
2787
|
multiple: false,
|
|
2791
2788
|
clsOpen: "uk-open",
|
|
2792
|
-
toggle: "
|
|
2793
|
-
content: "
|
|
2789
|
+
toggle: ".uk-accordion-title",
|
|
2790
|
+
content: ".uk-accordion-content",
|
|
2794
2791
|
offset: 0
|
|
2795
2792
|
},
|
|
2796
2793
|
computed: {
|
|
@@ -2834,20 +2831,21 @@
|
|
|
2834
2831
|
{
|
|
2835
2832
|
name: "click keydown",
|
|
2836
2833
|
delegate: ({ targets, $props }) => `${targets} ${$props.toggle}`,
|
|
2837
|
-
|
|
2838
|
-
var _a;
|
|
2834
|
+
handler(e) {
|
|
2839
2835
|
if (e.type === "keydown" && e.keyCode !== keyMap.SPACE) {
|
|
2840
2836
|
return;
|
|
2841
2837
|
}
|
|
2838
|
+
const item = index(this.toggles, e.current);
|
|
2839
|
+
if (item === -1) {
|
|
2840
|
+
return;
|
|
2841
|
+
}
|
|
2842
2842
|
maybeDefaultPreventClick(e);
|
|
2843
|
-
|
|
2844
|
-
this.
|
|
2845
|
-
await this.toggle(index(this.toggles, e.current));
|
|
2846
|
-
this._off();
|
|
2843
|
+
const off = keepScrollPosition(e.target);
|
|
2844
|
+
this.toggle(item).finally(off);
|
|
2847
2845
|
}
|
|
2848
2846
|
},
|
|
2849
2847
|
{
|
|
2850
|
-
name: "shown hidden",
|
|
2848
|
+
name: "show hide shown hidden",
|
|
2851
2849
|
self: true,
|
|
2852
2850
|
delegate: ({ targets }) => targets,
|
|
2853
2851
|
handler() {
|
|
@@ -2887,7 +2885,7 @@
|
|
|
2887
2885
|
items = items.concat(activeItems);
|
|
2888
2886
|
}
|
|
2889
2887
|
if (!this.collapsible && activeItems.length < 2 && includes(activeItems, item)) {
|
|
2890
|
-
|
|
2888
|
+
items = [];
|
|
2891
2889
|
}
|
|
2892
2890
|
return Promise.all(
|
|
2893
2891
|
items.map(
|
|
@@ -2920,7 +2918,7 @@
|
|
|
2920
2918
|
hide(content, false);
|
|
2921
2919
|
const endHeight = sumBy(["marginTop", "marginBottom"], (prop) => css(content, prop)) + dimensions(content).height;
|
|
2922
2920
|
const percent = currentHeight / endHeight;
|
|
2923
|
-
duration = (velocity * endHeight + duration) * (show ? 1 - percent : percent);
|
|
2921
|
+
duration = endHeight ? (velocity * endHeight + duration) * (show ? 1 - percent : percent) : 0;
|
|
2924
2922
|
css(wrapper, "height", currentHeight);
|
|
2925
2923
|
await Transition.start(wrapper, { height: show ? endHeight : 0 }, duration, transition2);
|
|
2926
2924
|
unwrap(content);
|
|
@@ -3429,13 +3427,17 @@
|
|
|
3429
3427
|
if (this.container && parent(this.$el) !== this.container) {
|
|
3430
3428
|
append(this.container, this.$el);
|
|
3431
3429
|
}
|
|
3430
|
+
addClass(this.$el, this.clsEnter);
|
|
3432
3431
|
this.showTimer = setTimeout(
|
|
3433
3432
|
() => this.toggleElement(this.$el, true),
|
|
3434
3433
|
delay && this.delayShow || 0
|
|
3435
3434
|
);
|
|
3436
3435
|
},
|
|
3437
3436
|
hide(delay = true, animate = true) {
|
|
3438
|
-
const hide = () =>
|
|
3437
|
+
const hide = () => {
|
|
3438
|
+
removeClass(this.$el, this.clsEnter);
|
|
3439
|
+
this.toggleElement(this.$el, false, this.animateOut && animate);
|
|
3440
|
+
};
|
|
3439
3441
|
this.clearTimers();
|
|
3440
3442
|
this.isDelayedHide = delay;
|
|
3441
3443
|
if (delay && this.isDelaying()) {
|
|
@@ -4285,7 +4287,47 @@
|
|
|
4285
4287
|
}
|
|
4286
4288
|
};
|
|
4287
4289
|
|
|
4290
|
+
var Media = {
|
|
4291
|
+
props: {
|
|
4292
|
+
media: Boolean
|
|
4293
|
+
},
|
|
4294
|
+
data: {
|
|
4295
|
+
media: false
|
|
4296
|
+
},
|
|
4297
|
+
connected() {
|
|
4298
|
+
const media = toMedia(this.media, this.$el);
|
|
4299
|
+
this.matchMedia = true;
|
|
4300
|
+
if (media) {
|
|
4301
|
+
this.mediaObj = window.matchMedia(media);
|
|
4302
|
+
const handler = () => {
|
|
4303
|
+
this.matchMedia = this.mediaObj.matches;
|
|
4304
|
+
trigger(this.$el, createEvent("mediachange", false, true, [this.mediaObj]));
|
|
4305
|
+
};
|
|
4306
|
+
this.offMediaObj = on(this.mediaObj, "change", () => {
|
|
4307
|
+
handler();
|
|
4308
|
+
this.$emit("resize");
|
|
4309
|
+
});
|
|
4310
|
+
handler();
|
|
4311
|
+
}
|
|
4312
|
+
},
|
|
4313
|
+
disconnected() {
|
|
4314
|
+
var _a;
|
|
4315
|
+
(_a = this.offMediaObj) == null ? void 0 : _a.call(this);
|
|
4316
|
+
}
|
|
4317
|
+
};
|
|
4318
|
+
function toMedia(value, element) {
|
|
4319
|
+
if (isString(value)) {
|
|
4320
|
+
if (startsWith(value, "@")) {
|
|
4321
|
+
value = toFloat(css(element, `--uk-breakpoint-${value.slice(1)}`));
|
|
4322
|
+
} else if (isNaN(value)) {
|
|
4323
|
+
return value;
|
|
4324
|
+
}
|
|
4325
|
+
}
|
|
4326
|
+
return value && isNumeric(value) ? `(min-width: ${value}px)` : "";
|
|
4327
|
+
}
|
|
4328
|
+
|
|
4288
4329
|
var heightViewport = {
|
|
4330
|
+
mixins: [Media],
|
|
4289
4331
|
props: {
|
|
4290
4332
|
expand: Boolean,
|
|
4291
4333
|
offsetTop: Boolean,
|
|
@@ -4310,6 +4352,9 @@
|
|
|
4310
4352
|
if (!isVisible(this.$el)) {
|
|
4311
4353
|
return false;
|
|
4312
4354
|
}
|
|
4355
|
+
if (!this.matchMedia) {
|
|
4356
|
+
return { minHeight: false };
|
|
4357
|
+
}
|
|
4313
4358
|
let minHeight = "";
|
|
4314
4359
|
const box = boxModelAdjust(this.$el, "height", "content-box");
|
|
4315
4360
|
const { body, scrollingElement } = document;
|
|
@@ -4346,12 +4391,18 @@
|
|
|
4346
4391
|
return { minHeight };
|
|
4347
4392
|
},
|
|
4348
4393
|
write({ minHeight }) {
|
|
4349
|
-
css(
|
|
4394
|
+
css(
|
|
4395
|
+
this.$el,
|
|
4396
|
+
this.property,
|
|
4397
|
+
minHeight === false ? "" : `max(${this.min || 0}px, ${minHeight})`
|
|
4398
|
+
);
|
|
4350
4399
|
},
|
|
4351
4400
|
events: ["resize"]
|
|
4352
4401
|
}
|
|
4353
4402
|
};
|
|
4354
4403
|
|
|
4404
|
+
var accordionIcon = "<svg width=\"13\" height=\"13\"><style>.uk-accordion-icon svg>[class*="line-"]{transition:0.2s ease-out;transition-property:transform, opacity;transform-origin:center}[aria-expanded="true"] .uk-accordion-icon svg>.line-1{transform:rotate(-45deg);opacity:0}[aria-expanded="true"] .uk-accordion-icon svg>.line-2{transform:rotate(90deg)}</style><rect width=\"13\" height=\"1\" fill=\"#000\" x=\"0\" y=\"6\" class=\"line-1\"/><rect width=\"1\" height=\"13\" fill=\"#000\" x=\"6\" y=\"0\" class=\"line-2\"/></svg>";
|
|
4405
|
+
|
|
4355
4406
|
var closeIcon = "<svg width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" class=\"lucide lucide-x\" viewBox=\"0 0 24 24\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>";
|
|
4356
4407
|
|
|
4357
4408
|
var closeLarge = "<svg width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" class=\"lucide lucide-x\" viewBox=\"0 0 24 24\"><path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/></svg>";
|
|
@@ -4388,8 +4439,6 @@
|
|
|
4388
4439
|
|
|
4389
4440
|
var slidenavPrevious = "<svg width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" class=\"lucide lucide-arrow-left\" viewBox=\"0 0 24 24\"><path d=\"m12 19-7-7 7-7\"/><path d=\"M19 12H5\"/></svg>";
|
|
4390
4441
|
|
|
4391
|
-
var spinner = "<svg width=\"30\" height=\"30\"><circle fill=\"none\" stroke=\"#000\" cx=\"15\" cy=\"15\" r=\"14\"/></svg>";
|
|
4392
|
-
|
|
4393
4442
|
var totop = "<svg width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" class=\"lucide lucide-circle-chevron-up\" viewBox=\"0 0 24 24\"><circle cx=\"12\" cy=\"12\" r=\"10\"/><path d=\"m8 14 4-4 4 4\"/></svg>";
|
|
4394
4443
|
|
|
4395
4444
|
var I18n = {
|
|
@@ -4493,9 +4542,10 @@
|
|
|
4493
4542
|
});
|
|
4494
4543
|
|
|
4495
4544
|
const icons = {
|
|
4496
|
-
spinner,
|
|
4545
|
+
spinner: '<svg width="30" height="30" viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#000" cx="15" cy="15" r="14" /></svg>',
|
|
4497
4546
|
totop,
|
|
4498
4547
|
marker,
|
|
4548
|
+
"accordion-icon": accordionIcon,
|
|
4499
4549
|
"close-icon": closeIcon,
|
|
4500
4550
|
"close-large": closeLarge,
|
|
4501
4551
|
"drop-parent-icon": dropParentIcon,
|
|
@@ -4925,45 +4975,6 @@
|
|
|
4925
4975
|
return true;
|
|
4926
4976
|
}
|
|
4927
4977
|
|
|
4928
|
-
var Media = {
|
|
4929
|
-
props: {
|
|
4930
|
-
media: Boolean
|
|
4931
|
-
},
|
|
4932
|
-
data: {
|
|
4933
|
-
media: false
|
|
4934
|
-
},
|
|
4935
|
-
connected() {
|
|
4936
|
-
const media = toMedia(this.media, this.$el);
|
|
4937
|
-
this.matchMedia = true;
|
|
4938
|
-
if (media) {
|
|
4939
|
-
this.mediaObj = window.matchMedia(media);
|
|
4940
|
-
const handler = () => {
|
|
4941
|
-
this.matchMedia = this.mediaObj.matches;
|
|
4942
|
-
trigger(this.$el, createEvent("mediachange", false, true, [this.mediaObj]));
|
|
4943
|
-
};
|
|
4944
|
-
this.offMediaObj = on(this.mediaObj, "change", () => {
|
|
4945
|
-
handler();
|
|
4946
|
-
this.$emit("resize");
|
|
4947
|
-
});
|
|
4948
|
-
handler();
|
|
4949
|
-
}
|
|
4950
|
-
},
|
|
4951
|
-
disconnected() {
|
|
4952
|
-
var _a;
|
|
4953
|
-
(_a = this.offMediaObj) == null ? void 0 : _a.call(this);
|
|
4954
|
-
}
|
|
4955
|
-
};
|
|
4956
|
-
function toMedia(value, element) {
|
|
4957
|
-
if (isString(value)) {
|
|
4958
|
-
if (startsWith(value, "@")) {
|
|
4959
|
-
value = toFloat(css(element, `--uk-breakpoint-${value.slice(1)}`));
|
|
4960
|
-
} else if (isNaN(value)) {
|
|
4961
|
-
return value;
|
|
4962
|
-
}
|
|
4963
|
-
}
|
|
4964
|
-
return value && isNumeric(value) ? `(min-width: ${value}px)` : "";
|
|
4965
|
-
}
|
|
4966
|
-
|
|
4967
4978
|
var leader = {
|
|
4968
4979
|
mixins: [Class, Media],
|
|
4969
4980
|
props: {
|
|
@@ -5294,20 +5305,20 @@
|
|
|
5294
5305
|
};
|
|
5295
5306
|
modal.alert = function(message, options) {
|
|
5296
5307
|
return openDialog(
|
|
5297
|
-
({ i18n }) => `<div class="uk-modal-body">${isString(message) ? message : html(message)}</div>
|
|
5308
|
+
({ i18n }) => `<div class="uk-modal-body">${isString(message) ? message : html(message)}</div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-primary uk-modal-close" type="button" autofocus>${i18n.ok}</button> </div>`,
|
|
5298
5309
|
options
|
|
5299
5310
|
);
|
|
5300
5311
|
};
|
|
5301
5312
|
modal.confirm = function(message, options) {
|
|
5302
5313
|
return openDialog(
|
|
5303
|
-
({ i18n }) => `<form>
|
|
5314
|
+
({ i18n }) => `<form> <div class="uk-modal-body">${isString(message) ? message : html(message)}</div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">${i18n.cancel}</button> <button class="uk-button uk-button-primary" autofocus>${i18n.ok}</button> </div> </form>`,
|
|
5304
5315
|
options,
|
|
5305
5316
|
() => Promise.reject()
|
|
5306
5317
|
);
|
|
5307
5318
|
};
|
|
5308
5319
|
modal.prompt = function(message, value, options) {
|
|
5309
5320
|
const promise = openDialog(
|
|
5310
|
-
({ i18n }) => `<form class="uk-form-stacked">
|
|
5321
|
+
({ i18n }) => `<form class="uk-form-stacked"> <div class="uk-modal-body"> <label>${isString(message) ? message : html(message)}</label> <input class="uk-input" autofocus> </div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-default uk-modal-close" type="button">${i18n.cancel}</button> <button class="uk-button uk-button-primary">${i18n.ok}</button> </div> </form>`,
|
|
5311
5322
|
options,
|
|
5312
5323
|
() => null,
|
|
5313
5324
|
() => input.value
|
|
@@ -5585,16 +5596,23 @@
|
|
|
5585
5596
|
|
|
5586
5597
|
var overflowFade = {
|
|
5587
5598
|
data: {
|
|
5599
|
+
threshold: 5,
|
|
5588
5600
|
fadeDuration: 0.05
|
|
5589
5601
|
},
|
|
5590
|
-
events:
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5602
|
+
events: [
|
|
5603
|
+
{
|
|
5604
|
+
name: "scroll",
|
|
5605
|
+
self: true,
|
|
5606
|
+
passive: true,
|
|
5607
|
+
handler() {
|
|
5608
|
+
this.$emit();
|
|
5609
|
+
}
|
|
5610
|
+
},
|
|
5611
|
+
{
|
|
5612
|
+
name: pointerDown,
|
|
5613
|
+
handler: handleMouseDrag
|
|
5596
5614
|
}
|
|
5597
|
-
|
|
5615
|
+
],
|
|
5598
5616
|
observe: [
|
|
5599
5617
|
mutation({
|
|
5600
5618
|
options: {
|
|
@@ -5635,6 +5653,40 @@
|
|
|
5635
5653
|
events: ["resize"]
|
|
5636
5654
|
}
|
|
5637
5655
|
};
|
|
5656
|
+
function handleMouseDrag(e) {
|
|
5657
|
+
const { target, button, defaultPrevented } = e;
|
|
5658
|
+
if (defaultPrevented || button > 0 || isTouch(e) || target.closest(selInput) || isInput(target)) {
|
|
5659
|
+
return;
|
|
5660
|
+
}
|
|
5661
|
+
e.preventDefault();
|
|
5662
|
+
const pointerOptions = { passive: false, capture: true };
|
|
5663
|
+
const { $el: el, threshold, $options } = this;
|
|
5664
|
+
let started;
|
|
5665
|
+
const off = on(document, pointerMove, move(e), pointerOptions);
|
|
5666
|
+
on(document, [pointerUp, pointerCancel], end, { capture: true, once: true });
|
|
5667
|
+
function move(e2) {
|
|
5668
|
+
let origin = getEventPos(e2);
|
|
5669
|
+
let pos = origin;
|
|
5670
|
+
let lastPos = pos;
|
|
5671
|
+
return function(e3) {
|
|
5672
|
+
lastPos = pos;
|
|
5673
|
+
pos = getEventPos(e3);
|
|
5674
|
+
const isVertical = hasClass(el, `${$options.id}-vertical`);
|
|
5675
|
+
const prop = isVertical ? "y" : "x";
|
|
5676
|
+
started || (started = Math.abs(pos[prop] - origin[prop]) > threshold);
|
|
5677
|
+
if (started) {
|
|
5678
|
+
const delta = lastPos[prop] - pos[prop];
|
|
5679
|
+
el[isVertical ? "scrollTop" : "scrollLeft"] += delta;
|
|
5680
|
+
}
|
|
5681
|
+
};
|
|
5682
|
+
}
|
|
5683
|
+
function end() {
|
|
5684
|
+
off();
|
|
5685
|
+
if (started) {
|
|
5686
|
+
setTimeout(on(el, "click", (e2) => e2.preventDefault(), pointerOptions));
|
|
5687
|
+
}
|
|
5688
|
+
}
|
|
5689
|
+
}
|
|
5638
5690
|
|
|
5639
5691
|
var responsive = {
|
|
5640
5692
|
props: ["width", "height"],
|
|
@@ -6671,6 +6723,7 @@
|
|
|
6671
6723
|
var components = /*#__PURE__*/Object.freeze({
|
|
6672
6724
|
__proto__: null,
|
|
6673
6725
|
Accordion: Accordion,
|
|
6726
|
+
AccordionIcon: IconComponent,
|
|
6674
6727
|
Alert: alert,
|
|
6675
6728
|
Close: Close,
|
|
6676
6729
|
Cover: cover,
|