uikit 3.19.5-dev.62bcee51f → 3.19.5-dev.68a7ed8e1
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/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 +40 -30
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +40 -30
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +40 -30
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +40 -30
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +40 -30
- 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 +70 -70
- 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 -74
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/computed.js +20 -26
- package/src/js/core/height-placeholder.js +4 -1
- package/src/js/core/modal.js +5 -6
- 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 +1 -3
- package/src/js/mixin/parallax.js +7 -3
- package/src/js/util/filter.js +7 -14
- package/src/js/util/selector.js +31 -22
- 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/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.68a7ed8e1 | 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)) {
|
|
@@ -380,10 +374,7 @@
|
|
|
380
374
|
const selectors = [];
|
|
381
375
|
for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
|
|
382
376
|
sel = sel.replace(trailingCommaRe, "").trim();
|
|
383
|
-
|
|
384
|
-
sel = `:scope ${sel}`;
|
|
385
|
-
}
|
|
386
|
-
isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
|
|
377
|
+
isContextSelector || (isContextSelector = ["!", "+", "~", "-", ">"].includes(sel[0]));
|
|
387
378
|
selectors.push(sel);
|
|
388
379
|
}
|
|
389
380
|
return {
|
|
@@ -392,6 +383,11 @@
|
|
|
392
383
|
isContextSelector
|
|
393
384
|
};
|
|
394
385
|
});
|
|
386
|
+
const parsePositionSelector = memoize((selector) => {
|
|
387
|
+
selector = selector.substr(1).trim();
|
|
388
|
+
const index2 = selector.indexOf(" ");
|
|
389
|
+
return ~index2 ? [selector.substring(0, index2), selector.substring(index2 + 1)] : [selector, ""];
|
|
390
|
+
});
|
|
395
391
|
function _query(selector, context = document, queryFn) {
|
|
396
392
|
if (!selector || !isString(selector)) {
|
|
397
393
|
return selector;
|
|
@@ -403,33 +399,36 @@
|
|
|
403
399
|
selector = "";
|
|
404
400
|
const isSingle = parsed.selectors.length === 1;
|
|
405
401
|
for (let sel of parsed.selectors) {
|
|
402
|
+
let positionSel;
|
|
406
403
|
let ctx = context;
|
|
407
404
|
if (sel[0] === "!") {
|
|
408
|
-
|
|
409
|
-
ctx = context.parentElement.closest(
|
|
410
|
-
sel
|
|
411
|
-
if (!sel.length && isSingle) {
|
|
405
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
406
|
+
ctx = context.parentElement.closest(positionSel);
|
|
407
|
+
if (!sel && isSingle) {
|
|
412
408
|
return ctx;
|
|
413
409
|
}
|
|
414
410
|
}
|
|
415
|
-
if (sel[0] === "-") {
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
ctx = matches(
|
|
419
|
-
sel
|
|
420
|
-
if (!sel.length && isSingle) {
|
|
411
|
+
if (ctx && sel[0] === "-") {
|
|
412
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
413
|
+
ctx = ctx.previousElementSibling;
|
|
414
|
+
ctx = matches(ctx, positionSel) ? ctx : null;
|
|
415
|
+
if (!sel && isSingle) {
|
|
421
416
|
return ctx;
|
|
422
417
|
}
|
|
423
|
-
} else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
|
|
424
|
-
return _doQuery(
|
|
425
|
-
ctx.parentElement,
|
|
426
|
-
queryFn,
|
|
427
|
-
`:scope :nth-child(${index(ctx) + 1}) ${sel}`
|
|
428
|
-
);
|
|
429
418
|
}
|
|
430
|
-
if (ctx) {
|
|
431
|
-
|
|
419
|
+
if (!ctx) {
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
if (isSingle) {
|
|
423
|
+
if (sel[0] === "~" || sel[0] === "+") {
|
|
424
|
+
sel = `:scope :nth-child(${index(ctx) + 1}) ${sel}`;
|
|
425
|
+
ctx = ctx.parentElement;
|
|
426
|
+
} else if (sel[0] === ">") {
|
|
427
|
+
sel = `:scope ${sel}`;
|
|
428
|
+
}
|
|
429
|
+
return _doQuery(ctx, queryFn, sel);
|
|
432
430
|
}
|
|
431
|
+
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
433
432
|
}
|
|
434
433
|
if (!isDocument(context)) {
|
|
435
434
|
context = context.ownerDocument;
|
|
@@ -1567,7 +1566,6 @@
|
|
|
1567
1566
|
camelize: camelize,
|
|
1568
1567
|
children: children,
|
|
1569
1568
|
clamp: clamp,
|
|
1570
|
-
closest: closest,
|
|
1571
1569
|
createEvent: createEvent,
|
|
1572
1570
|
css: css,
|
|
1573
1571
|
data: data,
|
|
@@ -1688,7 +1686,6 @@
|
|
|
1688
1686
|
uniqueBy: uniqueBy,
|
|
1689
1687
|
unwrap: unwrap,
|
|
1690
1688
|
width: width,
|
|
1691
|
-
within: within,
|
|
1692
1689
|
wrapAll: wrapAll,
|
|
1693
1690
|
wrapInner: wrapInner
|
|
1694
1691
|
});
|
|
@@ -2191,7 +2188,7 @@
|
|
|
2191
2188
|
);
|
|
2192
2189
|
}
|
|
2193
2190
|
function getTransitionNodes(target) {
|
|
2194
|
-
return getRows(children(target)).flat().filter(
|
|
2191
|
+
return getRows(children(target)).flat().filter(isVisible);
|
|
2195
2192
|
}
|
|
2196
2193
|
function awaitFrame$1() {
|
|
2197
2194
|
return new Promise((resolve) => requestAnimationFrame(resolve));
|
|
@@ -3263,6 +3260,7 @@
|
|
|
3263
3260
|
}
|
|
3264
3261
|
}
|
|
3265
3262
|
}
|
|
3263
|
+
const mutationOptions = { subtree: true, childList: true };
|
|
3266
3264
|
function registerComputed(instance, key, cb) {
|
|
3267
3265
|
instance._hasComputed = true;
|
|
3268
3266
|
Object.defineProperty(instance, key, {
|
|
@@ -3271,6 +3269,13 @@
|
|
|
3271
3269
|
const { _computed, $props, $el } = instance;
|
|
3272
3270
|
if (!hasOwn(_computed, key)) {
|
|
3273
3271
|
_computed[key] = (cb.get || cb).call(instance, $props, $el);
|
|
3272
|
+
if (cb.observe && instance._computedObserver) {
|
|
3273
|
+
const selector = cb.observe.call(instance, $props);
|
|
3274
|
+
instance._computedObserver.observe(
|
|
3275
|
+
["~", "+", "-"].includes(selector[0]) ? $el.parentElement : $el.getRootNode(),
|
|
3276
|
+
mutationOptions
|
|
3277
|
+
);
|
|
3278
|
+
}
|
|
3274
3279
|
}
|
|
3275
3280
|
return _computed[key];
|
|
3276
3281
|
},
|
|
@@ -3291,11 +3296,16 @@
|
|
|
3291
3296
|
read: () => runWatches(instance, resetComputed(instance)),
|
|
3292
3297
|
events: ["resize", "computed"]
|
|
3293
3298
|
});
|
|
3294
|
-
|
|
3295
|
-
|
|
3299
|
+
instance._computedObserver = observeMutation(
|
|
3300
|
+
instance.$el,
|
|
3301
|
+
() => callUpdate(instance, "computed"),
|
|
3302
|
+
mutationOptions
|
|
3303
|
+
);
|
|
3296
3304
|
}
|
|
3297
3305
|
function disconnectComputedUpdates(instance) {
|
|
3298
|
-
|
|
3306
|
+
var _a;
|
|
3307
|
+
(_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
|
|
3308
|
+
delete instance._computedObserver;
|
|
3299
3309
|
resetComputed(instance);
|
|
3300
3310
|
}
|
|
3301
3311
|
function resetComputed(instance) {
|
|
@@ -3303,23 +3313,6 @@
|
|
|
3303
3313
|
instance._computed = {};
|
|
3304
3314
|
return values;
|
|
3305
3315
|
}
|
|
3306
|
-
let observer;
|
|
3307
|
-
let instances$1;
|
|
3308
|
-
function registerComputedObserver() {
|
|
3309
|
-
if (observer) {
|
|
3310
|
-
return;
|
|
3311
|
-
}
|
|
3312
|
-
instances$1 = /* @__PURE__ */ new Set();
|
|
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
|
-
});
|
|
3322
|
-
}
|
|
3323
3316
|
|
|
3324
3317
|
function initEvents(instance) {
|
|
3325
3318
|
instance._events = [];
|
|
@@ -3572,7 +3565,7 @@
|
|
|
3572
3565
|
};
|
|
3573
3566
|
App.util = util;
|
|
3574
3567
|
App.options = {};
|
|
3575
|
-
App.version = "3.19.5-dev.
|
|
3568
|
+
App.version = "3.19.5-dev.68a7ed8e1";
|
|
3576
3569
|
|
|
3577
3570
|
const PREFIX = "uk-";
|
|
3578
3571
|
const DATA = "__uikit__";
|
|
@@ -4572,10 +4565,7 @@
|
|
|
4572
4565
|
}
|
|
4573
4566
|
|
|
4574
4567
|
function getMaxPathLength(el) {
|
|
4575
|
-
return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) =>
|
|
4576
|
-
var _a;
|
|
4577
|
-
return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
|
|
4578
|
-
})));
|
|
4568
|
+
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
4579
4569
|
}
|
|
4580
4570
|
|
|
4581
4571
|
const props = {
|
|
@@ -4779,6 +4769,7 @@
|
|
|
4779
4769
|
}
|
|
4780
4770
|
};
|
|
4781
4771
|
}
|
|
4772
|
+
const loading = {};
|
|
4782
4773
|
const dimensions = {};
|
|
4783
4774
|
function getBackgroundImageDimensions(el) {
|
|
4784
4775
|
const src = css(el, "backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/, "$1");
|
|
@@ -4788,11 +4779,12 @@
|
|
|
4788
4779
|
const image = new Image();
|
|
4789
4780
|
if (src) {
|
|
4790
4781
|
image.src = src;
|
|
4791
|
-
if (!image.naturalWidth) {
|
|
4792
|
-
image
|
|
4782
|
+
if (!image.naturalWidth && !loading[src]) {
|
|
4783
|
+
once(image, "error load", () => {
|
|
4793
4784
|
dimensions[src] = toDimensions(image);
|
|
4794
4785
|
trigger(el, createEvent("load", false));
|
|
4795
|
-
};
|
|
4786
|
+
});
|
|
4787
|
+
loading[src] = true;
|
|
4796
4788
|
return toDimensions(image);
|
|
4797
4789
|
}
|
|
4798
4790
|
}
|
|
@@ -7793,7 +7785,10 @@
|
|
|
7793
7785
|
target: ""
|
|
7794
7786
|
},
|
|
7795
7787
|
computed: {
|
|
7796
|
-
target:
|
|
7788
|
+
target: {
|
|
7789
|
+
get: ({ target }, $el) => query(target, $el),
|
|
7790
|
+
observe: ({ target }) => target
|
|
7791
|
+
}
|
|
7797
7792
|
},
|
|
7798
7793
|
observe: resize({ target: ({ target }) => target }),
|
|
7799
7794
|
update: {
|
|
@@ -8453,10 +8448,11 @@
|
|
|
8453
8448
|
};
|
|
8454
8449
|
function install({ modal }) {
|
|
8455
8450
|
modal.dialog = function(content, options) {
|
|
8456
|
-
const dialog = modal(
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8451
|
+
const dialog = modal($(`<div><div class="uk-modal-dialog">${content}</div></div>`), {
|
|
8452
|
+
stack: true,
|
|
8453
|
+
role: "alertdialog",
|
|
8454
|
+
...options
|
|
8455
|
+
});
|
|
8460
8456
|
dialog.show();
|
|
8461
8457
|
on(
|
|
8462
8458
|
dialog.$el,
|
|
@@ -9075,7 +9071,7 @@
|
|
|
9075
9071
|
target: () => document.scrollingElement,
|
|
9076
9072
|
options: { box: "content-box" }
|
|
9077
9073
|
}),
|
|
9078
|
-
resize(
|
|
9074
|
+
resize()
|
|
9079
9075
|
],
|
|
9080
9076
|
events: [
|
|
9081
9077
|
{
|
|
@@ -9488,7 +9484,10 @@
|
|
|
9488
9484
|
swiping: true
|
|
9489
9485
|
},
|
|
9490
9486
|
computed: {
|
|
9491
|
-
connects:
|
|
9487
|
+
connects: {
|
|
9488
|
+
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
9489
|
+
observe: ({ connect }) => connect
|
|
9490
|
+
},
|
|
9492
9491
|
connectChildren() {
|
|
9493
9492
|
return this.connects.map((el) => children(el)).flat();
|
|
9494
9493
|
},
|
|
@@ -9677,9 +9676,12 @@
|
|
|
9677
9676
|
queued: true
|
|
9678
9677
|
},
|
|
9679
9678
|
computed: {
|
|
9680
|
-
target
|
|
9681
|
-
|
|
9682
|
-
|
|
9679
|
+
target: {
|
|
9680
|
+
get: ({ target }, $el) => {
|
|
9681
|
+
target = queryAll(target || $el.hash, $el);
|
|
9682
|
+
return target.length ? target : [$el];
|
|
9683
|
+
},
|
|
9684
|
+
observe: ({ target }) => target
|
|
9683
9685
|
}
|
|
9684
9686
|
},
|
|
9685
9687
|
connected() {
|