uikit 3.25.16-dev.c408e8d → 3.25.17-dev.6dd3b35
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 +15 -1
- package/build/build.js +1 -1
- package/build/less.js +7 -7
- package/build/prefix.js +3 -3
- package/build/release.js +12 -8
- package/build/scss.js +13 -7
- package/build/util.js +17 -19
- package/build/watch.js +21 -0
- package/dist/css/uikit-core-rtl.css +7 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +7 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +7 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +7 -1
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +7 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +11 -2
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +39 -31
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +39 -31
- 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 +7 -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 +7 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +7 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +25 -29
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +11 -3
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +47 -39
- 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 +67 -42
- package/dist/js/uikit.min.js +1 -1
- package/package.json +3 -8
- package/src/js/components/filter.js +12 -4
- package/src/js/components/upload.js +12 -2
- package/src/js/core/drop.js +7 -6
- package/src/js/mixin/class.js +8 -1
- package/src/js/mixin/modal.js +12 -2
- package/src/js/mixin/togglable.js +7 -8
- package/src/js/util/viewport.js +1 -1
- package/src/less/components/slideshow.less +5 -0
- package/src/scss/components/slideshow.scss +5 -0
- package/tests/upload.html +67 -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.25.
|
|
5
|
+
"version": "3.25.17-dev.6dd3b35",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"prefix": "node build/prefix",
|
|
21
21
|
"scope": "node build/scope",
|
|
22
22
|
"release": "node build/release",
|
|
23
|
-
"watch": "
|
|
23
|
+
"watch": "node build/watch.js"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
@@ -31,26 +31,21 @@
|
|
|
31
31
|
"url": "https://github.com/uikit/uikit/issues"
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://getuikit.com",
|
|
34
|
-
"packageManager": "pnpm@10.
|
|
34
|
+
"packageManager": "pnpm@10.33.0",
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@eslint/js": "^10.0.1",
|
|
37
37
|
"@rollup/plugin-alias": "^6.0.0",
|
|
38
38
|
"archiver": "^7.0.1",
|
|
39
39
|
"camelcase": "^9.0.0",
|
|
40
|
-
"chokidar-cli": "^3.0.0",
|
|
41
40
|
"clean-css": "^5.3.3",
|
|
42
|
-
"date-fns": "^4.1.0",
|
|
43
41
|
"esbuild": "^0.28.0",
|
|
44
42
|
"eslint": "^10.0.0",
|
|
45
43
|
"eslint-config-prettier": "^10.1.8",
|
|
46
44
|
"execa": "^9.6.1",
|
|
47
|
-
"fs-extra": "^11.3.2",
|
|
48
45
|
"glob": "^13.0.0",
|
|
49
46
|
"globals": "^17.0.0",
|
|
50
47
|
"inquirer": "^13.1.0",
|
|
51
48
|
"less": "^4.5.1",
|
|
52
|
-
"minimist": "^1.2.8",
|
|
53
|
-
"number-precision": "^1.6.0",
|
|
54
49
|
"p-limit": "^7.2.0",
|
|
55
50
|
"prettier": "^3.7.4",
|
|
56
51
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
@@ -192,11 +192,19 @@ function matchFilter(
|
|
|
192
192
|
{ filter: stateFilter = { '': '' }, sort: [stateSort, stateOrder] },
|
|
193
193
|
) {
|
|
194
194
|
const { filter = '', group = '', sort, order = 'asc' } = getFilter(el, attr);
|
|
195
|
+
const defaultFilterMatches = !group && filter === stateFilter[''];
|
|
196
|
+
const groupFilterMatches = group in stateFilter && filter === stateFilter[group];
|
|
197
|
+
const groupResetMatches = !filter && group && !(group in stateFilter) && !stateFilter[''];
|
|
198
|
+
const filterMatches = defaultFilterMatches || groupFilterMatches || groupResetMatches;
|
|
195
199
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
+
if (isUndefined(sort)) {
|
|
201
|
+
return filterMatches;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const sortMatches = stateSort === sort && stateOrder === order;
|
|
205
|
+
const hasFilter = filter || group;
|
|
206
|
+
|
|
207
|
+
return sortMatches && (!hasFilter || filterMatches);
|
|
200
208
|
}
|
|
201
209
|
|
|
202
210
|
function sortItems(nodes, sort, order) {
|
|
@@ -160,7 +160,9 @@ export default {
|
|
|
160
160
|
this.completeAll(xhr);
|
|
161
161
|
}
|
|
162
162
|
} catch (e) {
|
|
163
|
-
|
|
163
|
+
if (e.name !== 'AbortError') {
|
|
164
|
+
this.error(e);
|
|
165
|
+
}
|
|
164
166
|
}
|
|
165
167
|
};
|
|
166
168
|
|
|
@@ -206,7 +208,10 @@ async function ajax(url, options) {
|
|
|
206
208
|
responseType: '',
|
|
207
209
|
...options,
|
|
208
210
|
};
|
|
209
|
-
await env.beforeSend(env)
|
|
211
|
+
if ((await env.beforeSend(env)) === false) {
|
|
212
|
+
throw abortError(env.xhr);
|
|
213
|
+
}
|
|
214
|
+
|
|
210
215
|
return send(env.url, env);
|
|
211
216
|
}
|
|
212
217
|
|
|
@@ -243,7 +248,12 @@ function send(url, env) {
|
|
|
243
248
|
|
|
244
249
|
on(xhr, 'error', () => reject(assign(Error('Network Error'), { xhr })));
|
|
245
250
|
on(xhr, 'timeout', () => reject(assign(Error('Network Timeout'), { xhr })));
|
|
251
|
+
on(xhr, 'abort', () => reject(abortError(xhr)));
|
|
246
252
|
|
|
247
253
|
xhr.send(env.data);
|
|
248
254
|
});
|
|
249
255
|
}
|
|
256
|
+
|
|
257
|
+
function abortError(xhr) {
|
|
258
|
+
return assign(Error('Network Abort'), { xhr, name: 'AbortError' });
|
|
259
|
+
}
|
package/src/js/core/drop.js
CHANGED
|
@@ -460,13 +460,14 @@ function getViewport(el, target) {
|
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
function createToggleComponent(drop) {
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
463
|
+
const el = query(drop.toggle, drop.$el);
|
|
464
|
+
|
|
465
|
+
if (el) {
|
|
466
|
+
drop.$create('toggle', el, { target: drop.$el, mode: drop.mode });
|
|
467
|
+
el.ariaHasPopup = true;
|
|
468
|
+
}
|
|
468
469
|
|
|
469
|
-
return
|
|
470
|
+
return el;
|
|
470
471
|
}
|
|
471
472
|
|
|
472
473
|
function listenForResize(drop) {
|
package/src/js/mixin/class.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
import { addClass } from 'uikit-util';
|
|
1
|
+
import { addClass, hasClass, removeClass } from 'uikit-util';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
connected() {
|
|
5
|
+
this._cmpCls = hasClass(this.$el, this.$options.id);
|
|
5
6
|
addClass(this.$el, this.$options.id);
|
|
6
7
|
},
|
|
8
|
+
|
|
9
|
+
disconnected() {
|
|
10
|
+
if (!this._cmpCls) {
|
|
11
|
+
removeClass(this.$el, this.$options.id);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
7
14
|
};
|
package/src/js/mixin/modal.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
addClass,
|
|
4
4
|
append,
|
|
5
5
|
css,
|
|
6
|
+
dimensions,
|
|
6
7
|
endsWith,
|
|
7
8
|
includes,
|
|
8
9
|
isFocusable,
|
|
@@ -265,9 +266,18 @@ function toMs(time) {
|
|
|
265
266
|
|
|
266
267
|
function preventBackgroundFocus(modal) {
|
|
267
268
|
return on(document, 'focusin', (e) => {
|
|
268
|
-
if (last(active)
|
|
269
|
-
|
|
269
|
+
if (last(active) !== modal || modal.$el.contains(e.target)) {
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const { left, top, width, height } = dimensions(e.target);
|
|
274
|
+
const topEl = document.elementFromPoint(left + width / 2, top + height / 2);
|
|
275
|
+
|
|
276
|
+
if (topEl && (e.target.contains(topEl) || topEl.contains(e.target))) {
|
|
277
|
+
return;
|
|
270
278
|
}
|
|
279
|
+
|
|
280
|
+
modal.$el.focus();
|
|
271
281
|
});
|
|
272
282
|
}
|
|
273
283
|
|
|
@@ -51,13 +51,15 @@ export default {
|
|
|
51
51
|
|
|
52
52
|
methods: {
|
|
53
53
|
async toggleElement(targets, toggle, animate) {
|
|
54
|
-
|
|
54
|
+
const CANCELLED = {};
|
|
55
|
+
|
|
56
|
+
return (
|
|
55
57
|
await Promise.all(
|
|
56
58
|
toNodes(targets).map((el) => {
|
|
57
59
|
const show = isBoolean(toggle) ? toggle : !this.isToggled(el);
|
|
58
60
|
|
|
59
61
|
if (!trigger(el, `before${show ? 'show' : 'hide'}`, [this])) {
|
|
60
|
-
return
|
|
62
|
+
return CANCELLED;
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
const promise = (
|
|
@@ -90,15 +92,12 @@ export default {
|
|
|
90
92
|
return promise
|
|
91
93
|
? promise.then(done, () => {
|
|
92
94
|
removeClass(el, cls);
|
|
93
|
-
return
|
|
95
|
+
return CANCELLED;
|
|
94
96
|
})
|
|
95
97
|
: done();
|
|
96
98
|
}),
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
} catch {
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
99
|
+
)
|
|
100
|
+
).every((r) => r !== CANCELLED);
|
|
102
101
|
},
|
|
103
102
|
|
|
104
103
|
isToggled(el = this.$el) {
|
package/src/js/util/viewport.js
CHANGED
|
@@ -140,7 +140,7 @@ export function scrollParents(element, scrollable = false, props = []) {
|
|
|
140
140
|
let ancestors = parents(element).reverse();
|
|
141
141
|
ancestors = ancestors.slice(ancestors.indexOf(scrollEl) + 1);
|
|
142
142
|
|
|
143
|
-
const fixedIndex = findIndex(ancestors, (el) =>
|
|
143
|
+
const fixedIndex = findIndex(ancestors, (el) => hasPosition(el, 'fixed'));
|
|
144
144
|
if (~fixedIndex) {
|
|
145
145
|
ancestors = ancestors.slice(fixedIndex);
|
|
146
146
|
}
|
|
@@ -83,6 +83,11 @@
|
|
|
83
83
|
|
|
84
84
|
.uk-slideshow-items > :not(.uk-active) { display: none; }
|
|
85
85
|
|
|
86
|
+
/*
|
|
87
|
+
* Reset animations on hidden slides so the Ken Burns effect restarts in Safari.
|
|
88
|
+
*/
|
|
89
|
+
.uk-slideshow-items > :not(.uk-active) [class*="uk-animation-"] { animation-name: none; }
|
|
90
|
+
|
|
86
91
|
|
|
87
92
|
// Hooks
|
|
88
93
|
// ========================================================================
|
|
@@ -85,6 +85,11 @@
|
|
|
85
85
|
|
|
86
86
|
.uk-slideshow-items > :not(.uk-active) { display: none; }
|
|
87
87
|
|
|
88
|
+
/*
|
|
89
|
+
* Reset animations on hidden slides so the Ken Burns effect restarts in Safari.
|
|
90
|
+
*/
|
|
91
|
+
.uk-slideshow-items > :not(.uk-active) [class*="uk-animation-"] { animation-name: none; }
|
|
92
|
+
|
|
88
93
|
|
|
89
94
|
// Hooks
|
|
90
95
|
// ========================================================================
|
package/tests/upload.html
CHANGED
|
@@ -34,9 +34,21 @@
|
|
|
34
34
|
|
|
35
35
|
<progress id="js-progressbar" class="uk-progress" value="0" max="100" hidden></progress>
|
|
36
36
|
|
|
37
|
+
<h2>Abort After Send</h2>
|
|
38
|
+
|
|
39
|
+
<p>Select one or more files and check the console. The request aborts from <code>loadStart</code>, so <code>abort</code> should fire while <code>error</code> and <code>completeAll</code> should not.</p>
|
|
40
|
+
|
|
41
|
+
<div class="js-upload-abort" uk-form-custom>
|
|
42
|
+
<input type="file" multiple>
|
|
43
|
+
<button class="uk-button uk-button-danger" type="button" tabindex="-1">Select and abort</button>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<progress id="js-abort-progressbar" class="uk-progress" value="0" max="100" hidden></progress>
|
|
47
|
+
|
|
37
48
|
<script>
|
|
38
49
|
|
|
39
50
|
const bar = UIkit.util.$('#js-progressbar');
|
|
51
|
+
const abortBar = UIkit.util.$('#js-abort-progressbar');
|
|
40
52
|
|
|
41
53
|
UIkit.upload('.js-upload', {
|
|
42
54
|
|
|
@@ -96,6 +108,61 @@
|
|
|
96
108
|
|
|
97
109
|
});
|
|
98
110
|
|
|
111
|
+
UIkit.upload('.js-upload-abort', {
|
|
112
|
+
|
|
113
|
+
url: '',
|
|
114
|
+
multiple: true,
|
|
115
|
+
|
|
116
|
+
beforeSend() {
|
|
117
|
+
console.log('abort test beforeSend', arguments);
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
loadStart(e) {
|
|
121
|
+
console.log('abort test loadStart', arguments);
|
|
122
|
+
|
|
123
|
+
abortBar.hidden = false;
|
|
124
|
+
abortBar.max = e.total;
|
|
125
|
+
abortBar.value = e.loaded;
|
|
126
|
+
|
|
127
|
+
e.target.abort();
|
|
128
|
+
},
|
|
129
|
+
|
|
130
|
+
progress(e) {
|
|
131
|
+
console.log('abort test progress', arguments);
|
|
132
|
+
|
|
133
|
+
abortBar.max = e.total;
|
|
134
|
+
abortBar.value = e.loaded;
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
loadEnd(e) {
|
|
138
|
+
console.log('abort test loadEnd', arguments);
|
|
139
|
+
|
|
140
|
+
abortBar.max = e.total;
|
|
141
|
+
abortBar.value = e.loaded;
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
abort() {
|
|
145
|
+
console.log('abort test abort', arguments);
|
|
146
|
+
|
|
147
|
+
setTimeout(() => {
|
|
148
|
+
abortBar.hidden = true;
|
|
149
|
+
}, 300);
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
error() {
|
|
153
|
+
console.error('abort test error', arguments);
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
complete() {
|
|
157
|
+
console.error('abort test complete', arguments);
|
|
158
|
+
},
|
|
159
|
+
|
|
160
|
+
completeAll() {
|
|
161
|
+
console.error('abort test completeAll', arguments);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
});
|
|
165
|
+
|
|
99
166
|
</script>
|
|
100
167
|
|
|
101
168
|
<h2>JavaScript Options</h2>
|