uikit 3.19.5-dev.57ec46163 → 3.19.5-dev.5db24934f
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 +8 -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 +73 -48
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +74 -49
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +75 -51
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +74 -49
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +74 -49
- 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 +170 -112
- 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 +179 -119
- 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 +24 -23
- 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 +5 -2
- 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 +5 -1
- package/src/js/core/toggle.js +7 -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 +71 -38
- 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/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.5db24934f | 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)) {
|
|
@@ -367,55 +361,86 @@
|
|
|
367
361
|
function findAll(selector, context) {
|
|
368
362
|
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
369
363
|
}
|
|
370
|
-
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
371
|
-
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
372
364
|
function getContext(selector, context = document) {
|
|
373
|
-
return isString(selector) &&
|
|
365
|
+
return isString(selector) && parseSelector(selector).isContextSelector || isDocument(context) ? context : context.ownerDocument;
|
|
374
366
|
}
|
|
375
|
-
const
|
|
376
|
-
const
|
|
367
|
+
const addStarRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
368
|
+
const splitSelectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
|
|
369
|
+
const trailingCommaRe = /\s*,$/;
|
|
370
|
+
const parseSelector = memoize((selector) => {
|
|
371
|
+
var _a;
|
|
372
|
+
selector = selector.replace(addStarRe, "$1 *");
|
|
373
|
+
let isContextSelector = false;
|
|
374
|
+
const selectors = [];
|
|
375
|
+
for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
|
|
376
|
+
sel = sel.replace(trailingCommaRe, "").trim();
|
|
377
|
+
if (sel[0] === ">") {
|
|
378
|
+
sel = `:scope ${sel}`;
|
|
379
|
+
}
|
|
380
|
+
isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
|
|
381
|
+
selectors.push(sel);
|
|
382
|
+
}
|
|
383
|
+
return {
|
|
384
|
+
selector: selectors.join(","),
|
|
385
|
+
selectors,
|
|
386
|
+
isContextSelector
|
|
387
|
+
};
|
|
388
|
+
});
|
|
389
|
+
const parsePositionSelector = memoize((selector) => {
|
|
390
|
+
selector = selector.substr(1).trim();
|
|
391
|
+
const index2 = selector.indexOf(" ");
|
|
392
|
+
return ~index2 ? [selector.substring(0, index2), selector.substring(index2 + 1)] : [selector, ""];
|
|
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
|
-
if (
|
|
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 positionSel;
|
|
406
|
+
let ctx = context;
|
|
407
|
+
if (sel[0] === "!") {
|
|
408
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
409
|
+
ctx = context.parentElement.closest(positionSel);
|
|
410
|
+
if (!sel && isSingle) {
|
|
411
|
+
return ctx;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
if (ctx && sel[0] === "-") {
|
|
415
|
+
[positionSel, sel] = parsePositionSelector(sel);
|
|
416
|
+
ctx = ctx.previousElementSibling;
|
|
417
|
+
ctx = matches(ctx, positionSel) ? ctx : null;
|
|
418
|
+
if (!sel && isSingle) {
|
|
419
|
+
return ctx;
|
|
420
|
+
}
|
|
421
|
+
} else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
|
|
422
|
+
return _doQuery(
|
|
423
|
+
ctx.parentElement,
|
|
424
|
+
queryFn,
|
|
425
|
+
`:scope :nth-child(${index(ctx) + 1}) ${sel}`
|
|
426
|
+
);
|
|
404
427
|
}
|
|
405
|
-
if (
|
|
406
|
-
|
|
428
|
+
if (ctx) {
|
|
429
|
+
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
407
430
|
}
|
|
408
431
|
}
|
|
432
|
+
if (!isDocument(context)) {
|
|
433
|
+
context = context.ownerDocument;
|
|
434
|
+
}
|
|
435
|
+
return _doQuery(context, queryFn, selector);
|
|
436
|
+
}
|
|
437
|
+
function _doQuery(context, queryFn, selector) {
|
|
409
438
|
try {
|
|
410
439
|
return context[queryFn](selector);
|
|
411
440
|
} catch (e) {
|
|
412
441
|
return null;
|
|
413
442
|
}
|
|
414
443
|
}
|
|
415
|
-
const selectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
|
|
416
|
-
const splitSelector = memoize(
|
|
417
|
-
(selector) => selector.match(selectorRe).map((selector2) => selector2.replace(/,$/, "").trim())
|
|
418
|
-
);
|
|
419
444
|
function domPath(element) {
|
|
420
445
|
const names = [];
|
|
421
446
|
while (element.parentNode) {
|
|
@@ -1540,7 +1565,6 @@
|
|
|
1540
1565
|
camelize: camelize,
|
|
1541
1566
|
children: children,
|
|
1542
1567
|
clamp: clamp,
|
|
1543
|
-
closest: closest,
|
|
1544
1568
|
createEvent: createEvent,
|
|
1545
1569
|
css: css,
|
|
1546
1570
|
data: data,
|
|
@@ -1661,7 +1685,6 @@
|
|
|
1661
1685
|
uniqueBy: uniqueBy,
|
|
1662
1686
|
unwrap: unwrap,
|
|
1663
1687
|
width: width,
|
|
1664
|
-
within: within,
|
|
1665
1688
|
wrapAll: wrapAll,
|
|
1666
1689
|
wrapInner: wrapInner
|
|
1667
1690
|
});
|
|
@@ -1749,6 +1772,7 @@
|
|
|
1749
1772
|
}
|
|
1750
1773
|
}
|
|
1751
1774
|
}
|
|
1775
|
+
const mutationOptions = { subtree: true, childList: true };
|
|
1752
1776
|
function registerComputed(instance, key, cb) {
|
|
1753
1777
|
instance._hasComputed = true;
|
|
1754
1778
|
Object.defineProperty(instance, key, {
|
|
@@ -1757,6 +1781,15 @@
|
|
|
1757
1781
|
const { _computed, $props, $el } = instance;
|
|
1758
1782
|
if (!hasOwn(_computed, key)) {
|
|
1759
1783
|
_computed[key] = (cb.get || cb).call(instance, $props, $el);
|
|
1784
|
+
if (cb.observe && instance._computedObserver) {
|
|
1785
|
+
const observeEl = cb.observe.call(instance, _computed[key]);
|
|
1786
|
+
if (observeEl && observeEl !== $el) {
|
|
1787
|
+
instance._computedObserver.observe(
|
|
1788
|
+
commonAncestor(observeEl, $el),
|
|
1789
|
+
mutationOptions
|
|
1790
|
+
);
|
|
1791
|
+
}
|
|
1792
|
+
}
|
|
1760
1793
|
}
|
|
1761
1794
|
return _computed[key];
|
|
1762
1795
|
},
|
|
@@ -1777,11 +1810,16 @@
|
|
|
1777
1810
|
read: () => runWatches(instance, resetComputed(instance)),
|
|
1778
1811
|
events: ["resize", "computed"]
|
|
1779
1812
|
});
|
|
1780
|
-
|
|
1781
|
-
|
|
1813
|
+
instance._computedObserver = observeMutation(
|
|
1814
|
+
instance.$el,
|
|
1815
|
+
() => callUpdate(instance, "computed"),
|
|
1816
|
+
mutationOptions
|
|
1817
|
+
);
|
|
1782
1818
|
}
|
|
1783
1819
|
function disconnectComputedUpdates(instance) {
|
|
1784
|
-
|
|
1820
|
+
var _a;
|
|
1821
|
+
(_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
|
|
1822
|
+
delete instance._computedObserver;
|
|
1785
1823
|
resetComputed(instance);
|
|
1786
1824
|
}
|
|
1787
1825
|
function resetComputed(instance) {
|
|
@@ -1789,22 +1827,11 @@
|
|
|
1789
1827
|
instance._computed = {};
|
|
1790
1828
|
return values;
|
|
1791
1829
|
}
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
if (observer) {
|
|
1796
|
-
return;
|
|
1830
|
+
function commonAncestor(element1, element2) {
|
|
1831
|
+
while (element1 && !element1.contains(element2)) {
|
|
1832
|
+
element1 = element1.parentNode;
|
|
1797
1833
|
}
|
|
1798
|
-
|
|
1799
|
-
observer = new MutationObserver(() => {
|
|
1800
|
-
for (const instance of instances$1) {
|
|
1801
|
-
callUpdate(instance, "computed");
|
|
1802
|
-
}
|
|
1803
|
-
});
|
|
1804
|
-
observer.observe(document, {
|
|
1805
|
-
subtree: true,
|
|
1806
|
-
childList: true
|
|
1807
|
-
});
|
|
1834
|
+
return element1;
|
|
1808
1835
|
}
|
|
1809
1836
|
|
|
1810
1837
|
function initEvents(instance) {
|
|
@@ -1875,18 +1902,30 @@
|
|
|
1875
1902
|
}
|
|
1876
1903
|
const targets = hasOwn(instance, key) ? instance[key] : target;
|
|
1877
1904
|
const observer = observe(targets, handler, options, args);
|
|
1878
|
-
if (isFunction(target) && isArray(instance[key])
|
|
1879
|
-
registerWatch(
|
|
1905
|
+
if (isFunction(target) && isArray(instance[key])) {
|
|
1906
|
+
registerWatch(
|
|
1907
|
+
instance,
|
|
1908
|
+
{ handler: updateTargets(observer, options), immediate: false },
|
|
1909
|
+
key
|
|
1910
|
+
);
|
|
1880
1911
|
}
|
|
1881
1912
|
registerObserver(instance, observer);
|
|
1882
1913
|
}
|
|
1883
|
-
function updateTargets(observer) {
|
|
1914
|
+
function updateTargets(observer, options) {
|
|
1884
1915
|
return (targets, prev) => {
|
|
1885
1916
|
for (const target of prev) {
|
|
1886
|
-
!includes(targets, target)
|
|
1917
|
+
if (!includes(targets, target)) {
|
|
1918
|
+
if (observer.unobserve) {
|
|
1919
|
+
observer.unobserve(target);
|
|
1920
|
+
} else if (observer.observe) {
|
|
1921
|
+
observer.disconnect();
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1887
1924
|
}
|
|
1888
1925
|
for (const target of targets) {
|
|
1889
|
-
!includes(prev, target)
|
|
1926
|
+
if (!includes(prev, target) || !observer.unobserve) {
|
|
1927
|
+
observer.observe(target, options);
|
|
1928
|
+
}
|
|
1890
1929
|
}
|
|
1891
1930
|
};
|
|
1892
1931
|
}
|
|
@@ -2153,26 +2192,26 @@
|
|
|
2153
2192
|
};
|
|
2154
2193
|
App.util = util;
|
|
2155
2194
|
App.options = {};
|
|
2156
|
-
App.version = "3.19.5-dev.
|
|
2195
|
+
App.version = "3.19.5-dev.5db24934f";
|
|
2157
2196
|
|
|
2158
2197
|
const PREFIX = "uk-";
|
|
2159
2198
|
const DATA = "__uikit__";
|
|
2160
2199
|
const components$1 = {};
|
|
2161
2200
|
function component(name, options) {
|
|
2162
|
-
var _a;
|
|
2201
|
+
var _a, _b;
|
|
2163
2202
|
const id = PREFIX + hyphenate(name);
|
|
2164
2203
|
if (!options) {
|
|
2165
|
-
if (
|
|
2204
|
+
if (!components$1[id].options) {
|
|
2166
2205
|
components$1[id] = App.extend(components$1[id]);
|
|
2167
2206
|
}
|
|
2168
2207
|
return components$1[id];
|
|
2169
2208
|
}
|
|
2170
2209
|
name = camelize(name);
|
|
2171
2210
|
App[name] = (element, data) => createComponent(name, element, data);
|
|
2172
|
-
const opt =
|
|
2211
|
+
const opt = (_a = options.options) != null ? _a : { ...options };
|
|
2173
2212
|
opt.id = id;
|
|
2174
2213
|
opt.name = name;
|
|
2175
|
-
(
|
|
2214
|
+
(_b = opt.install) == null ? void 0 : _b.call(opt, App, opt, name);
|
|
2176
2215
|
if (App._initialized && !opt.functional) {
|
|
2177
2216
|
requestAnimationFrame(() => createComponent(name, `[${id}],[data-${id}]`));
|
|
2178
2217
|
}
|
|
@@ -2180,7 +2219,7 @@
|
|
|
2180
2219
|
}
|
|
2181
2220
|
function createComponent(name, element, data, ...args) {
|
|
2182
2221
|
const Component = component(name);
|
|
2183
|
-
return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ?
|
|
2222
|
+
return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ? findAll(element).map(init)[0] : init();
|
|
2184
2223
|
function init(element2) {
|
|
2185
2224
|
const instance = getComponent(element2, name);
|
|
2186
2225
|
if (instance) {
|
|
@@ -2256,14 +2295,14 @@
|
|
|
2256
2295
|
if (name) {
|
|
2257
2296
|
if (hasAttr(target, attributeName)) {
|
|
2258
2297
|
createComponent(name, target);
|
|
2259
|
-
|
|
2298
|
+
} else {
|
|
2299
|
+
(_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
|
|
2260
2300
|
}
|
|
2261
|
-
(_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
|
|
2262
2301
|
}
|
|
2263
2302
|
}
|
|
2264
2303
|
function connect(node) {
|
|
2265
2304
|
const components2 = getComponents(node);
|
|
2266
|
-
for (const name in
|
|
2305
|
+
for (const name in components2) {
|
|
2267
2306
|
callConnected(components2[name]);
|
|
2268
2307
|
}
|
|
2269
2308
|
for (const attributeName of node.getAttributeNames()) {
|
|
@@ -2273,7 +2312,7 @@
|
|
|
2273
2312
|
}
|
|
2274
2313
|
function disconnect(node) {
|
|
2275
2314
|
const components2 = getComponents(node);
|
|
2276
|
-
for (const name in
|
|
2315
|
+
for (const name in components2) {
|
|
2277
2316
|
callDisconnected(components2[name]);
|
|
2278
2317
|
}
|
|
2279
2318
|
}
|
|
@@ -2282,7 +2321,7 @@
|
|
|
2282
2321
|
attribute = attribute.slice(5);
|
|
2283
2322
|
}
|
|
2284
2323
|
const cmp = components$1[attribute];
|
|
2285
|
-
return cmp && (
|
|
2324
|
+
return cmp && (cmp.options || cmp).name;
|
|
2286
2325
|
}
|
|
2287
2326
|
|
|
2288
2327
|
function globalApi(App) {
|
|
@@ -3543,7 +3582,8 @@
|
|
|
3543
3582
|
document,
|
|
3544
3583
|
`${pointerUp} ${pointerCancel} scroll`,
|
|
3545
3584
|
({ defaultPrevented, type, target: newTarget }) => {
|
|
3546
|
-
|
|
3585
|
+
var _a;
|
|
3586
|
+
if (!defaultPrevented && type === pointerUp && target === newTarget && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
|
|
3547
3587
|
drop.hide(false);
|
|
3548
3588
|
}
|
|
3549
3589
|
},
|
|
@@ -4250,7 +4290,10 @@
|
|
|
4250
4290
|
target: ""
|
|
4251
4291
|
},
|
|
4252
4292
|
computed: {
|
|
4253
|
-
target:
|
|
4293
|
+
target: {
|
|
4294
|
+
get: ({ target }, $el) => query(target, $el),
|
|
4295
|
+
observe: (target) => parent(target)
|
|
4296
|
+
}
|
|
4254
4297
|
},
|
|
4255
4298
|
observe: resize({ target: ({ target }) => target }),
|
|
4256
4299
|
update: {
|
|
@@ -4306,7 +4349,7 @@
|
|
|
4306
4349
|
const top = offsetPosition(offsetTopEl)[0] - offsetPosition(scrollElement)[0];
|
|
4307
4350
|
minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : "";
|
|
4308
4351
|
} else {
|
|
4309
|
-
minHeight += ` - ${css(scrollElement, "
|
|
4352
|
+
minHeight += ` - ${boxModelAdjust(scrollElement, "height", css(scrollElement, "boxSizing"))}px`;
|
|
4310
4353
|
}
|
|
4311
4354
|
}
|
|
4312
4355
|
if (this.offsetBottom === true) {
|
|
@@ -4519,7 +4562,7 @@
|
|
|
4519
4562
|
i18n: { toggle: "Open Search", submit: "Submit Search" },
|
|
4520
4563
|
beforeConnect() {
|
|
4521
4564
|
const isToggle = hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle");
|
|
4522
|
-
this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") &&
|
|
4565
|
+
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;
|
|
4523
4566
|
if (hasAttr(this.$el, "aria-label")) {
|
|
4524
4567
|
return;
|
|
4525
4568
|
}
|
|
@@ -4663,13 +4706,13 @@
|
|
|
4663
4706
|
delete this.img;
|
|
4664
4707
|
},
|
|
4665
4708
|
observe: intersection({
|
|
4666
|
-
target: ({ $el, $props }) => [$el, ...queryAll($props.target, $el)],
|
|
4667
4709
|
handler(entries, observer) {
|
|
4668
4710
|
this.load();
|
|
4669
4711
|
observer.disconnect();
|
|
4670
4712
|
},
|
|
4671
4713
|
options: ({ margin }) => ({ rootMargin: margin }),
|
|
4672
|
-
filter: ({ loading }) => loading === "lazy"
|
|
4714
|
+
filter: ({ loading }) => loading === "lazy",
|
|
4715
|
+
target: ({ $el, $props }) => $props.target ? [$el, ...queryAll($props.target, $el)] : $el
|
|
4673
4716
|
}),
|
|
4674
4717
|
methods: {
|
|
4675
4718
|
load() {
|
|
@@ -4759,9 +4802,17 @@
|
|
|
4759
4802
|
selActive: false
|
|
4760
4803
|
},
|
|
4761
4804
|
computed: {
|
|
4762
|
-
target: ({ target }, $el) => target ? $$(target, $el) :
|
|
4805
|
+
target: ({ target }, $el) => target ? $$(target, $el) : $el
|
|
4763
4806
|
},
|
|
4764
4807
|
observe: [
|
|
4808
|
+
intersection({
|
|
4809
|
+
handler(entries) {
|
|
4810
|
+
this.isIntersecting = entries.some(({ isIntersecting }) => isIntersecting);
|
|
4811
|
+
this.$emit();
|
|
4812
|
+
},
|
|
4813
|
+
target: ({ target }) => target,
|
|
4814
|
+
args: { intersecting: false }
|
|
4815
|
+
}),
|
|
4765
4816
|
mutation({
|
|
4766
4817
|
target: ({ target }) => target,
|
|
4767
4818
|
options: { attributes: true, attributeFilter: ["class"], attributeOldValue: true }
|
|
@@ -4769,7 +4820,10 @@
|
|
|
4769
4820
|
{
|
|
4770
4821
|
target: ({ target }) => target,
|
|
4771
4822
|
observe: (target, handler) => {
|
|
4772
|
-
const observer = observeResize(
|
|
4823
|
+
const observer = observeResize(
|
|
4824
|
+
[...toNodes(target), document.documentElement],
|
|
4825
|
+
handler
|
|
4826
|
+
);
|
|
4773
4827
|
const listener = [
|
|
4774
4828
|
on(document, "scroll itemshown itemhidden", handler, {
|
|
4775
4829
|
passive: true,
|
|
@@ -4785,6 +4839,8 @@
|
|
|
4785
4839
|
})
|
|
4786
4840
|
];
|
|
4787
4841
|
return {
|
|
4842
|
+
observe: observer.observe.bind(observer),
|
|
4843
|
+
unobserve: observer.unobserve.bind(observer),
|
|
4788
4844
|
disconnect() {
|
|
4789
4845
|
observer.disconnect();
|
|
4790
4846
|
listener.map((off) => off());
|
|
@@ -4798,7 +4854,10 @@
|
|
|
4798
4854
|
],
|
|
4799
4855
|
update: {
|
|
4800
4856
|
read() {
|
|
4801
|
-
|
|
4857
|
+
if (!this.isIntersecting) {
|
|
4858
|
+
return false;
|
|
4859
|
+
}
|
|
4860
|
+
for (const target of toNodes(this.target)) {
|
|
4802
4861
|
replaceClass(
|
|
4803
4862
|
target,
|
|
4804
4863
|
"uk-light,uk-dark",
|
|
@@ -5165,10 +5224,11 @@
|
|
|
5165
5224
|
};
|
|
5166
5225
|
function install({ modal }) {
|
|
5167
5226
|
modal.dialog = function(content, options) {
|
|
5168
|
-
const dialog = modal(
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5227
|
+
const dialog = modal($(`<div><div class="uk-modal-dialog">${content}</div></div>`), {
|
|
5228
|
+
stack: true,
|
|
5229
|
+
role: "alertdialog",
|
|
5230
|
+
...options
|
|
5231
|
+
});
|
|
5172
5232
|
dialog.show();
|
|
5173
5233
|
on(
|
|
5174
5234
|
dialog.$el,
|
|
@@ -5787,7 +5847,7 @@
|
|
|
5787
5847
|
target: () => document.scrollingElement,
|
|
5788
5848
|
options: { box: "content-box" }
|
|
5789
5849
|
}),
|
|
5790
|
-
resize(
|
|
5850
|
+
resize()
|
|
5791
5851
|
],
|
|
5792
5852
|
events: [
|
|
5793
5853
|
{
|
|
@@ -6080,18 +6140,10 @@
|
|
|
6080
6140
|
}
|
|
6081
6141
|
|
|
6082
6142
|
function getMaxPathLength(el) {
|
|
6083
|
-
return Math.ceil(
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
try {
|
|
6088
|
-
return stroke.getTotalLength();
|
|
6089
|
-
} catch (e) {
|
|
6090
|
-
return 0;
|
|
6091
|
-
}
|
|
6092
|
-
})
|
|
6093
|
-
)
|
|
6094
|
-
);
|
|
6143
|
+
return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => {
|
|
6144
|
+
var _a;
|
|
6145
|
+
return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
|
|
6146
|
+
})));
|
|
6095
6147
|
}
|
|
6096
6148
|
|
|
6097
6149
|
var svg = {
|
|
@@ -6215,7 +6267,10 @@
|
|
|
6215
6267
|
swiping: true
|
|
6216
6268
|
},
|
|
6217
6269
|
computed: {
|
|
6218
|
-
connects:
|
|
6270
|
+
connects: {
|
|
6271
|
+
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
6272
|
+
observe: (connects) => parent(connects[0])
|
|
6273
|
+
},
|
|
6219
6274
|
connectChildren() {
|
|
6220
6275
|
return this.connects.map((el) => children(el)).flat();
|
|
6221
6276
|
},
|
|
@@ -6404,9 +6459,12 @@
|
|
|
6404
6459
|
queued: true
|
|
6405
6460
|
},
|
|
6406
6461
|
computed: {
|
|
6407
|
-
target
|
|
6408
|
-
|
|
6409
|
-
|
|
6462
|
+
target: {
|
|
6463
|
+
get: ({ target }, $el) => {
|
|
6464
|
+
target = queryAll(target || $el.hash, $el);
|
|
6465
|
+
return target.length ? target : [$el];
|
|
6466
|
+
},
|
|
6467
|
+
observe: (target) => parent(target[0])
|
|
6410
6468
|
}
|
|
6411
6469
|
},
|
|
6412
6470
|
connected() {
|