uikit 3.13.11-dev.4551212a9 → 3.13.11-dev.77828bb3f
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 +29 -17
- 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 +29 -17
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/drop.js +20 -11
- package/src/js/core/height-match.js +1 -1
- package/src/js/core/margin.js +9 -2
- package/src/js/util/position.js +6 -3
- package/tests/drop.html +28 -9
- package/tests/sticky-parallax.html +158 -163
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.13.11-dev.
|
|
5
|
+
"version": "3.13.11-dev.77828bb3f",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/drop.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isTouch,
|
|
14
14
|
matches,
|
|
15
15
|
MouseTracker,
|
|
16
|
-
|
|
16
|
+
observeResize,
|
|
17
17
|
offset,
|
|
18
18
|
offsetViewport,
|
|
19
19
|
on,
|
|
@@ -247,15 +247,23 @@ export default {
|
|
|
247
247
|
this.hide(false);
|
|
248
248
|
}
|
|
249
249
|
}),
|
|
250
|
-
|
|
251
|
-
this.display === 'static'
|
|
252
|
-
?
|
|
253
|
-
:
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
250
|
+
|
|
251
|
+
...(this.display === 'static'
|
|
252
|
+
? []
|
|
253
|
+
: (() => {
|
|
254
|
+
const handler = () => this.$emit();
|
|
255
|
+
return [
|
|
256
|
+
on(window, 'resize', handler),
|
|
257
|
+
on(document, 'scroll', handler, true),
|
|
258
|
+
(() => {
|
|
259
|
+
const observer = observeResize(
|
|
260
|
+
scrollParents(this.$el),
|
|
261
|
+
handler
|
|
262
|
+
);
|
|
263
|
+
return () => observer.disconnect();
|
|
264
|
+
})(),
|
|
265
|
+
];
|
|
266
|
+
})()),
|
|
259
267
|
]) {
|
|
260
268
|
once(this.$el, 'hide', handler, { self: true });
|
|
261
269
|
}
|
|
@@ -375,7 +383,8 @@ export default {
|
|
|
375
383
|
const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
|
|
376
384
|
|
|
377
385
|
css(this.$el, 'maxWidth', '');
|
|
378
|
-
const maxWidth =
|
|
386
|
+
const maxWidth =
|
|
387
|
+
scrollParentOffset.width - (this.boundaryAlign ? 0 : 2 * this.viewportPadding);
|
|
379
388
|
|
|
380
389
|
if (this.pos[1] === 'justify') {
|
|
381
390
|
const prop = this.axis === 'y' ? 'width' : 'height';
|
package/src/js/core/margin.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import Resize from '../mixin/resize';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
isRtl,
|
|
4
|
+
isVisible,
|
|
5
|
+
observeMutation,
|
|
6
|
+
offsetPosition,
|
|
7
|
+
toArray,
|
|
8
|
+
toggleClass,
|
|
9
|
+
} from 'uikit-util';
|
|
3
10
|
|
|
4
11
|
export default {
|
|
5
12
|
mixins: [Resize],
|
|
@@ -15,7 +22,7 @@ export default {
|
|
|
15
22
|
},
|
|
16
23
|
|
|
17
24
|
resizeTargets() {
|
|
18
|
-
return [this.$el, this.$el.children];
|
|
25
|
+
return [this.$el, ...toArray(this.$el.children)];
|
|
19
26
|
},
|
|
20
27
|
|
|
21
28
|
connected() {
|
package/src/js/util/position.js
CHANGED
|
@@ -52,8 +52,6 @@ function attachTo(element, target, options) {
|
|
|
52
52
|
function attachToWithFlip(element, target, options) {
|
|
53
53
|
const position = attachTo(element, target, options);
|
|
54
54
|
const targetDim = offset(target);
|
|
55
|
-
const viewports = scrollParents(element);
|
|
56
|
-
const [scrollElement] = viewports;
|
|
57
55
|
|
|
58
56
|
let {
|
|
59
57
|
flip,
|
|
@@ -64,6 +62,11 @@ function attachToWithFlip(element, target, options) {
|
|
|
64
62
|
viewportPadding,
|
|
65
63
|
} = options;
|
|
66
64
|
|
|
65
|
+
let viewports = scrollParents(element);
|
|
66
|
+
if (boundary === target) {
|
|
67
|
+
viewports = viewports.filter((viewport) => viewport !== boundary);
|
|
68
|
+
}
|
|
69
|
+
const [scrollElement] = viewports;
|
|
67
70
|
viewports.push(viewport);
|
|
68
71
|
|
|
69
72
|
const offsetPosition = { ...position };
|
|
@@ -82,7 +85,7 @@ function attachToWithFlip(element, target, options) {
|
|
|
82
85
|
viewport[end] -= viewportPadding;
|
|
83
86
|
}
|
|
84
87
|
|
|
85
|
-
if (boundary && !
|
|
88
|
+
if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
|
|
86
89
|
viewport = getIntersectionArea(viewport, offset(boundary));
|
|
87
90
|
}
|
|
88
91
|
|
package/tests/drop.html
CHANGED
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
-webkit-overflow-scrolling: touch;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.boundary-overflow {
|
|
19
|
-
width: 200%;
|
|
20
|
-
}
|
|
18
|
+
.boundary-overflow { width: 200%; }
|
|
21
19
|
|
|
22
20
|
</style>
|
|
23
21
|
</head>
|
|
@@ -219,11 +217,18 @@
|
|
|
219
217
|
|
|
220
218
|
<h2>Shift and Flip</h2>
|
|
221
219
|
|
|
220
|
+
<div class="uk-margin">
|
|
221
|
+
<select id="js-boundary-overflow-switcher" class="uk-select uk-form-width-small">
|
|
222
|
+
<option value="">Resize</option>
|
|
223
|
+
<option value="boundary-overflow">Scroll</option>
|
|
224
|
+
</select>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
222
227
|
<div uk-grid>
|
|
223
228
|
<div class="uk-width-1-2@m">
|
|
224
229
|
|
|
225
|
-
<div class="boundary uk-
|
|
226
|
-
<div class="boundary-overflow uk-flex uk-flex-center">
|
|
230
|
+
<div class="boundary uk-height-large uk-resize-horizontal uk-margin">
|
|
231
|
+
<div class="js-boundary-overflow uk-flex uk-flex-center">
|
|
227
232
|
<div>
|
|
228
233
|
|
|
229
234
|
<button class="uk-button uk-button-default" type="button">Click</button>
|
|
@@ -236,8 +241,8 @@
|
|
|
236
241
|
</div>
|
|
237
242
|
<div class="uk-width-1-2@m">
|
|
238
243
|
|
|
239
|
-
<div class="boundary uk-
|
|
240
|
-
<div class="boundary-overflow uk-flex uk-flex-center">
|
|
244
|
+
<div class="boundary uk-height-large uk-resize-horizontal uk-margin">
|
|
245
|
+
<div class="js-boundary-overflow uk-flex uk-flex-center">
|
|
241
246
|
<div>
|
|
242
247
|
|
|
243
248
|
<button class="uk-button uk-button-default" style="margin-left: 40px" type="button">Click</button>
|
|
@@ -308,7 +313,7 @@
|
|
|
308
313
|
<div class="uk-child-width-1-2@m" uk-grid>
|
|
309
314
|
<div>
|
|
310
315
|
|
|
311
|
-
<div class="boundary uk-
|
|
316
|
+
<div class="boundary uk-margin uk-flex uk-flex-around uk-flex-wrap" uk-margin>
|
|
312
317
|
<div>
|
|
313
318
|
|
|
314
319
|
<button class="uk-button uk-button-default" type="button">Bottom Right</button>
|
|
@@ -336,7 +341,7 @@
|
|
|
336
341
|
</div>
|
|
337
342
|
|
|
338
343
|
</div>
|
|
339
|
-
<div class="uk-width-
|
|
344
|
+
<div class="uk-width-auto">
|
|
340
345
|
|
|
341
346
|
<div class="boundary uk-height-medium uk-flex uk-flex-column uk-flex-around">
|
|
342
347
|
<div>
|
|
@@ -474,5 +479,19 @@
|
|
|
474
479
|
|
|
475
480
|
</div>
|
|
476
481
|
|
|
482
|
+
<script>
|
|
483
|
+
|
|
484
|
+
var options = UIkit.util.$$('#js-boundary-overflow-switcher option').map(function (option) { return option.value; });
|
|
485
|
+
|
|
486
|
+
UIkit.util.on('#js-boundary-overflow-switcher', 'change', function () {
|
|
487
|
+
var value = this.value;
|
|
488
|
+
UIkit.util.$$('.js-boundary-overflow').forEach(function (table) {
|
|
489
|
+
UIkit.util.removeClass(table, options);
|
|
490
|
+
UIkit.util.addClass(table, value);
|
|
491
|
+
});
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
</script>
|
|
495
|
+
|
|
477
496
|
</body>
|
|
478
497
|
</html>
|