uikit 3.11.2-dev.19d26d0f9 → 3.11.2-dev.54d67da03

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 (53) hide show
  1. package/CHANGELOG.md +20 -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 +146 -138
  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 +146 -138
  41. package/dist/js/uikit.min.js +1 -1
  42. package/package.json +1 -1
  43. package/src/js/api/state.js +4 -4
  44. package/src/js/core/drop.js +1 -1
  45. package/src/js/core/img.js +101 -97
  46. package/src/js/core/navbar.js +6 -2
  47. package/src/js/core/sticky.js +29 -10
  48. package/src/js/util/options.js +4 -4
  49. package/tests/image.html +28 -38
  50. package/tests/images/test.avif +0 -0
  51. package/tests/images/test.webp +0 -0
  52. package/tests/sticky-parallax.html +44 -41
  53. package/tests/sticky.html +20 -3
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.11.2-dev.19d26d0f9",
5
+ "version": "3.11.2-dev.54d67da03",
6
6
  "main": "dist/js/uikit.js",
7
7
  "style": "dist/css/uikit.css",
8
8
  "sideEffects": [
@@ -211,11 +211,11 @@ export default function (UIkit) {
211
211
  on(
212
212
  el,
213
213
  name,
214
- !delegate
215
- ? null
216
- : isString(delegate)
214
+ delegate
215
+ ? isString(delegate)
217
216
  ? delegate
218
- : delegate.call(component),
217
+ : delegate.call(component)
218
+ : null,
219
219
  isString(handler) ? component[handler] : handler.bind(component),
220
220
  {passive, capture, self}
221
221
  )
@@ -308,7 +308,7 @@ export default {
308
308
  if (active) {
309
309
 
310
310
  if (delay && active.isDelaying) {
311
- this.showTimer = setTimeout(this.show, 10);
311
+ this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
312
312
  return;
313
313
  }
314
314
 
@@ -1,4 +1,4 @@
1
- import {createEvent, css, Dimensions, escape, getImage, includes, isUndefined, queryAll, startsWith, toFloat, toPx, trigger} from 'uikit-util';
1
+ import {append, attr, children, createEvent, css, data, escape, fragment, hasAttr, includes, isArray, isEmpty, isUndefined, parent, parseOptions, queryAll, startsWith, toFloat, toPx, trigger} from 'uikit-util';
2
2
 
3
3
  export default {
4
4
 
@@ -6,10 +6,7 @@ export default {
6
6
 
7
7
  props: {
8
8
  dataSrc: String,
9
- dataSrcset: Boolean,
10
- sizes: String,
11
- width: Number,
12
- height: Number,
9
+ dataSources: String,
13
10
  offsetTop: String,
14
11
  offsetLeft: String,
15
12
  target: String
@@ -17,10 +14,7 @@ export default {
17
14
 
18
15
  data: {
19
16
  dataSrc: '',
20
- dataSrcset: false,
21
- sizes: false,
22
- width: false,
23
- height: false,
17
+ dataSources: [],
24
18
  offsetTop: '50vh',
25
19
  offsetLeft: '50vw',
26
20
  target: false
@@ -28,26 +22,6 @@ export default {
28
22
 
29
23
  computed: {
30
24
 
31
- cacheKey({dataSrc}) {
32
- return `${this.$name}.${dataSrc}`;
33
- },
34
-
35
- width({width, dataWidth}) {
36
- return width || dataWidth;
37
- },
38
-
39
- height({height, dataHeight}) {
40
- return height || dataHeight;
41
- },
42
-
43
- sizes({sizes, dataSizes}) {
44
- return sizes || dataSizes;
45
- },
46
-
47
- isImg(_, $el) {
48
- return isImg($el);
49
- },
50
-
51
25
  target: {
52
26
 
53
27
  get({target}) {
@@ -58,14 +32,6 @@ export default {
58
32
  this.observe();
59
33
  }
60
34
 
61
- },
62
-
63
- offsetTop({offsetTop}) {
64
- return toPx(offsetTop, 'height');
65
- },
66
-
67
- offsetLeft({offsetLeft}) {
68
- return toPx(offsetLeft, 'width');
69
35
  }
70
36
 
71
37
  },
@@ -73,21 +39,15 @@ export default {
73
39
  connected() {
74
40
 
75
41
  if (!window.IntersectionObserver) {
76
- setSrcAttrs(this.$el, this.dataSrc, this.dataSrcset, this.sizes);
42
+ setSrcAttrs(this.$el, this.dataSrc);
77
43
  return;
78
44
  }
79
45
 
80
- if (storage[this.cacheKey]) {
81
- setSrcAttrs(this.$el, storage[this.cacheKey], this.dataSrcset, this.sizes);
82
- } else if (this.isImg && this.width && this.height) {
83
- setSrcAttrs(this.$el, getPlaceholderImage(this.width, this.height, this.sizes));
84
- }
85
-
86
- this.observer = new IntersectionObserver(this.load, {
87
- rootMargin: `${this.offsetTop}px ${this.offsetLeft}px`
88
- });
46
+ ensurePlaceholderImage(this.$el);
89
47
 
90
- requestAnimationFrame(this.observe);
48
+ const rootMargin = `${toPx(this.offsetTop, 'height')}px ${toPx(this.offsetLeft, 'width')}px`;
49
+ this.observer = new IntersectionObserver(this.load, {rootMargin});
50
+ this.observe();
91
51
 
92
52
  },
93
53
 
@@ -97,32 +57,17 @@ export default {
97
57
 
98
58
  update: {
99
59
 
100
- read({image}) {
101
-
102
- if (!this.observer) {
60
+ write(store) {
61
+ if (!this.observer || isImg(this.$el)) {
103
62
  return false;
104
63
  }
105
-
106
- if (!image && document.readyState === 'complete') {
107
- this.load(this.observer.takeRecords());
108
- }
109
-
110
- if (this.isImg) {
111
- return false;
112
- }
113
-
114
- image && image.then(img => img && img.currentSrc !== '' && setSrcAttrs(this.$el, currentSrc(img)));
115
-
116
- },
117
-
118
- write(data) {
119
-
120
- if (this.dataSrcset && window.devicePixelRatio !== 1) {
64
+ const srcset = data(this.$el, 'data-srcset');
65
+ if (srcset && window.devicePixelRatio !== 1) {
121
66
 
122
67
  const bgSize = css(this.$el, 'backgroundSize');
123
- if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === data.bgSize) {
124
- data.bgSize = getSourceSize(this.dataSrcset, this.sizes);
125
- css(this.$el, 'backgroundSize', `${data.bgSize}px`);
68
+ if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === store.bgSize) {
69
+ store.bgSize = getSourceSize(srcset, data(this.$el, 'sizes'));
70
+ css(this.$el, 'backgroundSize', `${store.bgSize}px`);
126
71
  }
127
72
 
128
73
  }
@@ -142,13 +87,20 @@ export default {
142
87
  return;
143
88
  }
144
89
 
145
- this._data.image = getImage(this.dataSrc, this.dataSrcset, this.sizes).then(img => {
90
+ if (this._data.image) {
91
+ return this._data.image;
92
+ }
146
93
 
147
- setSrcAttrs(this.$el, currentSrc(img), img.srcset, img.sizes);
148
- storage[this.cacheKey] = currentSrc(img);
149
- return img;
94
+ const image = isImg(this.$el)
95
+ ? this.$el
96
+ : getImageFromElement(
97
+ this.$el,
98
+ this.dataSrc,
99
+ this.dataSources
100
+ );
150
101
 
151
- }, e => trigger(this.$el, new e.constructor(e.type, e)));
102
+ this._data.image = image;
103
+ setSrcAttrs(this.$el, image.currentSrc);
152
104
 
153
105
  this.observer.disconnect();
154
106
  },
@@ -163,13 +115,14 @@ export default {
163
115
 
164
116
  };
165
117
 
166
- function setSrcAttrs(el, src, srcset, sizes) {
118
+ function setSrcAttrs(el, src) {
167
119
 
168
120
  if (isImg(el)) {
169
- const set = (prop, val) => val && val !== el[prop] && (el[prop] = val);
170
- set('sizes', sizes);
171
- set('srcset', srcset);
172
- set('src', src);
121
+
122
+ const parentNode = parent(el);
123
+ const elements = isPicture(parentNode) ? children(parentNode) : [el];
124
+ elements.forEach(el => setSourceProps(el, el));
125
+
173
126
  } else if (src) {
174
127
 
175
128
  const change = !includes(el.style.backgroundImage, src);
@@ -182,13 +135,66 @@ function setSrcAttrs(el, src, srcset, sizes) {
182
135
 
183
136
  }
184
137
 
185
- function getPlaceholderImage(width, height, sizes) {
138
+ const srcProps = ['data-src', 'data-srcset', 'sizes'];
139
+ function setSourceProps(sourceEl, targetEl) {
140
+ srcProps.forEach(prop => {
141
+ const value = data(sourceEl, prop);
142
+ if (value) {
143
+ attr(targetEl, prop.replace(/^(data-)+/, ''), value);
144
+ }
145
+ });
146
+ }
147
+
148
+ function getImageFromElement(el, src, sources) {
186
149
 
187
- if (sizes) {
188
- ({width, height} = Dimensions.ratio({width, height}, 'width', toPx(sizesToPixel(sizes))));
150
+ if (!src) {
151
+ return false;
189
152
  }
190
153
 
191
- return `data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}"></svg>`;
154
+ const img = new Image();
155
+
156
+ wrapInPicture(img, sources);
157
+ setSourceProps(el, img);
158
+ img.onload = () => setSrcAttrs(el, img.currentSrc);
159
+ attr(img, 'src', src);
160
+ return img;
161
+ }
162
+
163
+ function wrapInPicture(img, sources) {
164
+
165
+ sources = parseSources(sources);
166
+
167
+ if (sources.length) {
168
+ const picture = fragment('<picture>');
169
+ sources.forEach(attrs => {
170
+ const source = fragment('<source>');
171
+ attr(source, attrs);
172
+ append(picture, source);
173
+ });
174
+ append(picture, img);
175
+ }
176
+ }
177
+
178
+ function parseSources(sources) {
179
+ if (!sources) {
180
+ return [];
181
+ }
182
+
183
+ if (startsWith(sources, '[')) {
184
+ try {
185
+ sources = JSON.parse(sources);
186
+ } catch (e) {
187
+ sources = [];
188
+ }
189
+ } else {
190
+ sources = parseOptions(sources);
191
+ }
192
+
193
+ if (!isArray(sources)) {
194
+ sources = [sources];
195
+ }
196
+
197
+ return sources.filter(source => !isEmpty(source));
192
198
  }
193
199
 
194
200
  const sizesRe = /\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g;
@@ -228,22 +234,20 @@ function getSourceSize(srcset, sizes) {
228
234
  return descriptors.filter(size => size >= srcSize)[0] || descriptors.pop() || '';
229
235
  }
230
236
 
231
- function isImg(el) {
232
- return el.tagName === 'IMG';
237
+ function ensurePlaceholderImage(el) {
238
+ if (isImg(el) && !hasAttr(el, 'src')) {
239
+ attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
240
+ }
233
241
  }
234
242
 
235
- function currentSrc(el) {
236
- return el.currentSrc || el.src;
243
+ function isPicture(el) {
244
+ return isA(el, 'PICTURE');
237
245
  }
238
246
 
239
- const key = '__test__';
240
- let storage;
247
+ function isImg(el) {
248
+ return isA(el, 'IMG');
249
+ }
241
250
 
242
- // workaround for Safari's private browsing mode and accessing sessionStorage in Blink
243
- try {
244
- storage = window.sessionStorage || {};
245
- storage[key] = 1;
246
- delete storage[key];
247
- } catch (e) {
248
- storage = {};
251
+ function isA(el, tagName) {
252
+ return el && el.tagName === tagName;
249
253
  }
@@ -137,7 +137,7 @@ export default {
137
137
 
138
138
  handler({current}) {
139
139
  const active = this.getActive();
140
- if (active && includes(active.mode, 'hover') && active.target && !within(active.target, current) && !active.tracker.movesTo(active.$el)) {
140
+ if (active && includes(active.mode, 'hover') && active.target && !within(active.target, current) && !active.isDelaying) {
141
141
  active.hide(false);
142
142
  }
143
143
  }
@@ -301,7 +301,11 @@ export default {
301
301
 
302
302
  const active = this.getActive();
303
303
 
304
- if (matches(this.dropbar, ':hover') && active && active.$el === $el) {
304
+ if (matches(this.dropbar, ':hover')
305
+ && active
306
+ && active.$el === $el
307
+ && !this.toggles.some(el => active.target !== el && matches(el, ':focus'))
308
+ ) {
305
309
  e.preventDefault();
306
310
  }
307
311
  }
@@ -1,12 +1,13 @@
1
1
  import Class from '../mixin/class';
2
2
  import Media from '../mixin/media';
3
- import {$, addClass, after, Animation, assign, clamp, css, dimensions, fastdom, height as getHeight, getScrollingElement, hasClass, isNumeric, isString, isVisible, noop, offset, offsetPosition, parent, query, remove, removeClass, replaceClass, scrollTop, toggleClass, toPx, trigger, within} from 'uikit-util';
3
+ import {$, addClass, after, Animation, clamp, css, dimensions, fastdom, height as getHeight, getScrollingElement, hasClass, isNumeric, isString, isVisible, noop, offset, offsetPosition, parent, query, remove, removeClass, replaceClass, scrollTop, toggleClass, toPx, trigger, within} from 'uikit-util';
4
4
 
5
5
  export default {
6
6
 
7
7
  mixins: [Class, Media],
8
8
 
9
9
  props: {
10
+ position: String,
10
11
  top: null,
11
12
  bottom: Boolean,
12
13
  offset: String,
@@ -22,6 +23,7 @@ export default {
22
23
  },
23
24
 
24
25
  data: {
26
+ position: 'top',
25
27
  top: 0,
26
28
  bottom: false,
27
29
  offset: 0,
@@ -38,7 +40,18 @@ export default {
38
40
 
39
41
  computed: {
40
42
 
43
+ position({position}, $el) {
44
+ return position === 'auto'
45
+ ? (this.isFixed ? this.placeholder : $el).offsetHeight > getHeight(window)
46
+ ? 'bottom'
47
+ : 'top'
48
+ : position;
49
+ },
50
+
41
51
  offset({offset}, $el) {
52
+ if (this.position === 'bottom') {
53
+ offset += '+100vh-100%';
54
+ }
42
55
  return toPx(offset, 'height', $el);
43
56
  },
44
57
 
@@ -130,7 +143,7 @@ export default {
130
143
 
131
144
  {
132
145
 
133
- read({height}, types) {
146
+ read({height, margin}, types) {
134
147
 
135
148
  this.inactive = !this.matchMedia || !isVisible(this.$el);
136
149
 
@@ -138,13 +151,19 @@ export default {
138
151
  return false;
139
152
  }
140
153
 
141
- if (this.isActive && types.has('resize')) {
154
+ const hide = this.isActive && types.has('resize');
155
+ if (hide) {
142
156
  this.hide();
157
+ }
158
+
159
+ if (!this.isActive) {
143
160
  height = this.$el.offsetHeight;
144
- this.show();
161
+ margin = css(this.$el, 'margin');
145
162
  }
146
163
 
147
- height = this.isActive ? height : this.$el.offsetHeight;
164
+ if (hide) {
165
+ this.show();
166
+ }
148
167
 
149
168
  const overflow = Math.max(0, height + this.offset - getHeight(window));
150
169
 
@@ -167,17 +186,17 @@ export default {
167
186
  topOffset,
168
187
  offsetParentTop,
169
188
  height,
189
+ margin,
170
190
  width: dimensions(isVisible(this.widthElement) ? this.widthElement : this.$el).width,
171
- top: offsetPosition(this.placeholder)[0],
172
- margins: css(this.$el, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])
191
+ top: offsetPosition(this.placeholder)[0]
173
192
  };
174
193
  },
175
194
 
176
- write({height, margins}) {
195
+ write({height, margin}) {
177
196
 
178
197
  const {placeholder} = this;
179
198
 
180
- css(placeholder, assign({height}, margins));
199
+ css(placeholder, {height, margin});
181
200
 
182
201
  if (!within(placeholder, document)) {
183
202
  after(this.$el, placeholder);
@@ -302,7 +321,7 @@ export default {
302
321
 
303
322
  const {width, scroll = 0, overflow, overflowScroll = 0, start, end, topOffset, height, offsetParentTop} = this._data;
304
323
  const active = start !== 0 || scroll > start;
305
- let top = Math.max(0, this.offset);
324
+ let top = this.offset;
306
325
  let position = 'fixed';
307
326
 
308
327
  if (scroll > end) {
@@ -134,9 +134,8 @@ export function parseOptions(options, args = []) {
134
134
 
135
135
  try {
136
136
 
137
- return !options
138
- ? {}
139
- : startsWith(options, '{')
137
+ return options
138
+ ? startsWith(options, '{')
140
139
  ? JSON.parse(options)
141
140
  : args.length && !includes(options, ':')
142
141
  ? ({[args[0]]: options})
@@ -146,7 +145,8 @@ export function parseOptions(options, args = []) {
146
145
  options[key.trim()] = value.trim();
147
146
  }
148
147
  return options;
149
- }, {});
148
+ }, {})
149
+ : {};
150
150
 
151
151
  } catch (e) {
152
152
  return {};
package/tests/image.html CHANGED
@@ -14,8 +14,6 @@
14
14
 
15
15
  <h1>Image</h1>
16
16
 
17
- <p><button class="uk-button uk-button-default" onclick="sessionStorage.clear()">Clear Session Storage</button></p>
18
-
19
17
  <div class="uk-child-width-1-2@m" uk-grid>
20
18
  <div>
21
19
  <img data-src="https://images.unsplash.com/photo-1522201949034-507737bce479?fit=crop&w=900&h=600&q=80" width="900" height="600" alt="" uk-img>
@@ -25,7 +23,17 @@
25
23
  </div>
26
24
  </div>
27
25
 
28
- <div class="uk-height-large uk-background-cover uk-margin-medium uk-flex uk-flex-center uk-flex-middle uk-light" data-src="https://images.unsplash.com/photo-1490822180406-880c226c150b?fit=crop&w=1200&h=450&q=80" uk-img>
26
+ <div>
27
+ <picture>
28
+ <source type="image/webp" sizes="(min-width: 780px) 780px" data-srcset="http://localhost/site/image?src=WyJzaXRlXC9pbWFnZXNcL2hvbWVcL3lvb3RoZW1lLXByby5qcGciLFtbInR5cGUiLFsid2VicCIsIjg1Il1dLFsiZG9SZXNpemUiLFs3ODEsNDg4LDc4MSw0ODhdXSxbImRvQ3JvcCIsWzc4MCw0ODgsMCwwXV1dXQ%3D%3D&amp;hash=9a3c6f9c 780w, /site/cache/images/yootheme-pro-5db7acab.webp 1560w">
29
+ <img data-src="/site/cache/images/yootheme-pro-0d67d545.jpeg" width="780" height="488" alt="Introduction Video on using the YOOtheme Pro Page Builder for WordPress and Joomla" uk-img>
30
+ </picture>
31
+ </div>
32
+ <div class="uk-height-large uk-background-cover uk-margin-medium uk-flex uk-flex-center uk-flex-middle uk-light" data-src="https://images.unsplash.com/photo-1490822180406-880c226c150b?fit=crop&w=1200&h=450&q=80" data-sources="srcset: images/test.avif; type: image/avif" uk-img>
33
+ <h1>Background Image</h1>
34
+ </div>
35
+
36
+ <div class="uk-height-large uk-background-cover uk-margin-medium uk-flex uk-flex-center uk-flex-middle uk-light" data-src="https://images.unsplash.com/photo-1490822180406-880c226c150b?fit=crop&w=1200&h=450&q=80" data-sources="[{&quot;srcset&quot;: &quot;images/test.avif&quot;, &quot;type&quot;: &quot;image/avif&quot;},{&quot;srcset&quot;: &quot;images/test.webp&quot;, &quot;type&quot;: &quot;image/webp&quot;}]" uk-img>
29
37
  <h1>Background Image</h1>
30
38
  </div>
31
39
 
@@ -255,28 +263,28 @@
255
263
 
256
264
  <ul class="uk-slideshow-items">
257
265
  <li>
258
- <img data-src="images/photo.jpg" alt="" uk-cover data-width="1800" data-height="1200" uk-img="target: !.uk-slideshow-items > :last-child, !* +*">
266
+ <img data-src="images/photo.jpg" alt="" uk-cover width="1800" height="1200" uk-img="target: !.uk-slideshow-items > :last-child, !* +*">
259
267
  <div class="uk-position-center uk-position-small uk-text-center">
260
268
  <h2 uk-slideshow-parallax="x: 100,-100">Heading</h2>
261
269
  <p uk-slideshow-parallax="x: 200,-200">Lorem ipsum dolor sit amet.</p>
262
270
  </div>
263
271
  </li>
264
272
  <li>
265
- <img data-src="images/dark.jpg" alt="" uk-cover data-width="1800" data-height="1200" uk-img="target: !* -*, !* +*">
273
+ <img data-src="images/dark.jpg" alt="" uk-cover width="1800" height="1200" uk-img="target: !* -*, !* +*">
266
274
  <div class="uk-position-center uk-position-small uk-text-center">
267
275
  <h2 uk-slideshow-parallax="x: 100,-100">Heading</h2>
268
276
  <p uk-slideshow-parallax="x: 200,-200">Lorem ipsum dolor sit amet.</p>
269
277
  </div>
270
278
  </li>
271
279
  <li>
272
- <img data-src="images/light.jpg" alt="" uk-cover data-width="1800" data-height="1200" uk-img="target: !* -*, !* +*">
280
+ <img data-src="images/light.jpg" alt="" uk-cover width="1800" height="1200" uk-img="target: !* -*, !* +*">
273
281
  <div class="uk-position-center uk-position-small uk-text-center">
274
282
  <h2 uk-slideshow-parallax="y: -50,0,0; opacity: 1,1,0">Heading</h2>
275
283
  <p uk-slideshow-parallax="y: 50,0,0; opacity: 1,1,0">Lorem ipsum dolor sit amet.</p>
276
284
  </div>
277
285
  </li>
278
286
  <li>
279
- <img data-src="images/photo2.jpg" alt="" uk-cover data-width="1800" data-height="1200" uk-img="target: !* -*, !.uk-slideshow-items > :first-child">
287
+ <img data-src="images/photo2.jpg" alt="" uk-cover width="1800" height="1200" uk-img="target: !* -*, !.uk-slideshow-items > :first-child">
280
288
  <div class="uk-position-center uk-position-small uk-text-center">
281
289
  <h2 uk-slideshow-parallax="x: 200,0,0">Heading</h2>
282
290
  <p uk-slideshow-parallax="x: 0,0,-200">Lorem ipsum dolor sit amet.</p>
@@ -296,43 +304,43 @@
296
304
 
297
305
  <ul class="uk-slider-items uk-child-width-1-2@s uk-child-width-1-3@m">
298
306
  <li>
299
- <img data-src="images/slider1.jpg" alt="" data-width="400" data-height="600" uk-img="target: !.uk-slider-items">
307
+ <img data-src="images/slider1.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
300
308
  <div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">1</h1></div>
301
309
  </li>
302
310
  <li>
303
- <img data-src="images/slider2.jpg" alt="" data-width="400" data-height="600" uk-img="target: !.uk-slider-items">
311
+ <img data-src="images/slider2.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
304
312
  <div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">2</h1></div>
305
313
  </li>
306
314
  <li>
307
- <img data-src="images/slider3.jpg" alt="" data-width="400" data-height="600" uk-img="target: !.uk-slider-items">
315
+ <img data-src="images/slider3.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
308
316
  <div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">3</h1></div>
309
317
  </li>
310
318
  <li>
311
- <img data-src="images/slider4.jpg" alt="" data-width="400" data-height="600" uk-img="target: !.uk-slider-items">
319
+ <img data-src="images/slider4.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
312
320
  <div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">4</h1></div>
313
321
  </li>
314
322
  <li>
315
- <img data-src="images/slider5.jpg" alt="" data-width="400" data-height="600" uk-img="target: !.uk-slider-items">
323
+ <img data-src="images/slider5.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
316
324
  <div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">5</h1></div>
317
325
  </li>
318
326
  <li>
319
- <img data-src="images/slider1.jpg" alt="" data-width="400" data-height="600" uk-img="target: !.uk-slider-items">
327
+ <img data-src="images/slider1.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
320
328
  <div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">6</h1></div>
321
329
  </li>
322
330
  <li>
323
- <img data-src="images/slider2.jpg" alt="" data-width="400" data-height="600" uk-img="target: !.uk-slider-items">
331
+ <img data-src="images/slider2.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
324
332
  <div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">7</h1></div>
325
333
  </li>
326
334
  <li>
327
- <img data-src="images/slider3.jpg" alt="" data-width="400" data-height="600" uk-img="target: !.uk-slider-items">
335
+ <img data-src="images/slider3.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
328
336
  <div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">8</h1></div>
329
337
  </li>
330
338
  <li>
331
- <img data-src="images/slider4.jpg" alt="" data-width="400" data-height="600" uk-img="target: !.uk-slider-items">
339
+ <img data-src="images/slider4.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
332
340
  <div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">9</h1></div>
333
341
  </li>
334
342
  <li>
335
- <img data-src="images/slider5.jpg" alt="" data-width="400" data-height="600" uk-img="target: !.uk-slider-items">
343
+ <img data-src="images/slider5.jpg" alt="" width="400" height="600" uk-img="target: !.uk-slider-items">
336
344
  <div class="uk-position-center uk-panel"><h1 class="uk-transition-slide-bottom-small">10</h1></div>
337
345
  </li>
338
346
  </ul>
@@ -365,28 +373,10 @@
365
373
  <td>The image's `src` attribute.</td>
366
374
  </tr>
367
375
  <tr>
368
- <td><code>dataSrcset</code></td>
376
+ <td><code>dataSources</code></td>
369
377
  <td>String</td>
370
- <td>false</td>
371
- <td>The image's `srcset` attribute.</td>
372
- </tr>
373
- <tr>
374
- <td><code>sizes</code></td>
375
- <td>String</td>
376
- <td>false</td>
377
- <td>The image's `sizes` attribute.</td>
378
- </tr>
379
- <tr>
380
- <td><code>width</code></td>
381
- <td>String</td>
382
- <td>false</td>
383
- <td>The image's `width` attribute. It will be used to determine the placeholder's width and the images position in the document.</td>
384
- </tr>
385
- <tr>
386
- <td><code>height</code></td>
387
- <td>String</td>
388
- <td>false</td>
389
- <td>The image's `height` attribute. It will be used to determine the placeholder's height and the images position in the document.</td>
378
+ <td>''</td>
379
+ <td>The image's sources. This option is used for background images only. The sources attributes be passed in `key: value;` format for a single source. For multiple sources in JSON format.</td>
390
380
  </tr>
391
381
  <tr>
392
382
  <td><code>offsetTop</code></td>
Binary file
Binary file