uikit 3.18.1-dev.edde0251f → 3.18.2-dev.ce74de00c

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 +13 -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 +29 -15
  15. package/dist/js/components/lightbox-panel.min.js +1 -1
  16. package/dist/js/components/lightbox.js +29 -15
  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 +2 -2
  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 +46 -31
  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 +47 -32
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/components/sortable.js +1 -2
  44. package/src/js/core/dropnav.js +7 -11
  45. package/src/js/core/height-match.js +1 -1
  46. package/src/js/core/navbar.js +10 -10
  47. package/src/js/core/video.js +5 -1
  48. package/src/js/util/scroll.js +36 -17
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.18.1-dev.edde0251f",
5
+ "version": "3.18.2-dev.ce74de00c",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -11,7 +11,6 @@ import {
11
11
  dimensions,
12
12
  findIndex,
13
13
  getEventPos,
14
- hasTouch,
15
14
  height,
16
15
  index,
17
16
  isInput,
@@ -105,7 +104,7 @@ export default {
105
104
 
106
105
  handles(handles, prev) {
107
106
  css(prev, { touchAction: '', userSelect: '' });
108
- css(handles, { touchAction: hasTouch ? 'none' : '', userSelect: 'none' }); // touchAction set to 'none' causes a performance drop in Chrome 80
107
+ css(handles, { touchAction: 'none', userSelect: 'none' });
109
108
  },
110
109
  },
111
110
 
@@ -19,7 +19,6 @@ import {
19
19
  remove,
20
20
  selFocusable,
21
21
  toFloat,
22
- toPx,
23
22
  Transition,
24
23
  } from 'uikit-util';
25
24
  import Class from '../mixin/class';
@@ -76,15 +75,6 @@ export default {
76
75
  return dropbar ? dropbar : (this._dropbar = $('<div></div>'));
77
76
  },
78
77
 
79
- dropbarOffset({ target, targetY }, $el) {
80
- const { offsetTop, offsetHeight } = query(targetY || target || $el, $el);
81
- return offsetTop + offsetHeight + this.dropbarPositionOffset;
82
- },
83
-
84
- dropbarPositionOffset(_, $el) {
85
- return toPx(css($el, '--uk-position-offset'));
86
- },
87
-
88
78
  dropContainer(_, $el) {
89
79
  return this.container || $el;
90
80
  },
@@ -299,7 +289,7 @@ export default {
299
289
  .map((el) => offset(el).bottom),
300
290
  );
301
291
 
302
- css(this.dropbar, 'top', this.dropbarOffset);
292
+ css(this.dropbar, 'top', this.getDropbarOffset(drop.$el));
303
293
  this.transitionTo(
304
294
  maxBottom - offset(this.dropbar).top + toFloat(css(target, 'marginBottom')),
305
295
  target,
@@ -404,6 +394,12 @@ export default {
404
394
  return this.getDropdown(el) && hasClass(el, this.clsDrop);
405
395
  },
406
396
 
397
+ getDropbarOffset(el) {
398
+ const { $el, target, targetY } = this;
399
+ const { offsetTop, offsetHeight } = query(targetY || target || $el, $el);
400
+ return offsetTop + offsetHeight + this.getDropdown(el)?.getPositionOffset(el);
401
+ },
402
+
407
403
  initializeDropdowns() {
408
404
  this.$create(
409
405
  'drop',
@@ -66,7 +66,7 @@ function getHeight(element) {
66
66
  css(element, 'display', 'block', 'important');
67
67
  }
68
68
  css(element, 'minHeight', '');
69
- const height = element.offsetHeight;
69
+ const height = element.offsetHeight ?? element.clientHeight;
70
70
  css(element, style);
71
71
  return height;
72
72
  }
@@ -19,16 +19,6 @@ export default {
19
19
 
20
20
  computed: {
21
21
  navbarContainer: (_, $el) => $el.closest('.uk-navbar-container'),
22
-
23
- dropbarOffset({ dropbarTransparentMode }) {
24
- const { offsetTop, offsetHeight } = this.navbarContainer;
25
- return (
26
- offsetTop +
27
- (dropbarTransparentMode === 'behind'
28
- ? 0
29
- : offsetHeight + this.dropbarPositionOffset)
30
- );
31
- },
32
22
  },
33
23
 
34
24
  watch: {
@@ -97,6 +87,16 @@ export default {
97
87
  return drop.inset ? 'behind' : 'remove';
98
88
  }
99
89
  },
90
+
91
+ getDropbarOffset(el) {
92
+ const { offsetTop, offsetHeight } = this.navbarContainer;
93
+ return (
94
+ offsetTop +
95
+ (this.dropbarTransparentMode === 'behind'
96
+ ? 0
97
+ : offsetHeight + this.getDropdown(el)?.getPositionOffset(el))
98
+ );
99
+ },
100
100
  },
101
101
  };
102
102
 
@@ -32,7 +32,11 @@ export default {
32
32
  intersection({
33
33
  filter: ({ $el, autoplay }) => autoplay && isVideo($el),
34
34
  handler([{ isIntersecting }]) {
35
- if (isIntersecting) {
35
+ if (
36
+ isIntersecting ||
37
+ this.$el.webkitDisplayingFullscreen ||
38
+ document.fullscreenElement === this.$el
39
+ ) {
36
40
  play(this.$el);
37
41
  } else {
38
42
  pause(this.$el);
@@ -1,24 +1,43 @@
1
- import { css, matches, on, scrollParent, width } from 'uikit-util';
1
+ import { css, getEventPos, matches, on, once, scrollParents, width } from 'uikit-util';
2
2
 
3
3
  let prevented;
4
4
  export function preventBackgroundScroll(el) {
5
5
  // 'overscroll-behavior: contain' only works consistently if el overflows (Safari)
6
- const off = on(
7
- el,
8
- 'touchmove',
9
- (e) => {
10
- if (e.targetTouches.length !== 1 || matches(e.target, 'input[type="range"')) {
11
- return;
12
- }
13
-
14
- let { scrollHeight, clientHeight } = scrollParent(e.target);
15
-
16
- if (clientHeight >= scrollHeight && e.cancelable) {
17
- e.preventDefault();
18
- }
19
- },
20
- { passive: false },
21
- );
6
+ const off = on(el, 'touchstart', (e) => {
7
+ if (e.targetTouches.length !== 1 || matches(e.target, 'input[type="range"')) {
8
+ return;
9
+ }
10
+
11
+ let prev = getEventPos(e).y;
12
+
13
+ const offMove = on(
14
+ el,
15
+ 'touchmove',
16
+ (e) => {
17
+ const pos = getEventPos(e).y;
18
+ if (pos === prev) {
19
+ return;
20
+ }
21
+ prev = pos;
22
+
23
+ if (
24
+ !scrollParents(e.target).some((scrollParent) => {
25
+ if (!el.contains(scrollParent)) {
26
+ return false;
27
+ }
28
+
29
+ let { scrollHeight, clientHeight } = scrollParent;
30
+ return clientHeight < scrollHeight;
31
+ })
32
+ ) {
33
+ e.preventDefault();
34
+ }
35
+ },
36
+ { passive: false },
37
+ );
38
+
39
+ once(el, 'scroll touchend touchcanel', offMove, { capture: true });
40
+ });
22
41
 
23
42
  if (prevented) {
24
43
  return off;