uikit 3.15.18-dev.0512dbf39 → 3.15.18-dev.31d1eec73
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 +2 -0
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- 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 +27 -7
- 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 +27 -7
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/sticky.js +25 -5
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.18-dev.
|
|
5
|
+
"version": "3.15.18-dev.31d1eec73",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/sticky.js
CHANGED
|
@@ -98,7 +98,7 @@ export default {
|
|
|
98
98
|
this.hide();
|
|
99
99
|
removeClass(this.selTarget, this.clsInactive);
|
|
100
100
|
}
|
|
101
|
-
|
|
101
|
+
reset(this.$el);
|
|
102
102
|
|
|
103
103
|
remove(this.placeholder);
|
|
104
104
|
this.placeholder = null;
|
|
@@ -156,10 +156,10 @@ export default {
|
|
|
156
156
|
this.inactive = !this.matchMedia || !isVisible(this.$el);
|
|
157
157
|
|
|
158
158
|
if (this.inactive) {
|
|
159
|
-
return
|
|
159
|
+
return;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
const hide = this.isFixed && types.has('resize');
|
|
162
|
+
const hide = this.isFixed && types.has('resize') && !sticky;
|
|
163
163
|
if (hide) {
|
|
164
164
|
css(this.selTarget, 'transition', '0s');
|
|
165
165
|
this.hide();
|
|
@@ -210,6 +210,7 @@ export default {
|
|
|
210
210
|
);
|
|
211
211
|
|
|
212
212
|
sticky =
|
|
213
|
+
maxScrollHeight &&
|
|
213
214
|
!this.showOnUp &&
|
|
214
215
|
start + offset === topOffset &&
|
|
215
216
|
end ===
|
|
@@ -225,6 +226,7 @@ export default {
|
|
|
225
226
|
overflow,
|
|
226
227
|
topOffset,
|
|
227
228
|
height,
|
|
229
|
+
elHeight,
|
|
228
230
|
width,
|
|
229
231
|
margin,
|
|
230
232
|
top: offsetPosition(referenceElement)[0],
|
|
@@ -233,10 +235,19 @@ export default {
|
|
|
233
235
|
},
|
|
234
236
|
|
|
235
237
|
write({ height, width, margin, offset, sticky }) {
|
|
238
|
+
if (this.inactive || sticky || !this.isFixed) {
|
|
239
|
+
reset(this.$el);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (this.inactive) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
|
|
236
246
|
if (sticky) {
|
|
237
247
|
height = width = margin = 0;
|
|
238
248
|
css(this.$el, { position: 'sticky', top: offset });
|
|
239
249
|
}
|
|
250
|
+
|
|
240
251
|
const { placeholder } = this;
|
|
241
252
|
|
|
242
253
|
css(placeholder, { height, width, margin });
|
|
@@ -349,7 +360,7 @@ export default {
|
|
|
349
360
|
}
|
|
350
361
|
},
|
|
351
362
|
|
|
352
|
-
events: ['resize', 'scroll'],
|
|
363
|
+
events: ['resize', 'resizeViewport', 'scroll'],
|
|
353
364
|
},
|
|
354
365
|
],
|
|
355
366
|
|
|
@@ -389,6 +400,7 @@ export default {
|
|
|
389
400
|
offset,
|
|
390
401
|
topOffset,
|
|
391
402
|
height,
|
|
403
|
+
elHeight,
|
|
392
404
|
offsetParentTop,
|
|
393
405
|
sticky,
|
|
394
406
|
} = this._data;
|
|
@@ -416,7 +428,11 @@ export default {
|
|
|
416
428
|
css(this.$el, 'top', offset);
|
|
417
429
|
|
|
418
430
|
this.setActive(active);
|
|
419
|
-
toggleClass(
|
|
431
|
+
toggleClass(
|
|
432
|
+
this.$el,
|
|
433
|
+
this.clsBelow,
|
|
434
|
+
scroll > topOffset + (sticky ? Math.min(height, elHeight) : height)
|
|
435
|
+
);
|
|
420
436
|
addClass(this.$el, this.clsFixed);
|
|
421
437
|
},
|
|
422
438
|
|
|
@@ -460,3 +476,7 @@ function coerce(value) {
|
|
|
460
476
|
}
|
|
461
477
|
return value;
|
|
462
478
|
}
|
|
479
|
+
|
|
480
|
+
function reset(el) {
|
|
481
|
+
css(el, { position: '', top: '', marginTop: '', width: '' });
|
|
482
|
+
}
|