uikit 3.11.2-dev.7dd548556 → 3.11.2-dev.93483bd3e
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 +32 -18
- package/dist/css/uikit-core-rtl.css +80 -186
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +80 -186
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +82 -192
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +82 -192
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +3 -3
- 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 +31 -60
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +34 -64
- 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 +108 -72
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +108 -72
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +75 -28
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +108 -72
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +57 -21
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +12 -14
- 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 +4 -4
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +271 -287
- 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 +507 -458
- 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 +3 -3
- package/src/js/components/countdown.js +2 -2
- 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/slider-transitioner.js +2 -2
- 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 +3 -4
- package/src/js/components/slider.js +30 -11
- package/src/js/components/slideshow.js +8 -1
- package/src/js/components/sortable.js +8 -8
- package/src/js/components/upload.js +3 -3
- package/src/js/core/accordion.js +3 -3
- package/src/js/core/alert.js +1 -2
- package/src/js/core/height-match.js +3 -3
- package/src/js/core/img.js +132 -115
- package/src/js/core/modal.js +1 -2
- package/src/js/core/navbar.js +5 -5
- package/src/js/core/scrollspy.js +6 -6
- package/src/js/core/sticky.js +1 -1
- package/src/js/core/svg.js +10 -6
- package/src/js/core/toggle.js +4 -3
- package/src/js/mixin/internal/animate-slide.js +9 -12
- package/src/js/mixin/parallax.js +108 -72
- package/src/js/mixin/slider-drag.js +3 -3
- package/src/js/mixin/slider-nav.js +2 -2
- 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 +9 -12
- package/src/js/util/animation.js +7 -12
- package/src/js/util/attr.js +11 -9
- package/src/js/util/dom.js +27 -45
- 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/position.js +2 -2
- package/src/js/util/selector.js +12 -18
- package/src/js/util/style.js +4 -4
- package/src/less/components/base.less +10 -33
- package/src/less/components/form-range.less +52 -97
- package/src/less/components/form.less +0 -1
- 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 +52 -97
- package/src/scss/components/form.scss +0 -1
- 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 +47 -62
- 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/src/js/util/promise.js +0 -0
- 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.93483bd3e | 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,
|
|
@@ -304,17 +305,17 @@
|
|
|
304
305
|
if (isUndefined(value)) {var _toNode;
|
|
305
306
|
return (_toNode = toNode(element)) == null ? void 0 : _toNode.getAttribute(name);
|
|
306
307
|
} else {
|
|
307
|
-
toNodes(element)
|
|
308
|
+
for (const el of toNodes(element)) {
|
|
308
309
|
if (isFunction(value)) {
|
|
309
|
-
value = value.call(
|
|
310
|
+
value = value.call(el, attr(el, name));
|
|
310
311
|
}
|
|
311
312
|
|
|
312
313
|
if (value === null) {
|
|
313
|
-
removeAttr(
|
|
314
|
+
removeAttr(el, name);
|
|
314
315
|
} else {
|
|
315
|
-
|
|
316
|
+
el.setAttribute(name, value);
|
|
316
317
|
}
|
|
317
|
-
}
|
|
318
|
+
}
|
|
318
319
|
}
|
|
319
320
|
}
|
|
320
321
|
|
|
@@ -323,10 +324,12 @@
|
|
|
323
324
|
}
|
|
324
325
|
|
|
325
326
|
function removeAttr(element, name) {
|
|
326
|
-
|
|
327
|
-
name.split(' ')
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
const elements = toNodes(element);
|
|
328
|
+
for (const attribute of name.split(' ')) {
|
|
329
|
+
for (const element of elements) {
|
|
330
|
+
element.removeAttribute(attribute);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
330
333
|
}
|
|
331
334
|
|
|
332
335
|
function data(element, attribute) {
|
|
@@ -337,19 +340,6 @@
|
|
|
337
340
|
}
|
|
338
341
|
}
|
|
339
342
|
|
|
340
|
-
const inBrowser = typeof window !== 'undefined';
|
|
341
|
-
const isRtl = inBrowser && attr(document.documentElement, 'dir') === 'rtl';
|
|
342
|
-
|
|
343
|
-
const hasTouch = inBrowser && 'ontouchstart' in window;
|
|
344
|
-
const hasPointerEvents = inBrowser && window.PointerEvent;
|
|
345
|
-
|
|
346
|
-
const pointerDown = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
|
|
347
|
-
const pointerMove = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
|
|
348
|
-
const pointerUp = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
|
|
349
|
-
const pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouch ? '' : 'mouseenter';
|
|
350
|
-
const pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouch ? '' : 'mouseleave';
|
|
351
|
-
const pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';
|
|
352
|
-
|
|
353
343
|
const voidElements = {
|
|
354
344
|
area: true,
|
|
355
345
|
base: true,
|
|
@@ -449,12 +439,6 @@
|
|
|
449
439
|
return findAll(selector, getContext(selector, context));
|
|
450
440
|
}
|
|
451
441
|
|
|
452
|
-
function getContext(selector, context) {if (context === void 0) {context = document;}
|
|
453
|
-
return isString(selector) && isContextSelector(selector) || isDocument(context) ?
|
|
454
|
-
context :
|
|
455
|
-
context.ownerDocument;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
442
|
function find(selector, context) {
|
|
459
443
|
return toNode(_query(selector, context, 'querySelector'));
|
|
460
444
|
}
|
|
@@ -463,6 +447,17 @@
|
|
|
463
447
|
return toNodes(_query(selector, context, 'querySelectorAll'));
|
|
464
448
|
}
|
|
465
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
|
+
|
|
466
461
|
function _query(selector, context, queryFn) {if (context === void 0) {context = document;}
|
|
467
462
|
if (!selector || !isString(selector)) {
|
|
468
463
|
return selector;
|
|
@@ -507,11 +502,6 @@
|
|
|
507
502
|
}
|
|
508
503
|
}
|
|
509
504
|
|
|
510
|
-
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
511
|
-
const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
512
|
-
|
|
513
|
-
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
514
|
-
|
|
515
505
|
const selectorRe = /.*?[^\\](?:,|$)/g;
|
|
516
506
|
|
|
517
507
|
const splitSelector = memoize((selector) =>
|
|
@@ -537,13 +527,8 @@
|
|
|
537
527
|
return names.join(' > ');
|
|
538
528
|
}
|
|
539
529
|
|
|
540
|
-
const escapeFn =
|
|
541
|
-
inBrowser && window.CSS && CSS.escape ||
|
|
542
|
-
function (css) {
|
|
543
|
-
return css.replace(/([^\x7f-\uFFFF\w-])/g, (match) => "\\" + match);
|
|
544
|
-
};
|
|
545
530
|
function escape(css) {
|
|
546
|
-
return isString(css) ?
|
|
531
|
+
return isString(css) ? CSS.escape(css) : '';
|
|
547
532
|
}
|
|
548
533
|
|
|
549
534
|
function on() {for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}
|
|
@@ -686,17 +671,14 @@
|
|
|
686
671
|
}
|
|
687
672
|
|
|
688
673
|
function ajax(url, options) {
|
|
689
|
-
const env =
|
|
690
|
-
{
|
|
674
|
+
const env = {
|
|
691
675
|
data: null,
|
|
692
676
|
method: 'GET',
|
|
693
677
|
headers: {},
|
|
694
678
|
xhr: new XMLHttpRequest(),
|
|
695
679
|
beforeSend: noop,
|
|
696
|
-
responseType: ''
|
|
697
|
-
|
|
698
|
-
options);
|
|
699
|
-
|
|
680
|
+
responseType: '',
|
|
681
|
+
...options };
|
|
700
682
|
|
|
701
683
|
return Promise.resolve().
|
|
702
684
|
then(() => env.beforeSend(env)).
|
|
@@ -775,7 +757,8 @@
|
|
|
775
757
|
|
|
776
758
|
|
|
777
759
|
function css(element, property, value, priority) {if (priority === void 0) {priority = '';}
|
|
778
|
-
|
|
760
|
+
const elements = toNodes(element);
|
|
761
|
+
for (const element of elements) {
|
|
779
762
|
if (isString(property)) {
|
|
780
763
|
property = propName(property);
|
|
781
764
|
|
|
@@ -801,9 +784,8 @@
|
|
|
801
784
|
priority = value;
|
|
802
785
|
each(property, (value, property) => css(element, property, value, priority));
|
|
803
786
|
}
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
})[0];
|
|
787
|
+
}
|
|
788
|
+
return elements[0];
|
|
807
789
|
}
|
|
808
790
|
|
|
809
791
|
function getStyles(element, pseudoElt) {
|
|
@@ -930,16 +912,11 @@
|
|
|
930
912
|
|
|
931
913
|
|
|
932
914
|
addClass(element, 'uk-transition');
|
|
933
|
-
css(
|
|
934
|
-
element,
|
|
935
|
-
assign(
|
|
936
|
-
{
|
|
915
|
+
css(element, {
|
|
937
916
|
transitionProperty: Object.keys(props).map(propName).join(','),
|
|
938
917
|
transitionDuration: duration + "ms",
|
|
939
|
-
transitionTimingFunction: timing
|
|
940
|
-
|
|
941
|
-
props));
|
|
942
|
-
|
|
918
|
+
transitionTimingFunction: timing,
|
|
919
|
+
...props });
|
|
943
920
|
|
|
944
921
|
})));
|
|
945
922
|
|
|
@@ -1214,6 +1191,10 @@
|
|
|
1214
1191
|
once(document, 'DOMContentLoaded', fn);
|
|
1215
1192
|
}
|
|
1216
1193
|
|
|
1194
|
+
function isTag(element, tagName) {var _element$tagName;
|
|
1195
|
+
return (element == null ? void 0 : (_element$tagName = element.tagName) == null ? void 0 : _element$tagName.toLowerCase()) === tagName.toLowerCase();
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1217
1198
|
function empty(element) {
|
|
1218
1199
|
return replaceChildren(element, '');
|
|
1219
1200
|
}
|
|
@@ -1222,34 +1203,20 @@
|
|
|
1222
1203
|
return isUndefined(html) ? $(parent).innerHTML : replaceChildren(parent, html);
|
|
1223
1204
|
}
|
|
1224
1205
|
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
function prepend(parent, element) {
|
|
1232
|
-
const nodes = $$(element);
|
|
1233
|
-
$(parent).prepend(...nodes);
|
|
1234
|
-
return nodes;
|
|
1235
|
-
}
|
|
1206
|
+
const replaceChildren = applyFn('replaceChildren');
|
|
1207
|
+
const prepend = applyFn('prepend');
|
|
1208
|
+
const append = applyFn('append');
|
|
1209
|
+
const before = applyFn('before');
|
|
1210
|
+
const after = applyFn('after');
|
|
1236
1211
|
|
|
1237
|
-
function
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
$(ref).before(...nodes);
|
|
1246
|
-
return nodes;
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
function after(ref, element) {
|
|
1250
|
-
const nodes = $$(element);
|
|
1251
|
-
$(ref).after(...nodes);
|
|
1252
|
-
return nodes;
|
|
1212
|
+
function applyFn(fn) {
|
|
1213
|
+
return function (ref, element) {
|
|
1214
|
+
const nodes = toNodes(isString(element) ? fragment(element) : element);
|
|
1215
|
+
if (nodes.length) {
|
|
1216
|
+
$(ref)[fn](...nodes);
|
|
1217
|
+
}
|
|
1218
|
+
return unwrapSingle(nodes);
|
|
1219
|
+
};
|
|
1253
1220
|
}
|
|
1254
1221
|
|
|
1255
1222
|
function remove$1(element) {
|
|
@@ -1282,29 +1249,21 @@
|
|
|
1282
1249
|
toNodes(element).
|
|
1283
1250
|
map(parent).
|
|
1284
1251
|
filter((value, index, self) => self.indexOf(value) === index).
|
|
1285
|
-
forEach((parent) =>
|
|
1286
|
-
before(parent, parent.childNodes);
|
|
1287
|
-
remove$1(parent);
|
|
1288
|
-
});
|
|
1252
|
+
forEach((parent) => parent.replaceWith(...parent.childNodes));
|
|
1289
1253
|
}
|
|
1290
1254
|
|
|
1291
|
-
const fragmentRe = /^\s*<(\w+|!)[^>]*>/;
|
|
1292
|
-
const singleTagRe = /^<(\w+)\s*\/?>(?:<\/\1>)?$/;
|
|
1293
|
-
|
|
1294
1255
|
function fragment(html) {
|
|
1295
|
-
const
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
const container = document.createElement('div');
|
|
1301
|
-
if (fragmentRe.test(html)) {
|
|
1302
|
-
container.insertAdjacentHTML('beforeend', html.trim());
|
|
1303
|
-
} else {
|
|
1304
|
-
container.textContent = html;
|
|
1256
|
+
const template = document.createElement('template');
|
|
1257
|
+
template.innerHTML = html.trim();
|
|
1258
|
+
const nodes = toNodes(template.content.childNodes);
|
|
1259
|
+
for (const node of nodes) {
|
|
1260
|
+
document.adoptNode(node);
|
|
1305
1261
|
}
|
|
1262
|
+
return unwrapSingle(nodes);
|
|
1263
|
+
}
|
|
1306
1264
|
|
|
1307
|
-
|
|
1265
|
+
function unwrapSingle(nodes) {
|
|
1266
|
+
return nodes.length > 1 ? nodes : nodes[0];
|
|
1308
1267
|
}
|
|
1309
1268
|
|
|
1310
1269
|
function apply(node, fn) {
|
|
@@ -1333,6 +1292,19 @@
|
|
|
1333
1292
|
return isString(str) && startsWith(str.trim(), '<');
|
|
1334
1293
|
}
|
|
1335
1294
|
|
|
1295
|
+
const inBrowser = typeof window !== 'undefined';
|
|
1296
|
+
const isRtl = inBrowser && attr(document.documentElement, 'dir') === 'rtl';
|
|
1297
|
+
|
|
1298
|
+
const hasTouch = inBrowser && 'ontouchstart' in window;
|
|
1299
|
+
const hasPointerEvents = inBrowser && window.PointerEvent;
|
|
1300
|
+
|
|
1301
|
+
const pointerDown = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
|
|
1302
|
+
const pointerMove = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
|
|
1303
|
+
const pointerUp = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
|
|
1304
|
+
const pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouch ? '' : 'mouseenter';
|
|
1305
|
+
const pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouch ? '' : 'mouseleave';
|
|
1306
|
+
const pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';
|
|
1307
|
+
|
|
1336
1308
|
/*
|
|
1337
1309
|
Based on:
|
|
1338
1310
|
Copyright (c) 2016 Wilson Page wilsonpage@me.com
|
|
@@ -1524,7 +1496,7 @@
|
|
|
1524
1496
|
|
|
1525
1497
|
// extend strategy
|
|
1526
1498
|
strats.computed = strats.methods = function (parentVal, childVal) {
|
|
1527
|
-
return childVal ? parentVal ?
|
|
1499
|
+
return childVal ? parentVal ? { ...parentVal, ...childVal } : childVal : parentVal;
|
|
1528
1500
|
};
|
|
1529
1501
|
|
|
1530
1502
|
// data strategy
|
|
@@ -1664,11 +1636,11 @@
|
|
|
1664
1636
|
}
|
|
1665
1637
|
|
|
1666
1638
|
function isHTML5(el) {
|
|
1667
|
-
return (el
|
|
1639
|
+
return isTag(el, 'video');
|
|
1668
1640
|
}
|
|
1669
1641
|
|
|
1670
1642
|
function isIFrame(el) {
|
|
1671
|
-
return (el
|
|
1643
|
+
return isTag(el, 'iframe') && (isYoutube(el) || isVimeo(el));
|
|
1672
1644
|
}
|
|
1673
1645
|
|
|
1674
1646
|
function isYoutube(el) {
|
|
@@ -1688,7 +1660,7 @@
|
|
|
1688
1660
|
|
|
1689
1661
|
function post(el, cmd) {
|
|
1690
1662
|
try {
|
|
1691
|
-
el.contentWindow.postMessage(JSON.stringify(
|
|
1663
|
+
el.contentWindow.postMessage(JSON.stringify({ event: 'command', ...cmd }), '*');
|
|
1692
1664
|
} catch (e) {
|
|
1693
1665
|
// noop
|
|
1694
1666
|
}
|
|
@@ -1980,14 +1952,14 @@
|
|
|
1980
1952
|
if (newVal >= boundary[align] && newVal + dim[prop] <= boundary[alignFlip]) {
|
|
1981
1953
|
position[align] = newVal;
|
|
1982
1954
|
|
|
1983
|
-
['element', 'target']
|
|
1955
|
+
for (const el of ['element', 'target']) {
|
|
1984
1956
|
if (elemOffset) {
|
|
1985
1957
|
flipped[el][dir] =
|
|
1986
1958
|
flipped[el][dir] === dirs[prop][1] ?
|
|
1987
1959
|
dirs[prop][2] :
|
|
1988
1960
|
dirs[prop][1];
|
|
1989
1961
|
}
|
|
1990
|
-
}
|
|
1962
|
+
}
|
|
1991
1963
|
|
|
1992
1964
|
return true;
|
|
1993
1965
|
}
|
|
@@ -2068,6 +2040,7 @@
|
|
|
2068
2040
|
flipPosition: flipPosition,
|
|
2069
2041
|
toPx: toPx,
|
|
2070
2042
|
ready: ready,
|
|
2043
|
+
isTag: isTag,
|
|
2071
2044
|
empty: empty,
|
|
2072
2045
|
html: html,
|
|
2073
2046
|
replaceChildren: replaceChildren,
|
|
@@ -2362,7 +2335,7 @@
|
|
|
2362
2335
|
const {
|
|
2363
2336
|
$options: { computed } } =
|
|
2364
2337
|
this;
|
|
2365
|
-
const values =
|
|
2338
|
+
const values = { ...this._computeds };
|
|
2366
2339
|
this._computeds = {};
|
|
2367
2340
|
|
|
2368
2341
|
for (const key in computed) {
|
|
@@ -2449,9 +2422,9 @@
|
|
|
2449
2422
|
}
|
|
2450
2423
|
};
|
|
2451
2424
|
|
|
2452
|
-
UIkit.prototype._initEvents = function () {
|
|
2425
|
+
UIkit.prototype._initEvents = function () {
|
|
2453
2426
|
this._events = [];
|
|
2454
|
-
(
|
|
2427
|
+
for (const event of this.$options.events || []) {
|
|
2455
2428
|
if (hasOwn(event, 'handler')) {
|
|
2456
2429
|
registerEvent(this, event);
|
|
2457
2430
|
} else {
|
|
@@ -2459,7 +2432,7 @@
|
|
|
2459
2432
|
registerEvent(this, event[key], key);
|
|
2460
2433
|
}
|
|
2461
2434
|
}
|
|
2462
|
-
}
|
|
2435
|
+
}
|
|
2463
2436
|
};
|
|
2464
2437
|
|
|
2465
2438
|
UIkit.prototype._unbindEvents = function () {
|
|
@@ -2547,7 +2520,7 @@
|
|
|
2547
2520
|
el = isFunction(el) ? el.call(component) : el || component.$el;
|
|
2548
2521
|
|
|
2549
2522
|
if (isArray(el)) {
|
|
2550
|
-
el.forEach((el) => registerEvent(component,
|
|
2523
|
+
el.forEach((el) => registerEvent(component, { ...event, el }, key));
|
|
2551
2524
|
return;
|
|
2552
2525
|
}
|
|
2553
2526
|
|
|
@@ -2781,7 +2754,7 @@
|
|
|
2781
2754
|
}
|
|
2782
2755
|
};
|
|
2783
2756
|
|
|
2784
|
-
const opt = isPlainObject(options) ?
|
|
2757
|
+
const opt = isPlainObject(options) ? { ...options } : options.options;
|
|
2785
2758
|
|
|
2786
2759
|
opt.name = name;
|
|
2787
2760
|
|
|
@@ -2834,7 +2807,7 @@
|
|
|
2834
2807
|
UIkit.data = '__uikit__';
|
|
2835
2808
|
UIkit.prefix = 'uk-';
|
|
2836
2809
|
UIkit.options = {};
|
|
2837
|
-
UIkit.version = '3.11.2-dev.
|
|
2810
|
+
UIkit.version = '3.11.2-dev.93483bd3e';
|
|
2838
2811
|
|
|
2839
2812
|
globalAPI(UIkit);
|
|
2840
2813
|
hooksAPI(UIkit);
|
|
@@ -3157,7 +3130,7 @@
|
|
|
3157
3130
|
show ?
|
|
3158
3131
|
Transition.start(
|
|
3159
3132
|
el,
|
|
3160
|
-
|
|
3133
|
+
{ ...initProps, overflow: 'hidden', height: endHeight },
|
|
3161
3134
|
Math.round(duration * (1 - currentHeight / endHeight)),
|
|
3162
3135
|
transition) :
|
|
3163
3136
|
|
|
@@ -3277,37 +3250,37 @@
|
|
|
3277
3250
|
return;
|
|
3278
3251
|
}
|
|
3279
3252
|
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3253
|
+
for (const el of items) {
|
|
3254
|
+
this.toggleElement(el, !hasClass(el, this.clsOpen), async (el, show) => {
|
|
3255
|
+
toggleClass(el, this.clsOpen, show);
|
|
3256
|
+
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3284
3257
|
|
|
3285
|
-
|
|
3258
|
+
const content = $("" + (el._wrapper ? '> * ' : '') + this.content, el);
|
|
3286
3259
|
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3260
|
+
if (animate === false || !this.hasTransition) {
|
|
3261
|
+
hide(content, !show);
|
|
3262
|
+
return;
|
|
3263
|
+
}
|
|
3291
3264
|
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3265
|
+
if (!el._wrapper) {
|
|
3266
|
+
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3267
|
+
}
|
|
3295
3268
|
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3269
|
+
hide(content, false);
|
|
3270
|
+
await toggleHeight(this)(el._wrapper, show);
|
|
3271
|
+
hide(content, !show);
|
|
3299
3272
|
|
|
3300
|
-
|
|
3301
|
-
|
|
3273
|
+
delete el._wrapper;
|
|
3274
|
+
unwrap(content);
|
|
3302
3275
|
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3276
|
+
if (show) {
|
|
3277
|
+
const toggle = $(this.$props.toggle, el);
|
|
3278
|
+
if (!isInView(toggle)) {
|
|
3279
|
+
scrollIntoView(toggle, { offset: this.offset });
|
|
3280
|
+
}
|
|
3307
3281
|
}
|
|
3308
|
-
}
|
|
3309
|
-
}
|
|
3310
|
-
|
|
3282
|
+
});
|
|
3283
|
+
}
|
|
3311
3284
|
} } };
|
|
3312
3285
|
|
|
3313
3286
|
|
|
@@ -3329,7 +3302,7 @@
|
|
|
3329
3302
|
animation: [true],
|
|
3330
3303
|
selClose: '.uk-alert-close',
|
|
3331
3304
|
duration: 150,
|
|
3332
|
-
hideProps:
|
|
3305
|
+
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3333
3306
|
|
|
3334
3307
|
|
|
3335
3308
|
events: [
|
|
@@ -4290,9 +4263,9 @@
|
|
|
4290
4263
|
},
|
|
4291
4264
|
|
|
4292
4265
|
write(_ref2) {let { rows } = _ref2;
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4266
|
+
for (const { heights, elements } of rows) {
|
|
4267
|
+
elements.forEach((el, i) => css(el, 'minHeight', heights[i]));
|
|
4268
|
+
}
|
|
4296
4269
|
},
|
|
4297
4270
|
|
|
4298
4271
|
events: ['resize'] } };
|
|
@@ -4486,6 +4459,12 @@
|
|
|
4486
4459
|
|
|
4487
4460
|
methods: {
|
|
4488
4461
|
async getSvg() {
|
|
4462
|
+
if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
|
|
4463
|
+
return new Promise((resolve) =>
|
|
4464
|
+
once(this.$el, 'load', () => resolve(this.getSvg())));
|
|
4465
|
+
|
|
4466
|
+
}
|
|
4467
|
+
|
|
4489
4468
|
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject('SVG not found.');
|
|
4490
4469
|
},
|
|
4491
4470
|
|
|
@@ -4585,7 +4564,7 @@
|
|
|
4585
4564
|
}
|
|
4586
4565
|
|
|
4587
4566
|
function insertSVG(el, root) {
|
|
4588
|
-
if (isVoidElement(root) || root
|
|
4567
|
+
if (isVoidElement(root) || isTag(root, 'canvas')) {
|
|
4589
4568
|
root.hidden = true;
|
|
4590
4569
|
|
|
4591
4570
|
const next = root.nextElementSibling;
|
|
@@ -4597,11 +4576,7 @@
|
|
|
4597
4576
|
}
|
|
4598
4577
|
|
|
4599
4578
|
function equals(el, other) {
|
|
4600
|
-
return
|
|
4601
|
-
}
|
|
4602
|
-
|
|
4603
|
-
function isSVG(el) {
|
|
4604
|
-
return (el == null ? void 0 : el.tagName) === 'svg';
|
|
4579
|
+
return isTag(el, 'svg') && isTag(other, 'svg') && innerHTML(el) === innerHTML(other);
|
|
4605
4580
|
}
|
|
4606
4581
|
|
|
4607
4582
|
function innerHTML(el) {
|
|
@@ -4788,120 +4763,95 @@
|
|
|
4788
4763
|
return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon;
|
|
4789
4764
|
}
|
|
4790
4765
|
|
|
4766
|
+
const nativeLazyLoad = ('loading' in HTMLImageElement.prototype);
|
|
4767
|
+
const nativeIsIntersecting = ('isIntersecting' in IntersectionObserverEntry.prototype); // Old chromium based browsers (UC Browser) did not implement `isIntersecting`
|
|
4768
|
+
|
|
4791
4769
|
var img = {
|
|
4792
4770
|
args: 'dataSrc',
|
|
4793
4771
|
|
|
4794
4772
|
props: {
|
|
4795
4773
|
dataSrc: String,
|
|
4796
|
-
|
|
4797
|
-
sizes: String,
|
|
4798
|
-
width: Number,
|
|
4799
|
-
height: Number,
|
|
4774
|
+
sources: String,
|
|
4800
4775
|
offsetTop: String,
|
|
4801
4776
|
offsetLeft: String,
|
|
4802
|
-
target: String
|
|
4777
|
+
target: String,
|
|
4778
|
+
loading: String },
|
|
4803
4779
|
|
|
4804
4780
|
|
|
4805
4781
|
data: {
|
|
4806
4782
|
dataSrc: '',
|
|
4807
|
-
|
|
4808
|
-
sizes: false,
|
|
4809
|
-
width: false,
|
|
4810
|
-
height: false,
|
|
4783
|
+
sources: false,
|
|
4811
4784
|
offsetTop: '50vh',
|
|
4812
4785
|
offsetLeft: '50vw',
|
|
4813
|
-
target: false
|
|
4786
|
+
target: false,
|
|
4787
|
+
loading: 'lazy' },
|
|
4814
4788
|
|
|
4815
4789
|
|
|
4816
4790
|
computed: {
|
|
4817
|
-
cacheKey(_ref) {let { dataSrc } = _ref;
|
|
4818
|
-
return this.$name + "." + dataSrc;
|
|
4819
|
-
},
|
|
4820
|
-
|
|
4821
|
-
width(_ref2) {let { width, dataWidth } = _ref2;
|
|
4822
|
-
return width || dataWidth;
|
|
4823
|
-
},
|
|
4824
|
-
|
|
4825
|
-
height(_ref3) {let { height, dataHeight } = _ref3;
|
|
4826
|
-
return height || dataHeight;
|
|
4827
|
-
},
|
|
4828
|
-
|
|
4829
|
-
sizes(_ref4) {let { sizes, dataSizes } = _ref4;
|
|
4830
|
-
return sizes || dataSizes;
|
|
4831
|
-
},
|
|
4832
|
-
|
|
4833
|
-
isImg(_, $el) {
|
|
4834
|
-
return isImg($el);
|
|
4835
|
-
},
|
|
4836
|
-
|
|
4837
4791
|
target: {
|
|
4838
|
-
get(
|
|
4792
|
+
get(_ref) {let { target } = _ref;
|
|
4839
4793
|
return [this.$el, ...queryAll(target, this.$el)];
|
|
4840
4794
|
},
|
|
4841
4795
|
|
|
4842
4796
|
watch() {
|
|
4843
4797
|
this.observe();
|
|
4844
|
-
} },
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
offsetTop(_ref6) {let { offsetTop } = _ref6;
|
|
4848
|
-
return toPx(offsetTop, 'height');
|
|
4849
|
-
},
|
|
4798
|
+
} } },
|
|
4850
4799
|
|
|
4851
|
-
offsetLeft(_ref7) {let { offsetLeft } = _ref7;
|
|
4852
|
-
return toPx(offsetLeft, 'width');
|
|
4853
|
-
} },
|
|
4854
4800
|
|
|
4855
4801
|
|
|
4856
4802
|
connected() {
|
|
4857
|
-
if (!window.IntersectionObserver) {
|
|
4858
|
-
|
|
4803
|
+
if (this.loading !== 'lazy' || !window.IntersectionObserver || !nativeIsIntersecting) {
|
|
4804
|
+
this.load();
|
|
4859
4805
|
return;
|
|
4860
4806
|
}
|
|
4861
4807
|
|
|
4862
|
-
if (
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4808
|
+
if (nativeLazyLoad && isImg(this.$el)) {
|
|
4809
|
+
this.$el.loading = 'lazy';
|
|
4810
|
+
setSrcAttrs(this.$el);
|
|
4811
|
+
|
|
4812
|
+
if (this.target.length === 1) {
|
|
4813
|
+
return;
|
|
4814
|
+
}
|
|
4866
4815
|
}
|
|
4867
4816
|
|
|
4868
|
-
|
|
4869
|
-
rootMargin: this.offsetTop + "px " + this.offsetLeft + "px" });
|
|
4817
|
+
ensureSrcAttribute(this.$el);
|
|
4870
4818
|
|
|
4819
|
+
const rootMargin = toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
4820
|
+
this.offsetLeft,
|
|
4821
|
+
'width') + "px";
|
|
4871
4822
|
|
|
4872
|
-
|
|
4873
|
-
|
|
4823
|
+
this.observer = new IntersectionObserver(
|
|
4824
|
+
(entries) => {
|
|
4825
|
+
if (entries.some((entry) => entry.isIntersecting)) {
|
|
4826
|
+
this.load();
|
|
4827
|
+
this.observer.disconnect();
|
|
4828
|
+
}
|
|
4829
|
+
},
|
|
4830
|
+
{ rootMargin });
|
|
4874
4831
|
|
|
4875
|
-
|
|
4876
|
-
this.observer && this.observer.disconnect();
|
|
4832
|
+
this.observe();
|
|
4877
4833
|
},
|
|
4878
4834
|
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
}
|
|
4835
|
+
disconnected() {var _this$observer;
|
|
4836
|
+
if (this._data.image) {
|
|
4837
|
+
this._data.image.onload = '';
|
|
4838
|
+
}
|
|
4884
4839
|
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
}
|
|
4840
|
+
(_this$observer = this.observer) == null ? void 0 : _this$observer.disconnect();
|
|
4841
|
+
},
|
|
4888
4842
|
|
|
4889
|
-
|
|
4843
|
+
update: {
|
|
4844
|
+
write(store) {
|
|
4845
|
+
if (!this.observer || isImg(this.$el)) {
|
|
4890
4846
|
return false;
|
|
4891
4847
|
}
|
|
4892
4848
|
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
(img) => img && img.currentSrc !== '' && setSrcAttrs(this.$el, currentSrc(img)));
|
|
4896
|
-
|
|
4897
|
-
},
|
|
4898
|
-
|
|
4899
|
-
write(data) {
|
|
4900
|
-
if (this.dataSrcset && window.devicePixelRatio !== 1) {
|
|
4849
|
+
const srcset = data(this.$el, 'data-srcset');
|
|
4850
|
+
if (srcset && window.devicePixelRatio !== 1) {
|
|
4901
4851
|
const bgSize = css(this.$el, 'backgroundSize');
|
|
4902
|
-
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) ===
|
|
4903
|
-
|
|
4904
|
-
css(this.$el, 'backgroundSize',
|
|
4852
|
+
if (bgSize.match(/^(auto\s?)+$/) || toFloat(bgSize) === store.bgSize) {
|
|
4853
|
+
store.bgSize = getSourceSize(srcset, data(this.$el, 'sizes'));
|
|
4854
|
+
css(this.$el, 'backgroundSize', store.bgSize + "px");
|
|
4905
4855
|
}
|
|
4906
4856
|
}
|
|
4907
4857
|
},
|
|
@@ -4910,40 +4860,35 @@
|
|
|
4910
4860
|
|
|
4911
4861
|
|
|
4912
4862
|
methods: {
|
|
4913
|
-
load(
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
!entries.some((entry) => isUndefined(entry.isIntersecting) || entry.isIntersecting))
|
|
4917
|
-
{
|
|
4918
|
-
return;
|
|
4863
|
+
load() {
|
|
4864
|
+
if (this._data.image) {
|
|
4865
|
+
return this._data.image;
|
|
4919
4866
|
}
|
|
4920
4867
|
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
storage[this.cacheKey] = currentSrc(img);
|
|
4925
|
-
return img;
|
|
4926
|
-
},
|
|
4927
|
-
(e) => trigger(this.$el, new e.constructor(e.type, e)));
|
|
4928
|
-
|
|
4868
|
+
const image = isImg(this.$el) ?
|
|
4869
|
+
this.$el :
|
|
4870
|
+
getImageFromElement(this.$el, this.dataSrc, this.sources);
|
|
4929
4871
|
|
|
4930
|
-
|
|
4872
|
+
removeAttr(image, 'loading');
|
|
4873
|
+
setSrcAttrs(this.$el, image.currentSrc);
|
|
4874
|
+
return this._data.image = image;
|
|
4931
4875
|
},
|
|
4932
4876
|
|
|
4933
4877
|
observe() {
|
|
4934
4878
|
if (this._connected && !this._data.image) {
|
|
4935
|
-
|
|
4879
|
+
for (const el of this.target) {
|
|
4880
|
+
this.observer.observe(el);
|
|
4881
|
+
}
|
|
4936
4882
|
}
|
|
4937
4883
|
} } };
|
|
4938
4884
|
|
|
4939
4885
|
|
|
4940
4886
|
|
|
4941
|
-
function setSrcAttrs(el, src
|
|
4887
|
+
function setSrcAttrs(el, src) {
|
|
4942
4888
|
if (isImg(el)) {
|
|
4943
|
-
const
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
set('src', src);
|
|
4889
|
+
const parentNode = parent(el);
|
|
4890
|
+
const elements = isPicture(parentNode) ? children(parentNode) : [el];
|
|
4891
|
+
elements.forEach((el) => setSourceProps(el, el));
|
|
4947
4892
|
} else if (src) {
|
|
4948
4893
|
const change = !includes(el.style.backgroundImage, src);
|
|
4949
4894
|
if (change) {
|
|
@@ -4953,16 +4898,60 @@
|
|
|
4953
4898
|
}
|
|
4954
4899
|
}
|
|
4955
4900
|
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4901
|
+
const srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
4902
|
+
function setSourceProps(sourceEl, targetEl) {
|
|
4903
|
+
srcProps.forEach((prop) => {
|
|
4904
|
+
const value = data(sourceEl, prop);
|
|
4905
|
+
if (value) {
|
|
4906
|
+
attr(targetEl, prop.replace(/^(data-)+/, ''), value);
|
|
4907
|
+
}
|
|
4908
|
+
});
|
|
4909
|
+
}
|
|
4910
|
+
|
|
4911
|
+
function getImageFromElement(el, src, sources) {
|
|
4912
|
+
const img = new Image();
|
|
4913
|
+
|
|
4914
|
+
wrapInPicture(img, sources);
|
|
4915
|
+
setSourceProps(el, img);
|
|
4916
|
+
img.onload = () => setSrcAttrs(el, img.currentSrc);
|
|
4917
|
+
attr(img, 'src', src);
|
|
4918
|
+
return img;
|
|
4919
|
+
}
|
|
4920
|
+
|
|
4921
|
+
function wrapInPicture(img, sources) {
|
|
4922
|
+
sources = parseSources(sources);
|
|
4923
|
+
|
|
4924
|
+
if (sources.length) {
|
|
4925
|
+
const picture = fragment('<picture>');
|
|
4926
|
+
for (const attrs of sources) {
|
|
4927
|
+
const source = fragment('<source>');
|
|
4928
|
+
attr(source, attrs);
|
|
4929
|
+
append(picture, source);
|
|
4930
|
+
}
|
|
4931
|
+
append(picture, img);
|
|
4932
|
+
}
|
|
4933
|
+
}
|
|
4934
|
+
|
|
4935
|
+
function parseSources(sources) {
|
|
4936
|
+
if (!sources) {
|
|
4937
|
+
return [];
|
|
4938
|
+
}
|
|
4939
|
+
|
|
4940
|
+
if (startsWith(sources, '[')) {
|
|
4941
|
+
try {
|
|
4942
|
+
sources = JSON.parse(sources);
|
|
4943
|
+
} catch (e) {
|
|
4944
|
+
sources = [];
|
|
4945
|
+
}
|
|
4946
|
+
} else {
|
|
4947
|
+
sources = parseOptions(sources);
|
|
4948
|
+
}
|
|
4962
4949
|
|
|
4950
|
+
if (!isArray(sources)) {
|
|
4951
|
+
sources = [sources];
|
|
4963
4952
|
}
|
|
4964
4953
|
|
|
4965
|
-
return
|
|
4954
|
+
return sources.filter((source) => !isEmpty(source));
|
|
4966
4955
|
}
|
|
4967
4956
|
|
|
4968
4957
|
const sizesRe = /\s*(.*?)\s*(\w+|calc\(.*?\))\s*(?:,|$)/g;
|
|
@@ -5002,24 +4991,18 @@
|
|
|
5002
4991
|
return descriptors.filter((size) => size >= srcSize)[0] || descriptors.pop() || '';
|
|
5003
4992
|
}
|
|
5004
4993
|
|
|
5005
|
-
function
|
|
5006
|
-
|
|
4994
|
+
function ensureSrcAttribute(el) {
|
|
4995
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
4996
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
4997
|
+
}
|
|
5007
4998
|
}
|
|
5008
4999
|
|
|
5009
|
-
function
|
|
5010
|
-
return el
|
|
5000
|
+
function isPicture(el) {
|
|
5001
|
+
return isTag(el, 'picture');
|
|
5011
5002
|
}
|
|
5012
5003
|
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
// workaround for Safari's private browsing mode and accessing sessionStorage in Blink
|
|
5017
|
-
try {
|
|
5018
|
-
storage = window.sessionStorage || {};
|
|
5019
|
-
storage[key] = 1;
|
|
5020
|
-
delete storage[key];
|
|
5021
|
-
} catch (e) {
|
|
5022
|
-
storage = {};
|
|
5004
|
+
function isImg(el) {
|
|
5005
|
+
return isTag(el, 'img');
|
|
5023
5006
|
}
|
|
5024
5007
|
|
|
5025
5008
|
var Media = {
|
|
@@ -5475,7 +5458,7 @@
|
|
|
5475
5458
|
|
|
5476
5459
|
|
|
5477
5460
|
function openDialog(tmpl, options, hideFn, submitFn) {
|
|
5478
|
-
options =
|
|
5461
|
+
options = { bgClose: false, escClose: true, labels: modal.labels, ...options };
|
|
5479
5462
|
|
|
5480
5463
|
const dialog = modal.dialog(tmpl(options), options);
|
|
5481
5464
|
const deferred = new Deferred();
|
|
@@ -5589,12 +5572,12 @@
|
|
|
5589
5572
|
const dropdowns = $$("." + clsDrop, $el);
|
|
5590
5573
|
|
|
5591
5574
|
if (this.dropContainer !== $el) {
|
|
5592
|
-
$$("." + clsDrop, this.dropContainer)
|
|
5575
|
+
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5593
5576
|
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.target;
|
|
5594
5577
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5595
5578
|
dropdowns.push(el);
|
|
5596
5579
|
}
|
|
5597
|
-
}
|
|
5580
|
+
}
|
|
5598
5581
|
}
|
|
5599
5582
|
|
|
5600
5583
|
return dropdowns;
|
|
@@ -5604,10 +5587,11 @@
|
|
|
5604
5587
|
this.$create(
|
|
5605
5588
|
'drop',
|
|
5606
5589
|
dropdowns.filter((el) => !this.getDropdown(el)),
|
|
5607
|
-
|
|
5590
|
+
{
|
|
5591
|
+
...this.$props,
|
|
5608
5592
|
boundary: this.boundary,
|
|
5609
5593
|
pos: this.pos,
|
|
5610
|
-
offset: this.dropbar || this.offset })
|
|
5594
|
+
offset: this.dropbar || this.offset });
|
|
5611
5595
|
|
|
5612
5596
|
|
|
5613
5597
|
},
|
|
@@ -6296,10 +6280,10 @@
|
|
|
6296
6280
|
|
|
6297
6281
|
|
|
6298
6282
|
disconnected() {
|
|
6299
|
-
this.elements
|
|
6283
|
+
for (const el of this.elements) {
|
|
6300
6284
|
removeClass(el, this.inViewClass, el[stateKey] ? el[stateKey].cls : '');
|
|
6301
6285
|
delete el[stateKey];
|
|
6302
|
-
}
|
|
6286
|
+
}
|
|
6303
6287
|
},
|
|
6304
6288
|
|
|
6305
6289
|
update: [
|
|
@@ -6314,17 +6298,17 @@
|
|
|
6314
6298
|
return false;
|
|
6315
6299
|
}
|
|
6316
6300
|
|
|
6317
|
-
this.elements
|
|
6301
|
+
for (const el of this.elements) {
|
|
6318
6302
|
if (!el[stateKey]) {
|
|
6319
6303
|
el[stateKey] = { cls: data(el, 'uk-scrollspy-class') || this.cls };
|
|
6320
6304
|
}
|
|
6321
6305
|
|
|
6322
6306
|
el[stateKey].show = isInView(el, this.offsetTop, this.offsetLeft);
|
|
6323
|
-
}
|
|
6307
|
+
}
|
|
6324
6308
|
},
|
|
6325
6309
|
|
|
6326
6310
|
write(data) {
|
|
6327
|
-
this.elements
|
|
6311
|
+
for (const el of this.elements) {
|
|
6328
6312
|
const state = el[stateKey];
|
|
6329
6313
|
|
|
6330
6314
|
if (state.show && !state.inview && !state.queued) {
|
|
@@ -6342,7 +6326,7 @@
|
|
|
6342
6326
|
} else if (!state.show && state.inview && !state.queued && this.repeat) {
|
|
6343
6327
|
this.toggle(el, false);
|
|
6344
6328
|
}
|
|
6345
|
-
}
|
|
6329
|
+
}
|
|
6346
6330
|
},
|
|
6347
6331
|
|
|
6348
6332
|
events: ['scroll', 'resize'] }],
|
|
@@ -6645,7 +6629,7 @@
|
|
|
6645
6629
|
margin,
|
|
6646
6630
|
width: dimensions(isVisible(this.widthElement) ? this.widthElement : this.$el).
|
|
6647
6631
|
width,
|
|
6648
|
-
top: offsetPosition(
|
|
6632
|
+
top: offsetPosition(referenceElement)[0] };
|
|
6649
6633
|
|
|
6650
6634
|
},
|
|
6651
6635
|
|
|
@@ -7123,7 +7107,7 @@
|
|
|
7123
7107
|
name: 'keydown',
|
|
7124
7108
|
|
|
7125
7109
|
filter() {
|
|
7126
|
-
return includes(this.mode, 'click') && this.$el
|
|
7110
|
+
return includes(this.mode, 'click') && isTag(this.$el, 'input');
|
|
7127
7111
|
},
|
|
7128
7112
|
|
|
7129
7113
|
handler(e) {
|
|
@@ -7205,10 +7189,10 @@
|
|
|
7205
7189
|
const leaving = this.target.filter((el) => hasClass(el, this.clsLeave));
|
|
7206
7190
|
|
|
7207
7191
|
if (leaving.length) {
|
|
7208
|
-
this.target
|
|
7192
|
+
for (const el of this.target) {
|
|
7209
7193
|
const isLeaving = includes(leaving, el);
|
|
7210
7194
|
this.toggleElement(el, isLeaving, isLeaving);
|
|
7211
|
-
}
|
|
7195
|
+
}
|
|
7212
7196
|
return;
|
|
7213
7197
|
}
|
|
7214
7198
|
|