uikit 3.25.28 → 3.25.29-dev.3bc1304

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 (58) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/build/ci-release.js +1 -4
  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 +11 -10
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +13 -12
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +13 -12
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +5 -2
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +10 -9
  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 +11 -10
  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 +11 -10
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +10 -9
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +1 -1
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +2 -5
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +39 -43
  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 +40 -47
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +1 -1
  44. package/src/js/api/component.js +1 -1
  45. package/src/js/api/computed.js +1 -1
  46. package/src/js/api/log.js +1 -1
  47. package/src/js/api/observables.js +5 -4
  48. package/src/js/api/observer.js +3 -4
  49. package/src/js/api/update.js +10 -9
  50. package/src/js/components/upload.js +1 -1
  51. package/src/js/core/alert.js +6 -3
  52. package/src/js/core/drop.js +4 -4
  53. package/src/js/core/form-custom.js +3 -8
  54. package/src/js/core/icon.js +3 -11
  55. package/src/js/core/toggle.js +0 -2
  56. package/src/js/mixin/event.js +4 -1
  57. package/src/js/mixin/modal.js +1 -1
  58. package/tests/alert.html +2 -2
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.25.28 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
1
+ /*! UIkit 3.25.29-dev.3bc1304 | 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() :
@@ -1912,22 +1912,23 @@
1912
1912
  if (!instance._updates.length) {
1913
1913
  return;
1914
1914
  }
1915
- if (!instance._updateCount) {
1916
- instance._updateCount = 0;
1917
- requestAnimationFrame(() => instance._updateCount = 0);
1918
- }
1919
1915
  if (!instance._queued) {
1920
1916
  instance._queued = /* @__PURE__ */ new Set();
1921
1917
  fastdom.read(() => {
1922
1918
  if (instance._connected) {
1923
- runUpdates(instance, instance._queued);
1919
+ if (!instance._updateCount) {
1920
+ instance._updateCount = 0;
1921
+ requestAnimationFrame(() => instance._updateCount = 0);
1922
+ }
1923
+ if (instance._updateCount < 10) {
1924
+ instance._updateCount++;
1925
+ runUpdates(instance, instance._queued);
1926
+ }
1924
1927
  }
1925
1928
  instance._queued = null;
1926
1929
  });
1927
1930
  }
1928
- if (instance._updateCount++ < 20) {
1929
- instance._queued.add(e.type || e);
1930
- }
1931
+ instance._queued.add(e.type || e);
1931
1932
  }
