uikit 3.20.8-dev.a340cc6f4 → 3.20.8-dev.c77f59741
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/CHANGELOG.md +0 -1
- 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 +2 -5
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +18 -28
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +1 -1
- 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 +2 -2
- 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 +19 -29
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/sortable.js +19 -25
- package/src/js/mixin/internal/animate-slide.js +1 -9
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.20.8-dev.
|
|
5
|
+
"version": "3.20.8-dev.c77f59741",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -65,6 +65,16 @@ export default {
|
|
|
65
65
|
pos: {},
|
|
66
66
|
},
|
|
67
67
|
|
|
68
|
+
created() {
|
|
69
|
+
for (const key of ['init', 'start', 'move', 'end']) {
|
|
70
|
+
const fn = this[key];
|
|
71
|
+
this[key] = (e) => {
|
|
72
|
+
assign(this.pos, getEventPos(e));
|
|
73
|
+
fn(e);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
|
|
68
78
|
events: {
|
|
69
79
|
name: pointerDown,
|
|
70
80
|
passive: false,
|
|
@@ -184,7 +194,6 @@ export default {
|
|
|
184
194
|
|
|
185
195
|
e.preventDefault();
|
|
186
196
|
|
|
187
|
-
this.pos = getEventPos(e);
|
|
188
197
|
this.touched = new Set([this]);
|
|
189
198
|
this.placeholder = placeholder;
|
|
190
199
|
this.origin = { target, index: index(placeholder), ...this.pos };
|
|
@@ -214,9 +223,7 @@ export default {
|
|
|
214
223
|
this.move(e);
|
|
215
224
|
},
|
|
216
225
|
|
|
217
|
-
move
|
|
218
|
-
assign(this.pos, getEventPos(e));
|
|
219
|
-
|
|
226
|
+
move(e) {
|
|
220
227
|
if (this.drag) {
|
|
221
228
|
this.$emit('move');
|
|
222
229
|
} else if (
|
|
@@ -225,7 +232,7 @@ export default {
|
|
|
225
232
|
) {
|
|
226
233
|
this.start(e);
|
|
227
234
|
}
|
|
228
|
-
}
|
|
235
|
+
},
|
|
229
236
|
|
|
230
237
|
end() {
|
|
231
238
|
off(document, pointerMove, this.move);
|
|
@@ -265,17 +272,17 @@ export default {
|
|
|
265
272
|
insert(element, target) {
|
|
266
273
|
addClass(this.items, this.clsItem);
|
|
267
274
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
this.animate(() => append(this.target, element));
|
|
272
|
-
}
|
|
275
|
+
const insert = () => (target ? before(target, element) : append(this.target, element));
|
|
276
|
+
|
|
277
|
+
this.animate(insert);
|
|
273
278
|
},
|
|
274
279
|
|
|
275
280
|
remove(element) {
|
|
276
|
-
if (this.target.contains(element)) {
|
|
277
|
-
|
|
281
|
+
if (!this.target.contains(element)) {
|
|
282
|
+
return;
|
|
278
283
|
}
|
|
284
|
+
|
|
285
|
+
this.animate(() => remove(element));
|
|
279
286
|
},
|
|
280
287
|
|
|
281
288
|
getSortable(element) {
|
|
@@ -431,16 +438,3 @@ function isHorizontal(list, placeholder) {
|
|
|
431
438
|
function linesIntersect(lineA, lineB) {
|
|
432
439
|
return lineA[1] > lineB[0] && lineB[1] > lineA[0];
|
|
433
440
|
}
|
|
434
|
-
|
|
435
|
-
function throttle(fn) {
|
|
436
|
-
let throttled;
|
|
437
|
-
return function (...args) {
|
|
438
|
-
if (!throttled) {
|
|
439
|
-
throttled = true;
|
|
440
|
-
requestAnimationFrame(() => {
|
|
441
|
-
throttled = false;
|
|
442
|
-
fn.call(this, ...args);
|
|
443
|
-
});
|
|
444
|
-
}
|
|
445
|
-
};
|
|
446
|
-
}
|
|
@@ -21,13 +21,8 @@ export default async function (action, target, duration) {
|
|
|
21
21
|
const currentProps = nodes.map((el) => getProps(el, true));
|
|
22
22
|
const targetProps = { ...css(target, ['height', 'padding']), display: 'block' };
|
|
23
23
|
|
|
24
|
-
const targets = nodes.concat(target);
|
|
25
|
-
|
|
26
24
|
// Cancel previous animations
|
|
27
|
-
await Promise.all(
|
|
28
|
-
|
|
29
|
-
// Force transition to be canceled in Safari
|
|
30
|
-
css(targets, 'transitionProperty', 'none');
|
|
25
|
+
await Promise.all(nodes.concat(target).map(Transition.cancel));
|
|
31
26
|
|
|
32
27
|
// Adding, sorting, removing nodes
|
|
33
28
|
await action();
|
|
@@ -38,9 +33,6 @@ export default async function (action, target, duration) {
|
|
|
38
33
|
// Wait for update to propagate
|
|
39
34
|
await Promise.resolve();
|
|
40
35
|
|
|
41
|
-
// Possibly reset the forced transition property
|
|
42
|
-
css(targets, 'transitionProperty', '');
|
|
43
|
-
|
|
44
36
|
// Get new state
|
|
45
37
|
const targetStyle = attr(target, 'style');
|
|
46
38
|
const targetPropsTo = css(target, ['height', 'padding']);
|