uikit 3.13.11-dev.98491b3f4 → 3.13.11-dev.d3de726ee
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 +4 -1
- package/dist/css/uikit-core-rtl.css +6 -3
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +6 -3
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +6 -3
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +6 -3
- 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 +2 -2
- 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 +47 -26
- 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 +48 -27
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/slider.js +1 -1
- package/src/js/core/scrollspy-nav.js +2 -2
- package/src/js/core/sticky.js +36 -12
- package/src/js/util/position.js +3 -6
- package/src/less/components/sticky.less +8 -3
- package/src/scss/components/sticky.scss +8 -3
- package/tests/parallax.html +4 -4
- package/tests/sticky-navbar.html +6 -6
- package/tests/sticky-parallax.html +8 -8
- package/tests/sticky.html +149 -74
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.13.11-dev.
|
|
1
|
+
/*! UIkit 3.13.11-dev.d3de726ee | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -1983,8 +1983,7 @@
|
|
|
1983
1983
|
|
|
1984
1984
|
const position = offset(element);
|
|
1985
1985
|
const targetOffset = offset(target);
|
|
1986
|
-
for (const i
|
|
1987
|
-
const [prop, dir, start, end] = dirs[i];
|
|
1986
|
+
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1988
1987
|
position[start] = position[dir] =
|
|
1989
1988
|
targetOffset[start] +
|
|
1990
1989
|
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
@@ -2013,9 +2012,7 @@
|
|
|
2013
2012
|
viewports.push(viewport);
|
|
2014
2013
|
|
|
2015
2014
|
const offsetPosition = { ...position };
|
|
2016
|
-
for (const i
|
|
2017
|
-
const [prop, dir, start, end] = dirs[i];
|
|
2018
|
-
|
|
2015
|
+
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2019
2016
|
if (flip !== true && !includes(flip, dir)) {
|
|
2020
2017
|
continue;
|
|
2021
2018
|
}
|
|
@@ -2147,7 +2144,7 @@
|
|
|
2147
2144
|
}
|
|
2148
2145
|
|
|
2149
2146
|
function flipDir(prop) {
|
|
2150
|
-
for (
|
|
2147
|
+
for (let i = 0; i < dirs.length; i++) {
|
|
2151
2148
|
const index = dirs[i].indexOf(prop);
|
|
2152
2149
|
if (~index) {
|
|
2153
2150
|
return dirs[1 - i][index % 2 + 2];
|
|
@@ -2616,7 +2613,7 @@
|
|
|
2616
2613
|
continue;
|
|
2617
2614
|
}
|
|
2618
2615
|
|
|
2619
|
-
value = props[key] === Boolean && value === '' ? true : coerce(props[key], value);
|
|
2616
|
+
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2620
2617
|
|
|
2621
2618
|
if (prop === 'target' && (!value || startsWith(value, '_'))) {
|
|
2622
2619
|
continue;
|
|
@@ -2630,7 +2627,7 @@
|
|
|
2630
2627
|
for (const key in options) {
|
|
2631
2628
|
const prop = camelize(key);
|
|
2632
2629
|
if (props[prop] !== undefined) {
|
|
2633
|
-
data$1[prop] = coerce(props[prop], options[key]);
|
|
2630
|
+
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2634
2631
|
}
|
|
2635
2632
|
}
|
|
2636
2633
|
|
|
@@ -2695,7 +2692,7 @@
|
|
|
2695
2692
|
return options.every((arr) => !arr || !hasOwn(arr, key));
|
|
2696
2693
|
}
|
|
2697
2694
|
|
|
2698
|
-
function coerce(type, value) {
|
|
2695
|
+
function coerce$1(type, value) {
|
|
2699
2696
|
if (type === Boolean) {
|
|
2700
2697
|
return toBoolean(value);
|
|
2701
2698
|
} else if (type === Number) {
|
|
@@ -2733,7 +2730,7 @@
|
|
|
2733
2730
|
if (isUndefined(data[key])) {
|
|
2734
2731
|
delete data[key];
|
|
2735
2732
|
} else if (props[key]) {
|
|
2736
|
-
data[key] = coerce(props[key], data[key]);
|
|
2733
|
+
data[key] = coerce$1(props[key], data[key]);
|
|
2737
2734
|
}
|
|
2738
2735
|
}
|
|
2739
2736
|
|
|
@@ -2958,7 +2955,7 @@
|
|
|
2958
2955
|
UIkit.data = '__uikit__';
|
|
2959
2956
|
UIkit.prefix = 'uk-';
|
|
2960
2957
|
UIkit.options = {};
|
|
2961
|
-
UIkit.version = '3.13.11-dev.
|
|
2958
|
+
UIkit.version = '3.13.11-dev.d3de726ee';
|
|
2962
2959
|
|
|
2963
2960
|
globalAPI(UIkit);
|
|
2964
2961
|
hooksAPI(UIkit);
|
|
@@ -6549,7 +6546,7 @@
|
|
|
6549
6546
|
if (scrollTop === max) {
|
|
6550
6547
|
active = length - 1;
|
|
6551
6548
|
} else {
|
|
6552
|
-
for (
|
|
6549
|
+
for (let i = 0; i < targets.length; i++) {
|
|
6553
6550
|
if (offset(targets[i]).top - viewport.top - this.offset > 0) {
|
|
6554
6551
|
break;
|
|
6555
6552
|
}
|
|
@@ -6568,7 +6565,7 @@
|
|
|
6568
6565
|
const changed = active !== false && !hasClass(this.elements[active], this.cls);
|
|
6569
6566
|
|
|
6570
6567
|
this.links.forEach((el) => el.blur());
|
|
6571
|
-
for (
|
|
6568
|
+
for (let i = 0; i < this.elements.length; i++) {
|
|
6572
6569
|
toggleClass(this.elements[i], this.cls, +i === active);
|
|
6573
6570
|
}
|
|
6574
6571
|
|
|
@@ -6584,11 +6581,12 @@
|
|
|
6584
6581
|
|
|
6585
6582
|
props: {
|
|
6586
6583
|
position: String,
|
|
6587
|
-
top:
|
|
6588
|
-
bottom:
|
|
6589
|
-
start:
|
|
6590
|
-
end:
|
|
6584
|
+
top: null,
|
|
6585
|
+
bottom: null,
|
|
6586
|
+
start: null,
|
|
6587
|
+
end: null,
|
|
6591
6588
|
offset: String,
|
|
6589
|
+
overflowFlip: Boolean,
|
|
6592
6590
|
animation: String,
|
|
6593
6591
|
clsActive: String,
|
|
6594
6592
|
clsInactive: String,
|
|
@@ -6606,6 +6604,7 @@
|
|
|
6606
6604
|
start: false,
|
|
6607
6605
|
end: false,
|
|
6608
6606
|
offset: 0,
|
|
6607
|
+
overflowFlip: false,
|
|
6609
6608
|
animation: '',
|
|
6610
6609
|
clsActive: 'uk-active',
|
|
6611
6610
|
clsInactive: '',
|
|
@@ -6627,8 +6626,8 @@
|
|
|
6627
6626
|
},
|
|
6628
6627
|
|
|
6629
6628
|
connected() {
|
|
6630
|
-
this.start = this.start || this.top;
|
|
6631
|
-
this.end = this.end || this.bottom;
|
|
6629
|
+
this.start = coerce(this.start || this.top);
|
|
6630
|
+
this.end = coerce(this.end || this.bottom);
|
|
6632
6631
|
|
|
6633
6632
|
this.placeholder =
|
|
6634
6633
|
$('+ .uk-sticky-placeholder', this.$el) ||
|
|
@@ -6648,6 +6647,17 @@
|
|
|
6648
6647
|
},
|
|
6649
6648
|
|
|
6650
6649
|
events: [
|
|
6650
|
+
{
|
|
6651
|
+
name: 'resize',
|
|
6652
|
+
|
|
6653
|
+
el() {
|
|
6654
|
+
return window;
|
|
6655
|
+
},
|
|
6656
|
+
|
|
6657
|
+
handler() {
|
|
6658
|
+
this.$emit('resize');
|
|
6659
|
+
} },
|
|
6660
|
+
|
|
6651
6661
|
{
|
|
6652
6662
|
name: 'load hashchange popstate',
|
|
6653
6663
|
|
|
@@ -6673,8 +6683,8 @@
|
|
|
6673
6683
|
window,
|
|
6674
6684
|
targetOffset.top -
|
|
6675
6685
|
elOffset.height -
|
|
6676
|
-
toPx(this.targetOffset, 'height') -
|
|
6677
|
-
toPx(this.offset, 'height'));
|
|
6686
|
+
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6687
|
+
toPx(this.offset, 'height', this.placeholder));
|
|
6678
6688
|
|
|
6679
6689
|
}
|
|
6680
6690
|
});
|
|
@@ -6711,16 +6721,18 @@
|
|
|
6711
6721
|
const windowHeight = height(window);
|
|
6712
6722
|
|
|
6713
6723
|
let position = this.position;
|
|
6714
|
-
if (
|
|
6715
|
-
position = 'bottom';
|
|
6724
|
+
if (this.overflowFlip && height$1 > windowHeight) {
|
|
6725
|
+
position = position === 'top' ? 'bottom' : 'top';
|
|
6716
6726
|
}
|
|
6717
6727
|
|
|
6718
6728
|
let offset$1 = toPx(this.offset, 'height', referenceElement);
|
|
6719
|
-
if (position === 'bottom') {
|
|
6729
|
+
if (position === 'bottom' && (height$1 < windowHeight || this.overflowFlip)) {
|
|
6720
6730
|
offset$1 += windowHeight - height$1;
|
|
6721
6731
|
}
|
|
6722
6732
|
|
|
6723
|
-
const overflow =
|
|
6733
|
+
const overflow = this.overflowFlip ?
|
|
6734
|
+
0 :
|
|
6735
|
+
Math.max(0, height$1 + offset$1 - windowHeight);
|
|
6724
6736
|
const topOffset = offset(referenceElement).top;
|
|
6725
6737
|
|
|
6726
6738
|
const start =
|
|
@@ -6949,6 +6961,15 @@
|
|
|
6949
6961
|
}
|
|
6950
6962
|
}
|
|
6951
6963
|
|
|
6964
|
+
function coerce(value) {
|
|
6965
|
+
if (value === 'true') {
|
|
6966
|
+
return true;
|
|
6967
|
+
} else if (value === 'false') {
|
|
6968
|
+
return false;
|
|
6969
|
+
}
|
|
6970
|
+
return value;
|
|
6971
|
+
}
|
|
6972
|
+
|
|
6952
6973
|
var Switcher = {
|
|
6953
6974
|
mixins: [Lazyload, Swipe, Togglable],
|
|
6954
6975
|
|
|
@@ -9901,7 +9922,7 @@
|
|
|
9901
9922
|
let left = 0;
|
|
9902
9923
|
const sets = [];
|
|
9903
9924
|
const width = dimensions$1(this.list).width;
|
|
9904
|
-
for (let i
|
|
9925
|
+
for (let i = 0; i < this.slides.length; i++) {
|
|
9905
9926
|
const slideWidth = dimensions$1(this.slides[i]).width;
|
|
9906
9927
|
|
|
9907
9928
|
if (left + slideWidth > width) {
|