uikit 3.19.5-dev.66a60877b → 3.19.5-dev.74c343fa4
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 +2 -1
- package/dist/css/uikit-core-rtl.css +2 -2
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +2 -2
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +2 -2
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +2 -2
- 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 +87 -87
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +40 -30
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +40 -30
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +40 -30
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +40 -30
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +40 -30
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +87 -87
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +81 -74
- 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 +167 -163
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/computed.js +20 -26
- package/src/js/core/height-placeholder.js +4 -1
- package/src/js/core/margin.js +5 -0
- package/src/js/core/modal.js +5 -6
- package/src/js/core/scrollspy.js +0 -3
- package/src/js/core/sticky.js +1 -1
- package/src/js/core/switcher.js +4 -1
- package/src/js/core/toggle.js +6 -3
- package/src/js/mixin/internal/animate-fade.js +2 -7
- package/src/js/mixin/internal/animate-slide.js +2 -7
- package/src/js/mixin/parallax.js +7 -3
- package/src/js/util/fastdom.js +6 -13
- package/src/js/util/filter.js +6 -3
- package/src/js/util/selector.js +31 -22
- package/src/js/util/svg.js +4 -1
- package/src/less/components/utility.less +1 -1
- package/src/scss/components/utility.scss +1 -1
- package/tests/base.html +1 -1
- package/tests/js/index.js +12 -10
- package/tests/switcher.html +86 -86
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.19.5-dev.
|
|
1
|
+
/*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -72,6 +72,11 @@
|
|
|
72
72
|
firstColumn: "uk-first-column"
|
|
73
73
|
},
|
|
74
74
|
observe: [
|
|
75
|
+
mutation({
|
|
76
|
+
options: {
|
|
77
|
+
childList: true
|
|
78
|
+
}
|
|
79
|
+
}),
|
|
75
80
|
mutation({
|
|
76
81
|
options: {
|
|
77
82
|
attributes: true,
|
|
@@ -153,99 +158,15 @@
|
|
|
153
158
|
};
|
|
154
159
|
}
|
|
155
160
|
|
|
156
|
-
const clsLeave = "uk-transition-leave";
|
|
157
|
-
const clsEnter = "uk-transition-enter";
|
|
158
|
-
function fade(action, target, duration, stagger = 0) {
|
|
159
|
-
const index = transitionIndex(target, true);
|
|
160
|
-
const propsIn = { opacity: 1 };
|
|
161
|
-
const propsOut = { opacity: 0 };
|
|
162
|
-
const wrapIndexFn = (fn) => () => index === transitionIndex(target) ? fn() : Promise.reject();
|
|
163
|
-
const leaveFn = wrapIndexFn(async () => {
|
|
164
|
-
uikitUtil.addClass(target, clsLeave);
|
|
165
|
-
await Promise.all(
|
|
166
|
-
getTransitionNodes(target).map(
|
|
167
|
-
(child, i) => new Promise(
|
|
168
|
-
(resolve) => setTimeout(
|
|
169
|
-
() => uikitUtil.Transition.start(child, propsOut, duration / 2, "ease").then(
|
|
170
|
-
resolve
|
|
171
|
-
),
|
|
172
|
-
i * stagger
|
|
173
|
-
)
|
|
174
|
-
)
|
|
175
|
-
)
|
|
176
|
-
);
|
|
177
|
-
uikitUtil.removeClass(target, clsLeave);
|
|
178
|
-
});
|
|
179
|
-
const enterFn = wrapIndexFn(async () => {
|
|
180
|
-
const oldHeight = uikitUtil.height(target);
|
|
181
|
-
uikitUtil.addClass(target, clsEnter);
|
|
182
|
-
action();
|
|
183
|
-
uikitUtil.css(uikitUtil.children(target), { opacity: 0 });
|
|
184
|
-
await awaitFrame$1();
|
|
185
|
-
const nodes = uikitUtil.children(target);
|
|
186
|
-
const newHeight = uikitUtil.height(target);
|
|
187
|
-
uikitUtil.css(target, "alignContent", "flex-start");
|
|
188
|
-
uikitUtil.height(target, oldHeight);
|
|
189
|
-
const transitionNodes = getTransitionNodes(target);
|
|
190
|
-
uikitUtil.css(nodes, propsOut);
|
|
191
|
-
const transitions = transitionNodes.map(async (child, i) => {
|
|
192
|
-
await awaitTimeout(i * stagger);
|
|
193
|
-
await uikitUtil.Transition.start(child, propsIn, duration / 2, "ease");
|
|
194
|
-
});
|
|
195
|
-
if (oldHeight !== newHeight) {
|
|
196
|
-
transitions.push(
|
|
197
|
-
uikitUtil.Transition.start(
|
|
198
|
-
target,
|
|
199
|
-
{ height: newHeight },
|
|
200
|
-
duration / 2 + transitionNodes.length * stagger,
|
|
201
|
-
"ease"
|
|
202
|
-
)
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
await Promise.all(transitions).then(() => {
|
|
206
|
-
uikitUtil.removeClass(target, clsEnter);
|
|
207
|
-
if (index === transitionIndex(target)) {
|
|
208
|
-
uikitUtil.css(target, { height: "", alignContent: "" });
|
|
209
|
-
uikitUtil.css(nodes, { opacity: "" });
|
|
210
|
-
delete target.dataset.transition;
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
return uikitUtil.hasClass(target, clsLeave) ? waitTransitionend(target).then(enterFn) : uikitUtil.hasClass(target, clsEnter) ? waitTransitionend(target).then(leaveFn).then(enterFn) : leaveFn().then(enterFn);
|
|
215
|
-
}
|
|
216
|
-
function transitionIndex(target, next) {
|
|
217
|
-
if (next) {
|
|
218
|
-
target.dataset.transition = 1 + transitionIndex(target);
|
|
219
|
-
}
|
|
220
|
-
return uikitUtil.toNumber(target.dataset.transition) || 0;
|
|
221
|
-
}
|
|
222
|
-
function waitTransitionend(target) {
|
|
223
|
-
return Promise.all(
|
|
224
|
-
uikitUtil.children(target).filter(uikitUtil.Transition.inProgress).map(
|
|
225
|
-
(el) => new Promise((resolve) => uikitUtil.once(el, "transitionend transitioncanceled", resolve))
|
|
226
|
-
)
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
function getTransitionNodes(target) {
|
|
230
|
-
return getRows(uikitUtil.children(target)).flat().filter((node) => uikitUtil.isVisible(node));
|
|
231
|
-
}
|
|
232
|
-
function awaitFrame$1() {
|
|
233
|
-
return new Promise((resolve) => requestAnimationFrame(resolve));
|
|
234
|
-
}
|
|
235
|
-
function awaitTimeout(timeout) {
|
|
236
|
-
return new Promise((resolve) => setTimeout(resolve, timeout));
|
|
237
|
-
}
|
|
238
|
-
|
|
239
161
|
async function slide(action, target, duration) {
|
|
240
162
|
await awaitFrame();
|
|
241
163
|
let nodes = uikitUtil.children(target);
|
|
242
164
|
const currentProps = nodes.map((el) => getProps(el, true));
|
|
243
165
|
const targetProps = { ...uikitUtil.css(target, ["height", "padding"]), display: "block" };
|
|
244
166
|
await Promise.all(nodes.concat(target).map(uikitUtil.Transition.cancel));
|
|
245
|
-
action();
|
|
167
|
+
await action();
|
|
246
168
|
nodes = nodes.concat(uikitUtil.children(target).filter((el) => !uikitUtil.includes(nodes, el)));
|
|
247
169
|
await Promise.resolve();
|
|
248
|
-
uikitUtil.fastdom.flush();
|
|
249
170
|
const targetStyle = uikitUtil.attr(target, "style");
|
|
250
171
|
const targetPropsTo = uikitUtil.css(target, ["height", "padding"]);
|
|
251
172
|
const [propsTo, propsFrom] = getTransitionProps(target, nodes, currentProps);
|
|
@@ -253,7 +174,6 @@
|
|
|
253
174
|
nodes.forEach((el, i) => propsFrom[i] && uikitUtil.css(el, propsFrom[i]));
|
|
254
175
|
uikitUtil.css(target, targetProps);
|
|
255
176
|
uikitUtil.trigger(target, "scroll");
|
|
256
|
-
uikitUtil.fastdom.flush();
|
|
257
177
|
await awaitFrame();
|
|
258
178
|
const transitions = nodes.map((el, i) => uikitUtil.parent(el) === target && uikitUtil.Transition.start(el, propsTo[i], duration, "ease")).concat(uikitUtil.Transition.start(target, targetPropsTo, duration, "ease"));
|
|
259
179
|
try {
|
|
@@ -323,6 +243,86 @@
|
|
|
323
243
|
return new Promise((resolve) => requestAnimationFrame(resolve));
|
|
324
244
|
}
|
|
325
245
|
|
|
246
|
+
const clsLeave = "uk-transition-leave";
|
|
247
|
+
const clsEnter = "uk-transition-enter";
|
|
248
|
+
function fade(action, target, duration, stagger = 0) {
|
|
249
|
+
const index = transitionIndex(target, true);
|
|
250
|
+
const propsIn = { opacity: 1 };
|
|
251
|
+
const propsOut = { opacity: 0 };
|
|
252
|
+
const wrapIndexFn = (fn) => () => index === transitionIndex(target) ? fn() : Promise.reject();
|
|
253
|
+
const leaveFn = wrapIndexFn(async () => {
|
|
254
|
+
uikitUtil.addClass(target, clsLeave);
|
|
255
|
+
await Promise.all(
|
|
256
|
+
getTransitionNodes(target).map(
|
|
257
|
+
(child, i) => new Promise(
|
|
258
|
+
(resolve) => setTimeout(
|
|
259
|
+
() => uikitUtil.Transition.start(child, propsOut, duration / 2, "ease").then(
|
|
260
|
+
resolve
|
|
261
|
+
),
|
|
262
|
+
i * stagger
|
|
263
|
+
)
|
|
264
|
+
)
|
|
265
|
+
)
|
|
266
|
+
);
|
|
267
|
+
uikitUtil.removeClass(target, clsLeave);
|
|
268
|
+
});
|
|
269
|
+
const enterFn = wrapIndexFn(async () => {
|
|
270
|
+
const oldHeight = uikitUtil.height(target);
|
|
271
|
+
uikitUtil.addClass(target, clsEnter);
|
|
272
|
+
action();
|
|
273
|
+
uikitUtil.css(uikitUtil.children(target), { opacity: 0 });
|
|
274
|
+
await awaitFrame();
|
|
275
|
+
const nodes = uikitUtil.children(target);
|
|
276
|
+
const newHeight = uikitUtil.height(target);
|
|
277
|
+
uikitUtil.css(target, "alignContent", "flex-start");
|
|
278
|
+
uikitUtil.height(target, oldHeight);
|
|
279
|
+
const transitionNodes = getTransitionNodes(target);
|
|
280
|
+
uikitUtil.css(nodes, propsOut);
|
|
281
|
+
const transitions = transitionNodes.map(async (child, i) => {
|
|
282
|
+
await awaitTimeout(i * stagger);
|
|
283
|
+
await uikitUtil.Transition.start(child, propsIn, duration / 2, "ease");
|
|
284
|
+
});
|
|
285
|
+
if (oldHeight !== newHeight) {
|
|
286
|
+
transitions.push(
|
|
287
|
+
uikitUtil.Transition.start(
|
|
288
|
+
target,
|
|
289
|
+
{ height: newHeight },
|
|
290
|
+
duration / 2 + transitionNodes.length * stagger,
|
|
291
|
+
"ease"
|
|
292
|
+
)
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
await Promise.all(transitions).then(() => {
|
|
296
|
+
uikitUtil.removeClass(target, clsEnter);
|
|
297
|
+
if (index === transitionIndex(target)) {
|
|
298
|
+
uikitUtil.css(target, { height: "", alignContent: "" });
|
|
299
|
+
uikitUtil.css(nodes, { opacity: "" });
|
|
300
|
+
delete target.dataset.transition;
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
});
|
|
304
|
+
return uikitUtil.hasClass(target, clsLeave) ? waitTransitionend(target).then(enterFn) : uikitUtil.hasClass(target, clsEnter) ? waitTransitionend(target).then(leaveFn).then(enterFn) : leaveFn().then(enterFn);
|
|
305
|
+
}
|
|
306
|
+
function transitionIndex(target, next) {
|
|
307
|
+
if (next) {
|
|
308
|
+
target.dataset.transition = 1 + transitionIndex(target);
|
|
309
|
+
}
|
|
310
|
+
return uikitUtil.toNumber(target.dataset.transition) || 0;
|
|
311
|
+
}
|
|
312
|
+
function waitTransitionend(target) {
|
|
313
|
+
return Promise.all(
|
|
314
|
+
uikitUtil.children(target).filter(uikitUtil.Transition.inProgress).map(
|
|
315
|
+
(el) => new Promise((resolve) => uikitUtil.once(el, "transitionend transitioncanceled", resolve))
|
|
316
|
+
)
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
function getTransitionNodes(target) {
|
|
320
|
+
return getRows(uikitUtil.children(target)).flat().filter(uikitUtil.isVisible);
|
|
321
|
+
}
|
|
322
|
+
function awaitTimeout(timeout) {
|
|
323
|
+
return new Promise((resolve) => setTimeout(resolve, timeout));
|
|
324
|
+
}
|
|
325
|
+
|
|
326
326
|
var Animate = {
|
|
327
327
|
props: {
|
|
328
328
|
duration: Number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.19.5-dev.66a60877b | https://www.getuikit.com | (c) 2014 - 2024 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&&N(o,o._queued),delete o._queued})),o._queued.add(s.type||s))}function N(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 z(o){return y(e.observeResize,o,"resize")}function q(o){return y(e.observeMutation,o)}function y(o,s,n){return{observe:o,handler(){g(this,n)},...s}}q({options:{attributes:!0,attributeFilter:["style"]},target:({$el:o})=>[o,...e.children(o)]}),z({target:({$el:o})=>[o,...e.children(o)]});function P(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=u(t,n);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],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=u(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 u(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 v="uk-transition-leave",w="uk-transition-enter";function C(o,s,n,t=0){const c=b(s,!0),a={opacity:1},r={opacity:0},h=m=>()=>c===b(s)?m():Promise.reject(),d=h(async()=>{e.addClass(s,v),await Promise.all(S(s).map((m,i)=>new Promise(f=>setTimeout(()=>e.Transition.start(m,r,n/2,"ease").then(f),i*t)))),e.removeClass(s,v)}),p=h(async()=>{const m=e.height(s);e.addClass(s,w),o(),e.css(e.children(s),{opacity:0}),await A();const i=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,m);const l=S(s);e.css(i,r);const $=l.map(async(Q,X)=>{await H(X*t),await e.Transition.start(Q,a,n/2,"ease")});m!==f&&$.push(e.Transition.start(s,{height:f},n/2+l.length*t,"ease")),await Promise.all($).then(()=>{e.removeClass(s,w),c===b(s)&&(e.css(s,{height:"",alignContent:""}),e.css(i,{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(o,s){return s&&(o.dataset.transition=1+b(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 P(e.children(o)).flat().filter(s=>e.isVisible(s))}function A(){return new Promise(o=>requestAnimationFrame(o))}function H(o){return new Promise(s=>setTimeout(s,o))}async function M(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]=R(s,t,c),m=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,l)=>p[l]&&e.css(f,p[l])),e.css(s,a),e.trigger(s,"scroll"),e.fastdom.flush(),await D();const i=t.map((f,l)=>e.parent(f)===s&&e.Transition.start(f,d[l],n,"ease")).concat(e.Transition.start(s,h,n,"ease"));try{await Promise.all(i),t.forEach((f,l)=>{e.attr(f,m[l]),e.parent(f)===s&&e.css(f,"display",d[l].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),V(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 R(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 V(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 B={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(o,s=this.$el){const n=this.animation;return(n==="fade"?C:n==="delayed-fade"?(...c)=>C(...c,40):n?M:()=>(o(),Promise.resolve()))(o,s,this.duration).catch(e.noop)}}},L={connected(){e.addClass(this.$el,this.$options.id)}},E={mixins:[L,B],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!this.items.length},handles({handle:o},s){return o?e.$$(o,s):this.items}},watch:{isEmpty(o){e.toggleClass(this.target,this.clsEmpty,o)},handles(o,s){e.css(s,{touchAction:"",userSelect:""}),e.css(o,{touchAction:"none",userSelect:"none"})}},update:{write(o){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:n},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;e.css(this.drag,{top:n-t,left:s-c});const r=this.getSortable(document.elementFromPoint(s,n));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=G(h,{x:s,y:n});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),m=J(r.target,d,a,s,n,r===p&&o.moved!==d);m!==!1&&(m&&a===m||(r!==p?(p.remove(a),o.moved=d):delete o.moved,r.insert(a,m),this.touched.add(r)))},events:["move"]},methods:{init(o){const{target:s,button:n,defaultPrevented:t}=o,[c]=this.items.filter(a=>a.contains(s));!c||t||n>0||e.isInput(s)||s.closest(`.${this.clsNoDrag}`)||this.handle&&!s.closest(this.handle)||(o.preventDefault(),this.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}=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]),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){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 F;function j(o){let s=Date.now();F=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:m}=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-m)return a.scrollTop=r,!0})},15)}function O(){clearInterval(F)}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,e.dimensions(n)))]}function J(o,s,n,t,c,a){if(!e.children(o).length)return;const r=e.dimensions(s);if(!a)return K(o,n)||c<r.top+r.height/2?s:s.nextElementSibling;const h=e.dimensions(n),d=_([r.top,r.bottom],[h.top,h.bottom]),[p,m,i,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],l=h[m]<r[m]?r[m]-h[m]:0;return h[i]<r[i]?l&&p<r[i]+l?!1:s.nextElementSibling:l&&p>r[f]-l?!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=e.dimensions(a);return t.slice(r+1).some(d=>{const p=e.dimensions(d);return!_([h.left,h.right],[p.left,p.right])})});return n&&e.remove(s),c}function _(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.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 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&&z(o,o._queued),delete o._queued})),o._queued.add(s.type||s))}function z(o,s){for(const{read:n,write:t,events:c=[]}of o._updates){if(!s.has("update")&&!c.some(r=>s.has(r)))continue;let a;n&&(a=n.call(o,o._data,s),a&&e.isPlainObject(a)&&e.assign(o._data,a)),t&&a!==!1&&e.fastdom.write(()=>{o._connected&&t.call(o,o._data,s)})}}function q(o){return C(e.observeResize,o,"resize")}function P(o){return C(e.observeMutation,o)}function C(o,s,n){return{observe:o,handler(){g(this,n)},...s}}P({options:{childList:!0}}),P({options:{attributes:!0,attributeFilter:["style"]},target:({$el:o})=>[o,...e.children(o)]}),q({target:({$el:o})=>[o,...e.children(o)]});function T(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=u(t,n);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],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=u(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 u(o,s=!1){let{offsetTop:n,offsetLeft:t,offsetHeight:c,offsetWidth:a}=o;return s&&([n,t]=e.offsetPosition(o)),{top:n,left:t,bottom:n+c,right:t+a}}async function A(o,s,n){await v();let t=e.children(s);const c=t.map(f=>S(f,!0)),a={...e.css(s,["height","padding"]),display:"block"};await Promise.all(t.concat(s).map(e.Transition.cancel)),await o(),t=t.concat(e.children(s).filter(f=>!e.includes(t,f))),await Promise.resolve();const r=e.attr(s,"style"),h=e.css(s,["height","padding"]),[d,p]=H(s,t,c),m=t.map(f=>({style:e.attr(f,"style")}));t.forEach((f,l)=>p[l]&&e.css(f,p[l])),e.css(s,a),e.trigger(s,"scroll"),await v();const i=t.map((f,l)=>e.parent(f)===s&&e.Transition.start(f,d[l],n,"ease")).concat(e.Transition.start(s,h,n,"ease"));try{await Promise.all(i),t.forEach((f,l)=>{e.attr(f,m[l]),e.parent(f)===s&&e.css(f,"display",d[l].opacity===0?"none":"")}),e.attr(s,"style",r)}catch{e.attr(t,"style",""),L(s,a)}}function S(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,...x(o)}:!1}function H(o,s,n){const t=s.map((a,r)=>e.parent(a)&&r in n?n[r]?e.isVisible(a)?x(a):{opacity:0}:{opacity:e.isVisible(a)?1:0}:!1),c=t.map((a,r)=>{const h=e.parent(s[r])===o&&(n[r]||S(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 x(o){const{height:s,width:n}=e.offset(o);return{height:s,width:n,transform:"",...e.position(o),...e.css(o,["marginTop","marginLeft"])}}function v(){return new Promise(o=>requestAnimationFrame(o))}const w="uk-transition-leave",y="uk-transition-enter";function I(o,s,n,t=0){const c=b(s,!0),a={opacity:1},r={opacity:0},h=m=>()=>c===b(s)?m():Promise.reject(),d=h(async()=>{e.addClass(s,w),await Promise.all(E(s).map((m,i)=>new Promise(f=>setTimeout(()=>e.Transition.start(m,r,n/2,"ease").then(f),i*t)))),e.removeClass(s,w)}),p=h(async()=>{const m=e.height(s);e.addClass(s,y),o(),e.css(e.children(s),{opacity:0}),await v();const i=e.children(s),f=e.height(s);e.css(s,"alignContent","flex-start"),e.height(s,m);const l=E(s);e.css(i,r);const N=l.map(async(K,Q)=>{await M(Q*t),await e.Transition.start(K,a,n/2,"ease")});m!==f&&N.push(e.Transition.start(s,{height:f},n/2+l.length*t,"ease")),await Promise.all(N).then(()=>{e.removeClass(s,y),c===b(s)&&(e.css(s,{height:"",alignContent:""}),e.css(i,{opacity:""}),delete s.dataset.transition)})});return e.hasClass(s,w)?D(s).then(p):e.hasClass(s,y)?D(s).then(d).then(p):d().then(p)}function b(o,s){return s&&(o.dataset.transition=1+b(o)),e.toNumber(o.dataset.transition)||0}function D(o){return Promise.all(e.children(o).filter(e.Transition.inProgress).map(s=>new Promise(n=>e.once(s,"transitionend transitioncanceled",n))))}function E(o){return T(e.children(o)).flat().filter(e.isVisible)}function M(o){return new Promise(s=>setTimeout(s,o))}var R={props:{duration:Number,animation:Boolean},data:{duration:150,animation:"slide"},methods:{animate(o,s=this.$el){const n=this.animation;return(n==="fade"?I:n==="delayed-fade"?(...c)=>I(...c,40):n?A:()=>(o(),Promise.resolve()))(o,s,this.duration).catch(e.noop)}}},V={connected(){e.addClass(this.$el,this.$options.id)}},_={mixins:[V,R],props:{group:String,threshold:Number,clsItem:String,clsPlaceholder:String,clsDrag:String,clsDragState:String,clsBase:String,clsNoDrag:String,clsEmpty:String,clsCustom:String,handle:String},data:{group:!1,threshold:5,clsItem:"uk-sortable-item",clsPlaceholder:"uk-sortable-placeholder",clsDrag:"uk-sortable-drag",clsDragState:"uk-drag",clsBase:"uk-sortable",clsNoDrag:"uk-sortable-nodrag",clsEmpty:"uk-sortable-empty",clsCustom:"",handle:!1,pos:{}},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!this.items.length},handles({handle:o},s){return o?e.$$(o,s):this.items}},watch:{isEmpty(o){e.toggleClass(this.target,this.clsEmpty,o)},handles(o,s){e.css(s,{touchAction:"",userSelect:""}),e.css(o,{touchAction:"none",userSelect:"none"})}},update:{write(o){if(!this.drag||!e.parent(this.placeholder))return;const{pos:{x:s,y:n},origin:{offsetTop:t,offsetLeft:c},placeholder:a}=this;e.css(this.drag,{top:n-t,left:s-c});const r=this.getSortable(document.elementFromPoint(s,n));if(!r)return;const{items:h}=r;if(h.some(e.Transition.inProgress))return;const d=W(h,{x:s,y:n});if(h.length&&(!d||d===a))return;const p=this.getSortable(a),m=G(r.target,d,a,s,n,r===p&&o.moved!==d);m!==!1&&(m&&a===m||(r!==p?(p.remove(a),o.moved=d):delete o.moved,r.insert(a,m),this.touched.add(r)))},events:["move"]},methods:{init(o){const{target:s,button:n,defaultPrevented:t}=o,[c]=this.items.filter(a=>a.contains(s));!c||t||n>0||e.isInput(s)||s.closest(`.${this.clsNoDrag}`)||this.handle&&!s.closest(this.handle)||(o.preventDefault(),this.touched=new Set([this]),this.placeholder=c,this.origin={target:s,index:e.index(c),...this.pos},e.on(document,e.pointerMove,this.move),e.on(document,e.pointerUp,this.end),this.threshold||this.start(o))},start(o){this.drag=O(this.$container,this.placeholder);const{left:s,top:n}=e.dimensions(this.placeholder);e.assign(this.origin,{offsetLeft:this.pos.x-s,offsetTop:this.pos.y-n}),e.addClass(this.drag,this.clsDrag,this.clsCustom),e.addClass(this.placeholder,this.clsPlaceholder),e.addClass(this.items,this.clsItem),e.addClass(document.documentElement,this.clsDragState),e.trigger(this.$el,"start",[this,this.placeholder]),B(this.pos),this.move(o)},move(o){this.drag?this.$emit("move"):(Math.abs(this.pos.x-this.origin.x)>this.threshold||Math.abs(this.pos.y-this.origin.y)>this.threshold)&&this.start(o)},end(){if(e.off(document,e.pointerMove,this.move),e.off(document,e.pointerUp,this.end),!this.drag)return;j();const o=this.getSortable(this.placeholder);this===o?this.origin.index!==e.index(this.placeholder)&&e.trigger(this.$el,"moved",[this,this.placeholder]):(e.trigger(o.$el,"added",[o,this.placeholder]),e.trigger(this.$el,"removed",[this,this.placeholder])),e.trigger(this.$el,"stop",[this,this.placeholder]),e.remove(this.drag),this.drag=null;for(const{clsPlaceholder:s,clsItem:n}of this.touched)for(const t of this.touched)e.removeClass(t.items,s,n);this.touched=null,e.removeClass(document.documentElement,this.clsDragState)},insert(o,s){e.addClass(this.items,this.clsItem);const n=()=>s?e.before(s,o):e.append(this.target,o);this.animate(n)},remove(o){this.target.contains(o)&&this.animate(()=>e.remove(o))},getSortable(o){do{const s=this.$getComponent(o,"sortable");if(s&&(s===this||this.group!==!1&&s.group===this.group))return s}while(o=e.parent(o))}}};let $;function B(o){let s=Date.now();$=setInterval(()=>{let{x:n,y:t}=o;t+=document.scrollingElement.scrollTop;const c=(Date.now()-s)*.3;s=Date.now(),e.scrollParents(document.elementFromPoint(n,o.y)).reverse().some(a=>{let{scrollTop:r,scrollHeight:h}=a;const{top:d,bottom:p,height:m}=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-m)return a.scrollTop=r,!0})},15)}function j(){clearInterval($)}function O(o,s){let n;if(e.isTag(s,"li","tr")){n=e.$("<div>"),e.append(n,s.cloneNode(!0).children);for(const t of s.getAttributeNames())e.attr(n,t,s.getAttribute(t))}else n=s.cloneNode(!0);return e.append(o,n),e.css(n,"margin","0","important"),e.css(n,{boxSizing:"border-box",width:s.offsetWidth,height:s.offsetHeight,padding:e.css(s,"padding")}),e.height(n.firstElementChild,e.height(s.firstElementChild)),n}function W(o,s){return o[e.findIndex(o,n=>e.pointInRect(s,e.dimensions(n)))]}function G(o,s,n,t,c,a){if(!e.children(o).length)return;const r=e.dimensions(s);if(!a)return J(o,n)||c<r.top+r.height/2?s:s.nextElementSibling;const h=e.dimensions(n),d=F([r.top,r.bottom],[h.top,h.bottom]),[p,m,i,f]=d?[t,"width","left","right"]:[c,"height","top","bottom"],l=h[m]<r[m]?r[m]-h[m]:0;return h[i]<r[i]?l&&p<r[i]+l?!1:s.nextElementSibling:l&&p>r[f]-l?!1:s}function J(o,s){const n=e.children(o).length===1;n&&e.append(o,s);const t=e.children(o),c=t.some((a,r)=>{const h=e.dimensions(a);return t.slice(r+1).some(d=>{const p=e.dimensions(d);return!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",_),_});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.19.5-dev.
|
|
1
|
+
/*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.19.5-dev.
|
|
1
|
+
/*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(t,p){typeof exports=="object"&&typeof module<"u"?module.exports=p(require("uikit-util")):typeof define=="function"&&define.amd?define("uikittooltip",["uikit-util"],p):(t=typeof globalThis<"u"?globalThis:t||self,t.UIkitTooltip=p(t.UIkit.util))})(this,function(t){"use strict";function p(s,i=[]){try{return s?t.startsWith(s,"{")?JSON.parse(s):i.length&&!t.includes(s,":")?{[i[0]]:s}:s.split(";").reduce((o,e)=>{const[n,r]=e.split(/:(.*)/);return n&&!t.isUndefined(r)&&(o[n.trim()]=r.trim()),o},{}):{}}catch{return{}}}t.memoize((s,i)=>{const o=Object.keys(i),e=o.concat(s).map(n=>[t.hyphenate(n),`data-${t.hyphenate(n)}`]).flat();return{attributes:o,filter:e}});let C=1;function S(s,i=null){return(i==null?void 0:i.id)||`${s.$options.id}-${C++}`}var A={props:{container:Boolean},data:{container:!0},computed:{container({container:s}){return s===!0&&this.$container||s&&t.$(s)}}},B={props:{pos:String,offset:null,flip:Boolean,shift:Boolean,inset:Boolean},data:{pos:`bottom-${t.isRtl?"right":"left"}`,offset:!1,flip:!0,shift:!0,inset:!1},connected(){this.pos=this.$props.pos.split("-").concat("center").slice(0,2),[this.dir,this.align]=this.pos,this.axis=t.includes(["top","bottom"],this.dir)?"y":"x"},methods:{positionAt(s,i,o){let e=[this.getPositionOffset(s),this.getShiftOffset(s)];const n=[this.flip&&"flip",this.shift&&"shift"],r={element:[this.inset?this.dir:t.flipPosition(this.dir),this.align],target:[this.dir,this.align]};if(this.axis==="y"){for(const a in r)r[a].reverse();e.reverse(),n.reverse()}const h=D(s),c=t.dimensions(s);t.css(s,{top:-c.height,left:-c.width}),t.positionAt(s,i,{attach:r,offset:e,boundary:o,placement:n,viewportOffset:this.getViewportOffset(s)}),h()},getPositionOffset(s=this.$el){return t.toPx(this.offset===!1?t.css(s,"--uk-position-offset"):this.offset,this.axis==="x"?"width":"height",s)*(t.includes(["left","top"],this.dir)?-1:1)*(this.inset?-1:1)},getShiftOffset(s=this.$el){return this.align==="center"?0:t.toPx(t.css(s,"--uk-position-shift-offset"),this.axis==="y"?"width":"height",s)*(t.includes(["left","top"],this.align)?1:-1)},getViewportOffset(s){return t.toPx(t.css(s,"--uk-position-viewport-offset"))}}};function D(s){const i=t.scrollParent(s),{scrollTop:o}=i;return()=>{o!==i.scrollTop&&(i.scrollTop=o)}}var I={props:{cls:Boolean,animation:"list",duration:Number,velocity:Number,origin:String,transition:String},data:{cls:!1,animation:[!1],duration:200,velocity:.2,origin:!1,transition:"ease",clsEnter:"uk-togglable-enter",clsLeave:"uk-togglable-leave"},computed:{hasAnimation:({animation:s})=>!!s[0],hasTransition:({animation:s})=>["slide","reveal"].some(i=>t.startsWith(s[0],i))},methods:{async toggleElement(s,i,o){try{return await Promise.all(t.toNodes(s).map(e=>{const n=t.isBoolean(i)?i:!this.isToggled(e);if(!t.trigger(e,`before${n?"show":"hide"}`,[this]))return Promise.reject();const r=(t.isFunction(o)?o:o===!1||!this.hasAnimation?N:this.hasTransition?F:L)(e,n,this),h=n?this.clsEnter:this.clsLeave;t.addClass(e,h),t.trigger(e,n?"show":"hide",[this]);const c=()=>{t.removeClass(e,h),t.trigger(e,n?"shown":"hidden",[this])};return r?r.then(c,()=>(t.removeClass(e,h),Promise.reject())):c()})),!0}catch{return!1}},isToggled(s=this.$el){return s=t.toNode(s),t.hasClass(s,this.clsEnter)?!0:t.hasClass(s,this.clsLeave)?!1:this.cls?t.hasClass(s,this.cls.split(" ")[0]):t.isVisible(s)},_toggle(s,i){if(!s)return;i=!!i;let o;this.cls?(o=t.includes(this.cls," ")||i!==t.hasClass(s,this.cls),o&&t.toggleClass(s,this.cls,t.includes(this.cls," ")?void 0:i)):(o=i===s.hidden,o&&(s.hidden=!i)),t.$$("[autofocus]",s).some(e=>t.isVisible(e)?e.focus()||!0:e.blur()),o&&t.trigger(s,"toggled",[i,this])}}};function N(s,i,{_toggle:o}){return t.Animation.cancel(s),t.Transition.cancel(s),o(s,i)}async function F(s,i,{animation:o,duration:e,velocity:n,transition:r,_toggle:h}){var c;const[a="reveal",$="top"]=((c=o[0])==null?void 0:c.split("-"))||[],b=[["left","right"],["top","bottom"]],T=b[t.includes(b[0],$)?0:1],P=T[1]===$,m=["width","height"][b.indexOf(T)],d=`margin-${T[0]}`,v=`margin-${$}`;let l=t.dimensions(s)[m];const H=t.Transition.inProgress(s);await t.Transition.cancel(s),i&&h(s,!0);const V=Object.fromEntries(["padding","border","width","height","minWidth","minHeight","overflowY","overflowX",d,v].map(O=>[O,s.style[O]])),g=t.dimensions(s),y=t.toFloat(t.css(s,d)),k=t.toFloat(t.css(s,v)),f=g[m]+k;!H&&!i&&(l+=k);const[w]=t.wrapInner(s,"<div>");t.css(w,{boxSizing:"border-box",height:g.height,width:g.width,...t.css(s,["overflow","padding","borderTop","borderRight","borderBottom","borderLeft","borderImage",v])}),t.css(s,{padding:0,border:0,minWidth:0,minHeight:0,[v]:0,width:g.width,height:g.height,overflow:"hidden",[m]:l});const x=l/f;e=(n*f+e)*(i?1-x:x);const E={[m]:i?f:0};P&&(t.css(s,d,f-l+y),E[d]=i?y:f+y),!P^a==="reveal"&&(t.css(w,d,-f+l),t.Transition.start(w,{[d]:i?0:-f},e,r));try{await t.Transition.start(s,E,e,r)}finally{t.css(s,V),t.unwrap(w.firstChild),i||h(s,!1)}}function L(s,i,o){const{animation:e,duration:n,_toggle:r}=o;return i?(r(s,!0),t.Animation.in(s,e[0],n,o.origin)):t.Animation.out(s,e[1]||e[0],n,o.origin).then(()=>r(s,!1))}const U={TAB:9,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};var u={mixins:[A,I,B],data:{pos:"top",animation:["uk-animation-scale-up"],duration:100,cls:"uk-active"},connected(){j(this.$el)},disconnected(){this.hide()},methods:{show(){if(this.isToggled(this.tooltip||null))return;const{delay:s=0,title:i}=_(this.$options);if(!i)return;const o=t.attr(this.$el,"title"),e=t.on(this.$el,["blur",t.pointerLeave],r=>!t.isTouch(r)&&this.hide());this.reset=()=>{t.attr(this.$el,{title:o,"aria-describedby":null}),e()};const n=S(this);t.attr(this.$el,{title:null,"aria-describedby":n}),clearTimeout(this.showTimer),this.showTimer=setTimeout(()=>this._show(i,n),s)},async hide(){var s;t.matches(this.$el,"input:focus")||(clearTimeout(this.showTimer),this.isToggled(this.tooltip||null)&&await this.toggleElement(this.tooltip,!1,!1),(s=this.reset)==null||s.call(this),t.remove(this.tooltip),this.tooltip=null)},async _show(s,i){this.tooltip=t.append(this.container,`<div id="${i}" class="uk-${this.$options.name}" role="tooltip"> <div class="uk-${this.$options.name}-inner">${s}</div> </div>`),t.on(this.tooltip,"toggled",(o,e)=>{if(!e)return;const n=()=>this.positionAt(this.tooltip,this.$el);n();const[r,h]=W(this.tooltip,this.$el,this.pos);this.origin=this.axis==="y"?`${t.flipPosition(r)}-${h}`:`${h}-${t.flipPosition(r)}`;const c=[t.once(document,`keydown ${t.pointerDown}`,this.hide,!1,a=>a.type===t.pointerDown&&!this.$el.contains(a.target)||a.type==="keydown"&&a.keyCode===U.ESC),t.on([document,...t.overflowParents(this.$el)],"scroll",n,{passive:!0})];t.once(this.tooltip,"hide",()=>c.forEach(a=>a()),{self:!0})}),await this.toggleElement(this.tooltip,!0)||this.hide()}},events:{[`focus ${t.pointerEnter} ${t.pointerDown}`](s){(!t.isTouch(s)||s.type===t.pointerDown)&&this.show()}}};function j(s){t.isFocusable(s)||t.attr(s,"tabindex","0")}function W(s,i,[o,e]){const n=t.offset(s),r=t.offset(i),h=[["left","right"],["top","bottom"]];for(const a of h){if(n[a[0]]>=r[a[1]]){o=a[1];break}if(n[a[1]]<=r[a[0]]){o=a[0];break}}return e=(t.includes(h[0],o)?h[1]:h[0]).find(a=>n[a]===r[a])||"center",[o,e]}function _(s){const{el:i,id:o,data:e}=s;return["delay","title"].reduce((n,r)=>({[r]:t.data(i,r),...n}),{...p(t.data(i,o),["title"]),...e})}return typeof window<"u"&&window.UIkit&&window.UIkit.component("tooltip",u),u});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.19.5-dev.
|
|
1
|
+
/*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! UIkit 3.19.5-dev.
|
|
1
|
+
/*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */(function(o,i){typeof exports=="object"&&typeof module<"u"?module.exports=i(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitupload",["uikit-util"],i):(o=typeof globalThis<"u"?globalThis:o||self,o.UIkitUpload=i(o.UIkit.util))})(this,function(o){"use strict";var i={props:{i18n:Object},data:{i18n:null},methods:{t(e,...r){var 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});
|
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.19.5-dev.
|
|
1
|
+
/*! UIkit 3.19.5-dev.74c343fa4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -296,10 +296,11 @@
|
|
|
296
296
|
function isVoidElement(element) {
|
|
297
297
|
return toNodes(element).some((element2) => voidElements[element2.tagName.toLowerCase()]);
|
|
298
298
|
}
|
|
299
|
+
const isVisibleFn = Element.prototype.checkVisibility || function() {
|
|
300
|
+
return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
|
|
301
|
+
};
|
|
299
302
|
function isVisible(element) {
|
|
300
|
-
return toNodes(element).some(
|
|
301
|
-
(element2) => element2.offsetWidth || element2.offsetHeight || element2.getClientRects().length
|
|
302
|
-
);
|
|
303
|
+
return toNodes(element).some((element2) => isVisibleFn.call(element2));
|
|
303
304
|
}
|
|
304
305
|
const selInput = "input,select,textarea,button";
|
|
305
306
|
function isInput(element) {
|
|
@@ -373,10 +374,7 @@
|
|
|
373
374
|
const selectors = [];
|
|
374
375
|
for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
|
|
375
376
|
sel = sel.replace(trailingCommaRe, "").trim();
|
|
376
|
-
|
|
377
|
-
sel = `:scope ${sel}`;
|
|
378
|
-
}
|
|
379
|
-
isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
|
|
377
|
+
isContextSelector || (isContextSelector = ["!", "+", "~", "-", ">"].includes(sel[0]));
|
|
380
378
|
selectors.push(sel);
|
|
381
379
|
}
|
|
382
380
|
return {
|
|
@@ -385,6 +383,11 @@
|
|
|
385
383
|
isContextSelector
|
|
386
384
|
};
|
|
387
385
|
});
|
|
386
|
+
const parsePositionSelector = memoize((selector) => {
|
|
387
|
+
selector = selector.substr(1).trim();
|
|
388
|
+
const index2 = selector.indexOf(" ");
|
|
389
|
+
return ~index2 ? [selector.substring(0, index2), selector.substring(index2 + 1)] : [selector, ""];
|
|
390
|
+
});
|
|
388
391
|
function _query(selector, context = document, queryFn) {
|
|
389
392
|
if (!selector || !isString(selector)) {
|
|
390
393
|
return selector;
|
|
@@ -396,33 +399,36 @@
|
|
|
396
399
|
selector = "";
|
|
397
400
|
const isSingle = parsed.selectors.length === 1;
|
|
398
401
|
for (let sel of parsed.selectors) {
|
|
402
|
+
let positionSel;
|
|
399
403
|
let ctx = context;
|
|
400
404
|
if (sel[0] === "!") {
|
|
401
|
-
|
|
402
|
-
ctx = context.parentElement.closest(
|
|
403
|
-
sel
|
|
404
|
-
if (!sel.length && isSingle) {
|
|
405
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
406
|
+
ctx = context.parentElement.closest(positionSel);
|
|
407
|
+
if (!sel && isSingle) {
|
|
405
408
|
return ctx;
|
|
406
409
|
}
|
|
407
410
|
}
|
|
408
|
-
if (sel[0] === "-") {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
ctx = matches(
|
|
412
|
-
sel
|
|
413
|
-
if (!sel.length && isSingle) {
|
|
411
|
+
if (ctx && sel[0] === "-") {
|
|
412
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
413
|
+
ctx = ctx.previousElementSibling;
|
|
414
|
+
ctx = matches(ctx, positionSel) ? ctx : null;
|
|
415
|
+
if (!sel && isSingle) {
|
|
414
416
|
return ctx;
|
|
415
417
|
}
|
|
416
|
-
} else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
|
|
417
|
-
return _doQuery(
|
|
418
|
-
ctx.parentElement,
|
|
419
|
-
queryFn,
|
|
420
|
-
`:scope :nth-child(${index(ctx) + 1}) ${sel}`
|
|
421
|
-
);
|
|
422
418
|
}
|
|
423
|
-
if (ctx) {
|
|
424
|
-
|
|
419
|
+
if (!ctx) {
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
if (isSingle) {
|
|
423
|
+
if (sel[0] === "~" || sel[0] === "+") {
|
|
424
|
+
sel = `:scope :nth-child(${index(ctx) + 1}) ${sel}`;
|
|
425
|
+
ctx = ctx.parentElement;
|
|
426
|
+
} else if (sel[0] === ">") {
|
|
427
|
+
sel = `:scope ${sel}`;
|
|
428
|
+
}
|
|
429
|
+
return _doQuery(ctx, queryFn, sel);
|
|
425
430
|
}
|
|
431
|
+
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
426
432
|
}
|
|
427
433
|
if (!isDocument(context)) {
|
|
428
434
|
context = context.ownerDocument;
|
|
@@ -993,24 +999,18 @@
|
|
|
993
999
|
},
|
|
994
1000
|
flush
|
|
995
1001
|
};
|
|
996
|
-
function flush(
|
|
1002
|
+
function flush() {
|
|
997
1003
|
runTasks(fastdom.reads);
|
|
998
1004
|
runTasks(fastdom.writes.splice(0));
|
|
999
1005
|
fastdom.scheduled = false;
|
|
1000
1006
|
if (fastdom.reads.length || fastdom.writes.length) {
|
|
1001
|
-
scheduleFlush(
|
|
1007
|
+
scheduleFlush();
|
|
1002
1008
|
}
|
|
1003
1009
|
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
}
|
|
1009
|
-
fastdom.scheduled = true;
|
|
1010
|
-
if (recursion && recursion < RECURSION_LIMIT) {
|
|
1011
|
-
Promise.resolve().then(() => flush(recursion));
|
|
1012
|
-
} else {
|
|
1013
|
-
requestAnimationFrame(() => flush(1));
|
|
1010
|
+
function scheduleFlush() {
|
|
1011
|
+
if (!fastdom.scheduled) {
|
|
1012
|
+
fastdom.scheduled = true;
|
|
1013
|
+
queueMicrotask(flush);
|
|
1014
1014
|
}
|
|
1015
1015
|
}
|
|
1016
1016
|
function runTasks(tasks) {
|
|
@@ -1767,6 +1767,7 @@
|
|
|
1767
1767
|
}
|
|
1768
1768
|
}
|
|
1769
1769
|
}
|
|
1770
|
+
const mutationOptions = { subtree: true, childList: true };
|
|
1770
1771
|
function registerComputed(instance, key, cb) {
|
|
1771
1772
|
instance._hasComputed = true;
|
|
1772
1773
|
Object.defineProperty(instance, key, {
|
|
@@ -1775,6 +1776,13 @@
|
|
|
1775
1776
|
const { _computed, $props, $el } = instance;
|
|
1776
1777
|
if (!hasOwn(_computed, key)) {
|
|
1777
1778
|
_computed[key] = (cb.get || cb).call(instance, $props, $el);
|
|
1779
|
+
if (cb.observe && instance._computedObserver) {
|
|
1780
|
+
const selector = cb.observe.call(instance, $props);
|
|
1781
|
+
instance._computedObserver.observe(
|
|
1782
|
+
["~", "+", "-"].includes(selector[0]) ? $el.parentElement : $el.getRootNode(),
|
|
1783
|
+
mutationOptions
|
|
1784
|
+
);
|
|
1785
|
+
}
|
|
1778
1786
|
}
|
|
1779
1787
|
return _computed[key];
|
|
1780
1788
|
},
|
|
@@ -1795,11 +1803,16 @@
|
|
|
1795
1803
|
read: () => runWatches(instance, resetComputed(instance)),
|
|
1796
1804
|
events: ["resize", "computed"]
|
|
1797
1805
|
});
|
|
1798
|
-
|
|
1799
|
-
|
|
1806
|
+
instance._computedObserver = observeMutation(
|
|
1807
|
+
instance.$el,
|
|
1808
|
+
() => callUpdate(instance, "computed"),
|
|
1809
|
+
mutationOptions
|
|
1810
|
+
);
|
|
1800
1811
|
}
|
|
1801
1812
|
function disconnectComputedUpdates(instance) {
|
|
1802
|
-
|
|
1813
|
+
var _a;
|
|
1814
|
+
(_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
|
|
1815
|
+
delete instance._computedObserver;
|
|
1803
1816
|
resetComputed(instance);
|
|
1804
1817
|
}
|
|
1805
1818
|
function resetComputed(instance) {
|
|
@@ -1807,23 +1820,6 @@
|
|
|
1807
1820
|
instance._computed = {};
|
|
1808
1821
|
return values;
|
|
1809
1822
|
}
|
|
1810
|
-
let observer;
|
|
1811
|
-
let instances$1;
|
|
1812
|
-
function registerComputedObserver() {
|
|
1813
|
-
if (observer) {
|
|
1814
|
-
return;
|
|
1815
|
-
}
|
|
1816
|
-
instances$1 = /* @__PURE__ */ new Set();
|
|
1817
|
-
observer = new MutationObserver(() => {
|
|
1818
|
-
for (const instance of instances$1) {
|
|
1819
|
-
callUpdate(instance, "computed");
|
|
1820
|
-
}
|
|
1821
|
-
});
|
|
1822
|
-
observer.observe(document, {
|
|
1823
|
-
subtree: true,
|
|
1824
|
-
childList: true
|
|
1825
|
-
});
|
|
1826
|
-
}
|
|
1827
1823
|
|
|
1828
1824
|
function initEvents(instance) {
|
|
1829
1825
|
instance._events = [];
|
|
@@ -2183,7 +2179,7 @@
|
|
|
2183
2179
|
};
|
|
2184
2180
|
App.util = util;
|
|
2185
2181
|
App.options = {};
|
|
2186
|
-
App.version = "3.19.5-dev.
|
|
2182
|
+
App.version = "3.19.5-dev.74c343fa4";
|
|
2187
2183
|
|
|
2188
2184
|
const PREFIX = "uk-";
|
|
2189
2185
|
const DATA = "__uikit__";
|
|
@@ -3970,6 +3966,11 @@
|
|
|
3970
3966
|
firstColumn: "uk-first-column"
|
|
3971
3967
|
},
|
|
3972
3968
|
observe: [
|
|
3969
|
+
mutation({
|
|
3970
|
+
options: {
|
|
3971
|
+
childList: true
|
|
3972
|
+
}
|
|
3973
|
+
}),
|
|
3973
3974
|
mutation({
|
|
3974
3975
|
options: {
|
|
3975
3976
|
attributes: true,
|
|
@@ -4281,7 +4282,10 @@
|
|
|
4281
4282
|
target: ""
|
|
4282
4283
|
},
|
|
4283
4284
|
computed: {
|
|
4284
|
-
target:
|
|
4285
|
+
target: {
|
|
4286
|
+
get: ({ target }, $el) => query(target, $el),
|
|
4287
|
+
observe: ({ target }) => target
|
|
4288
|
+
}
|
|
4285
4289
|
},
|
|
4286
4290
|
observe: resize({ target: ({ target }) => target }),
|
|
4287
4291
|
update: {
|
|
@@ -5212,10 +5216,11 @@
|
|
|
5212
5216
|
};
|
|
5213
5217
|
function install({ modal }) {
|
|
5214
5218
|
modal.dialog = function(content, options) {
|
|
5215
|
-
const dialog = modal(
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
+
const dialog = modal($(`<div><div class="uk-modal-dialog">${content}</div></div>`), {
|
|
5220
|
+
stack: true,
|
|
5221
|
+
role: "alertdialog",
|
|
5222
|
+
...options
|
|
5223
|
+
});
|
|
5219
5224
|
dialog.show();
|
|
5220
5225
|
on(
|
|
5221
5226
|
dialog.$el,
|
|
@@ -5687,7 +5692,6 @@
|
|
|
5687
5692
|
}
|
|
5688
5693
|
trigger(el, inview ? "inview" : "outview");
|
|
5689
5694
|
state.inview = inview;
|
|
5690
|
-
this.$update(el);
|
|
5691
5695
|
}
|
|
5692
5696
|
}
|
|
5693
5697
|
};
|
|
@@ -5834,7 +5838,7 @@
|
|
|
5834
5838
|
target: () => document.scrollingElement,
|
|
5835
5839
|
options: { box: "content-box" }
|
|
5836
5840
|
}),
|
|
5837
|
-
resize(
|
|
5841
|
+
resize()
|
|
5838
5842
|
],
|
|
5839
5843
|
events: [
|
|
5840
5844
|
{
|
|
@@ -6127,10 +6131,7 @@
|
|
|
6127
6131
|
}
|
|
6128
6132
|
|
|
6129
6133
|
function getMaxPathLength(el) {
|
|
6130
|
-
return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) =>
|
|
6131
|
-
var _a;
|
|
6132
|
-
return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
|
|
6133
|
-
})));
|
|
6134
|
+
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
6134
6135
|
}
|
|
6135
6136
|
|
|
6136
6137
|
var svg = {
|
|
@@ -6254,7 +6255,10 @@
|
|
|
6254
6255
|
swiping: true
|
|
6255
6256
|
},
|
|
6256
6257
|
computed: {
|
|
6257
|
-
connects:
|
|
6258
|
+
connects: {
|
|
6259
|
+
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
6260
|
+
observe: ({ connect }) => connect
|
|
6261
|
+
},
|
|
6258
6262
|
connectChildren() {
|
|
6259
6263
|
return this.connects.map((el) => children(el)).flat();
|
|
6260
6264
|
},
|
|
@@ -6443,9 +6447,12 @@
|
|
|
6443
6447
|
queued: true
|
|
6444
6448
|
},
|
|
6445
6449
|
computed: {
|
|
6446
|
-
target
|
|
6447
|
-
|
|
6448
|
-
|
|
6450
|
+
target: {
|
|
6451
|
+
get: ({ target }, $el) => {
|
|
6452
|
+
target = queryAll(target || $el.hash, $el);
|
|
6453
|
+
return target.length ? target : [$el];
|
|
6454
|
+
},
|
|
6455
|
+
observe: ({ target }) => target
|
|
6449
6456
|
}
|
|
6450
6457
|
},
|
|
6451
6458
|
connected() {
|