uikit 3.19.5-dev.a8d51a358 → 3.19.5-dev.b0b54f9e4

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 (54) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/css/uikit-core-rtl.css +2 -2
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +2 -2
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +2 -2
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +2 -2
  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 +1 -1
  13. package/dist/js/components/filter.min.js +1 -1
  14. package/dist/js/components/lightbox-panel.js +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  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 +6 -4
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +7 -5
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +6 -4
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +7 -5
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +6 -4
  29. package/dist/js/components/slideshow.min.js +1 -1
  30. package/dist/js/components/sortable.js +1 -1
  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 +50 -43
  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 +56 -47
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/computed.js +24 -23
  44. package/src/js/components/slider-parallax.js +2 -2
  45. package/src/js/core/drop.js +1 -2
  46. package/src/js/core/height-placeholder.js +5 -2
  47. package/src/js/core/icon.js +2 -3
  48. package/src/js/core/modal.js +5 -6
  49. package/src/js/core/switcher.js +5 -1
  50. package/src/js/core/toggle.js +7 -3
  51. package/src/js/mixin/parallax.js +7 -3
  52. package/src/js/util/filter.js +7 -14
  53. package/src/less/components/utility.less +1 -1
  54. package/src/scss/components/utility.scss +1 -1
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.19.5-dev.a8d51a358 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
1
+ /*! UIkit 3.19.5-dev.b0b54f9e4 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -296,10 +296,11 @@
296
296
  function isVoidElement(element) {
297
297
  return toNodes(element).some((element2) => voidElements[element2.tagName.toLowerCase()]);
298
298
  }
299
+ const isVisibleFn = Element.prototype.checkVisibility || function() {
300
+ return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
301
+ };
299
302
  function isVisible(element) {
300
- return toNodes(element).some(
301
- (element2) => element2.offsetWidth || element2.offsetHeight || element2.getClientRects().length
302
- );
303
+ return toNodes(element).some((element2) => isVisibleFn.call(element2));
303
304
  }
304
305
  const selInput = "input,select,textarea,button";
305
306
  function isInput(element) {
@@ -319,13 +320,6 @@
319
320
  function matches(element, selector) {
320
321
  return toNodes(element).some((element2) => element2.matches(selector));
321
322
  }
322
- function closest(element, selector) {
323
- var _a;
324
- return (_a = toNode(element)) == null ? void 0 : _a.closest(startsWith(selector, ">") ? selector.slice(1) : selector);
325
- }
326
- function within(element, selector) {
327
- return isString(selector) ? !!closest(element, selector) : toNode(selector).contains(toNode(element));
328
- }
329
323
  function parents(element, selector) {
330
324
  const elements = [];
331
325
  while (element = parent(element)) {
@@ -1567,7 +1561,6 @@
1567
1561
  camelize: camelize,
1568
1562
  children: children,
1569
1563
  clamp: clamp,
1570
- closest: closest,
1571
1564
  createEvent: createEvent,
1572
1565
  css: css,
1573
1566
  data: data,
@@ -1688,7 +1681,6 @@
1688
1681
  uniqueBy: uniqueBy,
1689
1682
  unwrap: unwrap,
1690
1683
  width: width,
1691
- within: within,
1692
1684
  wrapAll: wrapAll,
1693
1685
  wrapInner: wrapInner
1694
1686
  });
@@ -1776,6 +1768,7 @@
1776
1768
  }
1777
1769
  }
1778
1770
  }
1771
+ const mutationOptions = { subtree: true, childList: true };
1779
1772
  function registerComputed(instance, key, cb) {
1780
1773
  instance._hasComputed = true;
1781
1774
  Object.defineProperty(instance, key, {
@@ -1784,6 +1777,15 @@
1784
1777
  const { _computed, $props, $el } = instance;
1785
1778
  if (!hasOwn(_computed, key)) {
1786
1779
  _computed[key] = (cb.get || cb).call(instance, $props, $el);
1780
+ if (cb.observe && instance._computedObserver) {
1781
+ const observeEl = cb.observe.call(instance, _computed[key]);
1782
+ if (observeEl && observeEl !== $el) {
1783
+ instance._computedObserver.observe(
1784
+ findClosestCommonParent(observeEl, $el),
1785
+ mutationOptions
1786
+ );
1787
+ }
1788
+ }
1787
1789
  }
1788
1790
  return _computed[key];
1789
1791
  },
@@ -1804,11 +1806,16 @@
1804
1806
  read: () => runWatches(instance, resetComputed(instance)),
1805
1807
  events: ["resize", "computed"]
1806
1808
  });
1807
- registerComputedObserver();
1808
- instances$1.add(instance);
1809
+ instance._computedObserver = observeMutation(
1810
+ instance.$el,
1811
+ () => callUpdate(instance, "computed"),
1812
+ mutationOptions
1813
+ );
1809
1814
  }
1810
1815
  function disconnectComputedUpdates(instance) {
1811
- instances$1 == null ? void 0 : instances$1.delete(instance);
1816
+ var _a;
1817
+ (_a = instance._computedObserver) == null ? void 0 : _a.disconnect();
1818
+ delete instance._computedObserver;
1812
1819
  resetComputed(instance);
1813
1820
  }
1814
1821
  function resetComputed(instance) {
@@ -1816,22 +1823,11 @@
1816
1823
  instance._computed = {};
1817
1824
  return values;
1818
1825
  }
1819
- let observer;
1820
- let instances$1;
1821
- function registerComputedObserver() {
1822
- if (observer) {
1823
- return;
1826
+ function findClosestCommonParent(el1, el2) {
1827
+ while (el1 && !el1.contains(el2)) {
1828
+ el1 = el1.parentNode;
1824
1829
  }
1825
- instances$1 = /* @__PURE__ */ new Set();
1826
- observer = new MutationObserver(() => {
1827
- for (const instance of instances$1) {
1828
- callUpdate(instance, "computed");
1829
- }
1830
- });
1831
- observer.observe(document, {
1832
- subtree: true,
1833
- childList: true
1834
- });
1830
+ return el1;
1835
1831
  }
