uikit 3.20.7 → 3.20.8-dev.a340cc6f4
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 +7 -0
- package/build/publishDev.js +0 -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 +5 -2
- 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 +9 -6
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +9 -6
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +9 -6
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +9 -6
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +9 -6
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +28 -18
- 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 +3 -3
- 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 +30 -20
- package/dist/js/uikit.min.js +1 -1
- package/package.json +63 -64
- package/src/js/components/sortable.js +25 -19
- package/src/js/mixin/internal/animate-slide.js +9 -1
- package/src/js/util/filter.js +5 -5
package/package.json
CHANGED
|
@@ -1,65 +1,64 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
2
|
+
"name": "uikit",
|
|
3
|
+
"title": "UIkit",
|
|
4
|
+
"description": "UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.",
|
|
5
|
+
"version": "3.20.8-dev.a340cc6f4",
|
|
6
|
+
"main": "dist/js/uikit.js",
|
|
7
|
+
"style": "dist/css/uikit.css",
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"*.css",
|
|
10
|
+
"./src/js/*.js",
|
|
11
|
+
"./dist/**/*.js"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/uikit/uikit.git"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/uikit/uikit/issues"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://getuikit.com",
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@eslint/js": "^9.1.1",
|
|
24
|
+
"@rollup/plugin-alias": "^5.1.0",
|
|
25
|
+
"@rollup/plugin-replace": "^5.0.5",
|
|
26
|
+
"archiver": "^7.0.1",
|
|
27
|
+
"camelcase": "^8.0.0",
|
|
28
|
+
"chokidar-cli": "^3.0.0",
|
|
29
|
+
"clean-css": "^5.3.3",
|
|
30
|
+
"dateformat": "^5.0.3",
|
|
31
|
+
"esbuild": "^0.20.2",
|
|
32
|
+
"eslint": "^9.1.1",
|
|
33
|
+
"eslint-config-prettier": "^9.1.0",
|
|
34
|
+
"execa": "^8.0.1",
|
|
35
|
+
"fs-extra": "^11.2.0",
|
|
36
|
+
"glob": "^10.3.12",
|
|
37
|
+
"globals": "^15.0.0",
|
|
38
|
+
"inquirer": "^9.2.19",
|
|
39
|
+
"less": "^4.2.0",
|
|
40
|
+
"minimist": "^1.2.8",
|
|
41
|
+
"number-precision": "^1.6.0",
|
|
42
|
+
"p-limit": "^5.0.0",
|
|
43
|
+
"prettier": "^3.2.5",
|
|
44
|
+
"prettier-plugin-organize-imports": "^3.2.4",
|
|
45
|
+
"rollup": "^4.16.4",
|
|
46
|
+
"rollup-plugin-esbuild": "^6.1.1",
|
|
47
|
+
"rollup-plugin-modify": "^3.0.0",
|
|
48
|
+
"rtlcss": "^4.1.1",
|
|
49
|
+
"semver": "^7.6.0",
|
|
50
|
+
"svgo": "^3.2.0"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build-scss": "node build/scss",
|
|
54
|
+
"compile": "pnpm compile-less && pnpm compile-js",
|
|
55
|
+
"compile-js": "node build/build",
|
|
56
|
+
"compile-less": "pnpm icons && node build/less",
|
|
57
|
+
"compile-rtl": "pnpm compile-less rtl",
|
|
58
|
+
"icons": "node build/icons",
|
|
59
|
+
"prefix": "node build/prefix",
|
|
60
|
+
"scope": "node build/scope",
|
|
61
|
+
"release": "node build/release",
|
|
62
|
+
"watch": "chokidar \"**/*.less\" --initial -i \"node_modules\" -c \"node build/less\""
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -65,16 +65,6 @@ 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
|
-
|
|
78
68
|
events: {
|
|
79
69
|
name: pointerDown,
|
|
80
70
|
passive: false,
|
|
@@ -194,6 +184,7 @@ export default {
|
|
|
194
184
|
|
|
195
185
|
e.preventDefault();
|
|
196
186
|
|
|
187
|
+
this.pos = getEventPos(e);
|
|
197
188
|
this.touched = new Set([this]);
|
|
198
189
|
this.placeholder = placeholder;
|
|
199
190
|
this.origin = { target, index: index(placeholder), ...this.pos };
|
|
@@ -223,7 +214,9 @@ export default {
|
|
|
223
214
|
this.move(e);
|
|
224
215
|
},
|
|
225
216
|
|
|
226
|
-
move(e) {
|
|
217
|
+
move: throttle(function (e) {
|
|
218
|
+
assign(this.pos, getEventPos(e));
|
|
219
|
+
|
|
227
220
|
if (this.drag) {
|
|
228
221
|
this.$emit('move');
|
|
229
222
|
} else if (
|
|
@@ -232,7 +225,7 @@ export default {
|
|
|
232
225
|
) {
|
|
233
226
|
this.start(e);
|
|
234
227
|
}
|
|
235
|
-
},
|
|
228
|
+
}),
|
|
236
229
|
|
|
237
230
|
end() {
|
|
238
231
|
off(document, pointerMove, this.move);
|
|
@@ -272,17 +265,17 @@ export default {
|
|
|
272
265
|
insert(element, target) {
|
|
273
266
|
addClass(this.items, this.clsItem);
|
|
274
267
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
this.
|
|
268
|
+
if (target && target.previousElementSibling !== element) {
|
|
269
|
+
this.animate(() => before(target, element));
|
|
270
|
+
} else if (!target && this.target.lastElementChild !== element) {
|
|
271
|
+
this.animate(() => append(this.target, element));
|
|
272
|
+
}
|
|
278
273
|
},
|
|
279
274
|
|
|
280
275
|
remove(element) {
|
|
281
|
-
if (
|
|
282
|
-
|
|
276
|
+
if (this.target.contains(element)) {
|
|
277
|
+
this.animate(() => remove(element));
|
|
283
278
|
}
|
|
284
|
-
|
|
285
|
-
this.animate(() => remove(element));
|
|
286
279
|
},
|
|
287
280
|
|
|
288
281
|
getSortable(element) {
|
|
@@ -438,3 +431,16 @@ function isHorizontal(list, placeholder) {
|
|
|
438
431
|
function linesIntersect(lineA, lineB) {
|
|
439
432
|
return lineA[1] > lineB[0] && lineB[1] > lineA[0];
|
|
440
433
|
}
|
|
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,8 +21,13 @@ 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
|
+
|
|
24
26
|
// Cancel previous animations
|
|
25
|
-
await Promise.all(
|
|
27
|
+
await Promise.all(targets.map(Transition.cancel));
|
|
28
|
+
|
|
29
|
+
// Force transition to be canceled in Safari
|
|
30
|
+
css(targets, 'transitionProperty', 'none');
|
|
26
31
|
|
|
27
32
|
// Adding, sorting, removing nodes
|
|
28
33
|
await action();
|
|
@@ -33,6 +38,9 @@ export default async function (action, target, duration) {
|
|
|
33
38
|
// Wait for update to propagate
|
|
34
39
|
await Promise.resolve();
|
|
35
40
|
|
|
41
|
+
// Possibly reset the forced transition property
|
|
42
|
+
css(targets, 'transitionProperty', '');
|
|
43
|
+
|
|
36
44
|
// Get new state
|
|
37
45
|
const targetStyle = attr(target, 'style');
|
|
38
46
|
const targetPropsTo = css(target, ['height', 'padding']);
|
package/src/js/util/filter.js
CHANGED
|
@@ -22,11 +22,11 @@ export function isVoidElement(element) {
|
|
|
22
22
|
return toNodes(element).some((element) => voidElements[element.tagName.toLowerCase()]);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const isVisibleFn =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
const isVisibleFn =
|
|
26
|
+
(inBrowser && Element.prototype.checkVisibility) ||
|
|
27
|
+
function () {
|
|
28
|
+
return this.offsetWidth || this.offsetHeight || this.getClientRects().length;
|
|
29
|
+
};
|
|
30
30
|
export function isVisible(element) {
|
|
31
31
|
return toNodes(element).some((element) => isVisibleFn.call(element));
|
|
32
32
|
}
|