uikit 3.15.17 → 3.15.18-dev.014d8e608
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 +9 -0
- package/build/util.js +2 -3
- 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 +2 -2
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +15 -15
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +77 -84
- package/dist/js/components/lightbox-panel.min.js +9 -1
- package/dist/js/components/lightbox.js +80 -87
- package/dist/js/components/lightbox.min.js +9 -1
- package/dist/js/components/notification.js +14 -14
- package/dist/js/components/notification.min.js +4 -1
- package/dist/js/components/parallax.js +22 -22
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +18 -18
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +93 -45
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +18 -18
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +33 -38
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +7 -7
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +24 -24
- package/dist/js/components/tooltip.min.js +3 -1
- package/dist/js/components/upload.js +7 -7
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +303 -282
- package/dist/js/uikit-core.min.js +21 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +499 -432
- package/dist/js/uikit.min.js +34 -1
- package/package.json +1 -1
- package/src/js/components/lightbox-panel.js +3 -5
- package/src/js/components/slider.js +62 -7
- package/src/js/core/sticky.js +26 -9
- package/src/js/mixin/slider-drag.js +1 -1
- package/src/js/mixin/slider.js +2 -7
- package/src/js/util/viewport.js +4 -0
- package/tests/tooltip.html +1 -1
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.15.
|
|
1
|
+
/*! UIkit 3.15.18-dev.014d8e608 | 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() :
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
function swap(value, a, b) {
|
|
155
|
-
return value.replace(new RegExp(a
|
|
155
|
+
return value.replace(new RegExp(`${a}|${b}`, 'g'), (match) => match === a ? b : a);
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
function last(array) {
|
|
@@ -171,8 +171,8 @@
|
|
|
171
171
|
function sortBy$1(array, prop) {
|
|
172
172
|
return array.
|
|
173
173
|
slice().
|
|
174
|
-
sort((
|
|
175
|
-
|
|
174
|
+
sort(({ [prop]: propA = 0 }, { [prop]: propB = 0 }) =>
|
|
175
|
+
propA > propB ? 1 : propB > propA ? -1 : 0);
|
|
176
176
|
|
|
177
177
|
}
|
|
178
178
|
|
|
@@ -185,24 +185,24 @@
|
|
|
185
185
|
|
|
186
186
|
function uniqueBy(array, prop) {
|
|
187
187
|
const seen = new Set();
|
|
188
|
-
return array.filter((
|
|
188
|
+
return array.filter(({ [prop]: check }) => seen.has(check) ? false : seen.add(check));
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
function clamp(number, min
|
|
191
|
+
function clamp(number, min = 0, max = 1) {
|
|
192
192
|
return Math.min(Math.max(toNumber(number) || 0, min), max);
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
function noop() {}
|
|
196
196
|
|
|
197
|
-
function intersectRect(
|
|
197
|
+
function intersectRect(...rects) {
|
|
198
198
|
return [
|
|
199
199
|
['bottom', 'top'],
|
|
200
200
|
['right', 'left']].
|
|
201
201
|
every(
|
|
202
|
-
(
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
202
|
+
([minProp, maxProp]) =>
|
|
203
|
+
Math.min(...rects.map(({ [minProp]: min }) => min)) -
|
|
204
|
+
Math.max(...rects.map(({ [maxProp]: max }) => max)) >
|
|
205
|
+
0);
|
|
206
206
|
|
|
207
207
|
}
|
|
208
208
|
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
|
|
255
255
|
const Dimensions = { ratio, contain, cover: cover$1 };
|
|
256
256
|
|
|
257
|
-
function getIndex(i, elements, current
|
|
257
|
+
function getIndex(i, elements, current = 0, finite = false) {
|
|
258
258
|
elements = toNodes(elements);
|
|
259
259
|
|
|
260
260
|
const { length } = elements;
|
|
@@ -333,7 +333,7 @@
|
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
function data(element, attribute) {
|
|
336
|
-
for (const name of [attribute,
|
|
336
|
+
for (const name of [attribute, `data-${attribute}`]) {
|
|
337
337
|
if (hasAttr(element, name)) {
|
|
338
338
|
return attr(element, name);
|
|
339
339
|
}
|
|
@@ -372,7 +372,7 @@
|
|
|
372
372
|
return toNodes(element).some((element) => matches(element, selInput));
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
const selFocusable = selInput
|
|
375
|
+
const selFocusable = `${selInput},a[href],[tabindex]`;
|
|
376
376
|
function isFocusable(element) {
|
|
377
377
|
return matches(element, selFocusable);
|
|
378
378
|
}
|
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
const contextSelectorRe = /(^|[^\\],)\s*[!>+~-]/;
|
|
445
445
|
const isContextSelector = memoize((selector) => selector.match(contextSelectorRe));
|
|
446
446
|
|
|
447
|
-
function getContext(selector, context
|
|
447
|
+
function getContext(selector, context = document) {
|
|
448
448
|
return isString(selector) && isContextSelector(selector) || isDocument(context) ?
|
|
449
449
|
context :
|
|
450
450
|
context.ownerDocument;
|
|
@@ -453,7 +453,7 @@
|
|
|
453
453
|
const contextSanitizeRe = /([!>+~-])(?=\s+[!>+~-]|\s*$)/g;
|
|
454
454
|
const sanatize = memoize((selector) => selector.replace(contextSanitizeRe, '$1 *'));
|
|
455
455
|
|
|
456
|
-
function _query(selector, context, queryFn) {
|
|
456
|
+
function _query(selector, context = document, queryFn) {
|
|
457
457
|
if (!selector || !isString(selector)) {
|
|
458
458
|
return selector;
|
|
459
459
|
}
|
|
@@ -483,7 +483,7 @@
|
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
if (ctx) {
|
|
486
|
-
selector +=
|
|
486
|
+
selector += `${selector ? ',' : ''}${domPath(ctx)} ${sel}`;
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
489
|
|
|
@@ -508,12 +508,12 @@
|
|
|
508
508
|
while (element.parentNode) {
|
|
509
509
|
const id = attr(element, 'id');
|
|
510
510
|
if (id) {
|
|
511
|
-
names.unshift(
|
|
511
|
+
names.unshift(`#${escape(id)}`);
|
|
512
512
|
break;
|
|
513
513
|
} else {
|
|
514
514
|
let { tagName } = element;
|
|
515
515
|
if (tagName !== 'HTML') {
|
|
516
|
-
tagName +=
|
|
516
|
+
tagName += `:nth-child(${index(element) + 1})`;
|
|
517
517
|
}
|
|
518
518
|
names.unshift(tagName);
|
|
519
519
|
element = element.parentNode;
|
|
@@ -526,7 +526,7 @@
|
|
|
526
526
|
return isString(css) ? CSS.escape(css) : '';
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
-
function on(
|
|
529
|
+
function on(...args) {
|
|
530
530
|
let [targets, types, selector, listener, useCapture = false] = getArgs(args);
|
|
531
531
|
|
|
532
532
|
if (listener.length > 1) {
|
|
@@ -550,7 +550,7 @@
|
|
|
550
550
|
return () => off(targets, types, listener, useCapture);
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
-
function off(
|
|
553
|
+
function off(...args) {
|
|
554
554
|
let [targets, types,, listener, useCapture = false] = getArgs(args);
|
|
555
555
|
for (const type of types) {
|
|
556
556
|
for (const target of targets) {
|
|
@@ -559,7 +559,7 @@
|
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
function once(
|
|
562
|
+
function once(...args) {
|
|
563
563
|
const [element, types, selector, listener, useCapture = false, condition] = getArgs(args);
|
|
564
564
|
const off = on(
|
|
565
565
|
element,
|
|
@@ -584,7 +584,7 @@
|
|
|
584
584
|
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
-
function createEvent(e, bubbles
|
|
587
|
+
function createEvent(e, bubbles = true, cancelable = false, detail) {
|
|
588
588
|
if (isString(e)) {
|
|
589
589
|
e = new CustomEvent(e, { bubbles, cancelable, detail });
|
|
590
590
|
}
|
|
@@ -755,7 +755,7 @@
|
|
|
755
755
|
zoom: true
|
|
756
756
|
};
|
|
757
757
|
|
|
758
|
-
function css(element, property, value, priority
|
|
758
|
+
function css(element, property, value, priority = '') {
|
|
759
759
|
const elements = toNodes(element);
|
|
760
760
|
for (const element of elements) {
|
|
761
761
|
if (isString(property)) {
|
|
@@ -767,7 +767,7 @@
|
|
|
767
767
|
element.style.setProperty(
|
|
768
768
|
property,
|
|
769
769
|
isNumeric(value) && !cssNumber[property] ?
|
|
770
|
-
value
|
|
770
|
+
`${value}px` :
|
|
771
771
|
value || isNumber(value) ?
|
|
772
772
|
value :
|
|
773
773
|
'',
|
|
@@ -805,30 +805,30 @@
|
|
|
805
805
|
}
|
|
806
806
|
|
|
807
807
|
for (const prefix of ['webkit', 'moz']) {
|
|
808
|
-
const prefixedName =
|
|
808
|
+
const prefixedName = `-${prefix}-${name}`;
|
|
809
809
|
if (prefixedName in style) {
|
|
810
810
|
return prefixedName;
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
814
|
|
|
815
|
-
function addClass(element
|
|
815
|
+
function addClass(element, ...args) {
|
|
816
816
|
apply$1(element, args, 'add');
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
-
function removeClass(element
|
|
819
|
+
function removeClass(element, ...args) {
|
|
820
820
|
apply$1(element, args, 'remove');
|
|
821
821
|
}
|
|
822
822
|
|
|
823
823
|
function removeClasses(element, cls) {
|
|
824
824
|
attr(element, 'class', (value) =>
|
|
825
|
-
(value || '').replace(new RegExp(
|
|
825
|
+
(value || '').replace(new RegExp(`\\b${cls}\\b\\s?`, 'g'), ''));
|
|
826
826
|
|
|
827
827
|
}
|
|
828
828
|
|
|
829
|
-
function replaceClass(element) {
|
|
830
|
-
|
|
831
|
-
|
|
829
|
+
function replaceClass(element, ...args) {
|
|
830
|
+
args[0] && removeClass(element, args[0]);
|
|
831
|
+
args[1] && addClass(element, args[1]);
|
|
832
832
|
}
|
|
833
833
|
|
|
834
834
|
function hasClass(element, cls) {
|
|
@@ -862,7 +862,7 @@
|
|
|
862
862
|
return String(str).split(/\s|,/).filter(Boolean);
|
|
863
863
|
}
|
|
864
864
|
|
|
865
|
-
function transition$1(element, props, duration
|
|
865
|
+
function transition$1(element, props, duration = 400, timing = 'linear') {
|
|
866
866
|
duration = Math.round(duration);
|
|
867
867
|
return Promise.all(
|
|
868
868
|
toNodes(element).map(
|
|
@@ -880,7 +880,7 @@
|
|
|
880
880
|
once(
|
|
881
881
|
element,
|
|
882
882
|
'transitionend transitioncanceled',
|
|
883
|
-
(
|
|
883
|
+
({ type }) => {
|
|
884
884
|
clearTimeout(timer);
|
|
885
885
|
removeClass(element, 'uk-transition');
|
|
886
886
|
css(element, {
|
|
@@ -896,7 +896,7 @@
|
|
|
896
896
|
addClass(element, 'uk-transition');
|
|
897
897
|
css(element, {
|
|
898
898
|
transitionProperty: Object.keys(props).map(propName).join(','),
|
|
899
|
-
transitionDuration: duration
|
|
899
|
+
transitionDuration: `${duration}ms`,
|
|
900
900
|
transitionTimingFunction: timing,
|
|
901
901
|
...props
|
|
902
902
|
});
|
|
@@ -925,7 +925,7 @@
|
|
|
925
925
|
|
|
926
926
|
const animationPrefix = 'uk-animation-';
|
|
927
927
|
|
|
928
|
-
function animate$2(element, animation, duration, origin, out) {
|
|
928
|
+
function animate$2(element, animation, duration = 200, origin, out) {
|
|
929
929
|
return Promise.all(
|
|
930
930
|
toNodes(element).map(
|
|
931
931
|
(element) =>
|
|
@@ -936,30 +936,30 @@
|
|
|
936
936
|
once(
|
|
937
937
|
element,
|
|
938
938
|
'animationend animationcanceled',
|
|
939
|
-
(
|
|
939
|
+
({ type }) => {
|
|
940
940
|
clearTimeout(timer);
|
|
941
941
|
|
|
942
942
|
type === 'animationcanceled' ? reject() : resolve(element);
|
|
943
943
|
|
|
944
944
|
css(element, 'animationDuration', '');
|
|
945
|
-
removeClasses(element, animationPrefix
|
|
945
|
+
removeClasses(element, `${animationPrefix}\\S*`);
|
|
946
946
|
},
|
|
947
947
|
{ self: true });
|
|
948
948
|
|
|
949
949
|
|
|
950
|
-
css(element, 'animationDuration', duration
|
|
950
|
+
css(element, 'animationDuration', `${duration}ms`);
|
|
951
951
|
addClass(element, animation, animationPrefix + (out ? 'leave' : 'enter'));
|
|
952
952
|
|
|
953
953
|
if (startsWith(animation, animationPrefix)) {
|
|
954
|
-
origin && addClass(element,
|
|
955
|
-
out && addClass(element, animationPrefix
|
|
954
|
+
origin && addClass(element, `uk-transform-origin-${origin}`);
|
|
955
|
+
out && addClass(element, `${animationPrefix}reverse`);
|
|
956
956
|
}
|
|
957
957
|
})));
|
|
958
958
|
|
|
959
959
|
|
|
960
960
|
}
|
|
961
961
|
|
|
962
|
-
const inProgressRe = new RegExp(animationPrefix
|
|
962
|
+
const inProgressRe = new RegExp(`${animationPrefix}(enter|leave)`);
|
|
963
963
|
|
|
964
964
|
const Animation = {
|
|
965
965
|
in: animate$2,
|
|
@@ -1181,8 +1181,8 @@
|
|
|
1181
1181
|
const offset = [element.offsetTop, element.offsetLeft];
|
|
1182
1182
|
|
|
1183
1183
|
while (element = element.offsetParent) {
|
|
1184
|
-
offset[0] += element.offsetTop + toFloat(css(element,
|
|
1185
|
-
offset[1] += element.offsetLeft + toFloat(css(element,
|
|
1184
|
+
offset[0] += element.offsetTop + toFloat(css(element, `borderTopWidth`));
|
|
1185
|
+
offset[1] += element.offsetLeft + toFloat(css(element, `borderLeftWidth`));
|
|
1186
1186
|
|
|
1187
1187
|
if (css(element, 'position') === 'fixed') {
|
|
1188
1188
|
const win = toWindow(element);
|
|
@@ -1203,18 +1203,18 @@
|
|
|
1203
1203
|
return (element, value) => {
|
|
1204
1204
|
if (isUndefined(value)) {
|
|
1205
1205
|
if (isWindow(element)) {
|
|
1206
|
-
return element[
|
|
1206
|
+
return element[`inner${propName}`];
|
|
1207
1207
|
}
|
|
1208
1208
|
|
|
1209
1209
|
if (isDocument(element)) {
|
|
1210
1210
|
const doc = element.documentElement;
|
|
1211
|
-
return Math.max(doc[
|
|
1211
|
+
return Math.max(doc[`offset${propName}`], doc[`scroll${propName}`]);
|
|
1212
1212
|
}
|
|
1213
1213
|
|
|
1214
1214
|
element = toNode(element);
|
|
1215
1215
|
|
|
1216
1216
|
value = css(element, prop);
|
|
1217
|
-
value = value === 'auto' ? element[
|
|
1217
|
+
value = value === 'auto' ? element[`offset${propName}`] : toFloat(value) || 0;
|
|
1218
1218
|
|
|
1219
1219
|
return value - boxModelAdjust(element, prop);
|
|
1220
1220
|
} else {
|
|
@@ -1227,13 +1227,13 @@
|
|
|
1227
1227
|
};
|
|
1228
1228
|
}
|
|
1229
1229
|
|
|
1230
|
-
function boxModelAdjust(element, prop, sizing
|
|
1230
|
+
function boxModelAdjust(element, prop, sizing = 'border-box') {
|
|
1231
1231
|
return css(element, 'boxSizing') === sizing ?
|
|
1232
1232
|
sumBy(
|
|
1233
1233
|
dirs$1[prop].map(ucfirst),
|
|
1234
1234
|
(prop) =>
|
|
1235
|
-
toFloat(css(element,
|
|
1236
|
-
toFloat(css(element,
|
|
1235
|
+
toFloat(css(element, `padding${prop}`)) +
|
|
1236
|
+
toFloat(css(element, `border${prop}Width`))) :
|
|
1237
1237
|
|
|
1238
1238
|
0;
|
|
1239
1239
|
}
|
|
@@ -1249,7 +1249,7 @@
|
|
|
1249
1249
|
return pos;
|
|
1250
1250
|
}
|
|
1251
1251
|
|
|
1252
|
-
function toPx(value, property
|
|
1252
|
+
function toPx(value, property = 'width', element = window, offsetDim = false) {
|
|
1253
1253
|
if (!isString(value)) {
|
|
1254
1254
|
return toFloat(value);
|
|
1255
1255
|
}
|
|
@@ -1264,7 +1264,7 @@
|
|
|
1264
1264
|
unit === 'vw' ?
|
|
1265
1265
|
width(toWindow(element)) :
|
|
1266
1266
|
offsetDim ?
|
|
1267
|
-
element[
|
|
1267
|
+
element[`offset${ucfirst(property)}`] :
|
|
1268
1268
|
dimensions(element)[property],
|
|
1269
1269
|
value) :
|
|
1270
1270
|
|
|
@@ -1450,7 +1450,7 @@
|
|
|
1450
1450
|
};
|
|
1451
1451
|
|
|
1452
1452
|
// Inspired by http://paulbourke.net/geometry/pointlineplane/
|
|
1453
|
-
function intersect(
|
|
1453
|
+
function intersect([{ x: x1, y: y1 }, { x: x2, y: y2 }], [{ x: x3, y: y3 }, { x: x4, y: y4 }]) {
|
|
1454
1454
|
const denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
|
|
1455
1455
|
|
|
1456
1456
|
// Lines are parallel
|
|
@@ -1468,7 +1468,7 @@
|
|
|
1468
1468
|
return { x: x1 + ua * (x2 - x1), y: y1 + ua * (y2 - y1) };
|
|
1469
1469
|
}
|
|
1470
1470
|
|
|
1471
|
-
function observeIntersection(targets, cb, options, intersecting
|
|
1471
|
+
function observeIntersection(targets, cb, options, intersecting = true) {
|
|
1472
1472
|
const observer = new IntersectionObserver(
|
|
1473
1473
|
intersecting ?
|
|
1474
1474
|
(entries, observer) => {
|
|
@@ -1487,7 +1487,7 @@
|
|
|
1487
1487
|
}
|
|
1488
1488
|
|
|
1489
1489
|
const hasResizeObserver = inBrowser && window.ResizeObserver;
|
|
1490
|
-
function observeResize(targets, cb, options
|
|
1490
|
+
function observeResize(targets, cb, options = { box: 'border-box' }) {
|
|
1491
1491
|
if (hasResizeObserver) {
|
|
1492
1492
|
return observe(ResizeObserver, targets, cb, options);
|
|
1493
1493
|
}
|
|
@@ -1661,7 +1661,7 @@
|
|
|
1661
1661
|
return options;
|
|
1662
1662
|
}
|
|
1663
1663
|
|
|
1664
|
-
function parseOptions(options, args
|
|
1664
|
+
function parseOptions(options, args = []) {
|
|
1665
1665
|
try {
|
|
1666
1666
|
return options ?
|
|
1667
1667
|
startsWith(options, '{') ?
|
|
@@ -1771,7 +1771,7 @@
|
|
|
1771
1771
|
listener();
|
|
1772
1772
|
});
|
|
1773
1773
|
|
|
1774
|
-
once(window, 'message', resolve, false, (
|
|
1774
|
+
once(window, 'message', resolve, false, ({ data }) => {
|
|
1775
1775
|
try {
|
|
1776
1776
|
data = JSON.parse(data);
|
|
1777
1777
|
return (
|
|
@@ -1784,13 +1784,13 @@
|
|
|
1784
1784
|
// noop
|
|
1785
1785
|
}});
|
|
1786
1786
|
|
|
1787
|
-
el.src =
|
|
1788
|
-
|
|
1789
|
-
|
|
1787
|
+
el.src = `${el.src}${includes(el.src, '?') ? '&' : '?'}${
|
|
1788
|
+
youtube ? 'enablejsapi=1' : `api=1&player_id=${id}`
|
|
1789
|
+
}`;
|
|
1790
1790
|
}).then(() => clearInterval(poller));
|
|
1791
1791
|
}
|
|
1792
1792
|
|
|
1793
|
-
function isInView(element, offsetTop
|
|
1793
|
+
function isInView(element, offsetTop = 0, offsetLeft = 0) {
|
|
1794
1794
|
if (!isVisible(element)) {
|
|
1795
1795
|
return false;
|
|
1796
1796
|
}
|
|
@@ -1811,7 +1811,7 @@
|
|
|
1811
1811
|
|
|
1812
1812
|
}
|
|
1813
1813
|
|
|
1814
|
-
function scrollIntoView(element,
|
|
1814
|
+
function scrollIntoView(element, { offset: offsetBy = 0 } = {}) {
|
|
1815
1815
|
const parents = isVisible(element) ? scrollParents(element) : [];
|
|
1816
1816
|
return parents.reduce(
|
|
1817
1817
|
(fn, scrollElement, i) => {
|
|
@@ -1873,7 +1873,7 @@
|
|
|
1873
1873
|
}
|
|
1874
1874
|
}
|
|
1875
1875
|
|
|
1876
|
-
function scrolledOver(element, startOffset
|
|
1876
|
+
function scrolledOver(element, startOffset = 0, endOffset = 0) {
|
|
1877
1877
|
if (!isVisible(element)) {
|
|
1878
1878
|
return 0;
|
|
1879
1879
|
}
|
|
@@ -1890,7 +1890,7 @@
|
|
|
1890
1890
|
return clamp((scrollTop - start) / (end - start));
|
|
1891
1891
|
}
|
|
1892
1892
|
|
|
1893
|
-
function scrollParents(element, overflowRe
|
|
1893
|
+
function scrollParents(element, overflowRe = /auto|scroll|hidden|clip/, scrollable = false) {
|
|
1894
1894
|
const scrollEl = scrollingElement(element);
|
|
1895
1895
|
|
|
1896
1896
|
let ancestors = parents(element).reverse();
|
|
@@ -1929,6 +1929,10 @@
|
|
|
1929
1929
|
}
|
|
1930
1930
|
|
|
1931
1931
|
let rect = offset(viewportElement);
|
|
1932
|
+
if (css(viewportElement, 'display') === 'inline') {
|
|
1933
|
+
return rect;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1932
1936
|
for (let [prop, dir, start, end] of [
|
|
1933
1937
|
['width', 'x', 'left', 'right'],
|
|
1934
1938
|
['height', 'y', 'top', 'bottom']])
|
|
@@ -1937,9 +1941,9 @@
|
|
|
1937
1941
|
// iOS 12 returns <body> as scrollingElement
|
|
1938
1942
|
viewportElement = documentElement;
|
|
1939
1943
|
} else {
|
|
1940
|
-
rect[start] += toFloat(css(viewportElement,
|
|
1944
|
+
rect[start] += toFloat(css(viewportElement, `border-${start}-width`));
|
|
1941
1945
|
}
|
|
1942
|
-
rect[prop] = rect[dir] = viewportElement[
|
|
1946
|
+
rect[prop] = rect[dir] = viewportElement[`client${ucfirst(prop)}`];
|
|
1943
1947
|
rect[end] = rect[prop] + rect[start];
|
|
1944
1948
|
}
|
|
1945
1949
|
return rect;
|
|
@@ -2102,9 +2106,9 @@
|
|
|
2102
2106
|
const [scrollElement] = commonScrollParents(element, target);
|
|
2103
2107
|
const viewport = offsetViewport(scrollElement);
|
|
2104
2108
|
|
|
2105
|
-
if (['auto', 'scroll'].includes(css(scrollElement,
|
|
2106
|
-
viewport[start] -= scrollElement[
|
|
2107
|
-
viewport[end] = scrollElement[
|
|
2109
|
+
if (['auto', 'scroll'].includes(css(scrollElement, `overflow-${axis}`))) {
|
|
2110
|
+
viewport[start] -= scrollElement[`scroll${ucfirst(start)}`];
|
|
2111
|
+
viewport[end] = scrollElement[`scroll${ucfirst(prop)}`];
|
|
2108
2112
|
}
|
|
2109
2113
|
|
|
2110
2114
|
viewport[start] += viewportOffset;
|
|
@@ -2117,8 +2121,8 @@
|
|
|
2117
2121
|
return scrollParents(target).filter((parent) => within(element, parent));
|
|
2118
2122
|
}
|
|
2119
2123
|
|
|
2120
|
-
function getIntersectionArea() {
|
|
2121
|
-
let area = {};
|
|
2124
|
+
function getIntersectionArea(...rects) {
|
|
2125
|
+
let area = {};
|
|
2122
2126
|
for (const rect of rects) {
|
|
2123
2127
|
for (const [,, start, end] of dirs) {
|
|
2124
2128
|
area[start] = Math.max(area[start] || 0, rect[start]);
|
|
@@ -2133,7 +2137,7 @@
|
|
|
2133
2137
|
return positionA[start] >= positionB[start] && positionA[end] <= positionB[end];
|
|
2134
2138
|
}
|
|
2135
2139
|
|
|
2136
|
-
function flip(element, target,
|
|
2140
|
+
function flip(element, target, { offset, attach }, i) {
|
|
2137
2141
|
return attachTo(element, target, {
|
|
2138
2142
|
attach: {
|
|
2139
2143
|
element: flipAttach(attach.element, i),
|
|
@@ -2433,7 +2437,7 @@
|
|
|
2433
2437
|
delete this._watch;
|
|
2434
2438
|
};
|
|
2435
2439
|
|
|
2436
|
-
UIkit.prototype._callUpdate = function (e
|
|
2440
|
+
UIkit.prototype._callUpdate = function (e = 'update') {
|
|
2437
2441
|
if (!this._connected) {
|
|
2438
2442
|
return;
|
|
2439
2443
|
}
|
|
@@ -2612,8 +2616,8 @@
|
|
|
2612
2616
|
this._observers = [initPropsObserver(this), initChildListObserver(this)];
|
|
2613
2617
|
};
|
|
2614
2618
|
|
|
2615
|
-
UIkit.prototype.registerObserver = function () {
|
|
2616
|
-
this._observers.push(...
|
|
2619
|
+
UIkit.prototype.registerObserver = function (...observer) {
|
|
2620
|
+
this._observers.push(...observer);
|
|
2617
2621
|
};
|
|
2618
2622
|
|
|
2619
2623
|
UIkit.prototype._disconnectObservers = function () {
|
|
@@ -2738,7 +2742,7 @@
|
|
|
2738
2742
|
[value];
|
|
2739
2743
|
}
|
|
2740
2744
|
|
|
2741
|
-
function normalizeData(
|
|
2745
|
+
function normalizeData({ data = {} }, { args = [], props = {} }) {
|
|
2742
2746
|
if (isArray(data)) {
|
|
2743
2747
|
data = data.slice(0, args.length).reduce((data, value, index) => {
|
|
2744
2748
|
if (isPlainObject(value)) {
|
|
@@ -2798,7 +2802,7 @@
|
|
|
2798
2802
|
const observer = new MutationObserver((records) => {
|
|
2799
2803
|
const data = getProps($options);
|
|
2800
2804
|
if (
|
|
2801
|
-
records.some((
|
|
2805
|
+
records.some(({ attributeName }) => {
|
|
2802
2806
|
const prop = attributeName.replace('data-', '');
|
|
2803
2807
|
return (prop === id ? attributes : [camelize(prop), camelize(attributeName)]).some(
|
|
2804
2808
|
(prop) => !isUndefined(data[prop]) && data[prop] !== $props[prop]);
|
|
@@ -2811,7 +2815,7 @@
|
|
|
2811
2815
|
|
|
2812
2816
|
observer.observe(el, {
|
|
2813
2817
|
attributes: true,
|
|
2814
|
-
attributeFilter: filter.concat(filter.map((key) =>
|
|
2818
|
+
attributeFilter: filter.concat(filter.map((key) => `data-${key}`))
|
|
2815
2819
|
});
|
|
2816
2820
|
|
|
2817
2821
|
return observer;
|
|
@@ -2849,7 +2853,7 @@
|
|
|
2849
2853
|
this._callConnected();
|
|
2850
2854
|
};
|
|
2851
2855
|
|
|
2852
|
-
UIkit.prototype.$destroy = function (removeEl
|
|
2856
|
+
UIkit.prototype.$destroy = function (removeEl = false) {
|
|
2853
2857
|
const { el, name } = this.$options;
|
|
2854
2858
|
|
|
2855
2859
|
if (el) {
|
|
@@ -2877,7 +2881,7 @@
|
|
|
2877
2881
|
this._callUpdate(e);
|
|
2878
2882
|
};
|
|
2879
2883
|
|
|
2880
|
-
UIkit.prototype.$update = function (element, e) {
|
|
2884
|
+
UIkit.prototype.$update = function (element = this.$el, e) {
|
|
2881
2885
|
UIkit.update(element, e);
|
|
2882
2886
|
};
|
|
2883
2887
|
|
|
@@ -2900,7 +2904,7 @@
|
|
|
2900
2904
|
|
|
2901
2905
|
if (!options) {
|
|
2902
2906
|
if (isPlainObject(components$2[id])) {
|
|
2903
|
-
components$2[id] = components$2[
|
|
2907
|
+
components$2[id] = components$2[`data-${id}`] = UIkit.extend(components$2[id]);
|
|
2904
2908
|
}
|
|
2905
2909
|
|
|
2906
2910
|
return components$2[id];
|
|
@@ -2940,10 +2944,10 @@
|
|
|
2940
2944
|
opt.install == null ? void 0 : opt.install(UIkit, opt, name);
|
|
2941
2945
|
|
|
2942
2946
|
if (UIkit._initialized && !opt.functional) {
|
|
2943
|
-
requestAnimationFrame(() => UIkit[name](
|
|
2947
|
+
requestAnimationFrame(() => UIkit[name](`[${id}],[data-${id}]`));
|
|
2944
2948
|
}
|
|
2945
2949
|
|
|
2946
|
-
return components$2[id] = components$2[
|
|
2950
|
+
return components$2[id] = components$2[`data-${id}`] = isPlainObject(options) ? opt : options;
|
|
2947
2951
|
};
|
|
2948
2952
|
|
|
2949
2953
|
UIkit.getComponents = (element) => (element == null ? void 0 : element[DATA]) || {};
|
|
@@ -2982,7 +2986,7 @@
|
|
|
2982
2986
|
UIkit.data = '__uikit__';
|
|
2983
2987
|
UIkit.prefix = 'uk-';
|
|
2984
2988
|
UIkit.options = {};
|
|
2985
|
-
UIkit.version = '3.15.
|
|
2989
|
+
UIkit.version = '3.15.18-dev.014d8e608';
|
|
2986
2990
|
|
|
2987
2991
|
globalAPI(UIkit);
|
|
2988
2992
|
hooksAPI(UIkit);
|
|
@@ -3023,7 +3027,7 @@
|
|
|
3023
3027
|
UIkit._initialized = true;
|
|
3024
3028
|
});
|
|
3025
3029
|
|
|
3026
|
-
function applyChildListMutation(
|
|
3030
|
+
function applyChildListMutation({ addedNodes, removedNodes }) {
|
|
3027
3031
|
for (const node of addedNodes) {
|
|
3028
3032
|
apply(node, connect);
|
|
3029
3033
|
}
|
|
@@ -3033,7 +3037,7 @@
|
|
|
3033
3037
|
}
|
|
3034
3038
|
}
|
|
3035
3039
|
|
|
3036
|
-
function applyAttributeMutation(
|
|
3040
|
+
function applyAttributeMutation({ target, attributeName }) {
|
|
3037
3041
|
const name = getComponentName(attributeName);
|
|
3038
3042
|
|
|
3039
3043
|
if (name) {var _UIkit$getComponent;
|
|
@@ -3059,7 +3063,7 @@
|
|
|
3059
3063
|
},
|
|
3060
3064
|
|
|
3061
3065
|
methods: {
|
|
3062
|
-
lazyload(observeTargets
|
|
3066
|
+
lazyload(observeTargets = this.$el, targets = this.$el) {
|
|
3063
3067
|
this.registerObserver(
|
|
3064
3068
|
observeIntersection(observeTargets, (entries, observer) => {
|
|
3065
3069
|
for (const el of toNodes(isFunction(targets) ? targets() : targets)) {
|
|
@@ -3069,8 +3073,8 @@
|
|
|
3069
3073
|
}
|
|
3070
3074
|
|
|
3071
3075
|
for (const el of entries.
|
|
3072
|
-
filter((
|
|
3073
|
-
map((
|
|
3076
|
+
filter(({ isIntersecting }) => isIntersecting).
|
|
3077
|
+
map(({ target }) => target)) {
|
|
3074
3078
|
observer.unobserve(el);
|
|
3075
3079
|
}
|
|
3076
3080
|
}));
|
|
@@ -3101,11 +3105,11 @@
|
|
|
3101
3105
|
},
|
|
3102
3106
|
|
|
3103
3107
|
computed: {
|
|
3104
|
-
hasAnimation(
|
|
3108
|
+
hasAnimation({ animation }) {
|
|
3105
3109
|
return !!animation[0];
|
|
3106
3110
|
},
|
|
3107
3111
|
|
|
3108
|
-
hasTransition(
|
|
3112
|
+
hasTransition({ animation }) {
|
|
3109
3113
|
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3110
3114
|
}
|
|
3111
3115
|
},
|
|
@@ -3117,7 +3121,7 @@
|
|
|
3117
3121
|
toNodes(targets).map((el) => {
|
|
3118
3122
|
const show = isBoolean(toggle) ? toggle : !this.isToggled(el);
|
|
3119
3123
|
|
|
3120
|
-
if (!trigger(el,
|
|
3124
|
+
if (!trigger(el, `before${show ? 'show' : 'hide'}`, [this])) {
|
|
3121
3125
|
return Promise.reject();
|
|
3122
3126
|
}
|
|
3123
3127
|
|
|
@@ -3153,7 +3157,7 @@
|
|
|
3153
3157
|
|
|
3154
3158
|
},
|
|
3155
3159
|
|
|
3156
|
-
isToggled(el
|
|
3160
|
+
isToggled(el = this.$el) {
|
|
3157
3161
|
[el] = toNodes(el);
|
|
3158
3162
|
return hasClass(el, this.clsEnter) ?
|
|
3159
3163
|
true :
|
|
@@ -3189,7 +3193,7 @@
|
|
|
3189
3193
|
}
|
|
3190
3194
|
};
|
|
3191
3195
|
|
|
3192
|
-
function toggleInstant(el, show,
|
|
3196
|
+
function toggleInstant(el, show, { _toggle }) {
|
|
3193
3197
|
Animation.cancel(el);
|
|
3194
3198
|
Transition.cancel(el);
|
|
3195
3199
|
return _toggle(el, show);
|
|
@@ -3197,9 +3201,9 @@
|
|
|
3197
3201
|
|
|
3198
3202
|
async function toggleTransition(
|
|
3199
3203
|
el,
|
|
3200
|
-
show,
|
|
3201
|
-
|
|
3202
|
-
{var _animation$;
|
|
3204
|
+
show,
|
|
3205
|
+
{ animation, duration, velocity, transition, _toggle })
|
|
3206
|
+
{var _animation$;
|
|
3203
3207
|
const [mode = 'reveal', startProp = 'top'] = ((_animation$ = animation[0]) == null ? void 0 : _animation$.split('-')) || [];
|
|
3204
3208
|
|
|
3205
3209
|
const dirs = [
|
|
@@ -3210,8 +3214,8 @@
|
|
|
3210
3214
|
const end = dir[1] === startProp;
|
|
3211
3215
|
const props = ['width', 'height'];
|
|
3212
3216
|
const dimProp = props[dirs.indexOf(dir)];
|
|
3213
|
-
const marginProp =
|
|
3214
|
-
const marginStartProp =
|
|
3217
|
+
const marginProp = `margin-${dir[0]}`;
|
|
3218
|
+
const marginStartProp = `margin-${startProp}`;
|
|
3215
3219
|
|
|
3216
3220
|
let currentDim = dimensions(el)[dimProp];
|
|
3217
3221
|
|
|
@@ -3344,7 +3348,7 @@
|
|
|
3344
3348
|
|
|
3345
3349
|
computed: {
|
|
3346
3350
|
items: {
|
|
3347
|
-
get(
|
|
3351
|
+
get({ targets }, $el) {
|
|
3348
3352
|
return $$(targets, $el);
|
|
3349
3353
|
},
|
|
3350
3354
|
|
|
@@ -3365,12 +3369,12 @@
|
|
|
3365
3369
|
immediate: true
|
|
3366
3370
|
},
|
|
3367
3371
|
|
|
3368
|
-
toggles(
|
|
3372
|
+
toggles({ toggle }) {
|
|
3369
3373
|
return this.items.map((item) => $(toggle, item));
|
|
3370
3374
|
},
|
|
3371
3375
|
|
|
3372
3376
|
contents: {
|
|
3373
|
-
get(
|
|
3377
|
+
get({ content }) {
|
|
3374
3378
|
return this.items.map((item) => $(content, item));
|
|
3375
3379
|
},
|
|
3376
3380
|
|
|
@@ -3399,7 +3403,7 @@
|
|
|
3399
3403
|
name: 'click',
|
|
3400
3404
|
|
|
3401
3405
|
delegate() {
|
|
3402
|
-
return this.targets
|
|
3406
|
+
return `${this.targets} ${this.$props.toggle}`;
|
|
3403
3407
|
},
|
|
3404
3408
|
|
|
3405
3409
|
async handler(e) {var _this$_off;
|
|
@@ -3417,7 +3421,7 @@
|
|
|
3417
3421
|
async toggle(item, animate) {
|
|
3418
3422
|
item = this.items[getIndex(item, this.items)];
|
|
3419
3423
|
let items = [item];
|
|
3420
|
-
const activeItems = filter(this.items,
|
|
3424
|
+
const activeItems = filter(this.items, `.${this.clsOpen}`);
|
|
3421
3425
|
|
|
3422
3426
|
if (!this.multiple && !includes(activeItems, items[0])) {
|
|
3423
3427
|
items = items.concat(activeItems);
|
|
@@ -3450,7 +3454,7 @@
|
|
|
3450
3454
|
el && (el.hidden = hide);
|
|
3451
3455
|
}
|
|
3452
3456
|
|
|
3453
|
-
async function transition(el, show,
|
|
3457
|
+
async function transition(el, show, { content, duration, velocity, transition }) {var _el$_wrapper;
|
|
3454
3458
|
content = ((_el$_wrapper = el._wrapper) == null ? void 0 : _el$_wrapper.firstElementChild) || $(content, el);
|
|
3455
3459
|
|
|
3456
3460
|
if (!el._wrapper) {
|
|
@@ -3535,7 +3539,7 @@
|
|
|
3535
3539
|
}
|
|
3536
3540
|
};
|
|
3537
3541
|
|
|
3538
|
-
function animate$1(el, show,
|
|
3542
|
+
function animate$1(el, show, { duration, transition, velocity }) {
|
|
3539
3543
|
const height = toFloat(css(el, 'height'));
|
|
3540
3544
|
css(el, 'height', height);
|
|
3541
3545
|
return Transition.start(
|
|
@@ -3587,7 +3591,7 @@
|
|
|
3587
3591
|
},
|
|
3588
3592
|
|
|
3589
3593
|
update: {
|
|
3590
|
-
read(
|
|
3594
|
+
read({ visible }) {
|
|
3591
3595
|
if (!isVideo(this.$el)) {
|
|
3592
3596
|
return false;
|
|
3593
3597
|
}
|
|
@@ -3599,7 +3603,7 @@
|
|
|
3599
3603
|
};
|
|
3600
3604
|
},
|
|
3601
3605
|
|
|
3602
|
-
write(
|
|
3606
|
+
write({ prev, visible, inView }) {
|
|
3603
3607
|
if (!visible || this.inView && !inView) {
|
|
3604
3608
|
pause(this.$el);
|
|
3605
3609
|
} else if (this.autoplay === true && !prev || this.inView && inView) {
|
|
@@ -3677,7 +3681,7 @@
|
|
|
3677
3681
|
return coverDim;
|
|
3678
3682
|
},
|
|
3679
3683
|
|
|
3680
|
-
write(
|
|
3684
|
+
write({ height, width }) {
|
|
3681
3685
|
css(this.$el, { height, width });
|
|
3682
3686
|
},
|
|
3683
3687
|
|
|
@@ -3703,7 +3707,7 @@
|
|
|
3703
3707
|
},
|
|
3704
3708
|
|
|
3705
3709
|
computed: {
|
|
3706
|
-
container(
|
|
3710
|
+
container({ container }) {
|
|
3707
3711
|
return container === true && this.$container || container && $(container);
|
|
3708
3712
|
}
|
|
3709
3713
|
}
|
|
@@ -3719,7 +3723,7 @@
|
|
|
3719
3723
|
},
|
|
3720
3724
|
|
|
3721
3725
|
data: {
|
|
3722
|
-
pos:
|
|
3726
|
+
pos: `bottom-${isRtl ? 'right' : 'left'}`,
|
|
3723
3727
|
offset: false,
|
|
3724
3728
|
flip: true,
|
|
3725
3729
|
shift: true,
|
|
@@ -3820,7 +3824,7 @@
|
|
|
3820
3824
|
},
|
|
3821
3825
|
|
|
3822
3826
|
computed: {
|
|
3823
|
-
panel(
|
|
3827
|
+
panel({ selPanel }, $el) {
|
|
3824
3828
|
return $(selPanel, $el);
|
|
3825
3829
|
},
|
|
3826
3830
|
|
|
@@ -3828,7 +3832,7 @@
|
|
|
3828
3832
|
return this.panel;
|
|
3829
3833
|
},
|
|
3830
3834
|
|
|
3831
|
-
bgClose(
|
|
3835
|
+
bgClose({ bgClose }) {
|
|
3832
3836
|
return bgClose && this.panel;
|
|
3833
3837
|
}
|
|
3834
3838
|
},
|
|
@@ -3844,7 +3848,7 @@
|
|
|
3844
3848
|
name: 'click',
|
|
3845
3849
|
|
|
3846
3850
|
delegate() {
|
|
3847
|
-
return this.selClose
|
|
3851
|
+
return `${this.selClose},a[href*="#"]`;
|
|
3848
3852
|
},
|
|
3849
3853
|
|
|
3850
3854
|
handler(e) {
|
|
@@ -3933,7 +3937,7 @@
|
|
|
3933
3937
|
once(
|
|
3934
3938
|
this.$el,
|
|
3935
3939
|
'hide',
|
|
3936
|
-
on(document, pointerDown, (
|
|
3940
|
+
on(document, pointerDown, ({ target }) => {
|
|
3937
3941
|
if (
|
|
3938
3942
|
last(active$1) !== this ||
|
|
3939
3943
|
this.overlay && !within(target, this.$el) ||
|
|
@@ -3944,8 +3948,8 @@
|
|
|
3944
3948
|
|
|
3945
3949
|
once(
|
|
3946
3950
|
document,
|
|
3947
|
-
pointerUp
|
|
3948
|
-
(
|
|
3951
|
+
`${pointerUp} ${pointerCancel} scroll`,
|
|
3952
|
+
({ defaultPrevented, type, target: newTarget }) => {
|
|
3949
3953
|
if (
|
|
3950
3954
|
!defaultPrevented &&
|
|
3951
3955
|
type === pointerUp &&
|
|
@@ -4033,7 +4037,7 @@
|
|
|
4033
4037
|
}
|
|
4034
4038
|
};
|
|
4035
4039
|
|
|
4036
|
-
function animate(el, show,
|
|
4040
|
+
function animate(el, show, { transitionElement, _toggle }) {
|
|
4037
4041
|
return new Promise((resolve, reject) =>
|
|
4038
4042
|
once(el, 'show hide', () => {
|
|
4039
4043
|
el._reject == null ? void 0 : el._reject();
|
|
@@ -4081,7 +4085,7 @@
|
|
|
4081
4085
|
on(
|
|
4082
4086
|
el,
|
|
4083
4087
|
'touchstart',
|
|
4084
|
-
(
|
|
4088
|
+
({ targetTouches }) => {
|
|
4085
4089
|
if (targetTouches.length === 1) {
|
|
4086
4090
|
startClientY = targetTouches[0].clientY;
|
|
4087
4091
|
}
|
|
@@ -4200,14 +4204,14 @@
|
|
|
4200
4204
|
},
|
|
4201
4205
|
|
|
4202
4206
|
computed: {
|
|
4203
|
-
boundary(
|
|
4207
|
+
boundary({ boundary, boundaryX, boundaryY }, $el) {
|
|
4204
4208
|
return [
|
|
4205
4209
|
query(boundaryX || boundary, $el) || window,
|
|
4206
4210
|
query(boundaryY || boundary, $el) || window];
|
|
4207
4211
|
|
|
4208
4212
|
},
|
|
4209
4213
|
|
|
4210
|
-
target(
|
|
4214
|
+
target({ target, targetX, targetY }, $el) {
|
|
4211
4215
|
targetX = targetX || target || this.targetEl;
|
|
4212
4216
|
targetY = targetY || target || this.targetEl;
|
|
4213
4217
|
|
|
@@ -4223,7 +4227,7 @@
|
|
|
4223
4227
|
},
|
|
4224
4228
|
|
|
4225
4229
|
beforeConnect() {
|
|
4226
|
-
this.clsDrop = this.$props.clsDrop ||
|
|
4230
|
+
this.clsDrop = this.$props.clsDrop || `uk-${this.$options.name}`;
|
|
4227
4231
|
},
|
|
4228
4232
|
|
|
4229
4233
|
connected() {
|
|
@@ -4238,7 +4242,7 @@
|
|
|
4238
4242
|
this.lazyload(this.targetEl);
|
|
4239
4243
|
}
|
|
4240
4244
|
|
|
4241
|
-
this._style = ((
|
|
4245
|
+
this._style = (({ width, height }) => ({ width, height }))(this.$el.style);
|
|
4242
4246
|
},
|
|
4243
4247
|
|
|
4244
4248
|
disconnected() {
|
|
@@ -4254,7 +4258,7 @@
|
|
|
4254
4258
|
name: 'click',
|
|
4255
4259
|
|
|
4256
4260
|
delegate() {
|
|
4257
|
-
return
|
|
4261
|
+
return `.${this.clsDrop}-close`;
|
|
4258
4262
|
},
|
|
4259
4263
|
|
|
4260
4264
|
handler(e) {
|
|
@@ -4270,7 +4274,7 @@
|
|
|
4270
4274
|
return 'a[href*="#"]';
|
|
4271
4275
|
},
|
|
4272
4276
|
|
|
4273
|
-
handler(
|
|
4277
|
+
handler({ defaultPrevented, current }) {
|
|
4274
4278
|
const { hash } = current;
|
|
4275
4279
|
if (
|
|
4276
4280
|
!defaultPrevented &&
|
|
@@ -4332,7 +4336,7 @@
|
|
|
4332
4336
|
},
|
|
4333
4337
|
|
|
4334
4338
|
{
|
|
4335
|
-
name: pointerEnter
|
|
4339
|
+
name: `${pointerEnter} focusin`,
|
|
4336
4340
|
|
|
4337
4341
|
filter() {
|
|
4338
4342
|
return includes(this.mode, 'hover');
|
|
@@ -4346,7 +4350,7 @@
|
|
|
4346
4350
|
},
|
|
4347
4351
|
|
|
4348
4352
|
{
|
|
4349
|
-
name: pointerLeave
|
|
4353
|
+
name: `${pointerLeave} focusout`,
|
|
4350
4354
|
|
|
4351
4355
|
filter() {
|
|
4352
4356
|
return includes(this.mode, 'hover');
|
|
@@ -4389,22 +4393,22 @@
|
|
|
4389
4393
|
on(
|
|
4390
4394
|
document,
|
|
4391
4395
|
pointerDown,
|
|
4392
|
-
(
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4396
|
+
({ target }) =>
|
|
4397
|
+
!within(target, this.$el) &&
|
|
4398
|
+
once(
|
|
4399
|
+
document,
|
|
4400
|
+
`${pointerUp} ${pointerCancel} scroll`,
|
|
4401
|
+
({ defaultPrevented, type, target: newTarget }) => {
|
|
4402
|
+
if (
|
|
4403
|
+
!defaultPrevented &&
|
|
4404
|
+
type === pointerUp &&
|
|
4405
|
+
target === newTarget &&
|
|
4406
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4407
|
+
{
|
|
4408
|
+
this.hide(false);
|
|
4409
|
+
}
|
|
4410
|
+
},
|
|
4411
|
+
true)),
|
|
4408
4412
|
|
|
4409
4413
|
|
|
4410
4414
|
|
|
@@ -4456,7 +4460,7 @@
|
|
|
4456
4460
|
{
|
|
4457
4461
|
name: 'hide',
|
|
4458
4462
|
|
|
4459
|
-
handler(
|
|
4463
|
+
handler({ target }) {
|
|
4460
4464
|
if (this.$el !== target) {
|
|
4461
4465
|
active =
|
|
4462
4466
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4480,7 +4484,7 @@
|
|
|
4480
4484
|
},
|
|
4481
4485
|
|
|
4482
4486
|
methods: {
|
|
4483
|
-
show(target
|
|
4487
|
+
show(target = this.targetEl, delay = true) {
|
|
4484
4488
|
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4485
4489
|
this.hide(false, false);
|
|
4486
4490
|
}
|
|
@@ -4516,7 +4520,7 @@
|
|
|
4516
4520
|
|
|
4517
4521
|
},
|
|
4518
4522
|
|
|
4519
|
-
hide(delay
|
|
4523
|
+
hide(delay = true, animate = true) {
|
|
4520
4524
|
const hide = () => this.toggleElement(this.$el, false, this.animateOut && animate);
|
|
4521
4525
|
|
|
4522
4526
|
this.clearTimers();
|
|
@@ -4547,7 +4551,7 @@
|
|
|
4547
4551
|
},
|
|
4548
4552
|
|
|
4549
4553
|
position() {
|
|
4550
|
-
removeClass(this.$el, this.clsDrop
|
|
4554
|
+
removeClass(this.$el, `${this.clsDrop}-stack`);
|
|
4551
4555
|
css(this.$el, this._style);
|
|
4552
4556
|
|
|
4553
4557
|
// Ensure none positioned element does not generate scrollbars
|
|
@@ -4568,7 +4572,7 @@
|
|
|
4568
4572
|
offset(this.boundary[i])[prop],
|
|
4569
4573
|
viewports[i][prop] - 2 * viewportOffset),
|
|
4570
4574
|
|
|
4571
|
-
[
|
|
4575
|
+
[`overflow-${axis}`]: 'auto'
|
|
4572
4576
|
});
|
|
4573
4577
|
}
|
|
4574
4578
|
}
|
|
@@ -4576,7 +4580,7 @@
|
|
|
4576
4580
|
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4577
4581
|
|
|
4578
4582
|
if (this.$el.offsetWidth > maxWidth) {
|
|
4579
|
-
addClass(this.$el, this.clsDrop
|
|
4583
|
+
addClass(this.$el, `${this.clsDrop}-stack`);
|
|
4580
4584
|
}
|
|
4581
4585
|
|
|
4582
4586
|
css(this.$el, 'maxWidth', maxWidth);
|
|
@@ -4603,7 +4607,7 @@
|
|
|
4603
4607
|
offset(this.boundary[i])[end],
|
|
4604
4608
|
viewports[i][end] - viewportOffset) -
|
|
4605
4609
|
targetOffset[end]) - positionOffset,
|
|
4606
|
-
[
|
|
4610
|
+
[`overflow-${axis}`]: 'auto'
|
|
4607
4611
|
});
|
|
4608
4612
|
|
|
4609
4613
|
this.positionAt(this.$el, this.target, this.boundary);
|
|
@@ -4645,7 +4649,7 @@
|
|
|
4645
4649
|
return this.input.nextElementSibling;
|
|
4646
4650
|
},
|
|
4647
4651
|
|
|
4648
|
-
target(
|
|
4652
|
+
target({ target }, $el) {
|
|
4649
4653
|
return (
|
|
4650
4654
|
target && (
|
|
4651
4655
|
target === true && parent(this.input) === $el && this.input.nextElementSibling ||
|
|
@@ -4736,7 +4740,7 @@
|
|
|
4736
4740
|
};
|
|
4737
4741
|
},
|
|
4738
4742
|
|
|
4739
|
-
write(
|
|
4743
|
+
write({ columns, rows }) {
|
|
4740
4744
|
for (const row of rows) {
|
|
4741
4745
|
for (const column of row) {
|
|
4742
4746
|
toggleClass(column, this.margin, rows[0] !== row);
|
|
@@ -4812,7 +4816,7 @@
|
|
|
4812
4816
|
return sorted;
|
|
4813
4817
|
}
|
|
4814
4818
|
|
|
4815
|
-
function getOffset(element, offset
|
|
4819
|
+
function getOffset(element, offset = false) {
|
|
4816
4820
|
let { offsetTop, offsetLeft, offsetHeight, offsetWidth } = element;
|
|
4817
4821
|
|
|
4818
4822
|
if (offset) {
|
|
@@ -4888,7 +4892,7 @@
|
|
|
4888
4892
|
|
|
4889
4893
|
update: [
|
|
4890
4894
|
{
|
|
4891
|
-
write(
|
|
4895
|
+
write({ columns }) {
|
|
4892
4896
|
toggleClass(this.$el, this.clsStack, columns.length < 2);
|
|
4893
4897
|
},
|
|
4894
4898
|
|
|
@@ -4936,7 +4940,7 @@
|
|
|
4936
4940
|
return { padding, columns, translates, height: translates ? elHeight : '' };
|
|
4937
4941
|
},
|
|
4938
4942
|
|
|
4939
|
-
write(
|
|
4943
|
+
write({ height, padding }) {
|
|
4940
4944
|
css(this.$el, 'paddingBottom', padding || '');
|
|
4941
4945
|
height !== false && css(this.$el, 'height', height);
|
|
4942
4946
|
},
|
|
@@ -4957,7 +4961,7 @@
|
|
|
4957
4961
|
};
|
|
4958
4962
|
},
|
|
4959
4963
|
|
|
4960
|
-
write(
|
|
4964
|
+
write({ columns, scrolled, translates }) {
|
|
4961
4965
|
if (scrolled === false && !translates) {
|
|
4962
4966
|
return;
|
|
4963
4967
|
}
|
|
@@ -4968,11 +4972,11 @@
|
|
|
4968
4972
|
el,
|
|
4969
4973
|
'transform',
|
|
4970
4974
|
!scrolled && !translates ?
|
|
4971
|
-
'' :
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4975
|
+
'' :
|
|
4976
|
+
`translateY(${
|
|
4977
|
+
(translates && -translates[i][j]) + (
|
|
4978
|
+
scrolled ? i % 2 ? scrolled : scrolled / 8 : 0)
|
|
4979
|
+
}px)`)));
|
|
4976
4980
|
|
|
4977
4981
|
|
|
4978
4982
|
|
|
@@ -5022,7 +5026,7 @@
|
|
|
5022
5026
|
|
|
5023
5027
|
computed: {
|
|
5024
5028
|
elements: {
|
|
5025
|
-
get(
|
|
5029
|
+
get({ target }, $el) {
|
|
5026
5030
|
return $$(target, $el);
|
|
5027
5031
|
},
|
|
5028
5032
|
|
|
@@ -5043,7 +5047,7 @@
|
|
|
5043
5047
|
};
|
|
5044
5048
|
},
|
|
5045
5049
|
|
|
5046
|
-
write(
|
|
5050
|
+
write({ rows }) {
|
|
5047
5051
|
for (const { heights, elements } of rows) {
|
|
5048
5052
|
elements.forEach((el, i) => css(el, 'minHeight', heights[i]));
|
|
5049
5053
|
}
|
|
@@ -5107,7 +5111,7 @@
|
|
|
5107
5111
|
},
|
|
5108
5112
|
|
|
5109
5113
|
update: {
|
|
5110
|
-
read(
|
|
5114
|
+
read({ minHeight: prev }) {
|
|
5111
5115
|
if (!isVisible(this.$el)) {
|
|
5112
5116
|
return false;
|
|
5113
5117
|
}
|
|
@@ -5133,34 +5137,34 @@
|
|
|
5133
5137
|
scrollingElement === scrollElement || body === scrollElement;
|
|
5134
5138
|
|
|
5135
5139
|
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
5136
|
-
minHeight =
|
|
5140
|
+
minHeight = `calc(${isScrollingElement ? '100vh' : `${viewportHeight}px`}`;
|
|
5137
5141
|
|
|
5138
5142
|
if (this.offsetTop) {
|
|
5139
5143
|
if (isScrollingElement) {
|
|
5140
5144
|
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
5141
|
-
minHeight += top > 0 && top < viewportHeight / 2 ?
|
|
5145
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? ` - ${top}px` : '';
|
|
5142
5146
|
} else {
|
|
5143
|
-
minHeight +=
|
|
5147
|
+
minHeight += ` - ${css(scrollElement, 'paddingTop')}`;
|
|
5144
5148
|
}
|
|
5145
5149
|
}
|
|
5146
5150
|
|
|
5147
5151
|
if (this.offsetBottom === true) {
|
|
5148
|
-
minHeight +=
|
|
5152
|
+
minHeight += ` - ${dimensions(this.$el.nextElementSibling).height}px`;
|
|
5149
5153
|
} else if (isNumeric(this.offsetBottom)) {
|
|
5150
|
-
minHeight +=
|
|
5154
|
+
minHeight += ` - ${this.offsetBottom}vh`;
|
|
5151
5155
|
} else if (this.offsetBottom && endsWith(this.offsetBottom, 'px')) {
|
|
5152
|
-
minHeight +=
|
|
5156
|
+
minHeight += ` - ${toFloat(this.offsetBottom)}px`;
|
|
5153
5157
|
} else if (isString(this.offsetBottom)) {
|
|
5154
|
-
minHeight +=
|
|
5158
|
+
minHeight += ` - ${dimensions(query(this.offsetBottom, this.$el)).height}px`;
|
|
5155
5159
|
}
|
|
5156
5160
|
|
|
5157
|
-
minHeight +=
|
|
5161
|
+
minHeight += `${box ? ` - ${box}px` : ''})`;
|
|
5158
5162
|
}
|
|
5159
5163
|
|
|
5160
5164
|
return { minHeight, prev };
|
|
5161
5165
|
},
|
|
5162
5166
|
|
|
5163
|
-
write(
|
|
5167
|
+
write({ minHeight }) {
|
|
5164
5168
|
css(this.$el, { minHeight });
|
|
5165
5169
|
|
|
5166
5170
|
if (this.minHeight && toFloat(css(this.$el, 'minHeight')) < this.minHeight) {
|
|
@@ -5326,7 +5330,7 @@
|
|
|
5326
5330
|
|
|
5327
5331
|
let match;
|
|
5328
5332
|
while (match = symbolRe.exec(svg)) {
|
|
5329
|
-
symbols[svg][match[3]] =
|
|
5333
|
+
symbols[svg][match[3]] = `<svg xmlns="http://www.w3.org/2000/svg"${match[1]}svg>`;
|
|
5330
5334
|
}
|
|
5331
5335
|
}
|
|
5332
5336
|
|
|
@@ -5481,7 +5485,7 @@
|
|
|
5481
5485
|
|
|
5482
5486
|
beforeConnect() {
|
|
5483
5487
|
const icon = this.$props.icon;
|
|
5484
|
-
this.icon = closest(this.$el, '.uk-nav-primary') ? icon
|
|
5488
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? `${icon}-large` : icon;
|
|
5485
5489
|
}
|
|
5486
5490
|
};
|
|
5487
5491
|
|
|
@@ -5491,7 +5495,7 @@
|
|
|
5491
5495
|
beforeConnect() {
|
|
5492
5496
|
addClass(this.$el, 'uk-slidenav');
|
|
5493
5497
|
const icon = this.$props.icon;
|
|
5494
|
-
this.icon = hasClass(this.$el, 'uk-slidenav-large') ? icon
|
|
5498
|
+
this.icon = hasClass(this.$el, 'uk-slidenav-large') ? `${icon}-large` : icon;
|
|
5495
5499
|
}
|
|
5496
5500
|
};
|
|
5497
5501
|
|
|
@@ -5512,7 +5516,7 @@
|
|
|
5512
5516
|
extends: IconComponent,
|
|
5513
5517
|
|
|
5514
5518
|
beforeConnect() {
|
|
5515
|
-
this.icon =
|
|
5519
|
+
this.icon = `close-${hasClass(this.$el, 'uk-close-large') ? 'large' : 'icon'}`;
|
|
5516
5520
|
}
|
|
5517
5521
|
};
|
|
5518
5522
|
|
|
@@ -5650,7 +5654,7 @@
|
|
|
5650
5654
|
} else if (src) {
|
|
5651
5655
|
const change = !includes(el.style.backgroundImage, src);
|
|
5652
5656
|
if (change) {
|
|
5653
|
-
css(el, 'backgroundImage',
|
|
5657
|
+
css(el, 'backgroundImage', `url(${escape(src)})`);
|
|
5654
5658
|
trigger(el, createEvent('load', false));
|
|
5655
5659
|
}
|
|
5656
5660
|
}
|
|
@@ -5762,13 +5766,13 @@
|
|
|
5762
5766
|
function toMedia(value, element) {
|
|
5763
5767
|
if (isString(value)) {
|
|
5764
5768
|
if (startsWith(value, '@')) {
|
|
5765
|
-
value = toFloat(css(element,
|
|
5769
|
+
value = toFloat(css(element, `--uk-breakpoint-${value.substr(1)}`));
|
|
5766
5770
|
} else if (isNaN(value)) {
|
|
5767
5771
|
return value;
|
|
5768
5772
|
}
|
|
5769
5773
|
}
|
|
5770
5774
|
|
|
5771
|
-
return value && isNumeric(value) ?
|
|
5775
|
+
return value && isNumeric(value) ? `(min-width: ${value}px)` : '';
|
|
5772
5776
|
}
|
|
5773
5777
|
|
|
5774
5778
|
var leader = {
|
|
@@ -5786,13 +5790,13 @@
|
|
|
5786
5790
|
},
|
|
5787
5791
|
|
|
5788
5792
|
computed: {
|
|
5789
|
-
fill(
|
|
5793
|
+
fill({ fill }) {
|
|
5790
5794
|
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5791
5795
|
}
|
|
5792
5796
|
},
|
|
5793
5797
|
|
|
5794
5798
|
connected() {
|
|
5795
|
-
[this.wrapper] = wrapInner(this.$el,
|
|
5799
|
+
[this.wrapper] = wrapInner(this.$el, `<span class="${this.clsWrapper}">`);
|
|
5796
5800
|
},
|
|
5797
5801
|
|
|
5798
5802
|
disconnected() {
|
|
@@ -5810,7 +5814,7 @@
|
|
|
5810
5814
|
};
|
|
5811
5815
|
},
|
|
5812
5816
|
|
|
5813
|
-
write(
|
|
5817
|
+
write({ width, fill, hide }) {
|
|
5814
5818
|
toggleClass(this.wrapper, this.clsHide, hide);
|
|
5815
5819
|
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5816
5820
|
},
|
|
@@ -5861,12 +5865,12 @@
|
|
|
5861
5865
|
|
|
5862
5866
|
};
|
|
5863
5867
|
|
|
5864
|
-
function install(
|
|
5868
|
+
function install({ modal }) {
|
|
5865
5869
|
modal.dialog = function (content, options) {
|
|
5866
|
-
const dialog = modal(
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
+
const dialog = modal(
|
|
5871
|
+
`<div class="uk-modal">
|
|
5872
|
+
<div class="uk-modal-dialog">${content}</div>
|
|
5873
|
+
</div>`,
|
|
5870
5874
|
options);
|
|
5871
5875
|
|
|
5872
5876
|
|
|
@@ -5887,14 +5891,14 @@
|
|
|
5887
5891
|
|
|
5888
5892
|
modal.alert = function (message, options) {
|
|
5889
5893
|
return openDialog(
|
|
5890
|
-
(
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5894
|
+
({ labels }) => `<div class="uk-modal-body">${
|
|
5895
|
+
isString(message) ? message : html(message)
|
|
5896
|
+
}</div>
|
|
5897
|
+
<div class="uk-modal-footer uk-text-right">
|
|
5898
|
+
<button class="uk-button uk-button-primary uk-modal-close" autofocus>${
|
|
5899
|
+
labels.ok
|
|
5900
|
+
}</button>
|
|
5901
|
+
</div>`,
|
|
5898
5902
|
options,
|
|
5899
5903
|
(deferred) => deferred.resolve());
|
|
5900
5904
|
|
|
@@ -5902,15 +5906,15 @@
|
|
|
5902
5906
|
|
|
5903
5907
|
modal.confirm = function (message, options) {
|
|
5904
5908
|
return openDialog(
|
|
5905
|
-
(
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5909
|
+
({ labels }) => `<form>
|
|
5910
|
+
<div class="uk-modal-body">${isString(message) ? message : html(message)}</div>
|
|
5911
|
+
<div class="uk-modal-footer uk-text-right">
|
|
5912
|
+
<button class="uk-button uk-button-default uk-modal-close" type="button">${
|
|
5913
|
+
labels.cancel
|
|
5914
|
+
}</button>
|
|
5915
|
+
<button class="uk-button uk-button-primary" autofocus>${labels.ok}</button>
|
|
5916
|
+
</div>
|
|
5917
|
+
</form>`,
|
|
5914
5918
|
options,
|
|
5915
5919
|
(deferred) => deferred.reject());
|
|
5916
5920
|
|
|
@@ -5918,18 +5922,18 @@
|
|
|
5918
5922
|
|
|
5919
5923
|
modal.prompt = function (message, value, options) {
|
|
5920
5924
|
return openDialog(
|
|
5921
|
-
(
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5925
|
+
({ labels }) => `<form class="uk-form-stacked">
|
|
5926
|
+
<div class="uk-modal-body">
|
|
5927
|
+
<label>${isString(message) ? message : html(message)}</label>
|
|
5928
|
+
<input class="uk-input" value="${value || ''}" autofocus>
|
|
5929
|
+
</div>
|
|
5930
|
+
<div class="uk-modal-footer uk-text-right">
|
|
5931
|
+
<button class="uk-button uk-button-default uk-modal-close" type="button">${
|
|
5932
|
+
labels.cancel
|
|
5933
|
+
}</button>
|
|
5934
|
+
<button class="uk-button uk-button-primary">${labels.ok}</button>
|
|
5935
|
+
</div>
|
|
5936
|
+
</form>`,
|
|
5933
5937
|
options,
|
|
5934
5938
|
(deferred) => deferred.resolve(null),
|
|
5935
5939
|
(dialog) => $('input', dialog.$el).value);
|
|
@@ -6009,12 +6013,12 @@
|
|
|
6009
6013
|
},
|
|
6010
6014
|
|
|
6011
6015
|
computed: {
|
|
6012
|
-
dropbarAnchor(
|
|
6016
|
+
dropbarAnchor({ dropbarAnchor }, $el) {
|
|
6013
6017
|
return query(dropbarAnchor, $el) || $el;
|
|
6014
6018
|
},
|
|
6015
6019
|
|
|
6016
6020
|
dropbar: {
|
|
6017
|
-
get(
|
|
6021
|
+
get({ dropbar }) {
|
|
6018
6022
|
if (!dropbar) {
|
|
6019
6023
|
return null;
|
|
6020
6024
|
}
|
|
@@ -6039,11 +6043,11 @@
|
|
|
6039
6043
|
},
|
|
6040
6044
|
|
|
6041
6045
|
dropdowns: {
|
|
6042
|
-
get(
|
|
6043
|
-
const dropdowns = $$(
|
|
6046
|
+
get({ clsDrop }, $el) {
|
|
6047
|
+
const dropdowns = $$(`.${clsDrop}`, $el);
|
|
6044
6048
|
|
|
6045
6049
|
if (this.dropContainer !== $el) {
|
|
6046
|
-
for (const el of $$(
|
|
6050
|
+
for (const el of $$(`.${clsDrop}`, this.dropContainer)) {var _this$getDropdown;
|
|
6047
6051
|
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
6048
6052
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
6049
6053
|
dropdowns.push(el);
|
|
@@ -6062,7 +6066,7 @@
|
|
|
6062
6066
|
...this.$props,
|
|
6063
6067
|
flip: false,
|
|
6064
6068
|
shift: true,
|
|
6065
|
-
pos:
|
|
6069
|
+
pos: `bottom-${this.align}`,
|
|
6066
6070
|
boundary: this.boundary === true ? this.$el : this.boundary
|
|
6067
6071
|
});
|
|
6068
6072
|
|
|
@@ -6072,7 +6076,7 @@
|
|
|
6072
6076
|
},
|
|
6073
6077
|
|
|
6074
6078
|
toggles: {
|
|
6075
|
-
get(
|
|
6079
|
+
get({ dropdown }, $el) {
|
|
6076
6080
|
return $$(dropdown, $el);
|
|
6077
6081
|
},
|
|
6078
6082
|
|
|
@@ -6103,7 +6107,7 @@
|
|
|
6103
6107
|
return this.dropdown;
|
|
6104
6108
|
},
|
|
6105
6109
|
|
|
6106
|
-
handler(
|
|
6110
|
+
handler({ current }) {
|
|
6107
6111
|
const active = this.getActive();
|
|
6108
6112
|
if (
|
|
6109
6113
|
active &&
|
|
@@ -6133,8 +6137,8 @@
|
|
|
6133
6137
|
|
|
6134
6138
|
if (!active || active.targetEl !== current) {
|
|
6135
6139
|
current.click();
|
|
6136
|
-
once(this.dropContainer, 'show', (
|
|
6137
|
-
|
|
6140
|
+
once(this.dropContainer, 'show', ({ target }) =>
|
|
6141
|
+
focusFirstFocusableElement(target));
|
|
6138
6142
|
|
|
6139
6143
|
} else {
|
|
6140
6144
|
focusFirstFocusableElement(active.$el);
|
|
@@ -6153,7 +6157,7 @@
|
|
|
6153
6157
|
},
|
|
6154
6158
|
|
|
6155
6159
|
delegate() {
|
|
6156
|
-
return
|
|
6160
|
+
return `.${this.clsDrop}`;
|
|
6157
6161
|
},
|
|
6158
6162
|
|
|
6159
6163
|
handler(e) {
|
|
@@ -6224,7 +6228,7 @@
|
|
|
6224
6228
|
return this.dropbar;
|
|
6225
6229
|
},
|
|
6226
6230
|
|
|
6227
|
-
handler(
|
|
6231
|
+
handler({ target }) {
|
|
6228
6232
|
if (!this.isDropbarDrop(target)) {
|
|
6229
6233
|
return;
|
|
6230
6234
|
}
|
|
@@ -6233,7 +6237,7 @@
|
|
|
6233
6237
|
after(this.dropbarAnchor, this.dropbar);
|
|
6234
6238
|
}
|
|
6235
6239
|
|
|
6236
|
-
addClass(target, this.clsDrop
|
|
6240
|
+
addClass(target, `${this.clsDrop}-dropbar`);
|
|
6237
6241
|
}
|
|
6238
6242
|
},
|
|
6239
6243
|
|
|
@@ -6248,18 +6252,18 @@
|
|
|
6248
6252
|
return this.dropbar;
|
|
6249
6253
|
},
|
|
6250
6254
|
|
|
6251
|
-
handler(
|
|
6255
|
+
handler({ target }) {
|
|
6252
6256
|
if (!this.isDropbarDrop(target)) {
|
|
6253
6257
|
return;
|
|
6254
6258
|
}
|
|
6255
6259
|
|
|
6256
6260
|
const drop = this.getDropdown(target);
|
|
6257
6261
|
this._observer = observeResize([drop.$el, ...drop.target], () => {
|
|
6258
|
-
const targetOffsets = parents(target,
|
|
6262
|
+
const targetOffsets = parents(target, `.${this.clsDrop}`).
|
|
6259
6263
|
concat(target).
|
|
6260
6264
|
map((el) => offset(el));
|
|
6261
|
-
const minTop = Math.min(...targetOffsets.map((
|
|
6262
|
-
const maxBottom = Math.max(...targetOffsets.map((
|
|
6265
|
+
const minTop = Math.min(...targetOffsets.map(({ top }) => top));
|
|
6266
|
+
const maxBottom = Math.max(...targetOffsets.map(({ bottom }) => bottom));
|
|
6263
6267
|
const dropbarOffset = offset(this.dropbar);
|
|
6264
6268
|
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6265
6269
|
this.transitionTo(
|
|
@@ -6305,7 +6309,7 @@
|
|
|
6305
6309
|
return this.dropbar;
|
|
6306
6310
|
},
|
|
6307
6311
|
|
|
6308
|
-
handler(
|
|
6312
|
+
handler({ target }) {var _this$_observer;
|
|
6309
6313
|
if (!this.isDropbarDrop(target)) {
|
|
6310
6314
|
return;
|
|
6311
6315
|
}
|
|
@@ -6332,7 +6336,7 @@
|
|
|
6332
6336
|
|
|
6333
6337
|
el = oldHeight < newHeight && el;
|
|
6334
6338
|
|
|
6335
|
-
css(el, 'clipPath',
|
|
6339
|
+
css(el, 'clipPath', `polygon(0 0,100% 0,100% ${oldHeight}px,0 ${oldHeight}px)`);
|
|
6336
6340
|
|
|
6337
6341
|
height(dropbar, oldHeight);
|
|
6338
6342
|
|
|
@@ -6342,7 +6346,7 @@
|
|
|
6342
6346
|
Transition.start(
|
|
6343
6347
|
el,
|
|
6344
6348
|
{
|
|
6345
|
-
clipPath:
|
|
6349
|
+
clipPath: `polygon(0 0,100% 0,100% ${newHeight}px,0 ${newHeight}px)`
|
|
6346
6350
|
},
|
|
6347
6351
|
this.duration)]).
|
|
6348
6352
|
|
|
@@ -6431,7 +6435,7 @@
|
|
|
6431
6435
|
// Handle Swipe Gesture
|
|
6432
6436
|
const pos = getEventPos(e);
|
|
6433
6437
|
const target = 'tagName' in e.target ? e.target : parent(e.target);
|
|
6434
|
-
once(document, pointerUp
|
|
6438
|
+
once(document, `${pointerUp} ${pointerCancel} scroll`, (e) => {
|
|
6435
6439
|
const { x, y } = getEventPos(e);
|
|
6436
6440
|
|
|
6437
6441
|
// swipe
|
|
@@ -6441,7 +6445,7 @@
|
|
|
6441
6445
|
{
|
|
6442
6446
|
setTimeout(() => {
|
|
6443
6447
|
trigger(target, 'swipe');
|
|
6444
|
-
trigger(target,
|
|
6448
|
+
trigger(target, `swipe${swipeDirection(pos.x, pos.y, x, y)}`);
|
|
6445
6449
|
});
|
|
6446
6450
|
}
|
|
6447
6451
|
});
|
|
@@ -6488,27 +6492,27 @@
|
|
|
6488
6492
|
},
|
|
6489
6493
|
|
|
6490
6494
|
computed: {
|
|
6491
|
-
clsFlip(
|
|
6495
|
+
clsFlip({ flip, clsFlip }) {
|
|
6492
6496
|
return flip ? clsFlip : '';
|
|
6493
6497
|
},
|
|
6494
6498
|
|
|
6495
|
-
clsOverlay(
|
|
6499
|
+
clsOverlay({ overlay, clsOverlay }) {
|
|
6496
6500
|
return overlay ? clsOverlay : '';
|
|
6497
6501
|
},
|
|
6498
6502
|
|
|
6499
|
-
clsMode(
|
|
6500
|
-
return clsMode
|
|
6503
|
+
clsMode({ mode, clsMode }) {
|
|
6504
|
+
return `${clsMode}-${mode}`;
|
|
6501
6505
|
},
|
|
6502
6506
|
|
|
6503
|
-
clsSidebarAnimation(
|
|
6507
|
+
clsSidebarAnimation({ mode, clsSidebarAnimation }) {
|
|
6504
6508
|
return mode === 'none' || mode === 'reveal' ? '' : clsSidebarAnimation;
|
|
6505
6509
|
},
|
|
6506
6510
|
|
|
6507
|
-
clsContainerAnimation(
|
|
6511
|
+
clsContainerAnimation({ mode, clsContainerAnimation }) {
|
|
6508
6512
|
return mode !== 'push' && mode !== 'reveal' ? '' : clsContainerAnimation;
|
|
6509
6513
|
},
|
|
6510
6514
|
|
|
6511
|
-
transitionElement(
|
|
6515
|
+
transitionElement({ mode }) {
|
|
6512
6516
|
return mode === 'reveal' ? parent(this.panel) : this.panel;
|
|
6513
6517
|
}
|
|
6514
6518
|
},
|
|
@@ -6645,11 +6649,11 @@
|
|
|
6645
6649
|
},
|
|
6646
6650
|
|
|
6647
6651
|
computed: {
|
|
6648
|
-
container(
|
|
6652
|
+
container({ selContainer }, $el) {
|
|
6649
6653
|
return closest($el, selContainer);
|
|
6650
6654
|
},
|
|
6651
6655
|
|
|
6652
|
-
content(
|
|
6656
|
+
content({ selContent }, $el) {
|
|
6653
6657
|
return closest($el, selContent);
|
|
6654
6658
|
}
|
|
6655
6659
|
},
|
|
@@ -6672,7 +6676,7 @@
|
|
|
6672
6676
|
};
|
|
6673
6677
|
},
|
|
6674
6678
|
|
|
6675
|
-
write(
|
|
6679
|
+
write({ max }) {
|
|
6676
6680
|
css(this.$el, { minHeight: this.minHeight, maxHeight: max });
|
|
6677
6681
|
},
|
|
6678
6682
|
|
|
@@ -6812,14 +6816,14 @@
|
|
|
6812
6816
|
|
|
6813
6817
|
computed: {
|
|
6814
6818
|
elements: {
|
|
6815
|
-
get(
|
|
6819
|
+
get({ target }, $el) {
|
|
6816
6820
|
return target ? $$(target, $el) : [$el];
|
|
6817
6821
|
},
|
|
6818
6822
|
|
|
6819
6823
|
watch(elements, prev) {
|
|
6820
6824
|
if (this.hidden) {
|
|
6821
6825
|
// use `opacity:0` instead of `visibility:hidden` to make content focusable with keyboard
|
|
6822
|
-
css(filter(elements,
|
|
6826
|
+
css(filter(elements, `:not(.${this.inViewClass})`), 'opacity', 0);
|
|
6823
6827
|
}
|
|
6824
6828
|
|
|
6825
6829
|
if (!isEqual(elements, prev)) {
|
|
@@ -6959,7 +6963,7 @@
|
|
|
6959
6963
|
immediate: true
|
|
6960
6964
|
},
|
|
6961
6965
|
|
|
6962
|
-
elements(
|
|
6966
|
+
elements({ closest: selector }) {
|
|
6963
6967
|
return closest(this.links, selector || '*');
|
|
6964
6968
|
}
|
|
6965
6969
|
},
|
|
@@ -6999,7 +7003,7 @@
|
|
|
6999
7003
|
return { active };
|
|
7000
7004
|
},
|
|
7001
7005
|
|
|
7002
|
-
write(
|
|
7006
|
+
write({ active }) {
|
|
7003
7007
|
const changed = active !== false && !hasClass(this.elements[active], this.cls);
|
|
7004
7008
|
|
|
7005
7009
|
this.links.forEach((el) => el.blur());
|
|
@@ -7057,7 +7061,7 @@
|
|
|
7057
7061
|
},
|
|
7058
7062
|
|
|
7059
7063
|
computed: {
|
|
7060
|
-
selTarget(
|
|
7064
|
+
selTarget({ selTarget }, $el) {
|
|
7061
7065
|
return selTarget && $(selTarget, $el) || $el;
|
|
7062
7066
|
}
|
|
7063
7067
|
},
|
|
@@ -7084,7 +7088,7 @@
|
|
|
7084
7088
|
this.hide();
|
|
7085
7089
|
removeClass(this.selTarget, this.clsInactive);
|
|
7086
7090
|
}
|
|
7087
|
-
|
|
7091
|
+
reset(this.$el);
|
|
7088
7092
|
|
|
7089
7093
|
remove$1(this.placeholder);
|
|
7090
7094
|
this.placeholder = null;
|
|
@@ -7138,14 +7142,14 @@
|
|
|
7138
7142
|
|
|
7139
7143
|
update: [
|
|
7140
7144
|
{
|
|
7141
|
-
read(
|
|
7145
|
+
read({ height: height$1, width, margin, sticky }, types) {
|
|
7142
7146
|
this.inactive = !this.matchMedia || !isVisible(this.$el);
|
|
7143
7147
|
|
|
7144
7148
|
if (this.inactive) {
|
|
7145
|
-
return
|
|
7149
|
+
return;
|
|
7146
7150
|
}
|
|
7147
7151
|
|
|
7148
|
-
const hide = this.isFixed && types.has('resize');
|
|
7152
|
+
const hide = this.isFixed && types.has('resize') && !sticky;
|
|
7149
7153
|
if (hide) {
|
|
7150
7154
|
css(this.selTarget, 'transition', '0s');
|
|
7151
7155
|
this.hide();
|
|
@@ -7196,6 +7200,7 @@
|
|
|
7196
7200
|
|
|
7197
7201
|
|
|
7198
7202
|
sticky =
|
|
7203
|
+
maxScrollHeight &&
|
|
7199
7204
|
!this.showOnUp &&
|
|
7200
7205
|
start + offset$1 === topOffset &&
|
|
7201
7206
|
end ===
|
|
@@ -7211,6 +7216,7 @@
|
|
|
7211
7216
|
overflow,
|
|
7212
7217
|
topOffset,
|
|
7213
7218
|
height: height$1,
|
|
7219
|
+
elHeight,
|
|
7214
7220
|
width,
|
|
7215
7221
|
margin,
|
|
7216
7222
|
top: offsetPosition(referenceElement)[0],
|
|
@@ -7218,11 +7224,20 @@
|
|
|
7218
7224
|
};
|
|
7219
7225
|
},
|
|
7220
7226
|
|
|
7221
|
-
write(
|
|
7227
|
+
write({ height, width, margin, offset, sticky }) {
|
|
7228
|
+
if (this.inactive || sticky || !this.isFixed) {
|
|
7229
|
+
reset(this.$el);
|
|
7230
|
+
}
|
|
7231
|
+
|
|
7232
|
+
if (this.inactive) {
|
|
7233
|
+
return;
|
|
7234
|
+
}
|
|
7235
|
+
|
|
7222
7236
|
if (sticky) {
|
|
7223
7237
|
height = width = margin = 0;
|
|
7224
7238
|
css(this.$el, { position: 'sticky', top: offset });
|
|
7225
7239
|
}
|
|
7240
|
+
|
|
7226
7241
|
const { placeholder } = this;
|
|
7227
7242
|
|
|
7228
7243
|
css(placeholder, { height, width, margin });
|
|
@@ -7237,14 +7252,14 @@
|
|
|
7237
7252
|
},
|
|
7238
7253
|
|
|
7239
7254
|
{
|
|
7240
|
-
read(
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7255
|
+
read({
|
|
7256
|
+
scroll: prevScroll = 0,
|
|
7257
|
+
dir: prevDir = 'down',
|
|
7258
|
+
overflow,
|
|
7259
|
+
overflowScroll = 0,
|
|
7260
|
+
start,
|
|
7261
|
+
end
|
|
7262
|
+
}) {
|
|
7248
7263
|
const scroll = document.scrollingElement.scrollTop;
|
|
7249
7264
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
7250
7265
|
|
|
@@ -7335,7 +7350,7 @@
|
|
|
7335
7350
|
}
|
|
7336
7351
|
},
|
|
7337
7352
|
|
|
7338
|
-
events: ['resize', 'scroll']
|
|
7353
|
+
events: ['resize', 'resizeViewport', 'scroll']
|
|
7339
7354
|
}],
|
|
7340
7355
|
|
|
7341
7356
|
|
|
@@ -7375,6 +7390,7 @@
|
|
|
7375
7390
|
offset,
|
|
7376
7391
|
topOffset,
|
|
7377
7392
|
height,
|
|
7393
|
+
elHeight,
|
|
7378
7394
|
offsetParentTop,
|
|
7379
7395
|
sticky
|
|
7380
7396
|
} = this._data;
|
|
@@ -7388,10 +7404,7 @@
|
|
|
7388
7404
|
position = 'absolute';
|
|
7389
7405
|
}
|
|
7390
7406
|
|
|
7391
|
-
css(this.$el, {
|
|
7392
|
-
position,
|
|
7393
|
-
width
|
|
7394
|
-
});
|
|
7407
|
+
css(this.$el, { position, width });
|
|
7395
7408
|
css(this.$el, 'marginTop', 0, 'important');
|
|
7396
7409
|
}
|
|
7397
7410
|
|
|
@@ -7402,7 +7415,11 @@
|
|
|
7402
7415
|
css(this.$el, 'top', offset);
|
|
7403
7416
|
|
|
7404
7417
|
this.setActive(active);
|
|
7405
|
-
toggleClass(
|
|
7418
|
+
toggleClass(
|
|
7419
|
+
this.$el,
|
|
7420
|
+
this.clsBelow,
|
|
7421
|
+
scroll > topOffset + (sticky ? Math.min(height, elHeight) : height));
|
|
7422
|
+
|
|
7406
7423
|
addClass(this.$el, this.clsFixed);
|
|
7407
7424
|
},
|
|
7408
7425
|
|
|
@@ -7447,6 +7464,10 @@
|
|
|
7447
7464
|
return value;
|
|
7448
7465
|
}
|
|
7449
7466
|
|
|
7467
|
+
function reset(el) {
|
|
7468
|
+
css(el, { position: '', top: '', marginTop: '', width: '' });
|
|
7469
|
+
}
|
|
7470
|
+
|
|
7450
7471
|
var Switcher = {
|
|
7451
7472
|
mixins: [Lazyload, Swipe, Togglable],
|
|
7452
7473
|
|
|
@@ -7470,7 +7491,7 @@
|
|
|
7470
7491
|
|
|
7471
7492
|
computed: {
|
|
7472
7493
|
connects: {
|
|
7473
|
-
get(
|
|
7494
|
+
get({ connect }, $el) {
|
|
7474
7495
|
return queryAll(connect, $el);
|
|
7475
7496
|
},
|
|
7476
7497
|
|
|
@@ -7501,7 +7522,7 @@
|
|
|
7501
7522
|
},
|
|
7502
7523
|
|
|
7503
7524
|
toggles: {
|
|
7504
|
-
get(
|
|
7525
|
+
get({ toggle }, $el) {
|
|
7505
7526
|
return $$(toggle, $el).filter(
|
|
7506
7527
|
(el) => !matches(el, '.uk-disabled *, .uk-disabled, [disabled]'));
|
|
7507
7528
|
|
|
@@ -7548,7 +7569,7 @@
|
|
|
7548
7569
|
},
|
|
7549
7570
|
|
|
7550
7571
|
delegate() {
|
|
7551
|
-
return
|
|
7572
|
+
return `[${this.attrItem}],[data-${this.attrItem}]`;
|
|
7552
7573
|
},
|
|
7553
7574
|
|
|
7554
7575
|
handler(e) {
|
|
@@ -7568,7 +7589,7 @@
|
|
|
7568
7589
|
return this.connects;
|
|
7569
7590
|
},
|
|
7570
7591
|
|
|
7571
|
-
handler(
|
|
7592
|
+
handler({ type }) {
|
|
7572
7593
|
this.show(endsWith(type, 'Left') ? 'next' : 'previous');
|
|
7573
7594
|
}
|
|
7574
7595
|
}],
|
|
@@ -7589,7 +7610,7 @@
|
|
|
7589
7610
|
});
|
|
7590
7611
|
|
|
7591
7612
|
const animate = prev >= 0 && prev !== next;
|
|
7592
|
-
this.connects.forEach(async (
|
|
7613
|
+
this.connects.forEach(async ({ children }) => {
|
|
7593
7614
|
await this.toggleElement(
|
|
7594
7615
|
toNodes(children).filter((child) => hasClass(child, this.cls)),
|
|
7595
7616
|
false,
|
|
@@ -7651,7 +7672,7 @@
|
|
|
7651
7672
|
|
|
7652
7673
|
computed: {
|
|
7653
7674
|
target: {
|
|
7654
|
-
get(
|
|
7675
|
+
get({ href, target }, $el) {
|
|
7655
7676
|
target = queryAll(target || href, $el);
|
|
7656
7677
|
return target.length && target || [$el];
|
|
7657
7678
|
},
|
|
@@ -7706,7 +7727,7 @@
|
|
|
7706
7727
|
},
|
|
7707
7728
|
|
|
7708
7729
|
{
|
|
7709
|
-
name: pointerEnter
|
|
7730
|
+
name: `${pointerEnter} ${pointerLeave} focus blur`,
|
|
7710
7731
|
|
|
7711
7732
|
filter() {
|
|
7712
7733
|
return includes(this.mode, 'hover');
|
|
@@ -7740,7 +7761,7 @@
|
|
|
7740
7761
|
|
|
7741
7762
|
this._showState = show ? expanded : null;
|
|
7742
7763
|
|
|
7743
|
-
this.toggle(
|
|
7764
|
+
this.toggle(`toggle${show ? 'show' : 'hide'}`);
|
|
7744
7765
|
}
|
|
7745
7766
|
},
|
|
7746
7767
|
|
|
@@ -7793,7 +7814,7 @@
|
|
|
7793
7814
|
return this.target;
|
|
7794
7815
|
},
|
|
7795
7816
|
|
|
7796
|
-
handler(
|
|
7817
|
+
handler({ target, type }) {
|
|
7797
7818
|
this.updateAria(target === this.target[0] && type === 'show');
|
|
7798
7819
|
}
|
|
7799
7820
|
},
|