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.
Files changed (61) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/css/uikit-core-rtl.css +1 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -1
  9. package/dist/css/uikit.min.css +1 -1
  10. package/dist/js/components/countdown.js +1 -1
  11. package/dist/js/components/countdown.min.js +1 -1
  12. package/dist/js/components/filter.js +24 -28
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +79 -72
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +90 -84
  17. package/dist/js/components/lightbox.min.js +1 -1
  18. package/dist/js/components/notification.js +1 -1
  19. package/dist/js/components/notification.min.js +1 -1
  20. package/dist/js/components/parallax.js +1 -1
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +1 -1
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +79 -72
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +1 -1
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +79 -72
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +14 -18
  31. package/dist/js/components/sortable.min.js +1 -1
  32. package/dist/js/components/tooltip.js +1 -1
  33. package/dist/js/components/tooltip.min.js +1 -1
  34. package/dist/js/components/upload.js +1 -1
  35. package/dist/js/components/upload.min.js +1 -1
  36. package/dist/js/uikit-core.js +256 -279
  37. package/dist/js/uikit-core.min.js +1 -1
  38. package/dist/js/uikit-icons.js +1 -1
  39. package/dist/js/uikit-icons.min.js +1 -1
  40. package/dist/js/uikit.js +381 -406
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/computed.js +7 -1
  44. package/src/js/api/hooks.js +7 -4
  45. package/src/js/api/observer.js +44 -43
  46. package/src/js/api/options.js +1 -0
  47. package/src/js/api/update.js +15 -36
  48. package/src/js/api/watch.js +33 -20
  49. package/src/js/components/filter.js +23 -29
  50. package/src/js/components/lightbox.js +12 -14
  51. package/src/js/components/sortable.js +13 -19
  52. package/src/js/core/accordion.js +32 -45
  53. package/src/js/core/dropnav.js +37 -43
  54. package/src/js/core/height-match.js +2 -8
  55. package/src/js/core/navbar.js +3 -12
  56. package/src/js/core/scrollspy-nav.js +10 -12
  57. package/src/js/core/scrollspy.js +10 -12
  58. package/src/js/core/switcher.js +30 -37
  59. package/src/js/mixin/slider-nav.js +80 -76
  60. package/src/js/mixin/slider.js +10 -8
  61. package/src/js/util/fastdom.js +2 -2
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.16.10 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
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, prepend) {
963
- this.reads[prepend ? "unshift" : "push"](task);
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 initObservers(instance) {
1670
- instance._observers = [];
1671
- instance._observerUpdates = /* @__PURE__ */ new Map();
1672
- for (const observer of instance.$options.observe || []) {
1673
- if (hasOwn(observer, "handler")) {
1674
- registerObservable(instance, observer);
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 registerObserver(instance, ...observer) {
1683
- instance._observers.push(...observer);
1684
- }
1685
- function disconnectObservers(instance) {
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 watchChange(instance, targetFn, targets) {
1720
- return (observer) => {
1721
- const newTargets = targetFn.call(instance, instance);
1722
- if (isEqual(targets, newTargets)) {
1723
- return;
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
- targets.forEach((target) => !includes(newTargets, target) && observer.unobserve(target));
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 callWatches(instance) {
1732
- if (instance._watch) {
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 runWatches(instance, initial) {
1744
- const values = { ...instance._computed };
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._updates) {
1765
- instance._updates = /* @__PURE__ */ new Set();
1716
+ if (!instance._queued) {
1717
+ instance._queued = /* @__PURE__ */ new Set();
1766
1718
  fastdom.read(() => {
1767
1719
  if (instance._connected) {
1768
- runUpdates(instance, instance._updates);
1720
+ runUpdates(instance, instance._queued);
1769
1721
  }
1770
- delete instance._updates;
1722
+ delete instance._queued;
1771
1723
  });
1772
1724
  }
1773
- instance._updates.add(e.type || e);
1725
+ instance._queued.add(e.type || e);
1774
1726
  }
1775
1727
  function runUpdates(instance, types) {
1776
- for (const { read, write, events = [] } of instance.$options.update) {
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
- function initUpdateObserver(instance) {
1797
- let { el, computed, observe } = instance.$options;
1798
- if (!computed && !(observe == null ? void 0 : observe.some((options) => isFunction(options.target)))) {
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
- for (const key in computed || {}) {
1802
- if (computed[key].document) {
1803
- el = el.ownerDocument;
1804
- break;
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
- initUpdateObserver(instance);
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.10";
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
- get({ targets }, $el) {
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
- get({ toggle }) {
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
- get({ content }) {
2715
- return this.items.map(
2716
- (item) => {
2717
- var _a;
2718
- return ((_a = item._wrapper) == null ? void 0 : _a.firstElementChild) || $(content, item);
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
- watch(items) {
2723
- for (const el of items) {
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
- get({ dropbar }) {
3545
- if (!dropbar) {
3546
- return null;
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
- dropbar = this._dropbar || query(dropbar, this.$el) || $(`+ .${this.clsDropbar}`, this.$el);
3549
- return dropbar ? dropbar : this._dropbar = $("<div></div>");
3550
- },
3551
- watch(dropbar) {
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
- get({ clsDrop }, $el) {
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
- get({ selNavItem }, $el) {
3596
- return $$(selNavItem, $el);
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
- get({ target }, $el) {
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
- computed: {
5141
+ watch: {
5151
5142
  items: {
5152
- get({ selNavItem }, $el) {
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
- get({ target }, $el) {
5455
- return target ? $$(target, $el) : [$el];
5456
- },
5457
- watch(elements) {
5458
- if (this.hidden) {
5459
- css(filter$1(elements, `:not(.${this.inViewClass})`), "opacity", 0);
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$1(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
- get(_, $el) {
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
- get({ connect }, $el) {
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
- toggles: {
6020
- get({ toggle }, $el) {
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
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
- children() {
6031
- return children(this.$el).filter(
6032
- (child) => this.toggles.some((toggle) => within(toggle, child))
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() {
@@ -6679,35 +6656,31 @@
6679
6656
  duration: 250
6680
6657
  },
6681
6658
  computed: {
6682
- toggles: {
6683
- get({ attrItem }, $el) {
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
6659
+ toggles({ attrItem }, $el) {
6660
+ return $$(`[${attrItem}],[data-${attrItem}]`, $el);
6700
6661
  },
6701
- children: {
6702
- get({ target }, $el) {
6703
- return $$(`${target} > *`, $el);
6704
- },
6705
- watch(list, prev) {
6706
- if (prev) {
6707
- this.updateState();
6662
+ children({ target }, $el) {
6663
+ return $$(`${target} > *`, $el);
6664
+ }
6665
+ },
6666
+ watch: {
6667
+ toggles(toggles) {
6668
+ this.updateState();
6669
+ const actives = $$(this.selActive, this.$el);
6670
+ for (const toggle of toggles) {
6671
+ if (this.selActive !== false) {
6672
+ toggleClass(toggle, this.cls, includes(actives, toggle));
6708
6673
  }
6709
- },
6710
- immediate: true
6674
+ const button = findButton(toggle);
6675
+ if (isTag(button, "a")) {
6676
+ attr(button, "role", "button");
6677
+ }
6678
+ }
6679
+ },
6680
+ children(list, prev) {
6681
+ if (prev) {
6682
+ this.updateState();
6683
+ }
6711
6684
  }
6712
6685
  },
6713
6686
  events: {
@@ -6943,28 +6916,81 @@
6943
6916
  role: "region"
6944
6917
  },
6945
6918
  computed: {
6946
- nav: {
6947
- get({ selNav }, $el) {
6948
- return $(selNav, $el);
6949
- },
6950
- watch(nav, prev) {
6951
- attr(nav, "role", "tablist");
6952
- if (prev) {
6953
- this.$emit();
6954
- }
6955
- },
6956
- immediate: true
6919
+ nav({ selNav }, $el) {
6920
+ return $(selNav, $el);
6921
+ },
6922
+ navChildren() {
6923
+ return children(this.nav);
6957
6924
  },
6958
6925
  selNavItem({ attrItem }) {
6959
6926
  return `[${attrItem}],[data-${attrItem}]`;
6960
6927
  },
6961
- navItems: {
6962
- get(_, $el) {
6963
- return $$(this.selNavItem, $el);
6964
- },
6965
- watch() {
6928
+ navItems(_, $el) {
6929
+ return $$(this.selNavItem, $el);
6930
+ }
6931
+ },
6932
+ watch: {
6933
+ nav(nav, prev) {
6934
+ attr(nav, "role", "tablist");
6935
+ if (prev) {
6966
6936
  this.$emit();
6967
6937
  }
6938
+ },
6939
+ list(list) {
6940
+ attr(list, "role", "presentation");
6941
+ },
6942
+ navChildren(children2) {
6943
+ attr(children2, "role", "presentation");
6944
+ },
6945
+ navItems(items) {
6946
+ for (const el of items) {
6947
+ const cmd = data(el, this.attrItem);
6948
+ const button = $("a,button", el) || el;
6949
+ let ariaLabel;
6950
+ let ariaControls = null;
6951
+ if (isNumeric(cmd)) {
6952
+ const item = toNumber(cmd);
6953
+ const slide = this.slides[item];
6954
+ if (slide) {
6955
+ if (!slide.id) {
6956
+ slide.id = generateId(this, slide, `-item-${cmd}`);
6957
+ }
6958
+ ariaControls = slide.id;
6959
+ }
6960
+ ariaLabel = this.t("slideX", toFloat(cmd) + 1);
6961
+ attr(button, "role", "tab");
6962
+ } else {
6963
+ if (this.list) {
6964
+ if (!this.list.id) {
6965
+ this.list.id = generateId(this, this.list, "-items");
6966
+ }
6967
+ ariaControls = this.list.id;
6968
+ }
6969
+ ariaLabel = this.t(cmd);
6970
+ }
6971
+ attr(button, {
6972
+ "aria-controls": ariaControls,
6973
+ "aria-label": attr(button, "aria-label") || ariaLabel
6974
+ });
6975
+ }
6976
+ },
6977
+ slides(slides) {
6978
+ slides.forEach(
6979
+ (slide, i) => attr(slide, {
6980
+ role: this.nav ? "tabpanel" : "group",
6981
+ "aria-label": this.t("slideLabel", i + 1, this.length),
6982
+ "aria-roledescription": this.nav ? null : "slide"
6983
+ })
6984
+ );
6985
+ },
6986
+ length(length) {
6987
+ const navLength = this.navChildren.length;
6988
+ if (this.nav && length !== navLength) {
6989
+ empty(this.nav);
6990
+ for (let i = 0; i < length; i++) {
6991
+ append(this.nav, `<li ${this.attrItem}="${i}"><a href></a></li>`);
6992
+ }
6993
+ }
6968
6994
  }
6969
6995
  },
6970
6996
  connected() {
@@ -6974,54 +7000,6 @@
6974
7000
  });
6975
7001
  },
6976
7002
  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
7003
  {
7026
7004
  write() {
7027
7005
  this.navItems.concat(this.nav).forEach((el) => el && (el.hidden = !this.maxIndex));
@@ -7346,18 +7324,20 @@
7346
7324
  maxIndex() {
7347
7325
  return this.length - 1;
7348
7326
  },
7349
- slides: {
7350
- get() {
7351
- return children(this.list);
7352
- },
7353
- watch() {
7354
- this.$emit();
7355
- }
7327
+ slides() {
7328
+ return children(this.list);
7356
7329
  },
7357
7330
  length() {
7358
7331
  return this.slides.length;
7359
7332
  }
7360
7333
  },
7334
+ watch: {
7335
+ slides(slides, prev) {
7336
+ if (prev) {
7337
+ this.$emit();
7338
+ }
7339
+ }
7340
+ },
7361
7341
  observe: resize(),
7362
7342
  methods: {
7363
7343
  show(index, force = false) {
@@ -7741,19 +7721,18 @@
7741
7721
  props: { toggle: String },
7742
7722
  data: { toggle: "a" },
7743
7723
  computed: {
7744
- toggles: {
7745
- get({ toggle }, $el) {
7746
- return $$(toggle, $el);
7747
- },
7748
- watch(toggles) {
7749
- this.hide();
7750
- for (const toggle of toggles) {
7751
- if (isTag(toggle, "a")) {
7752
- attr(toggle, "role", "button");
7753
- }
7724
+ toggles({ toggle }, $el) {
7725
+ return $$(toggle, $el);
7726
+ }
7727
+ },
7728
+ watch: {
7729
+ toggles(toggles) {
7730
+ this.hide();
7731
+ for (const toggle of toggles) {
7732
+ if (isTag(toggle, "a")) {
7733
+ attr(toggle, "role", "button");
7754
7734
  }
7755
- },
7756
- immediate: true
7735
+ }
7757
7736
  }
7758
7737
  },
7759
7738
  disconnected() {
@@ -8887,24 +8866,20 @@
8887
8866
  items() {
8888
8867
  return children(this.target);
8889
8868
  },
8890
- isEmpty: {
8891
- get() {
8892
- return isEmpty(this.items);
8893
- },
8894
- watch(empty) {
8895
- toggleClass(this.target, this.clsEmpty, empty);
8896
- },
8897
- immediate: true
8869
+ isEmpty() {
8870
+ return isEmpty(this.items);
8898
8871
  },
8899
- handles: {
8900
- get({ handle }, el) {
8901
- return handle ? $$(handle, el) : this.items;
8902
- },
8903
- watch(handles, prev) {
8904
- css(prev, { touchAction: "", userSelect: "" });
8905
- css(handles, { touchAction: hasTouch ? "none" : "", userSelect: "none" });
8906
- },
8907
- immediate: true
8872
+ handles({ handle }, el) {
8873
+ return handle ? $$(handle, el) : this.items;
8874
+ }
8875
+ },
8876
+ watch: {
8877
+ isEmpty(empty) {
8878
+ toggleClass(this.target, this.clsEmpty, empty);
8879
+ },
8880
+ handles(handles, prev) {
8881
+ css(prev, { touchAction: "", userSelect: "" });
8882
+ css(handles, { touchAction: hasTouch ? "none" : "", userSelect: "none" });
8908
8883
  }
8909
8884
  },
8910
8885
  update: {