uikit 3.13.8-dev.06ac04d2b → 3.13.8-dev.128538499
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 +2 -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 +2 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +2 -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 +2 -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 +43 -21
- 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 +43 -21
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/hooks.js +1 -1
- package/src/js/core/scrollspy.js +39 -17
- package/src/js/core/sticky.js +2 -2
- package/src/js/mixin/media.js +1 -0
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.8-dev.
|
|
5
|
+
"version": "3.13.8-dev.128538499",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/api/hooks.js
CHANGED
package/src/js/core/scrollspy.js
CHANGED
|
@@ -4,11 +4,12 @@ import {
|
|
|
4
4
|
css,
|
|
5
5
|
filter,
|
|
6
6
|
data as getData,
|
|
7
|
-
|
|
7
|
+
observeIntersection,
|
|
8
8
|
once,
|
|
9
9
|
removeClass,
|
|
10
10
|
removeClasses,
|
|
11
11
|
toggleClass,
|
|
12
|
+
toPx,
|
|
12
13
|
trigger,
|
|
13
14
|
} from 'uikit-util';
|
|
14
15
|
|
|
@@ -45,16 +46,49 @@ export default {
|
|
|
45
46
|
return target ? $$(target, $el) : [$el];
|
|
46
47
|
},
|
|
47
48
|
|
|
48
|
-
watch(elements) {
|
|
49
|
+
watch(elements, prev) {
|
|
49
50
|
if (this.hidden) {
|
|
50
51
|
css(filter(elements, `:not(.${this.inViewClass})`), 'visibility', 'hidden');
|
|
51
52
|
}
|
|
53
|
+
|
|
54
|
+
if (prev) {
|
|
55
|
+
this.$reset();
|
|
56
|
+
}
|
|
52
57
|
},
|
|
53
58
|
|
|
54
59
|
immediate: true,
|
|
55
60
|
},
|
|
56
61
|
},
|
|
57
62
|
|
|
63
|
+
connected() {
|
|
64
|
+
this.registerObserver(
|
|
65
|
+
observeIntersection(
|
|
66
|
+
this.elements,
|
|
67
|
+
(records) => {
|
|
68
|
+
for (const { target: el, isIntersecting } of records) {
|
|
69
|
+
if (!el[stateKey]) {
|
|
70
|
+
el[stateKey] = { cls: getData(el, 'uk-scrollspy-class') || this.cls };
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!this.repeat && el[stateKey].show) {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
el[stateKey].show = isIntersecting;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
this.$emit();
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
rootMargin: `${toPx(this.offsetTop, 'height') - 1}px ${
|
|
84
|
+
toPx(this.offsetLeft, 'width') - 1
|
|
85
|
+
}px`,
|
|
86
|
+
},
|
|
87
|
+
false
|
|
88
|
+
)
|
|
89
|
+
);
|
|
90
|
+
},
|
|
91
|
+
|
|
58
92
|
disconnected() {
|
|
59
93
|
for (const el of this.elements) {
|
|
60
94
|
removeClass(el, this.inViewClass, el[stateKey]?.cls || '');
|
|
@@ -64,24 +98,14 @@ export default {
|
|
|
64
98
|
|
|
65
99
|
update: [
|
|
66
100
|
{
|
|
67
|
-
|
|
101
|
+
write(data) {
|
|
68
102
|
for (const el of this.elements) {
|
|
69
|
-
|
|
70
|
-
el[stateKey] = { cls: getData(el, 'uk-scrollspy-class') || this.cls };
|
|
71
|
-
}
|
|
103
|
+
const state = el[stateKey];
|
|
72
104
|
|
|
73
|
-
if (!
|
|
105
|
+
if (!state) {
|
|
74
106
|
continue;
|
|
75
107
|
}
|
|
76
108
|
|
|
77
|
-
el[stateKey].show = isInView(el, this.offsetTop, this.offsetLeft);
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
write(data) {
|
|
82
|
-
for (const el of this.elements) {
|
|
83
|
-
const state = el[stateKey];
|
|
84
|
-
|
|
85
109
|
if (state.show && !state.inview && !state.queued) {
|
|
86
110
|
state.queued = true;
|
|
87
111
|
|
|
@@ -99,8 +123,6 @@ export default {
|
|
|
99
123
|
}
|
|
100
124
|
}
|
|
101
125
|
},
|
|
102
|
-
|
|
103
|
-
events: ['scroll', 'resize'],
|
|
104
126
|
},
|
|
105
127
|
],
|
|
106
128
|
|
package/src/js/core/sticky.js
CHANGED
|
@@ -137,13 +137,13 @@ export default {
|
|
|
137
137
|
return false;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
const hide = this.
|
|
140
|
+
const hide = this.active && types.has('resize');
|
|
141
141
|
if (hide) {
|
|
142
142
|
css(this.selTarget, 'transition', '0s');
|
|
143
143
|
this.hide();
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
if (!this.
|
|
146
|
+
if (!this.active) {
|
|
147
147
|
height = getOffset(this.$el).height;
|
|
148
148
|
margin = css(this.$el, 'margin');
|
|
149
149
|
}
|