uikit 3.19.5-dev.8317c4705 → 3.19.5-dev.92ee0f0d9
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 +55 -55
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +55 -55
- 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 -40
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +41 -41
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +41 -42
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +41 -41
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +41 -41
- 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 +128 -103
- 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 +137 -110
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/boot.js +6 -7
- package/src/js/api/component.js +4 -4
- package/src/js/api/computed.js +20 -26
- package/src/js/api/observer.js +17 -5
- package/src/js/components/slider-parallax.js +2 -2
- package/src/js/components/slider.js +1 -1
- package/src/js/core/drop.js +1 -2
- package/src/js/core/height-placeholder.js +4 -1
- package/src/js/core/height-viewport.js +1 -1
- package/src/js/core/icon.js +2 -3
- package/src/js/core/img.js +1 -1
- package/src/js/core/inverse.js +22 -5
- 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/mixin/slider.js +0 -3
- package/src/js/mixin/slideshow.js +3 -0
- package/src/js/util/filter.js +7 -14
- package/src/js/util/lang.js +1 -1
- package/src/js/util/selector.js +33 -24
- package/src/js/util/svg.js +1 -12
- 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.92ee0f0d9 | 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() :
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
return parseFloat(value) || 0;
|
|
89
89
|
}
|
|
90
90
|
function toNode(element) {
|
|
91
|
-
return toNodes(element)[0];
|
|
91
|
+
return element && toNodes(element)[0];
|
|
92
92
|
}
|
|
93
93
|
function toNodes(element) {
|
|
94
94
|
return isNode(element) ? [element] : Array.from(element || []).filter(isNode);
|
|
@@ -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)) {
|
|
@@ -374,15 +368,13 @@
|
|
|
374
368
|
const splitSelectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
|
|
375
369
|
const trailingCommaRe = /\s*,$/;
|
|
376
370
|
const parseSelector = memoize((selector) => {
|
|
371
|
+
var _a;
|
|
377
372
|
selector = selector.replace(addStarRe, "$1 *");
|
|
378
373
|
let isContextSelector = false;
|
|
379
374
|
const selectors = [];
|
|
380
|
-
for (let sel of selector.match(splitSelectorRe)) {
|
|
375
|
+
for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
|
|
381
376
|
sel = sel.replace(trailingCommaRe, "").trim();
|
|
382
|
-
|
|
383
|
-
sel = `:scope ${sel}`;
|
|
384
|
-
}
|
|
385
|
-
isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
|
|
377
|
+
isContextSelector || (isContextSelector = ["!", "+", "~", "-", ">"].includes(sel[0]));
|
|
386
378
|
selectors.push(sel);
|
|
387
379
|
}
|
|
388
380
|
return {
|
|
@@ -391,6 +383,11 @@
|
|
|
391
383
|
isContextSelector
|
|
392
384
|
};
|
|
393
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
|
+
});
|
|
394
391
|
function _query(selector, context = document, queryFn) {
|
|
395
392
|
if (!selector || !isString(selector)) {
|
|
396
393
|
return selector;
|
|
@@ -402,33 +399,36 @@
|
|
|
402
399
|
selector = "";
|
|
403
400
|
const isSingle = parsed.selectors.length === 1;
|
|
404
401
|
for (let sel of parsed.selectors) {
|
|
402
|
+
let positionSel;
|
|
405
403
|
let ctx = context;
|
|
406
404
|
if (sel[0] === "!") {
|
|
407
|
-
|
|
408
|
-
ctx =
|
|
409
|
-
sel
|
|
410
|
-
if (!sel.length && isSingle) {
|
|
405
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
406
|
+
ctx = context.parentElement.closest(positionSel);
|
|
407
|
+
if (!sel && isSingle) {
|
|
411
408
|
return ctx;
|
|
412
409
|
}
|
|
413
410
|
}
|
|
414
|
-
if (sel[0] === "-") {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
ctx = matches(
|
|
418
|
-
sel
|
|
419
|
-
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) {
|
|
420
416
|
return ctx;
|
|
421
417
|
}
|
|
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
|
-
);
|
|
428
418
|
}
|
|
429
|
-
if (ctx) {
|
|
430
|
-
|
|
419
|
+
if (!ctx) {
|
|
420
|
+
continue;
|
|
431
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);
|
|
430
|
+
}
|
|
431
|
+
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
432
432
|
}
|
|
433
433
|
if (!isDocument(context)) {
|
|
434
434
|
context = context.ownerDocument;
|
|
@@ -1566,7 +1566,6 @@
|
|
|
1566
1566
|
camelize: camelize,
|
|
1567
1567
|
children: children,
|
|
1568
1568
|
clamp: clamp,
|
|
1569
|
-
closest: closest,
|
|
1570
1569
|
createEvent: createEvent,
|
|
1571
1570
|
css: css,
|
|
1572
1571
|
data: data,
|
|
@@ -1687,7 +1686,6 @@
|
|
|
1687
1686
|
uniqueBy: uniqueBy,
|
|
1688
1687
|
unwrap: unwrap,
|
|
1689
1688
|
width: width,
|
|
1690
|
-
within: within,
|
|
1691
1689
|
wrapAll: wrapAll,
|
|
1692
1690
|
wrapInner: wrapInner
|
|
1693
1691
|
});
|
|
@@ -1775,6 +1773,7 @@
|
|
|
1775
1773
|
}
|
|
1776
1774
|
}
|
|
1777
1775
|
}
|
|
1776
|
+
const mutationOptions = { subtree: true, childList: true };
|
|
1778
1777
|
function registerComputed(instance, key, cb) {
|
|
1779
1778
|
instance._hasComputed = true;
|
|
1780
1779
|
Object.defineProperty(instance, key, {
|
|
@@ -1783,6 +1782,13 @@
|
|
|
1783
1782
|
const { _computed, $props, $el } = instance;
|
|
1784
1783
|
if (!hasOwn(_computed, key)) {
|
|
1785
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
|
+
}
|
|
1786
1792
|
}
|
|
1787
1793
|
return _computed[key];
|
|
1788
1794
|
},
|
|
@@ -1803,11 +1809,16 @@
|
|
|
1803
1809
|
read: () => runWatches(instance, resetComputed(instance)),
|
|
1804
1810
|
events: ["resize", "computed"]
|
|
1805
1811
|
});
|
|
1806
|
-
|
|
1807
|
-
|
|
1812
|
+
instance._computedObserver = observeMutation(
|
|
1813
|
+
instance.$el,
|
|
1814
|
+
() => callUpdate(instance, "computed"),
|
|
1815
|
+
mutationOptions
|
|
1816
|
+
);
|
|
1808
1817
|
}
|
|
1809
1818
|
function disconnectComputedUpdates(instance) {
|
|
1810
|
-
|
|
1819
|
+
var _a;
|
|
1820
|
+
(_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
|
|
1821
|
+
delete instance._computedObserver;
|
|
1811
1822
|
resetComputed(instance);
|
|
1812
1823
|
}
|
|
1813
1824
|
function resetComputed(instance) {
|
|
@@ -1815,23 +1826,6 @@
|
|
|
1815
1826
|
instance._computed = {};
|
|
1816
1827
|
return values;
|
|
1817
1828
|
}
|
|
1818
|
-
let observer;
|
|
1819
|
-
let instances$1;
|
|
1820
|
-
function registerComputedObserver() {
|
|
1821
|
-
if (observer) {
|
|
1822
|
-
return;
|
|
1823
|
-
}
|
|
1824
|
-
instances$1 = /* @__PURE__ */ new Set();
|
|
1825
|
-
observer = new MutationObserver(() => {
|
|
1826
|
-
for (const instance of instances$1) {
|
|
1827
|
-
callUpdate(instance, "computed");
|
|
1828
|
-
}
|
|
1829
|
-
});
|
|
1830
|
-
observer.observe(document, {
|
|
1831
|
-
subtree: true,
|
|
1832
|
-
childList: true
|
|
1833
|
-
});
|
|
1834
|
-
}
|
|
1835
1829
|
|
|
1836
1830
|
function initEvents(instance) {
|
|
1837
1831
|
instance._events = [];
|
|
@@ -1901,18 +1895,30 @@
|
|
|
1901
1895
|
}
|
|
1902
1896
|
const targets = hasOwn(instance, key) ? instance[key] : target;
|
|
1903
1897
|
const observer = observe(targets, handler, options, args);
|
|
1904
|
-
if (isFunction(target) && isArray(instance[key])
|
|
1905
|
-
registerWatch(
|
|
1898
|
+
if (isFunction(target) && isArray(instance[key])) {
|
|
1899
|
+
registerWatch(
|
|
1900
|
+
instance,
|
|
1901
|
+
{ handler: updateTargets(observer, options), immediate: false },
|
|
1902
|
+
key
|
|
1903
|
+
);
|
|
1906
1904
|
}
|
|
1907
1905
|
registerObserver(instance, observer);
|
|
1908
1906
|
}
|
|
1909
|
-
function updateTargets(observer) {
|
|
1907
|
+
function updateTargets(observer, options) {
|
|
1910
1908
|
return (targets, prev) => {
|
|
1911
1909
|
for (const target of prev) {
|
|
1912
|
-
!includes(targets, target)
|
|
1910
|
+
if (!includes(targets, target)) {
|
|
1911
|
+
if (observer.unobserve) {
|
|
1912
|
+
observer.unobserve(target);
|
|
1913
|
+
} else if (observer.observe) {
|
|
1914
|
+
observer.disconnect();
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1913
1917
|
}
|
|
1914
1918
|
for (const target of targets) {
|
|
1915
|
-
!includes(prev, target)
|
|
1919
|
+
if (!includes(prev, target) || !observer.unobserve) {
|
|
1920
|
+
observer.observe(target, options);
|
|
1921
|
+
}
|
|
1916
1922
|
}
|
|
1917
1923
|
};
|
|
1918
1924
|
}
|
|
@@ -2179,26 +2185,26 @@
|
|
|
2179
2185
|
};
|
|
2180
2186
|
App.util = util;
|
|
2181
2187
|
App.options = {};
|
|
2182
|
-
App.version = "3.19.5-dev.
|
|
2188
|
+
App.version = "3.19.5-dev.92ee0f0d9";
|
|
2183
2189
|
|
|
2184
2190
|
const PREFIX = "uk-";
|
|
2185
2191
|
const DATA = "__uikit__";
|
|
2186
2192
|
const components$1 = {};
|
|
2187
2193
|
function component(name, options) {
|
|
2188
|
-
var _a;
|
|
2194
|
+
var _a, _b;
|
|
2189
2195
|
const id = PREFIX + hyphenate(name);
|
|
2190
2196
|
if (!options) {
|
|
2191
|
-
if (
|
|
2197
|
+
if (!components$1[id].options) {
|
|
2192
2198
|
components$1[id] = App.extend(components$1[id]);
|
|
2193
2199
|
}
|
|
2194
2200
|
return components$1[id];
|
|
2195
2201
|
}
|
|
2196
2202
|
name = camelize(name);
|
|
2197
2203
|
App[name] = (element, data) => createComponent(name, element, data);
|
|
2198
|
-
const opt =
|
|
2204
|
+
const opt = (_a = options.options) != null ? _a : { ...options };
|
|
2199
2205
|
opt.id = id;
|
|
2200
2206
|
opt.name = name;
|
|
2201
|
-
(
|
|
2207
|
+
(_b = opt.install) == null ? void 0 : _b.call(opt, App, opt, name);
|
|
2202
2208
|
if (App._initialized && !opt.functional) {
|
|
2203
2209
|
requestAnimationFrame(() => createComponent(name, `[${id}],[data-${id}]`));
|
|
2204
2210
|
}
|
|
@@ -2206,7 +2212,7 @@
|
|
|
2206
2212
|
}
|
|
2207
2213
|
function createComponent(name, element, data, ...args) {
|
|
2208
2214
|
const Component = component(name);
|
|
2209
|
-
return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ?
|
|
2215
|
+
return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ? findAll(element).map(init)[0] : init();
|
|
2210
2216
|
function init(element2) {
|
|
2211
2217
|
const instance = getComponent(element2, name);
|
|
2212
2218
|
if (instance) {
|
|
@@ -2282,14 +2288,14 @@
|
|
|
2282
2288
|
if (name) {
|
|
2283
2289
|
if (hasAttr(target, attributeName)) {
|
|
2284
2290
|
createComponent(name, target);
|
|
2285
|
-
|
|
2291
|
+
} else {
|
|
2292
|
+
(_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
|
|
2286
2293
|
}
|
|
2287
|
-
(_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
|
|
2288
2294
|
}
|
|
2289
2295
|
}
|
|
2290
2296
|
function connect(node) {
|
|
2291
2297
|
const components2 = getComponents(node);
|
|
2292
|
-
for (const name in
|
|
2298
|
+
for (const name in components2) {
|
|
2293
2299
|
callConnected(components2[name]);
|
|
2294
2300
|
}
|
|
2295
2301
|
for (const attributeName of node.getAttributeNames()) {
|
|
@@ -2299,7 +2305,7 @@
|
|
|
2299
2305
|
}
|
|
2300
2306
|
function disconnect(node) {
|
|
2301
2307
|
const components2 = getComponents(node);
|
|
2302
|
-
for (const name in
|
|
2308
|
+
for (const name in components2) {
|
|
2303
2309
|
callDisconnected(components2[name]);
|
|
2304
2310
|
}
|
|
2305
2311
|
}
|
|
@@ -2308,7 +2314,7 @@
|
|
|
2308
2314
|
attribute = attribute.slice(5);
|
|
2309
2315
|
}
|
|
2310
2316
|
const cmp = components$1[attribute];
|
|
2311
|
-
return cmp && (
|
|
2317
|
+
return cmp && (cmp.options || cmp).name;
|
|
2312
2318
|
}
|
|
2313
2319
|
|
|
2314
2320
|
function globalApi(App) {
|
|
@@ -3569,7 +3575,8 @@
|
|
|
3569
3575
|
document,
|
|
3570
3576
|
`${pointerUp} ${pointerCancel} scroll`,
|
|
3571
3577
|
({ defaultPrevented, type, target: newTarget }) => {
|
|
3572
|
-
|
|
3578
|
+
var _a;
|
|
3579
|
+
if (!defaultPrevented && type === pointerUp && target === newTarget && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
|
|
3573
3580
|
drop.hide(false);
|
|
3574
3581
|
}
|
|
3575
3582
|
},
|
|
@@ -4276,7 +4283,10 @@
|
|
|
4276
4283
|
target: ""
|
|
4277
4284
|
},
|
|
4278
4285
|
computed: {
|
|
4279
|
-
target:
|
|
4286
|
+
target: {
|
|
4287
|
+
get: ({ target }, $el) => query(target, $el),
|
|
4288
|
+
observe: ({ target }) => target
|
|
4289
|
+
}
|
|
4280
4290
|
},
|
|
4281
4291
|
observe: resize({ target: ({ target }) => target }),
|
|
4282
4292
|
update: {
|
|
@@ -4332,7 +4342,7 @@
|
|
|
4332
4342
|
const top = offsetPosition(offsetTopEl)[0] - offsetPosition(scrollElement)[0];
|
|
4333
4343
|
minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : "";
|
|
4334
4344
|
} else {
|
|
4335
|
-
minHeight += ` - ${css(scrollElement, "
|
|
4345
|
+
minHeight += ` - ${boxModelAdjust(scrollElement, "height", css(scrollElement, "boxSizing"))}px`;
|
|
4336
4346
|
}
|
|
4337
4347
|
}
|
|
4338
4348
|
if (this.offsetBottom === true) {
|
|
@@ -4545,7 +4555,7 @@
|
|
|
4545
4555
|
i18n: { toggle: "Open Search", submit: "Submit Search" },
|
|
4546
4556
|
beforeConnect() {
|
|
4547
4557
|
const isToggle = hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle");
|
|
4548
|
-
this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") &&
|
|
4558
|
+
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;
|
|
4549
4559
|
if (hasAttr(this.$el, "aria-label")) {
|
|
4550
4560
|
return;
|
|
4551
4561
|
}
|
|
@@ -4689,13 +4699,13 @@
|
|
|
4689
4699
|
delete this.img;
|
|
4690
4700
|
},
|
|
4691
4701
|
observe: intersection({
|
|
4692
|
-
target: ({ $el, $props }) => [$el, ...queryAll($props.target, $el)],
|
|
4693
4702
|
handler(entries, observer) {
|
|
4694
4703
|
this.load();
|
|
4695
4704
|
observer.disconnect();
|
|
4696
4705
|
},
|
|
4697
4706
|
options: ({ margin }) => ({ rootMargin: margin }),
|
|
4698
|
-
filter: ({ loading }) => loading === "lazy"
|
|
4707
|
+
filter: ({ loading }) => loading === "lazy",
|
|
4708
|
+
target: ({ $el, $props }) => $props.target ? [$el, ...queryAll($props.target, $el)] : $el
|
|
4699
4709
|
}),
|
|
4700
4710
|
methods: {
|
|
4701
4711
|
load() {
|
|
@@ -4785,9 +4795,17 @@
|
|
|
4785
4795
|
selActive: false
|
|
4786
4796
|
},
|
|
4787
4797
|
computed: {
|
|
4788
|
-
target: ({ target }, $el) => target ? $$(target, $el) :
|
|
4798
|
+
target: ({ target }, $el) => target ? $$(target, $el) : $el
|
|
4789
4799
|
},
|
|
4790
4800
|
observe: [
|
|
4801
|
+
intersection({
|
|
4802
|
+
handler(entries) {
|
|
4803
|
+
this.isIntersecting = entries.some(({ isIntersecting }) => isIntersecting);
|
|
4804
|
+
this.$emit();
|
|
4805
|
+
},
|
|
4806
|
+
target: ({ target }) => target,
|
|
4807
|
+
args: { intersecting: false }
|
|
4808
|
+
}),
|
|
4791
4809
|
mutation({
|
|
4792
4810
|
target: ({ target }) => target,
|
|
4793
4811
|
options: { attributes: true, attributeFilter: ["class"], attributeOldValue: true }
|
|
@@ -4795,7 +4813,10 @@
|
|
|
4795
4813
|
{
|
|
4796
4814
|
target: ({ target }) => target,
|
|
4797
4815
|
observe: (target, handler) => {
|
|
4798
|
-
const observer = observeResize(
|
|
4816
|
+
const observer = observeResize(
|
|
4817
|
+
[...toNodes(target), document.documentElement],
|
|
4818
|
+
handler
|
|
4819
|
+
);
|
|
4799
4820
|
const listener = [
|
|
4800
4821
|
on(document, "scroll itemshown itemhidden", handler, {
|
|
4801
4822
|
passive: true,
|
|
@@ -4811,6 +4832,8 @@
|
|
|
4811
4832
|
})
|
|
4812
4833
|
];
|
|
4813
4834
|
return {
|
|
4835
|
+
observe: observer.observe.bind(observer),
|
|
4836
|
+
unobserve: observer.unobserve.bind(observer),
|
|
4814
4837
|
disconnect() {
|
|
4815
4838
|
observer.disconnect();
|
|
4816
4839
|
listener.map((off) => off());
|
|
@@ -4824,7 +4847,10 @@
|
|
|
4824
4847
|
],
|
|
4825
4848
|
update: {
|
|
4826
4849
|
read() {
|
|
4827
|
-
|
|
4850
|
+
if (!this.isIntersecting) {
|
|
4851
|
+
return false;
|
|
4852
|
+
}
|
|
4853
|
+
for (const target of toNodes(this.target)) {
|
|
4828
4854
|
replaceClass(
|
|
4829
4855
|
target,
|
|
4830
4856
|
"uk-light,uk-dark",
|
|
@@ -5191,10 +5217,11 @@
|
|
|
5191
5217
|
};
|
|
5192
5218
|
function install({ modal }) {
|
|
5193
5219
|
modal.dialog = function(content, options) {
|
|
5194
|
-
const dialog = modal(
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5220
|
+
const dialog = modal($(`<div><div class="uk-modal-dialog">${content}</div></div>`), {
|
|
5221
|
+
stack: true,
|
|
5222
|
+
role: "alertdialog",
|
|
5223
|
+
...options
|
|
5224
|
+
});
|
|
5198
5225
|
dialog.show();
|
|
5199
5226
|
on(
|
|
5200
5227
|
dialog.$el,
|
|
@@ -5813,7 +5840,7 @@
|
|
|
5813
5840
|
target: () => document.scrollingElement,
|
|
5814
5841
|
options: { box: "content-box" }
|
|
5815
5842
|
}),
|
|
5816
|
-
resize(
|
|
5843
|
+
resize()
|
|
5817
5844
|
],
|
|
5818
5845
|
events: [
|
|
5819
5846
|
{
|
|
@@ -6106,18 +6133,10 @@
|
|
|
6106
6133
|
}
|
|
6107
6134
|
|
|
6108
6135
|
function getMaxPathLength(el) {
|
|
6109
|
-
return Math.ceil(
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
try {
|
|
6114
|
-
return stroke.getTotalLength();
|
|
6115
|
-
} catch (e) {
|
|
6116
|
-
return 0;
|
|
6117
|
-
}
|
|
6118
|
-
})
|
|
6119
|
-
)
|
|
6120
|
-
);
|
|
6136
|
+
return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => {
|
|
6137
|
+
var _a;
|
|
6138
|
+
return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
|
|
6139
|
+
})));
|
|
6121
6140
|
}
|
|
6122
6141
|
|
|
6123
6142
|
var svg = {
|
|
@@ -6241,7 +6260,10 @@
|
|
|
6241
6260
|
swiping: true
|
|
6242
6261
|
},
|
|
6243
6262
|
computed: {
|
|
6244
|
-
connects:
|
|
6263
|
+
connects: {
|
|
6264
|
+
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
6265
|
+
observe: ({ connect }) => connect
|
|
6266
|
+
},
|
|
6245
6267
|
connectChildren() {
|
|
6246
6268
|
return this.connects.map((el) => children(el)).flat();
|
|
6247
6269
|
},
|
|
@@ -6430,9 +6452,12 @@
|
|
|
6430
6452
|
queued: true
|
|
6431
6453
|
},
|
|
6432
6454
|
computed: {
|
|
6433
|
-
target
|
|
6434
|
-
|
|
6435
|
-
|
|
6455
|
+
target: {
|
|
6456
|
+
get: ({ target }, $el) => {
|
|
6457
|
+
target = queryAll(target || $el.hash, $el);
|
|
6458
|
+
return target.length ? target : [$el];
|
|
6459
|
+
},
|
|
6460
|
+
observe: ({ target }) => target
|
|
6436
6461
|
}
|
|
6437
6462
|
},
|
|
6438
6463
|
connected() {
|