uikit 3.11.2-dev.c7ed3c19b → 3.11.2-dev.d8c101f07
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.
- package/dist/css/uikit-core-rtl.css +1 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +6 -8
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +26 -55
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +27 -57
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +4 -11
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +8 -14
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +5 -7
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +2 -2
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +20 -27
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +54 -92
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +2 -11
- package/src/js/api/hooks.js +1 -1
- package/src/js/api/state.js +1 -1
- package/src/js/components/filter.js +2 -3
- package/src/js/components/internal/lightbox-animations.js +4 -3
- package/src/js/components/internal/slideshow-animations.js +4 -3
- package/src/js/components/lightbox-panel.js +34 -58
- package/src/js/components/lightbox.js +1 -2
- package/src/js/components/sortable.js +1 -1
- package/src/js/core/alert.js +1 -2
- package/src/js/core/modal.js +1 -2
- package/src/js/core/navbar.js +3 -3
- package/src/js/mixin/internal/animate-slide.js +9 -12
- package/src/js/mixin/slider.js +8 -16
- package/src/js/mixin/slideshow.js +2 -2
- package/src/js/mixin/togglable.js +1 -2
- package/src/js/util/ajax.js +9 -12
- package/src/js/util/animation.js +7 -12
- package/src/js/util/lang.js +1 -1
- package/src/js/util/options.js +2 -11
- package/src/js/util/player.js +2 -2
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.
|
|
5
|
+
"version": "3.11.2-dev.d8c101f07",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/api/component.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
$$,
|
|
3
|
-
assign,
|
|
4
|
-
camelize,
|
|
5
|
-
fastdom,
|
|
6
|
-
hyphenate,
|
|
7
|
-
isPlainObject,
|
|
8
|
-
memoize,
|
|
9
|
-
startsWith,
|
|
10
|
-
} from 'uikit-util';
|
|
1
|
+
import { $$, camelize, fastdom, hyphenate, isPlainObject, memoize, startsWith } from 'uikit-util';
|
|
11
2
|
|
|
12
3
|
export default function (UIkit) {
|
|
13
4
|
const DATA = UIkit.data;
|
|
@@ -51,7 +42,7 @@ export default function (UIkit) {
|
|
|
51
42
|
}
|
|
52
43
|
};
|
|
53
44
|
|
|
54
|
-
const opt = isPlainObject(options) ?
|
|
45
|
+
const opt = isPlainObject(options) ? { ...options } : options.options;
|
|
55
46
|
|
|
56
47
|
opt.name = name;
|
|
57
48
|
|
package/src/js/api/hooks.js
CHANGED
package/src/js/api/state.js
CHANGED
|
@@ -187,7 +187,7 @@ export default function (UIkit) {
|
|
|
187
187
|
el = isFunction(el) ? el.call(component) : el || component.$el;
|
|
188
188
|
|
|
189
189
|
if (isArray(el)) {
|
|
190
|
-
el.forEach((el) => registerEvent(component,
|
|
190
|
+
el.forEach((el) => registerEvent(component, { ...event, el }, key));
|
|
191
191
|
return;
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -2,7 +2,6 @@ import Animate from '../mixin/animate';
|
|
|
2
2
|
import {
|
|
3
3
|
$$,
|
|
4
4
|
append,
|
|
5
|
-
assign,
|
|
6
5
|
css,
|
|
7
6
|
data,
|
|
8
7
|
each,
|
|
@@ -105,7 +104,7 @@ export default {
|
|
|
105
104
|
},
|
|
106
105
|
|
|
107
106
|
setState(state, animate = true) {
|
|
108
|
-
state =
|
|
107
|
+
state = { filter: { '': '' }, sort: [], ...state };
|
|
109
108
|
|
|
110
109
|
trigger(this.$el, 'beforeFilter', [this, state]);
|
|
111
110
|
|
|
@@ -205,7 +204,7 @@ function getSelector({ filter }) {
|
|
|
205
204
|
}
|
|
206
205
|
|
|
207
206
|
function sortItems(nodes, sort, order) {
|
|
208
|
-
return
|
|
207
|
+
return [...nodes].sort(
|
|
209
208
|
(a, b) =>
|
|
210
209
|
data(a, sort).localeCompare(data(b, sort), undefined, { numeric: true }) *
|
|
211
210
|
(order === 'asc' || -1)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import Animations, { scale3d } from '../../mixin/internal/slideshow-animations';
|
|
2
|
-
import {
|
|
2
|
+
import { css } from 'uikit-util';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default {
|
|
5
|
+
...Animations,
|
|
5
6
|
fade: {
|
|
6
7
|
show() {
|
|
7
8
|
return [{ opacity: 0 }, { opacity: 1 }];
|
|
@@ -35,4 +36,4 @@ export default assign({}, Animations, {
|
|
|
35
36
|
];
|
|
36
37
|
},
|
|
37
38
|
},
|
|
38
|
-
}
|
|
39
|
+
};
|
|
@@ -3,9 +3,10 @@ import Animations, {
|
|
|
3
3
|
translate,
|
|
4
4
|
translated,
|
|
5
5
|
} from '../../mixin/internal/slideshow-animations';
|
|
6
|
-
import {
|
|
6
|
+
import { css } from 'uikit-util';
|
|
7
7
|
|
|
8
|
-
export default
|
|
8
|
+
export default {
|
|
9
|
+
...Animations,
|
|
9
10
|
fade: {
|
|
10
11
|
show() {
|
|
11
12
|
return [{ opacity: 0, zIndex: 0 }, { zIndex: -1 }];
|
|
@@ -96,4 +97,4 @@ export default assign({}, Animations, {
|
|
|
96
97
|
];
|
|
97
98
|
},
|
|
98
99
|
},
|
|
99
|
-
}
|
|
100
|
+
};
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
$,
|
|
8
8
|
addClass,
|
|
9
9
|
append,
|
|
10
|
-
assign,
|
|
11
10
|
attr,
|
|
12
11
|
fragment,
|
|
13
12
|
getImage,
|
|
@@ -219,29 +218,21 @@ export default {
|
|
|
219
218
|
if (type === 'image' || src.match(/\.(avif|jpe?g|a?png|gif|svg|webp)($|\?)/i)) {
|
|
220
219
|
try {
|
|
221
220
|
const { width, height } = await getImage(src, attrs.srcset, attrs.size);
|
|
222
|
-
this.setItem(
|
|
223
|
-
item,
|
|
224
|
-
createEl('img', assign({ src, width, height, alt }, attrs))
|
|
225
|
-
);
|
|
221
|
+
this.setItem(item, createEl('img', { src, width, height, alt, ...attrs }));
|
|
226
222
|
} catch (e) {
|
|
227
223
|
this.setError(item);
|
|
228
224
|
}
|
|
229
225
|
|
|
230
226
|
// Video
|
|
231
227
|
} else if (type === 'video' || src.match(/\.(mp4|webm|ogv)($|\?)/i)) {
|
|
232
|
-
const video = createEl(
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
'uk-video': `${this.videoAutoplay}`,
|
|
241
|
-
},
|
|
242
|
-
attrs
|
|
243
|
-
)
|
|
244
|
-
);
|
|
228
|
+
const video = createEl('video', {
|
|
229
|
+
src,
|
|
230
|
+
poster,
|
|
231
|
+
controls: '',
|
|
232
|
+
playsinline: '',
|
|
233
|
+
'uk-video': `${this.videoAutoplay}`,
|
|
234
|
+
...attrs,
|
|
235
|
+
});
|
|
245
236
|
|
|
246
237
|
on(video, 'loadedmetadata', () => {
|
|
247
238
|
attr(video, { width: video.videoWidth, height: video.videoHeight });
|
|
@@ -253,18 +244,13 @@ export default {
|
|
|
253
244
|
} else if (type === 'iframe' || src.match(/\.(html|php)($|\?)/i)) {
|
|
254
245
|
this.setItem(
|
|
255
246
|
item,
|
|
256
|
-
createEl(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
class: 'uk-lightbox-iframe',
|
|
264
|
-
},
|
|
265
|
-
attrs
|
|
266
|
-
)
|
|
267
|
-
)
|
|
247
|
+
createEl('iframe', {
|
|
248
|
+
src,
|
|
249
|
+
frameborder: '0',
|
|
250
|
+
allowfullscreen: '',
|
|
251
|
+
class: 'uk-lightbox-iframe',
|
|
252
|
+
...attrs,
|
|
253
|
+
})
|
|
268
254
|
);
|
|
269
255
|
|
|
270
256
|
// YouTube
|
|
@@ -275,20 +261,15 @@ export default {
|
|
|
275
261
|
) {
|
|
276
262
|
this.setItem(
|
|
277
263
|
item,
|
|
278
|
-
createEl(
|
|
279
|
-
'
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
},
|
|
288
|
-
iframeAttrs,
|
|
289
|
-
attrs
|
|
290
|
-
)
|
|
291
|
-
)
|
|
264
|
+
createEl('iframe', {
|
|
265
|
+
src: `https://www.youtube${matches[1] || ''}.com/embed/${matches[2]}${
|
|
266
|
+
matches[3] ? `?${matches[3]}` : ''
|
|
267
|
+
}`,
|
|
268
|
+
width: 1920,
|
|
269
|
+
height: 1080,
|
|
270
|
+
...iframeAttrs,
|
|
271
|
+
...attrs,
|
|
272
|
+
})
|
|
292
273
|
);
|
|
293
274
|
|
|
294
275
|
// Vimeo
|
|
@@ -307,20 +288,15 @@ export default {
|
|
|
307
288
|
|
|
308
289
|
this.setItem(
|
|
309
290
|
item,
|
|
310
|
-
createEl(
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
},
|
|
320
|
-
iframeAttrs,
|
|
321
|
-
attrs
|
|
322
|
-
)
|
|
323
|
-
)
|
|
291
|
+
createEl('iframe', {
|
|
292
|
+
src: `https://player.vimeo.com/video/${matches[1]}${
|
|
293
|
+
matches[2] ? `?${matches[2]}` : ''
|
|
294
|
+
}`,
|
|
295
|
+
width,
|
|
296
|
+
height,
|
|
297
|
+
...iframeAttrs,
|
|
298
|
+
...attrs,
|
|
299
|
+
})
|
|
324
300
|
);
|
|
325
301
|
} catch (e) {
|
|
326
302
|
this.setError(item);
|
|
@@ -48,8 +48,7 @@ export default {
|
|
|
48
48
|
index = findIndex(items, ({ source: src }) => source === src);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
this.panel =
|
|
52
|
-
this.panel || this.$create('lightboxPanel', assign({}, this.$props, { items }));
|
|
51
|
+
this.panel = this.panel || this.$create('lightboxPanel', { ...this.$props, items });
|
|
53
52
|
|
|
54
53
|
on(this.panel.$el, 'hidden', () => (this.panel = false));
|
|
55
54
|
|
|
@@ -205,7 +205,7 @@ export default {
|
|
|
205
205
|
|
|
206
206
|
this.touched = new Set([this]);
|
|
207
207
|
this.placeholder = placeholder;
|
|
208
|
-
this.origin =
|
|
208
|
+
this.origin = { target, index: index(placeholder), ...this.pos };
|
|
209
209
|
|
|
210
210
|
on(document, pointerMove, this.move);
|
|
211
211
|
on(document, pointerUp, this.end);
|
package/src/js/core/alert.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Class from '../mixin/class';
|
|
2
2
|
import Togglable from '../mixin/togglable';
|
|
3
|
-
import { assign } from 'uikit-util';
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
5
|
mixins: [Class, Togglable],
|
|
@@ -15,7 +14,7 @@ export default {
|
|
|
15
14
|
animation: [true],
|
|
16
15
|
selClose: '.uk-alert-close',
|
|
17
16
|
duration: 150,
|
|
18
|
-
hideProps:
|
|
17
|
+
hideProps: { opacity: 0, ...Togglable.data.hideProps },
|
|
19
18
|
},
|
|
20
19
|
|
|
21
20
|
events: [
|
package/src/js/core/modal.js
CHANGED
|
@@ -2,7 +2,6 @@ import Modal from '../mixin/modal';
|
|
|
2
2
|
import {
|
|
3
3
|
$,
|
|
4
4
|
addClass,
|
|
5
|
-
assign,
|
|
6
5
|
css,
|
|
7
6
|
Deferred,
|
|
8
7
|
hasClass,
|
|
@@ -136,7 +135,7 @@ function install({ modal }) {
|
|
|
136
135
|
};
|
|
137
136
|
|
|
138
137
|
function openDialog(tmpl, options, hideFn, submitFn) {
|
|
139
|
-
options =
|
|
138
|
+
options = { bgClose: false, escClose: true, labels: modal.labels, ...options };
|
|
140
139
|
|
|
141
140
|
const dialog = modal.dialog(tmpl(options), options);
|
|
142
141
|
const deferred = new Deferred();
|
package/src/js/core/navbar.js
CHANGED
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
$$,
|
|
7
7
|
addClass,
|
|
8
8
|
after,
|
|
9
|
-
assign,
|
|
10
9
|
css,
|
|
11
10
|
findIndex,
|
|
12
11
|
hasAttr,
|
|
@@ -126,11 +125,12 @@ export default {
|
|
|
126
125
|
this.$create(
|
|
127
126
|
'drop',
|
|
128
127
|
dropdowns.filter((el) => !this.getDropdown(el)),
|
|
129
|
-
|
|
128
|
+
{
|
|
129
|
+
...this.$props,
|
|
130
130
|
boundary: this.boundary,
|
|
131
131
|
pos: this.pos,
|
|
132
132
|
offset: this.dropbar || this.offset,
|
|
133
|
-
}
|
|
133
|
+
}
|
|
134
134
|
);
|
|
135
135
|
},
|
|
136
136
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
assign,
|
|
3
2
|
children,
|
|
4
3
|
css,
|
|
5
4
|
fastdom,
|
|
@@ -44,7 +43,7 @@ export default function (action, target, duration) {
|
|
|
44
43
|
|
|
45
44
|
// Reset to previous state
|
|
46
45
|
nodes.forEach((el, i) => propsFrom[i] && css(el, propsFrom[i]));
|
|
47
|
-
css(target,
|
|
46
|
+
css(target, { display: 'block', ...targetProps });
|
|
48
47
|
|
|
49
48
|
// Start transitions on next frame
|
|
50
49
|
requestAnimationFrame(() => {
|
|
@@ -76,16 +75,14 @@ function getProps(el, opacity) {
|
|
|
76
75
|
const zIndex = css(el, 'zIndex');
|
|
77
76
|
|
|
78
77
|
return isVisible(el)
|
|
79
|
-
?
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
getPositionWithMargin(el)
|
|
88
|
-
)
|
|
78
|
+
? {
|
|
79
|
+
display: '',
|
|
80
|
+
opacity: opacity ? css(el, 'opacity') : '0',
|
|
81
|
+
pointerEvents: 'none',
|
|
82
|
+
position: 'absolute',
|
|
83
|
+
zIndex: zIndex === 'auto' ? index(el) : zIndex,
|
|
84
|
+
...getPositionWithMargin(el),
|
|
85
|
+
}
|
|
89
86
|
: false;
|
|
90
87
|
}
|
|
91
88
|
|
package/src/js/mixin/slider.js
CHANGED
|
@@ -4,7 +4,6 @@ import SliderNav from './slider-nav';
|
|
|
4
4
|
import {
|
|
5
5
|
$,
|
|
6
6
|
$$,
|
|
7
|
-
assign,
|
|
8
7
|
clamp,
|
|
9
8
|
fastdom,
|
|
10
9
|
getIndex,
|
|
@@ -170,21 +169,14 @@ export default {
|
|
|
170
169
|
},
|
|
171
170
|
|
|
172
171
|
_show(prev, next, force) {
|
|
173
|
-
this._transitioner = this._getTransitioner(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
? 'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */
|
|
182
|
-
: 'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */
|
|
183
|
-
: this.easing,
|
|
184
|
-
},
|
|
185
|
-
this.transitionOptions
|
|
186
|
-
)
|
|
187
|
-
);
|
|
172
|
+
this._transitioner = this._getTransitioner(prev, next, this.dir, {
|
|
173
|
+
easing: force
|
|
174
|
+
? next.offsetWidth < 600
|
|
175
|
+
? 'cubic-bezier(0.25, 0.46, 0.45, 0.94)' /* easeOutQuad */
|
|
176
|
+
: 'cubic-bezier(0.165, 0.84, 0.44, 1)' /* easeOutQuart */
|
|
177
|
+
: this.easing,
|
|
178
|
+
...this.transitionOptions,
|
|
179
|
+
});
|
|
188
180
|
|
|
189
181
|
if (!force && !prev) {
|
|
190
182
|
this._translate(1);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Animations from './internal/slideshow-animations';
|
|
2
2
|
import Transitioner from './internal/slideshow-transitioner';
|
|
3
3
|
import Slider from './slider.js';
|
|
4
|
-
import { addClass,
|
|
4
|
+
import { addClass, removeClass } from 'uikit-util';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
mixins: [Slider],
|
|
@@ -19,7 +19,7 @@ export default {
|
|
|
19
19
|
|
|
20
20
|
computed: {
|
|
21
21
|
animation({ animation, Animations }) {
|
|
22
|
-
return
|
|
22
|
+
return { ...(Animations[animation] || Animations.slide), name: animation };
|
|
23
23
|
},
|
|
24
24
|
|
|
25
25
|
transitionOptions() {
|
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
$$,
|
|
3
3
|
addClass,
|
|
4
4
|
Animation,
|
|
5
|
-
assign,
|
|
6
5
|
css,
|
|
7
6
|
fastdom,
|
|
8
7
|
hasClass,
|
|
@@ -175,7 +174,7 @@ export function toggleHeight({ isToggled, duration, initProps, hideProps, transi
|
|
|
175
174
|
show
|
|
176
175
|
? Transition.start(
|
|
177
176
|
el,
|
|
178
|
-
|
|
177
|
+
{ ...initProps, overflow: 'hidden', height: endHeight },
|
|
179
178
|
Math.round(duration * (1 - currentHeight / endHeight)),
|
|
180
179
|
transition
|
|
181
180
|
)
|
package/src/js/util/ajax.js
CHANGED
|
@@ -2,18 +2,15 @@ import { on } from './event';
|
|
|
2
2
|
import { assign, noop } from './lang';
|
|
3
3
|
|
|
4
4
|
export function ajax(url, options) {
|
|
5
|
-
const env =
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
options
|
|
15
|
-
);
|
|
16
|
-
|
|
5
|
+
const env = {
|
|
6
|
+
data: null,
|
|
7
|
+
method: 'GET',
|
|
8
|
+
headers: {},
|
|
9
|
+
xhr: new XMLHttpRequest(),
|
|
10
|
+
beforeSend: noop,
|
|
11
|
+
responseType: '',
|
|
12
|
+
...options,
|
|
13
|
+
};
|
|
17
14
|
return Promise.resolve()
|
|
18
15
|
.then(() => env.beforeSend(env))
|
|
19
16
|
.then(() => send(url, env));
|
package/src/js/util/animation.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { attr } from './attr';
|
|
2
2
|
import { once, trigger } from './event';
|
|
3
3
|
import { css, propName } from './style';
|
|
4
|
-
import {
|
|
4
|
+
import { startsWith, toNodes } from './lang';
|
|
5
5
|
import { addClass, hasClass, removeClass, removeClasses } from './class';
|
|
6
6
|
|
|
7
7
|
export function transition(element, props, duration = 400, timing = 'linear') {
|
|
@@ -35,17 +35,12 @@ export function transition(element, props, duration = 400, timing = 'linear') {
|
|
|
35
35
|
);
|
|
36
36
|
|
|
37
37
|
addClass(element, 'uk-transition');
|
|
38
|
-
css(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
transitionTimingFunction: timing,
|
|
45
|
-
},
|
|
46
|
-
props
|
|
47
|
-
)
|
|
48
|
-
);
|
|
38
|
+
css(element, {
|
|
39
|
+
transitionProperty: Object.keys(props).map(propName).join(','),
|
|
40
|
+
transitionDuration: `${duration}ms`,
|
|
41
|
+
transitionTimingFunction: timing,
|
|
42
|
+
...props,
|
|
43
|
+
});
|
|
49
44
|
})
|
|
50
45
|
)
|
|
51
46
|
);
|
package/src/js/util/lang.js
CHANGED
package/src/js/util/options.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
assign,
|
|
3
|
-
hasOwn,
|
|
4
|
-
includes,
|
|
5
|
-
isArray,
|
|
6
|
-
isFunction,
|
|
7
|
-
isUndefined,
|
|
8
|
-
sortBy,
|
|
9
|
-
startsWith,
|
|
10
|
-
} from './lang';
|
|
1
|
+
import { hasOwn, includes, isArray, isFunction, isUndefined, sortBy, startsWith } from './lang';
|
|
11
2
|
|
|
12
3
|
const strats = {};
|
|
13
4
|
|
|
@@ -48,7 +39,7 @@ strats.props = function (parentVal, childVal) {
|
|
|
48
39
|
|
|
49
40
|
// extend strategy
|
|
50
41
|
strats.computed = strats.methods = function (parentVal, childVal) {
|
|
51
|
-
return childVal ? (parentVal ?
|
|
42
|
+
return childVal ? (parentVal ? { ...parentVal, ...childVal } : childVal) : parentVal;
|
|
52
43
|
};
|
|
53
44
|
|
|
54
45
|
// data strategy
|
package/src/js/util/player.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { once } from './event';
|
|
2
|
-
import {
|
|
2
|
+
import { includes, noop } from './lang';
|
|
3
3
|
|
|
4
4
|
export function play(el) {
|
|
5
5
|
if (isIFrame(el)) {
|
|
@@ -64,7 +64,7 @@ async function call(el, cmd) {
|
|
|
64
64
|
|
|
65
65
|
function post(el, cmd) {
|
|
66
66
|
try {
|
|
67
|
-
el.contentWindow.postMessage(JSON.stringify(
|
|
67
|
+
el.contentWindow.postMessage(JSON.stringify({ event: 'command', ...cmd }), '*');
|
|
68
68
|
} catch (e) {
|
|
69
69
|
// noop
|
|
70
70
|
}
|