uikit 3.19.5-dev.c6a7fbca6 → 3.19.5-dev.c70b3862f
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 +6 -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 +55 -55
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +55 -55
- 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 +43 -32
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +44 -33
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +44 -34
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +44 -33
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +44 -33
- 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 +132 -114
- 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 +221 -206
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/boot.js +6 -7
- package/src/js/api/component.js +4 -4
- package/src/js/api/computed.js +20 -26
- package/src/js/api/observer.js +17 -5
- package/src/js/components/slider-parallax.js +2 -2
- package/src/js/components/slider.js +1 -1
- package/src/js/core/drop.js +1 -2
- package/src/js/core/height-placeholder.js +4 -1
- package/src/js/core/height-viewport.js +1 -1
- package/src/js/core/icon.js +2 -3
- package/src/js/core/img.js +1 -1
- package/src/js/core/inverse.js +13 -6
- 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/mixin/slider.js +0 -3
- package/src/js/mixin/slideshow.js +3 -0
- package/src/js/util/class.js +1 -1
- package/src/js/util/fastdom.js +6 -13
- package/src/js/util/filter.js +7 -14
- package/src/js/util/lang.js +1 -1
- package/src/js/util/selector.js +33 -24
- package/src/js/util/style.js +2 -4
- 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.c70b3862f | 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.c6a7fbca6 | 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.c70b3862f | 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.c70b3862f | 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.c70b3862f | 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.c70b3862f | 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.c70b3862f | 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});
|