uikit 3.20.9 → 3.20.10-dev.8e8f67f8b
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 +10 -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 +3 -3
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +3 -3
- 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 +5 -3
- 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 +3 -3
- 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 +71 -73
- 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 +79 -79
- 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/internal/slider-transitioner.js +6 -0
- package/src/js/components/upload.js +3 -4
- package/src/js/core/inverse.js +14 -6
- package/src/js/core/scrollspy.js +8 -7
- package/src/js/mixin/slider.js +2 -2
- 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.
|
|
1
|
+
/*! UIkit 3.20.10-dev.8e8f67f8b | 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.
|
|
2167
|
+
App.version = "3.20.10-dev.8e8f67f8b";
|
|
2174
2168
|
|
|
2175
2169
|
const PREFIX = "uk-";
|
|
2176
2170
|
const DATA = "__uikit__";
|
|
@@ -4783,18 +4777,21 @@
|
|
|
4783
4777
|
return false;
|
|
4784
4778
|
}
|
|
4785
4779
|
for (const target of toNodes(this.target)) {
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
"uk-light uk-dark",
|
|
4789
|
-
|
|
4790
|
-
);
|
|
4780
|
+
let color = !this.selActive || matches(target, this.selActive) ? findTargetColor(target) : "";
|
|
4781
|
+
if (color !== false) {
|
|
4782
|
+
replaceClass(target, "uk-light uk-dark", color);
|
|
4783
|
+
}
|
|
4791
4784
|
}
|
|
4792
4785
|
}
|
|
4793
4786
|
}
|
|
4794
4787
|
};
|
|
4795
4788
|
function findTargetColor(target) {
|
|
4796
|
-
const
|
|
4789
|
+
const dim = dimensions(target);
|
|
4797
4790
|
const viewport = dimensions(window);
|
|
4791
|
+
if (!intersectRect(dim, viewport)) {
|
|
4792
|
+
return false;
|
|
4793
|
+
}
|
|
4794
|
+
const { left, top, height, width } = dim;
|
|
4798
4795
|
let last;
|
|
4799
4796
|
for (const percent of [0.25, 0.5, 0.75]) {
|
|
4800
4797
|
const elements = target.ownerDocument.elementsFromPoint(
|
|
@@ -5529,6 +5526,7 @@
|
|
|
5529
5526
|
}
|
|
5530
5527
|
}
|
|
5531
5528
|
|
|
5529
|
+
const clsInView = "uk-scrollspy-inview";
|
|
5532
5530
|
var scrollspy = {
|
|
5533
5531
|
args: "cls",
|
|
5534
5532
|
props: {
|
|
@@ -5545,8 +5543,7 @@
|
|
|
5545
5543
|
hidden: true,
|
|
5546
5544
|
margin: "-1px",
|
|
5547
5545
|
repeat: false,
|
|
5548
|
-
delay: 0
|
|
5549
|
-
inViewClass: "uk-scrollspy-inview"
|
|
5546
|
+
delay: 0
|
|
5550
5547
|
}),
|
|
5551
5548
|
computed: {
|
|
5552
5549
|
elements: ({ target }, $el) => target ? $$(target, $el) : [$el]
|
|
@@ -5554,7 +5551,7 @@
|
|
|
5554
5551
|
watch: {
|
|
5555
5552
|
elements(elements) {
|
|
5556
5553
|
if (this.hidden) {
|
|
5557
|
-
css(filter(elements, `:not(.${
|
|
5554
|
+
css(filter(elements, `:not(.${clsInView})`), "opacity", 0);
|
|
5558
5555
|
}
|
|
5559
5556
|
}
|
|
5560
5557
|
},
|
|
@@ -5563,7 +5560,7 @@
|
|
|
5563
5560
|
},
|
|
5564
5561
|
disconnected() {
|
|
5565
5562
|
for (const [el, state] of this.elementData.entries()) {
|
|
5566
|
-
removeClass(el,
|
|
5563
|
+
removeClass(el, clsInView, (state == null ? void 0 : state.cls) || "");
|
|
5567
5564
|
}
|
|
5568
5565
|
delete this.elementData;
|
|
5569
5566
|
},
|
|
@@ -5617,10 +5614,11 @@
|
|
|
5617
5614
|
}
|
|
5618
5615
|
(_b = state.off) == null ? void 0 : _b.call(state);
|
|
5619
5616
|
css(el, "opacity", !inview && this.hidden ? 0 : "");
|
|
5620
|
-
toggleClass(el,
|
|
5617
|
+
toggleClass(el, clsInView, inview);
|
|
5621
5618
|
toggleClass(el, state.cls);
|
|
5622
|
-
|
|
5623
|
-
|
|
5619
|
+
let match;
|
|
5620
|
+
if (match = state.cls.match(/\buk-animation-[\w-]+/g)) {
|
|
5621
|
+
const removeAnimationClasses = () => removeClass(el, match);
|
|
5624
5622
|
if (inview) {
|
|
5625
5623
|
state.off = once(el, "animationcancel animationend", removeAnimationClasses, {
|
|
5626
5624
|
self: true
|