uikit 3.15.18-dev.9b1dbaa5d → 3.15.18-dev.9cbbb510d

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 (43) hide show
  1. package/CHANGELOG.md +2 -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 +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 +23 -8
  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 +23 -8
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/sticky.js +21 -6
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.9b1dbaa5d",
5
+ "version": "3.15.18-dev.9cbbb510d",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -98,7 +98,7 @@ export default {
98
98
  this.hide();
99
99
  removeClass(this.selTarget, this.clsInactive);
100
100
  }
101
- css(this.$el, { position: '', top: '' });
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 false;
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();
@@ -226,6 +226,7 @@ export default {
226
226
  overflow,
227
227
  topOffset,
228
228
  height,
229
+ elHeight,
229
230
  width,
230
231
  margin,
231
232
  top: offsetPosition(referenceElement)[0],
@@ -234,11 +235,16 @@ export default {
234
235
  },
235
236
 
236
237
  write({ height, width, margin, offset, sticky }) {
238
+ if (this.inactive) {
239
+ reset(this.$el);
240
+ return;
241
+ }
242
+
237
243
  if (sticky) {
238
244
  height = width = margin = 0;
239
245
  css(this.$el, { position: 'sticky', top: offset });
240
246
  } else if (!this.isFixed) {
241
- css(this.$el, { position: '', top: '' });
247
+ reset(this.$el);
242
248
  }
243
249
  const { placeholder } = this;
244
250
 
@@ -352,7 +358,7 @@ export default {
352
358
  }
353
359
  },
354
360
 
355
- events: ['resize', 'scroll'],
361
+ events: ['resize', 'resizeViewport', 'scroll'],
356
362
  },
357
363
  ],
358
364
 
@@ -392,6 +398,7 @@ export default {
392
398
  offset,
393
399
  topOffset,
394
400
  height,
401
+ elHeight,
395
402
  offsetParentTop,
396
403
  sticky,
397
404
  } = this._data;
@@ -419,7 +426,11 @@ export default {
419
426
  css(this.$el, 'top', offset);
420
427
 
421
428
  this.setActive(active);
422
- toggleClass(this.$el, this.clsBelow, scroll > topOffset + height);
429
+ toggleClass(
430
+ this.$el,
431
+ this.clsBelow,
432
+ scroll > topOffset + (sticky ? Math.min(height, elHeight) : height)
433
+ );
423
434
  addClass(this.$el, this.clsFixed);
424
435
  },
425
436
 
@@ -463,3 +474,7 @@ function coerce(value) {
463
474
  }
464
475
  return value;
465
476
  }
477
+
478
+ function reset(el) {
479
+ css(el, { position: '', top: '', marginTop: '', width: '' });
480
+ }