uikit 3.23.6-dev.99eccf626 → 3.23.6-dev.eb1cbd14e
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 +16 -12
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +14 -9
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +14 -9
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +8 -4
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +2 -4
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +2 -4
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +8 -2
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +2 -4
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +9 -5
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +12 -13
- 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 +33 -23
- 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 +48 -45
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/filter.js +2 -1
- package/src/js/components/notification.js +2 -3
- package/src/js/components/sortable.js +4 -2
- package/src/js/core/accordion.js +2 -1
- package/src/js/core/alert.js +2 -1
- package/src/js/core/drop.js +4 -2
- package/src/js/core/modal.js +1 -1
- package/src/js/core/switcher.js +3 -2
- package/src/js/mixin/event.js +5 -0
- package/src/js/mixin/internal/animate-fade.js +8 -4
- package/src/js/mixin/internal/animate-slide.js +1 -6
- package/src/js/mixin/internal/slideshow-transitioner.js +2 -4
- package/src/js/mixin/modal.js +2 -1
- package/src/js/mixin/parallax.js +2 -3
- package/src/js/mixin/slider-nav.js +2 -1
- package/src/js/util/animation.js +5 -9
- package/src/js/util/scroll.js +5 -4
- package/src/js/util/style.js +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.23.6-dev.
|
|
5
|
+
"version": "3.23.6-dev.eb1cbd14e",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
} from 'uikit-util';
|
|
20
20
|
import { parseOptions } from '../api/options';
|
|
21
21
|
import Animate from '../mixin/animate';
|
|
22
|
+
import { maybeDefautPreventClick } from '../mixin/event';
|
|
22
23
|
import { keyMap } from '../util/keys';
|
|
23
24
|
|
|
24
25
|
export default {
|
|
@@ -79,7 +80,7 @@ export default {
|
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
if (e.target.closest('a,button')) {
|
|
82
|
-
e
|
|
83
|
+
maybeDefautPreventClick(e);
|
|
83
84
|
this.apply(e.current);
|
|
84
85
|
}
|
|
85
86
|
},
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
trigger,
|
|
13
13
|
} from 'uikit-util';
|
|
14
14
|
import Container from '../mixin/container';
|
|
15
|
+
import { maybeDefautPreventClick } from '../mixin/event';
|
|
15
16
|
|
|
16
17
|
export default {
|
|
17
18
|
mixins: [Container],
|
|
@@ -78,9 +79,7 @@ export default {
|
|
|
78
79
|
|
|
79
80
|
events: {
|
|
80
81
|
click(e) {
|
|
81
|
-
|
|
82
|
-
e.preventDefault();
|
|
83
|
-
}
|
|
82
|
+
maybeDefautPreventClick(e);
|
|
84
83
|
this.close();
|
|
85
84
|
},
|
|
86
85
|
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
pointInRect,
|
|
26
26
|
remove,
|
|
27
27
|
removeClass,
|
|
28
|
+
resetProps,
|
|
28
29
|
scrollParents,
|
|
29
30
|
toggleClass,
|
|
30
31
|
Transition,
|
|
@@ -95,8 +96,9 @@ export default {
|
|
|
95
96
|
},
|
|
96
97
|
|
|
97
98
|
handles(handles, prev) {
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
const props = { touchAction: 'none', userSelect: 'none' };
|
|
100
|
+
resetProps(prev, props);
|
|
101
|
+
css(handles, props);
|
|
100
102
|
},
|
|
101
103
|
},
|
|
102
104
|
|
package/src/js/core/accordion.js
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
import { generateId } from '../api/instance';
|
|
23
23
|
import { lazyload } from '../api/observables';
|
|
24
24
|
import Class from '../mixin/class';
|
|
25
|
+
import { maybeDefautPreventClick } from '../mixin/event';
|
|
25
26
|
import Togglable from '../mixin/togglable';
|
|
26
27
|
import { keyMap } from '../util/keys';
|
|
27
28
|
|
|
@@ -108,7 +109,7 @@ export default {
|
|
|
108
109
|
return;
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
e
|
|
112
|
+
maybeDefautPreventClick(e);
|
|
112
113
|
|
|
113
114
|
this._off?.();
|
|
114
115
|
this._off = keepScrollPosition(e.target);
|
package/src/js/core/alert.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { css, toFloat, Transition } from 'uikit-util';
|
|
2
2
|
import Class from '../mixin/class';
|
|
3
|
+
import { maybeDefautPreventClick } from '../mixin/event';
|
|
3
4
|
import Togglable from '../mixin/togglable';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
@@ -24,7 +25,7 @@ export default {
|
|
|
24
25
|
delegate: ({ selClose }) => selClose,
|
|
25
26
|
|
|
26
27
|
handler(e) {
|
|
27
|
-
e
|
|
28
|
+
maybeDefautPreventClick(e);
|
|
28
29
|
this.close();
|
|
29
30
|
},
|
|
30
31
|
},
|
package/src/js/core/drop.js
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
removeClass,
|
|
30
30
|
} from 'uikit-util';
|
|
31
31
|
import Container from '../mixin/container';
|
|
32
|
+
import { maybeDefautPreventClick } from '../mixin/event';
|
|
32
33
|
import Position, { storeScrollPosition } from '../mixin/position';
|
|
33
34
|
import Togglable from '../mixin/togglable';
|
|
34
35
|
import { keyMap } from '../util/keys';
|
|
@@ -80,6 +81,7 @@ export default {
|
|
|
80
81
|
cls: 'uk-open',
|
|
81
82
|
container: false,
|
|
82
83
|
closeOnScroll: false,
|
|
84
|
+
selClose: '.uk-drop-close',
|
|
83
85
|
},
|
|
84
86
|
|
|
85
87
|
computed: {
|
|
@@ -131,10 +133,10 @@ export default {
|
|
|
131
133
|
{
|
|
132
134
|
name: 'click',
|
|
133
135
|
|
|
134
|
-
delegate: () =>
|
|
136
|
+
delegate: ({ selClose }) => selClose,
|
|
135
137
|
|
|
136
138
|
handler(e) {
|
|
137
|
-
e
|
|
139
|
+
maybeDefautPreventClick(e);
|
|
138
140
|
this.hide(false);
|
|
139
141
|
},
|
|
140
142
|
},
|
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/switcher.js
CHANGED
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
} from 'uikit-util';
|
|
19
19
|
import { generateId } from '../api/instance';
|
|
20
20
|
import { lazyload, swipe } from '../api/observables';
|
|
21
|
+
import { maybeDefautPreventClick } from '../mixin/event';
|
|
21
22
|
import Togglable from '../mixin/togglable';
|
|
22
23
|
import { keyMap } from '../util/keys';
|
|
23
24
|
|
|
@@ -111,7 +112,7 @@ export default {
|
|
|
111
112
|
!matches(e.current, selDisabled) &&
|
|
112
113
|
(e.type === 'click' || e.keyCode === keyMap.SPACE)
|
|
113
114
|
) {
|
|
114
|
-
e
|
|
115
|
+
maybeDefautPreventClick(e);
|
|
115
116
|
this.show(e.current);
|
|
116
117
|
}
|
|
117
118
|
},
|
|
@@ -161,7 +162,7 @@ export default {
|
|
|
161
162
|
|
|
162
163
|
handler(e) {
|
|
163
164
|
if (e.target.closest('a,button')) {
|
|
164
|
-
e
|
|
165
|
+
maybeDefautPreventClick(e);
|
|
165
166
|
this.show(data(e.current, this.attrItem));
|
|
166
167
|
}
|
|
167
168
|
},
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
isVisible,
|
|
8
8
|
once,
|
|
9
9
|
removeClass,
|
|
10
|
+
resetProps,
|
|
10
11
|
toNumber,
|
|
11
12
|
Transition,
|
|
12
13
|
} from 'uikit-util';
|
|
@@ -20,7 +21,8 @@ export default function fade(action, target, duration, stagger = 0) {
|
|
|
20
21
|
const propsIn = { opacity: 1 };
|
|
21
22
|
const propsOut = { opacity: 0 };
|
|
22
23
|
|
|
23
|
-
const
|
|
24
|
+
const isCurrentIndex = () => index === transitionIndex(target);
|
|
25
|
+
const wrapIndexFn = (fn) => () => (isCurrentIndex() ? fn() : Promise.reject());
|
|
24
26
|
|
|
25
27
|
const leaveFn = wrapIndexFn(async () => {
|
|
26
28
|
addClass(target, clsLeave);
|
|
@@ -65,7 +67,9 @@ export default function fade(action, target, duration, stagger = 0) {
|
|
|
65
67
|
transitions = nodes.map(async (child, i) => {
|
|
66
68
|
await awaitTimeout(i * stagger);
|
|
67
69
|
await Transition.start(child, propsIn, duration / 2, 'ease');
|
|
68
|
-
|
|
70
|
+
if (isCurrentIndex()) {
|
|
71
|
+
resetProps(child, propsIn);
|
|
72
|
+
}
|
|
69
73
|
});
|
|
70
74
|
|
|
71
75
|
targetDuration += nodes.length * stagger;
|
|
@@ -79,8 +83,8 @@ export default function fade(action, target, duration, stagger = 0) {
|
|
|
79
83
|
await Promise.all(transitions);
|
|
80
84
|
|
|
81
85
|
removeClass(target, clsEnter);
|
|
82
|
-
if (
|
|
83
|
-
|
|
86
|
+
if (isCurrentIndex()) {
|
|
87
|
+
resetProps(target, { height: '', alignContent: '', ...propsIn });
|
|
84
88
|
delete target.dataset.transition;
|
|
85
89
|
}
|
|
86
90
|
});
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
isVisible,
|
|
9
9
|
parent,
|
|
10
10
|
position,
|
|
11
|
+
resetProps,
|
|
11
12
|
Transition,
|
|
12
13
|
trigger,
|
|
13
14
|
} from 'uikit-util';
|
|
@@ -127,12 +128,6 @@ function getTransitionProps(target, nodes, currentProps) {
|
|
|
127
128
|
return [propsTo, propsFrom];
|
|
128
129
|
}
|
|
129
130
|
|
|
130
|
-
function resetProps(el, props) {
|
|
131
|
-
for (const prop in props) {
|
|
132
|
-
css(el, prop, '');
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
131
|
function getPositionWithMargin(el) {
|
|
137
132
|
const { height, width } = dimensions(el);
|
|
138
133
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { clamp, createEvent, css, noop, Transition, trigger } from 'uikit-util';
|
|
1
|
+
import { clamp, createEvent, css, noop, resetProps, Transition, trigger } from 'uikit-util';
|
|
2
2
|
|
|
3
3
|
export default function Transitioner(prev, next, dir, { animation, easing }) {
|
|
4
4
|
const { percent, translate, show = noop } = animation;
|
|
@@ -34,9 +34,7 @@ export default function Transitioner(prev, next, dir, { animation, easing }) {
|
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
reset() {
|
|
37
|
-
|
|
38
|
-
css([next, prev], prop, '');
|
|
39
|
-
}
|
|
37
|
+
resetProps([next, prev], props[0]);
|
|
40
38
|
},
|
|
41
39
|
|
|
42
40
|
async forward(duration, percent = this.percent()) {
|
package/src/js/mixin/modal.js
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
import { preventBackgroundScroll } from '../util/scroll';
|
|
23
23
|
import Class from './class';
|
|
24
24
|
import Container from './container';
|
|
25
|
+
import { maybeDefautPreventClick } from './event';
|
|
25
26
|
import Togglable from './togglable';
|
|
26
27
|
|
|
27
28
|
const active = [];
|
|
@@ -86,7 +87,7 @@ export default {
|
|
|
86
87
|
) {
|
|
87
88
|
this.hide();
|
|
88
89
|
} else if (matches(current, this.selClose)) {
|
|
89
|
-
e
|
|
90
|
+
maybeDefautPreventClick(e);
|
|
90
91
|
this.hide();
|
|
91
92
|
}
|
|
92
93
|
},
|
package/src/js/mixin/parallax.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
noop,
|
|
10
10
|
once,
|
|
11
11
|
propName,
|
|
12
|
+
resetProps,
|
|
12
13
|
toFloat,
|
|
13
14
|
toPx,
|
|
14
15
|
trigger,
|
|
@@ -71,9 +72,7 @@ export default {
|
|
|
71
72
|
|
|
72
73
|
methods: {
|
|
73
74
|
reset() {
|
|
74
|
-
|
|
75
|
-
css(this.$el, prop, '');
|
|
76
|
-
}
|
|
75
|
+
resetProps(this.$el, this.getCss(0));
|
|
77
76
|
},
|
|
78
77
|
|
|
79
78
|
getCss(percent) {
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
} from 'uikit-util';
|
|
17
17
|
import { generateId } from '../api/instance';
|
|
18
18
|
import { keyMap } from '../util/keys';
|
|
19
|
+
import { maybeDefautPreventClick } from './event';
|
|
19
20
|
|
|
20
21
|
export default {
|
|
21
22
|
i18n: {
|
|
@@ -151,7 +152,7 @@ export default {
|
|
|
151
152
|
e.target.closest('a,button') &&
|
|
152
153
|
(e.type === 'click' || e.keyCode === keyMap.SPACE)
|
|
153
154
|
) {
|
|
154
|
-
e
|
|
155
|
+
maybeDefautPreventClick(e);
|
|
155
156
|
this.show(data(e.current, this.attrItem));
|
|
156
157
|
}
|
|
157
158
|
},
|
package/src/js/util/animation.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { addClass, hasClass, removeClass } from './class';
|
|
2
2
|
import { once, trigger } from './event';
|
|
3
3
|
import { toNodes } from './lang';
|
|
4
|
-
import { css, propName } from './style';
|
|
4
|
+
import { css, propName, resetProps } from './style';
|
|
5
5
|
|
|
6
6
|
const clsTransition = 'uk-transition';
|
|
7
7
|
const transitionEnd = 'transitionend';
|
|
@@ -26,23 +26,19 @@ function transition(element, props, duration = 400, timing = 'linear') {
|
|
|
26
26
|
({ type }) => {
|
|
27
27
|
clearTimeout(timer);
|
|
28
28
|
removeClass(element, clsTransition);
|
|
29
|
-
|
|
30
|
-
transitionProperty: '',
|
|
31
|
-
transitionDuration: '',
|
|
32
|
-
transitionTimingFunction: '',
|
|
33
|
-
});
|
|
29
|
+
resetProps(element, transitionProps);
|
|
34
30
|
type === transitionCanceled ? reject() : resolve(element);
|
|
35
31
|
},
|
|
36
32
|
{ self: true },
|
|
37
33
|
);
|
|
38
34
|
|
|
39
35
|
addClass(element, clsTransition);
|
|
40
|
-
|
|
36
|
+
const transitionProps = {
|
|
41
37
|
transitionProperty: Object.keys(props).map(propName).join(','),
|
|
42
38
|
transitionDuration: `${duration}ms`,
|
|
43
39
|
transitionTimingFunction: timing,
|
|
44
|
-
|
|
45
|
-
});
|
|
40
|
+
};
|
|
41
|
+
css(element, { ...transitionProps, ...props });
|
|
46
42
|
}),
|
|
47
43
|
),
|
|
48
44
|
);
|
package/src/js/util/scroll.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, getEventPos, matches, on, once, scrollParents, width } from 'uikit-util';
|
|
1
|
+
import { css, getEventPos, matches, on, once, resetProps, scrollParents, width } from 'uikit-util';
|
|
2
2
|
|
|
3
3
|
let prevented;
|
|
4
4
|
export function preventBackgroundScroll(el) {
|
|
@@ -50,14 +50,15 @@ export function preventBackgroundScroll(el) {
|
|
|
50
50
|
prevented = true;
|
|
51
51
|
|
|
52
52
|
const { scrollingElement } = document;
|
|
53
|
-
|
|
53
|
+
const props = {
|
|
54
54
|
overflowY: CSS.supports('overflow', 'clip') ? 'clip' : 'hidden',
|
|
55
55
|
touchAction: 'none',
|
|
56
56
|
paddingRight: width(window) - scrollingElement.clientWidth || '',
|
|
57
|
-
}
|
|
57
|
+
};
|
|
58
|
+
css(scrollingElement, props);
|
|
58
59
|
return () => {
|
|
59
60
|
prevented = false;
|
|
60
61
|
off();
|
|
61
|
-
|
|
62
|
+
resetProps(scrollingElement, props);
|
|
62
63
|
};
|
|
63
64
|
}
|
package/src/js/util/style.js
CHANGED
|
@@ -63,6 +63,12 @@ export function css(element, property, value, priority) {
|
|
|
63
63
|
return elements[0];
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
export function resetProps(element, props) {
|
|
67
|
+
for (const prop in props) {
|
|
68
|
+
css(element, prop, '');
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
66
72
|
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
|
|
67
73
|
export const propName = memoize((name) => {
|
|
68
74
|
if (startsWith(name, '--')) {
|