uikit 3.25.5-dev.82c4ad8 → 3.25.5-dev.c2e0a67

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/.prettierignore +0 -1
  2. package/CHANGELOG.md +5 -0
  3. package/README.md +0 -1
  4. package/build/publishDev.js +0 -5
  5. package/build/release.js +1 -3
  6. package/dist/css/uikit-core-rtl.css +1 -1
  7. package/dist/css/uikit-core-rtl.min.css +1 -1
  8. package/dist/css/uikit-core.css +1 -1
  9. package/dist/css/uikit-core.min.css +1 -1
  10. package/dist/css/uikit-rtl.css +1 -1
  11. package/dist/css/uikit-rtl.min.css +1 -1
  12. package/dist/css/uikit.css +1 -1
  13. package/dist/css/uikit.min.css +1 -1
  14. package/dist/js/components/countdown.js +1 -1
  15. package/dist/js/components/countdown.min.js +1 -1
  16. package/dist/js/components/filter.js +1 -1
  17. package/dist/js/components/filter.min.js +1 -1
  18. package/dist/js/components/lightbox-panel.js +19 -10
  19. package/dist/js/components/lightbox-panel.min.js +1 -1
  20. package/dist/js/components/lightbox.js +19 -10
  21. package/dist/js/components/lightbox.min.js +1 -1
  22. package/dist/js/components/notification.js +1 -1
  23. package/dist/js/components/notification.min.js +1 -1
  24. package/dist/js/components/parallax.js +1 -1
  25. package/dist/js/components/parallax.min.js +1 -1
  26. package/dist/js/components/slider-parallax.js +1 -1
  27. package/dist/js/components/slider-parallax.min.js +1 -1
  28. package/dist/js/components/slider.js +19 -10
  29. package/dist/js/components/slider.min.js +1 -1
  30. package/dist/js/components/slideshow-parallax.js +1 -1
  31. package/dist/js/components/slideshow-parallax.min.js +1 -1
  32. package/dist/js/components/slideshow.js +19 -10
  33. package/dist/js/components/slideshow.min.js +1 -1
  34. package/dist/js/components/sortable.js +1 -1
  35. package/dist/js/components/sortable.min.js +1 -1
  36. package/dist/js/components/tooltip.js +1 -1
  37. package/dist/js/components/tooltip.min.js +1 -1
  38. package/dist/js/components/upload.js +1 -1
  39. package/dist/js/components/upload.min.js +1 -1
  40. package/dist/js/uikit-core.js +7 -3
  41. package/dist/js/uikit-core.min.js +1 -1
  42. package/dist/js/uikit-icons.js +1 -1
  43. package/dist/js/uikit-icons.min.js +1 -1
  44. package/dist/js/uikit.js +25 -12
  45. package/dist/js/uikit.min.js +1 -1
  46. package/package.json +2 -2
  47. package/src/js/core/drop.js +8 -1
  48. package/src/js/mixin/slider-drag.js +21 -11
  49. package/tests/upload.html +2 -2
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.25.5-dev.82c4ad8",
5
+ "version": "3.25.5-dev.c2e0a67",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -31,7 +31,7 @@
31
31
  "url": "https://github.com/uikit/uikit/issues"
32
32
  },
33
33
  "homepage": "https://getuikit.com",
