uikit 3.23.11-dev.7c46f0f5c → 3.23.12-dev.4db70ed92
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 +6 -0
- package/build/util.js +2 -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 +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 +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 +1 -1
- 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 +1 -1
- 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 +19 -35
- 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 +19 -35
- package/dist/js/uikit.min.js +1 -1
- package/package.json +2 -2
- package/src/js/core/cover.js +7 -27
- package/src/js/core/scrollspy-nav.js +11 -12
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.23.
|
|
5
|
+
"version": "3.23.12-dev.4db70ed92",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"rtlcss": "^4.1.1",
|
|
49
49
|
"semver": "^7.7.1",
|
|
50
50
|
"strip-css-comments": "^5.0.0",
|
|
51
|
-
"svgo": "^
|
|
51
|
+
"svgo": "^4.0.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build-scss": "node build/scss",
|
package/src/js/core/cover.js
CHANGED
|
@@ -29,35 +29,15 @@ export default {
|
|
|
29
29
|
return false;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
const {
|
|
33
|
-
const { $el, width, height } = this;
|
|
32
|
+
const { $el, width = $el.clientWidth, height = $el.clientHeight } = this;
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
const el = getPositionedParent($el) || parent($el);
|
|
35
|
+
const dim = Dimensions.cover(
|
|
36
|
+
{ width, height },
|
|
37
|
+
{ width: el.offsetWidth, height: el.offsetHeight },
|
|
38
|
+
);
|
|
36
39
|
|
|
37
|
-
|
|
38
|
-
const intrinsic = {
|
|
39
|
-
width: $el.naturalWidth || $el.videoWidth || $el.clientWidth,
|
|
40
|
-
height: $el.naturalHeight || $el.videoHeight || $el.clientHeight,
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
if (width) {
|
|
44
|
-
dim = ratio(intrinsic, 'width', width);
|
|
45
|
-
} else if (height) {
|
|
46
|
-
dim = ratio(intrinsic, 'height', height);
|
|
47
|
-
} else {
|
|
48
|
-
dim = intrinsic;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const { offsetHeight: coverHeight, offsetWidth: coverWidth } =
|
|
53
|
-
getPositionedParent($el) || parent($el);
|
|
54
|
-
const coverDim = cover(dim, { width: coverWidth, height: coverHeight });
|
|
55
|
-
|
|
56
|
-
if (!coverDim.width || !coverDim.height) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return coverDim;
|
|
40
|
+
return dim.width && dim.height ? dim : false;
|
|
61
41
|
},
|
|
62
42
|
|
|
63
43
|
write({ height, width }) {
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
getCoveringElement,
|
|
5
5
|
getTargetedElement,
|
|
6
6
|
hasClass,
|
|
7
|
+
isSameSiteAnchor,
|
|
7
8
|
isVisible,
|
|
8
9
|
offset,
|
|
9
10
|
offsetViewport,
|
|
@@ -31,11 +32,7 @@ export default {
|
|
|
31
32
|
},
|
|
32
33
|
|
|
33
34
|
computed: {
|
|
34
|
-
links: ({ target }, $el) => $$(target, $el).filter(
|
|
35
|
-
|
|
36
|
-
elements({ closest }) {
|
|
37
|
-
return this.links.map((el) => el.closest(closest || '*'));
|
|
38
|
-
},
|
|
35
|
+
links: ({ target }, $el) => $$(target, $el).filter(isSameSiteAnchor),
|
|
39
36
|
},
|
|
40
37
|
|
|
41
38
|
watch: {
|
|
@@ -51,7 +48,8 @@ export default {
|
|
|
51
48
|
update: [
|
|
52
49
|
{
|
|
53
50
|
read() {
|
|
54
|
-
const
|
|
51
|
+
const links = this.links.filter(getTargetedElement);
|
|
52
|
+
const targets = links.map(getTargetedElement);
|
|
55
53
|
|
|
56
54
|
const { length } = targets;
|
|
57
55
|
|
|
@@ -81,19 +79,20 @@ export default {
|
|
|
81
79
|
}
|
|
82
80
|
}
|
|
83
81
|
|
|
84
|
-
return { active };
|
|
82
|
+
return { active, links };
|
|
85
83
|
},
|
|
86
84
|
|
|
87
|
-
write({ active }) {
|
|
88
|
-
const
|
|
85
|
+
write({ active, links }) {
|
|
86
|
+
const elements = links.map((el) => el.closest(this.closest || '*'));
|
|
87
|
+
const changed = active !== false && !hasClass(elements[active], this.cls);
|
|
89
88
|
|
|
90
89
|
this.links.forEach((el) => el.blur());
|
|
91
|
-
for (let i = 0; i <
|
|
92
|
-
toggleClass(
|
|
90
|
+
for (let i = 0; i < elements.length; i++) {
|
|
91
|
+
toggleClass(elements[i], this.cls, +i === active);
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
if (changed) {
|
|
96
|
-
trigger(this.$el, 'active', [active,
|
|
95
|
+
trigger(this.$el, 'active', [active, elements[active]]);
|
|
97
96
|
}
|
|
98
97
|
},
|
|
99
98
|
|