uikit 3.19.4 → 3.19.5-dev.3a146179f
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 +14 -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 +7 -8
- 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 +69 -48
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +70 -49
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +71 -51
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +70 -49
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +70 -49
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +3 -3
- 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 +169 -116
- 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 +181 -127
- package/dist/js/uikit.min.js +1 -1
- package/eslint.config.js +8 -5
- package/package.json +3 -4
- 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/filter.js +4 -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 -8
- 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/margin.js +1 -1
- package/src/js/core/modal.js +5 -6
- package/src/js/core/switcher.js +11 -2
- package/src/js/core/toggle.js +8 -4
- 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 +1 -11
- package/src/js/util/lang.js +1 -1
- package/src/js/util/selector.js +66 -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/modal.html +2 -2
- package/build/package.json +0 -4
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.19.
|
|
1
|
+
/*! UIkit 3.19.5-dev.3a146179f | 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);
|
|
@@ -319,13 +319,6 @@
|
|
|
319
319
|
function matches(element, selector) {
|
|
320
320
|
return toNodes(element).some((element2) => element2.matches(selector));
|
|
321
321
|
}
|
|
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
322
|
function parents(element, selector) {
|
|
330
323
|
const elements = [];
|
|
331
324
|
while (element = parent(element)) {
|
|
@@ -367,55 +360,82 @@
|
|
|
367
360
|
function findAll(selector, context) {
|
|
368
361
|
return toNodes(_query(selector, toNode(context), "querySelectorAll"));
|
|
369
362
|
}
|
|
370
|
-
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
371
|
-
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
372
363
|
function getContext(selector, context = document) {
|
|
373
|
-
return isString(selector) &&
|
|
364
|
+
return isString(selector) && parseSelector(selector).isContextSelector || isDocument(context) ? context : context.ownerDocument;
|
|
374
365
|
}
|
|
375
|
-
const
|
|
376
|
-
const
|
|
366
|
+
const addStarRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
367
|
+
const splitSelectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
|
|
368
|
+
const trailingCommaRe = /\s*,$/;
|
|
369
|
+
const parseSelector = memoize((selector) => {
|
|
370
|
+
var _a;
|
|
371
|
+
selector = selector.replace(addStarRe, "$1 *");
|
|
372
|
+
let isContextSelector = false;
|
|
373
|
+
const selectors = [];
|
|
374
|
+
for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
|
|
375
|
+
sel = sel.replace(trailingCommaRe, "").trim();
|
|
376
|
+
if (sel[0] === ">") {
|
|
377
|
+
sel = `:scope ${sel}`;
|
|
378
|
+
}
|
|
379
|
+
isContextSelector || (isContextSelector = ["!", "+", "~", "-"].includes(sel[0]));
|
|
380
|
+
selectors.push(sel);
|
|
381
|
+
}
|
|
382
|
+
return {
|
|
383
|
+
selector: selectors.join(","),
|
|
384
|
+
selectors,
|
|
385
|
+
isContextSelector
|
|
386
|
+
};
|
|
387
|
+
});
|
|
377
388
|
function _query(selector, context = document, queryFn) {
|
|
378
389
|
if (!selector || !isString(selector)) {
|
|
379
390
|
return selector;
|
|
380
391
|
}
|
|
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
|
-
|
|
392
|
+
const parsed = parseSelector(selector);
|
|
393
|
+
if (!parsed.isContextSelector) {
|
|
394
|
+
return _doQuery(context, queryFn, parsed.selector);
|
|
395
|
+
}
|
|
396
|
+
selector = "";
|
|
397
|
+
const isSingle = parsed.selectors.length === 1;
|
|
398
|
+
for (let sel of parsed.selectors) {
|
|
399
|
+
let ctx = context;
|
|
400
|
+
if (sel[0] === "!") {
|
|
401
|
+
const selectors = sel.substr(1).trim().split(" ");
|
|
402
|
+
ctx = context.parentElement.closest(selectors[0]);
|
|
403
|
+
sel = selectors.slice(1).join(" ").trim();
|
|
404
|
+
if (!sel.length && isSingle) {
|
|
405
|
+
return ctx;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
if (sel[0] === "-") {
|
|
409
|
+
const selectors = sel.substr(1).trim().split(" ");
|
|
410
|
+
const prev = (ctx || context).previousElementSibling;
|
|
411
|
+
ctx = matches(prev, sel.substr(1)) ? prev : null;
|
|
412
|
+
sel = selectors.slice(1).join(" ");
|
|
413
|
+
if (!sel.length && isSingle) {
|
|
414
|
+
return ctx;
|
|
415
|
+
}
|
|
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
|
+
);
|
|
404
422
|
}
|
|
405
|
-
if (
|
|
406
|
-
|
|
423
|
+
if (ctx) {
|
|
424
|
+
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
407
425
|
}
|
|
408
426
|
}
|
|
427
|
+
if (!isDocument(context)) {
|
|
428
|
+
context = context.ownerDocument;
|
|
429
|
+
}
|
|
430
|
+
return _doQuery(context, queryFn, selector);
|
|
431
|
+
}
|
|
432
|
+
function _doQuery(context, queryFn, selector) {
|
|
409
433
|
try {
|
|
410
434
|
return context[queryFn](selector);
|
|
411
435
|
} catch (e) {
|
|
412
436
|
return null;
|
|
413
437
|
}
|
|
414
438
|
}
|
|
415
|
-
const selectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
|
|
416
|
-
const splitSelector = memoize(
|
|
417
|
-
(selector) => selector.match(selectorRe).map((selector2) => selector2.replace(/,$/, "").trim())
|
|
418
|
-
);
|
|
419
439
|
function domPath(element) {
|
|
420
440
|
const names = [];
|
|
421
441
|
while (element.parentNode) {
|
|
@@ -1540,7 +1560,6 @@
|
|
|
1540
1560
|
camelize: camelize,
|
|
1541
1561
|
children: children,
|
|
1542
1562
|
clamp: clamp,
|
|
1543
|
-
closest: closest,
|
|
1544
1563
|
createEvent: createEvent,
|
|
1545
1564
|
css: css,
|
|
1546
1565
|
data: data,
|
|
@@ -1661,7 +1680,6 @@
|
|
|
1661
1680
|
uniqueBy: uniqueBy,
|
|
1662
1681
|
unwrap: unwrap,
|
|
1663
1682
|
width: width,
|
|
1664
|
-
within: within,
|
|
1665
1683
|
wrapAll: wrapAll,
|
|
1666
1684
|
wrapInner: wrapInner
|
|
1667
1685
|
});
|
|
@@ -1749,6 +1767,7 @@
|
|
|
1749
1767
|
}
|
|
1750
1768
|
}
|
|
1751
1769
|
}
|
|
1770
|
+
const mutationOptions = { subtree: true, childList: true };
|
|
1752
1771
|
function registerComputed(instance, key, cb) {
|
|
1753
1772
|
instance._hasComputed = true;
|
|
1754
1773
|
Object.defineProperty(instance, key, {
|
|
@@ -1757,6 +1776,15 @@
|
|
|
1757
1776
|
const { _computed, $props, $el } = instance;
|
|
1758
1777
|
if (!hasOwn(_computed, key)) {
|
|
1759
1778
|
_computed[key] = (cb.get || cb).call(instance, $props, $el);
|
|
1779
|
+
if (cb.observe && instance._computedObserver) {
|
|
1780
|
+
const observeEl = cb.observe.call(instance, _computed[key]);
|
|
1781
|
+
if (observeEl && observeEl !== $el) {
|
|
1782
|
+
instance._computedObserver.observe(
|
|
1783
|
+
findClosestCommonParent(observeEl, $el),
|
|
1784
|
+
mutationOptions
|
|
1785
|
+
);
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1760
1788
|
}
|
|
1761
1789
|
return _computed[key];
|
|
1762
1790
|
},
|
|
@@ -1777,11 +1805,16 @@
|
|
|
1777
1805
|
read: () => runWatches(instance, resetComputed(instance)),
|
|
1778
1806
|
events: ["resize", "computed"]
|
|
1779
1807
|
});
|
|
1780
|
-
|
|
1781
|
-
|
|
1808
|
+
instance._computedObserver = observeMutation(
|
|
1809
|
+
instance.$el,
|
|
1810
|
+
() => callUpdate(instance, "computed"),
|
|
1811
|
+
mutationOptions
|
|
1812
|
+
);
|
|
1782
1813
|
}
|
|
1783
1814
|
function disconnectComputedUpdates(instance) {
|
|
1784
|
-
|
|
1815
|
+
var _a;
|
|
1816
|
+
(_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
|
|
1817
|
+
delete instance._computedObserver;
|
|
1785
1818
|
resetComputed(instance);
|
|
1786
1819
|
}
|
|
1787
1820
|
function resetComputed(instance) {
|
|
@@ -1789,22 +1822,11 @@
|
|
|
1789
1822
|
instance._computed = {};
|
|
1790
1823
|
return values;
|
|
1791
1824
|
}
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
if (observer) {
|
|
1796
|
-
return;
|
|
1825
|
+
function findClosestCommonParent(el1, el2) {
|
|
1826
|
+
while (el1 && !el1.contains(el2)) {
|
|
1827
|
+
el1 = el1.parentNode;
|
|
1797
1828
|
}
|
|
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
|
-
});
|
|
1829
|
+
return el1;
|
|
1808
1830
|
}
|
|
1809
1831
|
|
|
1810
1832
|
function initEvents(instance) {
|
|
@@ -1875,18 +1897,30 @@
|
|
|
1875
1897
|
}
|
|
1876
1898
|
const targets = hasOwn(instance, key) ? instance[key] : target;
|
|
1877
1899
|
const observer = observe(targets, handler, options, args);
|
|
1878
|
-
if (isFunction(target) && isArray(instance[key])
|
|
1879
|
-
registerWatch(
|
|
1900
|
+
if (isFunction(target) && isArray(instance[key])) {
|
|
1901
|
+
registerWatch(
|
|
1902
|
+
instance,
|
|
1903
|
+
{ handler: updateTargets(observer, options), immediate: false },
|
|
1904
|
+
key
|
|
1905
|
+
);
|
|
1880
1906
|
}
|
|
1881
1907
|
registerObserver(instance, observer);
|
|
1882
1908
|
}
|
|
1883
|
-
function updateTargets(observer) {
|
|
1909
|
+
function updateTargets(observer, options) {
|
|
1884
1910
|
return (targets, prev) => {
|
|
1885
1911
|
for (const target of prev) {
|
|
1886
|
-
!includes(targets, target)
|
|
1912
|
+
if (!includes(targets, target)) {
|
|
1913
|
+
if (observer.unobserve) {
|
|
1914
|
+
observer.unobserve(target);
|
|
1915
|
+
} else if (observer.observe) {
|
|
1916
|
+
observer.disconnect();
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1887
1919
|
}
|
|
1888
1920
|
for (const target of targets) {
|
|
1889
|
-
!includes(prev, target)
|
|
1921
|
+
if (!includes(prev, target) || !observer.unobserve) {
|
|
1922
|
+
observer.observe(target, options);
|
|
1923
|
+
}
|
|
1890
1924
|
}
|
|
1891
1925
|
};
|
|
1892
1926
|
}
|
|
@@ -2153,26 +2187,26 @@
|
|
|
2153
2187
|
};
|
|
2154
2188
|
App.util = util;
|
|
2155
2189
|
App.options = {};
|
|
2156
|
-
App.version = "3.19.
|
|
2190
|
+
App.version = "3.19.5-dev.3a146179f";
|
|
2157
2191
|
|
|
2158
2192
|
const PREFIX = "uk-";
|
|
2159
2193
|
const DATA = "__uikit__";
|
|
2160
2194
|
const components$1 = {};
|
|
2161
2195
|
function component(name, options) {
|
|
2162
|
-
var _a;
|
|
2196
|
+
var _a, _b;
|
|
2163
2197
|
const id = PREFIX + hyphenate(name);
|
|
2164
2198
|
if (!options) {
|
|
2165
|
-
if (
|
|
2199
|
+
if (!components$1[id].options) {
|
|
2166
2200
|
components$1[id] = App.extend(components$1[id]);
|
|
2167
2201
|
}
|
|
2168
2202
|
return components$1[id];
|
|
2169
2203
|
}
|
|
2170
2204
|
name = camelize(name);
|
|
2171
2205
|
App[name] = (element, data) => createComponent(name, element, data);
|
|
2172
|
-
const opt =
|
|
2206
|
+
const opt = (_a = options.options) != null ? _a : { ...options };
|
|
2173
2207
|
opt.id = id;
|
|
2174
2208
|
opt.name = name;
|
|
2175
|
-
(
|
|
2209
|
+
(_b = opt.install) == null ? void 0 : _b.call(opt, App, opt, name);
|
|
2176
2210
|
if (App._initialized && !opt.functional) {
|
|
2177
2211
|
requestAnimationFrame(() => createComponent(name, `[${id}],[data-${id}]`));
|
|
2178
2212
|
}
|
|
@@ -2180,7 +2214,7 @@
|
|
|
2180
2214
|
}
|
|
2181
2215
|
function createComponent(name, element, data, ...args) {
|
|
2182
2216
|
const Component = component(name);
|
|
2183
|
-
return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ?
|
|
2217
|
+
return Component.options.functional ? new Component({ data: isPlainObject(element) ? element : [element, data, ...args] }) : element ? findAll(element).map(init)[0] : init();
|
|
2184
2218
|
function init(element2) {
|
|
2185
2219
|
const instance = getComponent(element2, name);
|
|
2186
2220
|
if (instance) {
|
|
@@ -2256,14 +2290,14 @@
|
|
|
2256
2290
|
if (name) {
|
|
2257
2291
|
if (hasAttr(target, attributeName)) {
|
|
2258
2292
|
createComponent(name, target);
|
|
2259
|
-
|
|
2293
|
+
} else {
|
|
2294
|
+
(_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
|
|
2260
2295
|
}
|
|
2261
|
-
(_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
|
|
2262
2296
|
}
|
|
2263
2297
|
}
|
|
2264
2298
|
function connect(node) {
|
|
2265
2299
|
const components2 = getComponents(node);
|
|
2266
|
-
for (const name in
|
|
2300
|
+
for (const name in components2) {
|
|
2267
2301
|
callConnected(components2[name]);
|
|
2268
2302
|
}
|
|
2269
2303
|
for (const attributeName of node.getAttributeNames()) {
|
|
@@ -2273,7 +2307,7 @@
|
|
|
2273
2307
|
}
|
|
2274
2308
|
function disconnect(node) {
|
|
2275
2309
|
const components2 = getComponents(node);
|
|
2276
|
-
for (const name in
|
|
2310
|
+
for (const name in components2) {
|
|
2277
2311
|
callDisconnected(components2[name]);
|
|
2278
2312
|
}
|
|
2279
2313
|
}
|
|
@@ -2282,7 +2316,7 @@
|
|
|
2282
2316
|
attribute = attribute.slice(5);
|
|
2283
2317
|
}
|
|
2284
2318
|
const cmp = components$1[attribute];
|
|
2285
|
-
return cmp && (
|
|
2319
|
+
return cmp && (cmp.options || cmp).name;
|
|
2286
2320
|
}
|
|
2287
2321
|
|
|
2288
2322
|
function globalApi(App) {
|
|
@@ -3253,10 +3287,6 @@
|
|
|
3253
3287
|
}
|
|
3254
3288
|
css(this.$el, this._style);
|
|
3255
3289
|
},
|
|
3256
|
-
observe: lazyload({
|
|
3257
|
-
target: ({ toggle, $el }) => query(toggle, $el),
|
|
3258
|
-
targets: ({ $el }) => $el
|
|
3259
|
-
}),
|
|
3260
3290
|
events: [
|
|
3261
3291
|
{
|
|
3262
3292
|
name: "click",
|
|
@@ -3547,7 +3577,8 @@
|
|
|
3547
3577
|
document,
|
|
3548
3578
|
`${pointerUp} ${pointerCancel} scroll`,
|
|
3549
3579
|
({ defaultPrevented, type, target: newTarget }) => {
|
|
3550
|
-
|
|
3580
|
+
var _a;
|
|
3581
|
+
if (!defaultPrevented && type === pointerUp && target === newTarget && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
|
|
3551
3582
|
drop.hide(false);
|
|
3552
3583
|
}
|
|
3553
3584
|
},
|
|
@@ -3945,10 +3976,10 @@
|
|
|
3945
3976
|
observe: [
|
|
3946
3977
|
mutation({
|
|
3947
3978
|
options: {
|
|
3948
|
-
childList: true,
|
|
3949
3979
|
attributes: true,
|
|
3950
3980
|
attributeFilter: ["style"]
|
|
3951
|
-
}
|
|
3981
|
+
},
|
|
3982
|
+
target: ({ $el }) => [$el, ...children($el)]
|
|
3952
3983
|
}),
|
|
3953
3984
|
resize({
|
|
3954
3985
|
target: ({ $el }) => [$el, ...children($el)]
|
|
@@ -4254,7 +4285,10 @@
|
|
|
4254
4285
|
target: ""
|
|
4255
4286
|
},
|
|
4256
4287
|
computed: {
|
|
4257
|
-
target:
|
|
4288
|
+
target: {
|
|
4289
|
+
get: ({ target }, $el) => query(target, $el),
|
|
4290
|
+
observe: (target) => parent(target)
|
|
4291
|
+
}
|
|
4258
4292
|
},
|
|
4259
4293
|
observe: resize({ target: ({ target }) => target }),
|
|
4260
4294
|
update: {
|
|
@@ -4310,7 +4344,7 @@
|
|
|
4310
4344
|
const top = offsetPosition(offsetTopEl)[0] - offsetPosition(scrollElement)[0];
|
|
4311
4345
|
minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : "";
|
|
4312
4346
|
} else {
|
|
4313
|
-
minHeight += ` - ${css(scrollElement, "
|
|
4347
|
+
minHeight += ` - ${boxModelAdjust(scrollElement, "height", css(scrollElement, "boxSizing"))}px`;
|
|
4314
4348
|
}
|
|
4315
4349
|
}
|
|
4316
4350
|
if (this.offsetBottom === true) {
|
|
@@ -4523,7 +4557,7 @@
|
|
|
4523
4557
|
i18n: { toggle: "Open Search", submit: "Submit Search" },
|
|
4524
4558
|
beforeConnect() {
|
|
4525
4559
|
const isToggle = hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle");
|
|
4526
|
-
this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") &&
|
|
4560
|
+
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;
|
|
4527
4561
|
if (hasAttr(this.$el, "aria-label")) {
|
|
4528
4562
|
return;
|
|
4529
4563
|
}
|
|
@@ -4667,13 +4701,13 @@
|
|
|
4667
4701
|
delete this.img;
|
|
4668
4702
|
},
|
|
4669
4703
|
observe: intersection({
|
|
4670
|
-
target: ({ $el, $props }) => [$el, ...queryAll($props.target, $el)],
|
|
4671
4704
|
handler(entries, observer) {
|
|
4672
4705
|
this.load();
|
|
4673
4706
|
observer.disconnect();
|
|
4674
4707
|
},
|
|
4675
4708
|
options: ({ margin }) => ({ rootMargin: margin }),
|
|
4676
|
-
filter: ({ loading }) => loading === "lazy"
|
|
4709
|
+
filter: ({ loading }) => loading === "lazy",
|
|
4710
|
+
target: ({ $el, $props }) => $props.target ? [$el, ...queryAll($props.target, $el)] : $el
|
|
4677
4711
|
}),
|
|
4678
4712
|
methods: {
|
|
4679
4713
|
load() {
|
|
@@ -4763,9 +4797,17 @@
|
|
|
4763
4797
|
selActive: false
|
|
4764
4798
|
},
|
|
4765
4799
|
computed: {
|
|
4766
|
-
target: ({ target }, $el) => target ? $$(target, $el) :
|
|
4800
|
+
target: ({ target }, $el) => target ? $$(target, $el) : $el
|
|
4767
4801
|
},
|
|
4768
4802
|
observe: [
|
|
4803
|
+
intersection({
|
|
4804
|
+
handler(entries) {
|
|
4805
|
+
this.isIntersecting = entries.some(({ isIntersecting }) => isIntersecting);
|
|
4806
|
+
this.$emit();
|
|
4807
|
+
},
|
|
4808
|
+
target: ({ target }) => target,
|
|
4809
|
+
args: { intersecting: false }
|
|
4810
|
+
}),
|
|
4769
4811
|
mutation({
|
|
4770
4812
|
target: ({ target }) => target,
|
|
4771
4813
|
options: { attributes: true, attributeFilter: ["class"], attributeOldValue: true }
|
|
@@ -4773,7 +4815,10 @@
|
|
|
4773
4815
|
{
|
|
4774
4816
|
target: ({ target }) => target,
|
|
4775
4817
|
observe: (target, handler) => {
|
|
4776
|
-
const observer = observeResize(
|
|
4818
|
+
const observer = observeResize(
|
|
4819
|
+
[...toNodes(target), document.documentElement],
|
|
4820
|
+
handler
|
|
4821
|
+
);
|
|
4777
4822
|
const listener = [
|
|
4778
4823
|
on(document, "scroll itemshown itemhidden", handler, {
|
|
4779
4824
|
passive: true,
|
|
@@ -4789,6 +4834,8 @@
|
|
|
4789
4834
|
})
|
|
4790
4835
|
];
|
|
4791
4836
|
return {
|
|
4837
|
+
observe: observer.observe.bind(observer),
|
|
4838
|
+
unobserve: observer.unobserve.bind(observer),
|
|
4792
4839
|
disconnect() {
|
|
4793
4840
|
observer.disconnect();
|
|
4794
4841
|
listener.map((off) => off());
|
|
@@ -4802,7 +4849,10 @@
|
|
|
4802
4849
|
],
|
|
4803
4850
|
update: {
|
|
4804
4851
|
read() {
|
|
4805
|
-
|
|
4852
|
+
if (!this.isIntersecting) {
|
|
4853
|
+
return false;
|
|
4854
|
+
}
|
|
4855
|
+
for (const target of toNodes(this.target)) {
|
|
4806
4856
|
replaceClass(
|
|
4807
4857
|
target,
|
|
4808
4858
|
"uk-light,uk-dark",
|
|
@@ -5169,10 +5219,11 @@
|
|
|
5169
5219
|
};
|
|
5170
5220
|
function install({ modal }) {
|
|
5171
5221
|
modal.dialog = function(content, options) {
|
|
5172
|
-
const dialog = modal(
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5222
|
+
const dialog = modal($(`<div><div class="uk-modal-dialog">${content}</div></div>`), {
|
|
5223
|
+
stack: true,
|
|
5224
|
+
role: "alertdialog",
|
|
5225
|
+
...options
|
|
5226
|
+
});
|
|
5176
5227
|
dialog.show();
|
|
5177
5228
|
on(
|
|
5178
5229
|
dialog.$el,
|
|
@@ -6084,18 +6135,10 @@
|
|
|
6084
6135
|
}
|
|
6085
6136
|
|
|
6086
6137
|
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
|
-
);
|
|
6138
|
+
return Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => {
|
|
6139
|
+
var _a;
|
|
6140
|
+
return (_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke);
|
|
6141
|
+
})));
|
|
6099
6142
|
}
|
|
6100
6143
|
|
|
6101
6144
|
var svg = {
|
|
@@ -6219,7 +6262,10 @@
|
|
|
6219
6262
|
swiping: true
|
|
6220
6263
|
},
|
|
6221
6264
|
computed: {
|
|
6222
|
-
connects:
|
|
6265
|
+
connects: {
|
|
6266
|
+
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
6267
|
+
observe: (connects) => parent(connects[0])
|
|
6268
|
+
},
|
|
6223
6269
|
connectChildren() {
|
|
6224
6270
|
return this.connects.map((el) => children(el)).flat();
|
|
6225
6271
|
},
|
|
@@ -6320,7 +6366,11 @@
|
|
|
6320
6366
|
],
|
|
6321
6367
|
update() {
|
|
6322
6368
|
var _a;
|
|
6323
|
-
|
|
6369
|
+
for (const el of this.connects) {
|
|
6370
|
+
if (isTag(el, "ul")) {
|
|
6371
|
+
attr(el, "role", "presentation");
|
|
6372
|
+
}
|
|
6373
|
+
}
|
|
6324
6374
|
attr(children(this.$el), "role", "presentation");
|
|
6325
6375
|
for (const index in this.toggles) {
|
|
6326
6376
|
const toggle = this.toggles[index];
|
|
@@ -6404,9 +6454,12 @@
|
|
|
6404
6454
|
queued: true
|
|
6405
6455
|
},
|
|
6406
6456
|
computed: {
|
|
6407
|
-
target
|
|
6408
|
-
|
|
6409
|
-
|
|
6457
|
+
target: {
|
|
6458
|
+
get: ({ target }, $el) => {
|
|
6459
|
+
target = queryAll(target || $el.hash, $el);
|
|
6460
|
+
return target.length ? target : [$el];
|
|
6461
|
+
},
|
|
6462
|
+
observe: (target) => parent(target[0])
|
|
6410
6463
|
}
|
|
6411
6464
|
},
|
|
6412
6465
|
connected() {
|
|
@@ -6419,7 +6472,7 @@
|
|
|
6419
6472
|
}
|
|
6420
6473
|
}
|
|
6421
6474
|
},
|
|
6422
|
-
observe: lazyload({
|
|
6475
|
+
observe: lazyload({ targets: ({ target }) => target }),
|
|
6423
6476
|
events: [
|
|
6424
6477
|
{
|
|
6425
6478
|
name: pointerDown,
|