uikit 3.17.5-dev.563196f5e → 3.17.5-dev.e5ca8bbdc

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/CHANGELOG.md +5 -1
  2. package/dist/css/uikit-core-rtl.css +1 -2
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +1 -2
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +1 -2
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +1 -2
  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 +1 -1
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +1 -1
  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 +26 -28
  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 +26 -28
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/video.js +19 -28
  44. package/src/js/util/viewport.js +9 -2
  45. package/src/less/components/cover.less +0 -1
  46. package/src/scss/components/cover.scss +0 -1
  47. package/tests/cover.html +1 -1
  48. package/tests/slideshow.html +1 -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.17.5-dev.563196f5e",
5
+ "version": "3.17.5-dev.e5ca8bbdc",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -1,5 +1,5 @@
1
- import { hasAttr, isInView, isTag, isVideo, isVisible, mute, pause, play } from 'uikit-util';
2
- import { intersection, resize } from '../api/observables';
1
+ import { hasAttr, isTag, isVideo, mute, parent, pause, play } from 'uikit-util';
2
+ import { intersection } from '../api/observables';
3
3
 
4
4
  export default {
5
5
  args: 'autoplay',
@@ -14,9 +14,11 @@ export default {
14
14
  autoplay: true,
15
15
  },
16
16
 
17
- connected() {
17
+ beforeConnect() {
18
18
  this.inView = this.autoplay === 'inview';
19
+ },
19
20
 
21
+ connected() {
20
22
  if (this.inView && !hasAttr(this.$el, 'preload')) {
21
23
  this.$el.preload = 'none';
22
24
  }
@@ -30,29 +32,18 @@ export default {
30
32
  }
31
33
  },
32
34
 
33
- observe: [intersection({ args: { intersecting: false } }), resize()],
34
-
35
- update: {
36
- read({ visible }) {
37
- if (!isVideo(this.$el)) {
38
- return false;
39
- }
40
-
41
- return {
42
- prev: visible,
43
- visible: isVisible(this.$el),
44
- inView: this.inView && isInView(this.$el),
45
- };
46
- },
47
-
48
- write({ prev, visible, inView }) {
49
- if (!visible || (this.inView && !inView)) {
50
- pause(this.$el);
51
- } else if ((this.autoplay === true && !prev) || inView) {
52
- play(this.$el);
53
- }
54
- },
55
-
56
- events: ['resize'],
57
- },
35
+ observe: [
36
+ intersection({
37
+ filter: ({ $el }) => isVideo($el),
38
+ handler([{ isIntersecting }]) {
39
+ if (isIntersecting) {
40
+ play(this.$el);
41
+ } else {
42
+ pause(this.$el);
43
+ }
44
+ },
45
+ args: { intersecting: false },
46
+ options: ({ $el, inView }) => ({ root: inView ? null : parent($el) }),
47
+ }),
48
+ ],
58
49
  };
@@ -1,5 +1,5 @@
1
1
  import { offset, offsetPosition } from './dimensions';
2
- import { isVisible, parents, within } from './filter';
2
+ import { isVisible, parent, parents, within } from './filter';
3
3
  import {
4
4
  clamp,
5
5
  findIndex,
@@ -204,11 +204,18 @@ export function getCoveringElement(target) {
204
204
  .find(
205
205
  (el) =>
206
206
  !el.contains(target) &&
207
- (css(el, 'position') === 'fixed' ||
207
+ ((css(el, 'position') === 'fixed' && !hasHigherZIndex(target, el)) ||
208
208
  (css(el, 'position') === 'sticky' && within(target, el.parentElement))),
209
209
  );
210
210
  }
211
211
 
212
+ function hasHigherZIndex(element1, element2) {
213
+ return (
214
+ parent(element1) === parent(element2) &&
215
+ toFloat(css(element1, 'zIndex')) > toFloat(css(element2, 'zIndex'))
216
+ );
217
+ }
218
+
212
219
  function scrollingElement(element) {
213
220
  return toWindow(element).document.scrollingElement;
214
221
  }
@@ -41,7 +41,6 @@ video[data-uk-cover] {
41
41
  /* 1 */
42
42
  :not(img,video)[uk-cover],
43
43
  :not(img,video)[data-uk-cover] {
44
- pointer-events: none;
45
44
  /* 2 */
46
45
  max-width: none;
47
46
  /* 3 */
@@ -41,7 +41,6 @@ video[data-uk-cover] {
41
41
  /* 1 */
42
42
  :not(img,video)[uk-cover],
43
43
  :not(img,video)[data-uk-cover] {
44
- pointer-events: none;
45
44
  /* 2 */
46
45
  max-width: none;
47
46
  /* 3 */
package/tests/cover.html CHANGED
@@ -63,7 +63,7 @@
63
63
  <h3>Iframe (Vimeo)</h3>
64
64
 
65
65
  <div class="test-height uk-cover-container uk-light">
66
- <iframe src="https://player.vimeo.com/video/1084537?title=0&amp;byline=0&amp;autoplay=1&amp;loop=1&amp;setVolume=0" width="500" height="281" allowfullscreen uk-cover></iframe>
66
+ <iframe src="https://player.vimeo.com/video/1084537?title=0&amp;background=1&amp;keyboard=0" width="500" height="281" allowfullscreen uk-cover></iframe>
67
67
  <div class="uk-position-cover uk-flex uk-flex-center uk-flex-middle">
68
68
  <h1>Heading</h1>
69
69
  </div>
@@ -112,7 +112,7 @@
112
112
  </div>
113
113
  </li>
114
114
  <li>
115
- <iframe src="https://player.vimeo.com/video/1084537?title=0&amp;byline=0&amp;autoplay=1&amp;loop=1&amp;setVolume=0" width="500" height="281" allowfullscreen uk-cover></iframe>
115
+ <iframe src="https://player.vimeo.com/video/1084537?title=0&amp;background=1&amp;keyboard=0" width="500" height="281" allowfullscreen uk-cover></iframe>
116
116
  <div class="uk-position-center uk-position-small uk-text-center">
117
117
  <h2 uk-slideshow-parallax="x: 100,-100">Vimeo</h2>
118
118
  <p uk-slideshow-parallax="x: 200,-200">Lorem ipsum dolor sit amet.</p>