uikit 3.16.15 → 3.16.16-dev.0851166f4
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 +8 -0
- package/build/release.js +7 -7
- 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 +17 -12
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +17 -12
- 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 +9 -7
- 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 +9 -7
- 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 +15 -11
- 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 +30 -28
- 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 +44 -39
- package/dist/js/uikit.min.js +1 -1
- package/package.json +7 -7
- package/src/js/components/tooltip.js +6 -5
- package/src/js/core/accordion.js +2 -2
- package/src/js/core/cover.js +1 -1
- package/src/js/core/img.js +2 -2
- package/src/js/core/switcher.js +5 -5
- package/src/js/core/toggle.js +6 -5
- package/src/js/core/video.js +7 -7
- package/src/js/mixin/slider-drag.js +4 -4
- package/src/js/mixin/togglable.js +8 -6
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.16.
|
|
5
|
+
"version": "3.16.16-dev.0851166f4",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
"camelcase": "^7.0.1",
|
|
28
28
|
"clean-css": "^5.3.2",
|
|
29
29
|
"dateformat": "^5.0.3",
|
|
30
|
-
"esbuild": "^0.17.
|
|
31
|
-
"eslint": "^8.
|
|
30
|
+
"esbuild": "^0.17.17",
|
|
31
|
+
"eslint": "^8.38.0",
|
|
32
32
|
"eslint-config-prettier": "^8.8.0",
|
|
33
33
|
"fs-extra": "^11.1.1",
|
|
34
|
-
"glob": "^10.
|
|
34
|
+
"glob": "^10.2.1",
|
|
35
35
|
"inquirer": "^9.1.5",
|
|
36
36
|
"less": "^4.1.3",
|
|
37
37
|
"minimist": "^1.2.8",
|
|
38
38
|
"number-precision": "^1.6.0",
|
|
39
39
|
"p-limit": "^4.0.0",
|
|
40
40
|
"prettier": "^2.8.7",
|
|
41
|
-
"rollup": "^3.20.
|
|
41
|
+
"rollup": "^3.20.6",
|
|
42
42
|
"rollup-plugin-esbuild": "^5.0.0",
|
|
43
43
|
"rollup-plugin-modify": "^3.0.0",
|
|
44
|
-
"rtlcss": "^4.
|
|
45
|
-
"semver": "^7.
|
|
44
|
+
"rtlcss": "^4.1.0",
|
|
45
|
+
"semver": "^7.5.0",
|
|
46
46
|
"svgo": "^3.0.2",
|
|
47
47
|
"watch-run": "^1.2.5"
|
|
48
48
|
},
|
|
@@ -77,16 +77,15 @@ export default {
|
|
|
77
77
|
|
|
78
78
|
clearTimeout(this.showTimer);
|
|
79
79
|
|
|
80
|
-
if (
|
|
81
|
-
|
|
80
|
+
if (this.isToggled(this.tooltip || null)) {
|
|
81
|
+
await this.toggleElement(this.tooltip, false, false);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
await this.toggleElement(this.tooltip, false, false);
|
|
85
84
|
remove(this.tooltip);
|
|
86
85
|
this.tooltip = null;
|
|
87
86
|
},
|
|
88
87
|
|
|
89
|
-
_show() {
|
|
88
|
+
async _show() {
|
|
90
89
|
this.tooltip = append(
|
|
91
90
|
this.container,
|
|
92
91
|
`<div id="${this.id}" class="uk-${this.$options.name}" role="tooltip">
|
|
@@ -128,7 +127,9 @@ export default {
|
|
|
128
127
|
});
|
|
129
128
|
});
|
|
130
129
|
|
|
131
|
-
this.toggleElement(this.tooltip, true)
|
|
130
|
+
if (!(await this.toggleElement(this.tooltip, true))) {
|
|
131
|
+
this.hide();
|
|
132
|
+
}
|
|
132
133
|
},
|
|
133
134
|
},
|
|
134
135
|
|
package/src/js/core/accordion.js
CHANGED
|
@@ -166,7 +166,7 @@ export default {
|
|
|
166
166
|
},
|
|
167
167
|
|
|
168
168
|
methods: {
|
|
169
|
-
|
|
169
|
+
toggle(item, animate) {
|
|
170
170
|
item = this.items[getIndex(item, this.items)];
|
|
171
171
|
let items = [item];
|
|
172
172
|
const activeItems = filter(this.items, `.${this.clsOpen}`);
|
|
@@ -179,7 +179,7 @@ export default {
|
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
return Promise.all(
|
|
183
183
|
items.map((el) =>
|
|
184
184
|
this.toggleElement(el, !includes(activeItems, el), (el, show) => {
|
|
185
185
|
toggleClass(el, this.clsOpen, show);
|
package/src/js/core/cover.js
CHANGED
package/src/js/core/img.js
CHANGED
|
@@ -107,12 +107,12 @@ function setSrcAttrs(el, src) {
|
|
|
107
107
|
|
|
108
108
|
const srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
109
109
|
function setSourceProps(sourceEl, targetEl) {
|
|
110
|
-
|
|
110
|
+
for (const prop of srcProps) {
|
|
111
111
|
const value = data(sourceEl, prop);
|
|
112
112
|
if (value) {
|
|
113
113
|
attr(targetEl, prop.replace(/^(data-)+/, ''), value);
|
|
114
114
|
}
|
|
115
|
-
}
|
|
115
|
+
}
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
function getImageFromElement(el, src, sources) {
|
package/src/js/core/switcher.js
CHANGED
|
@@ -79,7 +79,7 @@ export default {
|
|
|
79
79
|
},
|
|
80
80
|
|
|
81
81
|
connectChildren() {
|
|
82
|
-
|
|
82
|
+
let index = Math.max(0, this.index());
|
|
83
83
|
for (const el of this.connects) {
|
|
84
84
|
children(el).forEach((child, i) => toggleClass(child, this.cls, i === index));
|
|
85
85
|
}
|
|
@@ -241,11 +241,11 @@ export default {
|
|
|
241
241
|
|
|
242
242
|
const animate = prev >= 0 && prev !== next;
|
|
243
243
|
this.connects.forEach(async ({ children }) => {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
false,
|
|
247
|
-
animate
|
|
244
|
+
const actives = toArray(children).filter(
|
|
245
|
+
(child, i) => i !== active && hasClass(child, this.cls)
|
|
248
246
|
);
|
|
247
|
+
|
|
248
|
+
await this.toggleElement(actives, false, animate);
|
|
249
249
|
await this.toggleElement(children[active], true, animate);
|
|
250
250
|
});
|
|
251
251
|
},
|
package/src/js/core/toggle.js
CHANGED
|
@@ -217,11 +217,12 @@ export default {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
const toggled = this.target.filter(this.isToggled);
|
|
220
|
-
await this.toggleElement(toggled, false)
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
220
|
+
if (await this.toggleElement(toggled, false)) {
|
|
221
|
+
await this.toggleElement(
|
|
222
|
+
this.target.filter((el) => !includes(toggled, el)),
|
|
223
|
+
true
|
|
224
|
+
);
|
|
225
|
+
}
|
|
225
226
|
},
|
|
226
227
|
},
|
|
227
228
|
};
|
package/src/js/core/video.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { intersection } from '../api/observables';
|
|
2
|
-
import {
|
|
1
|
+
import { intersection, resize } from '../api/observables';
|
|
2
|
+
import { hasAttr, isInView, isTag, isVideo, isVisible, mute, pause, play } from 'uikit-util';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
args: 'autoplay',
|
|
@@ -30,9 +30,7 @@ export default {
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
|
|
33
|
-
observe: intersection({
|
|
34
|
-
args: { intersecting: false },
|
|
35
|
-
}),
|
|
33
|
+
observe: [intersection({ args: { intersecting: false } }), resize()],
|
|
36
34
|
|
|
37
35
|
update: {
|
|
38
36
|
read({ visible }) {
|
|
@@ -42,7 +40,7 @@ export default {
|
|
|
42
40
|
|
|
43
41
|
return {
|
|
44
42
|
prev: visible,
|
|
45
|
-
visible: isVisible(this.$el)
|
|
43
|
+
visible: isVisible(this.$el),
|
|
46
44
|
inView: this.inView && isInView(this.$el),
|
|
47
45
|
};
|
|
48
46
|
},
|
|
@@ -50,9 +48,11 @@ export default {
|
|
|
50
48
|
write({ prev, visible, inView }) {
|
|
51
49
|
if (!visible || (this.inView && !inView)) {
|
|
52
50
|
pause(this.$el);
|
|
53
|
-
} else if ((this.autoplay === true && !prev) ||
|
|
51
|
+
} else if ((this.autoplay === true && !prev) || inView) {
|
|
54
52
|
play(this.$el);
|
|
55
53
|
}
|
|
56
54
|
},
|
|
55
|
+
|
|
56
|
+
events: ['resize'],
|
|
57
57
|
},
|
|
58
58
|
};
|
|
@@ -156,16 +156,16 @@ export default {
|
|
|
156
156
|
|
|
157
157
|
let itemShown;
|
|
158
158
|
|
|
159
|
-
[this.index, this.prevIndex]
|
|
160
|
-
|
|
161
|
-
.forEach((i) => {
|
|
159
|
+
for (const i of [this.index, this.prevIndex]) {
|
|
160
|
+
if (!includes([nextIndex, prevIndex], i)) {
|
|
162
161
|
trigger(slides[i], 'itemhidden', [this]);
|
|
163
162
|
|
|
164
163
|
if (edge) {
|
|
165
164
|
itemShown = true;
|
|
166
165
|
this.prevIndex = prevIndex;
|
|
167
166
|
}
|
|
168
|
-
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
169
|
|
|
170
170
|
if ((this.index === prevIndex && this.prevIndex !== prevIndex) || itemShown) {
|
|
171
171
|
trigger(slides[this.index], 'itemshown', [this]);
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
isBoolean,
|
|
10
10
|
isFunction,
|
|
11
11
|
isVisible,
|
|
12
|
-
noop,
|
|
13
12
|
removeClass,
|
|
14
13
|
startsWith,
|
|
15
14
|
toFloat,
|
|
@@ -54,9 +53,9 @@ export default {
|
|
|
54
53
|
},
|
|
55
54
|
|
|
56
55
|
methods: {
|
|
57
|
-
toggleElement(targets, toggle, animate) {
|
|
58
|
-
|
|
59
|
-
Promise.all(
|
|
56
|
+
async toggleElement(targets, toggle, animate) {
|
|
57
|
+
try {
|
|
58
|
+
await Promise.all(
|
|
60
59
|
toNodes(targets).map((el) => {
|
|
61
60
|
const show = isBoolean(toggle) ? toggle : !this.isToggled(el);
|
|
62
61
|
|
|
@@ -92,8 +91,11 @@ export default {
|
|
|
92
91
|
})
|
|
93
92
|
: done();
|
|
94
93
|
})
|
|
95
|
-
)
|
|
96
|
-
|
|
94
|
+
);
|
|
95
|
+
return true;
|
|
96
|
+
} catch (e) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
97
99
|
},
|
|
98
100
|
|
|
99
101
|
isToggled(el = this.$el) {
|