uikit 3.11.2-dev.ada192797 → 3.11.2-dev.bbaa4362f
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 +5 -2
- 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 +23 -12
- 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 +23 -12
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/navbar.js +5 -1
- package/src/js/core/sticky.js +17 -11
- package/tests/sticky-parallax.html +4 -4
- package/tests/sticky.html +14 -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.bbaa4362f",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/navbar.js
CHANGED
|
@@ -301,7 +301,11 @@ export default {
|
|
|
301
301
|
|
|
302
302
|
const active = this.getActive();
|
|
303
303
|
|
|
304
|
-
if (matches(this.dropbar, ':hover')
|
|
304
|
+
if (matches(this.dropbar, ':hover')
|
|
305
|
+
&& active
|
|
306
|
+
&& active.$el === $el
|
|
307
|
+
&& !this.toggles.some(el => active.target !== el && matches(el, ':focus'))
|
|
308
|
+
) {
|
|
305
309
|
e.preventDefault();
|
|
306
310
|
}
|
|
307
311
|
}
|
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,9 +8,9 @@
|
|
|
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
|
-
<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>
|
|
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="position: auto; bottom: +* +*" uk-height-viewport>
|
|
14
14
|
<div class="uk-container">
|
|
15
15
|
|
|
16
16
|
<h1 class="uk-heading-2xlarge">Sticky Section</h1>
|
|
@@ -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
|
|
package/tests/sticky.html
CHANGED
|
@@ -57,14 +57,25 @@
|
|
|
57
57
|
</div>
|
|
58
58
|
|
|
59
59
|
<p id="hash" class="uk-margin-large">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
60
|
+
|
|
61
|
+
<div class="viewport uk-margin">
|
|
62
|
+
<div class="uk-grid uk-child-width-1-6" uk-height-viewport>
|
|
63
|
+
<div>
|
|
64
|
+
|
|
65
|
+
<div class="uk-card uk-card-primary uk-card-body" uk-sticky="position: bottom; bottom: !.viewport">Sticky bottom</div>
|
|
66
|
+
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
60
71
|
</div>
|
|
61
72
|
<div class="uk-width-1-6">
|
|
62
73
|
<div class="viewport" style="min-height: 200vh;">
|
|
63
74
|
<div>
|
|
64
|
-
<div class="uk-card uk-card-primary uk-card-body"
|
|
75
|
+
<div class="uk-card uk-card-primary uk-card-body" uk-sticky="bottom: !.viewport">
|
|
65
76
|
<p>Oversized Content</p>
|
|
66
77
|
|
|
67
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
|
|
78
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua</p>
|
|
68
79
|
</div>
|
|
69
80
|
</div>
|
|
70
81
|
</div>
|
|
@@ -106,7 +117,7 @@
|
|
|
106
117
|
<td><code>offset</code></td>
|
|
107
118
|
<td>String</td>
|
|
108
119
|
<td>0</td>
|
|
109
|
-
<td>The offset the Sticky should be fixed to
|
|
120
|
+
<td>The offset the Sticky should be fixed to. It supports basic mathematics operands + and -. (e.g. 50vh + 50%)</td>
|
|
110
121
|
</tr>
|
|
111
122
|
<tr>
|
|
112
123
|
<td><code>animation</code></td>
|