uikit 3.23.5 → 3.23.6-dev.4d3af55fc
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 +6 -0
- 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 +33 -39
- 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 +33 -39
- 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 +12 -21
- 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 +44 -59
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/modal.js +1 -1
- package/src/js/core/sticky.js +1 -6
- package/src/js/mixin/internal/animate-fade.js +38 -42
- package/src/js/util/animation.js +10 -13
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.23.
|
|
5
|
+
"version": "3.23.6-dev.4d3af55fc",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/modal.js
CHANGED
|
@@ -96,7 +96,7 @@ function install({ modal }) {
|
|
|
96
96
|
isString(message) ? message : html(message)
|
|
97
97
|
}</div>
|
|
98
98
|
<div class="uk-modal-footer uk-text-right">
|
|
99
|
-
<button class="uk-button uk-button-primary uk-modal-close" autofocus>${
|
|
99
|
+
<button class="uk-button uk-button-primary uk-modal-close" type="button" autofocus>${
|
|
100
100
|
i18n.ok
|
|
101
101
|
}</button>
|
|
102
102
|
</div>`,
|
package/src/js/core/sticky.js
CHANGED
|
@@ -402,12 +402,7 @@ export default {
|
|
|
402
402
|
if (sticky) {
|
|
403
403
|
css(this.$el, 'top', offset);
|
|
404
404
|
} else {
|
|
405
|
-
|
|
406
|
-
position: '',
|
|
407
|
-
top: '',
|
|
408
|
-
width: '',
|
|
409
|
-
marginTop: '',
|
|
410
|
-
});
|
|
405
|
+
reset(this.$el);
|
|
411
406
|
}
|
|
412
407
|
this.placeholder.hidden = true;
|
|
413
408
|
this.isFixed = false;
|
|
@@ -20,25 +20,20 @@ export default function fade(action, target, duration, stagger = 0) {
|
|
|
20
20
|
const propsIn = { opacity: 1 };
|
|
21
21
|
const propsOut = { opacity: 0 };
|
|
22
22
|
|
|
23
|
-
const
|
|
23
|
+
const isCurrentIndex = () => index === transitionIndex(target);
|
|
24
|
+
const wrapIndexFn = (fn) => () => (isCurrentIndex() ? fn() : Promise.reject());
|
|
24
25
|
|
|
25
26
|
const leaveFn = wrapIndexFn(async () => {
|
|
26
27
|
addClass(target, clsLeave);
|
|
27
28
|
|
|
28
|
-
await
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
),
|
|
37
|
-
i * stagger,
|
|
38
|
-
),
|
|
39
|
-
),
|
|
40
|
-
),
|
|
41
|
-
);
|
|
29
|
+
await (stagger
|
|
30
|
+
? Promise.all(
|
|
31
|
+
getTransitionNodes(target).map(async (child, i) => {
|
|
32
|
+
await awaitTimeout(i * stagger);
|
|
33
|
+
return Transition.start(child, propsOut, duration / 2, 'ease');
|
|
34
|
+
}),
|
|
35
|
+
)
|
|
36
|
+
: Transition.start(target, propsOut, duration / 2, 'ease'));
|
|
42
37
|
|
|
43
38
|
removeClass(target, clsLeave);
|
|
44
39
|
});
|
|
@@ -49,47 +44,48 @@ export default function fade(action, target, duration, stagger = 0) {
|
|
|
49
44
|
addClass(target, clsEnter);
|
|
50
45
|
action();
|
|
51
46
|
|
|
52
|
-
css(children(target)
|
|
47
|
+
css(stagger ? children(target) : target, propsOut);
|
|
53
48
|
|
|
54
49
|
// Ensure UIkit updates have propagated (e.g. Grid needs to reset margin classes)
|
|
55
50
|
height(target, oldHeight);
|
|
56
51
|
await awaitTimeout();
|
|
57
52
|
height(target, '');
|
|
58
53
|
|
|
59
|
-
const nodes = children(target);
|
|
60
54
|
const newHeight = height(target);
|
|
61
55
|
|
|
62
56
|
// Ensure Grid cells do not stretch when height is applied
|
|
63
57
|
css(target, 'alignContent', 'flex-start');
|
|
64
58
|
height(target, oldHeight);
|
|
65
59
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
60
|
+
let transitions = [];
|
|
61
|
+
let targetDuration = duration / 2;
|
|
62
|
+
if (stagger) {
|
|
63
|
+
const nodes = getTransitionNodes(target);
|
|
64
|
+
css(children(target), propsOut);
|
|
65
|
+
|
|
66
|
+
transitions = nodes.map(async (child, i) => {
|
|
67
|
+
await awaitTimeout(i * stagger);
|
|
68
|
+
await Transition.start(child, propsIn, duration / 2, 'ease');
|
|
69
|
+
if (isCurrentIndex()) {
|
|
70
|
+
css(child, { opacity: '' });
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
targetDuration += nodes.length * stagger;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!stagger || oldHeight !== newHeight) {
|
|
78
|
+
const targetProps = { height: newHeight, ...(stagger ? {} : propsIn) };
|
|
79
|
+
transitions.push(Transition.start(target, targetProps, targetDuration, 'ease'));
|
|
83
80
|
}
|
|
84
81
|
|
|
85
|
-
await Promise.all(transitions)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
});
|
|
82
|
+
await Promise.all(transitions);
|
|
83
|
+
|
|
84
|
+
removeClass(target, clsEnter);
|
|
85
|
+
if (isCurrentIndex()) {
|
|
86
|
+
css(target, { height: '', alignContent: '', opacity: '' });
|
|
87
|
+
delete target.dataset.transition;
|
|
88
|
+
}
|
|
93
89
|
});
|
|
94
90
|
|
|
95
91
|
return hasClass(target, clsLeave)
|
package/src/js/util/animation.js
CHANGED
|
@@ -13,17 +13,17 @@ function transition(element, props, duration = 400, timing = 'linear') {
|
|
|
13
13
|
toNodes(element).map(
|
|
14
14
|
(element) =>
|
|
15
15
|
new Promise((resolve, reject) => {
|
|
16
|
+
for (const name in props) {
|
|
17
|
+
// Force reflow: transition won't run for previously hidden element
|
|
18
|
+
css(element, name);
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
const timer = setTimeout(() => trigger(element, transitionEnd), duration);
|
|
17
22
|
|
|
18
23
|
once(
|
|
19
24
|
element,
|
|
20
25
|
[transitionEnd, transitionCanceled],
|
|
21
26
|
({ type }) => {
|
|
22
|
-
if (frame !== true) {
|
|
23
|
-
css(element, props);
|
|
24
|
-
cancelAnimationFrame(frame);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
27
|
clearTimeout(timer);
|
|
28
28
|
removeClass(element, clsTransition);
|
|
29
29
|
css(element, {
|
|
@@ -37,14 +37,11 @@ function transition(element, props, duration = 400, timing = 'linear') {
|
|
|
37
37
|
);
|
|
38
38
|
|
|
39
39
|
addClass(element, clsTransition);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
transitionTimingFunction: timing,
|
|
46
|
-
...props,
|
|
47
|
-
});
|
|
40
|
+
css(element, {
|
|
41
|
+
transitionProperty: Object.keys(props).map(propName).join(','),
|
|
42
|
+
transitionDuration: `${duration}ms`,
|
|
43
|
+
transitionTimingFunction: timing,
|
|
44
|
+
...props,
|
|
48
45
|
});
|
|
49
46
|
}),
|
|
50
47
|
),
|