uikit 3.25.5-dev.f51ad10 → 3.25.6-dev.cbebfac
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 -2
- package/dist/css/uikit-core-rtl.css +4 -5
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +4 -5
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +4 -5
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +4 -5
- 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 +16 -9
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +16 -9
- 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 -7
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -7
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +16 -15
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +1 -7
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +16 -15
- 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 +3 -5
- package/dist/js/uikit-core.min.js +1 -1
- package/dist/js/uikit-icons.js +2 -2
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +18 -13
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/images/icons/link-external.svg +3 -4
- package/src/js/core/navbar.js +1 -0
- package/src/js/mixin/slider-drag.js +18 -8
- package/src/js/util/attr.js +1 -5
- package/src/less/components/utility.less +3 -3
- package/src/scss/components/utility.scss +3 -3
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.6-dev.cbebfac",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<polyline fill="none" stroke="#000" points="
|
|
3
|
-
<line fill="none" stroke="#000" x1="
|
|
4
|
-
|
|
5
|
-
</svg>
|
|
2
|
+
<polyline fill="none" stroke="#000" points="6 4 10 4 10 8" />
|
|
3
|
+
<line fill="none" stroke="#000" x1="4.5" y1="9.5" x2="10" y2="4" />
|
|
4
|
+
</svg>
|
package/src/js/core/navbar.js
CHANGED
|
@@ -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,20 @@ 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
|
+
}
|
|
41
|
+
|
|
42
|
+
this.prevPos = isEqual(pos, this.pos) ? this.prevPos : this.pos;
|
|
37
43
|
this.pos = pos;
|
|
38
44
|
|
|
39
45
|
fn(e);
|
|
@@ -88,7 +94,7 @@ export default {
|
|
|
88
94
|
|
|
89
95
|
if (this._transitioner) {
|
|
90
96
|
this.percent = this._transitioner.percent();
|
|
91
|
-
this.drag += this._transitioner.getDistance() * this.percent * this.dir;
|
|
97
|
+
this.drag.x += this._transitioner.getDistance() * this.percent * this.dir;
|
|
92
98
|
|
|
93
99
|
this._transitioner.cancel();
|
|
94
100
|
this._transitioner.translate(this.percent);
|
|
@@ -109,11 +115,11 @@ export default {
|
|
|
109
115
|
},
|
|
110
116
|
|
|
111
117
|
move(e) {
|
|
112
|
-
const distance = this.pos - this.drag;
|
|
113
|
-
|
|
118
|
+
const distance = this.pos.x - this.drag.x;
|
|
114
119
|
if (
|
|
115
120
|
distance === 0 ||
|
|
116
|
-
this.
|
|
121
|
+
(!this.dragging && getAngle(this.pos, this.drag) > this.angleThreshold) ||
|
|
122
|
+
this.prevPos.x === this.pos.x ||
|
|
117
123
|
(!this.dragging && Math.abs(distance) < this.threshold)
|
|
118
124
|
) {
|
|
119
125
|
return;
|
|
@@ -130,7 +136,7 @@ export default {
|
|
|
130
136
|
let width = getDistance.call(this, prevIndex, nextIndex);
|
|
131
137
|
|
|
132
138
|
while (nextIndex !== prevIndex && dis > width) {
|
|
133
|
-
this.drag -= width * this.dir;
|
|
139
|
+
this.drag.x -= width * this.dir;
|
|
134
140
|
|
|
135
141
|
prevIndex = nextIndex;
|
|
136
142
|
dis -= width;
|
|
@@ -192,7 +198,7 @@ export default {
|
|
|
192
198
|
this._show(false, this.index, true);
|
|
193
199
|
this._transitioner = null;
|
|
194
200
|
} else {
|
|
195
|
-
const dirChange = this.dir < 0 === this.prevPos > this.pos;
|
|
201
|
+
const dirChange = this.dir < 0 === this.prevPos.x > this.pos.x;
|
|
196
202
|
|
|
197
203
|
if (dirChange) {
|
|
198
204
|
trigger(this.slides[this.prevIndex], 'itemhidden', [this]);
|
|
@@ -231,3 +237,7 @@ function hasSelectableText(el) {
|
|
|
231
237
|
toArray(el.childNodes).some((el) => el.nodeType === 3 && el.textContent.trim())
|
|
232
238
|
);
|
|
233
239
|
}
|
|
240
|
+
|
|
241
|
+
function getAngle(pos1, pos2) {
|
|
242
|
+
return (Math.atan2(Math.abs(pos2.y - pos1.y), Math.abs(pos2.x - pos1.x)) * 180) / Math.PI;
|
|
243
|
+
}
|
package/src/js/util/attr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isObject, isUndefined, toNode, toNodes } from './lang';
|
|
2
2
|
|
|
3
3
|
export function attr(element, name, value) {
|
|
4
4
|
if (isObject(name)) {
|
|
@@ -12,10 +12,6 @@ export function attr(element, name, value) {
|
|
|
12
12
|
return toNode(element)?.getAttribute(name);
|
|
13
13
|
} else {
|
|
14
14
|
for (const el of toNodes(element)) {
|
|
15
|
-
if (isFunction(value)) {
|
|
16
|
-
value = value.call(el, attr(el, name));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
15
|
if (value === null) {
|
|
20
16
|
removeAttr(el, name);
|
|
21
17
|
} else {
|
|
@@ -149,6 +149,7 @@
|
|
|
149
149
|
* Overflow fade
|
|
150
150
|
* 1. Overflow
|
|
151
151
|
* 2. Mask
|
|
152
|
+
* 3. Hide scrollbar
|
|
152
153
|
*/
|
|
153
154
|
|
|
154
155
|
@property --uk-overflow-fade-start-opacity {
|
|
@@ -180,14 +181,13 @@
|
|
|
180
181
|
-ms-overflow-style: -ms-autohiding-scrollbar;
|
|
181
182
|
/* 2 */
|
|
182
183
|
mask-image: linear-gradient(to var(--uk-overflow-fade-direction), rgba(0,0,0,var(--uk-overflow-fade-start-opacity)), #000 @overflow-fade-size, #000 ~'calc(100% - @{overflow-fade-size})', rgba(0,0,0,var(--uk-overflow-fade-end-opacity)));
|
|
184
|
+
/* 3 */
|
|
185
|
+
scrollbar-width: none;
|
|
183
186
|
}
|
|
184
187
|
|
|
185
188
|
.uk-overflow-fade-horizontal > *,
|
|
186
189
|
.uk-overflow-fade-vertical > * { min-width: max-content; }
|
|
187
190
|
|
|
188
|
-
.uk-overflow-fade-horizontal::-webkit-scrollbar,
|
|
189
|
-
.uk-overflow-fade-vertical::-webkit-scrollbar { display: none; }
|
|
190
|
-
|
|
191
191
|
|
|
192
192
|
/* Box Sizing
|
|
193
193
|
========================================================================== */
|
|
@@ -132,6 +132,7 @@
|
|
|
132
132
|
* Overflow fade
|
|
133
133
|
* 1. Overflow
|
|
134
134
|
* 2. Mask
|
|
135
|
+
* 3. Hide scrollbar
|
|
135
136
|
*/
|
|
136
137
|
|
|
137
138
|
@property --uk-overflow-fade-start-opacity {
|
|
@@ -163,14 +164,13 @@
|
|
|
163
164
|
-ms-overflow-style: -ms-autohiding-scrollbar;
|
|
164
165
|
/* 2 */
|
|
165
166
|
mask-image: linear-gradient(to var(--uk-overflow-fade-direction), rgba(0,0,0,var(--uk-overflow-fade-start-opacity)), #000 $overflow-fade-size, #000 string.unquote('calc(100% - #{$overflow-fade-size})'), rgba(0,0,0,var(--uk-overflow-fade-end-opacity)));
|
|
167
|
+
/* 3 */
|
|
168
|
+
scrollbar-width: none;
|
|
166
169
|
}
|
|
167
170
|
|
|
168
171
|
.uk-overflow-fade-horizontal > *,
|
|
169
172
|
.uk-overflow-fade-vertical > * { min-width: max-content; }
|
|
170
173
|
|
|
171
|
-
.uk-overflow-fade-horizontal::-webkit-scrollbar,
|
|
172
|
-
.uk-overflow-fade-vertical::-webkit-scrollbar { display: none; }
|
|
173
|
-
|
|
174
174
|
|
|
175
175
|
/* Box Sizing
|
|
176
176
|
========================================================================== */
|