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.
- package/CHANGELOG.md +5 -1
- package/dist/css/uikit-core-rtl.css +1 -2
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -2
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -2
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -2
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +26 -28
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +26 -28
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/video.js +19 -28
- package/src/js/util/viewport.js +9 -2
- package/src/less/components/cover.less +0 -1
- package/src/scss/components/cover.scss +0 -1
- package/tests/cover.html +1 -1
- 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.
|
|
5
|
+
"version": "3.17.5-dev.e5ca8bbdc",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/video.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hasAttr,
|
|
2
|
-
import { intersection
|
|
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
|
-
|
|
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: [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
};
|
package/src/js/util/viewport.js
CHANGED
|
@@ -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
|
}
|
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&
|
|
66
|
+
<iframe src="https://player.vimeo.com/video/1084537?title=0&background=1&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>
|
package/tests/slideshow.html
CHANGED
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
</div>
|
|
113
113
|
</li>
|
|
114
114
|
<li>
|
|
115
|
-
<iframe src="https://player.vimeo.com/video/1084537?title=0&
|
|
115
|
+
<iframe src="https://player.vimeo.com/video/1084537?title=0&background=1&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>
|