uikit 3.19.5-dev.9d6b5103b → 3.19.5-dev.c75dd5d38
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 +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 +1 -1
- 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 +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 +62 -44
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +62 -44
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +63 -45
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +62 -44
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +62 -44
- 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 +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +93 -58
- 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 +93 -58
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/observer.js +17 -5
- package/src/js/core/drop.js +0 -6
- package/src/js/core/inverse.js +11 -1
- package/src/js/util/selector.js +65 -37
- package/src/js/util/svg.js +1 -12
- package/tests/modal.html +2 -2
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.19.5-dev.
|
|
1
|
+
/*! UIkit 3.19.5-dev.c75dd5d38 | 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() :
|
|
@@ -367,55 +367,81 @@
|
|
|
367
367
|
function findAll(selector, context) {
|
|
368
368
|
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
369
369
|
}
|
|
370
|
-
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
371
|
-
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
372
370
|
function getContext(selector, context = document) {
|
|
373
|
-
return isString(selector) &&
|
|
374
|
-
}
|
|
375
|
-
const
|
|
376
|
-
const
|
|
371
|
+
return isString(selector) && parseSelector(selector).isContextSelector || isDocument(context) ? context : context.ownerDocument;
|
|
372
|
+
}
|
|
373
|
+
const addStarRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
374
|
+
const splitSelectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
|
|
375
|
+
const trailingCommaRe = /\s*,$/;
|
|
376
|
+
const parseSelector = memoize((selector) => {
|
|
377
|
+
selector = selector.replace(addStarRe, "$1 *");
|
|
378
|
+
let isContextSelector = false;
|
|
379
|
+
const selectors = [];
|
|
380
|
+
for (let sel of selector.match(splitSelectorRe)) {
|
|
381
|
+
sel = sel.replace(trailingCommaRe, "").trim();
|
|
382
|
+
if (sel[0] === ">") {
|
|
383
|
+
sel = `:scope ${sel}`;
|
|
384
|
+
}
|
|
385
|
+
isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
|
|
386
|
+
selectors.push(sel);
|
|
387
|
+
}
|
|
388
|
+
return {
|
|
389
|
+
selector: selectors.join(","),
|
|
390
|
+
selectors,
|
|
391
|
+
isContextSelector
|
|
392
|
+
};
|
|
393
|
+
});
|
|
377
394
|
function _query(selector, context = document, queryFn) {
|
|
378
395
|
if (!selector || !isString(selector)) {
|
|
379
396
|
return selector;
|
|
380
397
|
}
|
|
381
|
-
|
|
382
|
-
if (isContextSelector
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
398
|
+
const parsed = parseSelector(selector);
|
|
399
|
+
if (!parsed.isContextSelector) {
|
|
400
|
+
return _doQuery(context, queryFn, parsed.selector);
|
|
401
|
+
}
|
|
402
|
+
selector = "";
|
|
403
|
+
const isSingle = parsed.selectors.length === 1;
|
|
404
|
+
for (let sel of parsed.selectors) {
|
|
405
|
+
let ctx = context;
|
|
406
|
+
if (sel[0] === "!") {
|
|
407
|
+
const selectors = sel.substr(1).trim().split(" ");
|
|
408
|
+
ctx = parent(context).closest(selectors[0]);
|
|
409
|
+
sel = selectors.slice(1).join(" ").trim();
|
|
410
|
+
if (!sel.length && isSingle) {
|
|
411
|
+
return ctx;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
if (sel[0] === "-") {
|
|
415
|
+
const selectors = sel.substr(1).trim().split(" ");
|
|
416
|
+
const prev = (ctx || context).previousElementSibling;
|
|
417
|
+
ctx = matches(prev, sel.substr(1)) ? prev : null;
|
|
418
|
+
sel = selectors.slice(1).join(" ");
|
|
419
|
+
if (!sel.length && isSingle) {
|
|
420
|
+
return ctx;
|
|
421
|
+
}
|
|
422
|
+
} else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
|
|
423
|
+
return _doQuery(
|
|
424
|
+
parent(context),
|
|
425
|
+
queryFn,
|
|
426
|
+
`:scope :nth-child(${index(context) + 1}) ${sel}`
|
|
427
|
+
);
|
|
404
428
|
}
|
|
405
|
-
if (
|
|
406
|
-
|
|
429
|
+
if (ctx) {
|
|
430
|
+
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
407
431
|
}
|
|
408
432
|
}
|
|
433
|
+
if (!isDocument(context)) {
|
|
434
|
+
context = context.ownerDocument;
|
|
435
|
+
}
|
|
436
|
+
return _doQuery(context, queryFn, selector);
|
|
437
|
+
}
|
|
438
|
+
function _doQuery(context, queryFn, selector) {
|
|
409
439
|
try {
|
|
410
440
|
return context[queryFn](selector);
|
|
411
441
|
} catch (e) {
|
|
412
442
|
return null;
|
|
413
443
|
}
|
|
414
444
|
}
|
|
415
|
-
const selectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
|
|
416
|
-
const splitSelector = memoize(
|
|
417
|
-
(selector) => selector.match(selectorRe).map((selector2) => selector2.replace(/,$/, "").trim())
|
|
418
|
-
);
|
|
419
445
|
function domPath(element) {
|
|
420
446
|
const names = [];
|
|
421
447
|
while (element.parentNode) {
|
|
@@ -1875,18 +1901,30 @@
|
|
|
1875
1901
|
}
|
|
1876
1902
|
const targets = hasOwn(instance, key) ? instance[key] : target;
|
|
1877
1903
|
const observer = observe(targets, handler, options, args);
|
|
1878
|
-
if (isFunction(target) && isArray(instance[key])
|
|
1879
|
-
registerWatch(
|
|
1904
|
+
if (isFunction(target) && isArray(instance[key])) {
|
|
1905
|
+
registerWatch(
|
|
1906
|
+
instance,
|
|
1907
|
+
{ handler: updateTargets(observer, options), immediate: false },
|
|
1908
|
+
key
|
|
1909
|
+
);
|
|
1880
1910
|
}
|
|
1881
1911
|
registerObserver(instance, observer);
|
|
1882
1912
|
}
|
|
1883
|
-
function updateTargets(observer) {
|
|
1913
|
+
function updateTargets(observer, options) {
|
|
1884
1914
|
return (targets, prev) => {
|
|
1885
1915
|
for (const target of prev) {
|
|
1886
|
-
!includes(targets, target)
|
|
1916
|
+
if (!includes(targets, target)) {
|
|
1917
|
+
if (observer.unobserve) {
|
|
1918
|
+
observer.unobserve(target);
|
|
1919
|
+
} else {
|
|
1920
|
+
observer.disconnect();
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1887
1923
|
}
|
|
1888
1924
|
for (const target of targets) {
|
|
1889
|
-
!includes(prev, target)
|
|
1925
|
+
if (!includes(prev, target) || !observer.unobserve) {
|
|
1926
|
+
observer.observe(target, options);
|
|
1927
|
+
}
|
|
1890
1928
|
}
|
|
1891
1929
|
};
|
|
1892
1930
|
}
|
|
@@ -2153,7 +2191,7 @@
|
|
|
2153
2191
|
};
|
|
2154
2192
|
App.util = util;
|
|
2155
2193
|
App.options = {};
|
|
2156
|
-
App.version = "3.19.5-dev.
|
|
2194
|
+
App.version = "3.19.5-dev.c75dd5d38";
|
|
2157
2195
|
|
|
2158
2196
|
const PREFIX = "uk-";
|
|
2159
2197
|
const DATA = "__uikit__";
|
|
@@ -3253,10 +3291,6 @@
|
|
|
3253
3291
|
}
|
|
3254
3292
|
css(this.$el, this._style);
|
|
3255
3293
|
},
|
|
3256
|
-
observe: lazyload({
|
|
3257
|
-
target: ({ toggle, $el }) => query(toggle, $el),
|
|
3258
|
-
targets: ({ $el }) => $el
|
|
3259
|
-
}),
|
|
3260
3294
|
events: [
|
|
3261
3295
|
{
|
|
3262
3296
|
name: "click",
|
|
@@ -4766,6 +4800,12 @@
|
|
|
4766
4800
|
target: ({ target }, $el) => target ? $$(target, $el) : [$el]
|
|
4767
4801
|
},
|
|
4768
4802
|
observe: [
|
|
4803
|
+
intersection({
|
|
4804
|
+
handler([{ isIntersecting }]) {
|
|
4805
|
+
this.isIntersecting = isIntersecting;
|
|
4806
|
+
},
|
|
4807
|
+
args: { intersecting: false }
|
|
4808
|
+
}),
|
|
4769
4809
|
mutation({
|
|
4770
4810
|
target: ({ target }) => target,
|
|
4771
4811
|
options: { attributes: true, attributeFilter: ["class"], attributeOldValue: true }
|
|
@@ -4802,6 +4842,9 @@
|
|
|
4802
4842
|
],
|
|
4803
4843
|
update: {
|
|
4804
4844
|
read() {
|
|
4845
|
+
if (!this.isIntersecting) {
|
|
4846
|
+
return false;
|
|
4847
|
+
}
|
|
4805
4848
|
for (const target of this.target) {
|
|
4806
4849
|
replaceClass(
|
|
4807
4850
|
target,
|
|
@@ -6084,18 +6127,10 @@
|
|
|
6084
6127
|
}
|
|
6085
6128
|
|
|
6086
6129
|
function getMaxPathLength(el) {
|
|
6087
|
-
return Math.ceil(
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
try {
|
|
6092
|
-
return stroke.getTotalLength();
|
|
6093
|
-
} catch (e) {
|
|
6094
|
-
return 0;
|
|
6095
|
-
}
|
|
6096
|
-
})
|
|
6097
|
-
)
|
|
6098
|
-
);
|
|
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
|
+
})));
|
|
6099
6134
|
}
|
|
6100
6135
|
|
|
6101
6136
|
var svg = {
|