uikit 3.9.3-dev.770c92c8a → 3.9.5-dev.13c625552
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 +18 -0
- package/build/build.js +4 -1
- package/build/util.js +24 -13
- package/dist/css/uikit-core-rtl.css +5 -2
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +5 -2
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +5 -2
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +5 -2
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -2
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -2
- package/dist/js/components/lightbox-panel.js +1 -1
- package/dist/js/components/lightbox-panel.min.js +1 -2
- package/dist/js/components/lightbox.js +1 -1
- package/dist/js/components/lightbox.min.js +1 -2
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -2
- package/dist/js/components/parallax.js +1 -1
- package/dist/js/components/parallax.min.js +1 -2
- package/dist/js/components/slider-parallax.js +1 -1
- package/dist/js/components/slider-parallax.min.js +1 -2
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -2
- package/dist/js/components/slideshow-parallax.js +1 -1
- package/dist/js/components/slideshow-parallax.min.js +1 -2
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -2
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -2
- package/dist/js/components/tooltip.js +1 -1
- package/dist/js/components/tooltip.min.js +1 -2
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -2
- package/dist/js/uikit-core.js +56 -46
- package/dist/js/uikit-core.min.js +1 -2
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -2
- package/dist/js/uikit.js +56 -46
- package/dist/js/uikit.min.js +1 -2
- package/package.json +6 -3
- package/src/js/core/img.js +53 -38
- package/src/js/core/sticky.js +3 -2
- package/src/less/components/utility.less +3 -1
- package/src/scss/components/utility.scss +2 -0
- package/src/scss/mixins-theme.scss +1 -1
- package/src/scss/mixins.scss +1 -1
- package/tests/comment.html +1 -1
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.9.
|
|
1
|
+
/*! UIkit 3.9.5-dev.13c625552 | https://www.getuikit.com | (c) 2014 - 2021 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -3465,7 +3465,7 @@
|
|
|
3465
3465
|
UIkit.data = '__uikit__';
|
|
3466
3466
|
UIkit.prefix = 'uk-';
|
|
3467
3467
|
UIkit.options = {};
|
|
3468
|
-
UIkit.version = '3.9.
|
|
3468
|
+
UIkit.version = '3.9.5-dev.13c625552';
|
|
3469
3469
|
|
|
3470
3470
|
globalAPI(UIkit);
|
|
3471
3471
|
hooksAPI(UIkit);
|
|
@@ -5785,12 +5785,7 @@
|
|
|
5785
5785
|
|
|
5786
5786
|
var img = {
|
|
5787
5787
|
|
|
5788
|
-
args: 'dataSrc',
|
|
5789
|
-
|
|
5790
5788
|
props: {
|
|
5791
|
-
dataSrc: String,
|
|
5792
|
-
dataSrcset: Boolean,
|
|
5793
|
-
sizes: String,
|
|
5794
5789
|
width: Number,
|
|
5795
5790
|
height: Number,
|
|
5796
5791
|
offsetTop: String,
|
|
@@ -5799,9 +5794,6 @@
|
|
|
5799
5794
|
},
|
|
5800
5795
|
|
|
5801
5796
|
data: {
|
|
5802
|
-
dataSrc: '',
|
|
5803
|
-
dataSrcset: false,
|
|
5804
|
-
sizes: false,
|
|
5805
5797
|
width: false,
|
|
5806
5798
|
height: false,
|
|
5807
5799
|
offsetTop: '50vh',
|
|
@@ -5811,10 +5803,8 @@
|
|
|
5811
5803
|
|
|
5812
5804
|
computed: {
|
|
5813
5805
|
|
|
5814
|
-
cacheKey: function(
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
return ((this.$name) + "." + dataSrc);
|
|
5806
|
+
cacheKey: function() {
|
|
5807
|
+
return ((this.$name) + "." + (data(this.$el, 'data-src')));
|
|
5818
5808
|
},
|
|
5819
5809
|
|
|
5820
5810
|
width: function(ref) {
|
|
@@ -5831,17 +5821,6 @@
|
|
|
5831
5821
|
return height || dataHeight;
|
|
5832
5822
|
},
|
|
5833
5823
|
|
|
5834
|
-
sizes: function(ref) {
|
|
5835
|
-
var sizes = ref.sizes;
|
|
5836
|
-
var dataSizes = ref.dataSizes;
|
|
5837
|
-
|
|
5838
|
-
return sizes || dataSizes;
|
|
5839
|
-
},
|
|
5840
|
-
|
|
5841
|
-
isImg: function(_, $el) {
|
|
5842
|
-
return isImg($el);
|
|
5843
|
-
},
|
|
5844
|
-
|
|
5845
5824
|
target: {
|
|
5846
5825
|
|
|
5847
5826
|
get: function(ref) {
|
|
@@ -5873,14 +5852,14 @@
|
|
|
5873
5852
|
connected: function() {
|
|
5874
5853
|
|
|
5875
5854
|
if (!window.IntersectionObserver) {
|
|
5876
|
-
setSrcAttrs(this.$el
|
|
5855
|
+
setSrcAttrs(this.$el);
|
|
5877
5856
|
return;
|
|
5878
5857
|
}
|
|
5879
5858
|
|
|
5880
5859
|
if (storage[this.cacheKey]) {
|
|
5881
|
-
setSrcAttrs(this.$el, storage[this.cacheKey]
|
|
5882
|
-
} else if (this
|
|
5883
|
-
|
|
5860
|
+
setSrcAttrs(this.$el, storage[this.cacheKey]);
|
|
5861
|
+
} else if (isImg(this.$el) && this.width && this.height) {
|
|
5862
|
+
attr(this.$el, 'src', getPlaceholderImage(this.$el));
|
|
5884
5863
|
}
|
|
5885
5864
|
|
|
5886
5865
|
this.observer = new IntersectionObserver(this.load, {
|
|
@@ -5910,7 +5889,7 @@
|
|
|
5910
5889
|
this.load(this.observer.takeRecords());
|
|
5911
5890
|
}
|
|
5912
5891
|
|
|
5913
|
-
if (this
|
|
5892
|
+
if (isImg(this.$el)) {
|
|
5914
5893
|
return false;
|
|
5915
5894
|
}
|
|
5916
5895
|
|
|
@@ -5918,14 +5897,15 @@
|
|
|
5918
5897
|
|
|
5919
5898
|
},
|
|
5920
5899
|
|
|
5921
|
-
write: function(
|
|
5900
|
+
write: function(store) {
|
|
5922
5901
|
|
|
5923
|
-
|
|
5902
|
+
var srcset = data(this.$el, 'data-srcset');
|
|
5903
|
+
if (srcset && window.devicePixelRatio !== 1) {
|
|
5924
5904
|
|
|
5925
5905
|
var bgSize = css(this.$el, 'backgroundSize');
|
|
5926
|
-
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) ===
|
|
5927
|
-
|
|
5928
|
-
css(this.$el, 'backgroundSize', ((
|
|
5906
|
+
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === store.bgSize) {
|
|
5907
|
+
store.bgSize = getSourceSize(srcset, data(this.$el, 'sizes'));
|
|
5908
|
+
css(this.$el, 'backgroundSize', ((store.bgSize) + "px"));
|
|
5929
5909
|
}
|
|
5930
5910
|
|
|
5931
5911
|
}
|
|
@@ -5947,9 +5927,9 @@
|
|
|
5947
5927
|
return;
|
|
5948
5928
|
}
|
|
5949
5929
|
|
|
5950
|
-
this._data.image =
|
|
5930
|
+
this._data.image = getImageFromElement(this.$el).then(function (img) {
|
|
5951
5931
|
|
|
5952
|
-
setSrcAttrs(this$1$1.$el, currentSrc(img)
|
|
5932
|
+
setSrcAttrs(this$1$1.$el, currentSrc(img));
|
|
5953
5933
|
storage[this$1$1.cacheKey] = currentSrc(img);
|
|
5954
5934
|
return img;
|
|
5955
5935
|
|
|
@@ -5970,13 +5950,18 @@
|
|
|
5970
5950
|
|
|
5971
5951
|
};
|
|
5972
5952
|
|
|
5973
|
-
|
|
5953
|
+
var srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
5954
|
+
function setSrcAttrs(el, src) {
|
|
5974
5955
|
|
|
5956
|
+
var parentNode = parent(el);
|
|
5975
5957
|
if (isImg(el)) {
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5958
|
+
(isPicture(parentNode) ? children(parentNode) : [el]).forEach(function (el) { return srcProps.forEach(function (prop) {
|
|
5959
|
+
var value = data(el, prop);
|
|
5960
|
+
if (value) {
|
|
5961
|
+
attr(el, prop.replace(/^(data-)+/, ''), value);
|
|
5962
|
+
}
|
|
5963
|
+
}); }
|
|
5964
|
+
);
|
|
5980
5965
|
} else if (src) {
|
|
5981
5966
|
|
|
5982
5967
|
var change = !includes(el.style.backgroundImage, src);
|
|
@@ -5989,9 +5974,12 @@
|
|
|
5989
5974
|
|
|
5990
5975
|
}
|
|
5991
5976
|
|
|
5992
|
-
function getPlaceholderImage(
|
|
5977
|
+
function getPlaceholderImage(el) {
|
|
5993
5978
|
var assign;
|
|
5994
5979
|
|
|
5980
|
+
var sizes = data(el, 'sizes');
|
|
5981
|
+
var width = data(el, 'width');
|
|
5982
|
+
var height = data(el, 'height');
|
|
5995
5983
|
|
|
5996
5984
|
if (sizes) {
|
|
5997
5985
|
((assign = Dimensions.ratio({width: width, height: height}, 'width', toPx(sizesToPixel(sizes))), width = assign.width, height = assign.height));
|
|
@@ -6016,6 +6004,19 @@
|
|
|
6016
6004
|
return matches || '100vw';
|
|
6017
6005
|
}
|
|
6018
6006
|
|
|
6007
|
+
function getImageFromElement(el) {
|
|
6008
|
+
var parentNode = parent(el);
|
|
6009
|
+
if (!isPicture(parentNode)) {
|
|
6010
|
+
return getImage.apply(void 0, srcProps.map(function (prop) { return data(el, prop); }));
|
|
6011
|
+
}
|
|
6012
|
+
|
|
6013
|
+
return new Promise(function (resolve, reject) {
|
|
6014
|
+
var picture = parentNode.cloneNode(true);
|
|
6015
|
+
once(picture, 'load error', function (e) { return e.type === 'error' ? reject(e) : resolve(e.target); }, true);
|
|
6016
|
+
setSrcAttrs(el);
|
|
6017
|
+
});
|
|
6018
|
+
}
|
|
6019
|
+
|
|
6019
6020
|
var sizeRe = /\d+(?:\w+|%)/g;
|
|
6020
6021
|
var additionRe = /[+-]?(\d+)/g;
|
|
6021
6022
|
function evaluateSize(size) {
|
|
@@ -6037,8 +6038,16 @@
|
|
|
6037
6038
|
return descriptors.filter(function (size) { return size >= srcSize; })[0] || descriptors.pop() || '';
|
|
6038
6039
|
}
|
|
6039
6040
|
|
|
6041
|
+
function isPicture(el) {
|
|
6042
|
+
return isA(el, 'PICTURE');
|
|
6043
|
+
}
|
|
6044
|
+
|
|
6040
6045
|
function isImg(el) {
|
|
6041
|
-
return el
|
|
6046
|
+
return isA(el, 'IMG');
|
|
6047
|
+
}
|
|
6048
|
+
|
|
6049
|
+
function isA(el, tagName) {
|
|
6050
|
+
return el && el.tagName === tagName;
|
|
6042
6051
|
}
|
|
6043
6052
|
|
|
6044
6053
|
function currentSrc(el) {
|
|
@@ -7837,9 +7846,10 @@
|
|
|
7837
7846
|
|
|
7838
7847
|
height = !this.isActive ? this.$el.offsetHeight : height;
|
|
7839
7848
|
|
|
7840
|
-
|
|
7849
|
+
var referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
7850
|
+
this.topOffset = offset(referenceElement).top;
|
|
7841
7851
|
this.bottomOffset = this.topOffset + height;
|
|
7842
|
-
this.offsetParentTop = offset(
|
|
7852
|
+
this.offsetParentTop = offset(referenceElement.offsetParent).top;
|
|
7843
7853
|
|
|
7844
7854
|
var bottom = parseProp('bottom', this);
|
|
7845
7855
|
|