uikit 3.11.2-dev.ada192797 → 3.11.2-dev.fb043abc2
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 +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 +18 -11
- 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 +18 -11
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/sticky.js +17 -11
- package/tests/sticky-parallax.html +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.11.2-dev.
|
|
5
|
+
"version": "3.11.2-dev.fb043abc2",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/sticky.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Class from '../mixin/class';
|
|
2
2
|
import Media from '../mixin/media';
|
|
3
|
-
import {$, addClass, after, Animation,
|
|
3
|
+
import {$, addClass, after, Animation, clamp, css, dimensions, fastdom, height as getHeight, getScrollingElement, hasClass, isNumeric, isString, isVisible, noop, offset, offsetPosition, parent, query, remove, removeClass, replaceClass, scrollTop, toggleClass, toPx, trigger, within} from 'uikit-util';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
|
|
@@ -42,7 +42,7 @@ export default {
|
|
|
42
42
|
|
|
43
43
|
position({position}, $el) {
|
|
44
44
|
return position === 'auto'
|
|
45
|
-
?
|
|
45
|
+
? (this.isFixed ? this.placeholder : $el).offsetHeight > getHeight(window)
|
|
46
46
|
? 'bottom'
|
|
47
47
|
: 'top'
|
|
48
48
|
: position;
|
|
@@ -143,7 +143,7 @@ export default {
|
|
|
143
143
|
|
|
144
144
|
{
|
|
145
145
|
|
|
146
|
-
read({height}, types) {
|
|
146
|
+
read({height, margin}, types) {
|
|
147
147
|
|
|
148
148
|
this.inactive = !this.matchMedia || !isVisible(this.$el);
|
|
149
149
|
|
|
@@ -151,13 +151,19 @@ export default {
|
|
|
151
151
|
return false;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
const hide = this.isActive && types.has('resize');
|
|
155
|
+
if (hide) {
|
|
155
156
|
this.hide();
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (!this.isActive) {
|
|
156
160
|
height = this.$el.offsetHeight;
|
|
157
|
-
this
|
|
161
|
+
margin = css(this.$el, 'margin');
|
|
158
162
|
}
|
|
159
163
|
|
|
160
|
-
|
|
164
|
+
if (hide) {
|
|
165
|
+
this.show();
|
|
166
|
+
}
|
|
161
167
|
|
|
162
168
|
const overflow = Math.max(0, height + this.offset - getHeight(window));
|
|
163
169
|
|
|
@@ -180,17 +186,17 @@ export default {
|
|
|
180
186
|
topOffset,
|
|
181
187
|
offsetParentTop,
|
|
182
188
|
height,
|
|
189
|
+
margin,
|
|
183
190
|
width: dimensions(isVisible(this.widthElement) ? this.widthElement : this.$el).width,
|
|
184
|
-
top: offsetPosition(this.placeholder)[0]
|
|
185
|
-
margins: css(this.$el, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])
|
|
191
|
+
top: offsetPosition(this.placeholder)[0]
|
|
186
192
|
};
|
|
187
193
|
},
|
|
188
194
|
|
|
189
|
-
write({height,
|
|
195
|
+
write({height, margin}) {
|
|
190
196
|
|
|
191
197
|
const {placeholder} = this;
|
|
192
198
|
|
|
193
|
-
css(placeholder,
|
|
199
|
+
css(placeholder, {height, margin});
|
|
194
200
|
|
|
195
201
|
if (!within(placeholder, document)) {
|
|
196
202
|
after(this.$el, placeholder);
|
|
@@ -315,7 +321,7 @@ export default {
|
|
|
315
321
|
|
|
316
322
|
const {width, scroll = 0, overflow, overflowScroll = 0, start, end, topOffset, height, offsetParentTop} = this._data;
|
|
317
323
|
const active = start !== 0 || scroll > start;
|
|
318
|
-
let top =
|
|
324
|
+
let top = this.offset;
|
|
319
325
|
let position = 'fixed';
|
|
320
326
|
|
|
321
327
|
if (scroll > end) {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<script src="js/test.js"></script>
|
|
9
9
|
</head>
|
|
10
10
|
|
|
11
|
-
<body style="padding-bottom:
|
|
11
|
+
<body style="padding-bottom: 100vh;">
|
|
12
12
|
|
|
13
13
|
<div class="uk-section uk-section-primary uk-position-z-index-negative uk-flex uk-flex-center uk-flex-middle uk-text-center" uk-sticky="bottom: +* +*" uk-height-viewport>
|
|
14
14
|
<div class="uk-container">
|
|
@@ -130,9 +130,9 @@
|
|
|
130
130
|
</div>
|
|
131
131
|
<div>
|
|
132
132
|
|
|
133
|
-
<div class="uk-
|
|
133
|
+
<div class="uk-background-muted uk-text-center" style="height: 100vh" uk-sticky="bottom: #js-sticky-parallax-viewport">
|
|
134
134
|
|
|
135
|
-
<div uk-parallax="target: #js-sticky-parallax-viewport; start: 100vh; end: 100vh; y:
|
|
135
|
+
<div uk-parallax="target: #js-sticky-parallax-viewport; start: 100vh; end: 100vh; y: 10vh, 80vh; easing: 0">
|
|
136
136
|
|
|
137
137
|
<h1 class="uk-margin-remove">Sticky Parallax Viewport</h1>
|
|
138
138
|
|