uikit 3.16.9 → 3.16.11-dev.05b77f999
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 +13 -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 +308 -339
- 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 +434 -467
- package/dist/js/uikit.min.js +1 -1
- package/package.json +4 -4
- package/src/js/api/boot.js +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 -42
- package/src/js/api/options.js +1 -0
- package/src/js/api/update.js +21 -37
- package/src/js/api/watch.js +20 -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 -64
- 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.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.16.
|
|
1
|
+
/*! UIkit 3.16.11-dev.05b77f999 | 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.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,58 @@
|
|
|
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) && !(key in instance)) {
|
|
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 observer = observe(key in instance ? instance[key] : target, handler, options, args);
|
|
1881
|
+
if (isFunction(target) && isArray(instance[key]) && observer.unobserve) {
|
|
1882
|
+
registerWatch(instance, { handler: updateTargets(observer), immediate: false }, key);
|
|
1883
|
+
}
|
|
1884
|
+
registerObserver(instance, observer);
|
|
1885
|
+
}
|
|
1886
|
+
function updateTargets(observer) {
|
|
1887
|
+
return (targets, prev) => {
|
|
1888
|
+
for (const target of prev) {
|
|
1889
|
+
!includes(targets, target) && observer.unobserve(target);
|
|
1890
|
+
}
|
|
1891
|
+
for (const target of targets) {
|
|
1892
|
+
!includes(prev, target) && observer.observe(target);
|
|
1893
|
+
}
|
|
1894
|
+
};
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1852
1897
|
const strats = {};
|
|
1853
|
-
strats.events = strats.observe = strats.created = strats.beforeConnect = strats.connected = strats.beforeDisconnect = strats.disconnected = strats.destroy = concatStrat;
|
|
1898
|
+
strats.events = strats.watch = strats.observe = strats.created = strats.beforeConnect = strats.connected = strats.beforeDisconnect = strats.disconnected = strats.destroy = concatStrat;
|
|
1854
1899
|
strats.args = function(parentVal, childVal) {
|
|
1855
1900
|
return childVal !== false && concatStrat(childVal || parentVal);
|
|
1856
1901
|
};
|
|
@@ -2033,15 +2078,15 @@
|
|
|
2033
2078
|
if (instance._connected) {
|
|
2034
2079
|
return;
|
|
2035
2080
|
}
|
|
2036
|
-
instance._data = {};
|
|
2037
|
-
instance._computed = {};
|
|
2038
2081
|
initProps(instance);
|
|
2039
2082
|
callHook(instance, "beforeConnect");
|
|
2040
2083
|
instance._connected = true;
|
|
2041
2084
|
initEvents(instance);
|
|
2085
|
+
initUpdates(instance);
|
|
2086
|
+
initWatches(instance);
|
|
2042
2087
|
initObservers(instance);
|
|
2043
2088
|
initPropsObserver(instance);
|
|
2044
|
-
|
|
2089
|
+
initComputedUpdates(instance);
|
|
2045
2090
|
callHook(instance, "connected");
|
|
2046
2091
|
callUpdate(instance);
|
|
2047
2092
|
}
|
|
@@ -2050,40 +2095,12 @@
|
|
|
2050
2095
|
return;
|
|
2051
2096
|
}
|
|
2052
2097
|
callHook(instance, "beforeDisconnect");
|
|
2053
|
-
disconnectObservers(instance);
|
|
2054
2098
|
unbindEvents(instance);
|
|
2099
|
+
clearUpdateData(instance);
|
|
2100
|
+
disconnectObservers(instance);
|
|
2101
|
+
disconnectComputedUpdates(instance);
|
|
2055
2102
|
callHook(instance, "disconnected");
|
|
2056
2103
|
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
2104
|
}
|
|
2088
2105
|
|
|
2089
2106
|
let uid = 0;
|
|
@@ -2140,7 +2157,7 @@
|
|
|
2140
2157
|
};
|
|
2141
2158
|
App.util = util;
|
|
2142
2159
|
App.options = {};
|
|
2143
|
-
App.version = "3.16.
|
|
2160
|
+
App.version = "3.16.11-dev.05b77f999";
|
|
2144
2161
|
|
|
2145
2162
|
const PREFIX = "uk-";
|
|
2146
2163
|
const DATA = "__uikit__";
|
|
@@ -2312,7 +2329,7 @@
|
|
|
2312
2329
|
|
|
2313
2330
|
function boot(App) {
|
|
2314
2331
|
if (inBrowser && window.MutationObserver) {
|
|
2315
|
-
if (document.
|
|
2332
|
+
if (document.body) {
|
|
2316
2333
|
requestAnimationFrame(() => init(App));
|
|
2317
2334
|
} else {
|
|
2318
2335
|
new MutationObserver((records, observer) => {
|
|
@@ -2686,52 +2703,41 @@
|
|
|
2686
2703
|
offset: 0
|
|
2687
2704
|
},
|
|
2688
2705
|
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
|
|
2706
|
+
items({ targets }, $el) {
|
|
2707
|
+
return $$(targets, $el);
|
|
2703
2708
|
},
|
|
2704
|
-
toggles
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
}
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2709
|
+
toggles({ toggle }) {
|
|
2710
|
+
return this.items.map((item) => $(toggle, item));
|
|
2711
|
+
},
|
|
2712
|
+
contents({ content }) {
|
|
2713
|
+
return this.items.map((item) => {
|
|
2714
|
+
var _a;
|
|
2715
|
+
return ((_a = item._wrapper) == null ? void 0 : _a.firstElementChild) || $(content, item);
|
|
2716
|
+
});
|
|
2717
|
+
}
|
|
2718
|
+
},
|
|
2719
|
+
watch: {
|
|
2720
|
+
items(items, prev) {
|
|
2721
|
+
if (prev || hasClass(items, this.clsOpen)) {
|
|
2722
|
+
return;
|
|
2723
|
+
}
|
|
2724
|
+
const active = this.active !== false && items[Number(this.active)] || !this.collapsible && items[0];
|
|
2725
|
+
if (active) {
|
|
2726
|
+
this.toggle(active, false);
|
|
2727
|
+
}
|
|
2728
|
+
},
|
|
2729
|
+
toggles() {
|
|
2730
|
+
this.$emit();
|
|
2731
|
+
},
|
|
2732
|
+
contents(items) {
|
|
2733
|
+
for (const el of items) {
|
|
2734
|
+
const isOpen = hasClass(
|
|
2735
|
+
this.items.find((item) => within(el, item)),
|
|
2736
|
+
this.clsOpen
|
|
2720
2737
|
);
|
|
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
|
|
2738
|
+
hide(el, !isOpen);
|
|
2739
|
+
}
|
|
2740
|
+
this.$emit();
|
|
2735
2741
|
}
|
|
2736
2742
|
},
|
|
2737
2743
|
observe: lazyload(),
|
|
@@ -3540,71 +3546,60 @@
|
|
|
3540
3546
|
dropbarAnchor({ dropbarAnchor }, $el) {
|
|
3541
3547
|
return query(dropbarAnchor, $el) || $el;
|
|
3542
3548
|
},
|
|
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
|
|
3549
|
+
dropbar({ dropbar }) {
|
|
3550
|
+
if (!dropbar) {
|
|
3551
|
+
return null;
|
|
3552
|
+
}
|
|
3553
|
+
dropbar = this._dropbar || query(dropbar, this.$el) || $(`+ .${this.clsDropbar}`, this.$el);
|
|
3554
|
+
return dropbar ? dropbar : this._dropbar = $("<div></div>");
|
|
3561
3555
|
},
|
|
3562
3556
|
dropContainer(_, $el) {
|
|
3563
3557
|
return this.container || $el;
|
|
3564
3558
|
},
|
|
3565
|
-
dropdowns
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
dropdowns.push(el);
|
|
3574
|
-
}
|
|
3559
|
+
dropdowns({ clsDrop }, $el) {
|
|
3560
|
+
var _a;
|
|
3561
|
+
const dropdowns = $$(`.${clsDrop}`, $el);
|
|
3562
|
+
if (this.dropContainer !== $el) {
|
|
3563
|
+
for (const el of $$(`.${clsDrop}`, this.dropContainer)) {
|
|
3564
|
+
const target = (_a = this.getDropdown(el)) == null ? void 0 : _a.targetEl;
|
|
3565
|
+
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
3566
|
+
dropdowns.push(el);
|
|
3575
3567
|
}
|
|
3576
3568
|
}
|
|
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
|
|
3569
|
+
}
|
|
3570
|
+
return dropdowns;
|
|
3593
3571
|
},
|
|
3594
|
-
items
|
|
3595
|
-
|
|
3596
|
-
return $$(selNavItem, $el);
|
|
3597
|
-
},
|
|
3598
|
-
watch(items) {
|
|
3599
|
-
attr(children(this.$el), "role", "presentation");
|
|
3600
|
-
attr(items, { tabindex: -1, role: "menuitem" });
|
|
3601
|
-
attr(items[0], "tabindex", 0);
|
|
3602
|
-
},
|
|
3603
|
-
immediate: true
|
|
3572
|
+
items({ selNavItem }, $el) {
|
|
3573
|
+
return $$(selNavItem, $el);
|
|
3604
3574
|
}
|
|
3605
3575
|
},
|
|
3606
|
-
|
|
3607
|
-
|
|
3576
|
+
watch: {
|
|
3577
|
+
dropbar(dropbar) {
|
|
3578
|
+
addClass(
|
|
3579
|
+
dropbar,
|
|
3580
|
+
"uk-dropbar",
|
|
3581
|
+
"uk-dropbar-top",
|
|
3582
|
+
this.clsDropbar,
|
|
3583
|
+
`uk-${this.$options.name}-dropbar`
|
|
3584
|
+
);
|
|
3585
|
+
},
|
|
3586
|
+
dropdowns(dropdowns) {
|
|
3587
|
+
this.$create(
|
|
3588
|
+
"drop",
|
|
3589
|
+
dropdowns.filter((el) => !this.getDropdown(el)),
|
|
3590
|
+
{
|
|
3591
|
+
...this.$props,
|
|
3592
|
+
flip: false,
|
|
3593
|
+
shift: true,
|
|
3594
|
+
pos: `bottom-${this.align}`,
|
|
3595
|
+
boundary: this.boundary === true ? this.$el : this.boundary
|
|
3596
|
+
}
|
|
3597
|
+
);
|
|
3598
|
+
},
|
|
3599
|
+
items(items) {
|
|
3600
|
+
attr(items, "tabindex", -1);
|
|
3601
|
+
attr(items[0], "tabindex", 0);
|
|
3602
|
+
}
|
|
3608
3603
|
},
|
|
3609
3604
|
disconnected() {
|
|
3610
3605
|
remove$1(this._dropbar);
|
|
@@ -4117,13 +4112,8 @@
|
|
|
4117
4112
|
row: true
|
|
4118
4113
|
},
|
|
4119
4114
|
computed: {
|
|
4120
|
-
elements
|
|
4121
|
-
|
|
4122
|
-
return $$(target, $el);
|
|
4123
|
-
},
|
|
4124
|
-
watch() {
|
|
4125
|
-
this.$reset();
|
|
4126
|
-
}
|
|
4115
|
+
elements({ target }, $el) {
|
|
4116
|
+
return $$(target, $el);
|
|
4127
4117
|
}
|
|
4128
4118
|
},
|
|
4129
4119
|
observe: resize({
|
|
@@ -4646,9 +4636,10 @@
|
|
|
4646
4636
|
ensureSrcAttribute(this.$el);
|
|
4647
4637
|
},
|
|
4648
4638
|
disconnected() {
|
|
4649
|
-
if (this.
|
|
4650
|
-
this.
|
|
4639
|
+
if (this.img) {
|
|
4640
|
+
this.img.onload = "";
|
|
4651
4641
|
}
|
|
4642
|
+
delete this.img;
|
|
4652
4643
|
},
|
|
4653
4644
|
observe: intersection({
|
|
4654
4645
|
target: ({ $el, $props }) => [$el, ...queryAll($props.target, $el)],
|
|
@@ -4661,13 +4652,13 @@
|
|
|
4661
4652
|
}),
|
|
4662
4653
|
methods: {
|
|
4663
4654
|
load() {
|
|
4664
|
-
if (this.
|
|
4665
|
-
return this.
|
|
4655
|
+
if (this.img) {
|
|
4656
|
+
return this.img;
|
|
4666
4657
|
}
|
|
4667
4658
|
const image = isImg(this.$el) ? this.$el : getImageFromElement(this.$el, this.dataSrc, this.sources);
|
|
4668
4659
|
removeAttr(image, "loading");
|
|
4669
4660
|
setSrcAttrs(this.$el, image.currentSrc);
|
|
4670
|
-
return this.
|
|
4661
|
+
return this.img = image;
|
|
4671
4662
|
}
|
|
4672
4663
|
}
|
|
4673
4664
|
};
|
|
@@ -5147,32 +5138,22 @@
|
|
|
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
|
-
|
|
5151
|
-
items
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
container
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
container
|
|
5167
|
-
).length : ""
|
|
5168
|
-
);
|
|
5169
|
-
}
|
|
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
|
-
},
|
|
5175
|
-
immediate: true
|
|
5141
|
+
watch: {
|
|
5142
|
+
items() {
|
|
5143
|
+
const justify = hasClass(this.$el, "uk-navbar-justify");
|
|
5144
|
+
for (const container of $$(
|
|
5145
|
+
".uk-navbar-nav, .uk-navbar-left, .uk-navbar-right",
|
|
5146
|
+
this.$el
|
|
5147
|
+
)) {
|
|
5148
|
+
css(
|
|
5149
|
+
container,
|
|
5150
|
+
"flexGrow",
|
|
5151
|
+
justify ? $$(
|
|
5152
|
+
".uk-navbar-nav > li > a, .uk-navbar-item, .uk-navbar-toggle",
|
|
5153
|
+
container
|
|
5154
|
+
).length : ""
|
|
5155
|
+
);
|
|
5156
|
+
}
|
|
5176
5157
|
}
|
|
5177
5158
|
}
|
|
5178
5159
|
};
|
|
@@ -5450,30 +5431,30 @@
|
|
|
5450
5431
|
inViewClass: "uk-scrollspy-inview"
|
|
5451
5432
|
}),
|
|
5452
5433
|
computed: {
|
|
5453
|
-
elements
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
}
|
|
5461
|
-
}
|
|
5462
|
-
immediate: true
|
|
5434
|
+
elements({ target }, $el) {
|
|
5435
|
+
return target ? $$(target, $el) : [$el];
|
|
5436
|
+
}
|
|
5437
|
+
},
|
|
5438
|
+
watch: {
|
|
5439
|
+
elements(elements) {
|
|
5440
|
+
if (this.hidden) {
|
|
5441
|
+
css(filter$1(elements, `:not(.${this.inViewClass})`), "opacity", 0);
|
|
5442
|
+
}
|
|
5463
5443
|
}
|
|
5464
5444
|
},
|
|
5465
5445
|
connected() {
|
|
5466
|
-
this.
|
|
5446
|
+
this.elementData = /* @__PURE__ */ new Map();
|
|
5467
5447
|
},
|
|
5468
5448
|
disconnected() {
|
|
5469
|
-
for (const [el, state] of this.
|
|
5449
|
+
for (const [el, state] of this.elementData.entries()) {
|
|
5470
5450
|
removeClass(el, this.inViewClass, (state == null ? void 0 : state.cls) || "");
|
|
5471
5451
|
}
|
|
5452
|
+
delete this.elementData;
|
|
5472
5453
|
},
|
|
5473
5454
|
observe: intersection({
|
|
5474
5455
|
target: ({ elements }) => elements,
|
|
5475
5456
|
handler(records) {
|
|
5476
|
-
const elements = this.
|
|
5457
|
+
const elements = this.elementData;
|
|
5477
5458
|
for (const { target: el, isIntersecting } of records) {
|
|
5478
5459
|
if (!elements.has(el)) {
|
|
5479
5460
|
elements.set(el, {
|
|
@@ -5494,7 +5475,7 @@
|
|
|
5494
5475
|
update: [
|
|
5495
5476
|
{
|
|
5496
5477
|
write(data) {
|
|
5497
|
-
for (const [el, state] of
|
|
5478
|
+
for (const [el, state] of this.elementData.entries()) {
|
|
5498
5479
|
if (state.show && !state.inview && !state.queued) {
|
|
5499
5480
|
state.queued = true;
|
|
5500
5481
|
data.promise = (data.promise || Promise.resolve()).then(() => new Promise((resolve) => setTimeout(resolve, this.delay))).then(() => {
|
|
@@ -5514,7 +5495,7 @@
|
|
|
5514
5495
|
methods: {
|
|
5515
5496
|
toggle(el, inview) {
|
|
5516
5497
|
var _a;
|
|
5517
|
-
const state = this.
|
|
5498
|
+
const state = this.elementData.get(el);
|
|
5518
5499
|
if (!state) {
|
|
5519
5500
|
return;
|
|
5520
5501
|
}
|
|
@@ -5553,21 +5534,20 @@
|
|
|
5553
5534
|
offset: 0
|
|
5554
5535
|
},
|
|
5555
5536
|
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
|
|
5537
|
+
links(_, $el) {
|
|
5538
|
+
return $$('a[href*="#"]', $el).filter((el) => el.hash && isSameSiteAnchor(el));
|
|
5566
5539
|
},
|
|
5567
5540
|
elements({ closest: selector }) {
|
|
5568
5541
|
return closest(this.links, selector || "*");
|
|
5569
5542
|
}
|
|
5570
5543
|
},
|
|
5544
|
+
watch: {
|
|
5545
|
+
links(links) {
|
|
5546
|
+
if (this.scroll) {
|
|
5547
|
+
this.$create("scroll", links, { offset: this.offset || 0 });
|
|
5548
|
+
}
|
|
5549
|
+
}
|
|
5550
|
+
},
|
|
5571
5551
|
observe: scroll$1(),
|
|
5572
5552
|
update: [
|
|
5573
5553
|
{
|
|
@@ -5990,42 +5970,14 @@
|
|
|
5990
5970
|
swiping: true
|
|
5991
5971
|
},
|
|
5992
5972
|
computed: {
|
|
5993
|
-
connects
|
|
5994
|
-
|
|
5995
|
-
return queryAll(connect, $el);
|
|
5996
|
-
},
|
|
5997
|
-
watch(connects) {
|
|
5998
|
-
if (this.swiping) {
|
|
5999
|
-
css(connects, "touchAction", "pan-y pinch-zoom");
|
|
6000
|
-
}
|
|
6001
|
-
this.$emit();
|
|
6002
|
-
},
|
|
6003
|
-
document: true,
|
|
6004
|
-
immediate: true
|
|
5973
|
+
connects({ connect }, $el) {
|
|
5974
|
+
return queryAll(connect, $el);
|
|
6005
5975
|
},
|
|
6006
|
-
connectChildren
|
|
6007
|
-
|
|
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
|
|
5976
|
+
connectChildren() {
|
|
5977
|
+
return this.connects.map((el) => children(el)).flat();
|
|
6018
5978
|
},
|
|
6019
|
-
toggles
|
|
6020
|
-
|
|
6021
|
-
return $$(toggle, $el);
|
|
6022
|
-
},
|
|
6023
|
-
watch(toggles) {
|
|
6024
|
-
this.$emit();
|
|
6025
|
-
const active = this.index();
|
|
6026
|
-
this.show(~active ? active : toggles[this.active] || toggles[0]);
|
|
6027
|
-
},
|
|
6028
|
-
immediate: true
|
|
5979
|
+
toggles({ toggle }, $el) {
|
|
5980
|
+
return $$(toggle, $el);
|
|
6029
5981
|
},
|
|
6030
5982
|
children() {
|
|
6031
5983
|
return children(this.$el).filter(
|
|
@@ -6033,6 +5985,26 @@
|
|
|
6033
5985
|
);
|
|
6034
5986
|
}
|
|
6035
5987
|
},
|
|
5988
|
+
watch: {
|
|
5989
|
+
connects(connects) {
|
|
5990
|
+
if (this.swiping) {
|
|
5991
|
+
css(connects, "touchAction", "pan-y pinch-zoom");
|
|
5992
|
+
}
|
|
5993
|
+
this.$emit();
|
|
5994
|
+
},
|
|
5995
|
+
connectChildren() {
|
|
5996
|
+
const index = this.index();
|
|
5997
|
+
for (const el of this.connects) {
|
|
5998
|
+
children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));
|
|
5999
|
+
}
|
|
6000
|
+
this.$emit();
|
|
6001
|
+
},
|
|
6002
|
+
toggles(toggles) {
|
|
6003
|
+
this.$emit();
|
|
6004
|
+
const active = this.index();
|
|
6005
|
+
this.show(~active ? active : toggles[this.active] || toggles[0]);
|
|
6006
|
+
}
|
|
6007
|
+
},
|
|
6036
6008
|
connected() {
|
|
6037
6009
|
attr(this.$el, "role", "tablist");
|
|
6038
6010
|
},
|
|
@@ -6188,12 +6160,9 @@
|
|
|
6188
6160
|
queued: true
|
|
6189
6161
|
},
|
|
6190
6162
|
computed: {
|
|
6191
|
-
target
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
return target.length && target || [$el];
|
|
6195
|
-
},
|
|
6196
|
-
document: true
|
|
6163
|
+
target({ href, target }, $el) {
|
|
6164
|
+
target = queryAll(target || href, $el);
|
|
6165
|
+
return target.length && target || [$el];
|
|
6197
6166
|
}
|
|
6198
6167
|
},
|
|
6199
6168
|
connected() {
|
|
@@ -6679,35 +6648,31 @@
|
|
|
6679
6648
|
duration: 250
|
|
6680
6649
|
},
|
|
6681
6650
|
computed: {
|
|
6682
|
-
toggles
|
|
6683
|
-
|
|
6684
|
-
return $$(`[${attrItem}],[data-${attrItem}]`, $el);
|
|
6685
|
-
},
|
|
6686
|
-
watch(toggles) {
|
|
6687
|
-
this.updateState();
|
|
6688
|
-
const actives = $$(this.selActive, this.$el);
|
|
6689
|
-
for (const toggle of toggles) {
|
|
6690
|
-
if (this.selActive !== false) {
|
|
6691
|
-
toggleClass(toggle, this.cls, includes(actives, toggle));
|
|
6692
|
-
}
|
|
6693
|
-
const button = findButton(toggle);
|
|
6694
|
-
if (isTag(button, "a")) {
|
|
6695
|
-
attr(button, "role", "button");
|
|
6696
|
-
}
|
|
6697
|
-
}
|
|
6698
|
-
},
|
|
6699
|
-
immediate: true
|
|
6651
|
+
toggles({ attrItem }, $el) {
|
|
6652
|
+
return $$(`[${attrItem}],[data-${attrItem}]`, $el);
|
|
6700
6653
|
},
|
|
6701
|
-
children
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6654
|
+
children({ target }, $el) {
|
|
6655
|
+
return $$(`${target} > *`, $el);
|
|
6656
|
+
}
|
|
6657
|
+
},
|
|
6658
|
+
watch: {
|
|
6659
|
+
toggles(toggles) {
|
|
6660
|
+
this.updateState();
|
|
6661
|
+
const actives = $$(this.selActive, this.$el);
|
|
6662
|
+
for (const toggle of toggles) {
|
|
6663
|
+
if (this.selActive !== false) {
|
|
6664
|
+
toggleClass(toggle, this.cls, includes(actives, toggle));
|
|
6708
6665
|
}
|
|
6709
|
-
|
|
6710
|
-
|
|
6666
|
+
const button = findButton(toggle);
|
|
6667
|
+
if (isTag(button, "a")) {
|
|
6668
|
+
attr(button, "role", "button");
|
|
6669
|
+
}
|
|
6670
|
+
}
|
|
6671
|
+
},
|
|
6672
|
+
children(list, prev) {
|
|
6673
|
+
if (prev) {
|
|
6674
|
+
this.updateState();
|
|
6675
|
+
}
|
|
6711
6676
|
}
|
|
6712
6677
|
},
|
|
6713
6678
|
events: {
|
|
@@ -6943,28 +6908,81 @@
|
|
|
6943
6908
|
role: "region"
|
|
6944
6909
|
},
|
|
6945
6910
|
computed: {
|
|
6946
|
-
nav
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
attr(nav, "role", "tablist");
|
|
6952
|
-
if (prev) {
|
|
6953
|
-
this.$emit();
|
|
6954
|
-
}
|
|
6955
|
-
},
|
|
6956
|
-
immediate: true
|
|
6911
|
+
nav({ selNav }, $el) {
|
|
6912
|
+
return $(selNav, $el);
|
|
6913
|
+
},
|
|
6914
|
+
navChildren() {
|
|
6915
|
+
return children(this.nav);
|
|
6957
6916
|
},
|
|
6958
6917
|
selNavItem({ attrItem }) {
|
|
6959
6918
|
return `[${attrItem}],[data-${attrItem}]`;
|
|
6960
6919
|
},
|
|
6961
|
-
navItems
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6920
|
+
navItems(_, $el) {
|
|
6921
|
+
return $$(this.selNavItem, $el);
|
|
6922
|
+
}
|
|
6923
|
+
},
|
|
6924
|
+
watch: {
|
|
6925
|
+
nav(nav, prev) {
|
|
6926
|
+
attr(nav, "role", "tablist");
|
|
6927
|
+
if (prev) {
|
|
6966
6928
|
this.$emit();
|
|
6967
6929
|
}
|
|
6930
|
+
},
|
|
6931
|
+
list(list) {
|
|
6932
|
+
attr(list, "role", "presentation");
|
|
6933
|
+
},
|
|
6934
|
+
navChildren(children2) {
|
|
6935
|
+
attr(children2, "role", "presentation");
|
|
6936
|
+
},
|
|
6937
|
+
navItems(items) {
|
|
6938
|
+
for (const el of items) {
|
|
6939
|
+
const cmd = data(el, this.attrItem);
|
|
6940
|
+
const button = $("a,button", el) || el;
|
|
6941
|
+
let ariaLabel;
|
|
6942
|
+
let ariaControls = null;
|
|
6943
|
+
if (isNumeric(cmd)) {
|
|
6944
|
+
const item = toNumber(cmd);
|
|
6945
|
+
const slide = this.slides[item];
|
|
6946
|
+
if (slide) {
|
|
6947
|
+
if (!slide.id) {
|
|
6948
|
+
slide.id = generateId(this, slide, `-item-${cmd}`);
|
|
6949
|
+
}
|
|
6950
|
+
ariaControls = slide.id;
|
|
6951
|
+
}
|
|
6952
|
+
ariaLabel = this.t("slideX", toFloat(cmd) + 1);
|
|
6953
|
+
attr(button, "role", "tab");
|
|
6954
|
+
} else {
|
|
6955
|
+
if (this.list) {
|
|
6956
|
+
if (!this.list.id) {
|
|
6957
|
+
this.list.id = generateId(this, this.list, "-items");
|
|
6958
|
+
}
|
|
6959
|
+
ariaControls = this.list.id;
|
|
6960
|
+
}
|
|
6961
|
+
ariaLabel = this.t(cmd);
|
|
6962
|
+
}
|
|
6963
|
+
attr(button, {
|
|
6964
|
+
"aria-controls": ariaControls,
|
|
6965
|
+
"aria-label": attr(button, "aria-label") || ariaLabel
|
|
6966
|
+
});
|
|
6967
|
+
}
|
|
6968
|
+
},
|
|
6969
|
+
slides(slides) {
|
|
6970
|
+
slides.forEach(
|
|
6971
|
+
(slide, i) => attr(slide, {
|
|
6972
|
+
role: this.nav ? "tabpanel" : "group",
|
|
6973
|
+
"aria-label": this.t("slideLabel", i + 1, this.length),
|
|
6974
|
+
"aria-roledescription": this.nav ? null : "slide"
|
|
6975
|
+
})
|
|
6976
|
+
);
|
|
6977
|
+
},
|
|
6978
|
+
length(length) {
|
|
6979
|
+
const navLength = this.navChildren.length;
|
|
6980
|
+
if (this.nav && length !== navLength) {
|
|
6981
|
+
empty(this.nav);
|
|
6982
|
+
for (let i = 0; i < length; i++) {
|
|
6983
|
+
append(this.nav, `<li ${this.attrItem}="${i}"><a href></a></li>`);
|
|
6984
|
+
}
|
|
6985
|
+
}
|
|
6968
6986
|
}
|
|
6969
6987
|
},
|
|
6970
6988
|
connected() {
|
|
@@ -6974,54 +6992,6 @@
|
|
|
6974
6992
|
});
|
|
6975
6993
|
},
|
|
6976
6994
|
update: [
|
|
6977
|
-
{
|
|
6978
|
-
write() {
|
|
6979
|
-
this.slides.forEach(
|
|
6980
|
-
(slide, i) => attr(slide, {
|
|
6981
|
-
role: this.nav ? "tabpanel" : "group",
|
|
6982
|
-
"aria-label": this.t("slideLabel", i + 1, this.length),
|
|
6983
|
-
"aria-roledescription": this.nav ? null : "slide"
|
|
6984
|
-
})
|
|
6985
|
-
);
|
|
6986
|
-
if (this.nav && this.length !== this.nav.children.length) {
|
|
6987
|
-
html(
|
|
6988
|
-
this.nav,
|
|
6989
|
-
this.slides.map((_, i) => `<li ${this.attrItem}="${i}"><a href></a></li>`).join("")
|
|
6990
|
-
);
|
|
6991
|
-
}
|
|
6992
|
-
attr(children(this.nav).concat(this.list), "role", "presentation");
|
|
6993
|
-
for (const el of this.navItems) {
|
|
6994
|
-
const cmd = data(el, this.attrItem);
|
|
6995
|
-
const button = $("a,button", el) || el;
|
|
6996
|
-
let ariaLabel;
|
|
6997
|
-
let ariaControls = null;
|
|
6998
|
-
if (isNumeric(cmd)) {
|
|
6999
|
-
const item = toNumber(cmd);
|
|
7000
|
-
const slide = this.slides[item];
|
|
7001
|
-
if (slide) {
|
|
7002
|
-
if (!slide.id) {
|
|
7003
|
-
slide.id = generateId(this, slide, `-item-${cmd}`);
|
|
7004
|
-
}
|
|
7005
|
-
ariaControls = slide.id;
|
|
7006
|
-
}
|
|
7007
|
-
ariaLabel = this.t("slideX", toFloat(cmd) + 1);
|
|
7008
|
-
attr(button, "role", "tab");
|
|
7009
|
-
} else {
|
|
7010
|
-
if (this.list) {
|
|
7011
|
-
if (!this.list.id) {
|
|
7012
|
-
this.list.id = generateId(this, this.list, "-items");
|
|
7013
|
-
}
|
|
7014
|
-
ariaControls = this.list.id;
|
|
7015
|
-
}
|
|
7016
|
-
ariaLabel = this.t(cmd);
|
|
7017
|
-
}
|
|
7018
|
-
attr(button, {
|
|
7019
|
-
"aria-controls": ariaControls,
|
|
7020
|
-
"aria-label": attr(button, "aria-label") || ariaLabel
|
|
7021
|
-
});
|
|
7022
|
-
}
|
|
7023
|
-
}
|
|
7024
|
-
},
|
|
7025
6995
|
{
|
|
7026
6996
|
write() {
|
|
7027
6997
|
this.navItems.concat(this.nav).forEach((el) => el && (el.hidden = !this.maxIndex));
|
|
@@ -7346,18 +7316,20 @@
|
|
|
7346
7316
|
maxIndex() {
|
|
7347
7317
|
return this.length - 1;
|
|
7348
7318
|
},
|
|
7349
|
-
slides
|
|
7350
|
-
|
|
7351
|
-
return children(this.list);
|
|
7352
|
-
},
|
|
7353
|
-
watch() {
|
|
7354
|
-
this.$emit();
|
|
7355
|
-
}
|
|
7319
|
+
slides() {
|
|
7320
|
+
return children(this.list);
|
|
7356
7321
|
},
|
|
7357
7322
|
length() {
|
|
7358
7323
|
return this.slides.length;
|
|
7359
7324
|
}
|
|
7360
7325
|
},
|
|
7326
|
+
watch: {
|
|
7327
|
+
slides(slides, prev) {
|
|
7328
|
+
if (prev) {
|
|
7329
|
+
this.$emit();
|
|
7330
|
+
}
|
|
7331
|
+
}
|
|
7332
|
+
},
|
|
7361
7333
|
observe: resize(),
|
|
7362
7334
|
methods: {
|
|
7363
7335
|
show(index, force = false) {
|
|
@@ -7741,19 +7713,18 @@
|
|
|
7741
7713
|
props: { toggle: String },
|
|
7742
7714
|
data: { toggle: "a" },
|
|
7743
7715
|
computed: {
|
|
7744
|
-
toggles
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7716
|
+
toggles({ toggle }, $el) {
|
|
7717
|
+
return $$(toggle, $el);
|
|
7718
|
+
}
|
|
7719
|
+
},
|
|
7720
|
+
watch: {
|
|
7721
|
+
toggles(toggles) {
|
|
7722
|
+
this.hide();
|
|
7723
|
+
for (const toggle of toggles) {
|
|
7724
|
+
if (isTag(toggle, "a")) {
|
|
7725
|
+
attr(toggle, "role", "button");
|
|
7754
7726
|
}
|
|
7755
|
-
}
|
|
7756
|
-
immediate: true
|
|
7727
|
+
}
|
|
7757
7728
|
}
|
|
7758
7729
|
},
|
|
7759
7730
|
disconnected() {
|
|
@@ -8887,24 +8858,20 @@
|
|
|
8887
8858
|
items() {
|
|
8888
8859
|
return children(this.target);
|
|
8889
8860
|
},
|
|
8890
|
-
isEmpty
|
|
8891
|
-
|
|
8892
|
-
return isEmpty(this.items);
|
|
8893
|
-
},
|
|
8894
|
-
watch(empty) {
|
|
8895
|
-
toggleClass(this.target, this.clsEmpty, empty);
|
|
8896
|
-
},
|
|
8897
|
-
immediate: true
|
|
8861
|
+
isEmpty() {
|
|
8862
|
+
return isEmpty(this.items);
|
|
8898
8863
|
},
|
|
8899
|
-
handles
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8864
|
+
handles({ handle }, el) {
|
|
8865
|
+
return handle ? $$(handle, el) : this.items;
|
|
8866
|
+
}
|
|
8867
|
+
},
|
|
8868
|
+
watch: {
|
|
8869
|
+
isEmpty(empty) {
|
|
8870
|
+
toggleClass(this.target, this.clsEmpty, empty);
|
|
8871
|
+
},
|
|
8872
|
+
handles(handles, prev) {
|
|
8873
|
+
css(prev, { touchAction: "", userSelect: "" });
|
|
8874
|
+
css(handles, { touchAction: hasTouch ? "none" : "", userSelect: "none" });
|
|
8908
8875
|
}
|
|
8909
8876
|
},
|
|
8910
8877
|
update: {
|