uikit 3.25.23-dev.0ea1d51 → 3.25.23-dev.9fe9bc4

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 (48) hide show
  1. package/build/build.js +2 -1
  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 +6 -3
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +6 -3
  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 +4 -6
  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 +3 -5
  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 +2 -2
  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 +16 -11
  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 +17 -12
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/app.js +4 -2
  44. package/src/js/api/observables.js +3 -3
  45. package/src/js/api/props.js +2 -1
  46. package/src/js/components/slider.js +1 -1
  47. package/src/js/core/img.js +7 -2
  48. package/src/js/util/event.js +5 -1
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.23-dev.0ea1d51",
5
+ "version": "3.25.23-dev.9fe9bc4",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
package/src/js/api/app.js CHANGED
@@ -2,10 +2,12 @@ import * as util from 'uikit-util';
2
2
  import VERSION from 'virtual:version';
3
3
  import { init } from './state';
4
4
 
5
- export default function App(options) {
5
+ const App = function (options) {
6
6
  init(this, options);
7
- }
7
+ };
8
8
 
9
9
  App.util = util;
10
10
  App.options = {};
11
11
  App.version = VERSION;
12
+
13
+ export default App;
@@ -43,9 +43,9 @@ export function lazyload(options = {}) {
43
43
  .forEach((el) => removeAttr(el, 'loading'));
44
44
  }
45
45
 
46
- for (const { isIntersecting, target } of entries) {
47
- isIntersecting && observer.unobserve(target);
48
- }
46
+ entries
47
+ .filter(({ isIntersecting }) => isIntersecting)
48
+ .forEach(({ target }) => observer.unobserve(target));
49
49
  },
50
50
  ...options,
51
51
  });
@@ -69,7 +69,8 @@ const getAttributes = memoize((id, props) => {
69
69
  const attributes = Object.keys(props);
70
70
  const filter = attributes
71
71
  .concat(id)
72
- .flatMap((key) => [hyphenate(key), `data-${hyphenate(key)}`]);
72
+ .map((key) => [hyphenate(key), `data-${hyphenate(key)}`])
73
+ .flat();
73
74
  return { attributes, filter };
74
75
  });
75
76
 
@@ -302,7 +302,7 @@ export default {
302
302
  slides.add(slide);
303
303
  } while (this.length > j && currentLeft > left && currentLeft < right);
304
304
  }
305
- return [...slides];
305
+ return Array.from(slides);
306
306
  },
307
307
 
308
308
  getIndexAt(percent) {
@@ -88,7 +88,8 @@ function setSrcAttrs(el, src) {
88
88
  const elements = isTag(parentNode, 'picture') ? children(parentNode) : [el];
89
89
  elements.forEach((el) => setSourceProps(el, el));
90
90
  } else if (src) {
91
- if (!includes(el.style.backgroundImage, src)) {
91
+ const change = !includes(el.style.backgroundImage, src);
92
+ if (change) {
92
93
  css(el, 'backgroundImage', `url(${escape(src)})`);
93
94
  trigger(el, createEvent('load', false));
94
95
  }
@@ -144,7 +145,11 @@ function parseSources(sources) {
144
145
  sources = parseOptions(sources);
145
146
  }
146
147
 
147
- return (isArray(sources) ? sources : [sources]).filter((source) => !isEmpty(source));
148
+ if (!isArray(sources)) {
149
+ sources = [sources];
150
+ }
151
+
152
+ return sources.filter((source) => !isEmpty(source));
148
153
  }
149
154
 
150
155
  function isImg(el) {
@@ -60,7 +60,11 @@ export function trigger(targets, event, detail) {
60
60
  }
61
61
 
62
62
  export function createEvent(e, bubbles = true, cancelable = false, detail) {
63
- return isString(e) ? new CustomEvent(e, { bubbles, cancelable, detail }) : e;
63
+ if (isString(e)) {
64
+ e = new CustomEvent(e, { bubbles, cancelable, detail });
65
+ }
66
+
67
+ return e;
64
68
  }
65
69
 
66
70
  function getArgs(args) {