1932
1933
  function runUpdates(instance, types) {
1933
1934
  for (const { read, write, events = [] } of instance._updates) {
@@ -2002,8 +2003,11 @@
2002
2003
  const pos = getEventPos(e);
2003
2004
  const target = "tagName" in e.target ? e.target : parent(e.target);
2004
2005
  once(document, `${pointerUp$1} ${pointerCancel} scroll`, (e2) => {
2006
+ if (e2.type !== pointerUp$1 || !target) {
2007
+ return;
2008
+ }
2005
2009
  const { x, y } = getEventPos(e2);
2006
- if (e2.type !== "scroll" && target && x && Math.abs(pos.x - x) > 100 || y && Math.abs(pos.y - y) > 100) {
2010
+ if (x && Math.abs(pos.x - x) > 100 || y && Math.abs(pos.y - y) > 100) {
2007
2011
  setTimeout(() => {
2008
2012
  trigger(target, "swipe");
2009
2013
  trigger(target, `swipe${swipeDirection(pos.x, pos.y, x, y)}`);
@@ -2369,7 +2373,7 @@
2369
2373
  }
2370
2374
 
2371
2375
  function maybeDefaultPreventClick(e) {
2372
- if (e.target.closest('a[href="#"],a[href=""]')) {
2376
+ if (e.type === "keydown" && e.keyCode === keyMap.SPACE || e.target.closest('a[href="#"],a[href=""]')) {
2373
2377
  e.preventDefault();
2374
2378
  }
2375
2379
  }
@@ -3065,13 +3069,13 @@
3065
3069
  let rejectAnimation;
3066
3070
  return new Promise(
3067
3071
  (resolve, reject) => once(el, "show hide", () => {
3068
- var _a, _b, _c;
3072
+ var _a, _b;
3069
3073
  (_a = pendingReject.get(el)) == null ? void 0 : _a();
3070
3074
  rejectAnimation = reject;
3071
3075
  pendingReject.set(el, reject);
3072
3076
  _toggle(el, show);
3073
3077
  Promise.all(
3074
- ((_c = (_b = transitionElement == null ? void 0 : transitionElement.getAnimations) == null ? void 0 : _b.call(transitionElement)) != null ? _c : []).map(({ finished }) => finished)
3078
+ (((_b = transitionElement == null ? void 0 : transitionElement.getAnimations) == null ? void 0 : _b.call(transitionElement)) || []).map(({ finished }) => finished)
3075
3079
  ).then(resolve, reject);
3076
3080
  })
3077
3081
  ).then(() => {
@@ -3419,7 +3423,7 @@
3419
3423
  return Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180 / Math.PI;
3420
3424
  }
3421
3425
 
3422
- var VERSION = '3.25.28';
3426
+ var VERSION = '3.25.29-dev.3bc1304';
3423
3427
 
3424
3428
  function initWatches(instance) {
3425
3429
  instance._watches = [];
@@ -3502,7 +3506,7 @@
3502
3506
  });
3503
3507
  }
3504
3508
  function resetComputed(instance) {
3505
- const values = { ...instance._computed };
3509
+ const values = instance._computed;
3506
3510
  instance._computed = {};
3507
3511
  return values;
3508
3512
  }
@@ -3538,16 +3542,15 @@
3538
3542
  }
3539
3543
 
3540
3544
  function initObservers(instance) {
3541
- for (const observer of instance.$options.observe || []) {
3542
- registerObservable(instance, observer);
3545
+ for (const [index, observer] of (instance.$options.observe || []).entries()) {
3546
+ registerObservable(instance, observer, `_observe${index}`);
3543
3547
  }
3544
3548
  }
3545
- function registerObservable(instance, observable) {
3549
+ function registerObservable(instance, observable, key) {
3546
3550
  let { observe, target = instance.$el, handler, options, filter, args } = observable;
3547
3551
  if (filter && !filter.call(instance, instance)) {
3548
3552
  return;
3549
3553
  }
3550
- const key = `_observe${instance._disconnect.length}`;
3551
3554
  if (isFunction(target) && !hasOwn(instance, key)) {
3552
3555
  registerComputed(instance, key, () => {
3553
3556
  const targets2 = target.call(instance, instance);
@@ -3748,7 +3751,7 @@
3748
3751
  const elementComponents = /* @__PURE__ */ new WeakMap();
3749
3752
  const components$2 = {};
3750
3753
  function component(name, options) {
3751
- var _a, _b;
3754
+ var _a;
3752
3755
  const id = PREFIX + hyphenate(name);
3753
3756
  if (!options) {
3754
3757
  if (!components$2[id].options) {
@@ -3758,10 +3761,10 @@
3758
3761
  }
3759
3762
  name = camelize(name);
3760
3763
  App[name] = (element, data) => createComponent(name, element, data);
3761
- const opt = (_a = options.options) != null ? _a : { ...options };
3764
+ const opt = options.options || { ...options };
3762
3765
  opt.id = id;
3763
3766
  opt.name = name;
3764
- (_b = opt.install) == null ? void 0 : _b.call(opt, App, opt, name);
3767
+ (_a = opt.install) == null ? void 0 : _a.call(opt, App, opt, name);
3765
3768
  if (App._initialized && !opt.functional) {
3766
3769
  requestAnimationFrame(() => createComponent(name, `[${id}],[data-${id}]`));
3767
3770
  }
@@ -6578,10 +6581,7 @@
6578
6581
  function match$1(pattern, path) {
6579
6582
  const expression = pattern.replace(
6580
6583
  /\*\*|[.*+?^${}()|[\]\\]/g,
6581
- (s) => {
6582
- var _a;
6583
- return (_a = { "**": ".*", "*": "[^/]+", "?": "[^/]", "|": "|" }[s]) != null ? _a : `\\${s}`;
6584
- }
6584
+ (s) => ({ "**": ".*", "*": "[^/]+", "?": "[^/]", "|": "|" })[s] || `\\${s}`
6585
6585
  );
6586
6586
  return new RegExp(`^(?:${expression})$`, "i").test(path);
6587
6587
  }
@@ -6913,11 +6913,10 @@
6913
6913
  mixins: [Class, Togglable],
6914
6914
  args: "animation",
6915
6915
  props: {
6916
- animation: Boolean,
6917
6916
  close: String
6918
6917
  },
6919
6918
  data: {
6920
- animation: true,
6919
+ animation: [true],
6921
6920
  selClose: ".uk-alert-close",
6922
6921
  duration: 150
6923
6922
  },
@@ -6931,7 +6930,11 @@
6931
6930
  },
6932
6931
  methods: {
6933
6932
  async close() {
6934
- await this.toggleElement(this.$el, false, this.animation ? animate : false);
6933
+ await this.toggleElement(
6934
+ this.$el,
6935
+ false,
6936
+ this.animation[0] === true || this.animation[0] === 1 ? animate : true
6937
+ );
6935
6938
  this.$destroy(true);
6936
6939
  }
6937
6940
  }
@@ -7163,11 +7166,10 @@
7163
7166
  attr(this.targetEl, "aria-expanded", false);
7164
7167
  this._style = pick(this.$el.style, ["width", "height"]);
7165
7168
  },
7169
+ beforeDisconnect() {
7170
+ this.hide(false, false);
7171
+ },
7166
7172
  disconnected() {
7167
- if (this.isActive()) {
7168
- this.hide(false);
7169
- active = null;
7170
- }
7171
7173
  css(this.$el, this._style);
7172
7174
  },
7173
7175
  events: [
@@ -7793,15 +7795,14 @@
7793
7795
  }
7794
7796
  },
7795
7797
  update() {
7796
- var _a;
7798
+ var _a, _b, _c, _d, _e, _f;
7797
7799
  const { target, input } = this;
7798
7800
  if (!target) {
7799
7801
  return;
7800
7802
  }
7801
- let option;
7802
7803
  const prop = isInput(target) ? "value" : "textContent";
7803
7804
  const prev = target[prop];
7804
- const value = ((_a = input.files) == null ? void 0 : _a[0]) ? input.files[0].name : matches(input, "select") && (option = $$("option", input).find((el) => el.selected)) ? option.textContent : input.value;
7805
+ const value = (_f = (_e = (_b = (_a = input.files) == null ? void 0 : _a[0]) == null ? void 0 : _b.name) != null ? _e : (_d = (_c = input.selectedOptions) == null ? void 0 : _c[0]) == null ? void 0 : _d.label) != null ? _f : input.value;
7805
7806
  if (prev !== value) {
7806
7807
  target[prop] = value;
7807
7808
  }
@@ -8333,16 +8334,9 @@
8333
8334
  beforeConnect() {
8334
8335
  const isToggle = hasClass(this.$el, "uk-search-toggle") || hasClass(this.$el, "uk-navbar-toggle");
8335
8336
  this.icon = isToggle ? "search-toggle-icon" : hasClass(this.$el, "uk-search-icon") && this.$el.closest(".uk-search-large") ? "search-large" : this.$el.closest(".uk-search-medium") ? "search-medium" : this.$props.icon;
8336
- if (hasAttr(this.$el, "aria-label")) {
8337
- return;
8338
- }
8339
- if (isToggle) {
8340
- this.$el.ariaLabel = this.t("toggle");
8341
- } else {
8342
- const button = this.$el.closest("a,button");
8343
- if (button) {
8344
- button.ariaLabel = this.t("submit");
8345
- }
8337
+ const target = isToggle ? this.$el : this.$el.closest("a,button");
8338
+ if (target && !hasAttr(target, "aria-label")) {
8339
+ target.ariaLabel = this.t(isToggle ? "toggle" : "submit");
8346
8340
  }
8347
8341
  }
8348
8342
  };
@@ -10062,7 +10056,6 @@
10062
10056
  {
10063
10057
  name: "mediachange",
10064
10058
  filter: ({ mode }) => includes(mode, "media"),
10065
- el: ({ target }) => target,
10066
10059
  handler(e, mediaObj) {
10067
10060
  if (mediaObj.matches ^ this.isToggled(this.target)) {
10068
10061
  this.toggle();