uikit 3.21.5-dev.ed4adca92 → 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 (53) hide show
  1. package/CHANGELOG.md +10 -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 +30 -17
  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 +30 -17
  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/dropnav.js +3 -2
  45. package/src/js/core/height-viewport.js +2 -3
  46. package/src/js/core/icon.js +1 -1
  47. package/src/js/core/scrollspy-nav.js +1 -1
  48. package/src/js/core/sticky.js +14 -5
  49. package/src/js/mixin/position.js +1 -1
  50. package/src/js/util/dom.js +1 -2
  51. package/src/js/util/player.js +2 -2
  52. package/src/js/util/svg.js +3 -1
  53. package/tests/js/index.js +1 -1
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.21.5-dev.ed4adca92 | 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-dev.ed4adca92";
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
  };
@@ -3656,8 +3657,8 @@
3656
3657
  delegate: ({ clsDrop }) => `.${clsDrop}`,
3657
3658
  handler(e) {
3658
3659
  var _a;
3659
- const { current, keyCode } = e;
3660
- if (!includes(this.dropdowns, current)) {
3660
+ const { current, keyCode, target } = e;
3661
+ if (isInput(target) || !includes(this.dropdowns, current)) {
3661
3662
  return;
3662
3663
  }
3663
3664
  const active2 = this.getActive();
@@ -4266,7 +4267,7 @@
4266
4267
  if (this.offsetTop) {
4267
4268
  if (isScrollingElement) {
4268
4269
  const offsetTopEl = this.offsetTop === true ? this.$el : query(this.offsetTop, this.$el);
4269
- const top = offsetPosition(offsetTopEl)[0] - offsetPosition(scrollElement)[0];
4270
+ const { top } = offset(offsetTopEl);
4270
4271
  minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : "";
4271
4272
  } else {
4272
4273
  minHeight += ` - ${boxModelAdjust(scrollElement, "height", css(scrollElement, "boxSizing"))}px`;
@@ -4316,10 +4317,10 @@
4316
4317
 
4317
4318
  var searchIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9\" cy=\"9\" r=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M14,14 L18,18 L14,14 Z\"/></svg>";
4318
4319
 
4319
- var searchMedium = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10.5\" cy=\"10.5\" r=\"9.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"23\" y1=\"23\" x2=\"17\" y2=\"17\"/></svg>";
4320
-
4321
4320
  var searchLarge = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" cx=\"17.5\" cy=\"17.5\" r=\"16.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" x1=\"38\" y1=\"39\" x2=\"29\" y2=\"30\"/></svg>";
4322
4321
 
4322
+ var searchMedium = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10.5\" cy=\"10.5\" r=\"9.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"23\" y1=\"23\" x2=\"17\" y2=\"17\"/></svg>";
4323
+
4323
4324
  var slidenavNextLarge = "<svg width=\"25\" height=\"40\" viewBox=\"0 0 25 40\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"4.002,38.547 22.527,20.024 4,1.5\"/></svg>";
4324
4325
 
4325
4326
  var slidenavNext = "<svg width=\"14\" height=\"24\" viewBox=\"0 0 14 24\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"1.225,23 12.775,12 1.225,1\"/></svg>";
@@ -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
  }
@@ -5902,7 +5908,7 @@
5902
5908
  update: [
5903
5909
  {
5904
5910
  read({ height: height$1, width, margin, sticky }, types) {
5905
- this.inactive = !this.matchMedia || !isVisible(this.$el);
5911
+ this.inactive = !this.matchMedia || !isVisible(this.$el) || !this.$el.offsetHeight;
5906
5912
  if (this.inactive) {
5907
5913
  return;
5908
5914
  }
@@ -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 = {