uikit 3.25.4 → 3.25.5-dev.7f39b03

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 (54) hide show
  1. package/.prettierignore +0 -1
  2. package/CHANGELOG.md +11 -0
  3. package/README.md +0 -1
  4. package/build/publishDev.js +2 -3
  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 -13
  19. package/dist/js/components/lightbox-panel.min.js +1 -1
  20. package/dist/js/components/lightbox.js +19 -13
  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 -7
  25. package/dist/js/components/parallax.min.js +1 -1
  26. package/dist/js/components/slider-parallax.js +1 -7
  27. package/dist/js/components/slider-parallax.min.js +1 -1
  28. package/dist/js/components/slider.js +19 -19
  29. package/dist/js/components/slider.min.js +1 -1
  30. package/dist/js/components/slideshow-parallax.js +1 -7
  31. package/dist/js/components/slideshow-parallax.min.js +1 -1
  32. package/dist/js/components/slideshow.js +19 -19
  33. package/dist/js/components/slideshow.min.js +1 -1
  34. package/dist/js/components/sortable.js +5 -6
  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 +55 -13
  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 +77 -30
  45. package/dist/js/uikit.min.js +1 -1
  46. package/package.json +64 -63
  47. package/src/js/components/sortable.js +5 -6
  48. package/src/js/core/drop.js +8 -1
  49. package/src/js/core/overflow-fade.js +83 -8
  50. package/src/js/mixin/slider-drag.js +21 -14
  51. package/src/js/util/attr.js +1 -5
  52. package/src/less/components/nav.less +0 -1
  53. package/src/scss/components/nav.scss +0 -1
  54. package/tests/upload.html +2 -2
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.25.4 | https://www.getuikit.com | (c) 2014 - 2025 YOOtheme | MIT License */
1
+ /*! UIkit 3.25.5-dev.7f39b03 | 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() :
@@ -245,9 +245,6 @@
245
245
  return (_a = toNode(element)) == null ? void 0 : _a.getAttribute(name);
246
246
  } else {
247
247
  for (const el of toNodes(element)) {
248
- if (isFunction(value)) {
249
- value = value.call(el, attr(el, name));
250
- }
251
248
  if (value === null) {
252
249
  removeAttr(el, name);
253
250
  } else {
@@ -3313,7 +3310,6 @@
3313
3310
  };
3314
3311
 
3315
3312
  const pointerOptions = { passive: false, capture: true };
3316
- const pointerUpOptions = { passive: true, capture: true };
3317
3313
  const pointerDown = "touchstart mousedown";
3318
3314
  const pointerMove = "touchmove mousemove";
3319
3315
  const pointerUp = "touchend touchcancel mouseup click input scroll";
@@ -3323,14 +3319,18 @@
3323
3319
  },
3324
3320
  data: {
3325
3321
  draggable: true,
3326
- threshold: 10
3322
+ threshold: 10,
3323
+ angleThreshold: 45
3327
3324
  },
3328
3325
  created() {
3329
3326
  for (const key of ["start", "move", "end"]) {
3330
3327
  const fn = this[key];
3331
3328
  this[key] = (e) => {
3332
- const pos = getEventPos(e).x * (isRtl ? -1 : 1);
3333
- this.prevPos = pos === this.pos ? this.prevPos : this.pos;
3329
+ const pos = getEventPos(e);
3330
+ if (isRtl) {
3331
+ pos.x = -pos.x;
3332
+ }
3333
+ this.prevPos = isEqual(pos, this.pos) ? this.prevPos : this.pos;
3334
3334
  this.pos = pos;
3335
3335
  fn(e);
3336
3336
  };
@@ -3367,7 +3367,7 @@
3367
3367
  this.drag = this.pos;
3368
3368
  if (this._transitioner) {
3369
3369
  this.percent = this._transitioner.percent();
3370
- this.drag += this._transitioner.getDistance() * this.percent * this.dir;
3370
+ this.drag.x += this._transitioner.getDistance() * this.percent * this.dir;
3371
3371
  this._transitioner.cancel();
3372
3372
  this._transitioner.translate(this.percent);
3373
3373
  this.dragging = true;
@@ -3376,12 +3376,12 @@
3376
3376
  this.prevIndex = this.index;
3377
3377
  }
3378
3378
  on(document, pointerMove, this.move, pointerOptions);
3379
- on(document, pointerUp, this.end, pointerUpOptions);
3379
+ on(document, pointerUp, this.end, { passive: true, capture: true, once: true });
3380
3380
  css(this.list, "userSelect", "none");
3381
3381
  },
3382
3382
  move(e) {
3383
- const distance = this.pos - this.drag;
3384
- if (distance === 0 || this.prevPos === this.pos || !this.dragging && Math.abs(distance) < this.threshold) {
3383
+ const distance = this.pos.x - this.drag.x;
3384
+ if (distance === 0 || !this.dragging && getAngle(this.pos, this.drag) > this.angleThreshold || this.prevPos.x === this.pos.x || !this.dragging && Math.abs(distance) < this.threshold) {
3385
3385
  return;
3386
3386
  }
3387
3387
  e.cancelable && e.preventDefault();
@@ -3392,7 +3392,7 @@
3392
3392
  let nextIndex = this.getIndex(prevIndex + this.dir);
3393
3393
  let width = getDistance.call(this, prevIndex, nextIndex);
3394
3394
  while (nextIndex !== prevIndex && dis > width) {
3395
- this.drag -= width * this.dir;
3395
+ this.drag.x -= width * this.dir;
3396
3396
  prevIndex = nextIndex;
3397
3397
  dis -= width;
3398
3398
  nextIndex = this.getIndex(prevIndex + this.dir);
@@ -3430,7 +3430,6 @@
3430
3430
  },
3431
3431
  end() {
3432
3432
  off(document, pointerMove, this.move, pointerOptions);
3433
- off(document, pointerUp, this.end, pointerUpOptions);
3434
3433
  if (this.dragging) {
3435
3434
  setTimeout(on(this.list, "click", (e) => e.preventDefault(), pointerOptions));
3436
3435
  this.dragging = null;
@@ -3440,12 +3439,13 @@
3440
3439
  this._show(false, this.index, true);
3441
3440
  this._transitioner = null;
3442
3441
  } else {
3443
- const dirChange = (isRtl ? this.dir * (isRtl ? 1 : -1) : this.dir) < 0 === this.prevPos > this.pos;
3444
- this.index = dirChange ? this.index : this.prevIndex;
3442
+ const dirChange = this.dir < 0 === this.prevPos.x > this.pos.x;
3445
3443
  if (dirChange) {
3446
3444
  trigger(this.slides[this.prevIndex], "itemhidden", [this]);
3447
3445
  trigger(this.slides[this.index], "itemshown", [this]);
3448
3446
  this.percent = 1 - this.percent;
3447
+ } else {
3448
+ this.index = this.prevIndex;
3449
3449
  }
3450
3450
  this.show(
3451
3451
  this.dir > 0 && !dirChange || this.dir < 0 && dirChange ? "next" : "previous",
@@ -3464,6 +3464,9 @@
3464
3464
  function hasSelectableText(el) {
3465
3465
  return css(el, "userSelect") !== "none" && toArray(el.childNodes).some((el2) => el2.nodeType === 3 && el2.textContent.trim());
3466
3466
  }
3467
+ function getAngle(pos1, pos2) {
3468
+ return Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180 / Math.PI;
3469
+ }
3467
3470
 
3468
3471
  function initWatches(instance) {
3469
3472
  instance._watches = [];
@@ -3786,7 +3789,7 @@
3786
3789
  };
3787
3790
  App.util = util;
3788
3791
  App.options = {};
3789
- App.version = "3.25.4";
3792
+ App.version = "3.25.5-dev.7f39b03";
3790
3793
 
3791
3794
  const PREFIX = "uk-";
3792
3795
  const DATA = "__uikit__";
@@ -6066,8 +6069,7 @@
6066
6069
  sortable.target,
6067
6070
  target,
6068
6071
  placeholder,
6069
- x,
6070
- y,
6072
+ { x, y },
6071
6073
  sortable === previous && data.moved !== target
6072
6074
  );
6073
6075
  if (insertTarget === false) {
@@ -6227,14 +6229,14 @@
6227
6229
  function findTarget(items, point) {
6228
6230
  return items[findIndex(items, (item) => pointInRect(point, dimensions$1(item)))];
6229
6231
  }
6230
- function findInsertTarget(list, target, placeholder, x, y, sameList) {
6232
+ function findInsertTarget(list, target, placeholder, point, sameList) {
6231
6233
  if (!children(list).length) {
6232
6234
  return;
6233
6235
  }
6234
6236
  const rect = dimensions$1(target);
6235
6237
  if (!sameList) {
6236
6238
  if (!isHorizontal(list, placeholder)) {
6237
- return y < rect.top + rect.height / 2 ? target : target.nextElementSibling;
6239
+ return point.y < rect.top + rect.height / 2 ? target : target.nextElementSibling;
6238
6240
  }
6239
6241
  return target;
6240
6242
  }
@@ -6243,7 +6245,7 @@
6243
6245
  [rect.top, rect.bottom],
6244
6246
  [placeholderRect.top, placeholderRect.bottom]
6245
6247
  );
6246
- const [pointerPos, lengthProp, startProp, endProp] = sameRow ? [x, "width", "left", "right"] : [y, "height", "top", "bottom"];
6248
+ const [pointerPos, lengthProp, startProp, endProp] = sameRow ? [point.x, "width", "left", "right"] : [point.y, "height", "top", "bottom"];
6247
6249
  const diff = placeholderRect[lengthProp] < rect[lengthProp] ? rect[lengthProp] - placeholderRect[lengthProp] : 0;
6248
6250
  if (placeholderRect[startProp] < rect[startProp]) {
6249
6251
  if (diff && pointerPos < rect[startProp] + diff) {
@@ -7296,13 +7298,17 @@
7296
7298
  if (this.container && parent(this.$el) !== this.container) {
7297
7299
  append(this.container, this.$el);
7298
7300
  }
7301
+ addClass(this.$el, this.clsEnter);
7299
7302
  this.showTimer = setTimeout(
7300
7303
  () => this.toggleElement(this.$el, true),
7301
7304
  delay && this.delayShow || 0
7302
7305
  );
7303
7306
  },
7304
7307
  hide(delay = true, animate = true) {
7305
- const hide = () => this.toggleElement(this.$el, false, this.animateOut && animate);
7308
+ const hide = () => {
7309
+ removeClass(this.$el, this.clsEnter);
7310
+ this.toggleElement(this.$el, false, this.animateOut && animate);
7311
+ };
7306
7312
  this.clearTimers();
7307
7313
  this.isDelayedHide = delay;
7308
7314
  if (delay && this.isDelaying()) {
@@ -8954,16 +8960,23 @@
8954
8960
 
8955
8961
  var overflowFade = {
8956
8962
  data: {
8963
+ threshold: 5,
8957
8964
  fadeDuration: 0.05
8958
8965
  },
8959
- events: {
8960
- name: "scroll",
8961
- self: true,
8962
- passive: true,
8963
- handler() {
8964
- this.$emit();
8966
+ events: [
8967
+ {
8968
+ name: "scroll",
8969
+ self: true,
8970
+ passive: true,
8971
+ handler() {
8972
+ this.$emit();
8973
+ }
8974
+ },
8975
+ {
8976
+ name: pointerDown$1,
8977
+ handler: handleMouseDrag
8965
8978
  }
8966
- },
8979
+ ],
8967
8980
  observe: [
8968
8981
  mutation({
8969
8982
  options: {
@@ -9004,6 +9017,40 @@
9004
9017
  events: ["resize"]
9005
9018
  }
9006
9019
  };
9020
+ function handleMouseDrag(e) {
9021
+ const { target, button, defaultPrevented } = e;
9022
+ if (defaultPrevented || button > 0 || isTouch(e) || target.closest(selInput) || isInput(target)) {
9023
+ return;
9024
+ }
9025
+ e.preventDefault();
9026
+ const pointerOptions = { passive: false, capture: true };
9027
+ const { $el: el, threshold, $options } = this;
9028
+ let started;
9029
+ const off = on(document, pointerMove$1, move(e), pointerOptions);
9030
+ on(document, [pointerUp$1, pointerCancel], end, { capture: true, once: true });
9031
+ function move(e2) {
9032
+ let origin = getEventPos(e2);
9033
+ let pos = origin;
9034
+ let lastPos = pos;
9035
+ return function(e3) {
9036
+ lastPos = pos;
9037
+ pos = getEventPos(e3);
9038
+ const isVertical = hasClass(el, `${$options.id}-vertical`);
9039
+ const prop = isVertical ? "y" : "x";
9040
+ started || (started = Math.abs(pos[prop] - origin[prop]) > threshold);
9041
+ if (started) {
9042
+ const delta = lastPos[prop] - pos[prop];
9043
+ el[isVertical ? "scrollTop" : "scrollLeft"] += delta;
9044
+ }
9045
+ };
9046
+ }
9047
+ function end() {
9048
+ off();
9049
+ if (started) {
9050
+ setTimeout(on(el, "click", (e2) => e2.preventDefault(), pointerOptions));
9051
+ }
9052
+ }
9053
+ }
9007
9054
 
9008
9055
  var responsive = {
9009
9056
  props: ["width", "height"],