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-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) {
|
|
@@ -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
|
});
|
|
@@ -1776,6 +1773,7 @@
|
|
|
1776
1773
|
}
|
|
1777
1774
|
}
|
|
1778
1775
|
}
|
|
1776
|
+
const mutationOptions = { subtree: true, childList: true };
|
|
1779
1777
|
function registerComputed(instance, key, cb) {
|
|
1780
1778
|
instance._hasComputed = true;
|
|
1781
1779
|
Object.defineProperty(instance, key, {
|
|
@@ -1784,6 +1782,13 @@
|
|
|
1784
1782
|
const { _computed, $props, $el } = instance;
|
|
1785
1783
|
if (!hasOwn(_computed, key)) {
|
|
1786
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
|
+
}
|
|
1787
1792
|
}
|
|
1788
1793
|
return _computed[key];
|
|
1789
1794
|
},
|
|
@@ -1804,11 +1809,16 @@
|
|
|
1804
1809
|
read: () => runWatches(instance, resetComputed(instance)),
|
|
1805
1810
|
events: ["resize", "computed"]
|
|
1806
1811
|
});
|
|
1807
|
-
|
|
1808
|
-
|
|
1812
|
+
instance._computedObserver = observeMutation(
|
|
1813
|
+
instance.$el,
|
|
1814
|
+
() => callUpdate(instance, "computed"),
|
|
1815
|
+
mutationOptions
|
|
1816
|
+
);
|
|
1809
1817
|
}
|
|
1810
1818
|
function disconnectComputedUpdates(instance) {
|
|
1811
|
-
|
|
1819
|
+
var _a;
|
|
1820
|
+
(_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
|
|
1821
|
+
delete instance._computedObserver;
|
|
1812
1822
|
resetComputed(instance);
|
|
1813
1823
|
}
|
|
1814
1824
|
function resetComputed(instance) {
|
|
@@ -1816,23 +1826,6 @@
|
|
|
1816
1826
|
instance._computed = {};
|
|
1817
1827
|
return values;
|
|
1818
1828
|
}
|
|
1819
|
-
let observer;
|
|
1820
|
-
let instances$1;
|
|
1821
|
-
function registerComputedObserver() {
|
|
1822
|
-
if (observer) {
|
|
1823
|
-
return;
|
|
1824
|
-
}
|
|
1825
|
-
instances$1 = /* @__PURE__ */ new Set();
|
|
1826
|
-
observer = new MutationObserver(() => {
|
|
1827
|
-
for (const instance of instances$1) {
|
|
1828
|
-
callUpdate(instance, "computed");
|
|
1829
|
-
}
|
|
1830
|
-
});
|
|
1831
|
-
observer.observe(document, {
|
|
1832
|
-
subtree: true,
|
|
1833
|
-
childList: true
|
|
1834
|
-
});
|
|
1835
|
-
}
|
|
1836
1829
|
|
|
1837
1830
|
function initEvents(instance) {
|
|
1838
1831
|
instance._events = [];
|
|
@@ -2192,7 +2185,7 @@
|
|
|
2192
2185
|
};
|
|
2193
2186
|
App.util = util;
|
|
2194
2187
|
App.options = {};
|
|
2195
|
-
App.version = "3.19.5-dev.
|
|
2188
|
+
App.version = "3.19.5-dev.68a7ed8e1";
|
|
2196
2189
|
|
|
2197
2190
|
const PREFIX = "uk-";
|
|
2198
2191
|
const DATA = "__uikit__";
|
|
@@ -4290,7 +4283,10 @@
|
|
|
4290
4283
|
target: ""
|
|
4291
4284
|
},
|
|
4292
4285
|
computed: {
|
|
4293
|
-
target:
|
|
4286
|
+
target: {
|
|
4287
|
+
get: ({ target }, $el) => query(target, $el),
|
|
4288
|
+
observe: ({ target }) => target
|
|
4289
|
+
}
|
|
4294
4290
|
},
|
|
4295
4291
|
observe: resize({ target: ({ target }) => target }),
|
|
4296
4292
|
update: {
|
|
@@ -5221,10 +5217,11 @@
|
|
|
5221
5217
|
};
|
|
5222
5218
|
function install({ modal }) {
|
|
5223
5219
|
modal.dialog = function(content, options) {
|
|
5224
|
-
const dialog = modal(
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5220
|
+
const dialog = modal($(`<div><div class="uk-modal-dialog">${content}</div></div>`), {
|
|
5221
|
+
stack: true,
|
|
5222
|
+
role: "alertdialog",
|
|
5223
|
+
...options
|
|
5224
|
+
});
|
|
5228
5225
|
dialog.show();
|
|
5229
5226
|
on(
|
|
5230
5227
|
dialog.$el,
|
|
@@ -5843,7 +5840,7 @@
|
|
|
5843
5840
|
target: () => document.scrollingElement,
|
|
5844
5841
|
options: { box: "content-box" }
|
|
5845
5842
|
}),
|
|
5846
|
-
resize(
|
|
5843
|
+
resize()
|
|
5847
5844
|
],
|
|
5848
5845
|
events: [
|
|
5849
5846
|
{
|
|
@@ -6136,10 +6133,7 @@
|
|
|
6136
6133
|
}
|
|
6137
6134
|
|
|
6138
6135
|
function getMaxPathLength(el) {
|
|
6139
|
-
return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) =>
|
|
6140
|
-
var _a;
|
|
6141
|
-
return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
|
|
6142
|
-
})));
|
|
6136
|
+
return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
|
|
6143
6137
|
}
|
|
6144
6138
|
|
|
6145
6139
|
var svg = {
|
|
@@ -6263,7 +6257,10 @@
|
|
|
6263
6257
|
swiping: true
|
|
6264
6258
|
},
|
|
6265
6259
|
computed: {
|
|
6266
|
-
connects:
|
|
6260
|
+
connects: {
|
|
6261
|
+
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
6262
|
+
observe: ({ connect }) => connect
|
|
6263
|
+
},
|
|
6267
6264
|
connectChildren() {
|
|
6268
6265
|
return this.connects.map((el) => children(el)).flat();
|
|
6269
6266
|
},
|
|
@@ -6452,9 +6449,12 @@
|
|
|
6452
6449
|
queued: true
|
|
6453
6450
|
},
|
|
6454
6451
|
computed: {
|
|
6455
|
-
target
|
|
6456
|
-
|
|
6457
|
-
|
|
6452
|
+
target: {
|
|
6453
|
+
get: ({ target }, $el) => {
|
|
6454
|
+
target = queryAll(target || $el.hash, $el);
|
|
6455
|
+
return target.length ? target : [$el];
|
|
6456
|
+
},
|
|
6457
|
+
observe: ({ target }) => target
|
|
6458
6458
|
}
|
|
6459
6459
|
},
|
|
6460
6460
|
connected() {
|