uikit 3.13.11-dev.eb080f280 → 3.14.0
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 -2
- package/dist/css/uikit-core-rtl.css +4 -1
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +4 -1
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +4 -1
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +4 -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 +4 -2
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +4 -2
- 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 +4 -2
- 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 +86 -58
- 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 +90 -60
- 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/cover.js +27 -14
- package/src/js/core/drop.js +22 -2
- package/src/js/core/height-match.js +1 -1
- package/src/js/core/margin.js +9 -2
- package/src/js/core/scrollspy-nav.js +2 -2
- package/src/js/mixin/parallax.js +3 -2
- package/src/js/util/lang.js +34 -38
- package/src/js/util/position.js +9 -9
- package/src/less/components/nav.less +1 -0
- package/src/less/components/utility.less +1 -0
- package/src/scss/components/nav.scss +1 -0
- package/src/scss/components/utility.scss +1 -0
- package/tests/alert.html +1 -1
- package/tests/drop.html +154 -80
- package/tests/navbar.html +1 -1
- package/tests/parallax.html +1 -1
- package/tests/sticky-parallax.html +8 -8
- package/tests/sticky.html +4 -4
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.
|
|
1
|
+
/*! UIkit 3.14.0 | 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() :
|
|
@@ -208,48 +208,44 @@
|
|
|
208
208
|
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
const aProp = prop === 'width' ? 'height' : 'width';
|
|
211
|
+
function ratio(dimensions, prop, value) {
|
|
212
|
+
const aProp = prop === 'width' ? 'height' : 'width';
|
|
214
213
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
214
|
+
return {
|
|
215
|
+
[aProp]: dimensions[prop] ?
|
|
216
|
+
Math.round(value * dimensions[aProp] / dimensions[prop]) :
|
|
217
|
+
dimensions[aProp],
|
|
218
|
+
[prop]: value };
|
|
220
219
|
|
|
221
|
-
|
|
220
|
+
}
|
|
222
221
|
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
function contain(dimensions, maxDimensions) {
|
|
223
|
+
dimensions = { ...dimensions };
|
|
225
224
|
|
|
226
|
-
|
|
227
|
-
dimensions,
|
|
228
|
-
(_, prop) =>
|
|
225
|
+
for (const prop in dimensions) {
|
|
229
226
|
dimensions =
|
|
230
227
|
dimensions[prop] > maxDimensions[prop] ?
|
|
231
|
-
|
|
232
|
-
dimensions
|
|
233
|
-
|
|
228
|
+
ratio(dimensions, prop, maxDimensions[prop]) :
|
|
229
|
+
dimensions;
|
|
230
|
+
}
|
|
234
231
|
|
|
235
|
-
|
|
236
|
-
|
|
232
|
+
return dimensions;
|
|
233
|
+
}
|
|
237
234
|
|
|
238
|
-
|
|
239
|
-
|
|
235
|
+
function cover$1(dimensions, maxDimensions) {
|
|
236
|
+
dimensions = contain(dimensions, maxDimensions);
|
|
240
237
|
|
|
241
|
-
|
|
242
|
-
dimensions,
|
|
243
|
-
(_, prop) =>
|
|
238
|
+
for (const prop in dimensions) {
|
|
244
239
|
dimensions =
|
|
245
240
|
dimensions[prop] < maxDimensions[prop] ?
|
|
246
|
-
|
|
247
|
-
dimensions
|
|
248
|
-
|
|
241
|
+
ratio(dimensions, prop, maxDimensions[prop]) :
|
|
242
|
+
dimensions;
|
|
243
|
+
}
|
|
249
244
|
|
|
250
|
-
|
|
251
|
-
|
|
245
|
+
return dimensions;
|
|
246
|
+
}
|
|
252
247
|
|
|
248
|
+
const Dimensions = { ratio, contain, cover: cover$1 };
|
|
253
249
|
|
|
254
250
|
function getIndex(i, elements, current, finite) {if (current === void 0) {current = 0;}if (finite === void 0) {finite = false;}
|
|
255
251
|
elements = toNodes(elements);
|
|
@@ -1983,8 +1979,7 @@
|
|
|
1983
1979
|
|
|
1984
1980
|
const position = offset(element);
|
|
1985
1981
|
const targetOffset = offset(target);
|
|
1986
|
-
for (const i
|
|
1987
|
-
const [prop, dir, start, end] = dirs[i];
|
|
1982
|
+
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1988
1983
|
position[start] = position[dir] =
|
|
1989
1984
|
targetOffset[start] +
|
|
1990
1985
|
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
@@ -1998,8 +1993,6 @@
|
|
|
1998
1993
|
function attachToWithFlip(element, target, options) {
|
|
1999
1994
|
const position = attachTo(element, target, options);
|
|
2000
1995
|
const targetDim = offset(target);
|
|
2001
|
-
const viewports = scrollParents(element, /auto|scroll/);
|
|
2002
|
-
const [scrollElement] = viewports;
|
|
2003
1996
|
|
|
2004
1997
|
let {
|
|
2005
1998
|
flip,
|
|
@@ -2010,12 +2003,15 @@
|
|
|
2010
2003
|
viewportPadding } =
|
|
2011
2004
|
options;
|
|
2012
2005
|
|
|
2006
|
+
let viewports = scrollParents(element);
|
|
2007
|
+
if (boundary === target) {
|
|
2008
|
+
viewports = viewports.filter((viewport) => viewport !== boundary);
|
|
2009
|
+
}
|
|
2010
|
+
const [scrollElement] = viewports;
|
|
2013
2011
|
viewports.push(viewport);
|
|
2014
2012
|
|
|
2015
2013
|
const offsetPosition = { ...position };
|
|
2016
|
-
for (const i
|
|
2017
|
-
const [prop, dir, start, end] = dirs[i];
|
|
2018
|
-
|
|
2014
|
+
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2019
2015
|
if (flip !== true && !includes(flip, dir)) {
|
|
2020
2016
|
continue;
|
|
2021
2017
|
}
|
|
@@ -2030,7 +2026,7 @@
|
|
|
2030
2026
|
viewport[end] -= viewportPadding;
|
|
2031
2027
|
}
|
|
2032
2028
|
|
|
2033
|
-
if (boundary && !
|
|
2029
|
+
if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
|
|
2034
2030
|
viewport = getIntersectionArea(viewport, offset(boundary));
|
|
2035
2031
|
}
|
|
2036
2032
|
|
|
@@ -2147,7 +2143,7 @@
|
|
|
2147
2143
|
}
|
|
2148
2144
|
|
|
2149
2145
|
function flipDir(prop) {
|
|
2150
|
-
for (
|
|
2146
|
+
for (let i = 0; i < dirs.length; i++) {
|
|
2151
2147
|
const index = dirs[i].indexOf(prop);
|
|
2152
2148
|
if (~index) {
|
|
2153
2149
|
return dirs[1 - i][index % 2 + 2];
|
|
@@ -2958,7 +2954,7 @@
|
|
|
2958
2954
|
UIkit.data = '__uikit__';
|
|
2959
2955
|
UIkit.prefix = 'uk-';
|
|
2960
2956
|
UIkit.options = {};
|
|
2961
|
-
UIkit.version = '3.
|
|
2957
|
+
UIkit.version = '3.14.0';
|
|
2962
2958
|
|
|
2963
2959
|
globalAPI(UIkit);
|
|
2964
2960
|
hooksAPI(UIkit);
|
|
@@ -3482,25 +3478,38 @@
|
|
|
3482
3478
|
|
|
3483
3479
|
update: {
|
|
3484
3480
|
read() {
|
|
3485
|
-
const
|
|
3486
|
-
const {
|
|
3487
|
-
getPositionedParent(el) || parent(el);
|
|
3488
|
-
const dim = Dimensions.cover(
|
|
3489
|
-
{
|
|
3490
|
-
width: this.width || el.naturalWidth || el.videoWidth || el.clientWidth,
|
|
3491
|
-
height: this.height || el.naturalHeight || el.videoHeight || el.clientHeight },
|
|
3481
|
+
const { ratio, cover } = Dimensions;
|
|
3482
|
+
const { $el, width, height } = this;
|
|
3492
3483
|
|
|
3493
|
-
{
|
|
3494
|
-
width: width + (width % 2 ? 1 : 0),
|
|
3495
|
-
height: height + (height % 2 ? 1 : 0) });
|
|
3484
|
+
let dim = { width, height };
|
|
3496
3485
|
|
|
3486
|
+
if (!dim.width || !dim.height) {
|
|
3487
|
+
const intrinsic = {
|
|
3488
|
+
width: $el.naturalWidth || $el.videoWidth || $el.clientWidth,
|
|
3489
|
+
height: $el.naturalHeight || $el.videoHeight || $el.clientHeight };
|
|
3497
3490
|
|
|
3498
3491
|
|
|
3499
|
-
|
|
3492
|
+
if (dim.width) {
|
|
3493
|
+
dim = ratio(intrinsic, 'width', dim.width);
|
|
3494
|
+
} else if (height) {
|
|
3495
|
+
dim = ratio(intrinsic, 'height', dim.height);
|
|
3496
|
+
} else {
|
|
3497
|
+
dim = intrinsic;
|
|
3498
|
+
}
|
|
3499
|
+
}
|
|
3500
|
+
|
|
3501
|
+
const { offsetHeight: coverHeight, offsetWidth: coverWidth } =
|
|
3502
|
+
getPositionedParent($el) || parent($el);
|
|
3503
|
+
const coverDim = cover(dim, {
|
|
3504
|
+
width: coverWidth + (coverWidth % 2 ? 1 : 0),
|
|
3505
|
+
height: coverHeight + (coverHeight % 2 ? 1 : 0) });
|
|
3506
|
+
|
|
3507
|
+
|
|
3508
|
+
if (!coverDim.width || !coverDim.height) {
|
|
3500
3509
|
return false;
|
|
3501
3510
|
}
|
|
3502
3511
|
|
|
3503
|
-
return
|
|
3512
|
+
return coverDim;
|
|
3504
3513
|
},
|
|
3505
3514
|
|
|
3506
3515
|
write(_ref) {let { height, width } = _ref;
|
|
@@ -3602,6 +3611,7 @@
|
|
|
3602
3611
|
boundaryAlign: Boolean,
|
|
3603
3612
|
delayShow: Number,
|
|
3604
3613
|
delayHide: Number,
|
|
3614
|
+
display: String,
|
|
3605
3615
|
clsDrop: String },
|
|
3606
3616
|
|
|
3607
3617
|
|
|
@@ -3612,6 +3622,7 @@
|
|
|
3612
3622
|
boundaryAlign: false,
|
|
3613
3623
|
delayShow: 0,
|
|
3614
3624
|
delayHide: 800,
|
|
3625
|
+
display: null,
|
|
3615
3626
|
clsDrop: false,
|
|
3616
3627
|
animation: ['uk-animation-fade'],
|
|
3617
3628
|
cls: 'uk-open',
|
|
@@ -3802,7 +3813,23 @@
|
|
|
3802
3813
|
this.hide(false);
|
|
3803
3814
|
}
|
|
3804
3815
|
}),
|
|
3805
|
-
|
|
3816
|
+
|
|
3817
|
+
...(this.display === 'static' ?
|
|
3818
|
+
[] :
|
|
3819
|
+
(() => {
|
|
3820
|
+
const handler = () => this.$emit();
|
|
3821
|
+
return [
|
|
3822
|
+
on(window, 'resize', handler),
|
|
3823
|
+
on(document, 'scroll', handler, true),
|
|
3824
|
+
(() => {
|
|
3825
|
+
const observer = observeResize(
|
|
3826
|
+
scrollParents(this.$el),
|
|
3827
|
+
handler);
|
|
3828
|
+
|
|
3829
|
+
return () => observer.disconnect();
|
|
3830
|
+
})()];
|
|
3831
|
+
|
|
3832
|
+
})())])
|
|
3806
3833
|
{
|
|
3807
3834
|
once(this.$el, 'hide', handler, { self: true });
|
|
3808
3835
|
}
|
|
@@ -3922,7 +3949,8 @@
|
|
|
3922
3949
|
const boundaryOffset = boundary ? offset(boundary) : scrollParentOffset;
|
|
3923
3950
|
|
|
3924
3951
|
css(this.$el, 'maxWidth', '');
|
|
3925
|
-
const maxWidth =
|
|
3952
|
+
const maxWidth =
|
|
3953
|
+
scrollParentOffset.width - (this.boundaryAlign ? 0 : 2 * this.viewportPadding);
|
|
3926
3954
|
|
|
3927
3955
|
if (this.pos[1] === 'justify') {
|
|
3928
3956
|
const prop = this.axis === 'y' ? 'width' : 'height';
|
|
@@ -4037,7 +4065,7 @@
|
|
|
4037
4065
|
|
|
4038
4066
|
|
|
4039
4067
|
resizeTargets() {
|
|
4040
|
-
return [this.$el, this.$el.children];
|
|
4068
|
+
return [this.$el, ...toArray(this.$el.children)];
|
|
4041
4069
|
},
|
|
4042
4070
|
|
|
4043
4071
|
connected() {
|
|
@@ -4354,7 +4382,7 @@
|
|
|
4354
4382
|
|
|
4355
4383
|
|
|
4356
4384
|
resizeTargets() {
|
|
4357
|
-
return [this.$el, this.elements];
|
|
4385
|
+
return [this.$el, ...this.elements];
|
|
4358
4386
|
},
|
|
4359
4387
|
|
|
4360
4388
|
update: {
|
|
@@ -6549,7 +6577,7 @@
|
|
|
6549
6577
|
if (scrollTop === max) {
|
|
6550
6578
|
active = length - 1;
|
|
6551
6579
|
} else {
|
|
6552
|
-
for (
|
|
6580
|
+
for (let i = 0; i < targets.length; i++) {
|
|
6553
6581
|
if (offset(targets[i]).top - viewport.top - this.offset > 0) {
|
|
6554
6582
|
break;
|
|
6555
6583
|
}
|
|
@@ -6568,7 +6596,7 @@
|
|
|
6568
6596
|
const changed = active !== false && !hasClass(this.elements[active], this.cls);
|
|
6569
6597
|
|
|
6570
6598
|
this.links.forEach((el) => el.blur());
|
|
6571
|
-
for (
|
|
6599
|
+
for (let i = 0; i < this.elements.length; i++) {
|
|
6572
6600
|
toggleClass(this.elements[i], this.cls, +i === active);
|
|
6573
6601
|
}
|
|
6574
6602
|
|
|
@@ -9305,7 +9333,9 @@
|
|
|
9305
9333
|
|
|
9306
9334
|
methods: {
|
|
9307
9335
|
reset() {
|
|
9308
|
-
|
|
9336
|
+
for (const prop in this.getCss(0)) {
|
|
9337
|
+
css(this.$el, prop, '');
|
|
9338
|
+
}
|
|
9309
9339
|
},
|
|
9310
9340
|
|
|
9311
9341
|
getCss(percent) {
|
|
@@ -9925,7 +9955,7 @@
|
|
|
9925
9955
|
let left = 0;
|
|
9926
9956
|
const sets = [];
|
|
9927
9957
|
const width = dimensions$1(this.list).width;
|
|
9928
|
-
for (let i
|
|
9958
|
+
for (let i = 0; i < this.slides.length; i++) {
|
|
9929
9959
|
const slideWidth = dimensions$1(this.slides[i]).width;
|
|
9930
9960
|
|
|
9931
9961
|
if (left + slideWidth > width) {
|