uikit 3.16.11-dev.bde560a72 → 3.16.11-dev.cc1aeb568
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 +1 -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 +24 -28
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +85 -562
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +96 -574
- 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 +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +79 -72
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +79 -72
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +14 -18
- 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 +309 -336
- 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 +435 -464
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/computed.js +48 -1
- package/src/js/api/hooks.js +12 -8
- package/src/js/api/observer.js +23 -41
- package/src/js/api/options.js +1 -0
- package/src/js/api/update.js +21 -37
- package/src/js/api/watch.js +21 -24
- package/src/js/components/filter.js +23 -29
- package/src/js/components/lightbox.js +12 -14
- package/src/js/components/sortable.js +13 -19
- package/src/js/core/accordion.js +32 -45
- package/src/js/core/drop.js +1 -1
- package/src/js/core/dropnav.js +46 -60
- package/src/js/core/height-match.js +2 -8
- package/src/js/core/img.js +6 -5
- package/src/js/core/navbar.js +19 -32
- package/src/js/core/scrollspy-nav.js +10 -12
- package/src/js/core/scrollspy.js +16 -17
- package/src/js/core/switcher.js +29 -40
- package/src/js/core/toggle.js +3 -7
- package/src/js/{util → mixin/internal}/scroll.js +1 -5
- package/src/js/mixin/modal.js +1 -1
- package/src/js/mixin/slider-nav.js +80 -76
- package/src/js/mixin/slider.js +10 -8
- package/src/js/util/fastdom.js +2 -2
- package/tests/drop.html +0 -1
- package/tests/dropnav.html +1 -1
- package/tests/icon.html +0 -2
- package/tests/modal.html +0 -1
- package/tests/nav.html +0 -1
- package/tests/navbar.html +0 -1
- package/tests/progress.html +0 -1
- package/tests/scroll.html +0 -1
- package/tests/sticky-navbar.html +6 -6
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.11-dev.
|
|
1
|
+
/*! UIkit 3.16.11-dev.cc1aeb568 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -959,8 +959,8 @@
|
|
|
959
959
|
const fastdom = {
|
|
960
960
|
reads: [],
|
|
961
961
|
writes: [],
|
|
962
|
-
read(task
|
|
963
|
-
this.reads
|
|
962
|
+
read(task) {
|
|
963
|
+
this.reads.push(task);
|
|
964
964
|
scheduleFlush();
|
|
965
965
|
return task;
|
|
966
966
|
},
|
|
@@ -1666,114 +1666,60 @@
|
|
|
1666
1666
|
wrapInner: wrapInner
|
|
1667
1667
|
});
|
|
1668
1668
|
|
|
1669
|
-
function
|
|
1670
|
-
instance.
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
registerObservable(instance, observer);
|
|
1675
|
-
} else {
|
|
1676
|
-
for (const key in observer) {
|
|
1677
|
-
registerObservable(instance, observer[key], key);
|
|
1678
|
-
}
|
|
1669
|
+
function initWatches(instance) {
|
|
1670
|
+
instance._watches = [];
|
|
1671
|
+
for (const watches of instance.$options.watch || []) {
|
|
1672
|
+
for (const [name, watch] of Object.entries(watches)) {
|
|
1673
|
+
registerWatch(instance, watch, name);
|
|
1679
1674
|
}
|
|
1680
1675
|
}
|
|
1676
|
+
instance._initial = true;
|
|
1681
1677
|
}
|
|
1682
|
-
function
|
|
1683
|
-
instance.
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
observer == null ? void 0 : observer.disconnect();
|
|
1688
|
-
instance._observerUpdates.delete(observer);
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
function callObserverUpdates(instance) {
|
|
1692
|
-
for (const [observer, update] of instance._observerUpdates) {
|
|
1693
|
-
update(observer);
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
function registerObservable(instance, observable, key) {
|
|
1697
|
-
let {
|
|
1698
|
-
observe,
|
|
1699
|
-
target = instance.$el,
|
|
1700
|
-
handler,
|
|
1701
|
-
options,
|
|
1702
|
-
filter,
|
|
1703
|
-
args
|
|
1704
|
-
} = isPlainObject(observable) ? observable : { type: key, handler: observable };
|
|
1705
|
-
if (filter && !filter.call(instance, instance)) {
|
|
1706
|
-
return;
|
|
1707
|
-
}
|
|
1708
|
-
const targets = isFunction(target) ? target.call(instance, instance) : target;
|
|
1709
|
-
handler = isString(handler) ? instance[handler] : handler.bind(instance);
|
|
1710
|
-
if (isFunction(options)) {
|
|
1711
|
-
options = options.call(instance, instance);
|
|
1712
|
-
}
|
|
1713
|
-
const observer = observe(targets, handler, options, args);
|
|
1714
|
-
if (isFunction(target) && isArray(targets) && observer.unobserve) {
|
|
1715
|
-
instance._observerUpdates.set(observer, watchChange(instance, target, targets));
|
|
1716
|
-
}
|
|
1717
|
-
registerObserver(instance, observer);
|
|
1678
|
+
function registerWatch(instance, watch, name) {
|
|
1679
|
+
instance._watches.push({
|
|
1680
|
+
name,
|
|
1681
|
+
...isPlainObject(watch) ? watch : { handler: watch }
|
|
1682
|
+
});
|
|
1718
1683
|
}
|
|
1719
|
-
function
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
return;
|
|
1684
|
+
function runWatches(instance, values) {
|
|
1685
|
+
for (const { name, handler, immediate = true } of instance._watches) {
|
|
1686
|
+
if (instance._initial ? immediate : hasOwn(values, name) && !isEqual(values[name], instance[name])) {
|
|
1687
|
+
handler.call(instance, instance[name], instance._initial ? void 0 : values[name]);
|
|
1724
1688
|
}
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
targets.splice(0, targets.length, ...newTargets);
|
|
1728
|
-
};
|
|
1689
|
+
}
|
|
1690
|
+
instance._initial = false;
|
|
1729
1691
|
}
|
|
1730
1692
|
|
|
1731
|
-
function
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
}
|
|
1735
|
-
const initial = !hasOwn(instance, "_watch");
|
|
1736
|
-
instance._watch = fastdom.read(() => {
|
|
1737
|
-
if (instance._connected) {
|
|
1738
|
-
runWatches(instance, initial);
|
|
1739
|
-
}
|
|
1740
|
-
instance._watch = null;
|
|
1741
|
-
}, true);
|
|
1693
|
+
function initUpdates(instance) {
|
|
1694
|
+
instance._data = {};
|
|
1695
|
+
instance._updates = [...instance.$options.update || []];
|
|
1742
1696
|
}
|
|
1743
|
-
function
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
watch.call(instance, instance[key], initial ? void 0 : values[key]);
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
callObserverUpdates(instance);
|
|
1697
|
+
function prependUpdate(instance, update) {
|
|
1698
|
+
instance._updates.unshift(update);
|
|
1699
|
+
}
|
|
1700
|
+
function clearUpdateData(instance) {
|
|
1701
|
+
delete instance._data;
|
|
1752
1702
|
}
|
|
1753
|
-
|
|
1754
1703
|
function callUpdate(instance, e = "update") {
|
|
1755
1704
|
if (!instance._connected) {
|
|
1756
1705
|
return;
|
|
1757
1706
|
}
|
|
1758
|
-
if (
|
|
1759
|
-
callWatches(instance);
|
|
1760
|
-
}
|
|
1761
|
-
if (!instance.$options.update) {
|
|
1707
|
+
if (!instance._updates.length) {
|
|
1762
1708
|
return;
|
|
1763
1709
|
}
|
|
1764
|
-
if (!instance.
|
|
1765
|
-
instance.
|
|
1710
|
+
if (!instance._queued) {
|
|
1711
|
+
instance._queued = /* @__PURE__ */ new Set();
|
|
1766
1712
|
fastdom.read(() => {
|
|
1767
1713
|
if (instance._connected) {
|
|
1768
|
-
runUpdates(instance, instance.
|
|
1714
|
+
runUpdates(instance, instance._queued);
|
|
1769
1715
|
}
|
|
1770
|
-
delete instance.
|
|
1716
|
+
delete instance._queued;
|
|
1771
1717
|
});
|
|
1772
1718
|
}
|
|
1773
|
-
instance.
|
|
1719
|
+
instance._queued.add(e.type || e);
|
|
1774
1720
|
}
|
|
1775
1721
|
function runUpdates(instance, types) {
|
|
1776
|
-
for (const { read, write, events = [] } of instance
|
|
1722
|
+
for (const { read, write, events = [] } of instance._updates) {
|
|
1777
1723
|
if (!types.has("update") && !events.some((type) => types.has(type))) {
|
|
1778
1724
|
continue;
|
|
1779
1725
|
}
|
|
@@ -1793,23 +1739,72 @@
|
|
|
1793
1739
|
}
|
|
1794
1740
|
}
|
|
1795
1741
|
}
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1742
|
+
|
|
1743
|
+
function initComputed(instance) {
|
|
1744
|
+
const { computed } = instance.$options;
|
|
1745
|
+
instance._computed = {};
|
|
1746
|
+
if (computed) {
|
|
1747
|
+
for (const key in computed) {
|
|
1748
|
+
registerComputed(instance, key, computed[key]);
|
|
1749
|
+
}
|
|
1800
1750
|
}
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1751
|
+
}
|
|
1752
|
+
function registerComputed(instance, key, cb) {
|
|
1753
|
+
instance._hasComputed = true;
|
|
1754
|
+
Object.defineProperty(instance, key, {
|
|
1755
|
+
enumerable: true,
|
|
1756
|
+
get() {
|
|
1757
|
+
const { _computed, $props, $el } = instance;
|
|
1758
|
+
if (!hasOwn(_computed, key)) {
|
|
1759
|
+
_computed[key] = (cb.get || cb).call(instance, $props, $el);
|
|
1760
|
+
}
|
|
1761
|
+
return _computed[key];
|
|
1762
|
+
},
|
|
1763
|
+
set(value) {
|
|
1764
|
+
const { _computed } = instance;
|
|
1765
|
+
_computed[key] = cb.set ? cb.set.call(instance, value) : value;
|
|
1766
|
+
if (isUndefined(_computed[key])) {
|
|
1767
|
+
delete _computed[key];
|
|
1768
|
+
}
|
|
1805
1769
|
}
|
|
1770
|
+
});
|
|
1771
|
+
}
|
|
1772
|
+
function initComputedUpdates(instance) {
|
|
1773
|
+
if (!instance._hasComputed) {
|
|
1774
|
+
return;
|
|
1806
1775
|
}
|
|
1807
|
-
|
|
1808
|
-
|
|
1776
|
+
prependUpdate(instance, {
|
|
1777
|
+
read: () => runWatches(instance, resetComputed(instance)),
|
|
1778
|
+
events: ["resize", "computed"]
|
|
1779
|
+
});
|
|
1780
|
+
registerComputedObserver();
|
|
1781
|
+
instances$1.add(instance);
|
|
1782
|
+
}
|
|
1783
|
+
function disconnectComputedUpdates(instance) {
|
|
1784
|
+
instances$1 == null ? void 0 : instances$1.delete(instance);
|
|
1785
|
+
resetComputed(instance);
|
|
1786
|
+
}
|
|
1787
|
+
function resetComputed(instance) {
|
|
1788
|
+
const values = { ...instance._computed };
|
|
1789
|
+
instance._computed = {};
|
|
1790
|
+
return values;
|
|
1791
|
+
}
|
|
1792
|
+
let observer;
|
|
1793
|
+
let instances$1;
|
|
1794
|
+
function registerComputedObserver() {
|
|
1795
|
+
if (observer) {
|
|
1796
|
+
return;
|
|
1797
|
+
}
|
|
1798
|
+
instances$1 = /* @__PURE__ */ new Set();
|
|
1799
|
+
observer = new MutationObserver(() => {
|
|
1800
|
+
for (const instance of instances$1) {
|
|
1801
|
+
callUpdate(instance, "computed");
|
|
1802
|
+
}
|
|
1803
|
+
});
|
|
1804
|
+
observer.observe(document, {
|
|
1809
1805
|
childList: true,
|
|
1810
1806
|
subtree: true
|
|
1811
1807
|
});
|
|
1812
|
-
registerObserver(instance, observer);
|
|
1813
1808
|
}
|
|
1814
1809
|
|
|
1815
1810
|
function initEvents(instance) {
|
|
@@ -1849,8 +1844,59 @@
|
|
|
1849
1844
|
);
|
|
1850
1845
|
}
|
|
1851
1846
|
|
|
1847
|
+
function initObservers(instance) {
|
|
1848
|
+
instance._observers = [];
|
|
1849
|
+
for (const observer of instance.$options.observe || []) {
|
|
1850
|
+
if (hasOwn(observer, "handler")) {
|
|
1851
|
+
registerObservable(instance, observer);
|
|
1852
|
+
} else {
|
|
1853
|
+
for (const observable of observer) {
|
|
1854
|
+
registerObservable(instance, observable);
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
function registerObserver(instance, ...observer) {
|
|
1860
|
+
instance._observers.push(...observer);
|
|
1861
|
+
}
|
|
1862
|
+
function disconnectObservers(instance) {
|
|
1863
|
+
for (const observer of instance._observers) {
|
|
1864
|
+
observer.disconnect();
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
function registerObservable(instance, observable) {
|
|
1868
|
+
let { observe, target = instance.$el, handler, options, filter, args } = observable;
|
|
1869
|
+
if (filter && !filter.call(instance, instance)) {
|
|
1870
|
+
return;
|
|
1871
|
+
}
|
|
1872
|
+
const key = `_observe${instance._observers.length}`;
|
|
1873
|
+
if (isFunction(target) && !hasOwn(instance, key)) {
|
|
1874
|
+
registerComputed(instance, key, () => target.call(instance, instance));
|
|
1875
|
+
}
|
|
1876
|
+
handler = isString(handler) ? instance[handler] : handler.bind(instance);
|
|
1877
|
+
if (isFunction(options)) {
|
|
1878
|
+
options = options.call(instance, instance);
|
|
1879
|
+
}
|
|
1880
|
+
const targets = hasOwn(instance, key) ? instance[key] : target;
|
|
1881
|
+
const observer = observe(targets, handler, options, args);
|
|
1882
|
+
if (isFunction(target) && isArray(instance[key]) && observer.unobserve) {
|
|
1883
|
+
registerWatch(instance, { handler: updateTargets(observer), immediate: false }, key);
|
|
1884
|
+
}
|
|
1885
|
+
registerObserver(instance, observer);
|
|
1886
|
+
}
|
|
1887
|
+
function updateTargets(observer) {
|
|
1888
|
+
return (targets, prev) => {
|
|
1889
|
+
for (const target of prev) {
|
|
1890
|
+
!includes(targets, target) && observer.unobserve(target);
|
|
1891
|
+
}
|
|
1892
|
+
for (const target of targets) {
|
|
1893
|
+
!includes(prev, target) && observer.observe(target);
|
|
1894
|
+
}
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1852
1898
|
const strats = {};
|
|
1853
|
-
strats.events = strats.observe = strats.created = strats.beforeConnect = strats.connected = strats.beforeDisconnect = strats.disconnected = strats.destroy = concatStrat;
|
|
1899
|
+
strats.events = strats.watch = strats.observe = strats.created = strats.beforeConnect = strats.connected = strats.beforeDisconnect = strats.disconnected = strats.destroy = concatStrat;
|
|
1854
1900
|
strats.args = function(parentVal, childVal) {
|
|
1855
1901
|
return childVal !== false && concatStrat(childVal || parentVal);
|
|
1856
1902
|
};
|
|
@@ -2033,15 +2079,15 @@
|
|
|
2033
2079
|
if (instance._connected) {
|
|
2034
2080
|
return;
|
|
2035
2081
|
}
|
|
2036
|
-
instance._data = {};
|
|
2037
|
-
instance._computed = {};
|
|
2038
2082
|
initProps(instance);
|
|
2039
2083
|
callHook(instance, "beforeConnect");
|
|
2040
2084
|
instance._connected = true;
|
|
2041
2085
|
initEvents(instance);
|
|
2086
|
+
initUpdates(instance);
|
|
2087
|
+
initWatches(instance);
|
|
2042
2088
|
initObservers(instance);
|
|
2043
2089
|
initPropsObserver(instance);
|
|
2044
|
-
|
|
2090
|
+
initComputedUpdates(instance);
|
|
2045
2091
|
callHook(instance, "connected");
|
|
2046
2092
|
callUpdate(instance);
|
|
2047
2093
|
}
|
|
@@ -2050,40 +2096,12 @@
|
|
|
2050
2096
|
return;
|
|
2051
2097
|
}
|
|
2052
2098
|
callHook(instance, "beforeDisconnect");
|
|
2053
|
-
disconnectObservers(instance);
|
|
2054
2099
|
unbindEvents(instance);
|
|
2100
|
+
clearUpdateData(instance);
|
|
2101
|
+
disconnectObservers(instance);
|
|
2102
|
+
disconnectComputedUpdates(instance);
|
|
2055
2103
|
callHook(instance, "disconnected");
|
|
2056
2104
|
instance._connected = false;
|
|
2057
|
-
delete instance._watch;
|
|
2058
|
-
}
|
|
2059
|
-
|
|
2060
|
-
function initComputed(instance) {
|
|
2061
|
-
const { computed } = instance.$options;
|
|
2062
|
-
instance._computed = {};
|
|
2063
|
-
if (computed) {
|
|
2064
|
-
for (const key in computed) {
|
|
2065
|
-
registerComputed(instance, key, computed[key]);
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
function registerComputed(instance, key, cb) {
|
|
2070
|
-
Object.defineProperty(instance, key, {
|
|
2071
|
-
enumerable: true,
|
|
2072
|
-
get() {
|
|
2073
|
-
const { _computed, $props, $el } = instance;
|
|
2074
|
-
if (!hasOwn(_computed, key)) {
|
|
2075
|
-
_computed[key] = (cb.get || cb).call(instance, $props, $el);
|
|
2076
|
-
}
|
|
2077
|
-
return _computed[key];
|
|
2078
|
-
},
|
|
2079
|
-
set(value) {
|
|
2080
|
-
const { _computed } = instance;
|
|
2081
|
-
_computed[key] = cb.set ? cb.set.call(instance, value) : value;
|
|
2082
|
-
if (isUndefined(_computed[key])) {
|
|
2083
|
-
delete _computed[key];
|
|
2084
|
-
}
|
|
2085
|
-
}
|
|
2086
|
-
});
|
|
2087
2105
|
}
|
|
2088
2106
|
|
|
2089
2107
|
let uid = 0;
|
|
@@ -2140,7 +2158,7 @@
|
|
|
2140
2158
|
};
|
|
2141
2159
|
App.util = util;
|
|
2142
2160
|
App.options = {};
|
|
2143
|
-
App.version = "3.16.11-dev.
|
|
2161
|
+
App.version = "3.16.11-dev.cc1aeb568";
|
|
2144
2162
|
|
|
2145
2163
|
const PREFIX = "uk-";
|
|
2146
2164
|
const DATA = "__uikit__";
|
|
@@ -2686,52 +2704,41 @@
|
|
|
2686
2704
|
offset: 0
|
|
2687
2705
|
},
|
|
2688
2706
|
computed: {
|
|
2689
|
-
items
|
|
2690
|
-
|
|
2691
|
-
return $$(targets, $el);
|
|
2692
|
-
},
|
|
2693
|
-
watch(items, prev) {
|
|
2694
|
-
if (prev || hasClass(items, this.clsOpen)) {
|
|
2695
|
-
return;
|
|
2696
|
-
}
|
|
2697
|
-
const active = this.active !== false && items[Number(this.active)] || !this.collapsible && items[0];
|
|
2698
|
-
if (active) {
|
|
2699
|
-
this.toggle(active, false);
|
|
2700
|
-
}
|
|
2701
|
-
},
|
|
2702
|
-
immediate: true
|
|
2707
|
+
items({ targets }, $el) {
|
|
2708
|
+
return $$(targets, $el);
|
|
2703
2709
|
},
|
|
2704
|
-
toggles
|
|
2705
|
-
|
|
2706
|
-
return this.items.map((item) => $(toggle, item));
|
|
2707
|
-
},
|
|
2708
|
-
watch() {
|
|
2709
|
-
this.$emit();
|
|
2710
|
-
},
|
|
2711
|
-
immediate: true
|
|
2710
|
+
toggles({ toggle }) {
|
|
2711
|
+
return this.items.map((item) => $(toggle, item));
|
|
2712
2712
|
},
|
|
2713
|
-
contents
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2713
|
+
contents({ content }) {
|
|
2714
|
+
return this.items.map((item) => {
|
|
2715
|
+
var _a;
|
|
2716
|
+
return ((_a = item._wrapper) == null ? void 0 : _a.firstElementChild) || $(content, item);
|
|
2717
|
+
});
|
|
2718
|
+
}
|
|
2719
|
+
},
|
|
2720
|
+
watch: {
|
|
2721
|
+
items(items, prev) {
|
|
2722
|
+
if (prev || hasClass(items, this.clsOpen)) {
|
|
2723
|
+
return;
|
|
2724
|
+
}
|
|
2725
|
+
const active = this.active !== false && items[Number(this.active)] || !this.collapsible && items[0];
|
|
2726
|
+
if (active) {
|
|
2727
|
+
this.toggle(active, false);
|
|
2728
|
+
}
|
|
2729
|
+
},
|
|
2730
|
+
toggles() {
|
|
2731
|
+
this.$emit();
|
|
2732
|
+
},
|
|
2733
|
+
contents(items) {
|
|
2734
|
+
for (const el of items) {
|
|
2735
|
+
const isOpen = hasClass(
|
|
2736
|
+
this.items.find((item) => within(el, item)),
|
|
2737
|
+
this.clsOpen
|
|
2720
2738
|
);
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
hide(
|
|
2725
|
-
el,
|
|
2726
|
-
!hasClass(
|
|
2727
|
-
this.items.find((item) => within(el, item)),
|
|
2728
|
-
this.clsOpen
|
|
2729
|
-
)
|
|
2730
|
-
);
|
|
2731
|
-
}
|
|
2732
|
-
this.$emit();
|
|
2733
|
-
},
|
|
2734
|
-
immediate: true
|
|
2739
|
+
hide(el, !isOpen);
|
|
2740
|
+
}
|
|
2741
|
+
this.$emit();
|
|
2735
2742
|
}
|
|
2736
2743
|
},
|
|
2737
2744
|
observe: lazyload(),
|
|
@@ -3540,67 +3547,59 @@
|
|
|
3540
3547
|
dropbarAnchor({ dropbarAnchor }, $el) {
|
|
3541
3548
|
return query(dropbarAnchor, $el) || $el;
|
|
3542
3549
|
},
|
|
3543
|
-
dropbar
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
return dropbar ? dropbar : this._dropbar = $("<div></div>");
|
|
3550
|
-
},
|
|
3551
|
-
watch(dropbar) {
|
|
3552
|
-
addClass(
|
|
3553
|
-
dropbar,
|
|
3554
|
-
"uk-dropbar",
|
|
3555
|
-
"uk-dropbar-top",
|
|
3556
|
-
this.clsDropbar,
|
|
3557
|
-
`uk-${this.$options.name}-dropbar`
|
|
3558
|
-
);
|
|
3559
|
-
},
|
|
3560
|
-
immediate: true
|
|
3550
|
+
dropbar({ dropbar }) {
|
|
3551
|
+
if (!dropbar) {
|
|
3552
|
+
return null;
|
|
3553
|
+
}
|
|
3554
|
+
dropbar = this._dropbar || query(dropbar, this.$el) || $(`+ .${this.clsDropbar}`, this.$el);
|
|
3555
|
+
return dropbar ? dropbar : this._dropbar = $("<div></div>");
|
|
3561
3556
|
},
|
|
3562
3557
|
dropContainer(_, $el) {
|
|
3563
3558
|
return this.container || $el;
|
|
3564
3559
|
},
|
|
3565
|
-
dropdowns
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
dropdowns.push(el);
|
|
3574
|
-
}
|
|
3560
|
+
dropdowns({ clsDrop }, $el) {
|
|
3561
|
+
var _a;
|
|
3562
|
+
const dropdowns = $$(`.${clsDrop}`, $el);
|
|
3563
|
+
if (this.dropContainer !== $el) {
|
|
3564
|
+
for (const el of $$(`.${clsDrop}`, this.dropContainer)) {
|
|
3565
|
+
const target = (_a = this.getDropdown(el)) == null ? void 0 : _a.targetEl;
|
|
3566
|
+
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
3567
|
+
dropdowns.push(el);
|
|
3575
3568
|
}
|
|
3576
3569
|
}
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
watch(dropdowns) {
|
|
3580
|
-
this.$create(
|
|
3581
|
-
"drop",
|
|
3582
|
-
dropdowns.filter((el) => !this.getDropdown(el)),
|
|
3583
|
-
{
|
|
3584
|
-
...this.$props,
|
|
3585
|
-
flip: false,
|
|
3586
|
-
shift: true,
|
|
3587
|
-
pos: `bottom-${this.align}`,
|
|
3588
|
-
boundary: this.boundary === true ? this.$el : this.boundary
|
|
3589
|
-
}
|
|
3590
|
-
);
|
|
3591
|
-
},
|
|
3592
|
-
immediate: true
|
|
3570
|
+
}
|
|
3571
|
+
return dropdowns;
|
|
3593
3572
|
},
|
|
3594
|
-
items
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3573
|
+
items({ selNavItem }, $el) {
|
|
3574
|
+
return $$(selNavItem, $el);
|
|
3575
|
+
}
|
|
3576
|
+
},
|
|
3577
|
+
watch: {
|
|
3578
|
+
dropbar(dropbar) {
|
|
3579
|
+
addClass(
|
|
3580
|
+
dropbar,
|
|
3581
|
+
"uk-dropbar",
|
|
3582
|
+
"uk-dropbar-top",
|
|
3583
|
+
this.clsDropbar,
|
|
3584
|
+
`uk-${this.$options.name}-dropbar`
|
|
3585
|
+
);
|
|
3586
|
+
},
|
|
3587
|
+
dropdowns(dropdowns) {
|
|
3588
|
+
this.$create(
|
|
3589
|
+
"drop",
|
|
3590
|
+
dropdowns.filter((el) => !this.getDropdown(el)),
|
|
3591
|
+
{
|
|
3592
|
+
...this.$props,
|
|
3593
|
+
flip: false,
|
|
3594
|
+
shift: true,
|
|
3595
|
+
pos: `bottom-${this.align}`,
|
|
3596
|
+
boundary: this.boundary === true ? this.$el : this.boundary
|
|
3597
|
+
}
|
|
3598
|
+
);
|
|
3599
|
+
},
|
|
3600
|
+
items(items) {
|
|
3601
|
+
attr(items, "tabindex", -1);
|
|
3602
|
+
attr(items[0], "tabindex", 0);
|
|
3604
3603
|
}
|
|
3605
3604
|
},
|
|
3606
3605
|
disconnected() {
|
|
@@ -4114,13 +4113,8 @@
|
|
|
4114
4113
|
row: true
|
|
4115
4114
|
},
|
|
4116
4115
|
computed: {
|
|
4117
|
-
elements
|
|
4118
|
-
|
|
4119
|
-
return $$(target, $el);
|
|
4120
|
-
},
|
|
4121
|
-
watch() {
|
|
4122
|
-
this.$reset();
|
|
4123
|
-
}
|
|
4116
|
+
elements({ target }, $el) {
|
|
4117
|
+
return $$(target, $el);
|
|
4124
4118
|
}
|
|
4125
4119
|
},
|
|
4126
4120
|
observe: resize({
|
|
@@ -4643,9 +4637,10 @@
|
|
|
4643
4637
|
ensureSrcAttribute(this.$el);
|
|
4644
4638
|
},
|
|
4645
4639
|
disconnected() {
|
|
4646
|
-
if (this.
|
|
4647
|
-
this.
|
|
4640
|
+
if (this.img) {
|
|
4641
|
+
this.img.onload = "";
|
|
4648
4642
|
}
|
|
4643
|
+
delete this.img;
|
|
4649
4644
|
},
|
|
4650
4645
|
observe: intersection({
|
|
4651
4646
|
target: ({ $el, $props }) => [$el, ...queryAll($props.target, $el)],
|
|
@@ -4658,13 +4653,13 @@
|
|
|
4658
4653
|
}),
|
|
4659
4654
|
methods: {
|
|
4660
4655
|
load() {
|
|
4661
|
-
if (this.
|
|
4662
|
-
return this.
|
|
4656
|
+
if (this.img) {
|
|
4657
|
+
return this.img;
|
|
4663
4658
|
}
|
|
4664
4659
|
const image = isImg(this.$el) ? this.$el : getImageFromElement(this.$el, this.dataSrc, this.sources);
|
|
4665
4660
|
removeAttr(image, "loading");
|
|
4666
4661
|
setSrcAttrs(this.$el, image.currentSrc);
|
|
4667
|
-
return this.
|
|
4662
|
+
return this.img = image;
|
|
4668
4663
|
}
|
|
4669
4664
|
}
|
|
4670
4665
|
};
|
|
@@ -5144,32 +5139,22 @@
|
|
|
5144
5139
|
selNavItem: ".uk-navbar-nav > li > a,a.uk-navbar-item,button.uk-navbar-item,.uk-navbar-item a,.uk-navbar-item button,.uk-navbar-toggle"
|
|
5145
5140
|
// Simplify with :where() selector once browser target is Safari 14+
|
|
5146
5141
|
},
|
|
5147
|
-
|
|
5148
|
-
items
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
container
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
container
|
|
5164
|
-
).length : ""
|
|
5165
|
-
);
|
|
5166
|
-
}
|
|
5167
|
-
attr($$(".uk-navbar-nav", this.$el), "role", "group");
|
|
5168
|
-
attr($$(".uk-navbar-nav > *", this.$el), "role", "presentation");
|
|
5169
|
-
attr(items, "tabindex", -1);
|
|
5170
|
-
attr(items[0], "tabindex", 0);
|
|
5171
|
-
},
|
|
5172
|
-
immediate: true
|
|
5142
|
+
watch: {
|
|
5143
|
+
items() {
|
|
5144
|
+
const justify = hasClass(this.$el, "uk-navbar-justify");
|
|
5145
|
+
for (const container of $$(
|
|
5146
|
+
".uk-navbar-nav, .uk-navbar-left, .uk-navbar-right",
|
|
5147
|
+
this.$el
|
|
5148
|
+
)) {
|
|
5149
|
+
css(
|
|
5150
|
+
container,
|
|
5151
|
+
"flexGrow",
|
|
5152
|
+
justify ? $$(
|
|
5153
|
+
".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle",
|
|
5154
|
+
container
|
|
5155
|
+
).length : ""
|
|
5156
|
+
);
|
|
5157
|
+
}
|
|
5173
5158
|
}
|
|
5174
5159
|
}
|
|
5175
5160
|
};
|
|
@@ -5447,30 +5432,30 @@
|
|
|
5447
5432
|
inViewClass: "uk-scrollspy-inview"
|
|
5448
5433
|
}),
|
|
5449
5434
|
computed: {
|
|
5450
|
-
elements
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
}
|
|
5458
|
-
}
|
|
5459
|
-
immediate: true
|
|
5435
|
+
elements({ target }, $el) {
|
|
5436
|
+
return target ? $$(target, $el) : [$el];
|
|
5437
|
+
}
|
|
5438
|
+
},
|
|
5439
|
+
watch: {
|
|
5440
|
+
elements(elements) {
|
|
5441
|
+
if (this.hidden) {
|
|
5442
|
+
css(filter(elements, `:not(.${this.inViewClass})`), "opacity", 0);
|
|
5443
|
+
}
|
|
5460
5444
|
}
|
|
5461
5445
|
},
|
|
5462
5446
|
connected() {
|
|
5463
|
-
this.
|
|
5447
|
+
this.elementData = /* @__PURE__ */ new Map();
|
|
5464
5448
|
},
|
|
5465
5449
|
disconnected() {
|
|
5466
|
-
for (const [el, state] of this.
|
|
5450
|
+
for (const [el, state] of this.elementData.entries()) {
|
|
5467
5451
|
removeClass(el, this.inViewClass, (state == null ? void 0 : state.cls) || "");
|
|
5468
5452
|
}
|
|
5453
|
+
delete this.elementData;
|
|
5469
5454
|
},
|
|
5470
5455
|
observe: intersection({
|
|
5471
5456
|
target: ({ elements }) => elements,
|
|
5472
5457
|
handler(records) {
|
|
5473
|
-
const elements = this.
|
|
5458
|
+
const elements = this.elementData;
|
|
5474
5459
|
for (const { target: el, isIntersecting } of records) {
|
|
5475
5460
|
if (!elements.has(el)) {
|
|
5476
5461
|
elements.set(el, {
|
|
@@ -5491,7 +5476,7 @@
|
|
|
5491
5476
|
update: [
|
|
5492
5477
|
{
|
|
5493
5478
|
write(data) {
|
|
5494
|
-
for (const [el, state] of
|
|
5479
|
+
for (const [el, state] of this.elementData.entries()) {
|
|
5495
5480
|
if (state.show && !state.inview && !state.queued) {
|
|
5496
5481
|
state.queued = true;
|
|
5497
5482
|
data.promise = (data.promise || Promise.resolve()).then(() => new Promise((resolve) => setTimeout(resolve, this.delay))).then(() => {
|
|
@@ -5511,7 +5496,7 @@
|
|
|
5511
5496
|
methods: {
|
|
5512
5497
|
toggle(el, inview) {
|
|
5513
5498
|
var _a;
|
|
5514
|
-
const state = this.
|
|
5499
|
+
const state = this.elementData.get(el);
|
|
5515
5500
|
if (!state) {
|
|
5516
5501
|
return;
|
|
5517
5502
|
}
|
|
@@ -5550,21 +5535,20 @@
|
|
|
5550
5535
|
offset: 0
|
|
5551
5536
|
},
|
|
5552
5537
|
computed: {
|
|
5553
|
-
links
|
|
5554
|
-
|
|
5555
|
-
return $$('a[href*="#"]', $el).filter((el) => el.hash && isSameSiteAnchor(el));
|
|
5556
|
-
},
|
|
5557
|
-
watch(links) {
|
|
5558
|
-
if (this.scroll) {
|
|
5559
|
-
this.$create("scroll", links, { offset: this.offset || 0 });
|
|
5560
|
-
}
|
|
5561
|
-
},
|
|
5562
|
-
immediate: true
|
|
5538
|
+
links(_, $el) {
|
|
5539
|
+
return $$('a[href*="#"]', $el).filter((el) => el.hash && isSameSiteAnchor(el));
|
|
5563
5540
|
},
|
|
5564
5541
|
elements({ closest: selector }) {
|
|
5565
5542
|
return closest(this.links, selector || "*");
|
|
5566
5543
|
}
|
|
5567
5544
|
},
|
|
5545
|
+
watch: {
|
|
5546
|
+
links(links) {
|
|
5547
|
+
if (this.scroll) {
|
|
5548
|
+
this.$create("scroll", links, { offset: this.offset || 0 });
|
|
5549
|
+
}
|
|
5550
|
+
}
|
|
5551
|
+
},
|
|
5568
5552
|
observe: scroll$1(),
|
|
5569
5553
|
update: [
|
|
5570
5554
|
{
|
|
@@ -5987,42 +5971,14 @@
|
|
|
5987
5971
|
swiping: true
|
|
5988
5972
|
},
|
|
5989
5973
|
computed: {
|
|
5990
|
-
connects
|
|
5991
|
-
|
|
5992
|
-
return queryAll(connect, $el);
|
|
5993
|
-
},
|
|
5994
|
-
watch(connects) {
|
|
5995
|
-
if (this.swiping) {
|
|
5996
|
-
css(connects, "touchAction", "pan-y pinch-zoom");
|
|
5997
|
-
}
|
|
5998
|
-
this.$emit();
|
|
5999
|
-
},
|
|
6000
|
-
document: true,
|
|
6001
|
-
immediate: true
|
|
5974
|
+
connects({ connect }, $el) {
|
|
5975
|
+
return queryAll(connect, $el);
|
|
6002
5976
|
},
|
|
6003
|
-
connectChildren
|
|
6004
|
-
|
|
6005
|
-
return this.connects.map((el) => children(el)).flat();
|
|
6006
|
-
},
|
|
6007
|
-
watch() {
|
|
6008
|
-
const index = this.index();
|
|
6009
|
-
for (const el of this.connects) {
|
|
6010
|
-
children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));
|
|
6011
|
-
}
|
|
6012
|
-
this.$emit();
|
|
6013
|
-
},
|
|
6014
|
-
immediate: true
|
|
5977
|
+
connectChildren() {
|
|
5978
|
+
return this.connects.map((el) => children(el)).flat();
|
|
6015
5979
|
},
|
|
6016
|
-
toggles
|
|
6017
|
-
|
|
6018
|
-
return $$(toggle, $el);
|
|
6019
|
-
},
|
|
6020
|
-
watch(toggles) {
|
|
6021
|
-
this.$emit();
|
|
6022
|
-
const active = this.index();
|
|
6023
|
-
this.show(~active ? active : toggles[this.active] || toggles[0]);
|
|
6024
|
-
},
|
|
6025
|
-
immediate: true
|
|
5980
|
+
toggles({ toggle }, $el) {
|
|
5981
|
+
return $$(toggle, $el);
|
|
6026
5982
|
},
|
|
6027
5983
|
children() {
|
|
6028
5984
|
return children(this.$el).filter(
|
|
@@ -6030,6 +5986,26 @@
|
|
|
6030
5986
|
);
|
|
6031
5987
|
}
|
|
6032
5988
|
},
|
|
5989
|
+
watch: {
|
|
5990
|
+
connects(connects) {
|
|
5991
|
+
if (this.swiping) {
|
|
5992
|
+
css(connects, "touchAction", "pan-y pinch-zoom");
|
|
5993
|
+
}
|
|
5994
|
+
this.$emit();
|
|
5995
|
+
},
|
|
5996
|
+
connectChildren() {
|
|
5997
|
+
const index = this.index();
|
|
5998
|
+
for (const el of this.connects) {
|
|
5999
|
+
children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));
|
|
6000
|
+
}
|
|
6001
|
+
this.$emit();
|
|
6002
|
+
},
|
|
6003
|
+
toggles(toggles) {
|
|
6004
|
+
this.$emit();
|
|
6005
|
+
const active = this.index();
|
|
6006
|
+
this.show(~active ? active : toggles[this.active] || toggles[0]);
|
|
6007
|
+
}
|
|
6008
|
+
},
|
|
6033
6009
|
connected() {
|
|
6034
6010
|
attr(this.$el, "role", "tablist");
|
|
6035
6011
|
},
|
|
@@ -6185,12 +6161,9 @@
|
|
|
6185
6161
|
queued: true
|
|
6186
6162
|
},
|
|
6187
6163
|
computed: {
|
|
6188
|
-
target
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
return target.length && target || [$el];
|
|
6192
|
-
},
|
|
6193
|
-
document: true
|
|
6164
|
+
target({ href, target }, $el) {
|
|
6165
|
+
target = queryAll(target || href, $el);
|
|
6166
|
+
return target.length && target || [$el];
|
|
6194
6167
|
}
|
|
6195
6168
|
},
|
|
6196
6169
|
connected() {
|