uikit 3.23.6-dev.99eccf626 → 3.23.6-dev.eb1cbd14e

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 (59) hide show
  1. package/dist/css/uikit-core-rtl.css +1 -1
  2. package/dist/css/uikit-core-rtl.min.css +1 -1
  3. package/dist/css/uikit-core.css +1 -1
  4. package/dist/css/uikit-core.min.css +1 -1
  5. package/dist/css/uikit-rtl.css +1 -1
  6. package/dist/css/uikit-rtl.min.css +1 -1
  7. package/dist/css/uikit.css +1 -1
  8. package/dist/css/uikit.min.css +1 -1
  9. package/dist/js/components/countdown.js +1 -1
  10. package/dist/js/components/countdown.min.js +1 -1
  11. package/dist/js/components/filter.js +16 -12
  12. package/dist/js/components/filter.min.js +1 -1
  13. package/dist/js/components/lightbox-panel.js +14 -9
  14. package/dist/js/components/lightbox-panel.min.js +1 -1
  15. package/dist/js/components/lightbox.js +14 -9
  16. package/dist/js/components/lightbox.min.js +1 -1
  17. package/dist/js/components/notification.js +8 -4
  18. package/dist/js/components/notification.min.js +1 -1
  19. package/dist/js/components/parallax.js +2 -4
  20. package/dist/js/components/parallax.min.js +1 -1
  21. package/dist/js/components/slider-parallax.js +2 -4
  22. package/dist/js/components/slider-parallax.min.js +1 -1
  23. package/dist/js/components/slider.js +8 -2
  24. package/dist/js/components/slider.min.js +1 -1
  25. package/dist/js/components/slideshow-parallax.js +2 -4
  26. package/dist/js/components/slideshow-parallax.min.js +1 -1
  27. package/dist/js/components/slideshow.js +9 -5
  28. package/dist/js/components/slideshow.min.js +1 -1
  29. package/dist/js/components/sortable.js +12 -13
  30. package/dist/js/components/sortable.min.js +1 -1
  31. package/dist/js/components/tooltip.js +1 -1
  32. package/dist/js/components/tooltip.min.js +1 -1
  33. package/dist/js/components/upload.js +1 -1
  34. package/dist/js/components/upload.min.js +1 -1
  35. package/dist/js/uikit-core.js +33 -23
  36. package/dist/js/uikit-core.min.js +1 -1
  37. package/dist/js/uikit-icons.js +1 -1
  38. package/dist/js/uikit-icons.min.js +1 -1
  39. package/dist/js/uikit.js +48 -45
  40. package/dist/js/uikit.min.js +1 -1
  41. package/package.json +1 -1
  42. package/src/js/components/filter.js +2 -1
  43. package/src/js/components/notification.js +2 -3
  44. package/src/js/components/sortable.js +4 -2
  45. package/src/js/core/accordion.js +2 -1
  46. package/src/js/core/alert.js +2 -1
  47. package/src/js/core/drop.js +4 -2
  48. package/src/js/core/modal.js +1 -1
  49. package/src/js/core/switcher.js +3 -2
  50. package/src/js/mixin/event.js +5 -0
  51. package/src/js/mixin/internal/animate-fade.js +8 -4
  52. package/src/js/mixin/internal/animate-slide.js +1 -6
  53. package/src/js/mixin/internal/slideshow-transitioner.js +2 -4
  54. package/src/js/mixin/modal.js +2 -1
  55. package/src/js/mixin/parallax.js +2 -3
  56. package/src/js/mixin/slider-nav.js +2 -1
  57. package/src/js/util/animation.js +5 -9
  58. package/src/js/util/scroll.js +5 -4
  59. package/src/js/util/style.js +6 -0
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.23.6-dev.99eccf626 | https://www.getuikit.com | (c) 2014 - 2025 YOOtheme | MIT License */
1
+ /*! UIkit 3.23.6-dev.eb1cbd14e | https://www.getuikit.com | (c) 2014 - 2025 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -614,6 +614,11 @@
614
614
  }
615
615
  return elements[0];
616
616
  }
617
+ function resetProps(element, props) {
618
+ for (const prop in props) {
619
+ css(element, prop, "");
620
+ }
621
+ }
617
622
  const propName = memoize((name) => {
618
623
  if (startsWith(name, "--")) {
619
624
  return name;
@@ -649,22 +654,18 @@
649
654
  ({ type }) => {
650
655
  clearTimeout(timer);
651
656
  removeClass(element2, clsTransition);
652
- css(element2, {
653
- transitionProperty: "",
654
- transitionDuration: "",
655
- transitionTimingFunction: ""
656
- });
657
+ resetProps(element2, transitionProps);
657
658
  type === transitionCanceled ? reject() : resolve(element2);
658
659
  },
659
660
  { self: true }
660
661
  );
661
662
  addClass(element2, clsTransition);
662
- css(element2, {
663
+ const transitionProps = {
663
664
  transitionProperty: Object.keys(props).map(propName).join(","),
664
665
  transitionDuration: `${duration}ms`,
665
- transitionTimingFunction: timing,
666
- ...props
667
- });
666
+ transitionTimingFunction: timing
667
+ };
668
+ css(element2, { ...transitionProps, ...props });
668
669
  })
669
670
  )
670
671
  );
@@ -1647,6 +1648,7 @@
1647
1648
  removeAttr: removeAttr,
1648
1649
  removeClass: removeClass,
1649
1650
  replaceClass: replaceClass,
1651
+ resetProps: resetProps,
1650
1652
  scrollIntoView: scrollIntoView,
1651
1653
  scrollParent: scrollParent,
1652
1654
  scrollParents: scrollParents,
@@ -2122,7 +2124,8 @@
2122
2124
  const index = transitionIndex(target, true);
2123
2125
  const propsIn = { opacity: 1 };
2124
2126
  const propsOut = { opacity: 0 };
2125
- const wrapIndexFn = (fn) => () => index === transitionIndex(target) ? fn() : Promise.reject();
2127
+ const isCurrentIndex = () => index === transitionIndex(target);
2128
+ const wrapIndexFn = (fn) => () => isCurrentIndex() ? fn() : Promise.reject();
2126
2129
  const leaveFn = wrapIndexFn(async () => {
2127
2130
  addClass(target, clsLeave);
2128
2131
  await (stagger ? Promise.all(
@@ -2152,7 +2155,9 @@
2152
2155
  transitions = nodes.map(async (child, i) => {
2153
2156
  await awaitTimeout(i * stagger);
2154
2157
  await Transition.start(child, propsIn, duration / 2, "ease");
2155
- css(child, { opacity: "" });
2158
+ if (isCurrentIndex()) {
2159
+ resetProps(child, propsIn);
2160
+ }
2156
2161
  });
2157
2162
  targetDuration += nodes.length * stagger;
2158
2163
  }
@@ -2162,8 +2167,8 @@
2162
2167
  }
2163
2168
  await Promise.all(transitions);
2164
2169
  removeClass(target, clsEnter);
2165
- if (index === transitionIndex(target)) {
2166
- css(target, { height: "", alignContent: "", opacity: "" });
2170
+ if (isCurrentIndex()) {
2171
+ resetProps(target, { height: "", alignContent: "", ...propsIn });
2167
2172
  delete target.dataset.transition;
2168
2173
  }
2169
2174
  });
@@ -2258,11 +2263,6 @@
2258
2263
  });
2259
2264
  return [propsTo, propsFrom];
2260
2265
  }
2261
- function resetProps(el, props) {
2262
- for (const prop in props) {
2263
- css(el, prop, "");
2264
- }
2265
- }
2266
2266
  function getPositionWithMargin(el) {
2267
2267
  const { height, width } = dimensions$1(el);
2268
2268
  return {
@@ -2298,6 +2298,12 @@
2298
2298
  }
2299
2299
  };
2300
2300
 
2301
+ function maybeDefautPreventClick(e) {
2302
+ if (e.target.closest('a[href="#"],a[href=""]')) {
2303
+ e.preventDefault();
2304
+ }
2305
+ }
2306
+
2301
2307
  const keyMap = {
2302
2308
  TAB: 9,
2303
2309
  ESC: 27,
@@ -2356,7 +2362,7 @@
2356
2362
  return;
2357
2363
  }
2358
2364
  if (e.target.closest("a,button")) {
2359
- e.preventDefault();
2365
+ maybeDefautPreventClick(e);
2360
2366
  this.apply(e.current);
2361
2367
  }
2362
2368
  }
@@ -2606,15 +2612,16 @@
2606
2612
  }
2607
2613
  prevented = true;
2608
2614
  const { scrollingElement } = document;
2609
- css(scrollingElement, {
2615
+ const props = {
2610
2616
  overflowY: CSS.supports("overflow", "clip") ? "clip" : "hidden",
2611
2617
  touchAction: "none",
2612
2618
  paddingRight: width(window) - scrollingElement.clientWidth || ""
2613
- });
2619
+ };
2620
+ css(scrollingElement, props);
2614
2621
  return () => {
2615
2622
  prevented = false;
2616
2623
  off();
2617
- css(scrollingElement, { overflowY: "", touchAction: "", paddingRight: "" });
2624
+ resetProps(scrollingElement, props);
2618
2625
  };
2619
2626
  }
2620
2627
 
@@ -2938,7 +2945,7 @@
2938
2945
  if (!defaultPrevented && hash && isSameSiteAnchor(current) && !this.$el.contains($(hash))) {
2939
2946
  this.hide();
2940
2947
  } else if (matches(current, this.selClose)) {
2941
- e.preventDefault();
2948
+ maybeDefautPreventClick(e);
2942
2949
  this.hide();
2943
2950
  }
2944
2951
  }
@@ -3148,9 +3155,7 @@
3148
3155
  return Transition.cancel([next, prev]);
3149
3156
  },
3150
3157
  reset() {
3151
- for (const prop in props[0]) {
3152
- css([next, prev], prop, "");
3153
- }
3158
+ resetProps([next, prev], props[0]);
3154
3159
  },
3155
3160
  async forward(duration, percent2 = this.percent()) {
3156
3161
  await this.cancel();
@@ -3723,7 +3728,7 @@
3723
3728
  };
3724
3729
  App.util = util;
3725
3730
  App.options = {};
3726
- App.version = "3.23.6-dev.99eccf626";
3731
+ App.version = "3.23.6-dev.eb1cbd14e";
3727
3732
 
3728
3733
  const PREFIX = "uk-";
3729
3734
  const DATA = "__uikit__";
@@ -3989,7 +3994,7 @@
3989
3994
  filter: ({ parallax }) => !parallax,
3990
3995
  handler(e) {
3991
3996
  if (e.target.closest("a,button") && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
3992
- e.preventDefault();
3997
+ maybeDefautPreventClick(e);
3993
3998
  this.show(data(e.current, this.attrItem));
3994
3999
  }
3995
4000
  }
@@ -4834,9 +4839,7 @@
4834
4839
  },
4835
4840
  events: {
4836
4841
  click(e) {
4837
- if (e.target.closest('a[href="#"],a[href=""]')) {
4838
- e.preventDefault();
4839
- }
4842
+ maybeDefautPreventClick(e);
4840
4843
  this.close();
4841
4844
  },
4842
4845
  [pointerEnter]() {
@@ -4976,9 +4979,7 @@
4976
4979
  },
4977
4980
  methods: {
4978
4981
  reset() {
4979
- for (const prop in this.getCss(0)) {
4980
- css(this.$el, prop, "");
4981
- }
4982
+ resetProps(this.$el, this.getCss(0));
4982
4983
  },
4983
4984
  getCss(percent) {
4984
4985
  const css2 = {};
@@ -5975,8 +5976,9 @@
5975
5976
  toggleClass(this.target, this.clsEmpty, empty);
5976
5977
  },
5977
5978
  handles(handles, prev) {
5978
- css(prev, { touchAction: "", userSelect: "" });
5979
- css(handles, { touchAction: "none", userSelect: "none" });
5979
+ const props = { touchAction: "none", userSelect: "none" };
5980
+ resetProps(prev, props);
5981
+ css(handles, props);
5980
5982
  }
5981
5983
  },
5982
5984
  update: {
@@ -6716,7 +6718,7 @@
6716
6718
  if (e.type === "keydown" && e.keyCode !== keyMap.SPACE) {
6717
6719
  return;
6718
6720
  }
6719
- e.preventDefault();
6721
+ maybeDefautPreventClick(e);
6720
6722
  (_a = this._off) == null ? void 0 : _a.call(this);
6721
6723
  this._off = keepScrollPosition(e.target);
6722
6724
  await this.toggle(index(this.toggles, e.current));
@@ -6837,7 +6839,7 @@
6837
6839
  name: "click",
6838
6840
  delegate: ({ selClose }) => selClose,
6839
6841
  handler(e) {
6840
- e.preventDefault();
6842
+ maybeDefautPreventClick(e);
6841
6843
  this.close();
6842
6844
  }
6843
6845
  },
@@ -7042,7 +7044,8 @@
7042
7044
  animation: ["uk-animation-fade"],
7043
7045
  cls: "uk-open",
7044
7046
  container: false,
7045
- closeOnScroll: false
7047
+ closeOnScroll: false,
7048
+ selClose: ".uk-drop-close"
7046
7049
  },
7047
7050
  computed: {
7048
7051
  boundary({ boundary, boundaryX, boundaryY }, $el) {
@@ -7083,9 +7086,9 @@
7083
7086
  events: [
7084
7087
  {
7085
7088
  name: "click",
7086
- delegate: () => ".uk-drop-close",
7089
+ delegate: ({ selClose }) => selClose,
7087
7090
  handler(e) {
7088
- e.preventDefault();
7091
+ maybeDefautPreventClick(e);
7089
7092
  this.hide(false);
7090
7093
  }
7091
7094
  },
@@ -8559,7 +8562,7 @@
8559
8562
  };
8560
8563
  modal.alert = function(message, options) {
8561
8564
  return openDialog(
8562
- ({ i18n }) => `<div class="uk-modal-body">${isString(message) ? message : html(message)}</div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-primary uk-modal-close" autofocus>${i18n.ok}</button> </div>`,
8565
+ ({ i18n }) => `<div class="uk-modal-body">${isString(message) ? message : html(message)}</div> <div class="uk-modal-footer uk-text-right"> <button class="uk-button uk-button-primary uk-modal-close" type="button" autofocus>${i18n.ok}</button> </div>`,
8563
8566
  options
8564
8567
  );
8565
8568
  };
@@ -9599,7 +9602,7 @@
9599
9602
  delegate: ({ toggle }) => toggle,
9600
9603
  handler(e) {
9601
9604
  if (!matches(e.current, selDisabled) && (e.type === "click" || e.keyCode === keyMap.SPACE)) {
9602
- e.preventDefault();
9605
+ maybeDefautPreventClick(e);
9603
9606
  this.show(e.current);
9604
9607
  }
9605
9608
  }
@@ -9628,7 +9631,7 @@
9628
9631
  delegate: ({ attrItem }) => `[${attrItem}],[data-${attrItem}]`,
9629
9632
  handler(e) {
9630
9633
  if (e.target.closest("a,button")) {
9631
- e.preventDefault();
9634
+ maybeDefautPreventClick(e);
9632
9635
  this.show(data(e.current, this.attrItem));
9633
9636
  }
9634
9637
  }