uikit 3.21.5 → 3.21.6-dev.4d6c5e2f9

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 (50) hide show
  1. package/CHANGELOG.md +8 -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 +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 +7 -2
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +7 -2
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +7 -2
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +7 -2
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +7 -2
  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 +24 -11
  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 +24 -11
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/drop.js +5 -1
  44. package/src/js/core/scrollspy-nav.js +1 -1
  45. package/src/js/core/sticky.js +13 -4
  46. package/src/js/mixin/position.js +1 -1
  47. package/src/js/util/dom.js +1 -2
  48. package/src/js/util/player.js +2 -2
  49. package/src/js/util/svg.js +3 -1
  50. package/tests/js/index.js +1 -1
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.21.5 | https://www.getuikit.com | (c) 2014 - 2024 YOOtheme | MIT License */
1
+ /*! UIkit 3.21.6-dev.4d6c5e2f9 | 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() :
@@ -807,9 +807,8 @@
807
807
  fn(node);
808
808
  node = node.firstElementChild;
809
809
  while (node) {
810
- const next = node.nextElementSibling;
811
810
  apply(node, fn);
812
- node = next;
811
+ node = node.nextElementSibling;
813
812
  }
814
813
  }
815
814
  function $(selector, context) {
@@ -1122,7 +1121,7 @@
1122
1121
  call(el, { func: "playVideo", method: "play" });
1123
1122
  }
1124
1123
  if (isHTML5(el)) {
1125
- el.play();
1124
+ el.play().catch(noop);
1126
1125
  }
1127
1126
  }
1128
1127
  function pause(el) {
@@ -2169,7 +2168,7 @@
2169
2168
  };
2170
2169
  App.util = util;
2171
2170
  App.options = {};
2172
- App.version = "3.21.5";
2171
+ App.version = "3.21.6-dev.4d6c5e2f9";
2173
2172
 
2174
2173
  const PREFIX = "uk-";
2175
2174
  const DATA = "__uikit__";
@@ -3440,6 +3439,7 @@
3440
3439
  return [this.$el, ...$$(".uk-drop", this.$el)].some((el) => this.tracker.movesTo(el));
3441
3440
  },
3442
3441
  position() {
3442
+ const restoreScrollPosition = storeScrollPosition(this.$el);
3443
3443
  removeClass(this.$el, "uk-drop-stack");
3444
3444
  css(this.$el, this._style);
3445
3445
  this.$el.hidden = true;
@@ -3486,6 +3486,7 @@
3486
3486
  this.positionAt(this.$el, this.target, this.boundary);
3487
3487
  }
3488
3488
  }
3489
+ restoreScrollPosition();
3489
3490
  }
3490
3491
  }
3491
3492
  };
@@ -4418,7 +4419,12 @@
4418
4419
  }
4419
4420
 
4420
4421
  function getMaxPathLength(el) {
4421
- return isVisible(el) ? Math.ceil(Math.max(0, ...$$("[stroke]", el).map((stroke) => stroke.getTotalLength()))) : 0;
4422
+ return isVisible(el) ? Math.ceil(
4423
+ Math.max(0, ...$$("[stroke]", el).map((stroke) => {
4424
+ var _a;
4425
+ return ((_a = stroke.getTotalLength) == null ? void 0 : _a.call(stroke)) || 0;
4426
+ }))
4427
+ ) : 0;
4422
4428
  }
4423
4429
 
4424
4430
  var svg = {
@@ -5751,7 +5757,7 @@
5751
5757
  cls: "uk-active",
5752
5758
  closest: false,
5753
5759
  scroll: false,
5754
- target: "a[href]",
5760
+ target: 'a[href]:not([role="button"])',
5755
5761
  offset: 0
5756
5762
  },
5757
5763
  computed: {
@@ -5868,10 +5874,10 @@
5868
5874
  viewport(),
5869
5875
  scroll$1({ target: () => document.scrollingElement }),
5870
5876
  resize({
5871
- target: ({ $el }) => [$el, parent($el), document.scrollingElement],
5877
+ target: ({ $el }) => [$el, getVisibleParent($el), document.scrollingElement],
5872
5878
  handler(entries) {
5873
5879
  this.$emit(
5874
- this._data.resized && entries.some(({ target }) => target === parent(this.$el)) ? "update" : "resize"
5880
+ this._data.resized && entries.some(({ target }) => target === getVisibleParent(this.$el)) ? "update" : "resize"
5875
5881
  );
5876
5882
  this._data.resized = true;
5877
5883
  }
@@ -5944,7 +5950,7 @@
5944
5950
  sticky = maxScrollHeight && !this.showOnUp && start + offset$1 === topOffset && end === Math.min(
5945
5951
  maxScrollHeight,
5946
5952
  parseProp(true, this.$el, 0, true) - elHeight - offset$1 + overflow
5947
- ) && css(parent(this.$el), "overflowY") === "visible";
5953
+ ) && css(getVisibleParent(this.$el), "overflowY") === "visible";
5948
5954
  return {
5949
5955
  start,
5950
5956
  end,
@@ -6135,7 +6141,7 @@
6135
6141
  if (isNumeric(value) || isString(value) && value.match(/^-?\d/)) {
6136
6142
  return propOffset + toPx(value, "height", el, true);
6137
6143
  } else {
6138
- const refElement = value === true ? parent(el) : query(value, el);
6144
+ const refElement = value === true ? getVisibleParent(el) : query(value, el);
6139
6145
  return offset(refElement).bottom - (padding && (refElement == null ? void 0 : refElement.contains(el)) ? toFloat(css(refElement, "paddingBottom")) : 0);
6140
6146
  }
6141
6147
  }
@@ -6157,6 +6163,13 @@
6157
6163
  requestAnimationFrame(() => removeClass(element, clsTransitionDisable));
6158
6164
  }
6159
6165
  }
6166
+ function getVisibleParent(element) {
6167
+ while (element = parent(element)) {
6168
+ if (isVisible(element)) {
6169
+ return element;
6170
+ }
6171
+ }
6172
+ }
6160
6173
 
6161
6174
  const selDisabled = ".uk-disabled *, .uk-disabled, [disabled]";
6162
6175
  var Switcher = {