uikit 3.10.2-dev.c8aa7eda2 → 3.11.1
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 +35 -14
- package/build/icons.js +4 -4
- package/build/scope.js +4 -6
- package/dist/css/uikit-core-rtl.css +10 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +10 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +10 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +10 -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 +257 -264
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +215 -257
- 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 +215 -257
- 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 +28 -26
- 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 +284 -289
- package/dist/js/uikit.min.js +1 -1
- package/package.json +5 -5
- package/src/js/components/parallax.js +38 -8
- package/src/js/core/grid.js +2 -2
- package/src/js/core/svg.js +9 -7
- package/src/js/mixin/parallax.js +209 -242
- package/src/js/util/dimensions.js +4 -2
- package/src/js/util/viewport.js +9 -13
- package/src/less/components/position.less +2 -0
- package/src/less/components/sticky.less +6 -0
- package/src/scss/components/position.scss +2 -0
- package/src/scss/components/sticky.scss +6 -0
- package/tests/index.html +1 -1
- package/tests/js/index.js +1 -1
- package/tests/notification.html +5 -5
- package/tests/parallax.html +66 -50
- package/tests/sticky-parallax.html +274 -0
- package/tests/sticky.html +2 -2
- package/tests/tab.html +1 -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.
|
|
5
|
+
"version": "3.11.1",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@rollup/plugin-replace": "^3.0.1",
|
|
40
40
|
"archiver": "^5.3.0",
|
|
41
41
|
"camelcase": "^6.3.0",
|
|
42
|
-
"clean-css": "^5.2.
|
|
42
|
+
"clean-css": "^5.2.4",
|
|
43
43
|
"dateformat": "^5.0.2",
|
|
44
|
-
"esbuild": "^0.14.
|
|
45
|
-
"eslint": "^8.
|
|
44
|
+
"esbuild": "^0.14.19",
|
|
45
|
+
"eslint": "^8.8.0",
|
|
46
46
|
"fs-extra": "^10.0.0",
|
|
47
47
|
"glob": "^7.2.0",
|
|
48
48
|
"inquirer": "^8.2.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"minimist": "^1.2.5",
|
|
51
51
|
"number-precision": "^1.5.1",
|
|
52
52
|
"p-limit": "^4.0.0",
|
|
53
|
-
"rollup": "^2.
|
|
53
|
+
"rollup": "^2.67.1",
|
|
54
54
|
"rollup-plugin-esbuild": "^4.8.2",
|
|
55
55
|
"rollup-plugin-html": "^0.2.1",
|
|
56
56
|
"rollup-plugin-modify": "^3.0.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Parallax from '../mixin/parallax';
|
|
2
|
-
import {
|
|
2
|
+
import {css, parent, query, scrolledOver, toPx} from 'uikit-util';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
|
|
@@ -7,20 +7,35 @@ export default {
|
|
|
7
7
|
|
|
8
8
|
props: {
|
|
9
9
|
target: String,
|
|
10
|
-
viewport: Number,
|
|
11
|
-
easing: Number
|
|
10
|
+
viewport: Number, // Deprecated
|
|
11
|
+
easing: Number,
|
|
12
|
+
start: String,
|
|
13
|
+
end: String
|
|
12
14
|
},
|
|
13
15
|
|
|
14
16
|
data: {
|
|
15
17
|
target: false,
|
|
16
18
|
viewport: 1,
|
|
17
|
-
easing: 1
|
|
19
|
+
easing: 1,
|
|
20
|
+
start: 0,
|
|
21
|
+
end: 0
|
|
18
22
|
},
|
|
19
23
|
|
|
20
24
|
computed: {
|
|
21
25
|
|
|
22
26
|
target({target}, $el) {
|
|
23
27
|
return getOffsetElement(target && query(target, $el) || $el);
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
start({start}) {
|
|
31
|
+
return parseCalc(start, this.target);
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
end({end, viewport}) {
|
|
35
|
+
return parseCalc(
|
|
36
|
+
end || (viewport = (1 - viewport) * 100) && `${viewport}vh+${viewport}%`,
|
|
37
|
+
this.target
|
|
38
|
+
);
|
|
24
39
|
}
|
|
25
40
|
|
|
26
41
|
},
|
|
@@ -38,11 +53,11 @@ export default {
|
|
|
38
53
|
}
|
|
39
54
|
|
|
40
55
|
const prev = percent;
|
|
41
|
-
percent = ease(scrolledOver(this.target
|
|
56
|
+
percent = ease(scrolledOver(this.target, this.start, this.end), this.easing);
|
|
42
57
|
|
|
43
58
|
return {
|
|
44
59
|
percent,
|
|
45
|
-
style: prev
|
|
60
|
+
style: prev === percent ? false : this.getCss(percent)
|
|
46
61
|
};
|
|
47
62
|
},
|
|
48
63
|
|
|
@@ -62,8 +77,23 @@ export default {
|
|
|
62
77
|
|
|
63
78
|
};
|
|
64
79
|
|
|
80
|
+
const calcRe = /-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g;
|
|
81
|
+
function parseCalc(calc, el) {
|
|
82
|
+
let match;
|
|
83
|
+
let result = 0;
|
|
84
|
+
calc = calc.toString().replace(/\s/g, '');
|
|
85
|
+
calcRe.lastIndex = 0;
|
|
86
|
+
while ((match = calcRe.exec(calc)) !== null) {
|
|
87
|
+
result += toPx(match[0], 'height', el, true);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
|
|
65
93
|
function ease(percent, easing) {
|
|
66
|
-
return
|
|
94
|
+
return easing >= 0
|
|
95
|
+
? Math.pow(percent, easing + 1)
|
|
96
|
+
: 1 - Math.pow(1 - percent, -easing + 1);
|
|
67
97
|
}
|
|
68
98
|
|
|
69
99
|
// SVG elements do not inherit from HTMLElement
|
|
@@ -72,5 +102,5 @@ function getOffsetElement(el) {
|
|
|
72
102
|
? 'offsetTop' in el
|
|
73
103
|
? el
|
|
74
104
|
: getOffsetElement(parent(el))
|
|
75
|
-
: document.
|
|
105
|
+
: document.documentElement;
|
|
76
106
|
}
|
package/src/js/core/grid.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Margin from './margin';
|
|
2
2
|
import Class from '../mixin/class';
|
|
3
|
-
import {addClass, children, css,
|
|
3
|
+
import {addClass, children, css, hasClass, scrolledOver, sortBy, toFloat, toggleClass} from 'uikit-util';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
|
|
@@ -94,7 +94,7 @@ export default {
|
|
|
94
94
|
|
|
95
95
|
return {
|
|
96
96
|
scrolled: this.parallax
|
|
97
|
-
? scrolledOver(this.$el
|
|
97
|
+
? scrolledOver(this.$el) * Math.abs(this.parallax)
|
|
98
98
|
: false
|
|
99
99
|
};
|
|
100
100
|
},
|
package/src/js/core/svg.js
CHANGED
|
@@ -57,15 +57,17 @@ export default {
|
|
|
57
57
|
disconnected() {
|
|
58
58
|
|
|
59
59
|
this.svg.then(svg => {
|
|
60
|
-
if (
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
this.$el.hidden = false;
|
|
64
|
-
}
|
|
60
|
+
if (this._connected) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
this.
|
|
64
|
+
if (isVoidElement(this.$el)) {
|
|
65
|
+
this.$el.hidden = false;
|
|
68
66
|
}
|
|
67
|
+
|
|
68
|
+
remove(svg);
|
|
69
|
+
this.svgEl = null;
|
|
70
|
+
|
|
69
71
|
});
|
|
70
72
|
|
|
71
73
|
this.svg = null;
|