uikit 3.25.3 → 3.25.5-dev.7295faa9
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 +12 -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 +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +2 -4
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +2 -4
- 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 +2 -4
- 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 +2 -4
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- 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 +55 -10
- 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 +56 -13
- package/dist/js/uikit.min.js +1 -1
- package/package.json +2 -2
- package/src/js/core/accordion.js +7 -1
- package/src/js/core/overflow-fade.js +83 -8
- package/src/js/mixin/slider-drag.js +1 -3
- package/src/less/components/nav.less +0 -1
- package/src/scss/components/nav.scss +0 -1
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.5-dev.7295faa9",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"execa": "^9.6.1",
|
|
35
35
|
"fs-extra": "^11.3.2",
|
|
36
36
|
"glob": "^13.0.0",
|
|
37
|
-
"globals": "^
|
|
37
|
+
"globals": "^17.0.0",
|
|
38
38
|
"inquirer": "^13.1.0",
|
|
39
39
|
"less": "^4.5.1",
|
|
40
40
|
"minimist": "^1.2.8",
|
package/src/js/core/accordion.js
CHANGED
|
@@ -109,10 +109,16 @@ export default {
|
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
const item = index(this.toggles, e.current);
|
|
113
|
+
|
|
114
|
+
if (item === -1) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
112
118
|
maybeDefaultPreventClick(e);
|
|
113
119
|
|
|
114
120
|
const off = keepScrollPosition(e.target);
|
|
115
|
-
this.toggle(
|
|
121
|
+
this.toggle(item).finally(off);
|
|
116
122
|
},
|
|
117
123
|
},
|
|
118
124
|
{
|
|
@@ -1,22 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
children,
|
|
3
|
+
clamp,
|
|
4
|
+
css,
|
|
5
|
+
getEventPos,
|
|
6
|
+
hasClass,
|
|
7
|
+
isInput,
|
|
8
|
+
isTouch,
|
|
9
|
+
on,
|
|
10
|
+
pointerCancel,
|
|
11
|
+
pointerDown,
|
|
12
|
+
pointerMove,
|
|
13
|
+
pointerUp,
|
|
14
|
+
selInput,
|
|
15
|
+
toggleClass,
|
|
16
|
+
} from 'uikit-util';
|
|
2
17
|
import { mutation, resize } from '../api/observables';
|
|
3
18
|
|
|
4
19
|
export default {
|
|
5
20
|
data: {
|
|
21
|
+
threshold: 5,
|
|
6
22
|
fadeDuration: 0.05,
|
|
7
23
|
},
|
|
8
24
|
|
|
9
|
-
events:
|
|
10
|
-
|
|
25
|
+
events: [
|
|
26
|
+
{
|
|
27
|
+
name: 'scroll',
|
|
11
28
|
|
|
12
|
-
|
|
29
|
+
self: true,
|
|
13
30
|
|
|
14
|
-
|
|
31
|
+
passive: true,
|
|
15
32
|
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
handler() {
|
|
34
|
+
this.$emit();
|
|
35
|
+
},
|
|
18
36
|
},
|
|
19
|
-
|
|
37
|
+
{
|
|
38
|
+
name: pointerDown,
|
|
39
|
+
|
|
40
|
+
handler: handleMouseDrag,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
20
43
|
|
|
21
44
|
observe: [
|
|
22
45
|
mutation({
|
|
@@ -65,3 +88,55 @@ export default {
|
|
|
65
88
|
events: ['resize'],
|
|
66
89
|
},
|
|
67
90
|
};
|
|
91
|
+
|
|
92
|
+
function handleMouseDrag(e) {
|
|
93
|
+
const { target, button, defaultPrevented } = e;
|
|
94
|
+
|
|
95
|
+
if (
|
|
96
|
+
defaultPrevented ||
|
|
97
|
+
button > 0 ||
|
|
98
|
+
isTouch(e) ||
|
|
99
|
+
target.closest(selInput) ||
|
|
100
|
+
isInput(target)
|
|
101
|
+
) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
e.preventDefault();
|
|
106
|
+
|
|
107
|
+
const pointerOptions = { passive: false, capture: true };
|
|
108
|
+
const { $el: el, threshold, $options } = this;
|
|
109
|
+
let started;
|
|
110
|
+
|
|
111
|
+
const off = on(document, pointerMove, move(e), pointerOptions);
|
|
112
|
+
on(document, [pointerUp, pointerCancel], end, { capture: true, once: true });
|
|
113
|
+
|
|
114
|
+
function move(e) {
|
|
115
|
+
let origin = getEventPos(e);
|
|
116
|
+
let pos = origin;
|
|
117
|
+
let lastPos = pos;
|
|
118
|
+
|
|
119
|
+
return function (e) {
|
|
120
|
+
lastPos = pos;
|
|
121
|
+
pos = getEventPos(e);
|
|
122
|
+
|
|
123
|
+
const isVertical = hasClass(el, `${$options.id}-vertical`);
|
|
124
|
+
const prop = isVertical ? 'y' : 'x';
|
|
125
|
+
|
|
126
|
+
started ||= Math.abs(pos[prop] - origin[prop]) > threshold;
|
|
127
|
+
|
|
128
|
+
if (started) {
|
|
129
|
+
const delta = lastPos[prop] - pos[prop];
|
|
130
|
+
el[isVertical ? 'scrollTop' : 'scrollLeft'] += delta;
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function end() {
|
|
136
|
+
off();
|
|
137
|
+
|
|
138
|
+
if (started) {
|
|
139
|
+
setTimeout(on(el, 'click', (e) => e.preventDefault(), pointerOptions));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
} from 'uikit-util';
|
|
14
14
|
|
|
15
15
|
const pointerOptions = { passive: false, capture: true };
|
|
16
|
-
const pointerUpOptions = { passive: true, capture: true };
|
|
17
16
|
const pointerDown = 'touchstart mousedown';
|
|
18
17
|
const pointerMove = 'touchmove mousemove';
|
|
19
18
|
const pointerUp = 'touchend touchcancel mouseup click input scroll';
|
|
@@ -104,7 +103,7 @@ export default {
|
|
|
104
103
|
on(document, pointerMove, this.move, pointerOptions);
|
|
105
104
|
|
|
106
105
|
// 'input' event is triggered by video controls
|
|
107
|
-
on(document, pointerUp, this.end,
|
|
106
|
+
on(document, pointerUp, this.end, { passive: true, capture: true, once: true });
|
|
108
107
|
|
|
109
108
|
css(this.list, 'userSelect', 'none');
|
|
110
109
|
},
|
|
@@ -181,7 +180,6 @@ export default {
|
|
|
181
180
|
|
|
182
181
|
end() {
|
|
183
182
|
off(document, pointerMove, this.move, pointerOptions);
|
|
184
|
-
off(document, pointerUp, this.end, pointerUpOptions);
|
|
185
183
|
|
|
186
184
|
if (this.dragging) {
|
|
187
185
|
setTimeout(on(this.list, 'click', (e) => e.preventDefault(), pointerOptions));
|