uikit 3.16.15 → 3.16.16-dev.0851166f4

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 (52) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/build/release.js +7 -7
  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 +17 -12
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +17 -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 +9 -7
  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 +9 -7
  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 +15 -11
  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 +30 -28
  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 +44 -39
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +7 -7
  44. package/src/js/components/tooltip.js +6 -5
  45. package/src/js/core/accordion.js +2 -2
  46. package/src/js/core/cover.js +1 -1
  47. package/src/js/core/img.js +2 -2
  48. package/src/js/core/switcher.js +5 -5
  49. package/src/js/core/toggle.js +6 -5
  50. package/src/js/core/video.js +7 -7
  51. package/src/js/mixin/slider-drag.js +4 -4
  52. package/src/js/mixin/togglable.js +8 -6
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.16.15 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.16.16-dev.0851166f4 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
@@ -2159,7 +2159,7 @@
2159
2159
  };
2160
2160
  App.util = util;
2161
2161
  App.options = {};
2162
- App.version = "3.16.15";
2162
+ App.version = "3.16.16-dev.0851166f4";
2163
2163
 
2164
2164
  const PREFIX = "uk-";
2165
2165
  const DATA = "__uikit__";
@@ -2435,9 +2435,9 @@
2435
2435
  }
2436
2436
  },
2437
2437
  methods: {
2438
- toggleElement(targets, toggle, animate) {
2439
- return new Promise(
2440
- (resolve) => Promise.all(
2438
+ async toggleElement(targets, toggle, animate) {
2439
+ try {
2440
+ await Promise.all(
2441
2441
  toNodes(targets).map((el) => {
2442
2442
  const show = isBoolean(toggle) ? toggle : !this.isToggled(el);
2443
2443
  if (!trigger(el, `before${show ? "show" : "hide"}`, [this])) {
@@ -2456,8 +2456,11 @@
2456
2456
  return Promise.reject();
2457
2457
  }) : done();
2458
2458
  })
2459
- ).then(resolve, noop)
2460
- );
2459
+ );
2460
+ return true;
2461
+ } catch (e) {
2462
+ return false;
2463
+ }
2461
2464
  },
2462
2465
  isToggled(el = this.$el) {
2463
2466
  el = toNode(el);
@@ -2796,7 +2799,7 @@
2796
2799
  }
2797
2800
  },
2798
2801
  methods: {
2799
- async toggle(item, animate) {
2802
+ toggle(item, animate) {
2800
2803
  item = this.items[getIndex(item, this.items)];
2801
2804
  let items = [item];
2802
2805
  const activeItems = filter(this.items, `.${this.clsOpen}`);
@@ -2806,7 +2809,7 @@
2806
2809
  if (!this.collapsible && activeItems.length < 2 && includes(activeItems, item)) {
2807
2810
  return;
2808
2811
  }
2809
- await Promise.all(
2812
+ return Promise.all(
2810
2813
  items.map(
2811
2814
  (el) => this.toggleElement(el, !includes(activeItems, el), (el2, show) => {
2812
2815
  toggleClass(el2, this.clsOpen, show);
@@ -2932,9 +2935,7 @@
2932
2935
  mute(this.$el);
2933
2936
  }
2934
2937
  },
2935
- observe: intersection({
2936
- args: { intersecting: false }
2937
- }),
2938
+ observe: [intersection({ args: { intersecting: false } }), resize()],
2938
2939
  update: {
2939
2940
  read({ visible }) {
2940
2941
  if (!isVideo(this.$el)) {
@@ -2942,17 +2943,18 @@
2942
2943
  }
2943
2944
  return {
2944
2945
  prev: visible,
2945
- visible: isVisible(this.$el) && css(this.$el, "visibility") !== "hidden",
2946
+ visible: isVisible(this.$el),
2946
2947
  inView: this.inView && isInView(this.$el)
2947
2948
  };
2948
2949
  },
2949
2950
  write({ prev, visible, inView }) {
2950
2951
  if (!visible || this.inView && !inView) {
2951
2952
  pause(this.$el);
2952
- } else if (this.autoplay === true && !prev || this.inView && inView) {
2953
+ } else if (this.autoplay === true && !prev || inView) {
2953
2954
  play(this.$el);
2954
2955
  }
2955
- }
2956
+ },
2957
+ events: ["resize"]
2956
2958
  }
2957
2959
  };
2958
2960
 
@@ -2971,7 +2973,7 @@
2971
2973
  }
2972
2974
  },
2973
2975
  observe: resize({
2974
- target: ({ $el }) => [$el, getPositionedParent($el) || parent($el)]
2976
+ target: ({ $el }) => [getPositionedParent($el) || parent($el)]
2975
2977
  }),
2976
2978
  update: {
2977
2979
  read() {
@@ -4570,12 +4572,12 @@
4570
4572
  }
4571
4573
  const srcProps = ["data-src", "data-srcset", "sizes"];
4572
4574
  function setSourceProps(sourceEl, targetEl) {
4573
- srcProps.forEach((prop) => {
4575
+ for (const prop of srcProps) {
4574
4576
  const value = data(sourceEl, prop);
4575
4577
  if (value) {
4576
4578
  attr(targetEl, prop.replace(/^(data-)+/, ""), value);
4577
4579
  }
4578
- });
4580
+ }
4579
4581
  }
4580
4582
  function getImageFromElement(el, src, sources) {
4581
4583
  const img = new Image();
@@ -6005,7 +6007,7 @@
6005
6007
  this.$emit();
6006
6008
  },
6007
6009
  connectChildren() {
6008
- const index = this.index();
6010
+ let index = Math.max(0, this.index());
6009
6011
  for (const el of this.connects) {
6010
6012
  children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));
6011
6013
  }
@@ -6125,11 +6127,10 @@
6125
6127
  });
6126
6128
  const animate = prev >= 0 && prev !== next;
6127
6129
  this.connects.forEach(async ({ children: children2 }) => {
6128
- await this.toggleElement(
6129
- toArray(children2).filter((child) => hasClass(child, this.cls)),
6130
- false,
6131
- animate
6130
+ const actives = toArray(children2).filter(
6131
+ (child, i) => i !== active && hasClass(child, this.cls)
6132
6132
  );
6133
+ await this.toggleElement(actives, false, animate);
6133
6134
  await this.toggleElement(children2[active], true, animate);
6134
6135
  });
6135
6136
  }
@@ -6298,11 +6299,12 @@
6298
6299
  return;
6299
6300
  }
6300
6301
  const toggled = this.target.filter(this.isToggled);
6301
- await this.toggleElement(toggled, false);
6302
- await this.toggleElement(
6303
- this.target.filter((el) => !includes(toggled, el)),
6304
- true
6305
- );
6302
+ if (await this.toggleElement(toggled, false)) {
6303
+ await this.toggleElement(
6304
+ this.target.filter((el) => !includes(toggled, el)),
6305
+ true
6306
+ );
6307
+ }
6306
6308
  }
6307
6309
  }
6308
6310
  };