uikit 3.25.22-dev.d02a9a6 → 3.25.23-dev.0ea1d51

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 (59) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/build/build.js +1 -2
  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 +2 -2
  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 +4 -7
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +4 -7
  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 +6 -6
  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 +5 -10
  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 +2 -2
  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 +23 -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 +26 -36
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +1 -1
  44. package/src/js/api/app.js +2 -4
  45. package/src/js/api/observables.js +2 -4
  46. package/src/js/api/props.js +1 -2
  47. package/src/js/components/countdown.js +1 -1
  48. package/src/js/components/slider.js +1 -1
  49. package/src/js/components/slideshow.js +0 -5
  50. package/src/js/core/form-custom.js +1 -1
  51. package/src/js/core/height-match.js +1 -2
  52. package/src/js/core/img.js +2 -7
  53. package/src/js/core/switcher.js +1 -1
  54. package/src/js/mixin/slider-nav.js +1 -1
  55. package/src/js/mixin/svg.js +1 -1
  56. package/src/js/util/class.js +1 -1
  57. package/src/js/util/event.js +1 -5
  58. package/src/js/util/lang.js +6 -2
  59. package/src/js/util/player.js +2 -4
package/dist/js/uikit.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.25.22-dev.d02a9a6 | https://www.getuikit.com | (c) 2014 - 2026 YOOtheme | MIT License */
1
+ /*! UIkit 3.25.23-dev.0ea1d51 | 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() :
@@ -131,10 +131,14 @@
131
131
  }
132
132
  function uniqueBy(array, prop) {
133
133
  const seen = /* @__PURE__ */ new Set();
134
- return array.filter(({ [prop]: check }) => seen.has(check) ? false : seen.add(check));
134
+ return array.filter(({ [prop]: check }) => !seen.has(check) && seen.add(check));
135
135
  }
136
136
  function pick(obj, props) {
137
- return props.reduce((res, prop) => ({ ...res, [prop]: obj[prop] }), {});
137
+ const result = {};
138
+ for (const prop of props) {
139
+ result[prop] = obj[prop];
140
+ }
141
+ return result;
138
142
  }
139
143
  function clamp(number, min = 0, max = 1) {
140
144
  return Math.min(Math.max(toNumber(number) || 0, min), max);
@@ -230,7 +234,7 @@
230
234
  }
231
235
  }
232
236
  function toClasses(str) {
233
- return str ? isArray(str) ? str.map(toClasses).flat() : String(str).split(" ").filter(Boolean) : [];
237
+ return str ? isArray(str) ? str.flatMap(toClasses) : String(str).split(" ").filter(Boolean) : [];
234
238
  }
235
239
 
236
240
  function attr(element, name, value) {
@@ -512,10 +516,7 @@
512
516
  return toEventTargets(targets).map((target) => target.dispatchEvent(createEvent(event, true, true, detail2))).every((result) => result);
513
517
  }
514
518
  function createEvent(e, bubbles = true, cancelable = false, detail2) {
515
- if (isString(e)) {
516
- e = new CustomEvent(e, { bubbles, cancelable, detail: detail2 });
517
- }
518
- return e;
519
+ return isString(e) ? new CustomEvent(e, { bubbles, cancelable, detail: detail2 }) : e;
519
520
  }
520
521
  function getArgs(args) {
521
522
  args[0] = toEventTargets(args[0]);
@@ -1147,12 +1148,10 @@
1147
1148
  return isTag(el, "iframe") && (isYoutube(el) || isVimeo(el));
1148
1149
  }
1149
1150
  function isYoutube(el) {
1150
- return !!el.src.match(
1151
- /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\/.*/
1152
- );
1151
+ return /\/\/.*?youtube(-nocookie)?\.[a-z]+\/(watch\?v=[^&\s]+|embed)|youtu\.be\//.test(el.src);
1153
1152
  }
1154
1153
  function isVimeo(el) {
1155
- return !!el.src.match(/vimeo\.com\/video\/.*/);
1154
+ return /vimeo\.com\/video\/.*/.test(el.src);
1156
1155
  }
1157
1156
  async function call(el, cmd) {
1158
1157
  await enableApi(el);
@@ -1763,7 +1762,7 @@
1763
1762
  if (el.textContent !== digits) {
1764
1763
  digits = digits.split("");
1765
1764
  if (digits.length !== el.children.length) {
1766
- html(el, digits.map(() => "<span></span>").join(""));
1765
+ html(el, "<span></span>".repeat(digits.length));
1767
1766
  }
1768
1767
  digits.forEach((digit, i) => el.children[i].textContent = digit);
1769
1768
  }
@@ -1956,8 +1955,8 @@
1956
1955
  for (const el of toNodes(isFunction(targets) ? targets(this) : targets)) {
1957
1956
  $$('[loading="lazy"]', el).slice(0, preload - 1).forEach((el2) => removeAttr(el2, "loading"));
1958
1957
  }
1959
- for (const el of entries.filter(({ isIntersecting }) => isIntersecting).map(({ target }) => target)) {
1960
- observer.unobserve(el);
1958
+ for (const { isIntersecting, target } of entries) {
1959
+ isIntersecting && observer.unobserve(target);
1961
1960
  }
1962
1961
  },
1963
1962
  ...options
@@ -2559,8 +2558,7 @@
2559
2558
  const elements = isTag(parentNode, "picture") ? children(parentNode) : [el];
2560
2559
  elements.forEach((el2) => setSourceProps(el2, el2));
2561
2560
  } else if (src) {
2562
- const change = !includes(el.style.backgroundImage, src);
2563
- if (change) {
2561
+ if (!includes(el.style.backgroundImage, src)) {
2564
2562
  css(el, "backgroundImage", `url(${escape(src)})`);
2565
2563
  trigger(el, createEvent("load", false));
2566
2564
  }
@@ -2608,10 +2606,7 @@
2608
2606
  } else {
2609
2607
  sources = parseOptions(sources);
2610
2608
  }
2611
- if (!isArray(sources)) {
2612
- sources = [sources];
2613
- }
2614
- return sources.filter((source) => !isEmpty(source));
2609
+ return (isArray(sources) ? sources : [sources]).filter((source) => !isEmpty(source));
2615
2610
  }
