uikit 3.9.4 → 3.9.5-dev.630197adb
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 +7 -0
- package/build/util.js +4 -1
- 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 +55 -45
- 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 +55 -45
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/core/drop.js +3 -2
- package/src/js/core/img.js +53 -38
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.9.
|
|
1
|
+
/*! UIkit 3.9.5-dev.630197adb | 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.630197adb';
|
|
3469
3469
|
|
|
3470
3470
|
globalAPI(UIkit);
|
|
3471
3471
|
hooksAPI(UIkit);
|
|
@@ -4327,7 +4327,8 @@
|
|
|
4327
4327
|
this.target = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4328
4328
|
target: this.$el,
|
|
4329
4329
|
mode: this.mode
|
|
4330
|
-
});
|
|
4330
|
+
}).$el;
|
|
4331
|
+
attr(this.target, 'aria-haspopup', true);
|
|
4331
4332
|
}
|
|
4332
4333
|
|
|
4333
4334
|
},
|
|
@@ -5785,12 +5786,7 @@
|
|
|
5785
5786
|
|
|
5786
5787
|
var img = {
|
|
5787
5788
|
|
|
5788
|
-
args: 'dataSrc',
|
|
5789
|
-
|
|
5790
5789
|
props: {
|
|
5791
|
-
dataSrc: String,
|
|
5792
|
-
dataSrcset: Boolean,
|
|
5793
|
-
sizes: String,
|
|
5794
5790
|
width: Number,
|
|
5795
5791
|
height: Number,
|
|
5796
5792
|
offsetTop: String,
|
|
@@ -5799,9 +5795,6 @@
|
|
|
5799
5795
|
},
|
|
5800
5796
|
|
|
5801
5797
|
data: {
|
|
5802
|
-
dataSrc: '',
|
|
5803
|
-
dataSrcset: false,
|
|
5804
|
-
sizes: false,
|
|
5805
5798
|
width: false,
|
|
5806
5799
|
height: false,
|
|
5807
5800
|
offsetTop: '50vh',
|
|
@@ -5811,10 +5804,8 @@
|
|
|
5811
5804
|
|
|
5812
5805
|
computed: {
|
|
5813
5806
|
|
|
5814
|
-
cacheKey: function(
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
return ((this.$name) + "." + dataSrc);
|
|
5807
|
+
cacheKey: function() {
|
|
5808
|
+
return ((this.$name) + "." + (data(this.$el, 'data-src')));
|
|
5818
5809
|
},
|
|
5819
5810
|
|
|
5820
5811
|
width: function(ref) {
|
|
@@ -5831,17 +5822,6 @@
|
|
|
5831
5822
|
return height || dataHeight;
|
|
5832
5823
|
},
|
|
5833
5824
|
|
|
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
5825
|
target: {
|
|
5846
5826
|
|
|
5847
5827
|
get: function(ref) {
|
|
@@ -5873,14 +5853,14 @@
|
|
|
5873
5853
|
connected: function() {
|
|
5874
5854
|
|
|
5875
5855
|
if (!window.IntersectionObserver) {
|
|
5876
|
-
setSrcAttrs(this.$el
|
|
5856
|
+
setSrcAttrs(this.$el);
|
|
5877
5857
|
return;
|
|
5878
5858
|
}
|
|
5879
5859
|
|
|
5880
5860
|
if (storage[this.cacheKey]) {
|
|
5881
|
-
setSrcAttrs(this.$el, storage[this.cacheKey]
|
|
5882
|
-
} else if (this
|
|
5883
|
-
|
|
5861
|
+
setSrcAttrs(this.$el, storage[this.cacheKey]);
|
|
5862
|
+
} else if (isImg(this.$el) && this.width && this.height) {
|
|
5863
|
+
attr(this.$el, 'src', getPlaceholderImage(this.$el));
|
|
5884
5864
|
}
|
|
5885
5865
|
|
|
5886
5866
|
this.observer = new IntersectionObserver(this.load, {
|
|
@@ -5910,7 +5890,7 @@
|
|
|
5910
5890
|
this.load(this.observer.takeRecords());
|
|
5911
5891
|
}
|
|
5912
5892
|
|
|
5913
|
-
if (this
|
|
5893
|
+
if (isImg(this.$el)) {
|
|
5914
5894
|
return false;
|
|
5915
5895
|
}
|
|
5916
5896
|
|
|
@@ -5918,14 +5898,15 @@
|
|
|
5918
5898
|
|
|
5919
5899
|
},
|
|
5920
5900
|
|
|
5921
|
-
write: function(
|
|
5901
|
+
write: function(store) {
|
|
5922
5902
|
|
|
5923
|
-
|
|
5903
|
+
var srcset = data(this.$el, 'data-srcset');
|
|
5904
|
+
if (srcset && window.devicePixelRatio !== 1) {
|
|
5924
5905
|
|
|
5925
5906
|
var bgSize = css(this.$el, 'backgroundSize');
|
|
5926
|
-
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) ===
|
|
5927
|
-
|
|
5928
|
-
css(this.$el, 'backgroundSize', ((
|
|
5907
|
+
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === store.bgSize) {
|
|
5908
|
+
store.bgSize = getSourceSize(srcset, data(this.$el, 'sizes'));
|
|
5909
|
+
css(this.$el, 'backgroundSize', ((store.bgSize) + "px"));
|
|
5929
5910
|
}
|
|
5930
5911
|
|
|
5931
5912
|
}
|
|
@@ -5947,9 +5928,9 @@
|
|
|
5947
5928
|
return;
|
|
5948
5929
|
}
|
|
5949
5930
|
|
|
5950
|
-
this._data.image =
|
|
5931
|
+
this._data.image = getImageFromElement(this.$el).then(function (img) {
|
|
5951
5932
|
|
|
5952
|
-
setSrcAttrs(this$1$1.$el, currentSrc(img)
|
|
5933
|
+
setSrcAttrs(this$1$1.$el, currentSrc(img));
|
|
5953
5934
|
storage[this$1$1.cacheKey] = currentSrc(img);
|
|
5954
5935
|
return img;
|
|
5955
5936
|
|
|
@@ -5970,13 +5951,18 @@
|
|
|
5970
5951
|
|
|
5971
5952
|
};
|
|
5972
5953
|
|
|
5973
|
-
|
|
5954
|
+
var srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
5955
|
+
function setSrcAttrs(el, src) {
|
|
5974
5956
|
|
|
5957
|
+
var parentNode = parent(el);
|
|
5975
5958
|
if (isImg(el)) {
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5959
|
+
(isPicture(parentNode) ? children(parentNode) : [el]).forEach(function (el) { return srcProps.forEach(function (prop) {
|
|
5960
|
+
var value = data(el, prop);
|
|
5961
|
+
if (value) {
|
|
5962
|
+
attr(el, prop.replace(/^(data-)+/, ''), value);
|
|
5963
|
+
}
|
|
5964
|
+
}); }
|
|
5965
|
+
);
|
|
5980
5966
|
} else if (src) {
|
|
5981
5967
|
|
|
5982
5968
|
var change = !includes(el.style.backgroundImage, src);
|
|
@@ -5989,9 +5975,12 @@
|
|
|
5989
5975
|
|
|
5990
5976
|
}
|
|
5991
5977
|
|
|
5992
|
-
function getPlaceholderImage(
|
|
5978
|
+
function getPlaceholderImage(el) {
|
|
5993
5979
|
var assign;
|
|
5994
5980
|
|
|
5981
|
+
var sizes = data(el, 'sizes');
|
|
5982
|
+
var width = data(el, 'width');
|
|
5983
|
+
var height = data(el, 'height');
|
|
5995
5984
|
|
|
5996
5985
|
if (sizes) {
|
|
5997
5986
|
((assign = Dimensions.ratio({width: width, height: height}, 'width', toPx(sizesToPixel(sizes))), width = assign.width, height = assign.height));
|
|
@@ -6016,6 +6005,19 @@
|
|
|
6016
6005
|
return matches || '100vw';
|
|
6017
6006
|
}
|
|
6018
6007
|
|
|
6008
|
+
function getImageFromElement(el) {
|
|
6009
|
+
var parentNode = parent(el);
|
|
6010
|
+
if (!isPicture(parentNode)) {
|
|
6011
|
+
return getImage.apply(void 0, srcProps.map(function (prop) { return data(el, prop); }));
|
|
6012
|
+
}
|
|
6013
|
+
|
|
6014
|
+
return new Promise(function (resolve, reject) {
|
|
6015
|
+
var picture = parentNode.cloneNode(true);
|
|
6016
|
+
once(picture, 'load error', function (e) { return e.type === 'error' ? reject(e) : resolve(e.target); }, true);
|
|
6017
|
+
setSrcAttrs(el);
|
|
6018
|
+
});
|
|
6019
|
+
}
|
|
6020
|
+
|
|
6019
6021
|
var sizeRe = /\d+(?:\w+|%)/g;
|
|
6020
6022
|
var additionRe = /[+-]?(\d+)/g;
|
|
6021
6023
|
function evaluateSize(size) {
|
|
@@ -6037,8 +6039,16 @@
|
|
|
6037
6039
|
return descriptors.filter(function (size) { return size >= srcSize; })[0] || descriptors.pop() || '';
|
|
6038
6040
|
}
|
|
6039
6041
|
|
|
6042
|
+
function isPicture(el) {
|
|
6043
|
+
return isA(el, 'PICTURE');
|
|
6044
|
+
}
|
|
6045
|
+
|
|
6040
6046
|
function isImg(el) {
|
|
6041
|
-
return el
|
|
6047
|
+
return isA(el, 'IMG');
|
|
6048
|
+
}
|
|
6049
|
+
|
|
6050
|
+
function isA(el, tagName) {
|
|
6051
|
+
return el && el.tagName === tagName;
|
|
6042
6052
|
}
|
|
6043
6053
|
|
|
6044
6054
|
function currentSrc(el) {
|