34
- "packageManager": "pnpm@10.24.0",
34
+ "packageManager": "pnpm@10.27.0",
35
35
  "devDependencies": {
36
36
  "@eslint/js": "^9.39.2",
37
37
  "@rollup/plugin-alias": "^6.0.0",
@@ -338,6 +338,9 @@ export default {
338
338
  append(this.container, this.$el);
339
339
  }
340
340
 
341
+ // Mark enter early so isToggled() detects show when using delayShow
342
+ addClass(this.$el, this.clsEnter);
343
+
341
344
  this.showTimer = setTimeout(
342
345
  () => this.toggleElement(this.$el, true),
343
346
  (delay && this.delayShow) || 0,
@@ -345,7 +348,11 @@ export default {
345
348
  },
346
349
 
347
350
  hide(delay = true, animate = true) {
348
- const hide = () => this.toggleElement(this.$el, false, this.animateOut && animate);
351
+ const hide = () => {
352
+ // Ensure enter class is removed if show is canceled early
353
+ removeClass(this.$el, this.clsEnter);
354
+ this.toggleElement(this.$el, false, this.animateOut && animate);
355
+ };
349
356
 
350
357
  this.clearTimers();
351
358
 
@@ -2,6 +2,7 @@ import {
2
2
  css,
3
3
  getEventPos,
4
4
  includes,
5
+ isEqual,
5
6
  isRtl,
6
7
  isTouch,
7
8
  noop,
@@ -25,15 +26,21 @@ export default {
25
26
  data: {
26
27
  draggable: true,
27
28
  threshold: 10,
29
+ angleThreshold: 45,
28
30
  },
29
31
 
30
32
  created() {
31
33
  for (const key of ['start', 'move', 'end']) {
32
34
  const fn = this[key];
33
35
  this[key] = (e) => {
34
- const pos = getEventPos(e).x * (isRtl ? -1 : 1);
36
+ const pos = getEventPos(e);
35
37
 
36
- this.prevPos = pos === this.pos ? this.prevPos : this.pos;
38
+ if (isRtl) {
39
+ pos.x = -pos.x;
40
+ pos.y = -pos.y;
41
+ }
42
+
43
+ this.prevPos = isEqual(pos, this.pos) ? this.prevPos : this.pos;
37
44
  this.pos = pos;
38
45
 
39
46
  fn(e);
@@ -88,7 +95,7 @@ export default {
88
95
 
89
96
  if (this._transitioner) {
90
97
  this.percent = this._transitioner.percent();
91
- this.drag += this._transitioner.getDistance() * this.percent * this.dir;
98
+ this.drag.x += this._transitioner.getDistance() * this.percent * this.dir;
92
99
 
93
100
  this._transitioner.cancel();
94
101
  this._transitioner.translate(this.percent);
@@ -109,11 +116,11 @@ export default {
109
116
  },
110
117
 
111
118
  move(e) {
112
- const distance = this.pos - this.drag;
113
-
119
+ const distance = this.pos.x - this.drag.x;
114
120
  if (
115
121
  distance === 0 ||
116
- this.prevPos === this.pos ||
122
+ (!this.dragging && getAngle(this.pos, this.drag) > this.angleThreshold) ||
123
+ this.prevPos.x === this.pos.x ||
117
124
  (!this.dragging && Math.abs(distance) < this.threshold)
118
125
  ) {
119
126
  return;
@@ -130,7 +137,7 @@ export default {
130
137
  let width = getDistance.call(this, prevIndex, nextIndex);
131
138
 
132
139
  while (nextIndex !== prevIndex && dis > width) {
133
- this.drag -= width * this.dir;
140
+ this.drag.x -= width * this.dir;
134
141
 
135
142
  prevIndex = nextIndex;
136
143
  dis -= width;
@@ -192,15 +199,14 @@ export default {
192
199
  this._show(false, this.index, true);
193
200
  this._transitioner = null;
194
201
  } else {
195
- const dirChange =
196
- (isRtl ? this.dir * (isRtl ? 1 : -1) : this.dir) < 0 ===
197
- this.prevPos > this.pos;
198
- this.index = dirChange ? this.index : this.prevIndex;
202
+ const dirChange = this.dir < 0 === this.prevPos.x > this.pos.x;
199
203
 
200
204
  if (dirChange) {
201
205
  trigger(this.slides[this.prevIndex], 'itemhidden', [this]);
202
206
  trigger(this.slides[this.index], 'itemshown', [this]);
203
207
  this.percent = 1 - this.percent;
208
+ } else {
209
+ this.index = this.prevIndex;
204
210
  }
205
211
 
206
212
  this.show(
@@ -232,3 +238,7 @@ function hasSelectableText(el) {
232
238
  toArray(el.childNodes).some((el) => el.nodeType === 3 && el.textContent.trim())
233
239
  );
234
240
  }
241
+
242
+ function getAngle(pos1, pos2) {
243
+ return (Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180) / Math.PI;
244
+ }
package/tests/upload.html CHANGED
@@ -145,13 +145,13 @@
145
145
  <td><code>allow</code></td>
146
146
  <td>String</td>
147
147
  <td>false</td>
148
- <td>File name filter. (eg. *.png)</td>
148
+ <td>File name filter (eg. *.png). Separate multiple values with a pipe (*.png|*.gif).</td>
149
149
  </tr>
150
150
  <tr>
151
151
  <td><code>mime</code></td>
152
152
  <td>String</td>
153
153
  <td>false</td>
154
- <td>File MIME type filter. (eg. images/*)</td>
154
+ <td>File MIME type filter (eg. image/*). Separate multiple values with a pipe (image/*|video/*).</td>
155
155
  </tr>
156
156
  <tr>
157
157
  <td><code>maxSize</code></td>