uikit 3.21.5-dev.ed4adca92 → 3.21.6-dev.4d6c5e2f9
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 +10 -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 +7 -2
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +7 -2
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +7 -2
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +7 -2
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +7 -2
- 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 +30 -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 +30 -17
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/drop.js +5 -1
- package/src/js/core/dropnav.js +3 -2
- package/src/js/core/height-viewport.js +2 -3
- package/src/js/core/icon.js +1 -1
- package/src/js/core/scrollspy-nav.js +1 -1
- package/src/js/core/sticky.js +14 -5
- package/src/js/mixin/position.js +1 -1
- package/src/js/util/dom.js +1 -2
- package/src/js/util/player.js +2 -2
- package/src/js/util/svg.js +3 -1
- package/tests/js/index.js +1 -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.21.
|
|
5
|
+
"version": "3.21.6-dev.4d6c5e2f9",
|
|
6
6
|
"main": "dist/js/uikit.js",
|
|
7
7
|
"style": "dist/css/uikit.css",
|
|
8
8
|
"sideEffects": [
|
package/src/js/core/drop.js
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
removeClass,
|
|
30
30
|
} from 'uikit-util';
|
|
31
31
|
import Container from '../mixin/container';
|
|
32
|
-
import Position from '../mixin/position';
|
|
32
|
+
import Position, { storeScrollPosition } from '../mixin/position';
|
|
33
33
|
import Togglable from '../mixin/togglable';
|
|
34
34
|
import { keyMap } from '../util/keys';
|
|
35
35
|
import { preventBackgroundScroll } from '../util/scroll';
|
|
@@ -375,6 +375,8 @@ export default {
|
|
|
375
375
|
},
|
|
376
376
|
|
|
377
377
|
position() {
|
|
378
|
+
const restoreScrollPosition = storeScrollPosition(this.$el);
|
|
379
|
+
|
|
378
380
|
removeClass(this.$el, 'uk-drop-stack');
|
|
379
381
|
css(this.$el, this._style);
|
|
380
382
|
|
|
@@ -439,6 +441,8 @@ export default {
|
|
|
439
441
|
this.positionAt(this.$el, this.target, this.boundary);
|
|
440
442
|
}
|
|
441
443
|
}
|
|
444
|
+
|
|
445
|
+
restoreScrollPosition();
|
|
442
446
|
},
|
|
443
447
|
},
|
|
444
448
|
};
|
package/src/js/core/dropnav.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
hasClass,
|
|
10
10
|
height,
|
|
11
11
|
includes,
|
|
12
|
+
isInput,
|
|
12
13
|
isRtl,
|
|
13
14
|
matches,
|
|
14
15
|
noop,
|
|
@@ -172,9 +173,9 @@ export default {
|
|
|
172
173
|
delegate: ({ clsDrop }) => `.${clsDrop}`,
|
|
173
174
|
|
|
174
175
|
handler(e) {
|
|
175
|
-
const { current, keyCode } = e;
|
|
176
|
+
const { current, keyCode, target } = e;
|
|
176
177
|
|
|
177
|
-
if (!includes(this.dropdowns, current)) {
|
|
178
|
+
if (isInput(target) || !includes(this.dropdowns, current)) {
|
|
178
179
|
return;
|
|
179
180
|
}
|
|
180
181
|
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
isNumeric,
|
|
7
7
|
isString,
|
|
8
8
|
isVisible,
|
|
9
|
-
|
|
9
|
+
offset,
|
|
10
10
|
offsetViewport,
|
|
11
11
|
query,
|
|
12
12
|
scrollParent,
|
|
@@ -64,8 +64,7 @@ export default {
|
|
|
64
64
|
if (isScrollingElement) {
|
|
65
65
|
const offsetTopEl =
|
|
66
66
|
this.offsetTop === true ? this.$el : query(this.offsetTop, this.$el);
|
|
67
|
-
const top =
|
|
68
|
-
offsetPosition(offsetTopEl)[0] - offsetPosition(scrollElement)[0];
|
|
67
|
+
const { top } = offset(offsetTopEl);
|
|
69
68
|
minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : '';
|
|
70
69
|
} else {
|
|
71
70
|
minHeight += ` - ${boxModelAdjust(scrollElement, 'height', css(scrollElement, 'boxSizing'))}px`;
|
package/src/js/core/icon.js
CHANGED
|
@@ -25,8 +25,8 @@ import overlayIcon from '../../images/components/overlay-icon.svg';
|
|
|
25
25
|
import paginationNext from '../../images/components/pagination-next.svg';
|
|
26
26
|
import paginationPrevious from '../../images/components/pagination-previous.svg';
|
|
27
27
|
import searchIcon from '../../images/components/search-icon.svg';
|
|
28
|
-
import searchMedium from '../../images/components/search-medium.svg';
|
|
29
28
|
import searchLarge from '../../images/components/search-large.svg';
|
|
29
|
+
import searchMedium from '../../images/components/search-medium.svg';
|
|
30
30
|
import slidenavNextLarge from '../../images/components/slidenav-next-large.svg';
|
|
31
31
|
import slidenavNext from '../../images/components/slidenav-next.svg';
|
|
32
32
|
import slidenavPreviousLarge from '../../images/components/slidenav-previous-large.svg';
|
package/src/js/core/sticky.js
CHANGED
|
@@ -100,10 +100,11 @@ export default {
|
|
|
100
100
|
viewport(),
|
|
101
101
|
scroll({ target: () => document.scrollingElement }),
|
|
102
102
|
resize({
|
|
103
|
-
target: ({ $el }) => [$el,
|
|
103
|
+
target: ({ $el }) => [$el, getVisibleParent($el), document.scrollingElement],
|
|
104
104
|
handler(entries) {
|
|
105
105
|
this.$emit(
|
|
106
|
-
this._data.resized &&
|
|
106
|
+
this._data.resized &&
|
|
107
|
+
entries.some(({ target }) => target === getVisibleParent(this.$el))
|
|
107
108
|
? 'update'
|
|
108
109
|
: 'resize',
|
|
109
110
|
);
|
|
@@ -147,7 +148,7 @@ export default {
|
|
|
147
148
|
update: [
|
|
148
149
|
{
|
|
149
150
|
read({ height, width, margin, sticky }, types) {
|
|
150
|
-
this.inactive = !this.matchMedia || !isVisible(this.$el);
|
|
151
|
+
this.inactive = !this.matchMedia || !isVisible(this.$el) || !this.$el.offsetHeight;
|
|
151
152
|
|
|
152
153
|
if (this.inactive) {
|
|
153
154
|
return;
|
|
@@ -214,7 +215,7 @@ export default {
|
|
|
214
215
|
maxScrollHeight,
|
|
215
216
|
parseProp(true, this.$el, 0, true) - elHeight - offset + overflow,
|
|
216
217
|
) &&
|
|
217
|
-
css(
|
|
218
|
+
css(getVisibleParent(this.$el), 'overflowY') === 'visible';
|
|
218
219
|
|
|
219
220
|
return {
|
|
220
221
|
start,
|
|
@@ -456,7 +457,7 @@ function parseProp(value, el, propOffset, padding) {
|
|
|
456
457
|
if (isNumeric(value) || (isString(value) && value.match(/^-?\d/))) {
|
|
457
458
|
return propOffset + toPx(value, 'height', el, true);
|
|
458
459
|
} else {
|
|
459
|
-
const refElement = value === true ?
|
|
460
|
+
const refElement = value === true ? getVisibleParent(el) : query(value, el);
|
|
460
461
|
return (
|
|
461
462
|
getOffset(refElement).bottom -
|
|
462
463
|
(padding && refElement?.contains(el) ? toFloat(css(refElement, 'paddingBottom')) : 0)
|
|
@@ -484,3 +485,11 @@ function preventTransition(element) {
|
|
|
484
485
|
requestAnimationFrame(() => removeClass(element, clsTransitionDisable));
|
|
485
486
|
}
|
|
486
487
|
}
|
|
488
|
+
|
|
489
|
+
function getVisibleParent(element) {
|
|
490
|
+
while ((element = parent(element))) {
|
|
491
|
+
if (isVisible(element)) {
|
|
492
|
+
return element;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
package/src/js/mixin/position.js
CHANGED
package/src/js/util/dom.js
CHANGED
package/src/js/util/player.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isTag } from './dom';
|
|
2
2
|
import { once } from './event';
|
|
3
|
-
import { includes } from './lang';
|
|
3
|
+
import { includes, noop } from './lang';
|
|
4
4
|
|
|
5
5
|
export function play(el) {
|
|
6
6
|
if (isIFrame(el)) {
|
|
@@ -8,7 +8,7 @@ export function play(el) {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
if (isHTML5(el)) {
|
|
11
|
-
el.play();
|
|
11
|
+
el.play().catch(noop);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
package/src/js/util/svg.js
CHANGED
|
@@ -3,6 +3,8 @@ import { isVisible } from './filter.js';
|
|
|
3
3
|
|
|
4
4
|
export function getMaxPathLength(el) {
|
|
5
5
|
return isVisible(el)
|
|
6
|
-
? Math.ceil(
|
|
6
|
+
? Math.ceil(
|
|
7
|
+
Math.max(0, ...$$('[stroke]', el).map((stroke) => stroke.getTotalLength?.() || 0)),
|
|
8
|
+
)
|
|
7
9
|
: 0;
|
|
8
10
|
}
|
package/tests/js/index.js
CHANGED