uikit 3.19.5-dev.520984f53 → 3.19.5-dev.5db24934f
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 +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 +2 -2
- 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 +20 -14
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +21 -15
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +20 -14
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +21 -15
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +20 -14
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +2 -2
- 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 +69 -56
- 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 +76 -61
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/computed.js +24 -23
- package/src/js/api/observer.js +1 -1
- package/src/js/components/slider-parallax.js +2 -2
- package/src/js/core/drop.js +1 -2
- package/src/js/core/height-placeholder.js +5 -2
- package/src/js/core/height-viewport.js +1 -1
- package/src/js/core/icon.js +2 -3
- package/src/js/core/inverse.js +2 -0
- package/src/js/core/modal.js +5 -6
- package/src/js/core/sticky.js +1 -1
- package/src/js/core/switcher.js +5 -1
- package/src/js/core/toggle.js +7 -3
- package/src/js/mixin/internal/animate-fade.js +1 -3
- package/src/js/mixin/parallax.js +7 -3
- package/src/js/util/filter.js +7 -14
- package/src/js/util/selector.js +15 -10
- package/src/less/components/utility.less +1 -1
- package/src/scss/components/utility.scss +1 -1
- package/tests/js/index.js +12 -10
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.19.5-dev.
|
|
1
|
+
/*! UIkit 3.19.5-dev.5db24934f | 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) {
|
|
@@ -319,13 +320,6 @@
|
|
|
319
320
|
function matches(element, selector) {
|
|
320
321
|
return toNodes(element).some((element2) => element2.matches(selector));
|
|
321
322
|
}
|
|
322
|
-
function closest(element, selector) {
|
|
323
|
-
var _a;
|
|
324
|
-
return (_a = toNode(element)) == null ? void 0 : _a.closest(startsWith(selector, ">") ? selector.slice(1) : selector);
|
|
325
|
-
}
|
|
326
|
-
function within(element, selector) {
|
|
327
|
-
return isString(selector) ? !!closest(element, selector) : toNode(selector).contains(toNode(element));
|
|
328
|
-
}
|
|
329
323
|
function parents(element, selector) {
|
|
330
324
|
const elements = [];
|
|
331
325
|
while (element = parent(element)) {
|
|
@@ -392,6 +386,11 @@
|
|
|
392
386
|
isContextSelector
|
|
393
387
|
};
|
|
394
388
|
});
|
|
389
|
+
const parsePositionSelector = memoize((selector) => {
|
|
390
|
+
selector = selector.substr(1).trim();
|
|
391
|
+
const index2 = selector.indexOf(" ");
|
|
392
|
+
return ~index2 ? [selector.substring(0, index2), selector.substring(index2 + 1)] : [selector, ""];
|
|
393
|
+
});
|
|
395
394
|
function _query(selector, context = document, queryFn) {
|
|
396
395
|
if (!selector || !isString(selector)) {
|
|
397
396
|
return selector;
|
|
@@ -403,21 +402,20 @@
|
|
|
403
402
|
selector = "";
|
|
404
403
|
const isSingle = parsed.selectors.length === 1;
|
|
405
404
|
for (let sel of parsed.selectors) {
|
|
405
|
+
let positionSel;
|
|
406
406
|
let ctx = context;
|
|
407
407
|
if (sel[0] === "!") {
|
|
408
|
-
|
|
409
|
-
ctx = context.parentElement.closest(
|
|
410
|
-
sel
|
|
411
|
-
if (!sel.length && isSingle) {
|
|
408
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
409
|
+
ctx = context.parentElement.closest(positionSel);
|
|
410
|
+
if (!sel && isSingle) {
|
|
412
411
|
return ctx;
|
|
413
412
|
}
|
|
414
413
|
}
|
|
415
|
-
if (sel[0] === "-") {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
ctx = matches(
|
|
419
|
-
sel
|
|
420
|
-
if (!sel.length && isSingle) {
|
|
414
|
+
if (ctx && sel[0] === "-") {
|
|
415
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
416
|
+
ctx = ctx.previousElementSibling;
|
|
417
|
+
ctx = matches(ctx, positionSel) ? ctx : null;
|
|
418
|
+
if (!sel && isSingle) {
|
|
421
419
|
return ctx;
|
|
422
420
|
}
|
|
423
421
|
} else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
|
|
@@ -1567,7 +1565,6 @@
|
|
|
1567
1565
|
camelize: camelize,
|
|
1568
1566
|
children: children,
|
|
1569
1567
|
clamp: clamp,
|
|
1570
|
-
closest: closest,
|
|
1571
1568
|
createEvent: createEvent,
|
|
1572
1569
|
css: css,
|
|
1573
1570
|
data: data,
|
|
@@ -1688,7 +1685,6 @@
|
|
|
1688
1685
|
uniqueBy: uniqueBy,
|
|
1689
1686
|
unwrap: unwrap,
|
|
1690
1687
|
width: width,
|
|
1691
|
-
within: within,
|
|
1692
1688
|
wrapAll: wrapAll,
|
|
1693
1689
|
wrapInner: wrapInner
|
|
1694
1690
|
});
|
|
@@ -2191,7 +2187,7 @@
|
|
|
2191
2187
|
);
|
|
2192
2188
|
}
|
|
2193
2189
|
function getTransitionNodes(target) {
|
|
2194
|
-
return getRows(children(target)).flat().filter(
|
|
2190
|
+
return getRows(children(target)).flat().filter(isVisible);
|
|
2195
2191
|
}
|
|
2196
2192
|
function awaitFrame$1() {
|
|
2197
2193
|
return new Promise((resolve) => requestAnimationFrame(resolve));
|
|
@@ -3263,6 +3259,7 @@
|
|
|
3263
3259
|
}
|
|
3264
3260
|
}
|
|
3265
3261
|
}
|
|
3262
|
+
const mutationOptions = { subtree: true, childList: true };
|
|
3266
3263
|
function registerComputed(instance, key, cb) {
|
|
3267
3264
|
instance._hasComputed = true;
|
|
3268
3265
|
Object.defineProperty(instance, key, {
|
|
@@ -3271,6 +3268,15 @@
|
|
|
3271
3268
|
const { _computed, $props, $el } = instance;
|
|
3272
3269
|
if (!hasOwn(_computed, key)) {
|
|
3273
3270
|
_computed[key] = (cb.get || cb).call(instance, $props, $el);
|
|
3271
|
+
if (cb.observe && instance._computedObserver) {
|
|
3272
|
+
const observeEl = cb.observe.call(instance, _computed[key]);
|
|
3273
|
+
if (observeEl && observeEl !== $el) {
|
|
3274
|
+
instance._computedObserver.observe(
|
|
3275
|
+
commonAncestor(observeEl, $el),
|
|
3276
|
+
mutationOptions
|
|
3277
|
+
);
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3274
3280
|
}
|
|
3275
3281
|
return _computed[key];
|
|
3276
3282
|
},
|
|
@@ -3291,11 +3297,16 @@
|
|
|
3291
3297
|
read: () => runWatches(instance, resetComputed(instance)),
|
|
3292
3298
|
events: ["resize", "computed"]
|
|
3293
3299
|
});
|
|
3294
|
-
|
|
3295
|
-
|
|
3300
|
+
instance._computedObserver = observeMutation(
|
|
3301
|
+
instance.$el,
|
|
3302
|
+
() => callUpdate(instance, "computed"),
|
|
3303
|
+
mutationOptions
|
|
3304
|
+
);
|
|
3296
3305
|
}
|
|
3297
3306
|
function disconnectComputedUpdates(instance) {
|
|
3298
|
-
|
|
3307
|
+
var _a;
|
|
3308
|
+
(_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
|
|
3309
|
+
delete instance._computedObserver;
|
|
3299
3310
|
resetComputed(instance);
|
|
3300
3311
|
}
|
|
3301
3312
|
function resetComputed(instance) {
|
|
@@ -3303,22 +3314,11 @@
|
|
|
3303
3314
|
instance._computed = {};
|
|
3304
3315
|
return values;
|
|
3305
3316
|
}
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
if (observer) {
|
|
3310
|
-
return;
|
|
3317
|
+
function commonAncestor(element1, element2) {
|
|
3318
|
+
while (element1 && !element1.contains(element2)) {
|
|
3319
|
+
element1 = element1.parentNode;
|
|
3311
3320
|
}
|
|
3312
|
-
|
|
3313
|
-
observer = new MutationObserver(() => {
|
|
3314
|
-
for (const instance of instances$1) {
|
|
3315
|
-
callUpdate(instance, "computed");
|
|
3316
|
-
}
|
|
3317
|
-
});
|
|
3318
|
-
observer.observe(document, {
|
|
3319
|
-
subtree: true,
|
|
3320
|
-
childList: true
|
|
3321
|
-
});
|
|
3321
|
+
return element1;
|
|
3322
3322
|
}
|
|
3323
3323
|
|
|
3324
3324
|
function initEvents(instance) {
|
|
@@ -3404,7 +3404,7 @@
|
|
|
3404
3404
|
if (!includes(targets, target)) {
|
|
3405
3405
|
if (observer.unobserve) {
|
|
3406
3406
|
observer.unobserve(target);
|
|
3407
|
-
} else {
|
|
3407
|
+
} else if (observer.observe) {
|
|
3408
3408
|
observer.disconnect();
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
@@ -3572,7 +3572,7 @@
|
|
|
3572
3572
|
};
|
|
3573
3573
|
App.util = util;
|
|
3574
3574
|
App.options = {};
|
|
3575
|
-
App.version = "3.19.5-dev.
|
|
3575
|
+
App.version = "3.19.5-dev.5db24934f";
|
|
3576
3576
|
|
|
3577
3577
|
const PREFIX = "uk-";
|
|
3578
3578
|
const DATA = "__uikit__";
|
|
@@ -4779,6 +4779,7 @@
|
|
|
4779
4779
|
}
|
|
4780
4780
|
};
|
|
4781
4781
|
}
|
|
4782
|
+
const loading = {};
|
|
4782
4783
|
const dimensions = {};
|
|
4783
4784
|
function getBackgroundImageDimensions(el) {
|
|
4784
4785
|
const src = css(el, "backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/, "$1");
|
|
@@ -4788,11 +4789,12 @@
|
|
|
4788
4789
|
const image = new Image();
|
|
4789
4790
|
if (src) {
|
|
4790
4791
|
image.src = src;
|
|
4791
|
-
if (!image.naturalWidth) {
|
|
4792
|
-
image
|
|
4792
|
+
if (!image.naturalWidth && !loading[src]) {
|
|
4793
|
+
once(image, "error load", () => {
|
|
4793
4794
|
dimensions[src] = toDimensions(image);
|
|
4794
4795
|
trigger(el, createEvent("load", false));
|
|
4795
|
-
};
|
|
4796
|
+
});
|
|
4797
|
+
loading[src] = true;
|
|
4796
4798
|
return toDimensions(image);
|
|
4797
4799
|
}
|
|
4798
4800
|
}
|
|
@@ -5470,7 +5472,7 @@
|
|
|
5470
5472
|
var sliderParallax = {
|
|
5471
5473
|
mixins: [Parallax],
|
|
5472
5474
|
beforeConnect() {
|
|
5473
|
-
this.item =
|
|
5475
|
+
this.item = this.$el.closest(`.${this.$options.id.replace("parallax", "items")} > *`);
|
|
5474
5476
|
},
|
|
5475
5477
|
disconnected() {
|
|
5476
5478
|
this.item = null;
|
|
@@ -7176,7 +7178,8 @@
|
|
|
7176
7178
|
document,
|
|
7177
7179
|
`${pointerUp$1} ${pointerCancel} scroll`,
|
|
7178
7180
|
({ defaultPrevented, type, target: newTarget }) => {
|
|
7179
|
-
|
|
7181
|
+
var _a;
|
|
7182
|
+
if (!defaultPrevented && type === pointerUp$1 && target === newTarget && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
|
|
7180
7183
|
drop.hide(false);
|
|
7181
7184
|
}
|
|
7182
7185
|
},
|
|
@@ -7792,7 +7795,10 @@
|
|
|
7792
7795
|
target: ""
|
|
7793
7796
|
},
|
|
7794
7797
|
computed: {
|
|
7795
|
-
target:
|
|
7798
|
+
target: {
|
|
7799
|
+
get: ({ target }, $el) => query(target, $el),
|
|
7800
|
+
observe: (target) => parent(target)
|
|
7801
|
+
}
|
|
7796
7802
|
},
|
|
7797
7803
|
observe: resize({ target: ({ target }) => target }),
|
|
7798
7804
|
update: {
|
|
@@ -7848,7 +7854,7 @@
|
|
|
7848
7854
|
const top = offsetPosition(offsetTopEl)[0] - offsetPosition(scrollElement)[0];
|
|
7849
7855
|
minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : "";
|
|
7850
7856
|
} else {
|
|
7851
|
-
minHeight += ` - ${css(scrollElement, "
|
|
7857
|
+
minHeight += ` - ${boxModelAdjust(scrollElement, "height", css(scrollElement, "boxSizing"))}px`;
|
|
7852
7858
|
}
|
|
7853
7859
|
}
|
|
7854
7860
|
if (this.offsetBottom === true) {
|
|
@@ -8042,7 +8048,7 @@
|
|
|
8042
8048
|
i18n: { toggle: "Open Search", submit: "Submit Search" },
|
|
8043
8049
|
beforeConnect() {
|
|
8044
8050
|
const isToggle = hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle");
|
|
8045
|
-
this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") &&
|
|
8051
|
+
this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") && this.$el.closest(".uk-search-large") ? "search-large" : this.$el.closest(".uk-search-navbar") ? "search-navbar" : this.$props.icon;
|
|
8046
8052
|
if (hasAttr(this.$el, "aria-label")) {
|
|
8047
8053
|
return;
|
|
8048
8054
|
}
|
|
@@ -8319,6 +8325,8 @@
|
|
|
8319
8325
|
})
|
|
8320
8326
|
];
|
|
8321
8327
|
return {
|
|
8328
|
+
observe: observer.observe.bind(observer),
|
|
8329
|
+
unobserve: observer.unobserve.bind(observer),
|
|
8322
8330
|
disconnect() {
|
|
8323
8331
|
observer.disconnect();
|
|
8324
8332
|
listener.map((off) => off());
|
|
@@ -8450,10 +8458,11 @@
|
|
|
8450
8458
|
};
|
|
8451
8459
|
function install({ modal }) {
|
|
8452
8460
|
modal.dialog = function(content, options) {
|
|
8453
|
-
const dialog = modal(
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8461
|
+
const dialog = modal($(`<div><div class="uk-modal-dialog">${content}</div></div>`), {
|
|
8462
|
+
stack: true,
|
|
8463
|
+
role: "alertdialog",
|
|
8464
|
+
...options
|
|
8465
|
+
});
|
|
8457
8466
|
dialog.show();
|
|
8458
8467
|
on(
|
|
8459
8468
|
dialog.$el,
|
|
@@ -9072,7 +9081,7 @@
|
|
|
9072
9081
|
target: () => document.scrollingElement,
|
|
9073
9082
|
options: { box: "content-box" }
|
|
9074
9083
|
}),
|
|
9075
|
-
resize(
|
|
9084
|
+
resize()
|
|
9076
9085
|
],
|
|
9077
9086
|
events: [
|
|
9078
9087
|
{
|
|
@@ -9485,7 +9494,10 @@
|
|
|
9485
9494
|
swiping: true
|
|
9486
9495
|
},
|
|
9487
9496
|
computed: {
|
|
9488
|
-
connects:
|
|
9497
|
+
connects: {
|
|
9498
|
+
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
9499
|
+
observe: (connects) => parent(connects[0])
|
|
9500
|
+
},
|
|
9489
9501
|
connectChildren() {
|
|
9490
9502
|
return this.connects.map((el) => children(el)).flat();
|
|
9491
9503
|
},
|
|
@@ -9674,9 +9686,12 @@
|
|
|
9674
9686
|
queued: true
|
|
9675
9687
|
},
|
|
9676
9688
|
computed: {
|
|
9677
|
-
target
|
|
9678
|
-
|
|
9679
|
-
|
|
9689
|
+
target: {
|
|
9690
|
+
get: ({ target }, $el) => {
|
|
9691
|
+
target = queryAll(target || $el.hash, $el);
|
|
9692
|
+
return target.length ? target : [$el];
|
|
9693
|
+
},
|
|
9694
|
+
observe: (target) => parent(target[0])
|
|
9680
9695
|
}
|
|
9681
9696
|
},
|
|
9682
9697
|
connected() {
|