uikit 3.15.15-dev.492ccd2ec → 3.15.15-dev.563bd9495

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 (47) hide show
  1. package/CHANGELOG.md +5 -0
  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 +5 -2
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +5 -2
  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 +1 -1
  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 +1 -1
  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 +1 -1
  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 +12 -22
  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 +12 -22
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/img.js +3 -11
  44. package/src/js/core/scrollspy.js +3 -10
  45. package/src/js/mixin/modal.js +4 -1
  46. package/tests/image.html +6 -6
  47. package/tests/scrollspy.html +4 -10
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.15-dev.492ccd2ec",
5
+ "version": "3.15.15-dev.563bd9495",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -19,7 +19,6 @@ import {
19
19
  queryAll,
20
20
  removeAttr,
21
21
  startsWith,
22
- toPx,
23
22
  trigger,
24
23
  } from 'uikit-util';
25
24
 
@@ -31,8 +30,7 @@ export default {
31
30
  props: {
32
31
  dataSrc: String,
33
32
  sources: String,
34
- offsetTop: String,
35
- offsetLeft: String,
33
+ margin: String,
36
34
  target: String,
37
35
  loading: String,
38
36
  },
@@ -40,8 +38,7 @@ export default {
40
38
  data: {
41
39
  dataSrc: '',
42
40
  sources: false,
43
- offsetTop: '50vh',
44
- offsetLeft: '50vw',
41
+ margin: '50% 50%',
45
42
  target: false,
46
43
  loading: 'lazy',
47
44
  },
@@ -72,12 +69,7 @@ export default {
72
69
  this.load();
73
70
  observer.disconnect();
74
71
  },
75
- {
76
- rootMargin: `${toPx(this.offsetTop, 'height')}px ${toPx(
77
- this.offsetLeft,
78
- 'width'
79
- )}px`,
80
- }
72
+ { rootMargin: this.margin }
81
73
  )
82
74
  );
83
75
  },
@@ -10,7 +10,6 @@ import {
10
10
  removeClass,
11
11
  removeClasses,
12
12
  toggleClass,
13
- toPx,
14
13
  trigger,
15
14
  } from 'uikit-util';
16
15
 
@@ -23,8 +22,7 @@ export default {
23
22
  cls: String,
24
23
  target: String,
25
24
  hidden: Boolean,
26
- offsetTop: Number,
27
- offsetLeft: Number,
25
+ margin: String,
28
26
  repeat: Boolean,
29
27
  delay: Number,
30
28
  },
@@ -33,8 +31,7 @@ export default {
33
31
  cls: '',
34
32
  target: false,
35
33
  hidden: true,
36
- offsetTop: 0,
37
- offsetLeft: 0,
34
+ margin: '-1px -1px',
38
35
  repeat: false,
39
36
  delay: 0,
40
37
  inViewClass: 'uk-scrollspy-inview',
@@ -85,11 +82,7 @@ export default {
85
82
 
86
83
  this.$emit();
87
84
  },
88
- {
89
- rootMargin: `${toPx(this.offsetTop, 'height') - 1}px ${
90
- toPx(this.offsetLeft, 'width') - 1
91
- }px`,
92
- },
85
+ { rootMargin: this.margin },
93
86
  false
94
87
  )
95
88
  );
@@ -304,7 +304,10 @@ function toMs(time) {
304
304
 
305
305
  export function preventOverscroll(el) {
306
306
  if (CSS.supports('overscroll-behavior', 'contain')) {
307
- const elements = filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')));
307
+ const elements = [
308
+ el,
309
+ ...filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow'))),
310
+ ];
308
311
  css(elements, 'overscrollBehavior', 'contain');
309
312
  return () => css(elements, 'overscrollBehavior', '');
310
313
  }
package/tests/image.html CHANGED
@@ -17,7 +17,7 @@
17
17
  <div class="uk-height-large uk-background-cover uk-margin-medium uk-flex uk-flex-center uk-flex-middle uk-light" data-src="https://images.unsplash.com/photo-1495321308589-43affb814eee?fit=crop&w=1200&h=450&q=80" uk-img="loading: eager">
18
18
  <h1>Background Image Loading Eager</h1>
19
19
  </div>
20
-
20
+
21
21
  <h2>Loading Lazy Attribute</h2>
22
22
 
23
23
  <div class="uk-child-width-1-2@m" uk-grid>
@@ -265,7 +265,7 @@
265
265
  sizes="(min-width: 1200px) 1200px, 100vw" uk-img>
266
266
  <h1>Background Picture with Srcset</h1>
267
267
  </div>
268
-
268
+
269
269
  <div class="uk-height-large uk-background-cover uk-margin-medium uk-flex uk-flex-center uk-flex-middle"
270
270
  sources="[{&quot;srcset&quot;: &quot;images/image-type.avif&quot;,
271
271
  &quot;type&quot;: &quot;image\/avif&quot;
@@ -491,7 +491,7 @@
491
491
  width="746" height="498" alt="" uk-img>
492
492
  </div>
493
493
  </div>
494
-
494
+
495
495
  <div class="uk-child-width-1-2@m" uk-grid>
496
496
  <div>
497
497
 
@@ -621,10 +621,10 @@
621
621
  <td>Enable lazy/eager loading. Set to `eager` for images within the first visible viewport.</td>
622
622
  </tr>
623
623
  <tr>
624
- <td><code>offsetTop</code></td>
624
+ <td><code>margin</code></td>
625
625
  <td>String</td>
626
- <td>'50vh'</td>
627
- <td>The offset increases the viewport's bounding box vertically, before computing an intersection with the image.</td>
626
+ <td>'50% 50%'</td>
627
+ <td>The margin increases the viewport's bounding box, before computing an intersection with the image. (Must be px or % units)</td>
628
628
  </tr>
629
629
  <tr>
630
630
  <td><code>offsetLeft</code></td>
@@ -513,16 +513,10 @@
513
513
  <td>Hides the element while out of view.</td>
514
514
  </tr>
515
515
  <tr>
516
- <td><code>offset-top</code></td>
517
- <td>Number</td>
518
- <td>0</td>
519
- <td>Top offset before triggering in view.</td>
520
- </tr>
521
- <tr>
522
- <td><code>offset-left</code></td>
523
- <td>Number</td>
524
- <td>0</td>
525
- <td>Left offset before triggering in view.</td>
516
+ <td><code>margin</code></td>
517
+ <td>String</td>
518
+ <td>'-1px -1px'</td>
519
+ <td>The margin is added to the viewport's bounding box, before computing an intersection with the element. (Must be px or % units)</td>
526
520
  </tr>
527
521
  <tr>
528
522
  <td><code>repeat</code></td>