uikit 3.25.26 → 3.25.27-dev.eabaa45

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 (49) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/build/util.js +0 -2
  3. package/dist/css/uikit-core-rtl.css +1 -1
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +1 -1
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +1 -1
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +1 -1
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +1 -1
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +1 -1
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +16 -12
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +16 -12
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +1 -1
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +1 -1
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +1 -1
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +15 -2
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +1 -1
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +15 -2
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +1 -1
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +1 -1
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +1 -1
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +48 -45
  38. package/dist/js/uikit-core.min.js +1 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +56 -62
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +1 -1
  44. package/src/js/components/lightbox-panel.js +2 -13
  45. package/src/js/core/dropnav.js +10 -29
  46. package/src/js/core/overflow-auto.js +5 -1
  47. package/src/js/core/switcher.js +6 -13
  48. package/src/js/mixin/slider-nav.js +2 -12
  49. package/src/js/util/keys.js +14 -0
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.25.26 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
1
+ /*! UIkit 3.25.27-dev.eabaa45 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -838,7 +838,7 @@
838
838
  height: ["top", "bottom"]
839
839
  };
840
840
  function dimensions$1(element) {
841
- const rect = isElement(element) ? toNode(element).getBoundingClientRect() : { height: height(element), width: width(element), top: 0, left: 0 };
841
+ const rect = isElement(element) ? toNode(element).getBoundingClientRect() : { height: height$1(element), width: width(element), top: 0, left: 0 };
842
842
  return {
843
843
  height: rect.height,
844
844
  width: rect.width,
@@ -904,7 +904,7 @@
904
904
  }
905
905
  return offset2;
906
906
  }
907
- const height = dimension("height");
907
+ const height$1 = dimension("height");
908
908
  const width = dimension("width");
909
909
  function dimension(prop) {
910
910
  const propName = ucfirst(prop);
@@ -1589,7 +1589,7 @@
1589
1589
  hasClass: hasClass,
1590
1590
  hasOwn: hasOwn,
1591
1591
  hasTouch: hasTouch,
1592
- height: height,
1592
+ height: height$1,
1593
1593
  html: html,
1594
1594
  hyphenate: hyphenate,
1595
1595
  inBrowser: inBrowser,
@@ -2170,16 +2170,16 @@
2170
2170
  removeClass(target, clsLeave);
2171
2171
  });
2172
2172
  const enterFn = wrapIndexFn(async () => {
2173
- const oldHeight = height(target);
2173
+ const oldHeight = height$1(target);
2174
2174
  addClass(target, clsEnter);
2175
2175
  action();
2176
2176
  css(stagger ? children(target) : target, propsOut);
2177
- height(target, oldHeight);
2177
+ height$1(target, oldHeight);
2178
2178
  await awaitTimeout();
2179
- height(target, "");
2180
- const newHeight = height(target);
2179
+ height$1(target, "");
2180
+ const newHeight = height$1(target);
2181
2181
  css(target, "alignContent", "flex-start");
2182
- height(target, oldHeight);
2182
+ height$1(target, oldHeight);
2183
2183
  const transitions = [];
2184
2184
  let targetDuration = duration / 2;
2185
2185
  if (stagger) {
@@ -2353,6 +2353,19 @@
2353
2353
  RIGHT: 39,
2354
2354
  DOWN: 40
2355
2355
  };
2356
+ function getNavigationIndex(keyCode, previousKey = keyMap.LEFT, nextKey = keyMap.RIGHT) {
2357
+ switch (keyCode) {
2358
+ case keyMap.HOME:
2359
+ return 0;
2360
+ case keyMap.END:
2361
+ return "last";
2362
+ case previousKey:
2363
+ return "previous";
2364
+ case nextKey:
2365
+ return "next";
2366
+ }
2367
+ return -1;
2368
+ }
2356
2369
 
2357
2370
  function maybeDefaultPreventClick(e) {
2358
2371
  if (e.target.closest('a[href="#"],a[href=""]')) {
@@ -3405,7 +3418,7 @@
3405
3418
  return Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180 / Math.PI;
3406
3419
  }
3407
3420
 
3408
- var VERSION = '3.25.26';
3421
+ var VERSION = '3.25.27-dev.eabaa45';
3409
3422
 
3410
3423
  function initWatches(instance) {
3411
3424
  instance._watches = [];
@@ -4014,7 +4027,7 @@
4014
4027
  if (!isNumeric(cmd)) {
4015
4028
  return;
4016
4029
  }
4017
- let i = keyCode === keyMap.HOME ? 0 : keyCode === keyMap.END ? "last" : keyCode === keyMap.LEFT ? "previous" : keyCode === keyMap.RIGHT ? "next" : -1;
4030
+ const i = getNavigationIndex(keyCode);
4018
4031
  if (~i) {
4019
4032
  e.preventDefault();
4020
4033
  this.show(i);
@@ -4499,16 +4512,7 @@
4499
4512
  if (!this.isToggled() || !this.draggable) {
4500
4513
  return;
4501
4514
  }
4502
- let i = -1;
4503
- if (keyCode === keyMap.LEFT) {
4504
- i = "previous";
4505
- } else if (keyCode === keyMap.RIGHT) {
4506
- i = "next";
4507
- } else if (keyCode === keyMap.HOME) {
4508
- i = 0;
4509
- } else if (keyCode === keyMap.END) {
4510
- i = "last";
4511
- }
4515
+ const i = getNavigationIndex(keyCode);
4512
4516
  if (~i) {
4513
4517
  this.show(i);
4514
4518
  }
@@ -6165,7 +6169,7 @@
6165
6169
  height: element.offsetHeight,
6166
6170
  padding: css(element, "padding")
6167
6171
  });
6168
- height(clone.firstElementChild, height(element.firstElementChild));
6172
+ height$1(clone.firstElementChild, height$1(element.firstElementChild));
6169
6173
  return clone;
6170
6174
  }
6171
6175
  function findTarget(items, point) {
@@ -7608,18 +7612,7 @@
7608
7612
  return;
7609
7613
  }
7610
7614
  const active2 = this.getActive();
7611
- let next = -1;
7612
- if (keyCode === keyMap.HOME) {
7613
- next = 0;
7614
- } else if (keyCode === keyMap.END) {
7615
- next = "last";
7616
- } else if (keyCode === keyMap.UP) {
7617
- next = "previous";
7618
- } else if (keyCode === keyMap.DOWN) {
7619
- next = "next";
7620
- } else if (keyCode === keyMap.ESC) {
7621
- (_a = active2.targetEl) == null ? void 0 : _a.focus();
7622
- }
7615
+ const next = getNavigationIndex(keyCode, keyMap.UP, keyMap.DOWN);
7623
7616
  if (~next) {
7624
7617
  e.preventDefault();
7625
7618
  const elements = $$(selFocusable, current);
@@ -7630,6 +7623,9 @@
7630
7623
  )].focus();
7631
7624
  return;
7632
7625
  }
7626
+ if (keyCode === keyMap.ESC) {
7627
+ (_a = active2.targetEl) == null ? void 0 : _a.focus();
7628
+ }
7633
7629
  handleNavItemNavigation(e, this.items, active2);
7634
7630
  }
7635
7631
  },
@@ -7719,7 +7715,7 @@
7719
7715
  },
7720
7716
  async transitionTo(newHeight, el) {
7721
7717
  const { dropbar } = this;
7722
- const oldHeight = height(dropbar);
7718
+ const oldHeight = height$1(dropbar);
7723
7719
  el = oldHeight < newHeight && el;
7724
7720
  await Transition.cancel([el, dropbar]);
7725
7721
  if (el) {
@@ -7729,7 +7725,7 @@
7729
7725
  }
7730
7726
  }
7731
7727
  css(el, "clipPath", `polygon(0 0,100% 0,100% ${oldHeight}px,0 ${oldHeight}px)`);
7732
- height(dropbar, oldHeight);
7728
+ height$1(dropbar, oldHeight);
7733
7729
  await Promise.all([
7734
7730
  Transition.start(dropbar, { height: newHeight }, this.duration),
7735
7731
  Transition.start(
@@ -7769,23 +7765,14 @@
7769
7765
  function handleNavItemNavigation(e, toggles, active2) {
7770
7766
  var _a, _b, _c;
7771
7767
  const { current, keyCode } = e;
7772
- let next = -1;
7773
- if (keyCode === keyMap.HOME) {
7774
- next = 0;
7775
- } else if (keyCode === keyMap.END) {
7776
- next = "last";
7777
- } else if (keyCode === keyMap.LEFT) {
7778
- next = "previous";
7779
- } else if (keyCode === keyMap.RIGHT) {
7780
- next = "next";
7781
- } else if (keyCode === keyMap.TAB) {
7782
- (_a = active2.targetEl) == null ? void 0 : _a.focus();
7783
- (_b = active2.hide) == null ? void 0 : _b.call(active2, false);
7784
- }
7768
+ const next = getNavigationIndex(keyCode);
7785
7769
  if (~next) {
7786
7770
  e.preventDefault();
7787
- (_c = active2.hide) == null ? void 0 : _c.call(active2, false);
7771
+ (_a = active2.hide) == null ? void 0 : _a.call(active2, false);
7788
7772
  toggles[getIndex(next, toggles, toggles.indexOf(active2.targetEl || current))].focus();
7773
+ } else if (keyCode === keyMap.TAB) {
7774
+ (_b = active2.targetEl) == null ? void 0 : _b.focus();
7775
+ (_c = active2.hide) == null ? void 0 : _c.call(active2, false);
7789
7776
  }
7790
7777
  }
7791
7778
  function preventInitialPointerEnter(el) {
@@ -8667,7 +8654,7 @@
8667
8654
  } else {
8668
8655
  css(this.$el, "display", "block");
8669
8656
  }
8670
- height(this.$el);
8657
+ height$1(this.$el);
8671
8658
  }
8672
8659
  },
8673
8660
  {
@@ -8904,7 +8891,7 @@
8904
8891
  this.clsSidebarAnimation,
8905
8892
  this.mode === "reveal" ? "" : this.clsMode
8906
8893
  );
8907
- height(body);
8894
+ height$1(body);
8908
8895
  addClass(body, this.clsContainerAnimation);
8909
8896
  this.clsContainerAnimation && suppressUserScale();
8910
8897
  }
@@ -8990,6 +8977,9 @@
8990
8977
  events: ["resize"]
8991
8978
  }
8992
8979
  };
8980
+ function height(el) {
8981
+ return dimensions$1(el).height - boxModelAdjust(el, "height", css(el, "boxSizing"));
8982
+ }
8993
8983
 
8994
8984
  var overflowFade = {
8995
8985
  data: {
@@ -9422,12 +9412,12 @@
9422
9412
  ],
9423
9413
  update: [
9424
9414
  {
9425
- read({ height: height$1, width, margin, sticky }, types) {
9415
+ read({ height, width, margin, sticky }, types) {
9426
9416
  this.inactive = !this.matchMedia || !isVisible(this.$el) || !this.$el.offsetHeight;
9427
9417
  if (this.inactive) {
9428
9418
  return;
9429
9419
  }
9430
- const dynamicViewport = height(window);
9420
+ const dynamicViewport = height$1(window);
9431
9421
  const maxScrollHeight = Math.max(
9432
9422
  0,
9433
9423
  document.scrollingElement.scrollHeight - dynamicViewport
@@ -9442,7 +9432,7 @@
9442
9432
  this.hide();
9443
9433
  }
9444
9434
  if (!this.active) {
9445
- ({ height: height$1, width } = dimensions$1(this.$el));
9435
+ ({ height, width } = dimensions$1(this.$el));
9446
9436
  margin = css(this.$el, "margin");
9447
9437
  }
9448
9438
  if (hide) {
@@ -9450,17 +9440,17 @@
9450
9440
  }
9451
9441
  const viewport2 = toPx("100vh", "height");
9452
9442
  let position = this.position;
9453
- if (this.overflowFlip && height$1 > viewport2) {
9443
+ if (this.overflowFlip && height > viewport2) {
9454
9444
  position = position === "top" ? "bottom" : "top";
9455
9445
  }
9456
9446
  const referenceElement = this.isFixed ? this.placeholder : this.$el;
9457
9447
  let [offset$1, offsetEnd] = [this.offset, this.offsetEnd].map(
9458
9448
  (value) => toPx(value, "height", sticky ? this.$el : referenceElement)
9459
9449
  );
9460
- if (position === "bottom" && (height$1 < dynamicViewport || this.overflowFlip)) {
9461
- offset$1 += dynamicViewport - height$1;
9450
+ if (position === "bottom" && (height < dynamicViewport || this.overflowFlip)) {
9451
+ offset$1 += dynamicViewport - height;
9462
9452
  }
9463
- const elementBox = height$1 + offset$1 + offsetEnd;
9453
+ const elementBox = height + offset$1 + offsetEnd;
9464
9454
  const overflow = this.overflowFlip ? 0 : Math.max(0, elementBox - viewport2);
9465
9455
  const topOffset = offset(referenceElement).top - // offset possible `transform: translateY` animation 'uk-animation-slide-top' while hiding
9466
9456
  new DOMMatrix(css(referenceElement, "transform")).m42;
@@ -9468,7 +9458,7 @@
9468
9458
  const start = (this.start === false ? topOffset : parseProp(this.start, this.$el, topOffset)) - offset$1;
9469
9459
  const end = this.end === false ? maxScrollHeight : Math.min(
9470
9460
  maxScrollHeight,
9471
- parseProp(this.end, this.$el, topOffset + height$1, true) - elHeight - offset$1 + overflow
9461
+ parseProp(this.end, this.$el, topOffset + height, true) - elHeight - offset$1 + overflow
9472
9462
  );
9473
9463
  sticky = !this.showOnUp && start + offset$1 === topOffset && end === Math.min(
9474
9464
  maxScrollHeight,
@@ -9479,7 +9469,7 @@
9479
9469
  end,
9480
9470
  offset: offset$1,
9481
9471
  overflow,
9482
- height: height$1,
9472
+ height,
9483
9473
  elHeight,
9484
9474
  width,
9485
9475
  margin,
@@ -9851,7 +9841,11 @@
9851
9841
  handler(e) {
9852
9842
  const { current, keyCode } = e;
9853
9843
  const isVertical = matches(this.$el, this.selVertical);
9854
- let i = keyCode === keyMap.HOME ? 0 : keyCode === keyMap.END ? "last" : keyCode === keyMap.LEFT && !isVertical || keyCode === keyMap.UP && isVertical ? "previous" : keyCode === keyMap.RIGHT && !isVertical || keyCode === keyMap.DOWN && isVertical ? "next" : -1;
9844
+ const i = getNavigationIndex(
9845
+ keyCode,
9846
+ isVertical ? keyMap.UP : keyMap.LEFT,
9847
+ isVertical ? keyMap.DOWN : keyMap.RIGHT
9848
+ );
9855
9849
  if (~i) {
9856
9850
  e.preventDefault();
9857
9851
  const next = this.toggles[this.next(i, this.toggles.indexOf(current))];