uikit 3.9.5-dev.630197adb → 3.9.5-dev.68c425657

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 (46) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/css/uikit-core-rtl.css +7 -1
  3. package/dist/css/uikit-core-rtl.min.css +1 -1
  4. package/dist/css/uikit-core.css +7 -1
  5. package/dist/css/uikit-core.min.css +1 -1
  6. package/dist/css/uikit-rtl.css +7 -1
  7. package/dist/css/uikit-rtl.min.css +1 -1
  8. package/dist/css/uikit.css +7 -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 +28 -25
  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 +28 -25
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/core/img.js +15 -13
  44. package/src/js/core/sticky.js +6 -1
  45. package/src/less/components/utility.less +6 -0
  46. package/src/scss/components/utility.scss +6 -0
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.9.5-dev.630197adb",
5
+ "version": "3.9.5-dev.68c425657",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -2,7 +2,10 @@ import {attr, children, createEvent, css, data, Dimensions, escape, getImage, in
2
2
 
3
3
  export default {
4
4
 
5
+ args: 'dataSrc',
6
+
5
7
  props: {
8
+ dataSrc: String,
6
9
  width: Number,
7
10
  height: Number,
8
11
  offsetTop: String,
@@ -11,6 +14,7 @@ export default {
11
14
  },
12
15
 
13
16
  data: {
17
+ dataSrc: '',
14
18
  width: false,
15
19
  height: false,
16
20
  offsetTop: '50vh',
@@ -20,16 +24,8 @@ export default {
20
24
 
21
25
  computed: {
22
26
 
23
- cacheKey() {
24
- return `${this.$name}.${data(this.$el, 'data-src')}`;
25
- },
26
-
27
- width({width, dataWidth}) {
28
- return width || dataWidth;
29
- },
30
-
31
- height({height, dataHeight}) {
32
- return height || dataHeight;
27
+ cacheKey({dataSrc}) {
28
+ return `${this.$name}.${dataSrc}`;
33
29
  },
34
30
 
35
31
  target: {
@@ -127,7 +123,7 @@ export default {
127
123
  return;
128
124
  }
129
125
 
130
- this._data.image = getImageFromElement(this.$el).then(img => {
126
+ this._data.image = getImageFromElement(this.$el, this.dataSrc).then(img => {
131
127
 
132
128
  setSrcAttrs(this.$el, currentSrc(img));
133
129
  storage[this.cacheKey] = currentSrc(img);
@@ -161,6 +157,7 @@ function setSrcAttrs(el, src) {
161
157
  }
162
158
  })
163
159
  );
160
+ attr(el, 'src', src);
164
161
  } else if (src) {
165
162
 
166
163
  const change = !includes(el.style.backgroundImage, src);
@@ -201,10 +198,15 @@ function sizesToPixel(sizes) {
201
198
  return matches || '100vw';
202
199
  }
203
200
 
204
- function getImageFromElement(el) {
201
+ function getImageFromElement(el, src) {
205
202
  const parentNode = parent(el);
203
+
204
+ if (!src) {
205
+ return Promise.reject(createEvent('error', false));
206
+ }
207
+
206
208
  if (!isPicture(parentNode)) {
207
- return getImage(...srcProps.map(prop => data(el, prop)));
209
+ return getImage(src, ...srcProps.slice(1).map(prop => data(el, prop)));
208
210
  }
209
211
 
210
212
  return new Promise((resolve, reject) => {
@@ -1,6 +1,6 @@
1
1
  import Class from '../mixin/class';
2
2
  import Media from '../mixin/media';
3
- import {$, addClass, after, Animation, assign, css, dimensions, fastdom, hasClass, isNumeric, isString, isVisible, noop, offset, offsetPosition, parent, query, remove, removeClass, replaceClass, scrollTop, toFloat, toggleClass, toPx, trigger, within} from 'uikit-util';
3
+ import {$, addClass, after, Animation, assign, css, dimensions, fastdom, height as getHeight, hasClass, isNumeric, isString, isVisible, noop, offset, offsetPosition, parent, query, remove, removeClass, replaceClass, scrollTop, toFloat, toggleClass, toPx, trigger, within} from 'uikit-util';
4
4
 
5
5
  export default {
6
6
 
@@ -146,6 +146,11 @@ export default {
146
146
 
147
147
  height = !this.isActive ? this.$el.offsetHeight : height;
148
148
 
149
+ if (height + this.offset > getHeight(window)) {
150
+ this.inactive = true;
151
+ return false;
152
+ }
153
+
149
154
  const referenceElement = this.isFixed ? this.placeholder : this.$el;
150
155
  this.topOffset = offset(referenceElement).top;
151
156
  this.bottomOffset = this.topOffset + height;
@@ -242,6 +242,12 @@
242
242
  max-width: none;
243
243
  }
244
244
 
245
+ /*
246
+ * Fix initial iframe width. Without the viewport is expanded on iOS devices
247
+ */
248
+
249
+ [uk-responsive] { max-width: 100%; }
250
+
245
251
 
246
252
  /* Border
247
253
  ========================================================================== */
@@ -242,6 +242,12 @@ $dragover-box-shadow: 0 0 20px rgba(100,100,100,0.3)
242
242
  max-width: none;
243
243
  }
244
244
 
245
+ /*
246
+ * Fix initial iframe width. Without the viewport is expanded on iOS devices
247
+ */
248
+
249
+ [uk-responsive] { max-width: 100%; }
250
+
245
251
 
246
252
  /* Border
247
253
  ========================================================================== */