uikit 3.16.4-dev.8705d5334 → 3.16.4-dev.e94c10076

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 (44) hide show
  1. package/CHANGELOG.md +1 -1
  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 +30 -40
  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 +30 -40
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/cover.js +12 -24
  44. package/src/js/core/height-match.js +7 -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.16.4-dev.8705d5334",
5
+ "version": "3.16.4-dev.e94c10076",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -1,8 +1,9 @@
1
1
  import Video from './video';
2
- import { css, Dimensions, observeResize, parent } from 'uikit-util';
2
+ import { css, Dimensions, parent } from 'uikit-util';
3
+ import Resize from '../mixin/resize';
3
4
 
4
5
  export default {
5
- mixins: [Video],
6
+ mixins: [Resize, Video],
6
7
 
7
8
  props: {
8
9
  width: Number,
@@ -19,20 +20,14 @@ export default {
19
20
  },
20
21
  },
21
22
 
22
- connected() {
23
- const parentEl = getPositionedParent(this.$el) || parent(this.$el);
24
- this.registerObserver(
25
- observeResize(parentEl, () => {
26
- this.parentDim = getCoverDimensions(parentEl);
27
- this.$emit('resize');
28
- })
29
- );
23
+ resizeTargets() {
24
+ return [this.$el, getPositionedParent(this.$el) || parent(this.$el)];
30
25
  },
31
26
 
32
27
  update: {
33
28
  read() {
34
29
  const { ratio, cover } = Dimensions;
35
- const { $el, width, height, parentDim } = this;
30
+ const { $el, width, height } = this;
36
31
 
37
32
  let dim = { width, height };
38
33
 
@@ -51,11 +46,12 @@ export default {
51
46
  }
52
47
  }
53
48
 
54
- if (!parentDim) {
55
- return false;
56
- }
57
-
58
- const coverDim = cover(dim, parentDim);
49
+ const { offsetHeight: coverHeight, offsetWidth: coverWidth } =
50
+ getPositionedParent($el) || parent($el);
51
+ const coverDim = cover(dim, {
52
+ width: coverWidth + (coverWidth % 2 ? 1 : 0),
53
+ height: coverHeight + (coverHeight % 2 ? 1 : 0),
54
+ });
59
55
 
60
56
  if (!coverDim.width || !coverDim.height) {
61
57
  return false;
@@ -72,14 +68,6 @@ export default {
72
68
  },
73
69
  };
74
70
 
75
- function getCoverDimensions(el) {
76
- const { offsetHeight, offsetWidth } = el;
77
- return {
78
- width: offsetWidth + (offsetWidth % 2 ? 1 : 0),
79
- height: offsetHeight + (offsetHeight % 2 ? 1 : 0),
80
- };
81
- }
82
-
83
71
  function getPositionedParent(el) {
84
72
  while ((el = parent(el))) {
85
73
  if (css(el, 'position') !== 'static') {
@@ -55,7 +55,6 @@ function match(elements) {
55
55
  return { heights: [''], elements };
56
56
  }
57
57
 
58
- css(elements, 'minHeight', '');
59
58
  let heights = elements.map(getHeight);
60
59
  const max = Math.max(...heights);
61
60
 
@@ -66,16 +65,19 @@ function match(elements) {
66
65
  }
67
66
 
68
67
  function getHeight(element) {
69
- let style = false;
68
+ let display = false;
69
+ const minHeight = element.style.minHeight;
70
70
  if (!isVisible(element)) {
71
- style = element.style.display;
71
+ display = element.style.display;
72
72
  css(element, 'display', 'block', 'important');
73
73
  }
74
74
 
75
+ css(element, 'minHeight', '');
75
76
  const height = dimensions(element).height - boxModelAdjust(element, 'height', 'content-box');
77
+ css(element, 'minHeight', minHeight);
76
78
 
77
- if (style !== false) {
78
- css(element, 'display', style);
79
+ if (display !== false) {
80
+ css(element, 'display', display);
79
81
  }
80
82
 
81
83
  return height;