uikit 3.15.23-dev.aeae9bcb1 → 3.15.23-dev.b2c6f9d01
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/build/util.js +22 -24
- package/dist/css/uikit-core-rtl.css +1 -5
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +1 -5
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +1 -5
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +1 -5
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +2 -2
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +2 -2
- package/dist/js/components/lightbox-panel.js +20 -67
- package/dist/js/components/lightbox-panel.min.js +2 -2
- package/dist/js/components/lightbox.js +20 -67
- package/dist/js/components/lightbox.min.js +2 -2
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +2 -2
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +2 -2
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +2 -2
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +2 -2
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +2 -2
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +2 -2
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +2 -2
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +2 -2
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +2 -2
- package/dist/js/uikit-core.js +19 -71
- package/dist/js/uikit-core.min.js +2 -2
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +2 -2
- package/dist/js/uikit.js +20 -72
- package/dist/js/uikit.min.js +2 -2
- package/package.json +1 -1
- package/src/js/components/lightbox-panel.js +1 -2
- package/src/js/core/drop.js +8 -13
- package/src/js/mixin/modal.js +21 -70
- package/src/less/components/modal.less +0 -1
- package/src/less/components/offcanvas.less +0 -1
- package/src/less/components/utility.less +1 -5
- package/src/scss/components/modal.scss +0 -1
- package/src/scss/components/offcanvas.scss +0 -1
- package/src/scss/components/utility.scss +1 -5
- package/tests/dropdown.html +0 -1
- package/tests/navbar.html +0 -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.15.23-dev.
|
|
5
|
+
"version": "3.15.23-dev.b2c6f9d01",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Animations from './internal/lightbox-animations';
|
|
2
|
-
import Container from '../mixin/container';
|
|
3
2
|
import Modal from '../mixin/modal';
|
|
4
3
|
import Slideshow from '../mixin/slideshow';
|
|
5
4
|
import Togglable from '../mixin/togglable';
|
|
@@ -21,7 +20,7 @@ import {
|
|
|
21
20
|
} from 'uikit-util';
|
|
22
21
|
|
|
23
22
|
export default {
|
|
24
|
-
mixins: [
|
|
23
|
+
mixins: [Modal, Togglable, Slideshow],
|
|
25
24
|
|
|
26
25
|
functional: true,
|
|
27
26
|
|
package/src/js/core/drop.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
removeClass,
|
|
30
30
|
within,
|
|
31
31
|
} from 'uikit-util';
|
|
32
|
-
import { isSameSiteAnchor, preventBackgroundScroll
|
|
32
|
+
import { isSameSiteAnchor, preventBackgroundScroll } from '../mixin/modal';
|
|
33
33
|
|
|
34
34
|
export let active;
|
|
35
35
|
|
|
@@ -302,20 +302,15 @@ export default {
|
|
|
302
302
|
return () => observer.disconnect();
|
|
303
303
|
})(),
|
|
304
304
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
: []),
|
|
312
|
-
|
|
313
|
-
...(this.bgScroll
|
|
314
|
-
? []
|
|
315
|
-
: [preventOverscroll(this.$el), preventBackgroundScroll()]),
|
|
305
|
+
this.autoUpdate &&
|
|
306
|
+
on([document, ...overflowParents(this.$el)], 'scroll', update, {
|
|
307
|
+
passive: true,
|
|
308
|
+
}),
|
|
309
|
+
|
|
310
|
+
!this.bgScroll && preventBackgroundScroll(this.$el),
|
|
316
311
|
];
|
|
317
312
|
|
|
318
|
-
once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
|
|
313
|
+
once(this.$el, 'hide', () => handlers.forEach((handler) => handler && handler()), {
|
|
319
314
|
self: true,
|
|
320
315
|
});
|
|
321
316
|
},
|
package/src/js/mixin/modal.js
CHANGED
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
$,
|
|
3
3
|
addClass,
|
|
4
4
|
append,
|
|
5
|
-
apply,
|
|
6
5
|
attr,
|
|
7
6
|
css,
|
|
8
7
|
endsWith,
|
|
@@ -10,7 +9,6 @@ import {
|
|
|
10
9
|
isFocusable,
|
|
11
10
|
last,
|
|
12
11
|
matches,
|
|
13
|
-
noop,
|
|
14
12
|
on,
|
|
15
13
|
once,
|
|
16
14
|
parent,
|
|
@@ -148,8 +146,7 @@ export default {
|
|
|
148
146
|
);
|
|
149
147
|
|
|
150
148
|
if (this.overlay) {
|
|
151
|
-
once(this.$el, 'hidden',
|
|
152
|
-
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
149
|
+
once(this.$el, 'hidden', preventBackgroundScroll(this.$el), { self: true });
|
|
153
150
|
}
|
|
154
151
|
|
|
155
152
|
if (this.stack) {
|
|
@@ -294,65 +291,28 @@ function toMs(time) {
|
|
|
294
291
|
return time ? (endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000) : 0;
|
|
295
292
|
}
|
|
296
293
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
let startClientY;
|
|
308
|
-
|
|
309
|
-
const events = [
|
|
310
|
-
on(
|
|
311
|
-
el,
|
|
312
|
-
'touchstart',
|
|
313
|
-
({ targetTouches }) => {
|
|
314
|
-
if (targetTouches.length === 1) {
|
|
315
|
-
startClientY = targetTouches[0].clientY;
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
{ passive: true }
|
|
319
|
-
),
|
|
320
|
-
|
|
321
|
-
on(
|
|
322
|
-
el,
|
|
323
|
-
'touchmove',
|
|
324
|
-
(e) => {
|
|
325
|
-
if (e.targetTouches.length !== 1) {
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
let [scrollParent] = scrollParents(e.target);
|
|
330
|
-
if (!within(scrollParent, el)) {
|
|
331
|
-
scrollParent = el;
|
|
332
|
-
}
|
|
294
|
+
let prevented;
|
|
295
|
+
export function preventBackgroundScroll(el) {
|
|
296
|
+
// 'overscroll-behavior: contain' only works consistently if el overflows (Safari)
|
|
297
|
+
const off = on(
|
|
298
|
+
el,
|
|
299
|
+
'touchmove',
|
|
300
|
+
(e) => {
|
|
301
|
+
if (e.targetTouches.length !== 1) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
333
304
|
|
|
334
|
-
|
|
335
|
-
const { scrollTop, scrollHeight, clientHeight } = scrollParent;
|
|
305
|
+
let [{ scrollHeight, clientHeight }] = scrollParents(e.target);
|
|
336
306
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
{ passive: false }
|
|
346
|
-
),
|
|
347
|
-
];
|
|
348
|
-
|
|
349
|
-
return () => events.forEach((fn) => fn());
|
|
350
|
-
}
|
|
307
|
+
if (clientHeight >= scrollHeight && e.cancelable) {
|
|
308
|
+
e.preventDefault();
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{ passive: false }
|
|
312
|
+
);
|
|
351
313
|
|
|
352
|
-
let prevented;
|
|
353
|
-
export function preventBackgroundScroll() {
|
|
354
314
|
if (prevented) {
|
|
355
|
-
return
|
|
315
|
+
return off;
|
|
356
316
|
}
|
|
357
317
|
prevented = true;
|
|
358
318
|
|
|
@@ -360,24 +320,15 @@ export function preventBackgroundScroll() {
|
|
|
360
320
|
css(scrollingElement, {
|
|
361
321
|
overflowY: CSS.supports('overflow', 'clip') ? 'clip' : 'hidden',
|
|
362
322
|
touchAction: 'none',
|
|
363
|
-
paddingRight: width(window) - scrollingElement.clientWidth,
|
|
323
|
+
paddingRight: width(window) - scrollingElement.clientWidth || '',
|
|
364
324
|
});
|
|
365
325
|
return () => {
|
|
366
326
|
prevented = false;
|
|
327
|
+
off();
|
|
367
328
|
css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
|
|
368
329
|
};
|
|
369
330
|
}
|
|
370
331
|
|
|
371
|
-
function filterChildren(el, fn) {
|
|
372
|
-
const children = [];
|
|
373
|
-
apply(el, (node) => {
|
|
374
|
-
if (fn(node)) {
|
|
375
|
-
children.push(node);
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
return children;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
332
|
export function isSameSiteAnchor(a) {
|
|
382
333
|
return ['origin', 'pathname', 'search'].every((part) => a[part] === location[part]);
|
|
383
334
|
}
|
|
@@ -87,7 +87,6 @@
|
|
|
87
87
|
padding: @panel-scrollable-padding;
|
|
88
88
|
border: @panel-scrollable-border-width solid @panel-scrollable-border;
|
|
89
89
|
overflow: auto;
|
|
90
|
-
-webkit-overflow-scrolling: touch;
|
|
91
90
|
resize: both;
|
|
92
91
|
.hook-panel-scrollable();
|
|
93
92
|
}
|
|
@@ -139,10 +138,7 @@
|
|
|
139
138
|
* Enable scrollbars if content is clipped
|
|
140
139
|
*/
|
|
141
140
|
|
|
142
|
-
.uk-overflow-auto {
|
|
143
|
-
overflow: auto;
|
|
144
|
-
-webkit-overflow-scrolling: touch;
|
|
145
|
-
}
|
|
141
|
+
.uk-overflow-auto { overflow: auto; }
|
|
146
142
|
|
|
147
143
|
.uk-overflow-auto > :last-child { margin-bottom: 0; }
|
|
148
144
|
|
|
@@ -87,7 +87,6 @@ $dragover-box-shadow: 0 0 20px rgba(100,100,100,0.3)
|
|
|
87
87
|
padding: $panel-scrollable-padding;
|
|
88
88
|
border: $panel-scrollable-border-width solid $panel-scrollable-border;
|
|
89
89
|
overflow: auto;
|
|
90
|
-
-webkit-overflow-scrolling: touch;
|
|
91
90
|
resize: both;
|
|
92
91
|
@if(mixin-exists(hook-panel-scrollable)) {@include hook-panel-scrollable();}
|
|
93
92
|
}
|
|
@@ -139,10 +138,7 @@ $dragover-box-shadow: 0 0 20px rgba(100,100,100,0.3)
|
|
|
139
138
|
* Enable scrollbars if content is clipped
|
|
140
139
|
*/
|
|
141
140
|
|
|
142
|
-
.uk-overflow-auto {
|
|
143
|
-
overflow: auto;
|
|
144
|
-
-webkit-overflow-scrolling: touch;
|
|
145
|
-
}
|
|
141
|
+
.uk-overflow-auto { overflow: auto; }
|
|
146
142
|
|
|
147
143
|
.uk-overflow-auto > :last-child { margin-bottom: 0; }
|
|
148
144
|
|
package/tests/dropdown.html
CHANGED