uikit 3.16.10 → 3.16.11-dev.55a0fc5b5
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 +7 -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 +79 -72
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +90 -84
- 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 +256 -279
- 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 +381 -406
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/computed.js +7 -1
- package/src/js/api/hooks.js +7 -4
- package/src/js/api/observer.js +44 -43
- package/src/js/api/options.js +1 -0
- package/src/js/api/update.js +15 -36
- package/src/js/api/watch.js +33 -20
- 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/dropnav.js +37 -43
- package/src/js/core/height-match.js +2 -8
- package/src/js/core/navbar.js +3 -12
- package/src/js/core/scrollspy-nav.js +10 -12
- package/src/js/core/scrollspy.js +10 -12
- package/src/js/core/switcher.js +30 -37
- 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/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.11-dev.55a0fc5b5 | 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,66 @@
|
|
|
1666
1666
|
wrapInner: wrapInner
|
|
1667
1667
|
});
|
|
1668
1668
|
|
|
1669
|
-
function
|
|
1670
|
-
|
|
1671
|
-
instance.
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
} else {
|
|
1676
|
-
for (const key in observer) {
|
|
1677
|
-
registerObservable(instance, observer[key], key);
|
|
1678
|
-
}
|
|
1669
|
+
function initComputed(instance) {
|
|
1670
|
+
const { computed } = instance.$options;
|
|
1671
|
+
instance._computed = {};
|
|
1672
|
+
if (computed) {
|
|
1673
|
+
for (const key in computed) {
|
|
1674
|
+
registerComputed(instance, key, computed[key]);
|
|
1679
1675
|
}
|
|
1680
1676
|
}
|
|
1681
1677
|
}
|
|
1682
|
-
function
|
|
1683
|
-
instance.
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
for (const observer of instance._observers) {
|
|
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 resetComputed(instance) {
|
|
1679
|
+
const values = { ...instance._computed };
|
|
1680
|
+
instance._computed = {};
|
|
1681
|
+
return values;
|
|
1718
1682
|
}
|
|
1719
|
-
function
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1683
|
+
function registerComputed(instance, key, cb) {
|
|
1684
|
+
Object.defineProperty(instance, key, {
|
|
1685
|
+
enumerable: true,
|
|
1686
|
+
get() {
|
|
1687
|
+
const { _computed, $props, $el } = instance;
|
|
1688
|
+
if (!hasOwn(_computed, key)) {
|
|
1689
|
+
_computed[key] = (cb.get || cb).call(instance, $props, $el);
|
|
1690
|
+
}
|
|
1691
|
+
return _computed[key];
|
|
1692
|
+
},
|
|
1693
|
+
set(value) {
|
|
1694
|
+
const { _computed } = instance;
|
|
1695
|
+
_computed[key] = cb.set ? cb.set.call(instance, value) : value;
|
|
1696
|
+
if (isUndefined(_computed[key])) {
|
|
1697
|
+
delete _computed[key];
|
|
1698
|
+
}
|
|
1724
1699
|
}
|
|
1725
|
-
|
|
1726
|
-
newTargets.forEach((target) => !includes(targets, target) && observer.observe(target));
|
|
1727
|
-
targets.splice(0, targets.length, ...newTargets);
|
|
1728
|
-
};
|
|
1700
|
+
});
|
|
1729
1701
|
}
|
|
1730
1702
|
|
|
1731
|
-
function
|
|
1732
|
-
|
|
1733
|
-
return;
|
|
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);
|
|
1703
|
+
function initUpdates(instance) {
|
|
1704
|
+
instance._updates = [...instance.$options.update || []];
|
|
1742
1705
|
}
|
|
1743
|
-
function
|
|
1744
|
-
|
|
1745
|
-
instance._computed = {};
|
|
1746
|
-
for (const [key, { watch, immediate }] of Object.entries(instance.$options.computed || {})) {
|
|
1747
|
-
if (watch && (initial && immediate || hasOwn(values, key) && !isEqual(values[key], instance[key]))) {
|
|
1748
|
-
watch.call(instance, instance[key], initial ? void 0 : values[key]);
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1751
|
-
callObserverUpdates(instance);
|
|
1706
|
+
function prependUpdate(instance, update) {
|
|
1707
|
+
instance._updates.unshift(update);
|
|
1752
1708
|
}
|
|
1753
|
-
|
|
1754
1709
|
function callUpdate(instance, e = "update") {
|
|
1755
1710
|
if (!instance._connected) {
|
|
1756
1711
|
return;
|
|
1757
1712
|
}
|
|
1758
|
-
if (e === "update" || e === "resize") {
|
|
1759
|
-
callWatches(instance);
|
|
1760
|
-
}
|
|
1761
1713
|
if (!instance.$options.update) {
|
|
1762
1714
|
return;
|
|
1763
1715
|
}
|
|
1764
|
-
if (!instance.
|
|
1765
|
-
instance.
|
|
1716
|
+
if (!instance._queued) {
|
|
1717
|
+
instance._queued = /* @__PURE__ */ new Set();
|
|
1766
1718
|
fastdom.read(() => {
|
|
1767
1719
|
if (instance._connected) {
|
|
1768
|
-
runUpdates(instance, instance.
|
|
1720
|
+
runUpdates(instance, instance._queued);
|
|
1769
1721
|
}
|
|
1770
|
-
delete instance.
|
|
1722
|
+
delete instance._queued;
|
|
1771
1723
|
});
|
|
1772
1724
|
}
|
|
1773
|
-
instance.
|
|
1725
|
+
instance._queued.add(e.type || e);
|
|
1774
1726
|
}
|
|
1775
1727
|
function runUpdates(instance, types) {
|
|
1776
|
-
for (const { read, write, events = [] } of instance
|
|
1728
|
+
for (const { read, write, events = [] } of instance._updates) {
|
|
1777
1729
|
if (!types.has("update") && !events.some((type) => types.has(type))) {
|
|
1778
1730
|
continue;
|
|
1779
1731
|
}
|
|
@@ -1793,23 +1745,40 @@
|
|
|
1793
1745
|
}
|
|
1794
1746
|
}
|
|
1795
1747
|
}
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1748
|
+
|
|
1749
|
+
function initWatches(instance) {
|
|
1750
|
+
instance._watches = [];
|
|
1751
|
+
for (const watches of instance.$options.watch || []) {
|
|
1752
|
+
for (const [name, watch] of Object.entries(watches)) {
|
|
1753
|
+
registerWatch(instance, watch, name);
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
instance._initial = true;
|
|
1757
|
+
prependUpdate(instance, { read: () => callWatches(instance), events: ["resize"] });
|
|
1758
|
+
}
|
|
1759
|
+
function registerWatch(instance, watch, name) {
|
|
1760
|
+
instance._watches.push({
|
|
1761
|
+
name,
|
|
1762
|
+
...isPlainObject(watch) ? watch : { handler: watch }
|
|
1763
|
+
});
|
|
1764
|
+
if (watch.document) {
|
|
1765
|
+
instance._observeTarget = instance.$options.el.ownerDocumentocument;
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
function callWatches(instance) {
|
|
1769
|
+
if (!instance._connected) {
|
|
1799
1770
|
return;
|
|
1800
1771
|
}
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1772
|
+
runWatches(instance, instance._initial);
|
|
1773
|
+
instance._initial = false;
|
|
1774
|
+
}
|
|
1775
|
+
function runWatches(instance, initial) {
|
|
1776
|
+
const values = resetComputed(instance);
|
|
1777
|
+
for (const { name, handler, immediate = true } of instance._watches) {
|
|
1778
|
+
if (initial && immediate || hasOwn(values, name) && !isEqual(values[name], instance[name])) {
|
|
1779
|
+
handler.call(instance, instance[name], initial ? void 0 : values[name]);
|
|
1805
1780
|
}
|
|
1806
1781
|
}
|
|
1807
|
-
const observer = new MutationObserver(() => callWatches(instance));
|
|
1808
|
-
observer.observe(el, {
|
|
1809
|
-
childList: true,
|
|
1810
|
-
subtree: true
|
|
1811
|
-
});
|
|
1812
|
-
registerObserver(instance, observer);
|
|
1813
1782
|
}
|
|
1814
1783
|
|
|
1815
1784
|
function initEvents(instance) {
|
|
@@ -1849,8 +1818,75 @@
|
|
|
1849
1818
|
);
|
|
1850
1819
|
}
|
|
1851
1820
|
|
|
1821
|
+
function initObservers(instance) {
|
|
1822
|
+
instance._observers = [];
|
|
1823
|
+
for (const observer of instance.$options.observe || []) {
|
|
1824
|
+
if (hasOwn(observer, "handler")) {
|
|
1825
|
+
registerObservable(instance, observer);
|
|
1826
|
+
} else {
|
|
1827
|
+
for (const observable of observer) {
|
|
1828
|
+
registerObservable(instance, observable);
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
function registerObserver(instance, ...observer) {
|
|
1834
|
+
instance._observers.push(...observer);
|
|
1835
|
+
}
|
|
1836
|
+
function disconnectObservers(instance) {
|
|
1837
|
+
for (const observer of instance._observers) {
|
|
1838
|
+
observer.disconnect();
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
function registerObservable(instance, observable) {
|
|
1842
|
+
let { observe, target = instance.$el, handler, options, filter, args } = observable;
|
|
1843
|
+
if (filter && !filter.call(instance, instance)) {
|
|
1844
|
+
return;
|
|
1845
|
+
}
|
|
1846
|
+
const key = `_observe${instance._observers.length}`;
|
|
1847
|
+
if (isFunction(target) && !(key in instance)) {
|
|
1848
|
+
registerComputed(instance, key, () => target.call(instance, instance));
|
|
1849
|
+
target = instance[key];
|
|
1850
|
+
}
|
|
1851
|
+
handler = isString(handler) ? instance[handler] : handler.bind(instance);
|
|
1852
|
+
if (isFunction(options)) {
|
|
1853
|
+
options = options.call(instance, instance);
|
|
1854
|
+
}
|
|
1855
|
+
const observer = observe(target, handler, options, args);
|
|
1856
|
+
if (isFunction(target) && isArray(instance[key]) && observer.unobserve) {
|
|
1857
|
+
registerWatch(
|
|
1858
|
+
instance,
|
|
1859
|
+
{
|
|
1860
|
+
handler(targets, prev) {
|
|
1861
|
+
for (const target2 of prev) {
|
|
1862
|
+
!includes(targets, target2) && observer.unobserve(target2);
|
|
1863
|
+
}
|
|
1864
|
+
for (const target2 of targets) {
|
|
1865
|
+
!includes(prev, target2) && observer.observe(target2);
|
|
1866
|
+
}
|
|
1867
|
+
},
|
|
1868
|
+
immediate: false
|
|
1869
|
+
},
|
|
1870
|
+
key
|
|
1871
|
+
);
|
|
1872
|
+
}
|
|
1873
|
+
registerObserver(instance, observer);
|
|
1874
|
+
}
|
|
1875
|
+
function initWatchObserver(instance) {
|
|
1876
|
+
let { el, computed } = instance.$options;
|
|
1877
|
+
if (!computed && !instance._watches) {
|
|
1878
|
+
return;
|
|
1879
|
+
}
|
|
1880
|
+
const observer = new MutationObserver(() => callWatches(instance));
|
|
1881
|
+
observer.observe(instance._observeTarget || el, {
|
|
1882
|
+
childList: true,
|
|
1883
|
+
subtree: true
|
|
1884
|
+
});
|
|
1885
|
+
registerObserver(instance, observer);
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1852
1888
|
const strats = {};
|
|
1853
|
-
strats.events = strats.observe = strats.created = strats.beforeConnect = strats.connected = strats.beforeDisconnect = strats.disconnected = strats.destroy = concatStrat;
|
|
1889
|
+
strats.events = strats.watch = strats.observe = strats.created = strats.beforeConnect = strats.connected = strats.beforeDisconnect = strats.disconnected = strats.destroy = concatStrat;
|
|
1854
1890
|
strats.args = function(parentVal, childVal) {
|
|
1855
1891
|
return childVal !== false && concatStrat(childVal || parentVal);
|
|
1856
1892
|
};
|
|
@@ -2039,9 +2075,11 @@
|
|
|
2039
2075
|
callHook(instance, "beforeConnect");
|
|
2040
2076
|
instance._connected = true;
|
|
2041
2077
|
initEvents(instance);
|
|
2078
|
+
initUpdates(instance);
|
|
2079
|
+
initWatches(instance);
|
|
2042
2080
|
initObservers(instance);
|
|
2043
2081
|
initPropsObserver(instance);
|
|
2044
|
-
|
|
2082
|
+
initWatchObserver(instance);
|
|
2045
2083
|
callHook(instance, "connected");
|
|
2046
2084
|
callUpdate(instance);
|
|
2047
2085
|
}
|
|
@@ -2057,35 +2095,6 @@
|
|
|
2057
2095
|
delete instance._watch;
|
|
2058
2096
|
}
|
|
2059
2097
|
|
|
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
|
-
}
|
|
2088
|
-
|
|
2089
2098
|
let uid = 0;
|
|
2090
2099
|
function init$1(instance, options = {}) {
|
|
2091
2100
|
options.data = normalizeData(options, instance.constructor.options);
|
|
@@ -2140,7 +2149,7 @@
|
|
|
2140
2149
|
};
|
|
2141
2150
|
App.util = util;
|
|
2142
2151
|
App.options = {};
|
|
2143
|
-
App.version = "3.16.
|
|
2152
|
+
App.version = "3.16.11-dev.55a0fc5b5";
|
|
2144
2153
|
|
|
2145
2154
|
const PREFIX = "uk-";
|
|
2146
2155
|
const DATA = "__uikit__";
|
|
@@ -2686,52 +2695,41 @@
|
|
|
2686
2695
|
offset: 0
|
|
2687
2696
|
},
|
|
2688
2697
|
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
|
|
2698
|
+
items({ targets }, $el) {
|
|
2699
|
+
return $$(targets, $el);
|
|
2703
2700
|
},
|
|
2704
|
-
toggles
|
|
2705
|
-
|
|
2706
|
-
return this.items.map((item) => $(toggle, item));
|
|
2707
|
-
},
|
|
2708
|
-
watch() {
|
|
2709
|
-
this.$emit();
|
|
2710
|
-
},
|
|
2711
|
-
immediate: true
|
|
2701
|
+
toggles({ toggle }) {
|
|
2702
|
+
return this.items.map((item) => $(toggle, item));
|
|
2712
2703
|
},
|
|
2713
|
-
contents
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2704
|
+
contents({ content }) {
|
|
2705
|
+
return this.items.map((item) => {
|
|
2706
|
+
var _a;
|
|
2707
|
+
return ((_a = item._wrapper) == null ? void 0 : _a.firstElementChild) || $(content, item);
|
|
2708
|
+
});
|
|
2709
|
+
}
|
|
2710
|
+
},
|
|
2711
|
+
watch: {
|
|
2712
|
+
items(items, prev) {
|
|
2713
|
+
if (prev || hasClass(items, this.clsOpen)) {
|
|
2714
|
+
return;
|
|
2715
|
+
}
|
|
2716
|
+
const active = this.active !== false && items[Number(this.active)] || !this.collapsible && items[0];
|
|
2717
|
+
if (active) {
|
|
2718
|
+
this.toggle(active, false);
|
|
2719
|
+
}
|
|
2720
|
+
},
|
|
2721
|
+
toggles() {
|
|
2722
|
+
this.$emit();
|
|
2723
|
+
},
|
|
2724
|
+
contents(items) {
|
|
2725
|
+
for (const el of items) {
|
|
2726
|
+
const isOpen = hasClass(
|
|
2727
|
+
this.items.find((item) => within(el, item)),
|
|
2728
|
+
this.clsOpen
|
|
2720
2729
|
);
|
|
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
|
|
2730
|
+
hide(el, !isOpen);
|
|
2731
|
+
}
|
|
2732
|
+
this.$emit();
|
|
2735
2733
|
}
|
|
2736
2734
|
},
|
|
2737
2735
|
observe: lazyload(),
|
|
@@ -3540,15 +3538,36 @@
|
|
|
3540
3538
|
dropbarAnchor({ dropbarAnchor }, $el) {
|
|
3541
3539
|
return query(dropbarAnchor, $el) || $el;
|
|
3542
3540
|
},
|
|
3543
|
-
dropbar
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3541
|
+
dropbar({ dropbar }) {
|
|
3542
|
+
if (!dropbar) {
|
|
3543
|
+
return null;
|
|
3544
|
+
}
|
|
3545
|
+
dropbar = this._dropbar || query(dropbar, this.$el) || $(`+ .${this.clsDropbar}`, this.$el);
|
|
3546
|
+
return dropbar ? dropbar : this._dropbar = $("<div></div>");
|
|
3547
|
+
},
|
|
3548
|
+
dropContainer(_, $el) {
|
|
3549
|
+
return this.container || $el;
|
|
3550
|
+
},
|
|
3551
|
+
dropdowns({ clsDrop }, $el) {
|
|
3552
|
+
var _a;
|
|
3553
|
+
const dropdowns = $$(`.${clsDrop}`, $el);
|
|
3554
|
+
if (this.dropContainer !== $el) {
|
|
3555
|
+
for (const el of $$(`.${clsDrop}`, this.dropContainer)) {
|
|
3556
|
+
const target = (_a = this.getDropdown(el)) == null ? void 0 : _a.targetEl;
|
|
3557
|
+
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
3558
|
+
dropdowns.push(el);
|
|
3559
|
+
}
|
|
3547
3560
|
}
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3561
|
+
}
|
|
3562
|
+
return dropdowns;
|
|
3563
|
+
},
|
|
3564
|
+
items({ selNavItem }, $el) {
|
|
3565
|
+
return $$(selNavItem, $el);
|
|
3566
|
+
}
|
|
3567
|
+
},
|
|
3568
|
+
watch: {
|
|
3569
|
+
dropbar: {
|
|
3570
|
+
handler(dropbar) {
|
|
3552
3571
|
addClass(
|
|
3553
3572
|
dropbar,
|
|
3554
3573
|
"uk-dropbar",
|
|
@@ -3559,24 +3578,8 @@
|
|
|
3559
3578
|
},
|
|
3560
3579
|
immediate: true
|
|
3561
3580
|
},
|
|
3562
|
-
dropContainer(_, $el) {
|
|
3563
|
-
return this.container || $el;
|
|
3564
|
-
},
|
|
3565
3581
|
dropdowns: {
|
|
3566
|
-
|
|
3567
|
-
var _a;
|
|
3568
|
-
const dropdowns = $$(`.${clsDrop}`, $el);
|
|
3569
|
-
if (this.dropContainer !== $el) {
|
|
3570
|
-
for (const el of $$(`.${clsDrop}`, this.dropContainer)) {
|
|
3571
|
-
const target = (_a = this.getDropdown(el)) == null ? void 0 : _a.targetEl;
|
|
3572
|
-
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
3573
|
-
dropdowns.push(el);
|
|
3574
|
-
}
|
|
3575
|
-
}
|
|
3576
|
-
}
|
|
3577
|
-
return dropdowns;
|
|
3578
|
-
},
|
|
3579
|
-
watch(dropdowns) {
|
|
3582
|
+
handler(dropdowns) {
|
|
3580
3583
|
this.$create(
|
|
3581
3584
|
"drop",
|
|
3582
3585
|
dropdowns.filter((el) => !this.getDropdown(el)),
|
|
@@ -3592,20 +3595,13 @@
|
|
|
3592
3595
|
immediate: true
|
|
3593
3596
|
},
|
|
3594
3597
|
items: {
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
},
|
|
3598
|
-
watch(items) {
|
|
3599
|
-
attr(children(this.$el), "role", "presentation");
|
|
3600
|
-
attr(items, { tabindex: -1, role: "menuitem" });
|
|
3598
|
+
handler(items) {
|
|
3599
|
+
attr(items, "tabindex", -1);
|
|
3601
3600
|
attr(items[0], "tabindex", 0);
|
|
3602
3601
|
},
|
|
3603
3602
|
immediate: true
|
|
3604
3603
|
}
|
|
3605
3604
|
},
|
|
3606
|
-
connected() {
|
|
3607
|
-
attr(this.$el, "role", "menubar");
|
|
3608
|
-
},
|
|
3609
3605
|
disconnected() {
|
|
3610
3606
|
remove$1(this._dropbar);
|
|
3611
3607
|
delete this._dropbar;
|
|
@@ -4117,13 +4113,8 @@
|
|
|
4117
4113
|
row: true
|
|
4118
4114
|
},
|
|
4119
4115
|
computed: {
|
|
4120
|
-
elements
|
|
4121
|
-
|
|
4122
|
-
return $$(target, $el);
|
|
4123
|
-
},
|
|
4124
|
-
watch() {
|
|
4125
|
-
this.$reset();
|
|
4126
|
-
}
|
|
4116
|
+
elements({ target }, $el) {
|
|
4117
|
+
return $$(target, $el);
|
|
4127
4118
|
}
|
|
4128
4119
|
},
|
|
4129
4120
|
observe: resize({
|
|
@@ -5147,12 +5138,9 @@
|
|
|
5147
5138
|
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"
|
|
5148
5139
|
// Simplify with :where() selector once browser target is Safari 14+
|
|
5149
5140
|
},
|
|
5150
|
-
|
|
5141
|
+
watch: {
|
|
5151
5142
|
items: {
|
|
5152
|
-
|
|
5153
|
-
return $$(selNavItem, $el);
|
|
5154
|
-
},
|
|
5155
|
-
watch(items) {
|
|
5143
|
+
handler() {
|
|
5156
5144
|
const justify = hasClass(this.$el, "uk-navbar-justify");
|
|
5157
5145
|
for (const container of $$(
|
|
5158
5146
|
".uk-navbar-nav, .uk-navbar-left, .uk-navbar-right",
|
|
@@ -5167,10 +5155,6 @@
|
|
|
5167
5155
|
).length : ""
|
|
5168
5156
|
);
|
|
5169
5157
|
}
|
|
5170
|
-
attr($$(".uk-navbar-nav", this.$el), "role", "group");
|
|
5171
|
-
attr($$(".uk-navbar-nav > *", this.$el), "role", "presentation");
|
|
5172
|
-
attr(items, { tabindex: -1, role: "menuitem" });
|
|
5173
|
-
attr(items[0], "tabindex", 0);
|
|
5174
5158
|
},
|
|
5175
5159
|
immediate: true
|
|
5176
5160
|
}
|
|
@@ -5450,16 +5434,15 @@
|
|
|
5450
5434
|
inViewClass: "uk-scrollspy-inview"
|
|
5451
5435
|
}),
|
|
5452
5436
|
computed: {
|
|
5453
|
-
elements
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
}
|
|
5461
|
-
}
|
|
5462
|
-
immediate: true
|
|
5437
|
+
elements({ target }, $el) {
|
|
5438
|
+
return target ? $$(target, $el) : [$el];
|
|
5439
|
+
}
|
|
5440
|
+
},
|
|
5441
|
+
watch: {
|
|
5442
|
+
elements(elements) {
|
|
5443
|
+
if (this.hidden) {
|
|
5444
|
+
css(filter(elements, `:not(.${this.inViewClass})`), "opacity", 0);
|
|
5445
|
+
}
|
|
5463
5446
|
}
|
|
5464
5447
|
},
|
|
5465
5448
|
connected() {
|
|
@@ -5553,21 +5536,20 @@
|
|
|
5553
5536
|
offset: 0
|
|
5554
5537
|
},
|
|
5555
5538
|
computed: {
|
|
5556
|
-
links
|
|
5557
|
-
|
|
5558
|
-
return $$('a[href*="#"]', $el).filter((el) => el.hash && isSameSiteAnchor(el));
|
|
5559
|
-
},
|
|
5560
|
-
watch(links) {
|
|
5561
|
-
if (this.scroll) {
|
|
5562
|
-
this.$create("scroll", links, { offset: this.offset || 0 });
|
|
5563
|
-
}
|
|
5564
|
-
},
|
|
5565
|
-
immediate: true
|
|
5539
|
+
links(_, $el) {
|
|
5540
|
+
return $$('a[href*="#"]', $el).filter((el) => el.hash && isSameSiteAnchor(el));
|
|
5566
5541
|
},
|
|
5567
5542
|
elements({ closest: selector }) {
|
|
5568
5543
|
return closest(this.links, selector || "*");
|
|
5569
5544
|
}
|
|
5570
5545
|
},
|
|
5546
|
+
watch: {
|
|
5547
|
+
links(links) {
|
|
5548
|
+
if (this.scroll) {
|
|
5549
|
+
this.$create("scroll", links, { offset: this.offset || 0 });
|
|
5550
|
+
}
|
|
5551
|
+
}
|
|
5552
|
+
},
|
|
5571
5553
|
observe: scroll$1(),
|
|
5572
5554
|
update: [
|
|
5573
5555
|
{
|
|
@@ -5990,47 +5972,42 @@
|
|
|
5990
5972
|
swiping: true
|
|
5991
5973
|
},
|
|
5992
5974
|
computed: {
|
|
5975
|
+
connects({ connect }, $el) {
|
|
5976
|
+
return queryAll(connect, $el);
|
|
5977
|
+
},
|
|
5978
|
+
connectChildren() {
|
|
5979
|
+
return this.connects.map((el) => children(el)).flat();
|
|
5980
|
+
},
|
|
5981
|
+
toggles({ toggle }, $el) {
|
|
5982
|
+
return $$(toggle, $el);
|
|
5983
|
+
},
|
|
5984
|
+
children() {
|
|
5985
|
+
return children(this.$el).filter(
|
|
5986
|
+
(child) => this.toggles.some((toggle) => within(toggle, child))
|
|
5987
|
+
);
|
|
5988
|
+
}
|
|
5989
|
+
},
|
|
5990
|
+
watch: {
|
|
5993
5991
|
connects: {
|
|
5994
|
-
|
|
5995
|
-
return queryAll(connect, $el);
|
|
5996
|
-
},
|
|
5997
|
-
watch(connects) {
|
|
5992
|
+
handler(connects) {
|
|
5998
5993
|
if (this.swiping) {
|
|
5999
5994
|
css(connects, "touchAction", "pan-y pinch-zoom");
|
|
6000
5995
|
}
|
|
6001
5996
|
this.$emit();
|
|
6002
5997
|
},
|
|
6003
|
-
document: true
|
|
6004
|
-
immediate: true
|
|
6005
|
-
},
|
|
6006
|
-
connectChildren: {
|
|
6007
|
-
get() {
|
|
6008
|
-
return this.connects.map((el) => children(el)).flat();
|
|
6009
|
-
},
|
|
6010
|
-
watch() {
|
|
6011
|
-
const index = this.index();
|
|
6012
|
-
for (const el of this.connects) {
|
|
6013
|
-
children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));
|
|
6014
|
-
}
|
|
6015
|
-
this.$emit();
|
|
6016
|
-
},
|
|
6017
|
-
immediate: true
|
|
5998
|
+
document: true
|
|
6018
5999
|
},
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
const active = this.index();
|
|
6026
|
-
this.show(~active ? active : toggles[this.active] || toggles[0]);
|
|
6027
|
-
},
|
|
6028
|
-
immediate: true
|
|
6000
|
+
connectChildren() {
|
|
6001
|
+
const index = this.index();
|
|
6002
|
+
for (const el of this.connects) {
|
|
6003
|
+
children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));
|
|
6004
|
+
}
|
|
6005
|
+
this.$emit();
|
|
6029
6006
|
},
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
);
|
|
6007
|
+
toggles(toggles) {
|
|
6008
|
+
this.$emit();
|
|
6009
|
+
const active = this.index();
|
|
6010
|
+
this.show(~active ? active : toggles[this.active] || toggles[0]);
|
|
6034
6011
|
}
|
|
6035
6012
|
},
|
|
6036
6013
|
connected() {
|