uikit 3.21.18-dev.718f435ef → 3.21.18-dev.7ded5b7b6
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 +1 -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 +4 -4
- 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 +12 -7
- 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 +15 -10
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/countdown.js +3 -3
- package/src/js/core/height-placeholder.js +1 -1
- package/src/js/core/sticky.js +8 -2
- package/src/js/util/dimensions.js +2 -2
- package/tests/sticky.html +6 -0
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.21.18-dev.
|
|
5
|
+
"version": "3.21.18-dev.7ded5b7b6",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
connected() {
|
|
24
24
|
attr(this.$el, 'role', this.role);
|
|
25
25
|
this.date = toFloat(Date.parse(this.$props.date));
|
|
26
|
-
this.end = false;
|
|
26
|
+
this.started = this.end = false;
|
|
27
27
|
this.start();
|
|
28
28
|
},
|
|
29
29
|
|
|
@@ -63,16 +63,16 @@ export default {
|
|
|
63
63
|
const timespan = getTimeSpan(this.date);
|
|
64
64
|
|
|
65
65
|
if (!timespan.total) {
|
|
66
|
-
const started = !!this.timer;
|
|
67
66
|
this.stop();
|
|
68
67
|
if (!this.end) {
|
|
69
68
|
trigger(this.$el, 'countdownend');
|
|
70
69
|
this.end = true;
|
|
71
|
-
if (this.reload && started) {
|
|
70
|
+
if (this.reload && this.started) {
|
|
72
71
|
window.location.reload();
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
74
|
} else if (!this.timer) {
|
|
75
|
+
this.started = true;
|
|
76
76
|
trigger(this.$el, 'countdownstart');
|
|
77
77
|
this.timer = setInterval(this.update, 1000);
|
|
78
78
|
}
|
package/src/js/core/sticky.js
CHANGED
|
@@ -41,6 +41,7 @@ export default {
|
|
|
41
41
|
start: null,
|
|
42
42
|
end: null,
|
|
43
43
|
offset: String,
|
|
44
|
+
offsetEnd: String,
|
|
44
45
|
overflowFlip: Boolean,
|
|
45
46
|
animation: String,
|
|
46
47
|
clsActive: String,
|
|
@@ -59,6 +60,7 @@ export default {
|
|
|
59
60
|
start: false,
|
|
60
61
|
end: false,
|
|
61
62
|
offset: 0,
|
|
63
|
+
offsetEnd: 0,
|
|
62
64
|
overflowFlip: false,
|
|
63
65
|
animation: '',
|
|
64
66
|
clsActive: 'uk-active',
|
|
@@ -188,12 +190,16 @@ export default {
|
|
|
188
190
|
}
|
|
189
191
|
|
|
190
192
|
const referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
191
|
-
let offset =
|
|
193
|
+
let [offset, offsetEnd] = [this.offset, this.offsetEnd].map((value) =>
|
|
194
|
+
toPx(value, 'height', sticky ? this.$el : referenceElement),
|
|
195
|
+
);
|
|
196
|
+
|
|
192
197
|
if (position === 'bottom' && (height < dynamicViewport || this.overflowFlip)) {
|
|
193
198
|
offset += dynamicViewport - height;
|
|
194
199
|
}
|
|
195
200
|
|
|
196
|
-
const
|
|
201
|
+
const elementBox = height + offset + offsetEnd;
|
|
202
|
+
const overflow = this.overflowFlip ? 0 : Math.max(0, elementBox - viewport);
|
|
197
203
|
const topOffset =
|
|
198
204
|
getOffset(referenceElement).top -
|
|
199
205
|
// offset possible `transform: translateY` animation 'uk-animation-slide-top' while hiding
|
|
@@ -97,8 +97,8 @@ export function offsetPosition(element) {
|
|
|
97
97
|
const offset = [element.offsetTop, element.offsetLeft];
|
|
98
98
|
|
|
99
99
|
while ((element = element.offsetParent)) {
|
|
100
|
-
offset[0] += element.offsetTop + toFloat(css(element,
|
|
101
|
-
offset[1] += element.offsetLeft + toFloat(css(element,
|
|
100
|
+
offset[0] += element.offsetTop + toFloat(css(element, 'borderTopWidth'));
|
|
101
|
+
offset[1] += element.offsetLeft + toFloat(css(element, 'borderLeftWidth'));
|
|
102
102
|
|
|
103
103
|
if (css(element, 'position') === 'fixed') {
|
|
104
104
|
const win = toWindow(element);
|
package/tests/sticky.html
CHANGED
|
@@ -351,6 +351,12 @@
|
|
|
351
351
|
<td>0</td>
|
|
352
352
|
<td>The offset the Sticky should be fixed to. The value can be in vh, % and px. It supports basic mathematics operands + and -.</td>
|
|
353
353
|
</tr>
|
|
354
|
+
<tr>
|
|
355
|
+
<td><code>offset-bottom</code></td>
|
|
356
|
+
<td>Length</td>
|
|
357
|
+
<td>0</td>
|
|
358
|
+
<td>The offset the Sticky should be fixed to if the element overflows the viewport. The value can be in vh, % and px. It supports basic mathematics operands + and -.</td>
|
|
359
|
+
</tr>
|
|
354
360
|
<tr>
|
|
355
361
|
<td><code>overflow-flip</code></td>
|
|
356
362
|
<td>Boolean</td>
|