uikit 3.15.5-dev.9a62efcdc → 3.15.6-dev.13ff682af
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 +12 -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 +36 -8
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +36 -8
- 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 +7 -4
- 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 +7 -4
- 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 +58 -30
- package/dist/js/uikit-core.min.js +2 -2
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +64 -33
- package/dist/js/uikit.min.js +2 -2
- package/package.json +1 -1
- package/src/js/core/drop.js +10 -4
- package/src/js/core/offcanvas.js +0 -14
- package/src/js/core/scrollspy-nav.js +2 -1
- package/src/js/core/switcher.js +17 -5
- package/src/js/mixin/modal.js +25 -0
- package/src/js/mixin/slider-drag.js +7 -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.15.
|
|
5
|
+
"version": "3.15.6-dev.13ff682af",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/drop.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
scrollParents,
|
|
31
31
|
within,
|
|
32
32
|
} from 'uikit-util';
|
|
33
|
-
import { preventBackgroundScroll, preventOverscroll } from '../mixin/modal';
|
|
33
|
+
import { isSameSiteAnchor, preventBackgroundScroll, preventOverscroll } from '../mixin/modal';
|
|
34
34
|
|
|
35
35
|
export let active;
|
|
36
36
|
|
|
@@ -143,11 +143,17 @@ export default {
|
|
|
143
143
|
name: 'click',
|
|
144
144
|
|
|
145
145
|
delegate() {
|
|
146
|
-
return 'a[href
|
|
146
|
+
return 'a[href*="#"]';
|
|
147
147
|
},
|
|
148
148
|
|
|
149
|
-
handler({ defaultPrevented, current
|
|
150
|
-
|
|
149
|
+
handler({ defaultPrevented, current }) {
|
|
150
|
+
const { hash } = current;
|
|
151
|
+
if (
|
|
152
|
+
!defaultPrevented &&
|
|
153
|
+
hash &&
|
|
154
|
+
isSameSiteAnchor(current) &&
|
|
155
|
+
!within(hash, this.$el)
|
|
156
|
+
) {
|
|
151
157
|
this.hide(false);
|
|
152
158
|
}
|
|
153
159
|
},
|
package/src/js/core/offcanvas.js
CHANGED
|
@@ -79,20 +79,6 @@ export default {
|
|
|
79
79
|
},
|
|
80
80
|
|
|
81
81
|
events: [
|
|
82
|
-
{
|
|
83
|
-
name: 'click',
|
|
84
|
-
|
|
85
|
-
delegate() {
|
|
86
|
-
return 'a[href^="#"]';
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
handler({ current: { hash }, defaultPrevented }) {
|
|
90
|
-
if (!defaultPrevented && hash && $(hash, document.body)) {
|
|
91
|
-
this.hide();
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
|
|
96
82
|
{
|
|
97
83
|
name: 'touchmove',
|
|
98
84
|
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
trigger,
|
|
12
12
|
} from 'uikit-util';
|
|
13
13
|
import { getTargetElement } from './scroll';
|
|
14
|
+
import { isSameSiteAnchor } from '../mixin/modal';
|
|
14
15
|
|
|
15
16
|
export default {
|
|
16
17
|
mixins: [Scroll],
|
|
@@ -34,7 +35,7 @@ export default {
|
|
|
34
35
|
computed: {
|
|
35
36
|
links: {
|
|
36
37
|
get(_, $el) {
|
|
37
|
-
return $$('a[href
|
|
38
|
+
return $$('a[href*="#"]', $el).filter((el) => el.hash && isSameSiteAnchor(el));
|
|
38
39
|
},
|
|
39
40
|
|
|
40
41
|
watch(links) {
|
package/src/js/core/switcher.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
getIndex,
|
|
13
13
|
hasClass,
|
|
14
14
|
matches,
|
|
15
|
+
observeMutation,
|
|
15
16
|
queryAll,
|
|
16
17
|
ready,
|
|
17
18
|
toggleClass,
|
|
@@ -51,11 +52,22 @@ export default {
|
|
|
51
52
|
css(connects, 'touchAction', 'pan-y pinch-zoom');
|
|
52
53
|
}
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
this.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
this._observer?.disconnect();
|
|
56
|
+
this.registerObserver(
|
|
57
|
+
(this._observer = observeMutation(
|
|
58
|
+
connects,
|
|
59
|
+
(records) => {
|
|
60
|
+
const index = this.index();
|
|
61
|
+
for (const { target: el } of records) {
|
|
62
|
+
children(el).forEach((child, i) =>
|
|
63
|
+
toggleClass(child, this.cls, i === index)
|
|
64
|
+
);
|
|
65
|
+
this.lazyload(this.$el, children(el));
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{ childList: true }
|
|
69
|
+
))
|
|
70
|
+
);
|
|
59
71
|
},
|
|
60
72
|
|
|
61
73
|
immediate: true,
|
package/src/js/mixin/modal.js
CHANGED
|
@@ -81,6 +81,27 @@ export default {
|
|
|
81
81
|
},
|
|
82
82
|
},
|
|
83
83
|
|
|
84
|
+
{
|
|
85
|
+
name: 'click',
|
|
86
|
+
|
|
87
|
+
delegate() {
|
|
88
|
+
return 'a[href*="#"]';
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
handler({ current, defaultPrevented }) {
|
|
92
|
+
const { hash } = current;
|
|
93
|
+
if (
|
|
94
|
+
!defaultPrevented &&
|
|
95
|
+
hash &&
|
|
96
|
+
isSameSiteAnchor(current) &&
|
|
97
|
+
!within(hash, this.$el) &&
|
|
98
|
+
$(hash, document.body)
|
|
99
|
+
) {
|
|
100
|
+
this.hide();
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
|
|
84
105
|
{
|
|
85
106
|
name: 'toggle',
|
|
86
107
|
|
|
@@ -361,3 +382,7 @@ function filterChildren(el, fn) {
|
|
|
361
382
|
});
|
|
362
383
|
return children;
|
|
363
384
|
}
|
|
385
|
+
|
|
386
|
+
export function isSameSiteAnchor(a) {
|
|
387
|
+
return ['origin', 'pathname', 'search'].every((part) => a[part] === location[part]);
|
|
388
|
+
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
off,
|
|
10
10
|
on,
|
|
11
11
|
selInput,
|
|
12
|
+
toNodes,
|
|
12
13
|
trigger,
|
|
13
14
|
} from 'uikit-util';
|
|
14
15
|
|
|
@@ -52,7 +53,7 @@ export default {
|
|
|
52
53
|
handler(e) {
|
|
53
54
|
if (
|
|
54
55
|
!this.draggable ||
|
|
55
|
-
(!isTouch(e) &&
|
|
56
|
+
(!isTouch(e) && hasSelectableText(e.target)) ||
|
|
56
57
|
closest(e.target, selInput) ||
|
|
57
58
|
e.button > 0 ||
|
|
58
59
|
this.length < 2
|
|
@@ -221,6 +222,9 @@ export default {
|
|
|
221
222
|
},
|
|
222
223
|
};
|
|
223
224
|
|
|
224
|
-
function
|
|
225
|
-
return
|
|
225
|
+
function hasSelectableText(el) {
|
|
226
|
+
return (
|
|
227
|
+
css(el, 'userSelect') !== 'none' &&
|
|
228
|
+
toNodes(el.childNodes).some((el) => el.nodeType === 3 && el.textContent.trim())
|
|
229
|
+
);
|
|
226
230
|
}
|