uikit 3.19.5-dev.66a60877b → 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 -61
- 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 -65
- 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 +6 -3
- 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-core.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) {
|
|
@@ -373,10 +374,7 @@
|
|
|
373
374
|
const selectors = [];
|
|
374
375
|
for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
|
|
375
376
|
sel = sel.replace(trailingCommaRe, "").trim();
|
|
376
|
-
|
|
377
|
-
sel = `:scope ${sel}`;
|
|
378
|
-
}
|
|
379
|
-
isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
|
|
377
|
+
isContextSelector || (isContextSelector = ["!", "+", "~", "-", ">"].includes(sel[0]));
|
|
380
378
|
selectors.push(sel);
|
|
381
379
|
}
|
|
382
380
|
return {
|
|
@@ -385,6 +383,11 @@
|
|
|
385
383
|
isContextSelector
|
|
386
384
|
};
|
|
387
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
|
+
});
|
|
388
391
|
function _query(selector, context = document, queryFn) {
|
|
389
392
|
if (!selector || !isString(selector)) {
|
|
390
393
|
return selector;
|
|
@@ -396,33 +399,36 @@
|
|
|
396
399
|
selector = "";
|
|
397
400
|
const isSingle = parsed.selectors.length === 1;
|
|
398
401
|
for (let sel of parsed.selectors) {
|
|
402
|
+
let positionSel;
|
|
399
403
|
let ctx = context;
|
|
400
404
|
if (sel[0] === "!") {
|
|
401
|
-
|
|
402
|
-
ctx = context.parentElement.closest(
|
|
403
|
-
sel
|
|
404
|
-
if (!sel.length && isSingle) {
|
|
405
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
406
|
+
ctx = context.parentElement.closest(positionSel);
|
|
407
|
+
if (!sel && isSingle) {
|
|
405
408
|
return ctx;
|
|
406
409
|
}
|
|
407
410
|
}
|
|
408
|
-
if (sel[0] === "-") {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
ctx = matches(
|
|
412
|
-
sel
|
|
413
|
-
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) {
|
|
414
416
|
return ctx;
|
|
415
417
|
}
|
|
416
|
-
} else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
|
|
417
|
-
return _doQuery(
|
|
418
|
-
ctx.parentElement,
|
|
419
|
-
queryFn,
|
|
420
|
-
`:scope :nth-child(${index(ctx) + 1}) ${sel}`
|
|
421
|
-
);
|
|
422
418
|
}
|
|
423
|
-
if (ctx) {
|
|
424
|
-
|
|
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);
|
|
425
430
|
}
|
|
431
|
+
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
426
432
|
}
|
|
427
433
|
if (!isDocument(context)) {
|
|
428
434
|
context = context.ownerDocument;
|
|
@@ -1767,6 +1773,7 @@
|
|
|
1767
1773
|
}
|
|
1768
1774
|
}
|
|
1769
1775
|
}
|
|
1776
|
+
const mutationOptions = { subtree: true, childList: true };
|
|
1770
1777
|
function registerComputed(instance, key, cb) {
|
|
1771
1778
|
instance._hasComputed = true;
|
|
1772
1779
|
Object.defineProperty(instance, key, {
|
|
@@ -1775,6 +1782,13 @@
|
|
|
1775
1782
|
const { _computed, $props, $el } = instance;
|
|
1776
1783
|
if (!hasOwn(_computed, key)) {
|
|
1777
1784
|
_computed[key] = (cb.get || cb).call(instance, $props, $el);
|
|
1785
|
+
if (cb.observe && instance._computedObserver) {
|
|
1786
|
+
const selector = cb.observe.call(instance, $props);
|
|
1787
|
+
instance._computedObserver.observe(
|
|
1788
|
+
["~", "+", "-"].includes(selector[0]) ? $el.parentElement : $el.getRootNode(),
|
|
1789
|
+
mutationOptions
|
|
1790
|
+
);
|
|
1791
|
+
}
|
|
1778
1792
|
}
|
|
1779
1793
|
return _computed[key];
|
|
1780
1794
|
},
|
|
@@ -1795,11 +1809,16 @@
|
|
|
1795
1809
|
read: () => runWatches(instance, resetComputed(instance)),
|
|
1796
1810
|
events: ["resize", "computed"]
|
|
1797
1811
|
});
|
|
1798
|
-
|
|
1799
|
-
|
|
1812
|
+
instance._computedObserver = observeMutation(
|
|
1813
|
+
instance.$el,
|
|
1814
|
+
() => callUpdate(instance, "computed"),
|
|
1815
|
+
mutationOptions
|
|
1816
|
+
);
|
|
1800
1817
|
}
|
|
1801
1818
|
function disconnectComputedUpdates(instance) {
|
|
1802
|
-
|
|
1819
|
+
var _a;
|
|
1820
|
+
(_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
|
|
1821
|
+
delete instance._computedObserver;
|
|
1803
1822
|
resetComputed(instance);
|
|
1804
1823
|
}
|
|
1805
1824
|
function resetComputed(instance) {
|
|
@@ -1807,23 +1826,6 @@
|
|
|
1807
1826
|
instance._computed = {};
|
|
1808
1827
|
return values;
|
|
1809
1828
|
}
|
|
1810
|
-
let observer;
|
|
1811
|
-
let instances$1;
|
|
1812
|
-
function registerComputedObserver() {
|
|
1813
|
-
if (observer) {
|
|
1814
|
-
return;
|
|
1815
|
-
}
|
|
1816
|
-
instances$1 = /* @__PURE__ */ new Set();
|
|
1817
|
-
observer = new MutationObserver(() => {
|
|
1818
|
-
for (const instance of instances$1) {
|
|
1819
|
-
callUpdate(instance, "computed");
|
|
1820
|
-
}
|
|
1821
|
-
});
|
|
1822
|
-
observer.observe(document, {
|
|
1823
|
-
subtree: true,
|
|
1824
|
-
childList: true
|
|
1825
|
-
});
|
|
1826
|
-
}
|
|
1827
1829
|
|
|
1828
1830
|
function initEvents(instance) {
|
|
1829
1831
|
instance._events = [];
|
|
@@ -2183,7 +2185,7 @@
|
|
|
2183
2185
|
};
|
|
2184
2186
|
App.util = util;
|
|
2185
2187
|
App.options = {};
|
|
2186
|
-
App.version = "3.19.5-dev.
|
|
2188
|
+
App.version = "3.19.5-dev.68a7ed8e1";
|
|
2187
2189
|
|
|
2188
2190
|
const PREFIX = "uk-";
|
|
2189
2191
|
const DATA = "__uikit__";
|
|
@@ -4281,7 +4283,10 @@
|
|
|
4281
4283
|
target: ""
|
|
4282
4284
|
},
|
|
4283
4285
|
computed: {
|
|
4284
|
-
target:
|
|
4286
|
+
target: {
|
|
4287
|
+
get: ({ target }, $el) => query(target, $el),
|
|
4288
|
+
observe: ({ target }) => target
|
|
4289
|
+
}
|
|
4285
4290
|
},
|
|
4286
4291
|
observe: resize({ target: ({ target }) => target }),
|
|
4287
4292
|
update: {
|
|
@@ -5212,10 +5217,11 @@
|
|
|
5212
5217
|
};
|
|
5213
5218
|
function install({ modal }) {
|
|
5214
5219
|
modal.dialog = function(content, options) {
|
|
5215
|
-
const dialog = modal(
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5220
|
+
const dialog = modal($(`<div><div class="uk-modal-dialog">${content}</div></div>`), {
|
|
5221
|
+
stack: true,
|
|
5222
|
+
role: "alertdialog",
|
|
5223
|
+
...options
|
|
5224
|
+
});
|
|
5219
5225
|
dialog.show();
|
|
5220
5226
|
on(
|
|
5221
5227
|
dialog.$el,
|
|
@@ -5834,7 +5840,7 @@
|
|
|
5834
5840
|
target: () => document.scrollingElement,
|
|
5835
5841
|
options: { box: "content-box" }
|
|
5836
5842
|
}),
|
|
5837
|
-
resize(
|
|
5843
|
+
resize()
|
|
5838
5844
|
],
|
|
5839
5845
|
events: [
|
|
5840
5846
|
{
|
|
@@ -6127,10 +6133,7 @@
|
|
|
6127
6133
|
}
|
|
6128
6134
|
|
|
6129
6135
|
function getMaxPathLength(el) {
|
|
6130
|
-
return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) =>
|
|
6131
|
-
var _a;
|
|
6132
|
-
return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
|
|
6133
|
-
})));
|
|
6136
|
+
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
6134
6137
|
}
|
|
6135
6138
|
|
|
6136
6139
|
var svg = {
|
|
@@ -6254,7 +6257,10 @@
|
|
|
6254
6257
|
swiping: true
|
|
6255
6258
|
},
|
|
6256
6259
|
computed: {
|
|
6257
|
-
connects:
|
|
6260
|
+
connects: {
|
|
6261
|
+
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
6262
|
+
observe: ({ connect }) => connect
|
|
6263
|
+
},
|
|
6258
6264
|
connectChildren() {
|
|
6259
6265
|
return this.connects.map((el) => children(el)).flat();
|
|
6260
6266
|
},
|
|
@@ -6443,9 +6449,12 @@
|
|
|
6443
6449
|
queued: true
|
|
6444
6450
|
},
|
|
6445
6451
|
computed: {
|
|
6446
|
-
target
|
|
6447
|
-
|
|
6448
|
-
|
|
6452
|
+
target: {
|
|
6453
|
+
get: ({ target }, $el) => {
|
|
6454
|
+
target = queryAll(target || $el.hash, $el);
|
|
6455
|
+
return target.length ? target : [$el];
|
|
6456
|
+
},
|
|
6457
|
+
observe: ({ target }) => target
|
|
6449
6458
|
}
|
|
6450
6459
|
},
|
|
6451
6460
|
connected() {
|