uikit 3.19.5-dev.8210c3e08 → 3.19.5-dev.97cca0902
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 +1 -1
- 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 +10 -5
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +11 -6
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +11 -7
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +11 -6
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +11 -6
- 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 +76 -59
- 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 +79 -62
- 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 +1 -1
- 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 +13 -6
- package/src/js/core/switcher.js +5 -1
- package/src/js/core/toggle.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 +8 -4
- package/src/less/components/utility.less +1 -1
- package/src/scss/components/utility.scss +1 -1
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.19.5-dev.
|
|
1
|
+
/*! UIkit 3.19.5-dev.97cca0902 | 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)) {
|
|
@@ -374,10 +367,11 @@
|
|
|
374
367
|
const splitSelectorRe = /.*?[^\\](?![^(]*\))(?:,|$)/g;
|
|
375
368
|
const trailingCommaRe = /\s*,$/;
|
|
376
369
|
const parseSelector = memoize((selector) => {
|
|
370
|
+
var _a;
|
|
377
371
|
selector = selector.replace(addStarRe, "$1 *");
|
|
378
372
|
let isContextSelector = false;
|
|
379
373
|
const selectors = [];
|
|
380
|
-
for (let sel of selector.match(splitSelectorRe)) {
|
|
374
|
+
for (let sel of (_a = selector.match(splitSelectorRe)) != null ? _a : []) {
|
|
381
375
|
sel = sel.replace(trailingCommaRe, "").trim();
|
|
382
376
|
if (sel[0] === ">") {
|
|
383
377
|
sel = `:scope ${sel}`;
|
|
@@ -405,7 +399,7 @@
|
|
|
405
399
|
let ctx = context;
|
|
406
400
|
if (sel[0] === "!") {
|
|
407
401
|
const selectors = sel.substr(1).trim().split(" ");
|
|
408
|
-
ctx =
|
|
402
|
+
ctx = context.parentElement.closest(selectors[0]);
|
|
409
403
|
sel = selectors.slice(1).join(" ").trim();
|
|
410
404
|
if (!sel.length && isSingle) {
|
|
411
405
|
return ctx;
|
|
@@ -420,7 +414,11 @@
|
|
|
420
414
|
return ctx;
|
|
421
415
|
}
|
|
422
416
|
} else if (sel[0] === "~" || sel[0] === "+" && isSingle) {
|
|
423
|
-
return _doQuery(
|
|
417
|
+
return _doQuery(
|
|
418
|
+
ctx.parentElement,
|
|
419
|
+
queryFn,
|
|
420
|
+
`:scope :nth-child(${index(ctx) + 1}) ${sel}`
|
|
421
|
+
);
|
|
424
422
|
}
|
|
425
423
|
if (ctx) {
|
|
426
424
|
selector += `${selector ? "," : ""}${domPath(ctx)} ${sel}`;
|
|
@@ -1562,7 +1560,6 @@
|
|
|
1562
1560
|
camelize: camelize,
|
|
1563
1561
|
children: children,
|
|
1564
1562
|
clamp: clamp,
|
|
1565
|
-
closest: closest,
|
|
1566
1563
|
createEvent: createEvent,
|
|
1567
1564
|
css: css,
|
|
1568
1565
|
data: data,
|
|
@@ -1683,7 +1680,6 @@
|
|
|
1683
1680
|
uniqueBy: uniqueBy,
|
|
1684
1681
|
unwrap: unwrap,
|
|
1685
1682
|
width: width,
|
|
1686
|
-
within: within,
|
|
1687
1683
|
wrapAll: wrapAll,
|
|
1688
1684
|
wrapInner: wrapInner
|
|
1689
1685
|
});
|
|
@@ -1771,6 +1767,7 @@
|
|
|
1771
1767
|
}
|
|
1772
1768
|
}
|
|
1773
1769
|
}
|
|
1770
|
+
const mutationOptions = { subtree: true, childList: true };
|
|
1774
1771
|
function registerComputed(instance, key, cb) {
|
|
1775
1772
|
instance._hasComputed = true;
|
|
1776
1773
|
Object.defineProperty(instance, key, {
|
|
@@ -1779,6 +1776,15 @@
|
|
|
1779
1776
|
const { _computed, $props, $el } = instance;
|
|
1780
1777
|
if (!hasOwn(_computed, key)) {
|
|
1781
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
|
+
}
|
|
1782
1788
|
}
|
|
1783
1789
|
return _computed[key];
|
|
1784
1790
|
},
|
|
@@ -1799,11 +1805,16 @@
|
|
|
1799
1805
|
read: () => runWatches(instance, resetComputed(instance)),
|
|
1800
1806
|
events: ["resize", "computed"]
|
|
1801
1807
|
});
|
|
1802
|
-
|
|
1803
|
-
|
|
1808
|
+
instance._computedObserver = observeMutation(
|
|
1809
|
+
instance.$el,
|
|
1810
|
+
() => callUpdate(instance, "computed"),
|
|
1811
|
+
mutationOptions
|
|
1812
|
+
);
|
|
1804
1813
|
}
|
|
1805
1814
|
function disconnectComputedUpdates(instance) {
|
|
1806
|
-
|
|
1815
|
+
var _a;
|
|
1816
|
+
(_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
|
|
1817
|
+
delete instance._computedObserver;
|
|
1807
1818
|
resetComputed(instance);
|
|
1808
1819
|
}
|
|
1809
1820
|
function resetComputed(instance) {
|
|
@@ -1811,22 +1822,11 @@
|
|
|
1811
1822
|
instance._computed = {};
|
|
1812
1823
|
return values;
|
|
1813
1824
|
}
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
if (observer) {
|
|
1818
|
-
return;
|
|
1825
|
+
function findClosestCommonParent(el1, el2) {
|
|
1826
|
+
while (el1 && !el1.contains(el2)) {
|
|
1827
|
+
el1 = el1.parentNode;
|
|
1819
1828
|
}
|
|
1820
|
-
|
|
1821
|
-
observer = new MutationObserver(() => {
|
|
1822
|
-
for (const instance of instances$1) {
|
|
1823
|
-
callUpdate(instance, "computed");
|
|
1824
|
-
}
|
|
1825
|
-
});
|
|
1826
|
-
observer.observe(document, {
|
|
1827
|
-
subtree: true,
|
|
1828
|
-
childList: true
|
|
1829
|
-
});
|
|
1829
|
+
return el1;
|
|
1830
1830
|
}
|
|
1831
1831
|
|
|
1832
1832
|
function initEvents(instance) {
|
|
@@ -1912,7 +1912,7 @@
|
|
|
1912
1912
|
if (!includes(targets, target)) {
|
|
1913
1913
|
if (observer.unobserve) {
|
|
1914
1914
|
observer.unobserve(target);
|
|
1915
|
-
} else {
|
|
1915
|
+
} else if (observer.observe) {
|
|
1916
1916
|
observer.disconnect();
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
@@ -2187,26 +2187,26 @@
|
|
|
2187
2187
|
};
|
|
2188
2188
|
App.util = util;
|
|
2189
2189
|
App.options = {};
|
|
2190
|
-
App.version = "3.19.5-dev.
|
|
2190
|
+
App.version = "3.19.5-dev.97cca0902";
|
|
2191
2191
|
|
|
2192
2192
|
const PREFIX = "uk-";
|
|
2193
2193
|
const DATA = "__uikit__";
|
|
2194
2194
|
const components$1 = {};
|
|
2195
2195
|
function component(name, options) {
|
|
2196
|
-
var _a;
|
|
2196
|
+
var _a, _b;
|
|
2197
2197
|
const id = PREFIX + hyphenate(name);
|
|
2198
2198
|
if (!options) {
|
|
2199
|
-
if (
|
|
2199
|
+
if (!components$1[id].options) {
|
|
2200
2200
|
components$1[id] = App.extend(components$1[id]);
|
|
2201
2201
|
}
|
|
2202
2202
|
return components$1[id];
|
|
2203
2203
|
}
|
|
2204
2204
|
name = camelize(name);
|
|
2205
2205
|
App[name] = (element, data) => createComponent(name, element, data);
|
|
2206
|
-
const opt =
|
|
2206
|
+
const opt = (_a = options.options) != null ? _a : { ...options };
|
|
2207
2207
|
opt.id = id;
|
|
2208
2208
|
opt.name = name;
|
|
2209
|
-
(
|
|
2209
|
+
(_b = opt.install) == null ? void 0 : _b.call(opt, App, opt, name);
|
|
2210
2210
|
if (App._initialized && !opt.functional) {
|
|
2211
2211
|
requestAnimationFrame(() => createComponent(name, `[${id}],[data-${id}]`));
|
|
2212
2212
|
}
|
|
@@ -2214,7 +2214,7 @@
|
|
|
2214
2214
|
}
|
|
2215
2215
|
function createComponent(name, element, data, ...args) {
|
|
2216
2216
|
const Component = component(name);
|
|
2217
|
-
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();
|
|
2218
2218
|
function init(element2) {
|
|
2219
2219
|
const instance = getComponent(element2, name);
|
|
2220
2220
|
if (instance) {
|
|
@@ -2290,14 +2290,14 @@
|
|
|
2290
2290
|
if (name) {
|
|
2291
2291
|
if (hasAttr(target, attributeName)) {
|
|
2292
2292
|
createComponent(name, target);
|
|
2293
|
-
|
|
2293
|
+
} else {
|
|
2294
|
+
(_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
|
|
2294
2295
|
}
|
|
2295
|
-
(_a = getComponent(target, name)) == null ? void 0 : _a.$destroy();
|
|
2296
2296
|
}
|
|
2297
2297
|
}
|
|
2298
2298
|
function connect(node) {
|
|
2299
2299
|
const components2 = getComponents(node);
|
|
2300
|
-
for (const name in
|
|
2300
|
+
for (const name in components2) {
|
|
2301
2301
|
callConnected(components2[name]);
|
|
2302
2302
|
}
|
|
2303
2303
|
for (const attributeName of node.getAttributeNames()) {
|
|
@@ -2307,7 +2307,7 @@
|
|
|
2307
2307
|
}
|
|
2308
2308
|
function disconnect(node) {
|
|
2309
2309
|
const components2 = getComponents(node);
|
|
2310
|
-
for (const name in
|
|
2310
|
+
for (const name in components2) {
|
|
2311
2311
|
callDisconnected(components2[name]);
|
|
2312
2312
|
}
|
|
2313
2313
|
}
|
|
@@ -2316,7 +2316,7 @@
|
|
|
2316
2316
|
attribute = attribute.slice(5);
|
|
2317
2317
|
}
|
|
2318
2318
|
const cmp = components$1[attribute];
|
|
2319
|
-
return cmp && (
|
|
2319
|
+
return cmp && (cmp.options || cmp).name;
|
|
2320
2320
|
}
|
|
2321
2321
|
|
|
2322
2322
|
function globalApi(App) {
|
|
@@ -3577,7 +3577,8 @@
|
|
|
3577
3577
|
document,
|
|
3578
3578
|
`${pointerUp} ${pointerCancel} scroll`,
|
|
3579
3579
|
({ defaultPrevented, type, target: newTarget }) => {
|
|
3580
|
-
|
|
3580
|
+
var _a;
|
|
3581
|
+
if (!defaultPrevented && type === pointerUp && target === newTarget && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
|
|
3581
3582
|
drop.hide(false);
|
|
3582
3583
|
}
|
|
3583
3584
|
},
|
|
@@ -4284,7 +4285,10 @@
|
|
|
4284
4285
|
target: ""
|
|
4285
4286
|
},
|
|
4286
4287
|
computed: {
|
|
4287
|
-
target:
|
|
4288
|
+
target: {
|
|
4289
|
+
get: ({ target }, $el) => query(target, $el),
|
|
4290
|
+
observe: (target) => parent(target)
|
|
4291
|
+
}
|
|
4288
4292
|
},
|
|
4289
4293
|
observe: resize({ target: ({ target }) => target }),
|
|
4290
4294
|
update: {
|
|
@@ -4340,7 +4344,7 @@
|
|
|
4340
4344
|
const top = offsetPosition(offsetTopEl)[0] - offsetPosition(scrollElement)[0];
|
|
4341
4345
|
minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : "";
|
|
4342
4346
|
} else {
|
|
4343
|
-
minHeight += ` - ${css(scrollElement, "
|
|
4347
|
+
minHeight += ` - ${boxModelAdjust(scrollElement, "height", css(scrollElement, "boxSizing"))}px`;
|
|
4344
4348
|
}
|
|
4345
4349
|
}
|
|
4346
4350
|
if (this.offsetBottom === true) {
|
|
@@ -4553,7 +4557,7 @@
|
|
|
4553
4557
|
i18n: { toggle: "Open Search", submit: "Submit Search" },
|
|
4554
4558
|
beforeConnect() {
|
|
4555
4559
|
const isToggle = hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle");
|
|
4556
|
-
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;
|
|
4557
4561
|
if (hasAttr(this.$el, "aria-label")) {
|
|
4558
4562
|
return;
|
|
4559
4563
|
}
|
|
@@ -4697,13 +4701,13 @@
|
|
|
4697
4701
|
delete this.img;
|
|
4698
4702
|
},
|
|
4699
4703
|
observe: intersection({
|
|
4700
|
-
target: ({ $el, $props }) => [$el, ...queryAll($props.target, $el)],
|
|
4701
4704
|
handler(entries, observer) {
|
|
4702
4705
|
this.load();
|
|
4703
4706
|
observer.disconnect();
|
|
4704
4707
|
},
|
|
4705
4708
|
options: ({ margin }) => ({ rootMargin: margin }),
|
|
4706
|
-
filter: ({ loading }) => loading === "lazy"
|
|
4709
|
+
filter: ({ loading }) => loading === "lazy",
|
|
4710
|
+
target: ({ $el, $props }) => $props.target ? [$el, ...queryAll($props.target, $el)] : $el
|
|
4707
4711
|
}),
|
|
4708
4712
|
methods: {
|
|
4709
4713
|
load() {
|
|
@@ -4793,13 +4797,15 @@
|
|
|
4793
4797
|
selActive: false
|
|
4794
4798
|
},
|
|
4795
4799
|
computed: {
|
|
4796
|
-
target: ({ target }, $el) => target ? $$(target, $el) :
|
|
4800
|
+
target: ({ target }, $el) => target ? $$(target, $el) : $el
|
|
4797
4801
|
},
|
|
4798
4802
|
observe: [
|
|
4799
4803
|
intersection({
|
|
4800
|
-
handler(
|
|
4801
|
-
this.isIntersecting = isIntersecting;
|
|
4804
|
+
handler(entries) {
|
|
4805
|
+
this.isIntersecting = entries.some(({ isIntersecting }) => isIntersecting);
|
|
4806
|
+
this.$emit();
|
|
4802
4807
|
},
|
|
4808
|
+
target: ({ target }) => target,
|
|
4803
4809
|
args: { intersecting: false }
|
|
4804
4810
|
}),
|
|
4805
4811
|
mutation({
|
|
@@ -4809,7 +4815,10 @@
|
|
|
4809
4815
|
{
|
|
4810
4816
|
target: ({ target }) => target,
|
|
4811
4817
|
observe: (target, handler) => {
|
|
4812
|
-
const observer = observeResize(
|
|
4818
|
+
const observer = observeResize(
|
|
4819
|
+
[...toNodes(target), document.documentElement],
|
|
4820
|
+
handler
|
|
4821
|
+
);
|
|
4813
4822
|
const listener = [
|
|
4814
4823
|
on(document, "scroll itemshown itemhidden", handler, {
|
|
4815
4824
|
passive: true,
|
|
@@ -4825,6 +4834,8 @@
|
|
|
4825
4834
|
})
|
|
4826
4835
|
];
|
|
4827
4836
|
return {
|
|
4837
|
+
observe: observer.observe.bind(observer),
|
|
4838
|
+
unobserve: observer.unobserve.bind(observer),
|
|
4828
4839
|
disconnect() {
|
|
4829
4840
|
observer.disconnect();
|
|
4830
4841
|
listener.map((off) => off());
|
|
@@ -4841,7 +4852,7 @@
|
|
|
4841
4852
|
if (!this.isIntersecting) {
|
|
4842
4853
|
return false;
|
|
4843
4854
|
}
|
|
4844
|
-
for (const target of this.target) {
|
|
4855
|
+
for (const target of toNodes(this.target)) {
|
|
4845
4856
|
replaceClass(
|
|
4846
4857
|
target,
|
|
4847
4858
|
"uk-light,uk-dark",
|
|
@@ -6250,7 +6261,10 @@
|
|
|
6250
6261
|
swiping: true
|
|
6251
6262
|
},
|
|
6252
6263
|
computed: {
|
|
6253
|
-
connects:
|
|
6264
|
+
connects: {
|
|
6265
|
+
get: ({ connect }, $el) => queryAll(connect, $el),
|
|
6266
|
+
observe: (connects) => parent(connects[0])
|
|
6267
|
+
},
|
|
6254
6268
|
connectChildren() {
|
|
6255
6269
|
return this.connects.map((el) => children(el)).flat();
|
|
6256
6270
|
},
|
|
@@ -6439,9 +6453,12 @@
|
|
|
6439
6453
|
queued: true
|
|
6440
6454
|
},
|
|
6441
6455
|
computed: {
|
|
6442
|
-
target
|
|
6443
|
-
|
|
6444
|
-
|
|
6456
|
+
target: {
|
|
6457
|
+
get: ({ target }, $el) => {
|
|
6458
|
+
target = queryAll(target || $el.hash, $el);
|
|
6459
|
+
return target.length ? target : [$el];
|
|
6460
|
+
},
|
|
6461
|
+
observe: (target) => parent(target[0])
|
|
6445
6462
|
}
|
|
6446
6463
|
},
|
|
6447
6464
|
connected() {
|