uikit 3.17.4 → 3.17.5-dev.563196f5e
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 +6 -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 +11 -13
- 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 +11 -13
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/scrollspy-nav.js +2 -8
- package/src/js/util/viewport.js +14 -11
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.17.
|
|
5
|
+
"version": "3.17.5-dev.563196f5e",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
$$,
|
|
3
3
|
closest,
|
|
4
|
-
|
|
4
|
+
getCoveringElement,
|
|
5
5
|
getTargetedElement,
|
|
6
6
|
hasClass,
|
|
7
7
|
isSameSiteAnchor,
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
active = length - 1;
|
|
71
71
|
} else {
|
|
72
72
|
for (let i = 0; i < targets.length; i++) {
|
|
73
|
-
const fixedEl =
|
|
73
|
+
const fixedEl = getCoveringElement(targets[i]);
|
|
74
74
|
const offsetBy = this.offset + (fixedEl ? offset(fixedEl).height : 0);
|
|
75
75
|
if (offset(targets[i]).top - viewport.top - offsetBy > 0) {
|
|
76
76
|
break;
|
|
@@ -103,9 +103,3 @@ export default {
|
|
|
103
103
|
},
|
|
104
104
|
],
|
|
105
105
|
};
|
|
106
|
-
|
|
107
|
-
function findFixedElement(target) {
|
|
108
|
-
return target.ownerDocument
|
|
109
|
-
.elementsFromPoint(offset(target).left, 1)
|
|
110
|
-
.find((el) => ['fixed', 'sticky'].includes(css(el, 'position')) && !el.contains(target));
|
|
111
|
-
}
|
package/src/js/util/viewport.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { offset, offsetPosition } from './dimensions';
|
|
2
|
-
import { isVisible, parents } from './filter';
|
|
2
|
+
import { isVisible, parents, within } from './filter';
|
|
3
3
|
import {
|
|
4
4
|
clamp,
|
|
5
5
|
findIndex,
|
|
@@ -79,8 +79,8 @@ export function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
|
|
|
79
79
|
let diff = 0;
|
|
80
80
|
if (parents[0] === element && scroll + top < maxScroll) {
|
|
81
81
|
diff = offset(targetEl).top - targetTop;
|
|
82
|
-
const
|
|
83
|
-
diff -=
|
|
82
|
+
const coverEl = getCoveringElement(targetEl);
|
|
83
|
+
diff -= coverEl ? offset(coverEl).height : 0;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
element.scrollTop = Math[top + diff > 0 ? 'max' : 'min'](
|
|
@@ -107,14 +107,6 @@ export function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
|
|
|
107
107
|
function ease(k) {
|
|
108
108
|
return 0.5 * (1 - Math.cos(Math.PI * k));
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
function findFixedElement(target) {
|
|
112
|
-
return target.ownerDocument
|
|
113
|
-
.elementsFromPoint(offset(target).left, 0)
|
|
114
|
-
.find(
|
|
115
|
-
(el) => ['fixed', 'sticky'].includes(css(el, 'position')) && !el.contains(target),
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
110
|
}
|
|
119
111
|
|
|
120
112
|
export function scrolledOver(element, startOffset = 0, endOffset = 0) {
|
|
@@ -206,6 +198,17 @@ export function offsetViewport(scrollElement) {
|
|
|
206
198
|
return rect;
|
|
207
199
|
}
|
|
208
200
|
|
|
201
|
+
export function getCoveringElement(target) {
|
|
202
|
+
return target.ownerDocument
|
|
203
|
+
.elementsFromPoint(offset(target).left, 0)
|
|
204
|
+
.find(
|
|
205
|
+
(el) =>
|
|
206
|
+
!el.contains(target) &&
|
|
207
|
+
(css(el, 'position') === 'fixed' ||
|
|
208
|
+
(css(el, 'position') === 'sticky' && within(target, el.parentElement))),
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
|
|
209
212
|
function scrollingElement(element) {
|
|
210
213
|
return toWindow(element).document.scrollingElement;
|
|
211
214
|
}
|