uikit 3.25.28 → 3.25.29-dev.3bc1304
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 +10 -0
- package/build/ci-release.js +1 -4
- 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 +11 -10
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +13 -12
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +13 -12
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +5 -2
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +10 -9
- 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 +11 -10
- 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 +11 -10
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +10 -9
- 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 +2 -5
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +39 -43
- 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 +40 -47
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +1 -1
- package/src/js/api/computed.js +1 -1
- package/src/js/api/log.js +1 -1
- package/src/js/api/observables.js +5 -4
- package/src/js/api/observer.js +3 -4
- package/src/js/api/update.js +10 -9
- package/src/js/components/upload.js +1 -1
- package/src/js/core/alert.js +6 -3
- package/src/js/core/drop.js +4 -4
- package/src/js/core/form-custom.js +3 -8
- package/src/js/core/icon.js +3 -11
- package/src/js/core/toggle.js +0 -2
- package/src/js/mixin/event.js +4 -1
- package/src/js/mixin/modal.js +1 -1
- package/tests/alert.html +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.25.
|
|
5
|
+
"version": "3.25.29-dev.3bc1304",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/api/component.js
CHANGED
package/src/js/api/computed.js
CHANGED
package/src/js/api/log.js
CHANGED
|
@@ -83,13 +83,14 @@ export function swipe(options) {
|
|
|
83
83
|
const pos = getEventPos(e);
|
|
84
84
|
const target = 'tagName' in e.target ? e.target : parent(e.target);
|
|
85
85
|
once(document, `${pointerUp} ${pointerCancel} scroll`, (e) => {
|
|
86
|
+
if (e.type !== pointerUp || !target) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
86
90
|
const { x, y } = getEventPos(e);
|
|
87
91
|
|
|
88
92
|
// swipe
|
|
89
|
-
if (
|
|
90
|
-
(e.type !== 'scroll' && target && x && Math.abs(pos.x - x) > 100) ||
|
|
91
|
-
(y && Math.abs(pos.y - y) > 100)
|
|
92
|
-
) {
|
|
93
|
+
if ((x && Math.abs(pos.x - x) > 100) || (y && Math.abs(pos.y - y) > 100)) {
|
|
93
94
|
setTimeout(() => {
|
|
94
95
|
trigger(target, 'swipe');
|
|
95
96
|
trigger(target, `swipe${swipeDirection(pos.x, pos.y, x, y)}`);
|
package/src/js/api/observer.js
CHANGED
|
@@ -3,19 +3,18 @@ import { registerComputed } from './computed';
|
|
|
3
3
|
import { registerWatch } from './watch';
|
|
4
4
|
|
|
5
5
|
export function initObservers(instance) {
|
|
6
|
-
for (const observer of instance.$options.observe || []) {
|
|
7
|
-
registerObservable(instance, observer);
|
|
6
|
+
for (const [index, observer] of (instance.$options.observe || []).entries()) {
|
|
7
|
+
registerObservable(instance, observer, `_observe${index}`);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
function registerObservable(instance, observable) {
|
|
11
|
+
function registerObservable(instance, observable, key) {
|
|
12
12
|
let { observe, target = instance.$el, handler, options, filter, args } = observable;
|
|
13
13
|
|
|
14
14
|
if (filter && !filter.call(instance, instance)) {
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const key = `_observe${instance._disconnect.length}`;
|
|
19
18
|
if (isFunction(target) && !hasOwn(instance, key)) {
|
|
20
19
|
registerComputed(instance, key, () => {
|
|
21
20
|
const targets = target.call(instance, instance);
|
package/src/js/api/update.js
CHANGED
|
@@ -20,24 +20,25 @@ export function callUpdate(instance, e = 'update') {
|
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
if (!instance._updateCount) {
|
|
24
|
-
instance._updateCount = 0;
|
|
25
|
-
requestAnimationFrame(() => (instance._updateCount = 0));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
23
|
if (!instance._queued) {
|
|
29
24
|
instance._queued = new Set();
|
|
30
25
|
fastdom.read(() => {
|
|
31
26
|
if (instance._connected) {
|
|
32
|
-
|
|
27
|
+
if (!instance._updateCount) {
|
|
28
|
+
instance._updateCount = 0;
|
|
29
|
+
requestAnimationFrame(() => (instance._updateCount = 0));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (instance._updateCount < 10) {
|
|
33
|
+
instance._updateCount++;
|
|
34
|
+
runUpdates(instance, instance._queued);
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
instance._queued = null;
|
|
35
38
|
});
|
|
36
39
|
}
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
instance._queued.add(e.type || e);
|
|
40
|
-
}
|
|
41
|
+
instance._queued.add(e.type || e);
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
function runUpdates(instance, types) {
|
|
@@ -171,7 +171,7 @@ export default {
|
|
|
171
171
|
function match(pattern, path) {
|
|
172
172
|
const expression = pattern.replace(
|
|
173
173
|
/\*\*|[.*+?^${}()|[\]\\]/g,
|
|
174
|
-
(s) => ({ '**': '.*', '*': '[^/]+', '?': '[^/]', '|': '|' })[s]
|
|
174
|
+
(s) => ({ '**': '.*', '*': '[^/]+', '?': '[^/]', '|': '|' })[s] || `\\${s}`,
|
|
175
175
|
);
|
|
176
176
|
|
|
177
177
|
return new RegExp(`^(?:${expression})$`, 'i').test(path);
|
package/src/js/core/alert.js
CHANGED
|
@@ -9,12 +9,11 @@ export default {
|
|
|
9
9
|
args: 'animation',
|
|
10
10
|
|
|
11
11
|
props: {
|
|
12
|
-
animation: Boolean,
|
|
13
12
|
close: String,
|
|
14
13
|
},
|
|
15
14
|
|
|
16
15
|
data: {
|
|
17
|
-
animation: true,
|
|
16
|
+
animation: [true],
|
|
18
17
|
selClose: '.uk-alert-close',
|
|
19
18
|
duration: 150,
|
|
20
19
|
},
|
|
@@ -32,7 +31,11 @@ export default {
|
|
|
32
31
|
|
|
33
32
|
methods: {
|
|
34
33
|
async close() {
|
|
35
|
-
await this.toggleElement(
|
|
34
|
+
await this.toggleElement(
|
|
35
|
+
this.$el,
|
|
36
|
+
false,
|
|
37
|
+
this.animation[0] === true || this.animation[0] === 1 ? animate : true,
|
|
38
|
+
);
|
|
36
39
|
this.$destroy(true);
|
|
37
40
|
},
|
|
38
41
|
},
|
package/src/js/core/drop.js
CHANGED
|
@@ -114,11 +114,11 @@ export default {
|
|
|
114
114
|
this._style = pick(this.$el.style, ['width', 'height']);
|
|
115
115
|
},
|
|
116
116
|
|
|
117
|
+
beforeDisconnect() {
|
|
118
|
+
this.hide(false, false);
|
|
119
|
+
},
|
|
120
|
+
|
|
117
121
|
disconnected() {
|
|
118
|
-
if (this.isActive()) {
|
|
119
|
-
this.hide(false);
|
|
120
|
-
active = null;
|
|
121
|
-
}
|
|
122
122
|
css(this.$el, this._style);
|
|
123
123
|
},
|
|
124
124
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $,
|
|
1
|
+
import { $, isInput, parent, selInput } from 'uikit-util';
|
|
2
2
|
import Class from '../mixin/class';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
@@ -37,15 +37,10 @@ export default {
|
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
let option;
|
|
41
40
|
const prop = isInput(target) ? 'value' : 'textContent';
|
|
42
41
|
const prev = target[prop];
|
|
43
|
-
const value =
|
|
44
|
-
|
|
45
|
-
: matches(input, 'select') &&
|
|
46
|
-
(option = $$('option', input).find((el) => el.selected))
|
|
47
|
-
? option.textContent
|
|
48
|
-
: input.value;
|
|
42
|
+
const value =
|
|
43
|
+
input.files?.[0]?.name ?? input.selectedOptions?.[0]?.label ?? input.value;
|
|
49
44
|
|
|
50
45
|
if (prev !== value) {
|
|
51
46
|
target[prop] = value;
|
package/src/js/core/icon.js
CHANGED
|
@@ -140,17 +140,9 @@ export const Search = {
|
|
|
140
140
|
? 'search-medium'
|
|
141
141
|
: this.$props.icon;
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
if (isToggle) {
|
|
148
|
-
this.$el.ariaLabel = this.t('toggle');
|
|
149
|
-
} else {
|
|
150
|
-
const button = this.$el.closest('a,button');
|
|
151
|
-
if (button) {
|
|
152
|
-
button.ariaLabel = this.t('submit');
|
|
153
|
-
}
|
|
143
|
+
const target = isToggle ? this.$el : this.$el.closest('a,button');
|
|
144
|
+
if (target && !hasAttr(target, 'aria-label')) {
|
|
145
|
+
target.ariaLabel = this.t(isToggle ? 'toggle' : 'submit');
|
|
154
146
|
}
|
|
155
147
|
},
|
|
156
148
|
};
|
package/src/js/core/toggle.js
CHANGED
package/src/js/mixin/event.js
CHANGED
|
@@ -3,7 +3,10 @@ import { on, once } from '../util/event';
|
|
|
3
3
|
import { keyMap } from '../util/keys';
|
|
4
4
|
|
|
5
5
|
export function maybeDefaultPreventClick(e) {
|
|
6
|
-
if (
|
|
6
|
+
if (
|
|
7
|
+
(e.type === 'keydown' && e.keyCode === keyMap.SPACE) ||
|
|
8
|
+
e.target.closest('a[href="#"],a[href=""]')
|
|
9
|
+
) {
|
|
7
10
|
e.preventDefault();
|
|
8
11
|
}
|
|
9
12
|
}
|
package/src/js/mixin/modal.js
CHANGED
|
@@ -239,7 +239,7 @@ function animate(el, show, { transitionElement, _toggle }) {
|
|
|
239
239
|
_toggle(el, show);
|
|
240
240
|
|
|
241
241
|
Promise.all(
|
|
242
|
-
(transitionElement?.getAnimations?.()
|
|
242
|
+
(transitionElement?.getAnimations?.() || []).map(({ finished }) => finished),
|
|
243
243
|
).then(resolve, reject);
|
|
244
244
|
}),
|
|
245
245
|
).then(() => {
|
package/tests/alert.html
CHANGED
|
@@ -98,9 +98,9 @@
|
|
|
98
98
|
<tbody>
|
|
99
99
|
<tr>
|
|
100
100
|
<td><code>animation</code></td>
|
|
101
|
-
<td>Boolean</td>
|
|
101
|
+
<td>Boolean, String</td>
|
|
102
102
|
<td>true</td>
|
|
103
|
-
<td>On close fade out.</td>
|
|
103
|
+
<td>On close fade out. Set to false to disable animation or specify an animation class.</td>
|
|
104
104
|
</tr>
|
|
105
105
|
<tr>
|
|
106
106
|
<td><code>duration</code></td>
|