uikit 3.16.27 → 3.17.1-dev.7c0766a6f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/build/less.js +5 -4
- package/build/util.js +7 -9
- package/dist/css/uikit-core-rtl.css +53 -18
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +53 -18
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +56 -17
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +56 -17
- 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 +24 -43
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +2 -3
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +2 -3
- 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 +7 -17
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +6 -13
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +2 -2
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +6 -13
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +19 -4
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +24 -43
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -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 +455 -185
- 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 +483 -240
- package/dist/js/uikit.min.js +1 -9502
- package/package.json +1 -1
- package/src/js/api/boot.js +2 -2
- package/src/js/api/computed.js +1 -1
- package/src/js/api/observables.js +1 -4
- package/src/js/components/notification.js +1 -1
- package/src/js/components/slideshow.js +19 -2
- package/src/js/core/cover.js +30 -1
- package/src/js/core/drop.js +15 -9
- package/src/js/core/dropnav.js +16 -2
- package/src/js/core/grid.js +119 -64
- package/src/js/core/height-viewport.js +4 -1
- package/src/js/core/margin.js +23 -39
- package/src/js/core/navbar.js +219 -1
- package/src/js/core/scrollspy-nav.js +13 -4
- package/src/js/core/scrollspy.js +1 -1
- package/src/js/core/sticky.js +10 -11
- package/src/js/mixin/internal/animate-fade.js +1 -11
- package/src/js/mixin/internal/slideshow-animations.js +1 -1
- package/src/js/mixin/slider-reactive.js +1 -1
- package/src/js/mixin/togglable.js +0 -2
- package/src/js/util/animation.js +19 -13
- package/src/js/util/class.js +30 -26
- package/src/js/util/dom.js +3 -8
- package/src/js/util/filter.js +2 -6
- package/src/js/util/viewport.js +26 -4
- package/src/less/components/base.less +6 -3
- package/src/less/components/form.less +3 -0
- package/src/less/components/heading.less +18 -0
- package/src/less/components/navbar.less +6 -12
- package/src/less/components/pagination.less +13 -6
- package/src/less/components/position.less +1 -0
- package/src/less/components/section.less +6 -0
- package/src/less/theme/heading.less +4 -0
- package/src/less/theme/navbar.less +5 -0
- package/src/scss/components/base.scss +4 -2
- package/src/scss/components/form.scss +3 -0
- package/src/scss/components/heading.scss +13 -0
- package/src/scss/components/navbar.scss +5 -12
- package/src/scss/components/pagination.scss +13 -6
- package/src/scss/components/position.scss +1 -0
- package/src/scss/components/section.scss +4 -0
- package/src/scss/mixins-theme.scss +13 -1
- package/src/scss/mixins.scss +8 -1
- package/src/scss/theme/heading.scss +4 -0
- package/src/scss/variables-theme.scss +7 -0
- package/src/scss/variables.scss +7 -0
- package/tests/cover.html +2 -2
- package/tests/drop.html +13 -7
- package/tests/dropnav.html +22 -10
- package/tests/filter.html +5 -5
- package/tests/form.html +1 -1
- package/tests/grid-masonry.html +49 -73
- package/tests/grid-parallax.html +82 -40
- package/tests/grid.html +21 -3
- package/tests/heading.html +33 -4
- package/tests/height-viewport.html +3 -3
- package/tests/height.html +2 -2
- package/tests/icon.html +1 -1
- package/tests/image.html +6 -6
- package/tests/leader.html +3 -3
- package/tests/nav.html +1 -1
- package/tests/navbar.html +28 -10
- package/tests/notification.html +1 -1
- package/tests/offcanvas.html +2 -2
- package/tests/parallax.html +1 -1
- package/tests/scrollspy.html +3 -3
- package/tests/sortable.html +3 -3
- package/tests/sticky-navbar.html +233 -14
- package/tests/sticky.html +8 -8
- package/tests/svg.html +1 -1
- package/tests/tab.html +1 -1
- package/tests/toggle.html +2 -2
- package/tests/tooltip.html +2 -2
- package/tests/upload.html +16 -16
- package/tests/utility.html +2 -2
- package/tests/video.html +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.
|
|
1
|
+
/*! UIkit 3.17.1-dev.7c0766a6f | 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')) :
|
|
@@ -45,62 +45,51 @@
|
|
|
45
45
|
],
|
|
46
46
|
update: {
|
|
47
47
|
read() {
|
|
48
|
-
const rows = getRows(this.$el.children);
|
|
49
48
|
return {
|
|
50
|
-
rows
|
|
51
|
-
columns: getColumns(rows)
|
|
49
|
+
rows: getRows(uikitUtil.toArray(this.$el.children))
|
|
52
50
|
};
|
|
53
51
|
},
|
|
54
|
-
write({
|
|
52
|
+
write({ rows }) {
|
|
55
53
|
for (const row of rows) {
|
|
56
|
-
for (const
|
|
57
|
-
uikitUtil.toggleClass(
|
|
58
|
-
uikitUtil.toggleClass(
|
|
54
|
+
for (const el of row) {
|
|
55
|
+
uikitUtil.toggleClass(el, this.margin, rows[0] !== row);
|
|
56
|
+
uikitUtil.toggleClass(el, this.firstColumn, row[uikitUtil.isRtl ? row.length - 1 : 0] === el);
|
|
59
57
|
}
|
|
60
58
|
}
|
|
61
59
|
},
|
|
62
60
|
events: ["resize"]
|
|
63
61
|
}
|
|
64
62
|
});
|
|
65
|
-
function getRows(
|
|
66
|
-
return sortBy(items, "top", "bottom");
|
|
67
|
-
}
|
|
68
|
-
function getColumns(rows) {
|
|
69
|
-
const columns = [];
|
|
70
|
-
for (const row of rows) {
|
|
71
|
-
const sorted = sortBy(row, "left", "right");
|
|
72
|
-
for (let j = 0; j < sorted.length; j++) {
|
|
73
|
-
columns[j] = columns[j] ? columns[j].concat(sorted[j]) : sorted[j];
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return uikitUtil.isRtl ? columns.reverse() : columns;
|
|
77
|
-
}
|
|
78
|
-
function sortBy(items, startProp, endProp) {
|
|
63
|
+
function getRows(elements) {
|
|
79
64
|
const sorted = [[]];
|
|
80
|
-
|
|
65
|
+
const withOffset = elements.some(
|
|
66
|
+
(el, i) => i && elements[i - 1].offsetParent !== el.offsetParent
|
|
67
|
+
);
|
|
68
|
+
for (const el of elements) {
|
|
81
69
|
if (!uikitUtil.isVisible(el)) {
|
|
82
70
|
continue;
|
|
83
71
|
}
|
|
84
|
-
|
|
72
|
+
const offset = getOffset(el, withOffset);
|
|
85
73
|
for (let i = sorted.length - 1; i >= 0; i--) {
|
|
86
74
|
const current = sorted[i];
|
|
87
75
|
if (!current[0]) {
|
|
88
76
|
current.push(el);
|
|
89
77
|
break;
|
|
90
78
|
}
|
|
91
|
-
|
|
92
|
-
if (
|
|
93
|
-
startDim = getOffset(current[0]);
|
|
94
|
-
} else {
|
|
95
|
-
dim = getOffset(el, true);
|
|
96
|
-
startDim = getOffset(current[0], true);
|
|
97
|
-
}
|
|
98
|
-
if (dim[startProp] >= startDim[endProp] - 1 && dim[startProp] !== startDim[startProp]) {
|
|
79
|
+
const offsetCurrent = getOffset(current[0], withOffset);
|
|
80
|
+
if (offset.top >= offsetCurrent.bottom - 1 && offset.top !== offsetCurrent.top) {
|
|
99
81
|
sorted.push([el]);
|
|
100
82
|
break;
|
|
101
83
|
}
|
|
102
|
-
if (
|
|
103
|
-
current.
|
|
84
|
+
if (offset.bottom - 1 > offsetCurrent.top || offset.top === offsetCurrent.top) {
|
|
85
|
+
let j = current.length - 1;
|
|
86
|
+
for (; j >= 0; j--) {
|
|
87
|
+
const offsetCurrent2 = getOffset(current[j], withOffset);
|
|
88
|
+
if (offset.left >= offsetCurrent2.left) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
current.splice(j + 1, 0, el);
|
|
104
93
|
break;
|
|
105
94
|
}
|
|
106
95
|
if (i === 0) {
|
|
@@ -198,15 +187,7 @@
|
|
|
198
187
|
);
|
|
199
188
|
}
|
|
200
189
|
function getTransitionNodes(target) {
|
|
201
|
-
return getRows(uikitUtil.children(target)).
|
|
202
|
-
(nodes, row) => nodes.concat(
|
|
203
|
-
uikitUtil.sortBy(
|
|
204
|
-
row.filter((el) => uikitUtil.isInView(el)),
|
|
205
|
-
"offsetLeft"
|
|
206
|
-
)
|
|
207
|
-
),
|
|
208
|
-
[]
|
|
209
|
-
);
|
|
190
|
+
return getRows(uikitUtil.children(target)).flat().filter(uikitUtil.isInView);
|
|
210
191
|
}
|
|
211
192
|
function awaitFrame$1() {
|
|
212
193
|
return new Promise((resolve) => requestAnimationFrame(resolve));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.
|
|
1
|
+
/*! UIkit 3.17.1-dev.7c0766a6f | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(e,g){typeof exports=="object"&&typeof module<"u"?module.exports=g(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitsortable",["uikit-util"],g):(e=typeof globalThis<"u"?globalThis:e||self,e.UIkitSortable=g(e.UIkit.util))})(this,function(e){"use strict";function g(n){return y(e.observeResize,n,"resize")}function B(n){return y(e.observeMutation,n)}function y(n,s,o){return{observe:n,handler(){this.$emit(o)},...s}}B({options:{childList:!0,attributes:!0,attributeFilter:["style"]}}),g({target:({$el:n})=>[n,...e.children(n)]});function C(n){const s=[[]],o=n.some((t,c)=>c&&n[c-1].offsetParent!==t.offsetParent);for(const t of n){if(!e.isVisible(t))continue;const c=u(t,o);for(let a=s.length-1;a>=0;a--){const r=s[a];if(!r[0]){r.push(t);break}const h=u(r[0],o);if(c.top>=h.bottom-1&&c.top!==h.top){s.push([t]);break}if(c.bottom-1>h.top||c.top===h.top){let d=r.length-1;for(;d>=0;d--){const p=u(r[d],o);if(c.left>=p.left)break}r.splice(d+1,0,t);break}if(a===0){s.unshift([t]);break}}}return s}function u(n,s=!1){let{offsetTop:o,offsetLeft:t,offsetHeight:c,offsetWidth:a}=n;return s&&([o,t]=e.offsetPosition(n)),{top:o,left:t,bottom:o+c,right:t+a}}const v="uk-transition-leave",w="uk-transition-enter";function P(n,s,o,t=0){const c=b(s,!0),a={opacity:1},r={opacity:0},h=i=>()=>c===b(s)?i():Promise.reject(),d=h(async()=>{e.addClass(s,v),await Promise.all(S(s).map((i,l)=>new Promise(f=>setTimeout(()=>e.Transition.start(i,r,o/2,"ease").then(f),l*t)))),e.removeClass(s,v)}),p=h(async()=>{const i=e.height(s);e.addClass(s,w),n(),e.css(e.children(s),{opacity:0}),await N();const l=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,i);const m=S(s);e.css(l,r);const R=m.map(async(K,Q)=>{await z(Q*t),await e.Transition.start(K,a,o/2,"ease")});i!==f&&R.push(e.Transition.start(s,{height:f},o/2+m.length*t,"ease")),await Promise.all(R).then(()=>{e.removeClass(s,w),c===b(s)&&(e.css(s,{height:"",alignContent:""}),e.css(l,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,v)?T(s).then(p):e.hasClass(s,w)?T(s).then(d).then(p):d().then(p)}function b(n,s){return s&&(n.dataset.transition=1+b(n)),e.toNumber(n.dataset.transition)||0}function T(n){return Promise.all(e.children(n).filter(e.Transition.inProgress).map(s=>new Promise(o=>e.once(s,"transitionend transitioncanceled",o))))}function S(n){return C(e.children(n)).flat().filter(e.isInView)}function N(){return new Promise(n=>requestAnimationFrame(n))}function z(n){return new Promise(s=>setTimeout(s,n))}async function A(n,s,o){await $();let t=e.children(s);const c=t.map(f=>x(f,!0)),a={...e.css(s,["height","padding"]),display:"block"};await Promise.all(t.concat(s).map(e.Transition.cancel)),n(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve(),e.fastdom.flush();const r=e.attr(s,"style"),h=e.css(s,["height","padding"]),[d,p]=H(s,t,c),i=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,m)=>p[m]&&e.css(f,p[m])),e.css(s,a),e.trigger(s,"scroll"),e.fastdom.flush(),await $();const l=t.map((f,m)=>e.parent(f)===s&&e.Transition.start(f,d[m],o,"ease")).concat(e.Transition.start(s,h,o,"ease"));try{await Promise.all(l),t.forEach((f,m)=>{e.attr(f,i[m]),e.parent(f)===s&&e.css(f,"display",d[m].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),L(s,a)}}function x(n,s){const o=e.css(n,"zIndex");return e.isVisible(n)?{display:"",opacity:s?e.css(n,"opacity"):"0",pointerEvents:"none",position:"absolute",zIndex:o==="auto"?e.index(n):o,...I(n)}:!1}function H(n,s,o){const t=s.map((a,r)=>e.parent(a)&&r in o?o[r]?e.isVisible(a)?I(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=e.parent(s[r])===n&&(o[r]||x(s[r]));if(!h)return!1;if(!a)delete h.opacity;else if(!("opacity"in a)){const{opacity:d}=h;d%1?a.opacity=1:delete h.opacity}return h});return[t,c]}function L(n,s){for(const o in s)e.css(n,o,"")}function I(n){const{height:s,width:o}=e.offset(n);return{height:s,width:o,transform:"",...e.position(n),...e.css(n,["marginTop","marginLeft"])}}function $(){return new Promise(n=>requestAnimationFrame(n))}var M={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(n,s=this.$el){const o=this.animation;return(o==="fade"?P:o==="delayed-fade"?(...c)=>P(...c,40):o?A:()=>(n(),Promise.resolve()))(n,s,this.duration).catch(e.noop)}}},V={connected(){e.addClass(this.$el,this.$options.id)}},D={mixins:[V,M],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},created(){for(const n of["init","start","move","end"]){const s=this[n];this[n]=o=>{e.assign(this.pos,e.getEventPos(o)),s(o)}}},events:{name:e.pointerDown,passive:!1,handler:"init"},computed:{target(){return(this.$el.tBodies||[this.$el])[0]},items(){return e.children(this.target)},isEmpty(){return e.isEmpty(this.items)},handles({handle:n},s){return n?e.$$(n,s):this.items}},watch:{isEmpty(n){e.toggleClass(this.target,this.clsEmpty,n)},handles(n,s){e.css(s,{touchAction:"",userSelect:""}),e.css(n,{touchAction:e.hasTouch?"none":"",userSelect:"none"})}},update:{write(n){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:o},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;e.css(this.drag,{top:o-t,left:s-c});const r=this.getSortable(document.elementFromPoint(s,o));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=W(h,{x:s,y:o});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),i=G(r.target,d,a,s,o,r===p&&n.moved!==d);i!==!1&&(i&&a===i||(r!==p?(p.remove(a),n.moved=d):delete n.moved,r.insert(a,i),this.touched.add(r)))},events:["move"]},methods:{init(n){const{target:s,button:o,defaultPrevented:t}=n,[c]=this.items.filter(a=>e.within(s,a));!c||t||o>0||e.isInput(s)||e.within(s,`.${this.clsNoDrag}`)||this.handle&&!e.within(s,this.handle)||(n.preventDefault(),this.touched=new Set([this]),this.placeholder=c,this.origin={target:s,index:e.index(c),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(n))},start(n){this.drag=O(this.$container,this.placeholder);const{left:s,top:o}=this.placeholder.getBoundingClientRect();e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-o}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),j(this.pos),this.move(n)},move(n){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(n)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;q();const n=this.getSortable(this.placeholder);this===n?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(n.$el,"added",[n,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:o}of this.touched)for(const t of this.touched)e.removeClass(t.items,s,o);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(n,s){e.addClass(this.items,this.clsItem);const o=()=>s?e.before(s,n):e.append(this.target,n);this.animate(o)},remove(n){e.within(n,this.target)&&this.animate(()=>e.remove(n))},getSortable(n){do{const s=this.$getComponent(n,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(n=e.parent(n))}}};let E;function j(n){let s=Date.now();E=setInterval(()=>{let{x:o,y:t}=n;t+=document.scrollingElement.scrollTop;const c=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(o,n.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:p,height:i}=e.offsetViewport(a);if(d<t&&d+35>t)r-=c;else if(p>t&&p-35<t)r+=c;else return;if(r>0&&r<h-i)return a.scrollTop=r,!0})},15)}function q(){clearInterval(E)}function O(n,s){let o;if(e.isTag(s,"li","tr")){o=e.$("<div>"),e.append(o,s.cloneNode(!0).children);for(const t of s.getAttributeNames())e.attr(o,t,s.getAttribute(t))}else o=s.cloneNode(!0);return e.append(n,o),e.css(o,"margin","0","important"),e.css(o,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(o.firstElementChild,e.height(s.firstElementChild)),o}function W(n,s){return n[e.findIndex(n,o=>e.pointInRect(s,o.getBoundingClientRect()))]}function G(n,s,o,t,c,a){if(!e.children(n).length)return;const r=s.getBoundingClientRect();if(!a)return J(n,o)||c<r.top+r.height/2?s:s.nextElementSibling;const h=o.getBoundingClientRect(),d=F([r.top,r.bottom],[h.top,h.bottom]),[p,i,l,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],m=h[i]<r[i]?r[i]-h[i]:0;return h[l]<r[l]?m&&p<r[l]+m?!1:s.nextElementSibling:m&&p>r[f]-m?!1:s}function J(n,s){const o=e.children(n).length===1;o&&e.append(n,s);const t=e.children(n),c=t.some((a,r)=>{const h=a.getBoundingClientRect();return t.slice(r+1).some(d=>{const p=d.getBoundingClientRect();return!F([h.left,h.right],[p.left,p.right])})});return o&&e.remove(s),c}function F(n,s){return n[1]>s[0]&&s[1]>n[0]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("sortable",D),D});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.
|
|
1
|
+
/*! UIkit 3.17.1-dev.7c0766a6f | 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')) :
|
|
@@ -280,7 +280,6 @@
|
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
function toggleAnimation(el, show, cmp) {
|
|
283
|
-
util.Animation.cancel(el);
|
|
284
283
|
const { animation, duration, _toggle } = cmp;
|
|
285
284
|
if (show) {
|
|
286
285
|
_toggle(el, true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.
|
|
1
|
+
/*! UIkit 3.17.1-dev.7c0766a6f | 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}){return!!s[0]},hasTransition({animation:s}){return["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],u=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)),k=t.toFloat(t.css(s,w)),f=l[m]+k;!U&&!i&&(g+=k);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};u&&(t.css(s,p,f-g+y),x[p]=i?y:f+y),!u^c==="reveal"&&(t.css($,p,-f+g),t.Transition.start($,{[p]:i?0:-f},o,h));try{await t.Transition.start(s,x,o,h)}finally{t.css(s,j),t.unwrap($.firstChild),i||r(s,!1)}}function N(s,i,e){const{animation:o,duration:n,_toggle:h}=e;return i?(h(s,!0),t.Animation.in(s,o[0],n,e.origin)):t.Animation.out(s,o[1]||o[0],n,e.origin).then(()=>h(s,!1))}const _={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var P={mixins:[S,B,A],args:"title",props:{delay:Number,title:String},data:{pos:"top",title:"",delay:0,animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},beforeConnect(){this.id=d(this,{}),this._hasTitle=t.hasAttr(this.$el,"title"),t.attr(this.$el,{title:"","aria-describedby":this.id}),F(this.$el)},disconnected(){this.hide(),t.attr(this.$el,"title")||t.attr(this.$el,"title",this._hasTitle?this.title:null)},methods:{show(){this.isToggled(this.tooltip||null)||!this.title||(clearTimeout(this.showTimer),this.showTimer=setTimeout(this._show,this.delay))},async hide(){t.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&await this.toggleElement(this.tooltip,!1,!1),t.remove(this.tooltip),this.tooltip=null)},async _show(){this.tooltip=t.append(this.container,`<div id="${this.id}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${this.title}</div> </div>`),t.on(this.tooltip,"toggled",(s,i)=>{if(!i)return;const e=()=>this.positionAt(this.tooltip,this.$el);e();const[o,n]=L(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?`${t.flipPosition(o)}-${n}`:`${n}-${t.flipPosition(o)}`;const h=[t.once(document,`keydown ${t.pointerDown}`,this.hide,!1,r=>r.type===t.pointerDown&&!t.within(r.target,this.$el)||r.type==="keydown"&&r.keyCode===_.ESC),t.on([document,...t.overflowParents(this.$el)],"scroll",e,{passive:!0})];t.once(this.tooltip,"hide",()=>h.forEach(r=>r()),{self:!0})}),await this.toggleElement(this.tooltip,!0)||this.hide()}},events:{focus:"show",blur:"hide",[`${t.pointerEnter} ${t.pointerLeave}`](s){t.isTouch(s)||this[s.type===t.pointerEnter?"show":"hide"]()},[t.pointerDown](s){t.isTouch(s)&&this.show()}}};function F(s){t.isFocusable(s)||t.attr(s,"tabindex","0")}function L(s,i,[e,o]){const n=t.offset(s),h=t.offset(i),r=[["left","right"],["top","bottom"]];for(const c of r){if(n[c[0]]>=h[c[1]]){e=c[1];break}if(n[c[1]]<=h[c[0]]){e=c[0];break}}const a=t.includes(r[0],e)?r[1]:r[0];return n[a[0]]===h[a[0]]?o=a[0]:n[a[1]]===h[a[1]]?o=a[1]:o="center",[e,o]}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",P),P});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.
|
|
1
|
+
/*! UIkit 3.17.1-dev.7c0766a6f | 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.
|
|
1
|
+
/*! UIkit 3.17.1-dev.7c0766a6f | 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});
|