1836
1832
 
1837
1833
  function initEvents(instance) {
@@ -2192,7 +2188,7 @@
2192
2188
  };
2193
2189
  App.util = util;
2194
2190
  App.options = {};
2195
- App.version = "3.19.5-dev.a8d51a358";
2191
+ App.version = "3.19.5-dev.b0b54f9e4";
2196
2192
 
2197
2193
  const PREFIX = "uk-";
2198
2194
  const DATA = "__uikit__";
@@ -3582,7 +3578,8 @@
3582
3578
  document,
3583
3579
  `${pointerUp} ${pointerCancel} scroll`,
3584
3580
  ({ defaultPrevented, type, target: newTarget }) => {
3585
- if (!defaultPrevented && type === pointerUp && target === newTarget && !(drop.targetEl && within(target, drop.targetEl))) {
3581
+ var _a;
3582
+ if (!defaultPrevented && type === pointerUp && target === newTarget && !((_a = drop.targetEl) == null ? void 0 : _a.contains(target))) {
3586
3583
  drop.hide(false);
3587
3584
  }
3588
3585
  },
@@ -4289,7 +4286,10 @@
4289
4286
  target: ""
4290
4287
  },
4291
4288
  computed: {
4292
- target: ({ target }, $el) => query(target, $el)
4289
+ target: {
4290
+ get: ({ target }, $el) => query(target, $el),
4291
+ observe: (target) => parent(target)
4292
+ }
4293
4293
  },
4294
4294
  observe: resize({ target: ({ target }) => target }),
4295
4295
  update: {
@@ -4558,7 +4558,7 @@
4558
4558
  i18n: { toggle: "Open Search", submit: "Submit Search" },
4559
4559
  beforeConnect() {
4560
4560
  const isToggle = hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle");
4561
- this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") && closest(this.$el, ".uk-search-large") ? "search-large" : closest(this.$el, ".uk-search-navbar") ? "search-navbar" : this.$props.icon;
4561
+ this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") && this.$el.closest(".uk-search-large") ? "search-large" : this.$el.closest(".uk-search-navbar") ? "search-navbar" : this.$props.icon;
4562
4562
  if (hasAttr(this.$el, "aria-label")) {
4563
4563
  return;
4564
4564
  }
@@ -5220,10 +5220,11 @@
5220
5220
  };
5221
5221
  function install({ modal }) {
5222
5222
  modal.dialog = function(content, options) {
5223
- const dialog = modal(
5224
- `<div class="uk-modal"> <div class="uk-modal-dialog">${content}</div> </div>`,
5225
- { stack: true, role: "alertdialog", ...options }
5226
- );
5223
+ const dialog = modal($(`<div><div class="uk-modal-dialog">${content}</div></div>`), {
5224
+ stack: true,
5225
+ role: "alertdialog",
5226
+ ...options
5227
+ });
5227
5228
  dialog.show();
5228
5229
  on(
5229
5230
  dialog.$el,
@@ -6262,7 +6263,10 @@
6262
6263
  swiping: true
6263
6264
  },
6264
6265
  computed: {
6265
- connects: ({ connect }, $el) => queryAll(connect, $el),
6266
+ connects: {
6267
+ get: ({ connect }, $el) => queryAll(connect, $el),
6268
+ observe: (connects) => parent(connects[0])
6269
+ },
6266
6270
  connectChildren() {
6267
6271
  return this.connects.map((el) => children(el)).flat();
6268
6272
  },
@@ -6451,9 +6455,12 @@
6451
6455
  queued: true
6452
6456
  },
6453
6457
  computed: {
6454
- target({ target }, $el) {
6455
- target = queryAll(target || $el.hash, $el);
6456
- return target.length ? target : [$el];
6458
+ target: {
6459
+ get: ({ target }, $el) => {
6460
+ target = queryAll(target || $el.hash, $el);
6461
+ return target.length ? target : [$el];
6462
+ },
6463
+ observe: (target) => parent(target[0])
6457
6464
  }
6458
6465
  },
6459
6466
  connected() {