uikit 3.16.16-dev.0cd70ed4a → 3.16.16-dev.d5349a857

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 (46) hide show
  1. package/CHANGELOG.md +1 -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 +9 -6
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +9 -6
  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 +1 -1
  21. package/dist/js/components/parallax.min.js +1 -1
  22. package/dist/js/components/slider-parallax.js +1 -1
  23. package/dist/js/components/slider-parallax.min.js +1 -1
  24. package/dist/js/components/slider.js +1 -1
  25. package/dist/js/components/slider.min.js +1 -1
  26. package/dist/js/components/slideshow-parallax.js +1 -1
  27. package/dist/js/components/slideshow-parallax.min.js +1 -1
  28. package/dist/js/components/slideshow.js +1 -1
  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 +15 -11
  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 +18 -14
  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 -19
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/tooltip.js +6 -5
  44. package/src/js/core/accordion.js +2 -2
  45. package/src/js/core/toggle.js +6 -5
  46. package/src/js/mixin/togglable.js +8 -6
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "uikit",
3
3
  "title": "UIkit",
4
4
  "description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
5
- "version": "3.16.16-dev.0cd70ed4a",
5
+ "version": "3.16.16-dev.d5349a857",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -77,16 +77,15 @@ export default {
77
77
 
78
78
  clearTimeout(this.showTimer);
79
79
 
80
- if (!this.isToggled(this.tooltip || null)) {
81
- return;
80
+ if (this.isToggled(this.tooltip || null)) {
81
+ await this.toggleElement(this.tooltip, false, false);
82
82
  }
83
83
 
84
- await this.toggleElement(this.tooltip, false, false);
85
84
  remove(this.tooltip);
86
85
  this.tooltip = null;
87
86
  },
88
87
 
89
- _show() {
88
+ async _show() {
90
89
  this.tooltip = append(
91
90
  this.container,
92
91
  `<div id="${this.id}" class="uk-${this.$options.name}" role="tooltip">
@@ -128,7 +127,9 @@ export default {
128
127
  });
129
128
  });
130
129
 
131
- this.toggleElement(this.tooltip, true);
130
+ if (!(await this.toggleElement(this.tooltip, true))) {
131
+ this.hide();
132
+ }
132
133
  },
133
134
  },
134
135
 
@@ -166,7 +166,7 @@ export default {
166
166
  },
167
167
 
168
168
  methods: {
169
- async toggle(item, animate) {
169
+ toggle(item, animate) {
170
170
  item = this.items[getIndex(item, this.items)];
171
171
  let items = [item];
172
172
  const activeItems = filter(this.items, `.${this.clsOpen}`);
@@ -179,7 +179,7 @@ export default {
179
179
  return;
180
180
  }
181
181
 
182
- await Promise.all(
182
+ return Promise.all(
183
183
  items.map((el) =>
184
184
  this.toggleElement(el, !includes(activeItems, el), (el, show) => {
185
185
  toggleClass(el, this.clsOpen, show);
@@ -217,11 +217,12 @@ export default {
217
217
  }
218
218
 
219
219
  const toggled = this.target.filter(this.isToggled);
220
- await this.toggleElement(toggled, false);
221
- await this.toggleElement(
222
- this.target.filter((el) => !includes(toggled, el)),
223
- true
224
- );
220
+ if (await this.toggleElement(toggled, false)) {
221
+ await this.toggleElement(
222
+ this.target.filter((el) => !includes(toggled, el)),
223
+ true
224
+ );
225
+ }
225
226
  },
226
227
  },
227
228
  };
@@ -9,7 +9,6 @@ import {
9
9
  isBoolean,
10
10
  isFunction,
11
11
  isVisible,
12
- noop,
13
12
  removeClass,
14
13
  startsWith,
15
14
  toFloat,
@@ -54,9 +53,9 @@ export default {
54
53
  },
55
54
 
56
55
  methods: {
57
- toggleElement(targets, toggle, animate) {
58
- return new Promise((resolve) =>
59
- Promise.all(
56
+ async toggleElement(targets, toggle, animate) {
57
+ try {
58
+ await Promise.all(
60
59
  toNodes(targets).map((el) => {
61
60
  const show = isBoolean(toggle) ? toggle : !this.isToggled(el);
62
61
 
@@ -92,8 +91,11 @@ export default {
92
91
  })
93
92
  : done();
94
93
  })
95
- ).then(resolve, noop)
96
- );
94
+ );
95
+ return true;
96
+ } catch (e) {
97
+ return false;
98
+ }
97
99
  },
98
100
 
99
101
  isToggled(el = this.$el) {