2616
2611
  function isImg(el) {
2617
2612
  return isTag(el, "img");
@@ -3396,7 +3391,7 @@
3396
3391
  return Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180 / Math.PI;
3397
3392
  }
3398
3393
 
3399
- var VERSION = '3.25.22-dev.d02a9a6';
3394
+ var VERSION = '3.25.23-dev.0ea1d51';
3400
3395
 
3401
3396
  function initWatches(instance) {
3402
3397
  instance._watches = [];
@@ -3605,7 +3600,7 @@
3605
3600
  }
3606
3601
  const getAttributes = memoize((id, props) => {
3607
3602
  const attributes = Object.keys(props);
3608
- const filter = attributes.concat(id).map((key) => [hyphenate(key), `data-${hyphenate(key)}`]).flat();
3603
+ const filter = attributes.concat(id).flatMap((key) => [hyphenate(key), `data-${hyphenate(key)}`]);
3609
3604
  return { attributes, filter };
3610
3605
  });
3611
3606
  function initPropsObserver(instance) {
@@ -3714,9 +3709,9 @@
3714
3709
  return data;
3715
3710
  }
3716
3711
 
3717
- const App = function(options) {
3712
+ function App(options) {
3718
3713
  init$1(this, options);
3719
- };
3714
+ }
3720
3715
  App.util = util;
3721
3716
  App.options = {};
3722
3717
  App.version = VERSION;
@@ -3896,7 +3891,7 @@
3896
3891
  computed: {
3897
3892
  nav: ({ selNav }, $el) => $$(selNav, $el),
3898
3893
  navChildren() {
3899
- return this.nav.map((nav) => children(nav)).flat();
3894
+ return this.nav.flatMap((nav) => children(nav));
3900
3895
  },
3901
3896
  selNavItem: ({ attrItem }) => `[${attrItem}],[data-${attrItem}]`,
3902
3897
  navItems(_, $el) {
@@ -5762,7 +5757,7 @@
5762
5757
  slides.add(slide);
5763
5758
  } while (this.length > j && currentLeft > left && currentLeft < right);
5764
5759
  }
5765
- return Array.from(slides);
5760
+ return [...slides];
5766
5761
  },
5767
5762
  getIndexAt(percent) {
5768
5763
  let index = -1;
@@ -5908,11 +5903,6 @@
5908
5903
  width: "100%"
5909
5904
  });
5910
5905
  }
5911
- },
5912
- methods: {
5913
- getAdjacentSlides() {
5914
- return [1, -1].map((i) => this.slides[this.getIndex(this.index + i)]);
5915
- }
5916
5906
  }
5917
5907
  };
5918
5908
 
@@ -7824,7 +7814,7 @@
7824
7814
  let option;
7825
7815
  const prop = isInput(target) ? "value" : "textContent";
7826
7816
  const prev = target[prop];
7827
- const value = ((_a = input.files) == null ? void 0 : _a[0]) ? input.files[0].name : matches(input, "select") && (option = $$("option", input).filter((el) => el.selected)[0]) ? option.textContent : input.value;
7817
+ 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;
7828
7818
  if (prev !== value) {
7829
7819
  target[prop] = value;
7830
7820
  }
@@ -8014,7 +8004,7 @@
8014
8004
  elements: ({ target }, $el) => $$(target, $el)
8015
8005
  },
8016
8006
  observe: resize({
8017
- target: ({ $el, elements }) => elements.reduce((elements2, el) => elements2.concat(el, ...el.children), [$el])
8007
+ target: ({ $el, elements }) => [$el, ...elements.flatMap((el) => [el, ...el.children])]
8018
8008
  }),
8019
8009
  events: {
8020
8010
  // Hidden elements may change height when fonts load
@@ -8271,7 +8261,7 @@
8271
8261
  if (icon && includes(svg, "<symbol")) {
8272
8262
  svg = parseSymbols(svg)[icon] || svg;
8273
8263
  }
8274
- return toNodes(fragment(svg)).filter(isElement)[0];
8264
+ return toNodes(fragment(svg)).find(isElement);
8275
8265
  }
8276
8266
  const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
8277
8267
  const parseSymbols = memoize(function(svg) {
@@ -9800,7 +9790,7 @@
9800
9790
  observe: ({ connect }) => connect
9801
9791
  },
9802
9792
  connectChildren() {
9803
- return this.connects.map((el) => children(el)).flat();
9793
+ return this.connects.flatMap((el) => children(el));
9804
9794
  },
9805
9795
  toggles: ({ toggle }, $el) => $$(toggle, $el),
9806
9796
  children(_, $el) {