uikit 3.15.16-dev.67856a2ee → 3.15.16-dev.dc520a80d
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 +3 -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 +10 -19
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +10 -19
- 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 +43 -51
- 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 +44 -52
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/components/internal/slider-transitioner.js +2 -1
- package/src/js/core/accordion.js +4 -4
- package/src/js/core/grid.js +2 -5
- package/src/js/core/sticky.js +3 -0
- package/src/js/mixin/modal.js +6 -14
- package/src/js/util/dimensions.js +21 -24
- package/src/js/util/lang.js +7 -0
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.16-dev.
|
|
1
|
+
/*! UIkit 3.15.16-dev.dc520a80d | 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() :
|
|
@@ -176,6 +176,13 @@
|
|
|
176
176
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
function sumBy(array, iteratee) {
|
|
180
|
+
return array.reduce(
|
|
181
|
+
(sum, item) => sum + toFloat(isFunction(iteratee) ? iteratee(item) : item[iteratee]),
|
|
182
|
+
0);
|
|
183
|
+
|
|
184
|
+
}
|
|
185
|
+
|
|
179
186
|
function uniqueBy(array, prop) {
|
|
180
187
|
const seen = new Set();
|
|
181
188
|
return array.filter((_ref3) => {let { [prop]: check } = _ref3;return seen.has(check) ? false : seen.add(check);});
|
|
@@ -1222,14 +1229,11 @@
|
|
|
1222
1229
|
|
|
1223
1230
|
function boxModelAdjust(element, prop, sizing) {if (sizing === void 0) {sizing = 'border-box';}
|
|
1224
1231
|
return css(element, 'boxSizing') === sizing ?
|
|
1225
|
-
|
|
1226
|
-
map(ucfirst)
|
|
1227
|
-
|
|
1228
|
-
(value, prop) =>
|
|
1229
|
-
value +
|
|
1232
|
+
sumBy(
|
|
1233
|
+
dirs$1[prop].map(ucfirst),
|
|
1234
|
+
(prop) =>
|
|
1230
1235
|
toFloat(css(element, "padding" + prop)) +
|
|
1231
|
-
toFloat(css(element, "border" + prop + "Width"))
|
|
1232
|
-
0) :
|
|
1236
|
+
toFloat(css(element, "border" + prop + "Width"))) :
|
|
1233
1237
|
|
|
1234
1238
|
0;
|
|
1235
1239
|
}
|
|
@@ -1250,23 +1254,22 @@
|
|
|
1250
1254
|
return toFloat(value);
|
|
1251
1255
|
}
|
|
1252
1256
|
|
|
1253
|
-
return parseCalc(value)
|
|
1257
|
+
return sumBy(parseCalc(value), (value) => {
|
|
1254
1258
|
const unit = parseUnit(value);
|
|
1255
|
-
if (unit) {
|
|
1256
|
-
value = percent(
|
|
1257
|
-
unit === 'vh' ?
|
|
1258
|
-
getViewportHeight() :
|
|
1259
|
-
unit === 'vw' ?
|
|
1260
|
-
width(toWindow(element)) :
|
|
1261
|
-
offsetDim ?
|
|
1262
|
-
element["offset" + ucfirst(property)] :
|
|
1263
|
-
dimensions$1(element)[property],
|
|
1264
|
-
value);
|
|
1265
1259
|
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1260
|
+
return unit ?
|
|
1261
|
+
percent(
|
|
1262
|
+
unit === 'vh' ?
|
|
1263
|
+
getViewportHeight() :
|
|
1264
|
+
unit === 'vw' ?
|
|
1265
|
+
width(toWindow(element)) :
|
|
1266
|
+
offsetDim ?
|
|
1267
|
+
element["offset" + ucfirst(property)] :
|
|
1268
|
+
dimensions$1(element)[property],
|
|
1269
|
+
value) :
|
|
1270
|
+
|
|
1271
|
+
value;
|
|
1272
|
+
});
|
|
1270
1273
|
}
|
|
1271
1274
|
|
|
1272
1275
|
const calcRe = /-?\d+(?:\.\d+)?(?:v[wh]|%|px)?/g;
|
|
@@ -2285,6 +2288,7 @@
|
|
|
2285
2288
|
last: last,
|
|
2286
2289
|
each: each,
|
|
2287
2290
|
sortBy: sortBy$1,
|
|
2291
|
+
sumBy: sumBy,
|
|
2288
2292
|
uniqueBy: uniqueBy,
|
|
2289
2293
|
clamp: clamp,
|
|
2290
2294
|
noop: noop,
|
|
@@ -2978,7 +2982,7 @@
|
|
|
2978
2982
|
UIkit.data = '__uikit__';
|
|
2979
2983
|
UIkit.prefix = 'uk-';
|
|
2980
2984
|
UIkit.options = {};
|
|
2981
|
-
UIkit.version = '3.15.16-dev.
|
|
2985
|
+
UIkit.version = '3.15.16-dev.dc520a80d';
|
|
2982
2986
|
|
|
2983
2987
|
globalAPI(UIkit);
|
|
2984
2988
|
hooksAPI(UIkit);
|
|
@@ -3460,10 +3464,9 @@
|
|
|
3460
3464
|
await Transition.cancel(wrapper);
|
|
3461
3465
|
hide(content, false);
|
|
3462
3466
|
|
|
3463
|
-
const endHeight =
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
toFloat(css(content, 'marginBottom'));
|
|
3467
|
+
const endHeight = sumBy(['height', 'paddingBottom', 'marginTop', 'marginBottom'], (prop) =>
|
|
3468
|
+
css(content, prop));
|
|
3469
|
+
|
|
3467
3470
|
const percent = currentHeight / endHeight;
|
|
3468
3471
|
duration = (velocity * endHeight + duration) * (show ? 1 - percent : percent);
|
|
3469
3472
|
css(wrapper, 'height', currentHeight);
|
|
@@ -3840,23 +3843,11 @@
|
|
|
3840
3843
|
name: 'click',
|
|
3841
3844
|
|
|
3842
3845
|
delegate() {
|
|
3843
|
-
return this.selClose;
|
|
3846
|
+
return this.selClose + ",a[href*=\"#\"]";
|
|
3844
3847
|
},
|
|
3845
3848
|
|
|
3846
3849
|
handler(e) {
|
|
3847
|
-
e
|
|
3848
|
-
this.hide();
|
|
3849
|
-
}
|
|
3850
|
-
},
|
|
3851
|
-
|
|
3852
|
-
{
|
|
3853
|
-
name: 'click',
|
|
3854
|
-
|
|
3855
|
-
delegate() {
|
|
3856
|
-
return 'a[href*="#"]';
|
|
3857
|
-
},
|
|
3858
|
-
|
|
3859
|
-
handler(_ref3) {let { current, defaultPrevented } = _ref3;
|
|
3850
|
+
const { current, defaultPrevented } = e;
|
|
3860
3851
|
const { hash } = current;
|
|
3861
3852
|
if (
|
|
3862
3853
|
!defaultPrevented &&
|
|
@@ -3866,6 +3857,9 @@
|
|
|
3866
3857
|
$(hash, document.body))
|
|
3867
3858
|
{
|
|
3868
3859
|
this.hide();
|
|
3860
|
+
} else if (matches(current, this.selClose)) {
|
|
3861
|
+
e.preventDefault();
|
|
3862
|
+
this.hide();
|
|
3869
3863
|
}
|
|
3870
3864
|
}
|
|
3871
3865
|
},
|
|
@@ -3938,7 +3932,7 @@
|
|
|
3938
3932
|
once(
|
|
3939
3933
|
this.$el,
|
|
3940
3934
|
'hide',
|
|
3941
|
-
on(document, pointerDown$1, (
|
|
3935
|
+
on(document, pointerDown$1, (_ref3) => {let { target } = _ref3;
|
|
3942
3936
|
if (
|
|
3943
3937
|
last(active$1) !== this ||
|
|
3944
3938
|
this.overlay && !within(target, this.$el) ||
|
|
@@ -3950,7 +3944,7 @@
|
|
|
3950
3944
|
once(
|
|
3951
3945
|
document,
|
|
3952
3946
|
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
3953
|
-
(
|
|
3947
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3954
3948
|
if (
|
|
3955
3949
|
!defaultPrevented &&
|
|
3956
3950
|
type === pointerUp$1 &&
|
|
@@ -4038,7 +4032,7 @@
|
|
|
4038
4032
|
}
|
|
4039
4033
|
};
|
|
4040
4034
|
|
|
4041
|
-
function animate(el, show,
|
|
4035
|
+
function animate(el, show, _ref5) {let { transitionElement, _toggle } = _ref5;
|
|
4042
4036
|
return new Promise((resolve, reject) =>
|
|
4043
4037
|
once(el, 'show hide', () => {
|
|
4044
4038
|
el._reject == null ? void 0 : el._reject();
|
|
@@ -4086,7 +4080,7 @@
|
|
|
4086
4080
|
on(
|
|
4087
4081
|
el,
|
|
4088
4082
|
'touchstart',
|
|
4089
|
-
(
|
|
4083
|
+
(_ref6) => {let { targetTouches } = _ref6;
|
|
4090
4084
|
if (targetTouches.length === 1) {
|
|
4091
4085
|
startClientY = targetTouches[0].clientY;
|
|
4092
4086
|
}
|
|
@@ -4917,7 +4911,7 @@
|
|
|
4917
4911
|
let translates = false;
|
|
4918
4912
|
|
|
4919
4913
|
const nodes = children(this.$el);
|
|
4920
|
-
const columnHeights =
|
|
4914
|
+
const columnHeights = columns.map((column) => sumBy(column, 'offsetHeight'));
|
|
4921
4915
|
const margin = getMarginTop(nodes, this.margin) * (rows.length - 1);
|
|
4922
4916
|
const elHeight = Math.max(...columnHeights) + margin;
|
|
4923
4917
|
|
|
@@ -5010,10 +5004,6 @@
|
|
|
5010
5004
|
return toFloat(node ? css(node, 'marginTop') : css(nodes[0], 'paddingLeft'));
|
|
5011
5005
|
}
|
|
5012
5006
|
|
|
5013
|
-
function getColumnHeights(columns) {
|
|
5014
|
-
return columns.map((column) => column.reduce((sum, el) => sum + el.offsetHeight, 0));
|
|
5015
|
-
}
|
|
5016
|
-
|
|
5017
5007
|
var heightMatch = {
|
|
5018
5008
|
mixins: [Resize],
|
|
5019
5009
|
|
|
@@ -7084,6 +7074,8 @@
|
|
|
7084
7074
|
$('<div class="uk-sticky-placeholder"></div>');
|
|
7085
7075
|
this.isFixed = false;
|
|
7086
7076
|
this.setActive(false);
|
|
7077
|
+
|
|
7078
|
+
this.registerObserver(observeResize(this.$el, () => !this.isFixed && this.$emit('resize')));
|
|
7087
7079
|
},
|
|
7088
7080
|
|
|
7089
7081
|
disconnected() {
|
|
@@ -10395,7 +10387,7 @@
|
|
|
10395
10387
|
}
|
|
10396
10388
|
|
|
10397
10389
|
function getWidth(list) {
|
|
10398
|
-
return children(list)
|
|
10390
|
+
return sumBy(children(list), (el) => dimensions$1(el).width);
|
|
10399
10391
|
}
|
|
10400
10392
|
|
|
10401
10393
|
function centerEl(el, list) {
|