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-core.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,
|
|
@@ -2170,7 +2164,7 @@
|
|
|
2170
2164
|
};
|
|
2171
2165
|
App.util = util;
|
|
2172
2166
|
App.options = {};
|
|
2173
|
-
App.version = "3.20.10-dev.
|
|
2167
|
+
App.version = "3.20.10-dev.de039bb62";
|
|
2174
2168
|
|
|
2175
2169
|
const PREFIX = "uk-";
|
|
2176
2170
|
const DATA = "__uikit__";
|
|
@@ -5532,6 +5526,7 @@
|
|
|
5532
5526
|
}
|
|
5533
5527
|
}
|
|
5534
5528
|
|
|
5529
|
+
const clsInView = "uk-scrollspy-inview";
|
|
5535
5530
|
var scrollspy = {
|
|
5536
5531
|
args: "cls",
|
|
5537
5532
|
props: {
|
|
@@ -5548,8 +5543,7 @@
|
|
|
5548
5543
|
hidden: true,
|
|
5549
5544
|
margin: "-1px",
|
|
5550
5545
|
repeat: false,
|
|
5551
|
-
delay: 0
|
|
5552
|
-
inViewClass: "uk-scrollspy-inview"
|
|
5546
|
+
delay: 0
|
|
5553
5547
|
}),
|
|
5554
5548
|
computed: {
|
|
5555
5549
|
elements: ({ target }, $el) => target ? $$(target, $el) : [$el]
|
|
@@ -5557,7 +5551,7 @@
|
|
|
5557
5551
|
watch: {
|
|
5558
5552
|
elements(elements) {
|
|
5559
5553
|
if (this.hidden) {
|
|
5560
|
-
css(filter(elements, `:not(.${
|
|
5554
|
+
css(filter(elements, `:not(.${clsInView})`), "opacity", 0);
|
|
5561
5555
|
}
|
|
5562
5556
|
}
|
|
5563
5557
|
},
|
|
@@ -5566,7 +5560,7 @@
|
|
|
5566
5560
|
},
|
|
5567
5561
|
disconnected() {
|
|
5568
5562
|
for (const [el, state] of this.elementData.entries()) {
|
|
5569
|
-
removeClass(el,
|
|
5563
|
+
removeClass(el, clsInView, (state == null ? void 0 : state.cls) || "");
|
|
5570
5564
|
}
|
|
5571
5565
|
delete this.elementData;
|
|
5572
5566
|
},
|
|
@@ -5620,10 +5614,11 @@
|
|
|
5620
5614
|
}
|
|
5621
5615
|
(_b = state.off) == null ? void 0 : _b.call(state);
|
|
5622
5616
|
css(el, "opacity", !inview && this.hidden ? 0 : "");
|
|
5623
|
-
toggleClass(el,
|
|
5617
|
+
toggleClass(el, clsInView, inview);
|
|
5624
5618
|
toggleClass(el, state.cls);
|
|
5625
|
-
|
|
5626
|
-
|
|
5619
|
+
let match;
|
|
5620
|
+
if (match = state.cls.match(/\buk-animation-[\w-]+/g)) {
|
|
5621
|
+
const removeAnimationClasses = () => removeClass(el, match);
|
|
5627
5622
|
if (inview) {
|
|
5628
5623
|
state.off = once(el, "animationcancel animationend", removeAnimationClasses, {
|
|
5629
5624
|
self: true
|