uikit 3.15.0 → 3.15.1-dev.022704dc6

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 (46) hide show
  1. package/dist/css/uikit-core-rtl.css +1 -1
  2. package/dist/css/uikit-core-rtl.min.css +1 -1
  3. package/dist/css/uikit-core.css +1 -1
  4. package/dist/css/uikit-core.min.css +1 -1
  5. package/dist/css/uikit-rtl.css +1 -1
  6. package/dist/css/uikit-rtl.min.css +1 -1
  7. package/dist/css/uikit.css +1 -1
  8. package/dist/css/uikit.min.css +1 -1
  9. package/dist/js/components/countdown.js +1 -1
  10. package/dist/js/components/countdown.min.js +1 -1
  11. package/dist/js/components/filter.js +1 -1
  12. package/dist/js/components/filter.min.js +1 -1
  13. package/dist/js/components/lightbox-panel.js +1 -1
  14. package/dist/js/components/lightbox-panel.min.js +1 -1
  15. package/dist/js/components/lightbox.js +1 -1
  16. package/dist/js/components/lightbox.min.js +1 -1
  17. package/dist/js/components/notification.js +1 -1
  18. package/dist/js/components/notification.min.js +1 -1
  19. package/dist/js/components/parallax.js +1 -1
  20. package/dist/js/components/parallax.min.js +1 -1
  21. package/dist/js/components/slider-parallax.js +1 -1
  22. package/dist/js/components/slider-parallax.min.js +1 -1
  23. package/dist/js/components/slider.js +9 -2
  24. package/dist/js/components/slider.min.js +1 -1
  25. package/dist/js/components/slideshow-parallax.js +1 -1
  26. package/dist/js/components/slideshow-parallax.min.js +1 -1
  27. package/dist/js/components/slideshow.js +9 -2
  28. package/dist/js/components/slideshow.min.js +1 -1
  29. package/dist/js/components/sortable.js +1 -1
  30. package/dist/js/components/sortable.min.js +1 -1
  31. package/dist/js/components/tooltip.js +1 -1
  32. package/dist/js/components/tooltip.min.js +1 -1
  33. package/dist/js/components/upload.js +1 -1
  34. package/dist/js/components/upload.min.js +1 -1
  35. package/dist/js/uikit-core.js +18 -13
  36. package/dist/js/uikit-core.min.js +2 -2
  37. package/dist/js/uikit-icons.js +1 -1
  38. package/dist/js/uikit-icons.min.js +1 -1
  39. package/dist/js/uikit.js +18 -13
  40. package/dist/js/uikit.min.js +2 -2
  41. package/package.json +1 -1
  42. package/src/js/core/navbar.js +3 -4
  43. package/src/js/core/switcher.js +4 -5
  44. package/src/js/core/toggle.js +1 -2
  45. package/src/js/mixin/lazyload.js +8 -1
  46. package/tests/modal.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.15.0",
5
+ "version": "3.15.1-dev.022704dc6",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -18,7 +18,6 @@ import {
18
18
  observeResize,
19
19
  offset,
20
20
  once,
21
- parent,
22
21
  parents,
23
22
  query,
24
23
  remove,
@@ -74,7 +73,7 @@ export default {
74
73
  },
75
74
 
76
75
  dropbarAnchor({ dropbarAnchor }, $el) {
77
- return query(dropbarAnchor, $el);
76
+ return query(dropbarAnchor, $el) || $el;
78
77
  },
79
78
 
80
79
  pos({ align }) {
@@ -295,8 +294,8 @@ export default {
295
294
  return;
296
295
  }
297
296
 
298
- if (!parent(this.dropbar)) {
299
- after(this.dropbarAnchor || this.$el, this.dropbar);
297
+ if (this.dropbar.previousElementSibling !== this.dropbarAnchor) {
298
+ after(this.dropbarAnchor, this.dropbar);
300
299
  }
301
300
 
302
301
  addClass(target, `${this.clsDrop}-dropbar`);
@@ -52,9 +52,10 @@ export default {
52
52
  }
53
53
 
54
54
  const index = this.index();
55
- this.connects.forEach((el) =>
56
- children(el).forEach((child, i) => toggleClass(child, this.cls, i === index))
57
- );
55
+ this.connects.forEach((el) => {
56
+ children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));
57
+ this.lazyload(this.$el, children(el));
58
+ });
58
59
  },
59
60
 
60
61
  immediate: true,
@@ -87,8 +88,6 @@ export default {
87
88
  },
88
89
 
89
90
  connected() {
90
- this.lazyload(this.$el, this.connects);
91
-
92
91
  // check for connects
93
92
  ready(() => this.$emit());
94
93
  },
@@ -51,6 +51,7 @@ export default {
51
51
 
52
52
  watch() {
53
53
  this.updateAria();
54
+ this.lazyload(this.$el, this.target);
54
55
  },
55
56
 
56
57
  immediate: true,
@@ -62,8 +63,6 @@ export default {
62
63
  attr(this.$el, 'tabindex', '0');
63
64
  }
64
65
 
65
- this.lazyload(this.$el, this.target);
66
-
67
66
  // check for target
68
67
  ready(() => this.$emit());
69
68
  },
@@ -1,13 +1,20 @@
1
1
  import { $$, isFunction, observeIntersection, removeAttr, toNodes } from 'uikit-util';
2
2
 
3
3
  export default {
4
+ data: {
5
+ preload: 5,
6
+ },
7
+
4
8
  methods: {
5
9
  lazyload(observeTargets = this.$el, targets = this.$el) {
6
10
  this.registerObserver(
7
11
  observeIntersection(observeTargets, (entries, observer) => {
8
12
  for (const el of toNodes(isFunction(targets) ? targets() : targets)) {
9
- $$('[loading="lazy"]', el).forEach((el) => removeAttr(el, 'loading'));
13
+ $$('[loading="lazy"]', el)
14
+ .slice(0, this.preload - 1)
15
+ .forEach((el) => removeAttr(el, 'loading'));
10
16
  }
17
+
11
18
  for (const el of entries
12
19
  .filter(({ isIntersecting }) => isIntersecting)
13
20
  .map(({ target }) => target)) {
package/tests/modal.html CHANGED
@@ -383,14 +383,14 @@
383
383
  <div id="modal-media-youtube" uk-modal>
384
384
  <div class="uk-modal-dialog uk-width-auto uk-margin-auto-vertical">
385
385
  <button class="uk-modal-close-outside" type="button" uk-close></button>
386
- <iframe src="https://www.youtube-nocookie.com/embed/c2pz2mlSfXA" width="1920" height="1080" uk-video></iframe>
386
+ <iframe src="https://www.youtube-nocookie.com/embed/c2pz2mlSfXA" width="1920" height="1080" uk-responsive uk-video></iframe>
387
387
  </div>
388
388
  </div>
389
389
 
390
390
  <div id="modal-media-vimeo" uk-modal>
391
391
  <div class="uk-modal-dialog uk-width-auto uk-margin-auto-vertical">
392
392
  <button class="uk-modal-close-outside" type="button" uk-close></button>
393
- <iframe src="https://player.vimeo.com/video/1084537" width="500" height="281" uk-video></iframe>
393
+ <iframe src="https://player.vimeo.com/video/1084537" width="500" height="281" uk-responsive uk-video></iframe>
394
394
  </div>
395
395
  </div>
396
396