uikit 3.25.5-dev.7295faa9 → 3.25.5-dev.c2e0a67
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/.prettierignore +0 -1
- package/CHANGELOG.md +5 -0
- package/README.md +0 -1
- package/build/publishDev.js +2 -3
- package/build/release.js +1 -3
- 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 +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +19 -10
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +19 -10
- 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 +19 -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 +19 -10
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +5 -6
- 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 +7 -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 +29 -17
- package/dist/js/uikit.min.js +1 -1
- package/package.json +64 -63
- package/src/js/components/sortable.js +5 -6
- package/src/js/core/drop.js +8 -1
- package/src/js/mixin/slider-drag.js +21 -11
- package/tests/upload.html +2 -2
package/package.json
CHANGED
|
@@ -1,64 +1,65 @@
|
|
|
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
|
-
}
|
|
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.25.5-dev.c2e0a67",
|
|
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
|
+
"scripts": {
|
|
14
|
+
"build-scss": "node build/scss",
|
|
15
|
+
"compile": "pnpm compile-less && pnpm compile-js",
|
|
16
|
+
"compile-js": "node build/build",
|
|
17
|
+
"compile-less": "pnpm icons && node build/less",
|
|
18
|
+
"compile-rtl": "pnpm compile-less rtl",
|
|
19
|
+
"icons": "node build/icons",
|
|
20
|
+
"prefix": "node build/prefix",
|
|
21
|
+
"scope": "node build/scope",
|
|
22
|
+
"release": "node build/release",
|
|
23
|
+
"watch": "chokidar \"**/*.less\" --initial -i \"node_modules\" -c \"node build/less\""
|
|
24
|
+
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/uikit/uikit.git"
|
|
28
|
+
},
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/uikit/uikit/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://getuikit.com",
|
|
34
|
+
"packageManager": "pnpm@10.27.0",
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@eslint/js": "^9.39.2",
|
|
37
|
+
"@rollup/plugin-alias": "^6.0.0",
|
|
38
|
+
"@rollup/plugin-replace": "^6.0.3",
|
|
39
|
+
"archiver": "^7.0.1",
|
|
40
|
+
"camelcase": "^9.0.0",
|
|
41
|
+
"chokidar-cli": "^3.0.0",
|
|
42
|
+
"clean-css": "^5.3.3",
|
|
43
|
+
"date-fns": "^4.1.0",
|
|
44
|
+
"esbuild": "^0.27.2",
|
|
45
|
+
"eslint": "^9.39.2",
|
|
46
|
+
"eslint-config-prettier": "^10.1.8",
|
|
47
|
+
"execa": "^9.6.1",
|
|
48
|
+
"fs-extra": "^11.3.2",
|
|
49
|
+
"glob": "^13.0.0",
|
|
50
|
+
"globals": "^17.0.0",
|
|
51
|
+
"inquirer": "^13.1.0",
|
|
52
|
+
"less": "^4.5.1",
|
|
53
|
+
"minimist": "^1.2.8",
|
|
54
|
+
"number-precision": "^1.6.0",
|
|
55
|
+
"p-limit": "^7.2.0",
|
|
56
|
+
"prettier": "^3.7.4",
|
|
57
|
+
"prettier-plugin-organize-imports": "^4.3.0",
|
|
58
|
+
"rollup": "^4.53.5",
|
|
59
|
+
"rollup-plugin-esbuild": "^6.2.1",
|
|
60
|
+
"rtlcss": "^4.3.0",
|
|
61
|
+
"semver": "^7.7.3",
|
|
62
|
+
"strip-css-comments": "^5.0.0",
|
|
63
|
+
"svgo": "^4.0.0"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -142,8 +142,7 @@ export default {
|
|
|
142
142
|
sortable.target,
|
|
143
143
|
target,
|
|
144
144
|
placeholder,
|
|
145
|
-
x,
|
|
146
|
-
y,
|
|
145
|
+
{ x, y },
|
|
147
146
|
sortable === previous && data.moved !== target,
|
|
148
147
|
);
|
|
149
148
|
|
|
@@ -365,7 +364,7 @@ function findTarget(items, point) {
|
|
|
365
364
|
return items[findIndex(items, (item) => pointInRect(point, dimensions(item)))];
|
|
366
365
|
}
|
|
367
366
|
|
|
368
|
-
function findInsertTarget(list, target, placeholder,
|
|
367
|
+
function findInsertTarget(list, target, placeholder, point, sameList) {
|
|
369
368
|
if (!children(list).length) {
|
|
370
369
|
return;
|
|
371
370
|
}
|
|
@@ -373,7 +372,7 @@ function findInsertTarget(list, target, placeholder, x, y, sameList) {
|
|
|
373
372
|
const rect = dimensions(target);
|
|
374
373
|
if (!sameList) {
|
|
375
374
|
if (!isHorizontal(list, placeholder)) {
|
|
376
|
-
return y < rect.top + rect.height / 2 ? target : target.nextElementSibling;
|
|
375
|
+
return point.y < rect.top + rect.height / 2 ? target : target.nextElementSibling;
|
|
377
376
|
}
|
|
378
377
|
|
|
379
378
|
return target;
|
|
@@ -386,8 +385,8 @@ function findInsertTarget(list, target, placeholder, x, y, sameList) {
|
|
|
386
385
|
);
|
|
387
386
|
|
|
388
387
|
const [pointerPos, lengthProp, startProp, endProp] = sameRow
|
|
389
|
-
? [x, 'width', 'left', 'right']
|
|
390
|
-
: [y, 'height', 'top', 'bottom'];
|
|
388
|
+
? [point.x, 'width', 'left', 'right']
|
|
389
|
+
: [point.y, 'height', 'top', 'bottom'];
|
|
391
390
|
|
|
392
391
|
const diff =
|
|
393
392
|
placeholderRect[lengthProp] < rect[lengthProp]
|
package/src/js/core/drop.js
CHANGED
|
@@ -338,6 +338,9 @@ export default {
|
|
|
338
338
|
append(this.container, this.$el);
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
+
// Mark enter early so isToggled() detects show when using delayShow
|
|
342
|
+
addClass(this.$el, this.clsEnter);
|
|
343
|
+
|
|
341
344
|
this.showTimer = setTimeout(
|
|
342
345
|
() => this.toggleElement(this.$el, true),
|
|
343
346
|
(delay && this.delayShow) || 0,
|
|
@@ -345,7 +348,11 @@ export default {
|
|
|
345
348
|
},
|
|
346
349
|
|
|
347
350
|
hide(delay = true, animate = true) {
|
|
348
|
-
const hide = () =>
|
|
351
|
+
const hide = () => {
|
|
352
|
+
// Ensure enter class is removed if show is canceled early
|
|
353
|
+
removeClass(this.$el, this.clsEnter);
|
|
354
|
+
this.toggleElement(this.$el, false, this.animateOut && animate);
|
|
355
|
+
};
|
|
349
356
|
|
|
350
357
|
this.clearTimers();
|
|
351
358
|
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
css,
|
|
3
3
|
getEventPos,
|
|
4
4
|
includes,
|
|
5
|
+
isEqual,
|
|
5
6
|
isRtl,
|
|
6
7
|
isTouch,
|
|
7
8
|
noop,
|
|
@@ -25,15 +26,21 @@ export default {
|
|
|
25
26
|
data: {
|
|
26
27
|
draggable: true,
|
|
27
28
|
threshold: 10,
|
|
29
|
+
angleThreshold: 45,
|
|
28
30
|
},
|
|
29
31
|
|
|
30
32
|
created() {
|
|
31
33
|
for (const key of ['start', 'move', 'end']) {
|
|
32
34
|
const fn = this[key];
|
|
33
35
|
this[key] = (e) => {
|
|
34
|
-
const pos = getEventPos(e)
|
|
36
|
+
const pos = getEventPos(e);
|
|
35
37
|
|
|
36
|
-
|
|
38
|
+
if (isRtl) {
|
|
39
|
+
pos.x = -pos.x;
|
|
40
|
+
pos.y = -pos.y;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
this.prevPos = isEqual(pos, this.pos) ? this.prevPos : this.pos;
|
|
37
44
|
this.pos = pos;
|
|
38
45
|
|
|
39
46
|
fn(e);
|
|
@@ -88,7 +95,7 @@ export default {
|
|
|
88
95
|
|
|
89
96
|
if (this._transitioner) {
|
|
90
97
|
this.percent = this._transitioner.percent();
|
|
91
|
-
this.drag += this._transitioner.getDistance() * this.percent * this.dir;
|
|
98
|
+
this.drag.x += this._transitioner.getDistance() * this.percent * this.dir;
|
|
92
99
|
|
|
93
100
|
this._transitioner.cancel();
|
|
94
101
|
this._transitioner.translate(this.percent);
|
|
@@ -109,11 +116,11 @@ export default {
|
|
|
109
116
|
},
|
|
110
117
|
|
|
111
118
|
move(e) {
|
|
112
|
-
const distance = this.pos - this.drag;
|
|
113
|
-
|
|
119
|
+
const distance = this.pos.x - this.drag.x;
|
|
114
120
|
if (
|
|
115
121
|
distance === 0 ||
|
|
116
|
-
this.
|
|
122
|
+
(!this.dragging && getAngle(this.pos, this.drag) > this.angleThreshold) ||
|
|
123
|
+
this.prevPos.x === this.pos.x ||
|
|
117
124
|
(!this.dragging && Math.abs(distance) < this.threshold)
|
|
118
125
|
) {
|
|
119
126
|
return;
|
|
@@ -130,7 +137,7 @@ export default {
|
|
|
130
137
|
let width = getDistance.call(this, prevIndex, nextIndex);
|
|
131
138
|
|
|
132
139
|
while (nextIndex !== prevIndex && dis > width) {
|
|
133
|
-
this.drag -= width * this.dir;
|
|
140
|
+
this.drag.x -= width * this.dir;
|
|
134
141
|
|
|
135
142
|
prevIndex = nextIndex;
|
|
136
143
|
dis -= width;
|
|
@@ -192,15 +199,14 @@ export default {
|
|
|
192
199
|
this._show(false, this.index, true);
|
|
193
200
|
this._transitioner = null;
|
|
194
201
|
} else {
|
|
195
|
-
const dirChange =
|
|
196
|
-
(isRtl ? this.dir * (isRtl ? 1 : -1) : this.dir) < 0 ===
|
|
197
|
-
this.prevPos > this.pos;
|
|
198
|
-
this.index = dirChange ? this.index : this.prevIndex;
|
|
202
|
+
const dirChange = this.dir < 0 === this.prevPos.x > this.pos.x;
|
|
199
203
|
|
|
200
204
|
if (dirChange) {
|
|
201
205
|
trigger(this.slides[this.prevIndex], 'itemhidden', [this]);
|
|
202
206
|
trigger(this.slides[this.index], 'itemshown', [this]);
|
|
203
207
|
this.percent = 1 - this.percent;
|
|
208
|
+
} else {
|
|
209
|
+
this.index = this.prevIndex;
|
|
204
210
|
}
|
|
205
211
|
|
|
206
212
|
this.show(
|
|
@@ -232,3 +238,7 @@ function hasSelectableText(el) {
|
|
|
232
238
|
toArray(el.childNodes).some((el) => el.nodeType === 3 && el.textContent.trim())
|
|
233
239
|
);
|
|
234
240
|
}
|
|
241
|
+
|
|
242
|
+
function getAngle(pos1, pos2) {
|
|
243
|
+
return (Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180) / Math.PI;
|
|
244
|
+
}
|
package/tests/upload.html
CHANGED
|
@@ -145,13 +145,13 @@
|
|
|
145
145
|
<td><code>allow</code></td>
|
|
146
146
|
<td>String</td>
|
|
147
147
|
<td>false</td>
|
|
148
|
-
<td>File name filter
|
|
148
|
+
<td>File name filter (eg. *.png). Separate multiple values with a pipe (*.png|*.gif).</td>
|
|
149
149
|
</tr>
|
|
150
150
|
<tr>
|
|
151
151
|
<td><code>mime</code></td>
|
|
152
152
|
<td>String</td>
|
|
153
153
|
<td>false</td>
|
|
154
|
-
<td>File MIME type filter
|
|
154
|
+
<td>File MIME type filter (eg. image/*). Separate multiple values with a pipe (image/*|video/*).</td>
|
|
155
155
|
</tr>
|
|
156
156
|
<tr>
|
|
157
157
|
<td><code>maxSize</code></td>
|