uikit 3.20.10-dev.c66297bc1 → 3.20.10-dev.de039bb62
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 +4 -0
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +2 -3
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +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 +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- 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 +4 -3
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +62 -67
- 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 +66 -71
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/countdown.js +1 -3
- package/src/js/components/upload.js +3 -4
- package/src/js/core/scrollspy.js +8 -7
- package/src/js/mixin/togglable.js +1 -5
- package/src/js/util/animation.js +20 -19
- package/src/js/util/class.js +1 -8
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.20.10-dev.
|
|
1
|
+
/*! UIkit 3.20.10-dev.de039bb62 | 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() :
|
|
@@ -192,43 +192,6 @@
|
|
|
192
192
|
return (key, ...args) => cache[key] || (cache[key] = fn(key, ...args));
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
function attr(element, name, value) {
|
|
196
|
-
var _a;
|
|
197
|
-
if (isObject(name)) {
|
|
198
|
-
for (const key in name) {
|
|
199
|
-
attr(element, key, name[key]);
|
|
200
|
-
}
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
203
|
-
if (isUndefined(value)) {
|
|
204
|
-
return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
|
|
205
|
-
} else {
|
|
206
|
-
for (const el of toNodes(element)) {
|
|
207
|
-
if (isFunction(value)) {
|
|
208
|
-
value = value.call(el, attr(el, name));
|
|
209
|
-
}
|
|
210
|
-
if (value === null) {
|
|
211
|
-
removeAttr(el, name);
|
|
212
|
-
} else {
|
|
213
|
-
el.setAttribute(name, value);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
function hasAttr(element, name) {
|
|
219
|
-
return toNodes(element).some((element2) => element2.hasAttribute(name));
|
|
220
|
-
}
|
|
221
|
-
function removeAttr(element, name) {
|
|
222
|
-
toNodes(element).forEach((element2) => element2.removeAttribute(name));
|
|
223
|
-
}
|
|
224
|
-
function data(element, attribute) {
|
|
225
|
-
for (const name of [attribute, `data-${attribute}`]) {
|
|
226
|
-
if (hasAttr(element, name)) {
|
|
227
|
-
return attr(element, name);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
195
|
function addClass(element, ...classes) {
|
|
233
196
|
for (const node of toNodes(element)) {
|
|
234
197
|
const add = toClasses(classes).filter((cls) => !hasClass(node, cls));
|
|
@@ -245,12 +208,6 @@
|
|
|
245
208
|
}
|
|
246
209
|
}
|
|
247
210
|
}
|
|
248
|
-
function removeClasses(element, clsRegex) {
|
|
249
|
-
clsRegex = new RegExp(clsRegex);
|
|
250
|
-
for (const node of toNodes(element)) {
|
|
251
|
-
node.classList.remove(...toArray(node.classList).filter((cls) => cls.match(clsRegex)));
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
211
|
function replaceClass(element, oldClass, newClass) {
|
|
255
212
|
newClass = toClasses(newClass);
|
|
256
213
|
oldClass = toClasses(oldClass).filter((cls) => !includes(newClass, cls));
|
|
@@ -276,6 +233,43 @@
|
|
|
276
233
|
return str ? isArray(str) ? str.map(toClasses).flat() : String(str).split(" ").filter(Boolean) : [];
|
|
277
234
|
}
|
|
278
235
|
|
|
236
|
+
function attr(element, name, value) {
|
|
237
|
+
var _a;
|
|
238
|
+
if (isObject(name)) {
|
|
239
|
+
for (const key in name) {
|
|
240
|
+
attr(element, key, name[key]);
|
|
241
|
+
}
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
if (isUndefined(value)) {
|
|
245
|
+
return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
|
|
246
|
+
} else {
|
|
247
|
+
for (const el of toNodes(element)) {
|
|
248
|
+
if (isFunction(value)) {
|
|
249
|
+
value = value.call(el, attr(el, name));
|
|
250
|
+
}
|
|
251
|
+
if (value === null) {
|
|
252
|
+
removeAttr(el, name);
|
|
253
|
+
} else {
|
|
254
|
+
el.setAttribute(name, value);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
function hasAttr(element, name) {
|
|
260
|
+
return toNodes(element).some((element2) => element2.hasAttribute(name));
|
|
261
|
+
}
|
|
262
|
+
function removeAttr(element, name) {
|
|
263
|
+
toNodes(element).forEach((element2) => element2.removeAttribute(name));
|
|
264
|
+
}
|
|
265
|
+
function data(element, attribute) {
|
|
266
|
+
for (const name of [attribute, `data-${attribute}`]) {
|
|
267
|
+
if (hasAttr(element, name)) {
|
|
268
|
+
return attr(element, name);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
279
273
|
const inBrowser = typeof window !== "undefined";
|
|
280
274
|
const isRtl = inBrowser && document.dir === "rtl";
|
|
281
275
|
const hasTouch = inBrowser && "ontouchstart" in window;
|
|
@@ -648,10 +642,7 @@
|
|
|
648
642
|
toNodes(element).map(
|
|
649
643
|
(element2) => new Promise((resolve, reject) => {
|
|
650
644
|
for (const name in props) {
|
|
651
|
-
|
|
652
|
-
if (value === "") {
|
|
653
|
-
css(element2, name, value);
|
|
654
|
-
}
|
|
645
|
+
css(element2, name);
|
|
655
646
|
}
|
|
656
647
|
const timer = setTimeout(() => trigger(element2, transitionEnd), duration);
|
|
657
648
|
once(
|
|
@@ -694,14 +685,23 @@
|
|
|
694
685
|
return hasClass(element, clsTransition);
|
|
695
686
|
}
|
|
696
687
|
};
|
|
697
|
-
const
|
|
688
|
+
const clsAnimation = "uk-animation";
|
|
698
689
|
const animationEnd = "animationend";
|
|
699
690
|
const animationCanceled = "animationcanceled";
|
|
700
691
|
function animate$2(element, animation, duration = 200, origin, out) {
|
|
701
692
|
return Promise.all(
|
|
702
693
|
toNodes(element).map(
|
|
703
694
|
(element2) => new Promise((resolve, reject) => {
|
|
704
|
-
|
|
695
|
+
if (hasClass(element2, clsAnimation)) {
|
|
696
|
+
trigger(element2, animationCanceled);
|
|
697
|
+
}
|
|
698
|
+
const classes = [
|
|
699
|
+
animation,
|
|
700
|
+
clsAnimation,
|
|
701
|
+
`${clsAnimation}-${out ? "leave" : "enter"}`,
|
|
702
|
+
origin && `uk-transform-origin-${origin}`,
|
|
703
|
+
out && `${clsAnimation}-reverse`
|
|
704
|
+
];
|
|
705
705
|
const timer = setTimeout(() => trigger(element2, animationEnd), duration);
|
|
706
706
|
once(
|
|
707
707
|
element2,
|
|
@@ -710,28 +710,23 @@
|
|
|
710
710
|
clearTimeout(timer);
|
|
711
711
|
type === animationCanceled ? reject() : resolve(element2);
|
|
712
712
|
css(element2, "animationDuration", "");
|
|
713
|
-
|
|
713
|
+
removeClass(element2, classes);
|
|
714
714
|
},
|
|
715
715
|
{ self: true }
|
|
716
716
|
);
|
|
717
717
|
css(element2, "animationDuration", `${duration}ms`);
|
|
718
|
-
addClass(element2,
|
|
719
|
-
if (startsWith(animation, animationPrefix)) {
|
|
720
|
-
origin && addClass(element2, `uk-transform-origin-${origin}`);
|
|
721
|
-
out && addClass(element2, `${animationPrefix}reverse`);
|
|
722
|
-
}
|
|
718
|
+
addClass(element2, classes);
|
|
723
719
|
})
|
|
724
720
|
)
|
|
725
721
|
);
|
|
726
722
|
}
|
|
727
|
-
const inProgressRe = new RegExp(`${animationPrefix}(enter|leave)`);
|
|
728
723
|
const Animation = {
|
|
729
724
|
in: animate$2,
|
|
730
725
|
out(element, animation, duration, origin) {
|
|
731
726
|
return animate$2(element, animation, duration, origin, true);
|
|
732
727
|
},
|
|
733
728
|
inProgress(element) {
|
|
734
|
-
return
|
|
729
|
+
return hasClass(element, clsAnimation);
|
|
735
730
|
},
|
|
736
731
|
cancel(element) {
|
|
737
732
|
trigger(element, animationCanceled);
|
|
@@ -1650,7 +1645,6 @@
|
|
|
1650
1645
|
remove: remove$1,
|
|
1651
1646
|
removeAttr: removeAttr,
|
|
1652
1647
|
removeClass: removeClass,
|
|
1653
|
-
removeClasses: removeClasses,
|
|
1654
1648
|
replaceClass: replaceClass,
|
|
1655
1649
|
scrollIntoView: scrollIntoView,
|
|
1656
1650
|
scrollParent: scrollParent,
|
|
@@ -1750,8 +1744,7 @@
|
|
|
1750
1744
|
if (!el) {
|
|
1751
1745
|
continue;
|
|
1752
1746
|
}
|
|
1753
|
-
let digits =
|
|
1754
|
-
digits = digits.length < 2 ? `0${digits}` : digits;
|
|
1747
|
+
let digits = Math.trunc(timespan[unit]).toString().padStart(2, "0");
|
|
1755
1748
|
if (el.textContent !== digits) {
|
|
1756
1749
|
digits = digits.split("");
|
|
1757
1750
|
if (digits.length !== el.children.length) {
|
|
@@ -3546,7 +3539,7 @@
|
|
|
3546
3539
|
};
|
|
3547
3540
|
App.util = util;
|
|
3548
3541
|
App.options = {};
|
|
3549
|
-
App.version = "3.20.10-dev.
|
|
3542
|
+
App.version = "3.20.10-dev.de039bb62";
|
|
3550
3543
|
|
|
3551
3544
|
const PREFIX = "uk-";
|
|
3552
3545
|
const DATA = "__uikit__";
|
|
@@ -6274,7 +6267,7 @@
|
|
|
6274
6267
|
e.preventDefault();
|
|
6275
6268
|
e.stopPropagation();
|
|
6276
6269
|
}
|
|
6277
|
-
function ajax(url, options) {
|
|
6270
|
+
async function ajax(url, options) {
|
|
6278
6271
|
const env = {
|
|
6279
6272
|
data: null,
|
|
6280
6273
|
method: "GET",
|
|
@@ -6284,7 +6277,8 @@
|
|
|
6284
6277
|
responseType: "",
|
|
6285
6278
|
...options
|
|
6286
6279
|
};
|
|
6287
|
-
|
|
6280
|
+
await env.beforeSend(env);
|
|
6281
|
+
return send(url, env);
|
|
6288
6282
|
}
|
|
6289
6283
|
function send(url, env) {
|
|
6290
6284
|
return new Promise((resolve, reject) => {
|
|
@@ -8755,6 +8749,7 @@
|
|
|
8755
8749
|
}
|
|
8756
8750
|
}
|
|
8757
8751
|
|
|
8752
|
+
const clsInView = "uk-scrollspy-inview";
|
|
8758
8753
|
var scrollspy = {
|
|
8759
8754
|
args: "cls",
|
|
8760
8755
|
props: {
|
|
@@ -8771,8 +8766,7 @@
|
|
|
8771
8766
|
hidden: true,
|
|
8772
8767
|
margin: "-1px",
|
|
8773
8768
|
repeat: false,
|
|
8774
|
-
delay: 0
|
|
8775
|
-
inViewClass: "uk-scrollspy-inview"
|
|
8769
|
+
delay: 0
|
|
8776
8770
|
}),
|
|
8777
8771
|
computed: {
|
|
8778
8772
|
elements: ({ target }, $el) => target ? $$(target, $el) : [$el]
|
|
@@ -8780,7 +8774,7 @@
|
|
|
8780
8774
|
watch: {
|
|
8781
8775
|
elements(elements) {
|
|
8782
8776
|
if (this.hidden) {
|
|
8783
|
-
css(filter$1(elements, `:not(.${
|
|
8777
|
+
css(filter$1(elements, `:not(.${clsInView})`), "opacity", 0);
|
|
8784
8778
|
}
|
|
8785
8779
|
}
|
|
8786
8780
|
},
|
|
@@ -8789,7 +8783,7 @@
|
|
|
8789
8783
|
},
|
|
8790
8784
|
disconnected() {
|
|
8791
8785
|
for (const [el, state] of this.elementData.entries()) {
|
|
8792
|
-
removeClass(el,
|
|
8786
|
+
removeClass(el, clsInView, (state == null ? void 0 : state.cls) || "");
|
|
8793
8787
|
}
|
|
8794
8788
|
delete this.elementData;
|
|
8795
8789
|
},
|
|
@@ -8843,10 +8837,11 @@
|
|
|
8843
8837
|
}
|
|
8844
8838
|
(_b = state.off) == null ? void 0 : _b.call(state);
|
|
8845
8839
|
css(el, "opacity", !inview && this.hidden ? 0 : "");
|
|
8846
|
-
toggleClass(el,
|
|
8840
|
+
toggleClass(el, clsInView, inview);
|
|
8847
8841
|
toggleClass(el, state.cls);
|
|
8848
|
-
|
|
8849
|
-
|
|
8842
|
+
let match;
|
|
8843
|
+
if (match = state.cls.match(/\buk-animation-[\w-]+/g)) {
|
|
8844
|
+
const removeAnimationClasses = () => removeClass(el, match);
|
|
8850
8845
|
if (inview) {
|
|
8851
8846
|
state.off = once(el, "animationcancel animationend", removeAnimationClasses, {
|
|
8852
8847
|
self: true
|