uikit 3.13.11-dev.98491b3f4 → 3.13.11-dev.eb080f280
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 +4 -1
- package/dist/css/uikit-core-rtl.css +6 -3
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +6 -3
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +6 -3
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +6 -3
- 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 +42 -18
- 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 +42 -18
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/sticky.js +36 -12
- package/src/less/components/sticky.less +8 -3
- package/src/scss/components/sticky.scss +8 -3
- package/tests/parallax.html +4 -4
- package/tests/sticky-navbar.html +6 -6
- package/tests/sticky-parallax.html +8 -8
- package/tests/sticky.html +149 -74
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.13.11-dev.
|
|
5
|
+
"version": "3.13.11-dev.eb080f280",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/sticky.js
CHANGED
|
@@ -36,11 +36,12 @@ export default {
|
|
|
36
36
|
|
|
37
37
|
props: {
|
|
38
38
|
position: String,
|
|
39
|
-
top:
|
|
40
|
-
bottom:
|
|
41
|
-
start:
|
|
42
|
-
end:
|
|
39
|
+
top: null,
|
|
40
|
+
bottom: null,
|
|
41
|
+
start: null,
|
|
42
|
+
end: null,
|
|
43
43
|
offset: String,
|
|
44
|
+
overflowFlip: Boolean,
|
|
44
45
|
animation: String,
|
|
45
46
|
clsActive: String,
|
|
46
47
|
clsInactive: String,
|
|
@@ -58,6 +59,7 @@ export default {
|
|
|
58
59
|
start: false,
|
|
59
60
|
end: false,
|
|
60
61
|
offset: 0,
|
|
62
|
+
overflowFlip: false,
|
|
61
63
|
animation: '',
|
|
62
64
|
clsActive: 'uk-active',
|
|
63
65
|
clsInactive: '',
|
|
@@ -79,8 +81,8 @@ export default {
|
|
|
79
81
|
},
|
|
80
82
|
|
|
81
83
|
connected() {
|
|
82
|
-
this.start = this.start || this.top;
|
|
83
|
-
this.end = this.end || this.bottom;
|
|
84
|
+
this.start = coerce(this.start || this.top);
|
|
85
|
+
this.end = coerce(this.end || this.bottom);
|
|
84
86
|
|
|
85
87
|
this.placeholder =
|
|
86
88
|
$('+ .uk-sticky-placeholder', this.$el) ||
|
|
@@ -100,6 +102,17 @@ export default {
|
|
|
100
102
|
},
|
|
101
103
|
|
|
102
104
|
events: [
|
|
105
|
+
{
|
|
106
|
+
name: 'resize',
|
|
107
|
+
|
|
108
|
+
el() {
|
|
109
|
+
return window;
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
handler() {
|
|
113
|
+
this.$emit('resize');
|
|
114
|
+
},
|
|
115
|
+
},
|
|
103
116
|
{
|
|
104
117
|
name: 'load hashchange popstate',
|
|
105
118
|
|
|
@@ -125,8 +138,8 @@ export default {
|
|
|
125
138
|
window,
|
|
126
139
|
targetOffset.top -
|
|
127
140
|
elOffset.height -
|
|
128
|
-
toPx(this.targetOffset, 'height') -
|
|
129
|
-
toPx(this.offset, 'height')
|
|
141
|
+
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
142
|
+
toPx(this.offset, 'height', this.placeholder)
|
|
130
143
|
);
|
|
131
144
|
}
|
|
132
145
|
});
|
|
@@ -163,16 +176,18 @@ export default {
|
|
|
163
176
|
const windowHeight = getHeight(window);
|
|
164
177
|
|
|
165
178
|
let position = this.position;
|
|
166
|
-
if (
|
|
167
|
-
position = 'bottom';
|
|
179
|
+
if (this.overflowFlip && height > windowHeight) {
|
|
180
|
+
position = position === 'top' ? 'bottom' : 'top';
|
|
168
181
|
}
|
|
169
182
|
|
|
170
183
|
let offset = toPx(this.offset, 'height', referenceElement);
|
|
171
|
-
if (position === 'bottom') {
|
|
184
|
+
if (position === 'bottom' && (height < windowHeight || this.overflowFlip)) {
|
|
172
185
|
offset += windowHeight - height;
|
|
173
186
|
}
|
|
174
187
|
|
|
175
|
-
const overflow =
|
|
188
|
+
const overflow = this.overflowFlip
|
|
189
|
+
? 0
|
|
190
|
+
: Math.max(0, height + offset - windowHeight);
|
|
176
191
|
const topOffset = getOffset(referenceElement).top;
|
|
177
192
|
|
|
178
193
|
const start =
|
|
@@ -400,3 +415,12 @@ function parseProp(value, el, propOffset, padding) {
|
|
|
400
415
|
);
|
|
401
416
|
}
|
|
402
417
|
}
|
|
418
|
+
|
|
419
|
+
function coerce(value) {
|
|
420
|
+
if (value === 'true') {
|
|
421
|
+
return true;
|
|
422
|
+
} else if (value === 'false') {
|
|
423
|
+
return false;
|
|
424
|
+
}
|
|
425
|
+
return value;
|
|
426
|
+
}
|
|
@@ -24,10 +24,16 @@
|
|
|
24
24
|
========================================================================== */
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
* Create position context so it's t the same like when fixed.
|
|
27
|
+
* 1. Create position context so it's t the same like when fixed.
|
|
28
|
+
* 2. More robust if padding and border are used and the sticky height is transitioned
|
|
28
29
|
*/
|
|
29
30
|
|
|
30
|
-
.uk-sticky {
|
|
31
|
+
.uk-sticky {
|
|
32
|
+
/* 1 */
|
|
33
|
+
position: relative;
|
|
34
|
+
/* 2 */
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
}
|
|
31
37
|
|
|
32
38
|
/*
|
|
33
39
|
* 1. Force new layer to resolve frame rate issues on devices with lower frame rates
|
|
@@ -35,7 +41,6 @@
|
|
|
35
41
|
|
|
36
42
|
.uk-sticky-fixed {
|
|
37
43
|
z-index: @sticky-z-index;
|
|
38
|
-
box-sizing: border-box;
|
|
39
44
|
margin: 0 !important;
|
|
40
45
|
/* 1 */
|
|
41
46
|
-webkit-backface-visibility: hidden;
|
|
@@ -24,10 +24,16 @@ $sticky-reverse-animation-duration: 0.2s !default;
|
|
|
24
24
|
========================================================================== */
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
* Create position context so it's t the same like when fixed.
|
|
27
|
+
* 1. Create position context so it's t the same like when fixed.
|
|
28
|
+
* 2. More robust if padding and border are used and the sticky height is transitioned
|
|
28
29
|
*/
|
|
29
30
|
|
|
30
|
-
.uk-sticky {
|
|
31
|
+
.uk-sticky {
|
|
32
|
+
/* 1 */
|
|
33
|
+
position: relative;
|
|
34
|
+
/* 2 */
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
}
|
|
31
37
|
|
|
32
38
|
/*
|
|
33
39
|
* 1. Force new layer to resolve frame rate issues on devices with lower frame rates
|
|
@@ -35,7 +41,6 @@ $sticky-reverse-animation-duration: 0.2s !default;
|
|
|
35
41
|
|
|
36
42
|
.uk-sticky-fixed {
|
|
37
43
|
z-index: $sticky-z-index;
|
|
38
|
-
box-sizing: border-box;
|
|
39
44
|
margin: 0 !important;
|
|
40
45
|
/* 1 */
|
|
41
46
|
-webkit-backface-visibility: hidden;
|
package/tests/parallax.html
CHANGED
|
@@ -168,15 +168,15 @@
|
|
|
168
168
|
</tr>
|
|
169
169
|
<tr>
|
|
170
170
|
<td><code>start</code></td>
|
|
171
|
-
<td>
|
|
171
|
+
<td>Length</td>
|
|
172
172
|
<td>0</td>
|
|
173
|
-
<td>Start offset. The value can be in vh
|
|
173
|
+
<td>Start offset. The value can be in vh, % and px. It supports basic mathematics operands + and -. The default value of `0` means that the target's top border and viewport's bottom border intersect.</td>
|
|
174
174
|
</tr>
|
|
175
175
|
<tr>
|
|
176
176
|
<td><code>end</code></td>
|
|
177
|
-
<td>
|
|
177
|
+
<td>Length</td>
|
|
178
178
|
<td>0</td>
|
|
179
|
-
<td>End offset. The value can be in vh
|
|
179
|
+
<td>End offset. The value can be in vh, % and px. It supports basic mathematics operands + and -. The default value of `0` means that the target's bottom border and the viewport's top border intersect.</td>
|
|
180
180
|
</tr>
|
|
181
181
|
<tr>
|
|
182
182
|
<td><code>media</code></td>
|
package/tests/sticky-navbar.html
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
19
|
<div class="tm-header">
|
|
20
|
-
<div uk-sticky="sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky
|
|
20
|
+
<div uk-sticky="end: #sticky-dropdown; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky">
|
|
21
21
|
<nav class="uk-navbar-container">
|
|
22
22
|
<div class="uk-container">
|
|
23
23
|
<div uk-navbar>
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
</div>
|
|
97
97
|
|
|
98
98
|
<div class="tm-header">
|
|
99
|
-
<div uk-sticky="sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky
|
|
99
|
+
<div uk-sticky="end: #sticky-dropbar; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky">
|
|
100
100
|
<nav class="uk-navbar-container">
|
|
101
101
|
<div class="uk-container">
|
|
102
102
|
<div uk-navbar="dropbar: true; dropbar-anchor: !.uk-navbar-container">
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
</div>
|
|
176
176
|
|
|
177
177
|
<div class="tm-header">
|
|
178
|
-
<div uk-sticky="show-on-up: true; animation: uk-animation-slide-top; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky
|
|
178
|
+
<div uk-sticky="end: #scrollup-dropdown; show-on-up: true; animation: uk-animation-slide-top; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky">
|
|
179
179
|
<nav class="uk-navbar-container">
|
|
180
180
|
<div class="uk-container uk-container-expand">
|
|
181
181
|
<div uk-navbar>
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
</div>
|
|
255
255
|
|
|
256
256
|
<div class="tm-header">
|
|
257
|
-
<div uk-sticky="show-on-up: true; animation: uk-animation-slide-top; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky
|
|
257
|
+
<div uk-sticky="end: #scrollup-dropbar; show-on-up: true; animation: uk-animation-slide-top; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky">
|
|
258
258
|
<nav class="uk-navbar-container">
|
|
259
259
|
<div class="uk-container uk-container-expand">
|
|
260
260
|
<div uk-navbar="dropbar: true; dropbar-anchor: !.uk-navbar-container">
|
|
@@ -335,7 +335,7 @@
|
|
|
335
335
|
<div id="transparent-dropdown" class="uk-section-primary uk-preserve-color">
|
|
336
336
|
|
|
337
337
|
<div class="tm-header">
|
|
338
|
-
<div uk-sticky="show-on-up: true; animation: uk-animation-slide-top; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky; cls-inactive: uk-navbar-transparent uk-light
|
|
338
|
+
<div uk-sticky="start: 200; end: #transparent-dropdown; show-on-up: true; animation: uk-animation-slide-top; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky; cls-inactive: uk-navbar-transparent uk-light">
|
|
339
339
|
<nav class="uk-navbar-container">
|
|
340
340
|
<div class="uk-container uk-container-expand">
|
|
341
341
|
<div uk-navbar>
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
<div id="transparent-dropbar" class="uk-section-secondary uk-preserve-color">
|
|
419
419
|
|
|
420
420
|
<div class="tm-header">
|
|
421
|
-
<div uk-sticky="show-on-up: true; animation: uk-animation-slide-top; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky; cls-inactive: uk-navbar-transparent uk-light
|
|
421
|
+
<div uk-sticky="start: 200; end: #transparent-dropbar; show-on-up: true; animation: uk-animation-slide-top; sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky; cls-inactive: uk-navbar-transparent uk-light">
|
|
422
422
|
<nav class="uk-navbar-container">
|
|
423
423
|
<div class="uk-container uk-container-expand">
|
|
424
424
|
<div uk-navbar="dropbar: true; dropbar-anchor: !.uk-navbar-container">
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<body style="padding-bottom: 100vh;">
|
|
12
12
|
|
|
13
|
-
<div class="uk-section uk-section-primary uk-position-z-index-negative uk-flex uk-flex-center uk-flex-middle uk-text-center" uk-sticky="position: auto;
|
|
13
|
+
<div class="uk-section uk-section-primary uk-position-z-index-negative uk-flex uk-flex-center uk-flex-middle uk-text-center" uk-sticky="position: auto; end: 100%" uk-height-viewport>
|
|
14
14
|
<div class="uk-container">
|
|
15
15
|
|
|
16
16
|
<h1 class="uk-heading-2xlarge" uk-parallax="target: !.uk-section +* +*; end: 100%; y: -400; easing: 0;">Sticky Section</h1>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<div class="uk-container">
|
|
23
23
|
|
|
24
24
|
<div id="js-sticky-parallax-container" class="uk-position-relative uk-background-muted uk-text-center uk-height-viewport-3">
|
|
25
|
-
<div class="uk-flex uk-flex-center uk-flex-middle uk-height-viewport" uk-sticky="
|
|
25
|
+
<div class="uk-flex uk-flex-center uk-flex-middle uk-height-viewport" uk-sticky="end: #js-sticky-parallax-container">
|
|
26
26
|
<div>
|
|
27
27
|
|
|
28
28
|
<img class="uk-position-relative uk-position-z-index" src="images/size-v.jpg" width="400" height="800" alt="" style="max-width: 50vw" uk-parallax="target: #js-sticky-parallax-container; y: 0,-250; easing: -1; start: 100vh; end: 100vh;">
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
<div class="uk-section uk-section-default uk-text-center uk-position-relative uk-position-z-index">
|
|
71
71
|
|
|
72
|
-
<div class="uk-cover-container uk-position-z-index-negative" uk-sticky="
|
|
72
|
+
<div class="uk-cover-container uk-position-z-index-negative" uk-sticky="end: true" uk-height-viewport>
|
|
73
73
|
<img src="images/photo.jpg" width="1800" height="1200" alt="" uk-cover>
|
|
74
74
|
</div>
|
|
75
75
|
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
</div>
|
|
119
119
|
<div>
|
|
120
120
|
|
|
121
|
-
<div class="uk-background-muted uk-text-center uk-height-viewport" uk-sticky="
|
|
121
|
+
<div class="uk-background-muted uk-text-center uk-height-viewport" uk-sticky="end: #js-sticky-parallax-viewport">
|
|
122
122
|
|
|
123
123
|
<div uk-parallax="target: #js-sticky-parallax-viewport; start: 100vh; end: 100vh; y: 10vh, 80vh; easing: 0">
|
|
124
124
|
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
<div id="js-sticky-parallax-images" style="min-height: 250vh" uk-grid>
|
|
150
150
|
<div class="uk-width-expand">
|
|
151
151
|
|
|
152
|
-
<div class="uk-background-muted uk-height-viewport" uk-sticky="
|
|
152
|
+
<div class="uk-background-muted uk-height-viewport" uk-sticky="end: #js-sticky-parallax-images">
|
|
153
153
|
<div uk-parallax="target: #js-sticky-parallax-images; y: 55vh, 45vh;">
|
|
154
154
|
<img class="uk-position-center-left" src="images/photo.jpg" width="1800" height="1200" alt="" uk-parallax="target: #js-sticky-parallax-images; start: 125vh; end: 100% + 100vh - 185vh; opacity: 1,1,0; easing:0">
|
|
155
155
|
<img class="uk-position-center-left" src="images/photo2.jpg" width="1800" height="1200" alt="" uk-parallax="target: #js-sticky-parallax-images; start: 175vh; end: 100% + 100vh - 235vh; opacity: 0,1 16.666%,1 99%,0; easing:0">
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
<div id="js-sticky-parallax-images-all" style="min-height: 250vh" uk-grid>
|
|
210
210
|
<div class="uk-width-expand">
|
|
211
211
|
|
|
212
|
-
<div class="uk-background-muted uk-height-viewport" uk-sticky="
|
|
212
|
+
<div class="uk-background-muted uk-height-viewport" uk-sticky="end: #js-sticky-parallax-images-all">
|
|
213
213
|
<div uk-parallax="target: #js-sticky-parallax-images-all; y: 55vh, 45vh;">
|
|
214
214
|
<img class="uk-position-center-left" src="images/photo.jpg" width="1800" height="1200" alt="" uk-parallax="target: #js-sticky-parallax-images-all; start: 100vh; end: 100% + 100vh - 160vh; opacity: 1,1 99%,0; easing:0">
|
|
215
215
|
<img class="uk-position-center-left" src="images/photo2.jpg" width="1800" height="1200" alt="" uk-parallax="target: #js-sticky-parallax-images-all; start: 150vh; end: 100% + 100vh - 210vh; opacity: 0,1 16.666%,1 99%,0; easing:0">
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
</div>
|
|
227
227
|
<div class="uk-width-expand">
|
|
228
228
|
|
|
229
|
-
<div class="uk-height-viewport" uk-sticky="
|
|
229
|
+
<div class="uk-height-viewport" uk-sticky="end: #js-sticky-parallax-images-all">
|
|
230
230
|
<div uk-parallax="target: #js-sticky-parallax-images-all; y: 55vh, 45vh;">
|
|
231
231
|
|
|
232
232
|
<div class="uk-position-center-left" uk-parallax="target: #js-sticky-parallax-images-all; start: 100vh; end: 100% + 100vh - 150vh; opacity: 0,1 20%,1 80%,0">
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
</div>
|
|
267
267
|
</div>
|
|
268
268
|
|
|
269
|
-
<div class="uk-section uk-section-primary uk-section-xlarge uk-flex uk-flex-center uk-flex-middle uk-text-center uk-position-z-index-negative" uk-sticky="position: bottom;
|
|
269
|
+
<div class="uk-section uk-section-primary uk-section-xlarge uk-flex uk-flex-center uk-flex-middle uk-text-center uk-position-z-index-negative" uk-sticky="position: bottom; start: -100%; end: 0">
|
|
270
270
|
<div class="uk-container">
|
|
271
271
|
|
|
272
272
|
<h1 class="uk-heading-2xlarge">Sticky Section</h1>
|