uikit 3.11.2-dev.c7ed3c19b → 3.11.2-dev.cfa6c7d5c
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 +37 -19
- package/dist/css/uikit-core-rtl.css +86 -185
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +86 -185
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +88 -191
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +88 -191
- 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 +6 -8
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +26 -55
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +27 -57
- 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 +114 -78
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +114 -78
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +60 -12
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +114 -78
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +52 -16
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +5 -7
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +2 -2
- 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 +288 -270
- 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 +501 -417
- package/dist/js/uikit.min.js +1 -1
- package/package.json +1 -1
- package/src/js/api/component.js +2 -11
- package/src/js/api/hooks.js +1 -1
- package/src/js/api/state.js +1 -1
- package/src/js/components/filter.js +2 -3
- package/src/js/components/internal/lightbox-animations.js +4 -3
- package/src/js/components/internal/slider-preload.js +37 -0
- package/src/js/components/internal/slideshow-animations.js +4 -3
- package/src/js/components/lightbox-panel.js +34 -58
- package/src/js/components/lightbox.js +1 -2
- package/src/js/components/slider.js +21 -1
- package/src/js/components/slideshow.js +8 -1
- package/src/js/components/sortable.js +1 -1
- package/src/js/core/alert.js +1 -2
- package/src/js/core/height-viewport.js +3 -0
- package/src/js/core/icon.js +13 -6
- package/src/js/core/img.js +131 -114
- package/src/js/core/modal.js +1 -2
- package/src/js/core/navbar.js +3 -3
- package/src/js/core/sticky.js +51 -57
- package/src/js/core/svg.js +10 -6
- package/src/js/core/toggle.js +2 -1
- package/src/js/mixin/internal/animate-slide.js +9 -12
- package/src/js/mixin/parallax.js +115 -79
- package/src/js/mixin/slider.js +8 -16
- package/src/js/mixin/slideshow.js +2 -2
- package/src/js/mixin/togglable.js +1 -2
- package/src/js/util/ajax.js +15 -14
- package/src/js/util/animation.js +7 -12
- package/src/js/util/dimensions.js +4 -4
- package/src/js/util/dom.js +37 -31
- package/src/js/util/lang.js +7 -6
- package/src/js/util/options.js +2 -11
- package/src/js/util/player.js +5 -4
- package/src/js/util/selector.js +11 -11
- package/src/js/util/style.js +4 -4
- package/src/less/components/base.less +10 -33
- package/src/less/components/form-range.less +48 -95
- package/src/less/components/form.less +0 -1
- package/src/less/components/height.less +3 -0
- package/src/less/components/leader.less +0 -1
- package/src/less/components/lightbox.less +0 -1
- package/src/less/components/modal.less +3 -7
- package/src/less/components/progress.less +14 -36
- package/src/less/components/slider.less +0 -3
- package/src/less/components/slideshow.less +0 -3
- package/src/less/components/text.less +16 -32
- package/src/scss/components/base.scss +10 -33
- package/src/scss/components/form-range.scss +48 -95
- package/src/scss/components/form.scss +0 -1
- package/src/scss/components/height.scss +3 -0
- package/src/scss/components/leader.scss +0 -1
- package/src/scss/components/lightbox.scss +0 -1
- package/src/scss/components/modal.scss +3 -7
- package/src/scss/components/progress.scss +14 -36
- package/src/scss/components/slider.scss +0 -3
- package/src/scss/components/slideshow.scss +0 -3
- package/src/scss/components/text.scss +16 -32
- package/src/scss/mixins-theme.scss +1 -1
- package/src/scss/mixins.scss +1 -1
- package/src/scss/variables-theme.scss +3 -3
- package/src/scss/variables.scss +3 -3
- package/tests/align.html +10 -10
- package/tests/animation.html +2 -2
- package/tests/article.html +2 -2
- package/tests/base.html +3 -3
- package/tests/card.html +10 -10
- package/tests/column.html +3 -3
- package/tests/comment.html +9 -9
- package/tests/dotnav.html +3 -3
- package/tests/image.html +296 -64
- package/tests/images/image-type.avif +0 -0
- package/tests/images/image-type.jpeg +0 -0
- package/tests/images/image-type.webp +0 -0
- package/tests/index.html +8 -8
- package/tests/lightbox.html +10 -10
- package/tests/marker.html +2 -2
- package/tests/modal.html +8 -9
- package/tests/navbar.html +2 -2
- package/tests/overlay.html +7 -7
- package/tests/parallax.html +14 -5
- package/tests/position.html +12 -12
- package/tests/slidenav.html +12 -12
- package/tests/slider.html +20 -20
- package/tests/sortable.html +1 -1
- package/tests/sticky-parallax.html +55 -70
- package/tests/svg.html +6 -6
- package/tests/table.html +11 -11
- package/tests/thumbnav.html +12 -12
- package/tests/transition.html +30 -30
- package/tests/utility.html +33 -33
- package/tests/video.html +1 -1
- package/tests/width.html +1 -1
- package/tests/images/animated.gif +0 -0
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.11.2-dev.
|
|
1
|
+
/*! UIkit 3.11.2-dev.cfa6c7d5c | 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() :
|
|
@@ -29,19 +29,19 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
function startsWith(str, search) {
|
|
32
|
-
return str.startsWith(search);
|
|
32
|
+
return str == null ? void 0 : str.startsWith == null ? void 0 : str.startsWith(search);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
function endsWith(str, search) {
|
|
36
|
-
return str.endsWith(search);
|
|
36
|
+
return str == null ? void 0 : str.endsWith == null ? void 0 : str.endsWith(search);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function includes(obj, search) {
|
|
40
|
-
return obj
|
|
40
|
+
return obj == null ? void 0 : obj.includes == null ? void 0 : obj.includes(search);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
function findIndex(array, predicate) {
|
|
44
|
-
return array.findIndex(predicate);
|
|
44
|
+
return array == null ? void 0 : array.findIndex == null ? void 0 : array.findIndex(predicate);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const { isArray, from: toArray } = Array;
|
|
@@ -130,14 +130,15 @@
|
|
|
130
130
|
return element && (isNode(element) ? [element] : Array.from(element).filter(isNode)) || [];
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
function toWindow(element) {
|
|
133
|
+
function toWindow(element) {var _element;
|
|
134
134
|
if (isWindow(element)) {
|
|
135
135
|
return element;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
element = toNode(element);
|
|
139
|
+
const document = isDocument(element) ? element : (_element = element) == null ? void 0 : _element.ownerDocument;
|
|
139
140
|
|
|
140
|
-
return
|
|
141
|
+
return (document == null ? void 0 : document.defaultView) || window;
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
function toMs(time) {
|
|
@@ -224,7 +225,7 @@
|
|
|
224
225
|
},
|
|
225
226
|
|
|
226
227
|
contain(dimensions, maxDimensions) {
|
|
227
|
-
dimensions =
|
|
228
|
+
dimensions = { ...dimensions };
|
|
228
229
|
|
|
229
230
|
each(
|
|
230
231
|
dimensions,
|
|
@@ -438,12 +439,6 @@
|
|
|
438
439
|
return findAll(selector, getContext(selector, context));
|
|
439
440
|
}
|
|
440
441
|
|
|
441
|
-
function getContext(selector, context) {if (context === void 0) {context = document;}
|
|
442
|
-
return isString(selector) && isContextSelector(selector) || isDocument(context) ?
|
|
443
|
-
context :
|
|
444
|
-
context.ownerDocument;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
442
|
function find(selector, context) {
|
|
448
443
|
return toNode(_query(selector, context, 'querySelector'));
|
|
449
444
|
}
|
|
@@ -452,6 +447,17 @@
|
|
|
452
447
|
return toNodes(_query(selector, context, 'querySelectorAll'));
|
|
453
448
|
}
|
|
454
449
|
|
|
450
|
+
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
451
|
+
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
452
|
+
|
|
453
|
+
function getContext(selector, context) {if (context === void 0) {context = document;}
|
|
454
|
+
return isString(selector) && isContextSelector(selector) || isDocument(context) ?
|
|
455
|
+
context :
|
|
456
|
+
context.ownerDocument;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
460
|
+
|
|
455
461
|
function _query(selector, context, queryFn) {if (context === void 0) {context = document;}
|
|
456
462
|
if (!selector || !isString(selector)) {
|
|
457
463
|
return selector;
|
|
@@ -496,11 +502,6 @@
|
|
|
496
502
|
}
|
|
497
503
|
}
|
|
498
504
|
|
|
499
|
-
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
500
|
-
const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
501
|
-
|
|
502
|
-
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
503
|
-
|
|
504
505
|
const selectorRe = /.*?[^\\](?:,|$)/g;
|
|
505
506
|
|
|
506
507
|
const splitSelector = memoize((selector) =>
|
|
@@ -670,17 +671,14 @@
|
|
|
670
671
|
}
|
|
671
672
|
|
|
672
673
|
function ajax(url, options) {
|
|
673
|
-
const env =
|
|
674
|
-
{
|
|
674
|
+
const env = {
|
|
675
675
|
data: null,
|
|
676
676
|
method: 'GET',
|
|
677
677
|
headers: {},
|
|
678
678
|
xhr: new XMLHttpRequest(),
|
|
679
679
|
beforeSend: noop,
|
|
680
|
-
responseType: ''
|
|
681
|
-
|
|
682
|
-
options);
|
|
683
|
-
|
|
680
|
+
responseType: '',
|
|
681
|
+
...options };
|
|
684
682
|
|
|
685
683
|
return Promise.resolve().
|
|
686
684
|
then(() => env.beforeSend(env)).
|
|
@@ -731,8 +729,12 @@
|
|
|
731
729
|
return new Promise((resolve, reject) => {
|
|
732
730
|
const img = new Image();
|
|
733
731
|
|
|
734
|
-
img.onerror = (e) =>
|
|
735
|
-
|
|
732
|
+
img.onerror = (e) => {
|
|
733
|
+
reject(e);
|
|
734
|
+
};
|
|
735
|
+
img.onload = () => {
|
|
736
|
+
resolve(img);
|
|
737
|
+
};
|
|
736
738
|
|
|
737
739
|
sizes && (img.sizes = sizes);
|
|
738
740
|
srcset && (img.srcset = srcset);
|
|
@@ -759,7 +761,8 @@
|
|
|
759
761
|
|
|
760
762
|
|
|
761
763
|
function css(element, property, value, priority) {if (priority === void 0) {priority = '';}
|
|
762
|
-
|
|
764
|
+
const elements = toNodes(element);
|
|
765
|
+
for (const element of elements) {
|
|
763
766
|
if (isString(property)) {
|
|
764
767
|
property = propName(property);
|
|
765
768
|
|
|
@@ -785,9 +788,8 @@
|
|
|
785
788
|
priority = value;
|
|
786
789
|
each(property, (value, property) => css(element, property, value, priority));
|
|
787
790
|
}
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
})[0];
|
|
791
|
+
}
|
|
792
|
+
return elements[0];
|
|
791
793
|
}
|
|
792
794
|
|
|
793
795
|
function getStyles(element, pseudoElt) {
|
|
@@ -914,16 +916,11 @@
|
|
|
914
916
|
|
|
915
917
|
|
|
916
918
|
addClass(element, 'uk-transition');
|
|
917
|
-
css(
|
|
918
|
-
element,
|
|
919
|
-
assign(
|
|
920
|
-
{
|
|
919
|
+
css(element, {
|
|
921
920
|
transitionProperty: Object.keys(props).map(propName).join(','),
|
|
922
921
|
transitionDuration: duration + "ms",
|
|
923
|
-
transitionTimingFunction: timing
|
|
924
|
-
|
|
925
|
-
props));
|
|
926
|
-
|
|
922
|
+
transitionTimingFunction: timing,
|
|
923
|
+
...props });
|
|
927
924
|
|
|
928
925
|
})));
|
|
929
926
|
|
|
@@ -1023,8 +1020,8 @@
|
|
|
1023
1020
|
const currentOffset = dimensions(element);
|
|
1024
1021
|
|
|
1025
1022
|
if (element) {
|
|
1026
|
-
const {
|
|
1027
|
-
const offsetBy = { height:
|
|
1023
|
+
const { scrollY, scrollX } = toWindow(element);
|
|
1024
|
+
const offsetBy = { height: scrollY, width: scrollX };
|
|
1028
1025
|
|
|
1029
1026
|
for (const dir in dirs$1) {
|
|
1030
1027
|
for (const i in dirs$1[dir]) {
|
|
@@ -1090,8 +1087,8 @@
|
|
|
1090
1087
|
|
|
1091
1088
|
if (css(element, 'position') === 'fixed') {
|
|
1092
1089
|
const win = toWindow(element);
|
|
1093
|
-
offset[0] += win.
|
|
1094
|
-
offset[1] += win.
|
|
1090
|
+
offset[0] += win.scrollY;
|
|
1091
|
+
offset[1] += win.scrollX;
|
|
1095
1092
|
return offset;
|
|
1096
1093
|
}
|
|
1097
1094
|
} while (element = element.offsetParent);
|
|
@@ -1198,6 +1195,10 @@
|
|
|
1198
1195
|
once(document, 'DOMContentLoaded', fn);
|
|
1199
1196
|
}
|
|
1200
1197
|
|
|
1198
|
+
function isTag(element, tagName) {var _element$tagName;
|
|
1199
|
+
return (element == null ? void 0 : (_element$tagName = element.tagName) == null ? void 0 : _element$tagName.toLowerCase()) === tagName.toLowerCase();
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1201
1202
|
function empty(element) {
|
|
1202
1203
|
return replaceChildren(element, '');
|
|
1203
1204
|
}
|
|
@@ -1206,34 +1207,20 @@
|
|
|
1206
1207
|
return isUndefined(html) ? $(parent).innerHTML : replaceChildren(parent, html);
|
|
1207
1208
|
}
|
|
1208
1209
|
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
function prepend(parent, element) {
|
|
1216
|
-
const nodes = $$(element);
|
|
1217
|
-
$(parent).prepend(...nodes);
|
|
1218
|
-
return nodes;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
function append(parent, element) {
|
|
1222
|
-
const nodes = $$(element);
|
|
1223
|
-
$(parent).append(...nodes);
|
|
1224
|
-
return nodes;
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
function before(ref, element) {
|
|
1228
|
-
const nodes = $$(element);
|
|
1229
|
-
$(ref).before(...nodes);
|
|
1230
|
-
return nodes;
|
|
1231
|
-
}
|
|
1210
|
+
const replaceChildren = applyFn('replaceChildren');
|
|
1211
|
+
const prepend = applyFn('prepend');
|
|
1212
|
+
const append = applyFn('append');
|
|
1213
|
+
const before = applyFn('before');
|
|
1214
|
+
const after = applyFn('after');
|
|
1232
1215
|
|
|
1233
|
-
function
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1216
|
+
function applyFn(fn) {
|
|
1217
|
+
return function (ref, element) {
|
|
1218
|
+
const nodes = toNodes(isString(element) ? fragment(element) : element);
|
|
1219
|
+
if (nodes.length) {
|
|
1220
|
+
$(ref)[fn](...nodes);
|
|
1221
|
+
}
|
|
1222
|
+
return unwrapSingle(nodes);
|
|
1223
|
+
};
|
|
1237
1224
|
}
|
|
1238
1225
|
|
|
1239
1226
|
function remove$1(element) {
|
|
@@ -1269,11 +1256,27 @@
|
|
|
1269
1256
|
forEach((parent) => parent.replaceWith(...parent.childNodes));
|
|
1270
1257
|
}
|
|
1271
1258
|
|
|
1259
|
+
const fragmentRe = /^\s*<(\w+|!)[^>]*>/;
|
|
1260
|
+
const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
|
|
1261
|
+
|
|
1272
1262
|
function fragment(html) {
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1263
|
+
const matches = singleTagRe.exec(html);
|
|
1264
|
+
if (matches) {
|
|
1265
|
+
return document.createElement(matches[1]);
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
const container = document.createElement('div');
|
|
1269
|
+
if (fragmentRe.test(html)) {
|
|
1270
|
+
container.insertAdjacentHTML('beforeend', html.trim());
|
|
1271
|
+
} else {
|
|
1272
|
+
container.textContent = html;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
return unwrapSingle(container.childNodes);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
function unwrapSingle(nodes) {
|
|
1279
|
+
return nodes.length > 1 ? nodes : nodes[0];
|
|
1277
1280
|
}
|
|
1278
1281
|
|
|
1279
1282
|
function apply(node, fn) {
|
|
@@ -1506,7 +1509,7 @@
|
|
|
1506
1509
|
|
|
1507
1510
|
// extend strategy
|
|
1508
1511
|
strats.computed = strats.methods = function (parentVal, childVal) {
|
|
1509
|
-
return childVal ? parentVal ?
|
|
1512
|
+
return childVal ? parentVal ? { ...parentVal, ...childVal } : childVal : parentVal;
|
|
1510
1513
|
};
|
|
1511
1514
|
|
|
1512
1515
|
// data strategy
|
|
@@ -1646,11 +1649,11 @@
|
|
|
1646
1649
|
}
|
|
1647
1650
|
|
|
1648
1651
|
function isHTML5(el) {
|
|
1649
|
-
return (el
|
|
1652
|
+
return isTag(el, 'video');
|
|
1650
1653
|
}
|
|
1651
1654
|
|
|
1652
1655
|
function isIFrame(el) {
|
|
1653
|
-
return (el
|
|
1656
|
+
return isTag(el, 'iframe') && (isYoutube(el) || isVimeo(el));
|
|
1654
1657
|
}
|
|
1655
1658
|
|
|
1656
1659
|
function isYoutube(el) {
|
|
@@ -1670,7 +1673,7 @@
|
|
|
1670
1673
|
|
|
1671
1674
|
function post(el, cmd) {
|
|
1672
1675
|
try {
|
|
1673
|
-
el.contentWindow.postMessage(JSON.stringify(
|
|
1676
|
+
el.contentWindow.postMessage(JSON.stringify({ event: 'command', ...cmd }), '*');
|
|
1674
1677
|
} catch (e) {
|
|
1675
1678
|
// noop
|
|
1676
1679
|
}
|
|
@@ -2050,6 +2053,7 @@
|
|
|
2050
2053
|
flipPosition: flipPosition,
|
|
2051
2054
|
toPx: toPx,
|
|
2052
2055
|
ready: ready,
|
|
2056
|
+
isTag: isTag,
|
|
2053
2057
|
empty: empty,
|
|
2054
2058
|
html: html,
|
|
2055
2059
|
replaceChildren: replaceChildren,
|
|
@@ -2344,7 +2348,7 @@
|
|
|
2344
2348
|
const {
|
|
2345
2349
|
$options: { computed } } =
|
|
2346
2350
|
this;
|
|
2347
|
-
const values =
|
|
2351
|
+
const values = { ...this._computeds };
|
|
2348
2352
|
this._computeds = {};
|
|
2349
2353
|
|
|
2350
2354
|
for (const key in computed) {
|
|
@@ -2529,7 +2533,7 @@
|
|
|
2529
2533
|
el = isFunction(el) ? el.call(component) : el || component.$el;
|
|
2530
2534
|
|
|
2531
2535
|
if (isArray(el)) {
|
|
2532
|
-
el.forEach((el) => registerEvent(component,
|
|
2536
|
+
el.forEach((el) => registerEvent(component, { ...event, el }, key));
|
|
2533
2537
|
return;
|
|
2534
2538
|
}
|
|
2535
2539
|
|
|
@@ -2763,7 +2767,7 @@
|
|
|
2763
2767
|
}
|
|
2764
2768
|
};
|
|
2765
2769
|
|
|
2766
|
-
const opt = isPlainObject(options) ?
|
|
2770
|
+
const opt = isPlainObject(options) ? { ...options } : options.options;
|
|
2767
2771
|
|
|
2768
2772
|
opt.name = name;
|
|
2769
2773
|
|
|
@@ -2816,7 +2820,7 @@
|
|
|
2816
2820
|
UIkit.data = '__uikit__';
|
|
2817
2821
|
UIkit.prefix = 'uk-';
|
|
2818
2822
|
UIkit.options = {};
|
|
2819
|
-
UIkit.version = '3.11.2-dev.
|
|
2823
|
+
UIkit.version = '3.11.2-dev.cfa6c7d5c';
|
|
2820
2824
|
|
|
2821
2825
|
globalAPI(UIkit);
|
|
2822
2826
|
hooksAPI(UIkit);
|
|
@@ -3139,7 +3143,7 @@
|
|
|
3139
3143
|
show ?
|
|
3140
3144
|
Transition.start(
|
|
3141
3145
|
el,
|
|
3142
|
-
|
|
3146
|
+
{ ...initProps, overflow: 'hidden', height: endHeight },
|
|
3143
3147
|
Math.round(duration * (1 - currentHeight / endHeight)),
|
|
3144
3148
|
transition) :
|
|
3145
3149
|
|
|
@@ -3311,7 +3315,7 @@
|
|
|
3311
3315
|
animation: [true],
|
|
3312
3316
|
selClose: '.uk-alert-close',
|
|
3313
3317
|
duration: 150,
|
|
3314
|
-
hideProps:
|
|
3318
|
+
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3315
3319
|
|
|
3316
3320
|
|
|
3317
3321
|
events: [
|
|
@@ -4321,6 +4325,8 @@
|
|
|
4321
4325
|
}
|
|
4322
4326
|
|
|
4323
4327
|
var heightViewport = {
|
|
4328
|
+
mixins: [Class],
|
|
4329
|
+
|
|
4324
4330
|
props: {
|
|
4325
4331
|
expand: Boolean,
|
|
4326
4332
|
offsetTop: Boolean,
|
|
@@ -4468,6 +4474,12 @@
|
|
|
4468
4474
|
|
|
4469
4475
|
methods: {
|
|
4470
4476
|
async getSvg() {
|
|
4477
|
+
if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
|
|
4478
|
+
return new Promise((resolve) =>
|
|
4479
|
+
once(this.$el, 'load', () => resolve(this.getSvg())));
|
|
4480
|
+
|
|
4481
|
+
}
|
|
4482
|
+
|
|
4471
4483
|
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject('SVG not found.');
|
|
4472
4484
|
},
|
|
4473
4485
|
|
|
@@ -4567,7 +4579,7 @@
|
|
|
4567
4579
|
}
|
|
4568
4580
|
|
|
4569
4581
|
function insertSVG(el, root) {
|
|
4570
|
-
if (isVoidElement(root) || root
|
|
4582
|
+
if (isVoidElement(root) || isTag(root, 'canvas')) {
|
|
4571
4583
|
root.hidden = true;
|
|
4572
4584
|
|
|
4573
4585
|
const next = root.nextElementSibling;
|
|
@@ -4579,11 +4591,7 @@
|
|
|
4579
4591
|
}
|
|
4580
4592
|
|
|
4581
4593
|
function equals(el, other) {
|
|
4582
|
-
return
|
|
4583
|
-
}
|
|
4584
|
-
|
|
4585
|
-
function isSVG(el) {
|
|
4586
|
-
return (el == null ? void 0 : el.tagName) === 'svg';
|
|
4594
|
+
return isTag(el, 'svg') && isTag(other, 'svg') && innerHTML(el) === innerHTML(other);
|
|
4587
4595
|
}
|
|
4588
4596
|
|
|
4589
4597
|
function innerHTML(el) {
|
|
@@ -4664,14 +4672,14 @@
|
|
|
4664
4672
|
},
|
|
4665
4673
|
|
|
4666
4674
|
methods: {
|
|
4667
|
-
getSvg() {
|
|
4675
|
+
async getSvg() {
|
|
4668
4676
|
const icon = getIcon(this.icon);
|
|
4669
4677
|
|
|
4670
4678
|
if (!icon) {
|
|
4671
|
-
|
|
4679
|
+
throw 'Icon not found.';
|
|
4672
4680
|
}
|
|
4673
4681
|
|
|
4674
|
-
return
|
|
4682
|
+
return icon;
|
|
4675
4683
|
} } };
|
|
4676
4684
|
|
|
4677
4685
|
const IconComponent = {
|
|
@@ -4729,10 +4737,17 @@
|
|
|
4729
4737
|
const Spinner = {
|
|
4730
4738
|
extends: IconComponent,
|
|
4731
4739
|
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4740
|
+
methods: {
|
|
4741
|
+
async getSvg() {
|
|
4742
|
+
const icon = await Icon.methods.getSvg.call(this);
|
|
4743
|
+
|
|
4744
|
+
if (this.ratio !== 1) {
|
|
4745
|
+
css($('circle', icon), 'strokeWidth', 1 / this.ratio);
|
|
4746
|
+
}
|
|
4747
|
+
|
|
4748
|
+
return icon;
|
|
4749
|
+
} } };
|
|
4750
|
+
|
|
4736
4751
|
|
|
4737
4752
|
|
|
4738
4753
|
const parsed = {};
|
|
@@ -4770,120 +4785,95 @@
|
|
|
4770
4785
|
return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon;
|
|
4771
4786
|
}
|
|
4772
4787
|
|
|
4788
|
+
const nativeLazyLoad = ('loading' in HTMLImageElement.prototype);
|
|
4789
|
+
const nativeIsIntersecting = ('isIntersecting' in IntersectionObserverEntry.prototype); // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
|
|
4790
|
+
|
|
4773
4791
|
var img = {
|
|
4774
4792
|
args: 'dataSrc',
|
|
4775
4793
|
|
|
4776
4794
|
props: {
|
|
4777
4795
|
dataSrc: String,
|
|
4778
|
-
|
|
4779
|
-
sizes: String,
|
|
4780
|
-
width: Number,
|
|
4781
|
-
height: Number,
|
|
4796
|
+
sources: String,
|
|
4782
4797
|
offsetTop: String,
|
|
4783
4798
|
offsetLeft: String,
|
|
4784
|
-
target: String
|
|
4799
|
+
target: String,
|
|
4800
|
+
loading: String },
|
|
4785
4801
|
|
|
4786
4802
|
|
|
4787
4803
|
data: {
|
|
4788
4804
|
dataSrc: '',
|
|
4789
|
-
|
|
4790
|
-
sizes: false,
|
|
4791
|
-
width: false,
|
|
4792
|
-
height: false,
|
|
4805
|
+
sources: false,
|
|
4793
4806
|
offsetTop: '50vh',
|
|
4794
4807
|
offsetLeft: '50vw',
|
|
4795
|
-
target: false
|
|
4808
|
+
target: false,
|
|
4809
|
+
loading: 'lazy' },
|
|
4796
4810
|
|
|
4797
4811
|
|
|
4798
4812
|
computed: {
|
|
4799
|
-
cacheKey(_ref) {let { dataSrc } = _ref;
|
|
4800
|
-
return this.$name + "." + dataSrc;
|
|
4801
|
-
},
|
|
4802
|
-
|
|
4803
|
-
width(_ref2) {let { width, dataWidth } = _ref2;
|
|
4804
|
-
return width || dataWidth;
|
|
4805
|
-
},
|
|
4806
|
-
|
|
4807
|
-
height(_ref3) {let { height, dataHeight } = _ref3;
|
|
4808
|
-
return height || dataHeight;
|
|
4809
|
-
},
|
|
4810
|
-
|
|
4811
|
-
sizes(_ref4) {let { sizes, dataSizes } = _ref4;
|
|
4812
|
-
return sizes || dataSizes;
|
|
4813
|
-
},
|
|
4814
|
-
|
|
4815
|
-
isImg(_, $el) {
|
|
4816
|
-
return isImg($el);
|
|
4817
|
-
},
|
|
4818
|
-
|
|
4819
4813
|
target: {
|
|
4820
|
-
get(
|
|
4814
|
+
get(_ref) {let { target } = _ref;
|
|
4821
4815
|
return [this.$el, ...queryAll(target, this.$el)];
|
|
4822
4816
|
},
|
|
4823
4817
|
|
|
4824
4818
|
watch() {
|
|
4825
4819
|
this.observe();
|
|
4826
|
-
} },
|
|
4827
|
-
|
|
4820
|
+
} } },
|
|
4828
4821
|
|
|
4829
|
-
offsetTop(_ref6) {let { offsetTop } = _ref6;
|
|
4830
|
-
return toPx(offsetTop, 'height');
|
|
4831
|
-
},
|
|
4832
|
-
|
|
4833
|
-
offsetLeft(_ref7) {let { offsetLeft } = _ref7;
|
|
4834
|
-
return toPx(offsetLeft, 'width');
|
|
4835
|
-
} },
|
|
4836
4822
|
|
|
4837
4823
|
|
|
4838
4824
|
connected() {
|
|
4839
|
-
if (!window.IntersectionObserver) {
|
|
4840
|
-
|
|
4825
|
+
if (this.loading !== 'lazy' || !window.IntersectionObserver || !nativeIsIntersecting) {
|
|
4826
|
+
this.load();
|
|
4841
4827
|
return;
|
|
4842
4828
|
}
|
|
4843
4829
|
|
|
4844
|
-
if (
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4830
|
+
if (nativeLazyLoad && isImg(this.$el)) {
|
|
4831
|
+
this.$el.loading = 'lazy';
|
|
4832
|
+
setSrcAttrs(this.$el);
|
|
4833
|
+
|
|
4834
|
+
if (this.target.length === 1) {
|
|
4835
|
+
return;
|
|
4836
|
+
}
|
|
4848
4837
|
}
|
|
4849
4838
|
|
|
4850
|
-
|
|
4851
|
-
rootMargin: this.offsetTop + "px " + this.offsetLeft + "px" });
|
|
4839
|
+
ensureSrcAttribute(this.$el);
|
|
4852
4840
|
|
|
4841
|
+
const rootMargin = toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
4842
|
+
this.offsetLeft,
|
|
4843
|
+
'width') + "px";
|
|
4853
4844
|
|
|
4854
|
-
|
|
4855
|
-
|
|
4845
|
+
this.observer = new IntersectionObserver(
|
|
4846
|
+
(entries) => {
|
|
4847
|
+
if (entries.some((entry) => entry.isIntersecting)) {
|
|
4848
|
+
this.load();
|
|
4849
|
+
this.observer.disconnect();
|
|
4850
|
+
}
|
|
4851
|
+
},
|
|
4852
|
+
{ rootMargin });
|
|
4856
4853
|
|
|
4857
|
-
|
|
4858
|
-
this.observer && this.observer.disconnect();
|
|
4854
|
+
this.observe();
|
|
4859
4855
|
},
|
|
4860
4856
|
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
}
|
|
4857
|
+
disconnected() {var _this$observer;
|
|
4858
|
+
if (this._data.image) {
|
|
4859
|
+
this._data.image.onload = '';
|
|
4860
|
+
}
|
|
4866
4861
|
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
}
|
|
4862
|
+
(_this$observer = this.observer) == null ? void 0 : _this$observer.disconnect();
|
|
4863
|
+
},
|
|
4870
4864
|
|
|
4871
|
-
|
|
4865
|
+
update: {
|
|
4866
|
+
write(store) {
|
|
4867
|
+
if (!this.observer || isImg(this.$el)) {
|
|
4872
4868
|
return false;
|
|
4873
4869
|
}
|
|
4874
4870
|
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
(img) => img && img.currentSrc !== '' && setSrcAttrs(this.$el, currentSrc(img)));
|
|
4878
|
-
|
|
4879
|
-
},
|
|
4880
|
-
|
|
4881
|
-
write(data) {
|
|
4882
|
-
if (this.dataSrcset && window.devicePixelRatio !== 1) {
|
|
4871
|
+
const srcset = data(this.$el, 'data-srcset');
|
|
4872
|
+
if (srcset && window.devicePixelRatio !== 1) {
|
|
4883
4873
|
const bgSize = css(this.$el, 'backgroundSize');
|
|
4884
|
-
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) ===
|
|
4885
|
-
|
|
4886
|
-
css(this.$el, 'backgroundSize',
|
|
4874
|
+
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === store.bgSize) {
|
|
4875
|
+
store.bgSize = getSourceSize(srcset, data(this.$el, 'sizes'));
|
|
4876
|
+
css(this.$el, 'backgroundSize', store.bgSize + "px");
|
|
4887
4877
|
}
|
|
4888
4878
|
}
|
|
4889
4879
|
},
|
|
@@ -4892,24 +4882,18 @@
|
|
|
4892
4882
|
|
|
4893
4883
|
|
|
4894
4884
|
methods: {
|
|
4895
|
-
load(
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
!entries.some((entry) => isUndefined(entry.isIntersecting) || entry.isIntersecting))
|
|
4899
|
-
{
|
|
4900
|
-
return;
|
|
4885
|
+
load() {
|
|
4886
|
+
if (this._data.image) {
|
|
4887
|
+
return this._data.image;
|
|
4901
4888
|
}
|
|
4902
4889
|
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
storage[this.cacheKey] = currentSrc(img);
|
|
4907
|
-
return img;
|
|
4908
|
-
},
|
|
4909
|
-
(e) => trigger(this.$el, new e.constructor(e.type, e)));
|
|
4910
|
-
|
|
4890
|
+
const image = isImg(this.$el) ?
|
|
4891
|
+
this.$el :
|
|
4892
|
+
getImageFromElement(this.$el, this.dataSrc, this.sources);
|
|
4911
4893
|
|
|
4912
|
-
|
|
4894
|
+
removeAttr(image, 'loading');
|
|
4895
|
+
setSrcAttrs(this.$el, image.currentSrc);
|
|
4896
|
+
return this._data.image = image;
|
|
4913
4897
|
},
|
|
4914
4898
|
|
|
4915
4899
|
observe() {
|
|
@@ -4922,12 +4906,11 @@
|
|
|
4922
4906
|
|
|
4923
4907
|
|
|
4924
4908
|
|
|
4925
|
-
function setSrcAttrs(el, src
|
|
4909
|
+
function setSrcAttrs(el, src) {
|
|
4926
4910
|
if (isImg(el)) {
|
|
4927
|
-
const
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
set('src', src);
|
|
4911
|
+
const parentNode = parent(el);
|
|
4912
|
+
const elements = isPicture(parentNode) ? children(parentNode) : [el];
|
|
4913
|
+
elements.forEach((el) => setSourceProps(el, el));
|
|
4931
4914
|
} else if (src) {
|
|
4932
4915
|
const change = !includes(el.style.backgroundImage, src);
|
|
4933
4916
|
if (change) {
|
|
@@ -4937,16 +4920,62 @@
|
|
|
4937
4920
|
}
|
|
4938
4921
|
}
|
|
4939
4922
|
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4923
|
+
const srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
4924
|
+
function setSourceProps(sourceEl, targetEl) {
|
|
4925
|
+
srcProps.forEach((prop) => {
|
|
4926
|
+
const value = data(sourceEl, prop);
|
|
4927
|
+
if (value) {
|
|
4928
|
+
attr(targetEl, prop.replace(/^(data-)+/, ''), value);
|
|
4929
|
+
}
|
|
4930
|
+
});
|
|
4931
|
+
}
|
|
4932
|
+
|
|
4933
|
+
function getImageFromElement(el, src, sources) {
|
|
4934
|
+
const img = new Image();
|
|
4935
|
+
|
|
4936
|
+
wrapInPicture(img, sources);
|
|
4937
|
+
setSourceProps(el, img);
|
|
4938
|
+
img.onload = () => {
|
|
4939
|
+
setSrcAttrs(el, img.currentSrc);
|
|
4940
|
+
};
|
|
4941
|
+
attr(img, 'src', src);
|
|
4942
|
+
return img;
|
|
4943
|
+
}
|
|
4944
|
+
|
|
4945
|
+
function wrapInPicture(img, sources) {
|
|
4946
|
+
sources = parseSources(sources);
|
|
4947
|
+
|
|
4948
|
+
if (sources.length) {
|
|
4949
|
+
const picture = fragment('<picture>');
|
|
4950
|
+
for (const attrs of sources) {
|
|
4951
|
+
const source = fragment('<source>');
|
|
4952
|
+
attr(source, attrs);
|
|
4953
|
+
append(picture, source);
|
|
4954
|
+
}
|
|
4955
|
+
append(picture, img);
|
|
4956
|
+
}
|
|
4957
|
+
}
|
|
4958
|
+
|
|
4959
|
+
function parseSources(sources) {
|
|
4960
|
+
if (!sources) {
|
|
4961
|
+
return [];
|
|
4962
|
+
}
|
|
4946
4963
|
|
|
4964
|
+
if (startsWith(sources, '[')) {
|
|
4965
|
+
try {
|
|
4966
|
+
sources = JSON.parse(sources);
|
|
4967
|
+
} catch (e) {
|
|
4968
|
+
sources = [];
|
|
4969
|
+
}
|
|
4970
|
+
} else {
|
|
4971
|
+
sources = parseOptions(sources);
|
|
4947
4972
|
}
|
|
4948
4973
|
|
|
4949
|
-
|
|
4974
|
+
if (!isArray(sources)) {
|
|
4975
|
+
sources = [sources];
|
|
4976
|
+
}
|
|
4977
|
+
|
|
4978
|
+
return sources.filter((source) => !isEmpty(source));
|
|
4950
4979
|
}
|
|
4951
4980
|
|
|
4952
4981
|
const sizesRe = /\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g;
|
|
@@ -4986,24 +5015,18 @@
|
|
|
4986
5015
|
return descriptors.filter((size) => size >= srcSize)[0] || descriptors.pop() || '';
|
|
4987
5016
|
}
|
|
4988
5017
|
|
|
4989
|
-
function
|
|
4990
|
-
|
|
5018
|
+
function ensureSrcAttribute(el) {
|
|
5019
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
5020
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
5021
|
+
}
|
|
4991
5022
|
}
|
|
4992
5023
|
|
|
4993
|
-
function
|
|
4994
|
-
return el
|
|
5024
|
+
function isPicture(el) {
|
|
5025
|
+
return isTag(el, 'picture');
|
|
4995
5026
|
}
|
|
4996
5027
|
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
// workaround for Safari's private browsing mode and accessing sessionStorage in Blink
|
|
5001
|
-
try {
|
|
5002
|
-
storage = window.sessionStorage || {};
|
|
5003
|
-
storage[key] = 1;
|
|
5004
|
-
delete storage[key];
|
|
5005
|
-
} catch (e) {
|
|
5006
|
-
storage = {};
|
|
5028
|
+
function isImg(el) {
|
|
5029
|
+
return isTag(el, 'img');
|
|
5007
5030
|
}
|
|
5008
5031
|
|
|
5009
5032
|
var Media = {
|
|
@@ -5459,7 +5482,7 @@
|
|
|
5459
5482
|
|
|
5460
5483
|
|
|
5461
5484
|
function openDialog(tmpl, options, hideFn, submitFn) {
|
|
5462
|
-
options =
|
|
5485
|
+
options = { bgClose: false, escClose: true, labels: modal.labels, ...options };
|
|
5463
5486
|
|
|
5464
5487
|
const dialog = modal.dialog(tmpl(options), options);
|
|
5465
5488
|
const deferred = new Deferred();
|
|
@@ -5588,10 +5611,11 @@
|
|
|
5588
5611
|
this.$create(
|
|
5589
5612
|
'drop',
|
|
5590
5613
|
dropdowns.filter((el) => !this.getDropdown(el)),
|
|
5591
|
-
|
|
5614
|
+
{
|
|
5615
|
+
...this.$props,
|
|
5592
5616
|
boundary: this.boundary,
|
|
5593
5617
|
pos: this.pos,
|
|
5594
|
-
offset: this.dropbar || this.offset })
|
|
5618
|
+
offset: this.dropbar || this.offset });
|
|
5595
5619
|
|
|
5596
5620
|
|
|
5597
5621
|
},
|
|
@@ -6483,26 +6507,11 @@
|
|
|
6483
6507
|
|
|
6484
6508
|
|
|
6485
6509
|
computed: {
|
|
6486
|
-
|
|
6487
|
-
return position === 'auto' ?
|
|
6488
|
-
(this.isFixed ? this.placeholder : $el).offsetHeight > height(window) ?
|
|
6489
|
-
'bottom' :
|
|
6490
|
-
'top' :
|
|
6491
|
-
position;
|
|
6492
|
-
},
|
|
6493
|
-
|
|
6494
|
-
offset(_ref2, $el) {let { offset } = _ref2;
|
|
6495
|
-
if (this.position === 'bottom') {
|
|
6496
|
-
offset += '+100vh-100%';
|
|
6497
|
-
}
|
|
6498
|
-
return toPx(offset, 'height', $el);
|
|
6499
|
-
},
|
|
6500
|
-
|
|
6501
|
-
selTarget(_ref3, $el) {let { selTarget } = _ref3;
|
|
6510
|
+
selTarget(_ref, $el) {let { selTarget } = _ref;
|
|
6502
6511
|
return selTarget && $(selTarget, $el) || $el;
|
|
6503
6512
|
},
|
|
6504
6513
|
|
|
6505
|
-
widthElement(
|
|
6514
|
+
widthElement(_ref2, $el) {let { widthElement } = _ref2;
|
|
6506
6515
|
return query(widthElement, $el) || this.placeholder;
|
|
6507
6516
|
},
|
|
6508
6517
|
|
|
@@ -6550,41 +6559,36 @@
|
|
|
6550
6559
|
return window;
|
|
6551
6560
|
},
|
|
6552
6561
|
|
|
6562
|
+
filter() {
|
|
6563
|
+
return this.targetOffset !== false;
|
|
6564
|
+
},
|
|
6565
|
+
|
|
6553
6566
|
handler() {
|
|
6554
|
-
if (!
|
|
6567
|
+
if (!location.hash || scrollTop(window) === 0) {
|
|
6555
6568
|
return;
|
|
6556
6569
|
}
|
|
6557
6570
|
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
fastdom.read(() => {
|
|
6562
|
-
const { top } = offset(target);
|
|
6563
|
-
const elTop = offset(this.$el).top;
|
|
6564
|
-
const elHeight = this.$el.offsetHeight;
|
|
6571
|
+
fastdom.read(() => {
|
|
6572
|
+
const targetOffset = offset($(location.hash));
|
|
6573
|
+
const elOffset = offset(this.$el);
|
|
6565
6574
|
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
top -
|
|
6574
|
-
elHeight - (
|
|
6575
|
-
isNumeric(this.targetOffset) ? this.targetOffset : 0) -
|
|
6576
|
-
this.offset);
|
|
6575
|
+
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6576
|
+
scrollTop(
|
|
6577
|
+
window,
|
|
6578
|
+
targetOffset.top -
|
|
6579
|
+
elOffset.height -
|
|
6580
|
+
toPx(this.targetOffset, 'height') -
|
|
6581
|
+
toPx(this.offset, 'height'));
|
|
6577
6582
|
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
}
|
|
6583
|
+
}
|
|
6584
|
+
});
|
|
6581
6585
|
} }],
|
|
6582
6586
|
|
|
6583
6587
|
|
|
6584
6588
|
|
|
6585
6589
|
update: [
|
|
6586
6590
|
{
|
|
6587
|
-
read(
|
|
6591
|
+
read(_ref3, types) {let { height: height$1, margin } = _ref3;
|
|
6588
6592
|
this.inactive = !this.matchMedia || !isVisible(this.$el);
|
|
6589
6593
|
|
|
6590
6594
|
if (this.inactive) {
|
|
@@ -6593,35 +6597,49 @@
|
|
|
6593
6597
|
|
|
6594
6598
|
const hide = this.isActive && types.has('resize');
|
|
6595
6599
|
if (hide) {
|
|
6600
|
+
css(this.selTarget, 'transition', '0s');
|
|
6596
6601
|
this.hide();
|
|
6597
6602
|
}
|
|
6598
6603
|
|
|
6599
6604
|
if (!this.isActive) {
|
|
6600
|
-
height$1 = this.$el.
|
|
6605
|
+
height$1 = offset(this.$el).height;
|
|
6601
6606
|
margin = css(this.$el, 'margin');
|
|
6602
6607
|
}
|
|
6603
6608
|
|
|
6604
6609
|
if (hide) {
|
|
6605
6610
|
this.show();
|
|
6611
|
+
fastdom.write(() => css(this.selTarget, 'transition', ''));
|
|
6606
6612
|
}
|
|
6607
6613
|
|
|
6608
|
-
const overflow = Math.max(0, height$1 + this.offset - height(window));
|
|
6609
|
-
|
|
6610
6614
|
const referenceElement = this.isFixed ? this.placeholder : this.$el;
|
|
6615
|
+
const windowHeight = height(window);
|
|
6616
|
+
|
|
6617
|
+
let position = this.position;
|
|
6618
|
+
if (position === 'auto' && height$1 > windowHeight) {
|
|
6619
|
+
position = 'bottom';
|
|
6620
|
+
}
|
|
6621
|
+
|
|
6622
|
+
let offset$1 = toPx(this.offset, 'height', referenceElement);
|
|
6623
|
+
if (position === 'bottom') {
|
|
6624
|
+
offset$1 += windowHeight - height$1;
|
|
6625
|
+
}
|
|
6626
|
+
|
|
6627
|
+
const overflow = Math.max(0, height$1 + offset$1 - windowHeight);
|
|
6611
6628
|
const topOffset = offset(referenceElement).top;
|
|
6612
6629
|
const offsetParentTop = offset(referenceElement.offsetParent).top;
|
|
6613
6630
|
|
|
6614
6631
|
const top = parseProp(this.top, this.$el, topOffset);
|
|
6615
6632
|
const bottom = parseProp(this.bottom, this.$el, topOffset + height$1, true);
|
|
6616
6633
|
|
|
6617
|
-
const start = Math.max(top, topOffset) -
|
|
6634
|
+
const start = Math.max(top, topOffset) - offset$1;
|
|
6618
6635
|
const end = bottom ?
|
|
6619
|
-
bottom - this.$el.
|
|
6620
|
-
getScrollingElement(this.$el).scrollHeight -
|
|
6636
|
+
bottom - offset(this.$el).height + overflow - offset$1 :
|
|
6637
|
+
getScrollingElement(this.$el).scrollHeight - windowHeight;
|
|
6621
6638
|
|
|
6622
6639
|
return {
|
|
6623
6640
|
start,
|
|
6624
6641
|
end,
|
|
6642
|
+
offset: offset$1,
|
|
6625
6643
|
overflow,
|
|
6626
6644
|
topOffset,
|
|
6627
6645
|
offsetParentTop,
|
|
@@ -6629,11 +6647,11 @@
|
|
|
6629
6647
|
margin,
|
|
6630
6648
|
width: dimensions(isVisible(this.widthElement) ? this.widthElement : this.$el).
|
|
6631
6649
|
width,
|
|
6632
|
-
top: offsetPosition(
|
|
6650
|
+
top: offsetPosition(referenceElement)[0] };
|
|
6633
6651
|
|
|
6634
6652
|
},
|
|
6635
6653
|
|
|
6636
|
-
write(
|
|
6654
|
+
write(_ref4) {let { height, margin } = _ref4;
|
|
6637
6655
|
const { placeholder } = this;
|
|
6638
6656
|
|
|
6639
6657
|
css(placeholder, { height, margin });
|
|
@@ -6650,14 +6668,14 @@
|
|
|
6650
6668
|
|
|
6651
6669
|
|
|
6652
6670
|
{
|
|
6653
|
-
read(
|
|
6671
|
+
read(_ref5)
|
|
6654
6672
|
|
|
6655
6673
|
|
|
6656
6674
|
|
|
6657
6675
|
|
|
6658
6676
|
|
|
6659
6677
|
|
|
6660
|
-
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } =
|
|
6678
|
+
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref5;
|
|
6661
6679
|
const scroll = scrollTop(window);
|
|
6662
6680
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
6663
6681
|
|
|
@@ -6738,7 +6756,7 @@
|
|
|
6738
6756
|
}
|
|
6739
6757
|
} else if (this.isFixed) {
|
|
6740
6758
|
this.update();
|
|
6741
|
-
} else if (this.animation) {
|
|
6759
|
+
} else if (this.animation && scroll > topOffset) {
|
|
6742
6760
|
Animation.cancel(this.$el);
|
|
6743
6761
|
this.show();
|
|
6744
6762
|
Animation.in(this.$el, this.animation).catch(noop);
|
|
@@ -6766,33 +6784,33 @@
|
|
|
6766
6784
|
},
|
|
6767
6785
|
|
|
6768
6786
|
update() {
|
|
6769
|
-
|
|
6787
|
+
let {
|
|
6770
6788
|
width,
|
|
6771
6789
|
scroll = 0,
|
|
6772
6790
|
overflow,
|
|
6773
6791
|
overflowScroll = 0,
|
|
6774
6792
|
start,
|
|
6775
6793
|
end,
|
|
6794
|
+
offset,
|
|
6776
6795
|
topOffset,
|
|
6777
6796
|
height,
|
|
6778
6797
|
offsetParentTop } =
|
|
6779
6798
|
this._data;
|
|
6780
6799
|
const active = start !== 0 || scroll > start;
|
|
6781
|
-
let top = this.offset;
|
|
6782
6800
|
let position = 'fixed';
|
|
6783
6801
|
|
|
6784
6802
|
if (scroll > end) {
|
|
6785
|
-
|
|
6803
|
+
offset += end - offsetParentTop;
|
|
6786
6804
|
position = 'absolute';
|
|
6787
6805
|
}
|
|
6788
6806
|
|
|
6789
6807
|
if (overflow) {
|
|
6790
|
-
|
|
6808
|
+
offset -= overflowScroll;
|
|
6791
6809
|
}
|
|
6792
6810
|
|
|
6793
6811
|
css(this.$el, {
|
|
6794
6812
|
position,
|
|
6795
|
-
top:
|
|
6813
|
+
top: offset + "px",
|
|
6796
6814
|
width });
|
|
6797
6815
|
|
|
6798
6816
|
|
|
@@ -7107,7 +7125,7 @@
|
|
|
7107
7125
|
name: 'keydown',
|
|
7108
7126
|
|
|
7109
7127
|
filter() {
|
|
7110
|
-
return includes(this.mode, 'click') && this.$el
|
|
7128
|
+
return includes(this.mode, 'click') && !isTag(this.$el, 'input');
|
|
7111
7129
|
},
|
|
7112
7130
|
|
|
7113
7131
|
handler(e) {
|