uikit 3.14.4-dev.871ba3c05 → 3.14.4-dev.a014fa609
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 +47 -12
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +385 -110
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +385 -110
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +402 -115
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +402 -115
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +7 -5
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +196 -140
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +196 -140
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +4 -5
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +4 -5
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +22 -7
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +4 -5
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +22 -7
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +3 -3
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +107 -137
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +1819 -1714
- package/dist/js/uikit-core.min.js +14 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +1081 -959
- package/dist/js/uikit.min.js +14 -1
- package/package.json +1 -1
- package/src/images/{backgrounds/nav-parent-open.svg → components/nav-parent-icon-large.svg} +0 -0
- package/src/images/components/nav-parent-icon.svg +3 -0
- package/src/images/components/navbar-parent-icon.svg +3 -0
- package/src/images/components/navbar-toggle-icon.svg +22 -3
- package/src/js/api/state.js +2 -2
- package/src/js/components/filter.js +5 -3
- package/src/js/components/sortable.js +2 -3
- package/src/js/core/accordion.js +9 -17
- package/src/js/core/alert.js +35 -14
- package/src/js/core/drop.js +115 -80
- package/src/js/core/height-viewport.js +14 -6
- package/src/js/core/icon.js +16 -0
- package/src/js/core/index.js +2 -0
- package/src/js/core/leader.js +2 -2
- package/src/js/core/navbar.js +44 -30
- package/src/js/core/offcanvas.js +1 -47
- package/src/js/core/scroll.js +37 -10
- package/src/js/core/sticky.js +8 -9
- package/src/js/core/toggle.js +3 -5
- package/src/js/mixin/media.js +4 -5
- package/src/js/mixin/modal.js +97 -8
- package/src/js/mixin/position.js +26 -11
- package/src/js/mixin/slider-drag.js +20 -8
- package/src/js/mixin/style.js +11 -0
- package/src/js/mixin/togglable.js +88 -133
- package/src/js/util/animation.js +4 -3
- package/src/js/util/class.js +3 -1
- package/src/js/util/dimensions.js +6 -6
- package/src/js/util/filter.js +3 -7
- package/src/js/util/position.js +108 -107
- package/src/js/util/style.js +4 -13
- package/src/js/util/viewport.js +5 -32
- package/src/less/components/_import.less +1 -0
- package/src/less/components/drop.less +1 -18
- package/src/less/components/dropbar.less +115 -0
- package/src/less/components/dropdown.less +16 -16
- package/src/less/components/leader.less +1 -1
- package/src/less/components/nav.less +240 -63
- package/src/less/components/navbar.less +81 -38
- package/src/less/components/utility.less +21 -4
- package/src/less/theme/_import.less +1 -0
- package/src/less/theme/dropbar.less +44 -0
- package/src/less/theme/dropdown.less +0 -11
- package/src/less/theme/nav.less +43 -9
- package/src/less/theme/navbar.less +7 -11
- package/src/scss/components/_import.scss +1 -0
- package/src/scss/components/drop.scss +1 -18
- package/src/scss/components/dropbar.scss +115 -0
- package/src/scss/components/dropdown.scss +16 -16
- package/src/scss/components/leader.scss +1 -1
- package/src/scss/components/nav.scss +189 -51
- package/src/scss/components/navbar.scss +69 -38
- package/src/scss/components/utility.scss +19 -3
- package/src/scss/mixins-theme.scss +93 -25
- package/src/scss/mixins.scss +89 -17
- package/src/scss/theme/_import.scss +1 -0
- package/src/scss/theme/dropbar.scss +44 -0
- package/src/scss/theme/dropdown.scss +0 -8
- package/src/scss/theme/nav.scss +41 -9
- package/src/scss/theme/navbar.scss +7 -8
- package/src/scss/variables-theme.scss +71 -18
- package/src/scss/variables.scss +60 -14
- package/tests/accordion.html +2 -2
- package/tests/alert.html +2 -2
- package/tests/countdown.html +1 -1
- package/tests/drop.html +461 -375
- package/tests/dropbar.html +458 -0
- package/tests/dropdown.html +26 -401
- package/tests/filter.html +9 -12
- package/tests/form.html +1 -1
- package/tests/index.html +126 -107
- package/tests/js/index.js +1 -4
- package/tests/lightbox.html +5 -5
- package/tests/list.html +8 -8
- package/tests/modal.html +13 -13
- package/tests/nav.html +117 -75
- package/tests/navbar.html +2002 -1131
- package/tests/offcanvas.html +17 -21
- package/tests/parallax.html +1 -1
- package/tests/position.html +18 -16
- package/tests/progress.html +9 -9
- package/tests/scroll.html +7 -10
- package/tests/search.html +6 -6
- package/tests/slider.html +6 -5
- package/tests/slideshow.html +8 -8
- package/tests/sortable.html +6 -8
- package/tests/sticky-navbar.html +9 -9
- package/tests/sticky.html +8 -8
- package/tests/switcher.html +1 -1
- package/tests/tab.html +1 -1
- package/tests/table.html +7 -7
- package/tests/toggle.html +2 -2
- package/tests/tooltip.html +1 -1
- package/tests/upload.html +11 -11
- package/tests/utility.html +19 -0
- package/src/images/backgrounds/nav-parent-close.svg +0 -3
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.a014fa609 | 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() :
|
|
@@ -383,12 +383,8 @@
|
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
function closest(element, selector) {
|
|
386
|
-
if (startsWith(selector, '>')) {
|
|
387
|
-
selector = selector.slice(1);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
386
|
return isElement(element) ?
|
|
391
|
-
element.closest(selector) :
|
|
387
|
+
element.closest(startsWith(selector, '>') ? selector.slice(1) : selector) :
|
|
392
388
|
toNodes(element).
|
|
393
389
|
map((element) => closest(element, selector)).
|
|
394
390
|
filter(Boolean);
|
|
@@ -396,8 +392,8 @@
|
|
|
396
392
|
|
|
397
393
|
function within(element, selector) {
|
|
398
394
|
return isString(selector) ?
|
|
399
|
-
|
|
400
|
-
|
|
395
|
+
!!closest(element, selector) :
|
|
396
|
+
toNode(selector).contains(toNode(element));
|
|
401
397
|
}
|
|
402
398
|
|
|
403
399
|
function parents(element, selector) {
|
|
@@ -785,18 +781,11 @@
|
|
|
785
781
|
return elements[0];
|
|
786
782
|
}
|
|
787
783
|
|
|
788
|
-
const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
|
|
789
|
-
function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
|
|
790
|
-
return css(element, "--uk-" + name).replace(propertyRe, '$2');
|
|
791
|
-
}
|
|
792
|
-
|
|
793
784
|
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
|
|
794
785
|
const propName = memoize((name) => vendorPropName(name));
|
|
795
786
|
|
|
796
|
-
const cssPrefixes = ['webkit', 'moz'];
|
|
797
|
-
|
|
798
787
|
function vendorPropName(name) {
|
|
799
|
-
if (name
|
|
788
|
+
if (startsWith(name, '--')) {
|
|
800
789
|
return name;
|
|
801
790
|
}
|
|
802
791
|
|
|
@@ -808,11 +797,8 @@
|
|
|
808
797
|
return name;
|
|
809
798
|
}
|
|
810
799
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
while (i--) {
|
|
815
|
-
prefixedName = "-" + cssPrefixes[i] + "-" + name;
|
|
800
|
+
for (const prefix of ['webkit', 'moz']) {
|
|
801
|
+
const prefixedName = "-" + prefix + "-" + name;
|
|
816
802
|
if (prefixedName in style) {
|
|
817
803
|
return prefixedName;
|
|
818
804
|
}
|
|
@@ -828,7 +814,9 @@
|
|
|
828
814
|
}
|
|
829
815
|
|
|
830
816
|
function removeClasses(element, cls) {
|
|
831
|
-
attr(element, 'class', (value) =>
|
|
817
|
+
attr(element, 'class', (value) =>
|
|
818
|
+
(value || '').replace(new RegExp("\\b" + cls + "\\b\\s?", 'g'), ''));
|
|
819
|
+
|
|
832
820
|
}
|
|
833
821
|
|
|
834
822
|
function replaceClass(element) {
|
|
@@ -913,13 +901,14 @@
|
|
|
913
901
|
const Transition = {
|
|
914
902
|
start: transition,
|
|
915
903
|
|
|
916
|
-
stop(element) {
|
|
904
|
+
async stop(element) {
|
|
917
905
|
trigger(element, 'transitionend');
|
|
918
|
-
|
|
906
|
+
await Promise.resolve();
|
|
919
907
|
},
|
|
920
908
|
|
|
921
|
-
cancel(element) {
|
|
909
|
+
async cancel(element) {
|
|
922
910
|
trigger(element, 'transitioncanceled');
|
|
911
|
+
await Promise.resolve();
|
|
923
912
|
},
|
|
924
913
|
|
|
925
914
|
inProgress(element) {
|
|
@@ -929,7 +918,7 @@
|
|
|
929
918
|
|
|
930
919
|
const animationPrefix = 'uk-animation-';
|
|
931
920
|
|
|
932
|
-
function animate$
|
|
921
|
+
function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
|
|
933
922
|
return Promise.all(
|
|
934
923
|
toNodes(element).map(
|
|
935
924
|
(element) =>
|
|
@@ -965,10 +954,10 @@
|
|
|
965
954
|
|
|
966
955
|
const inProgress = new RegExp(animationPrefix + "(enter|leave)");
|
|
967
956
|
const Animation = {
|
|
968
|
-
in: animate$
|
|
957
|
+
in: animate$2,
|
|
969
958
|
|
|
970
959
|
out(element, animation, duration, origin) {
|
|
971
|
-
return animate$
|
|
960
|
+
return animate$2(element, animation, duration, origin, true);
|
|
972
961
|
},
|
|
973
962
|
|
|
974
963
|
inProgress(element) {
|
|
@@ -1060,13 +1049,13 @@
|
|
|
1060
1049
|
}
|
|
1061
1050
|
|
|
1062
1051
|
function offsetPosition(element) {
|
|
1063
|
-
const offset = [0, 0];
|
|
1064
|
-
|
|
1065
1052
|
element = toNode(element);
|
|
1066
1053
|
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1054
|
+
const offset = [element.offsetTop, element.offsetLeft];
|
|
1055
|
+
|
|
1056
|
+
while (element = element.offsetParent) {
|
|
1057
|
+
offset[0] += element.offsetTop + toFloat(css(element, "borderTopWidth"));
|
|
1058
|
+
offset[1] += element.offsetLeft + toFloat(css(element, "borderLeftWidth"));
|
|
1070
1059
|
|
|
1071
1060
|
if (css(element, 'position') === 'fixed') {
|
|
1072
1061
|
const win = toWindow(element);
|
|
@@ -1074,7 +1063,7 @@
|
|
|
1074
1063
|
offset[1] += win.scrollX;
|
|
1075
1064
|
return offset;
|
|
1076
1065
|
}
|
|
1077
|
-
}
|
|
1066
|
+
}
|
|
1078
1067
|
|
|
1079
1068
|
return offset;
|
|
1080
1069
|
}
|
|
@@ -1293,9 +1282,9 @@
|
|
|
1293
1282
|
const hasTouch = inBrowser && 'ontouchstart' in window;
|
|
1294
1283
|
const hasPointerEvents = inBrowser && window.PointerEvent;
|
|
1295
1284
|
|
|
1296
|
-
const pointerDown = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
|
|
1297
|
-
const pointerMove = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
|
|
1298
|
-
const pointerUp = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
|
|
1285
|
+
const pointerDown$1 = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
|
|
1286
|
+
const pointerMove$1 = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
|
|
1287
|
+
const pointerUp$1 = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
|
|
1299
1288
|
const pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouch ? '' : 'mouseenter';
|
|
1300
1289
|
const pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouch ? '' : 'mouseleave';
|
|
1301
1290
|
const pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';
|
|
@@ -1795,20 +1784,6 @@
|
|
|
1795
1784
|
|
|
1796
1785
|
}
|
|
1797
1786
|
|
|
1798
|
-
function scrollTop(element, top) {
|
|
1799
|
-
if (isWindow(element) || isDocument(element)) {
|
|
1800
|
-
element = scrollingElement(element);
|
|
1801
|
-
} else {
|
|
1802
|
-
element = toNode(element);
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
if (isUndefined(top)) {
|
|
1806
|
-
return element.scrollTop;
|
|
1807
|
-
} else {
|
|
1808
|
-
element.scrollTop = top;
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
1787
|
function scrollIntoView(element, _temp) {let { offset: offsetBy = 0 } = _temp === void 0 ? {} : _temp;
|
|
1813
1788
|
const parents = isVisible(element) ? scrollParents(element) : [];
|
|
1814
1789
|
return parents.reduce(
|
|
@@ -1850,7 +1825,7 @@
|
|
|
1850
1825
|
(function step() {
|
|
1851
1826
|
const percent = ease(clamp((Date.now() - start) / duration));
|
|
1852
1827
|
|
|
1853
|
-
scrollTop
|
|
1828
|
+
element.scrollTop = scroll + top * percent;
|
|
1854
1829
|
|
|
1855
1830
|
// scroll more if we have not reached our destination
|
|
1856
1831
|
if (percent === 1) {
|
|
@@ -1913,12 +1888,10 @@
|
|
|
1913
1888
|
function offsetViewport(scrollElement) {
|
|
1914
1889
|
const window = toWindow(scrollElement);
|
|
1915
1890
|
const {
|
|
1916
|
-
document: {
|
|
1891
|
+
document: { documentElement } } =
|
|
1917
1892
|
window;
|
|
1918
1893
|
let viewportElement =
|
|
1919
|
-
scrollElement === scrollingElement(scrollElement)
|
|
1920
|
-
window :
|
|
1921
|
-
scrollElement;
|
|
1894
|
+
scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1922
1895
|
|
|
1923
1896
|
const { visualViewport } = window;
|
|
1924
1897
|
if (isWindow(viewportElement) && visualViewport) {
|
|
@@ -1937,7 +1910,7 @@
|
|
|
1937
1910
|
// iOS 12 returns <body> as scrollingElement
|
|
1938
1911
|
viewportElement = documentElement;
|
|
1939
1912
|
} else {
|
|
1940
|
-
rect[start] += toFloat(css(viewportElement, "border" +
|
|
1913
|
+
rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
|
|
1941
1914
|
}
|
|
1942
1915
|
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1943
1916
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -1962,126 +1935,65 @@
|
|
|
1962
1935
|
...options.attach },
|
|
1963
1936
|
|
|
1964
1937
|
offset: [0, 0],
|
|
1938
|
+
placement: [],
|
|
1965
1939
|
...options };
|
|
1966
1940
|
|
|
1967
1941
|
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
attachTo(element, target, options);
|
|
1971
|
-
|
|
1972
|
-
offset(element, dim);
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
function attachTo(element, target, options) {
|
|
1976
|
-
let { attach, offset: offsetBy } = {
|
|
1977
|
-
attach: {
|
|
1978
|
-
element: ['left', 'top'],
|
|
1979
|
-
target: ['left', 'top'],
|
|
1980
|
-
...options.attach },
|
|
1981
|
-
|
|
1982
|
-
offset: [0, 0],
|
|
1983
|
-
...options };
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
const position = offset(element);
|
|
1987
|
-
const targetOffset = offset(target);
|
|
1988
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1989
|
-
position[start] = position[dir] =
|
|
1990
|
-
targetOffset[start] +
|
|
1991
|
-
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
1992
|
-
moveBy(attach.element[i], end, position[prop]) +
|
|
1993
|
-
+offsetBy[i];
|
|
1994
|
-
position[end] = position[start] + position[prop];
|
|
1942
|
+
if (!isArray(target)) {
|
|
1943
|
+
target = [target, target];
|
|
1995
1944
|
}
|
|
1996
|
-
return position;
|
|
1997
|
-
}
|
|
1998
1945
|
|
|
1999
|
-
|
|
2000
|
-
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
1946
|
+
offset(element, getPosition(element, target, options));
|
|
2001
1947
|
}
|
|
2002
1948
|
|
|
2003
|
-
function
|
|
1949
|
+
function getPosition(element, target, options) {
|
|
2004
1950
|
const position = attachTo(element, target, options);
|
|
2005
|
-
const targetDim = offset(target);
|
|
2006
1951
|
|
|
2007
1952
|
let {
|
|
2008
|
-
flip,
|
|
2009
1953
|
attach: { element: elAttach, target: targetAttach },
|
|
2010
1954
|
offset: elOffset,
|
|
2011
1955
|
boundary,
|
|
2012
|
-
|
|
2013
|
-
|
|
1956
|
+
viewportOffset,
|
|
1957
|
+
placement } =
|
|
2014
1958
|
options;
|
|
2015
1959
|
|
|
2016
|
-
let
|
|
2017
|
-
|
|
2018
|
-
viewports =
|
|
2019
|
-
|
|
2020
|
-
const [scrollElement] = viewports;
|
|
2021
|
-
viewports.push(viewport);
|
|
2022
|
-
|
|
2023
|
-
const offsetPosition = { ...position };
|
|
2024
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2025
|
-
if (flip !== true && !includes(flip, dir)) {
|
|
2026
|
-
continue;
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
const willFlip =
|
|
2030
|
-
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
1960
|
+
let offsetPosition = position;
|
|
1961
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
1962
|
+
let viewports = scrollParents(target[i]);
|
|
1963
|
+
const [scrollElement] = viewports;
|
|
2031
1964
|
|
|
2032
|
-
viewport = getIntersectionArea(...viewports.
|
|
1965
|
+
let viewport = getIntersectionArea(...viewports.map(offsetViewport));
|
|
2033
1966
|
|
|
2034
1967
|
if (viewportOffset) {
|
|
2035
1968
|
viewport[start] += viewportOffset;
|
|
2036
1969
|
viewport[end] -= viewportOffset;
|
|
2037
1970
|
}
|
|
2038
1971
|
|
|
2039
|
-
if (boundary
|
|
2040
|
-
viewport = getIntersectionArea(viewport,
|
|
1972
|
+
if (boundary) {
|
|
1973
|
+
viewport = getIntersectionArea(viewport, offsetViewport(boundary));
|
|
2041
1974
|
}
|
|
2042
1975
|
|
|
2043
|
-
const
|
|
2044
|
-
const
|
|
1976
|
+
const isInStartViewport = position[start] >= viewport[start];
|
|
1977
|
+
const isInEndViewport = position[end] <= viewport[end];
|
|
2045
1978
|
|
|
2046
|
-
if (
|
|
1979
|
+
if (isInStartViewport && isInEndViewport) {
|
|
2047
1980
|
continue;
|
|
2048
1981
|
}
|
|
2049
1982
|
|
|
2050
|
-
let offsetBy;
|
|
1983
|
+
let offsetBy = 0;
|
|
2051
1984
|
|
|
2052
1985
|
// Flip
|
|
2053
|
-
if (
|
|
1986
|
+
if (placement[i] === 'flip') {
|
|
2054
1987
|
if (
|
|
2055
|
-
|
|
2056
|
-
|
|
1988
|
+
targetAttach[i] === end && isInEndViewport ||
|
|
1989
|
+
targetAttach[i] === start && isInStartViewport)
|
|
2057
1990
|
{
|
|
2058
1991
|
continue;
|
|
2059
1992
|
}
|
|
2060
1993
|
|
|
2061
|
-
offsetBy =
|
|
2062
|
-
(elAttach[i] === start ?
|
|
2063
|
-
-position[prop] :
|
|
2064
|
-
elAttach[i] === end ?
|
|
2065
|
-
position[prop] :
|
|
2066
|
-
0) + (
|
|
2067
|
-
targetAttach[i] === start ?
|
|
2068
|
-
targetDim[prop] :
|
|
2069
|
-
targetAttach[i] === end ?
|
|
2070
|
-
-targetDim[prop] :
|
|
2071
|
-
0) -
|
|
2072
|
-
elOffset[i] * 2;
|
|
2073
|
-
|
|
2074
|
-
if (
|
|
2075
|
-
!isInScrollArea(
|
|
2076
|
-
{
|
|
2077
|
-
...position,
|
|
2078
|
-
[start]: position[start] + offsetBy,
|
|
2079
|
-
[end]: position[end] + offsetBy },
|
|
1994
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2080
1995
|
|
|
2081
|
-
scrollElement,
|
|
2082
|
-
i))
|
|
2083
|
-
|
|
2084
|
-
{
|
|
1996
|
+
if (!isInScrollArea(applyOffset(position, offsetBy, i), scrollElement, i)) {
|
|
2085
1997
|
if (isInScrollArea(position, scrollElement, i)) {
|
|
2086
1998
|
continue;
|
|
2087
1999
|
}
|
|
@@ -2090,26 +2002,27 @@
|
|
|
2090
2002
|
return false;
|
|
2091
2003
|
}
|
|
2092
2004
|
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2005
|
+
const newPos = getPosition(element, target, {
|
|
2006
|
+
...options,
|
|
2007
|
+
attach: {
|
|
2008
|
+
element: elAttach.map(flipAxis).reverse(),
|
|
2009
|
+
target: targetAttach.map(flipAxis).reverse() },
|
|
2099
2010
|
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2011
|
+
offset: elOffset.reverse(),
|
|
2012
|
+
placement: placement.reverse(),
|
|
2013
|
+
recursion: true });
|
|
2103
2014
|
|
|
2104
2015
|
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
}
|
|
2016
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2017
|
+
return newPos;
|
|
2108
2018
|
}
|
|
2019
|
+
|
|
2020
|
+
continue;
|
|
2109
2021
|
}
|
|
2110
2022
|
|
|
2111
|
-
//
|
|
2112
|
-
} else {
|
|
2023
|
+
// Shift
|
|
2024
|
+
} else if (placement[i] === 'shift') {
|
|
2025
|
+
const targetDim = offset(target[i]);
|
|
2113
2026
|
offsetBy =
|
|
2114
2027
|
clamp(
|
|
2115
2028
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2118,13 +2031,54 @@
|
|
|
2118
2031
|
position[start];
|
|
2119
2032
|
}
|
|
2120
2033
|
|
|
2121
|
-
offsetPosition
|
|
2122
|
-
offsetPosition[end] += offsetBy;
|
|
2034
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2123
2035
|
}
|
|
2124
2036
|
|
|
2125
2037
|
return offsetPosition;
|
|
2126
2038
|
}
|
|
2127
2039
|
|
|
2040
|
+
function attachTo(element, target, options) {
|
|
2041
|
+
let { attach, offset: offsetBy } = {
|
|
2042
|
+
attach: {
|
|
2043
|
+
element: ['left', 'top'],
|
|
2044
|
+
target: ['left', 'top'],
|
|
2045
|
+
...options.attach },
|
|
2046
|
+
|
|
2047
|
+
offset: [0, 0],
|
|
2048
|
+
...options };
|
|
2049
|
+
|
|
2050
|
+
|
|
2051
|
+
let elOffset = offset(element);
|
|
2052
|
+
|
|
2053
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
2054
|
+
const targetOffset =
|
|
2055
|
+
attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
|
|
2056
|
+
|
|
2057
|
+
elOffset = applyOffset(
|
|
2058
|
+
elOffset,
|
|
2059
|
+
targetOffset[start] -
|
|
2060
|
+
elOffset[start] +
|
|
2061
|
+
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
2062
|
+
moveBy(attach.element[i], end, elOffset[prop]) +
|
|
2063
|
+
+offsetBy[i],
|
|
2064
|
+
i);
|
|
2065
|
+
|
|
2066
|
+
}
|
|
2067
|
+
return elOffset;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
function applyOffset(position, offset, i) {
|
|
2071
|
+
const [, dir, start, end] = dirs[i];
|
|
2072
|
+
const newPos = { ...position };
|
|
2073
|
+
newPos[start] = position[dir] = position[start] + offset;
|
|
2074
|
+
newPos[end] += offset;
|
|
2075
|
+
return newPos;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
function moveBy(attach, end, dim) {
|
|
2079
|
+
return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2128
2082
|
function getIntersectionArea() {
|
|
2129
2083
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2130
2084
|
for (const rect of rects) {
|
|
@@ -2145,12 +2099,32 @@
|
|
|
2145
2099
|
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2146
2100
|
}
|
|
2147
2101
|
|
|
2148
|
-
function
|
|
2149
|
-
|
|
2150
|
-
|
|
2102
|
+
function flip(element, target, _ref, i) {let { offset, attach } = _ref;
|
|
2103
|
+
return attachTo(element, target, {
|
|
2104
|
+
attach: {
|
|
2105
|
+
element: flipAttach(attach.element, i),
|
|
2106
|
+
target: flipAttach(attach.target, i) },
|
|
2107
|
+
|
|
2108
|
+
offset: flipOffset(offset, i) });
|
|
2109
|
+
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
function flipAttach(attach, i) {
|
|
2113
|
+
const newAttach = [...attach];
|
|
2114
|
+
const index = dirs[i].indexOf(attach[i]);
|
|
2115
|
+
if (~index) {
|
|
2116
|
+
newAttach[i] = dirs[i][1 - index % 2 + 2];
|
|
2117
|
+
}
|
|
2118
|
+
return newAttach;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
function flipOffset(offset, i) {
|
|
2122
|
+
offset = [...offset];
|
|
2123
|
+
offset[i] *= -1;
|
|
2124
|
+
return offset;
|
|
2151
2125
|
}
|
|
2152
2126
|
|
|
2153
|
-
function
|
|
2127
|
+
function flipAxis(prop) {
|
|
2154
2128
|
for (let i = 0; i < dirs.length; i++) {
|
|
2155
2129
|
const index = dirs[i].indexOf(prop);
|
|
2156
2130
|
if (~index) {
|
|
@@ -2165,7 +2139,7 @@
|
|
|
2165
2139
|
getImage: getImage,
|
|
2166
2140
|
transition: transition,
|
|
2167
2141
|
Transition: Transition,
|
|
2168
|
-
animate: animate$
|
|
2142
|
+
animate: animate$2,
|
|
2169
2143
|
Animation: Animation,
|
|
2170
2144
|
attr: attr,
|
|
2171
2145
|
hasAttr: hasAttr,
|
|
@@ -2205,9 +2179,9 @@
|
|
|
2205
2179
|
inBrowser: inBrowser,
|
|
2206
2180
|
isRtl: isRtl,
|
|
2207
2181
|
hasTouch: hasTouch,
|
|
2208
|
-
pointerDown: pointerDown,
|
|
2209
|
-
pointerMove: pointerMove,
|
|
2210
|
-
pointerUp: pointerUp,
|
|
2182
|
+
pointerDown: pointerDown$1,
|
|
2183
|
+
pointerMove: pointerMove$1,
|
|
2184
|
+
pointerUp: pointerUp$1,
|
|
2211
2185
|
pointerEnter: pointerEnter,
|
|
2212
2186
|
pointerLeave: pointerLeave,
|
|
2213
2187
|
pointerCancel: pointerCancel,
|
|
@@ -2295,10 +2269,8 @@
|
|
|
2295
2269
|
findAll: findAll,
|
|
2296
2270
|
escape: escape,
|
|
2297
2271
|
css: css,
|
|
2298
|
-
getCssVar: getCssVar,
|
|
2299
2272
|
propName: propName,
|
|
2300
2273
|
isInView: isInView,
|
|
2301
|
-
scrollTop: scrollTop,
|
|
2302
2274
|
scrollIntoView: scrollIntoView,
|
|
2303
2275
|
scrolledOver: scrolledOver,
|
|
2304
2276
|
scrollParents: scrollParents,
|
|
@@ -2621,7 +2593,7 @@
|
|
|
2621
2593
|
|
|
2622
2594
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2623
2595
|
|
|
2624
|
-
if (prop === 'target' &&
|
|
2596
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2625
2597
|
continue;
|
|
2626
2598
|
}
|
|
2627
2599
|
|
|
@@ -2632,7 +2604,7 @@
|
|
|
2632
2604
|
|
|
2633
2605
|
for (const key in options) {
|
|
2634
2606
|
const prop = camelize(key);
|
|
2635
|
-
if (props[prop]
|
|
2607
|
+
if (!isUndefined(props[prop])) {
|
|
2636
2608
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2637
2609
|
}
|
|
2638
2610
|
}
|
|
@@ -2961,7 +2933,7 @@
|
|
|
2961
2933
|
UIkit.data = '__uikit__';
|
|
2962
2934
|
UIkit.prefix = 'uk-';
|
|
2963
2935
|
UIkit.options = {};
|
|
2964
|
-
UIkit.version = '3.14.4-dev.
|
|
2936
|
+
UIkit.version = '3.14.4-dev.a014fa609';
|
|
2965
2937
|
|
|
2966
2938
|
globalAPI(UIkit);
|
|
2967
2939
|
hooksAPI(UIkit);
|
|
@@ -3066,27 +3038,7 @@
|
|
|
3066
3038
|
origin: false,
|
|
3067
3039
|
transition: 'ease',
|
|
3068
3040
|
clsEnter: 'uk-togglabe-enter',
|
|
3069
|
-
clsLeave: 'uk-togglabe-leave',
|
|
3070
|
-
|
|
3071
|
-
initProps: {
|
|
3072
|
-
overflow: '',
|
|
3073
|
-
maxHeight: '',
|
|
3074
|
-
paddingTop: '',
|
|
3075
|
-
paddingBottom: '',
|
|
3076
|
-
marginTop: '',
|
|
3077
|
-
marginBottom: '',
|
|
3078
|
-
boxShadow: '' },
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
hideProps: {
|
|
3082
|
-
overflow: 'hidden',
|
|
3083
|
-
maxHeight: 0,
|
|
3084
|
-
paddingTop: 0,
|
|
3085
|
-
paddingBottom: 0,
|
|
3086
|
-
marginTop: 0,
|
|
3087
|
-
marginBottom: 0,
|
|
3088
|
-
boxShadow: 'none' } },
|
|
3089
|
-
|
|
3041
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3090
3042
|
|
|
3091
3043
|
|
|
3092
3044
|
computed: {
|
|
@@ -3095,7 +3047,7 @@
|
|
|
3095
3047
|
},
|
|
3096
3048
|
|
|
3097
3049
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3098
|
-
return startsWith(animation[0],
|
|
3050
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3099
3051
|
} },
|
|
3100
3052
|
|
|
3101
3053
|
|
|
@@ -3188,130 +3140,105 @@
|
|
|
3188
3140
|
};
|
|
3189
3141
|
}
|
|
3190
3142
|
|
|
3191
|
-
function toggleTransition(cmp) {
|
|
3192
|
-
|
|
3193
|
-
case 'slide-left':
|
|
3194
|
-
return slideHorizontal(cmp);
|
|
3195
|
-
case 'slide-right':
|
|
3196
|
-
return slideHorizontal(cmp, true);}
|
|
3197
|
-
|
|
3198
|
-
return slide$1(cmp);
|
|
3199
|
-
}
|
|
3200
|
-
|
|
3201
|
-
function slide$1(_ref4)
|
|
3202
|
-
|
|
3203
|
-
|
|
3143
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3144
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3204
3145
|
|
|
3146
|
+
const dirs = [
|
|
3147
|
+
['left', 'right'],
|
|
3148
|
+
['top', 'bottom']];
|
|
3205
3149
|
|
|
3150
|
+
const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
|
|
3151
|
+
const end = dir[1] === startProp;
|
|
3152
|
+
const props = ['width', 'height'];
|
|
3153
|
+
const dimProp = props[dirs.indexOf(dir)];
|
|
3154
|
+
const marginProp = "margin-" + dir[0];
|
|
3155
|
+
const marginStartProp = "margin-" + startProp;
|
|
3206
3156
|
|
|
3157
|
+
return async (el, show) => {
|
|
3158
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3207
3159
|
|
|
3160
|
+
let currentDim = dimensions$1(el)[dimProp];
|
|
3208
3161
|
|
|
3209
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3210
|
-
return (el, show) => {
|
|
3211
3162
|
const inProgress = Transition.inProgress(el);
|
|
3212
|
-
|
|
3213
|
-
!inProgress && el.hasChildNodes() ?
|
|
3214
|
-
toFloat(css(el.firstElementChild, 'marginTop')) +
|
|
3215
|
-
toFloat(css(el.lastElementChild, 'marginBottom')) :
|
|
3216
|
-
0;
|
|
3217
|
-
const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
|
|
3218
|
-
|
|
3219
|
-
const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
|
|
3220
|
-
|
|
3221
|
-
Transition.cancel(el);
|
|
3163
|
+
await Transition.cancel(el);
|
|
3222
3164
|
|
|
3223
|
-
if (
|
|
3165
|
+
if (show) {
|
|
3224
3166
|
_toggle(el, true);
|
|
3225
3167
|
}
|
|
3226
3168
|
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
el
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
css(scrollElement, 'overflowX', 'hidden');
|
|
3264
|
-
|
|
3265
|
-
if (!isToggled(el)) {
|
|
3266
|
-
_toggle(el, true);
|
|
3267
|
-
}
|
|
3169
|
+
const prevProps = Object.fromEntries(
|
|
3170
|
+
[
|
|
3171
|
+
'padding',
|
|
3172
|
+
'border',
|
|
3173
|
+
'width',
|
|
3174
|
+
'height',
|
|
3175
|
+
'overflowY',
|
|
3176
|
+
'overflowX',
|
|
3177
|
+
marginProp,
|
|
3178
|
+
marginStartProp].
|
|
3179
|
+
map((key) => [key, el.style[key]]));
|
|
3180
|
+
|
|
3181
|
+
|
|
3182
|
+
const dim = dimensions$1(el);
|
|
3183
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3184
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3185
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3186
|
+
|
|
3187
|
+
if (!inProgress && !show) {
|
|
3188
|
+
currentDim += marginStart;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3192
|
+
css(wrapper, {
|
|
3193
|
+
boxSizing: 'border-box',
|
|
3194
|
+
height: dim.height,
|
|
3195
|
+
width: dim.width,
|
|
3196
|
+
...css(el, [
|
|
3197
|
+
'overflow',
|
|
3198
|
+
'padding',
|
|
3199
|
+
'borderTop',
|
|
3200
|
+
'borderRight',
|
|
3201
|
+
'borderBottom',
|
|
3202
|
+
'borderLeft',
|
|
3203
|
+
'borderImage',
|
|
3204
|
+
marginStartProp]) });
|
|
3268
3205
|
|
|
3269
|
-
const width = toFloat(css(el, 'width'));
|
|
3270
|
-
duration = velocity * width + duration;
|
|
3271
3206
|
|
|
3272
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3273
|
-
const offsetEl = offset(el);
|
|
3274
|
-
const useClipPath = right ?
|
|
3275
|
-
offsetEl.right < scrollElement.clientWidth :
|
|
3276
|
-
Math.round(offsetEl.left) > 0;
|
|
3277
3207
|
|
|
3278
3208
|
css(el, {
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3209
|
+
padding: 0,
|
|
3210
|
+
border: 0,
|
|
3211
|
+
[marginStartProp]: 0,
|
|
3212
|
+
width: dim.width,
|
|
3213
|
+
height: dim.height,
|
|
3214
|
+
overflow: 'hidden',
|
|
3215
|
+
[dimProp]: currentDim });
|
|
3286
3216
|
|
|
3287
|
-
return (
|
|
3288
|
-
show ?
|
|
3289
|
-
Transition.start(
|
|
3290
|
-
el,
|
|
3291
|
-
{
|
|
3292
|
-
clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
|
|
3293
|
-
marginLeft: 0 },
|
|
3294
3217
|
|
|
3295
|
-
|
|
3296
|
-
|
|
3218
|
+
const percent = currentDim / endDim;
|
|
3219
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3220
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3297
3221
|
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
3222
|
+
if (end) {
|
|
3223
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3224
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3225
|
+
}
|
|
3303
3226
|
|
|
3227
|
+
if (!end ^ mode === 'reveal') {
|
|
3228
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3229
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3230
|
+
}
|
|
3304
3231
|
|
|
3305
|
-
|
|
3306
|
-
|
|
3232
|
+
try {
|
|
3233
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3234
|
+
} finally {
|
|
3235
|
+
css(el, prevProps);
|
|
3236
|
+
unwrap(wrapper.firstChild);
|
|
3307
3237
|
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
css(scrollElement, 'overflowX', '');
|
|
3313
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3314
|
-
});
|
|
3238
|
+
if (!show) {
|
|
3239
|
+
_toggle(el, false);
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3315
3242
|
};
|
|
3316
3243
|
}
|
|
3317
3244
|
|
|
@@ -3336,6 +3263,7 @@
|
|
|
3336
3263
|
mixins: [Class, Lazyload, Togglable],
|
|
3337
3264
|
|
|
3338
3265
|
props: {
|
|
3266
|
+
animation: Boolean,
|
|
3339
3267
|
targets: String,
|
|
3340
3268
|
active: null,
|
|
3341
3269
|
collapsible: Boolean,
|
|
@@ -3348,7 +3276,7 @@
|
|
|
3348
3276
|
data: {
|
|
3349
3277
|
targets: '> *',
|
|
3350
3278
|
active: false,
|
|
3351
|
-
animation:
|
|
3279
|
+
animation: true,
|
|
3352
3280
|
collapsible: true,
|
|
3353
3281
|
multiple: false,
|
|
3354
3282
|
clsOpen: 'uk-open',
|
|
@@ -3394,7 +3322,7 @@
|
|
|
3394
3322
|
hide(
|
|
3395
3323
|
el,
|
|
3396
3324
|
!hasClass(
|
|
3397
|
-
this.items.find((item) =>
|
|
3325
|
+
this.items.find((item) => within(el, item)),
|
|
3398
3326
|
this.clsOpen));
|
|
3399
3327
|
|
|
3400
3328
|
|
|
@@ -3446,23 +3374,15 @@
|
|
|
3446
3374
|
toggleClass(el, this.clsOpen, show);
|
|
3447
3375
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3448
3376
|
|
|
3449
|
-
const content = $(
|
|
3377
|
+
const content = $(this.content, el);
|
|
3450
3378
|
|
|
3451
|
-
if (animate === false || !this.
|
|
3379
|
+
if (animate === false || !this.animation) {
|
|
3380
|
+
content.hidden = !show;
|
|
3452
3381
|
hide(content, !show);
|
|
3453
3382
|
return;
|
|
3454
3383
|
}
|
|
3455
3384
|
|
|
3456
|
-
|
|
3457
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3458
|
-
}
|
|
3459
|
-
|
|
3460
|
-
hide(content, false);
|
|
3461
|
-
await slide$1(this)(el._wrapper, show);
|
|
3462
|
-
hide(content, !show);
|
|
3463
|
-
|
|
3464
|
-
delete el._wrapper;
|
|
3465
|
-
unwrap(content);
|
|
3385
|
+
await toggleTransition(this)(content, show);
|
|
3466
3386
|
|
|
3467
3387
|
if (show) {
|
|
3468
3388
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3488,18 +3408,17 @@
|
|
|
3488
3408
|
args: 'animation',
|
|
3489
3409
|
|
|
3490
3410
|
props: {
|
|
3411
|
+
animation: Boolean,
|
|
3491
3412
|
close: String },
|
|
3492
3413
|
|
|
3493
3414
|
|
|
3494
3415
|
data: {
|
|
3495
|
-
animation:
|
|
3416
|
+
animation: true,
|
|
3496
3417
|
selClose: '.uk-alert-close',
|
|
3497
|
-
duration: 150,
|
|
3498
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3418
|
+
duration: 150 },
|
|
3499
3419
|
|
|
3500
3420
|
|
|
3501
|
-
events:
|
|
3502
|
-
{
|
|
3421
|
+
events: {
|
|
3503
3422
|
name: 'click',
|
|
3504
3423
|
|
|
3505
3424
|
delegate() {
|
|
@@ -3509,16 +3428,39 @@
|
|
|
3509
3428
|
handler(e) {
|
|
3510
3429
|
e.preventDefault();
|
|
3511
3430
|
this.close();
|
|
3512
|
-
} }
|
|
3513
|
-
|
|
3431
|
+
} },
|
|
3514
3432
|
|
|
3515
3433
|
|
|
3516
3434
|
methods: {
|
|
3517
3435
|
async close() {
|
|
3518
|
-
await this.toggleElement(this.$el);
|
|
3436
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3519
3437
|
this.$destroy(true);
|
|
3520
3438
|
} } };
|
|
3521
3439
|
|
|
3440
|
+
|
|
3441
|
+
|
|
3442
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3443
|
+
return (el) => {
|
|
3444
|
+
const height = toFloat(css(el, 'height'));
|
|
3445
|
+
css(el, 'height', height);
|
|
3446
|
+
return Transition.start(
|
|
3447
|
+
el,
|
|
3448
|
+
{
|
|
3449
|
+
height: 0,
|
|
3450
|
+
marginTop: 0,
|
|
3451
|
+
marginBottom: 0,
|
|
3452
|
+
paddingTop: 0,
|
|
3453
|
+
paddingBottom: 0,
|
|
3454
|
+
borderTop: 0,
|
|
3455
|
+
borderBottom: 0,
|
|
3456
|
+
opacity: 0 },
|
|
3457
|
+
|
|
3458
|
+
velocity * height + duration,
|
|
3459
|
+
transition);
|
|
3460
|
+
|
|
3461
|
+
};
|
|
3462
|
+
}
|
|
3463
|
+
|
|
3522
3464
|
var Video = {
|
|
3523
3465
|
args: 'autoplay',
|
|
3524
3466
|
|
|
@@ -3667,13 +3609,17 @@
|
|
|
3667
3609
|
props: {
|
|
3668
3610
|
pos: String,
|
|
3669
3611
|
offset: null,
|
|
3670
|
-
flip: Boolean
|
|
3612
|
+
flip: Boolean,
|
|
3613
|
+
shift: Boolean,
|
|
3614
|
+
inset: Boolean },
|
|
3671
3615
|
|
|
3672
3616
|
|
|
3673
3617
|
data: {
|
|
3674
3618
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3619
|
+
offset: false,
|
|
3675
3620
|
flip: true,
|
|
3676
|
-
|
|
3621
|
+
shift: true,
|
|
3622
|
+
inset: false },
|
|
3677
3623
|
|
|
3678
3624
|
|
|
3679
3625
|
connected() {
|
|
@@ -3685,19 +3631,24 @@
|
|
|
3685
3631
|
methods: {
|
|
3686
3632
|
positionAt(element, target, boundary) {
|
|
3687
3633
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3634
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3688
3635
|
|
|
3689
3636
|
const attach = {
|
|
3690
|
-
element: [flipPosition(this.dir), this.align],
|
|
3637
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3691
3638
|
target: [this.dir, this.align] };
|
|
3692
3639
|
|
|
3693
3640
|
|
|
3694
3641
|
if (this.axis === 'y') {
|
|
3695
3642
|
for (const prop in attach) {
|
|
3696
|
-
attach[prop]
|
|
3643
|
+
attach[prop].reverse();
|
|
3697
3644
|
}
|
|
3698
|
-
offset
|
|
3645
|
+
offset.reverse();
|
|
3646
|
+
placement.reverse();
|
|
3699
3647
|
}
|
|
3700
3648
|
|
|
3649
|
+
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
3650
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
3651
|
+
|
|
3701
3652
|
// Ensure none positioned element does not generate scrollbars
|
|
3702
3653
|
const elDim = dimensions$1(element);
|
|
3703
3654
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
@@ -3706,93 +3657,88 @@
|
|
|
3706
3657
|
attach,
|
|
3707
3658
|
offset,
|
|
3708
3659
|
boundary,
|
|
3709
|
-
|
|
3660
|
+
placement,
|
|
3710
3661
|
viewportOffset: this.getViewportOffset(element) });
|
|
3711
3662
|
|
|
3663
|
+
|
|
3664
|
+
// Restore scroll position
|
|
3665
|
+
scrollElement.scrollTop = scrollTop;
|
|
3666
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
3712
3667
|
},
|
|
3713
3668
|
|
|
3714
3669
|
getPositionOffset(element) {
|
|
3715
3670
|
return (
|
|
3716
3671
|
toPx(
|
|
3717
|
-
this.offset === false ?
|
|
3672
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3718
3673
|
this.axis === 'x' ? 'width' : 'height',
|
|
3719
3674
|
element) * (
|
|
3720
|
-
|
|
3675
|
+
|
|
3676
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3677
|
+
this.inset ? -1 : 1));
|
|
3721
3678
|
|
|
3722
3679
|
},
|
|
3723
3680
|
|
|
3724
3681
|
getShiftOffset(element) {
|
|
3725
|
-
return
|
|
3682
|
+
return this.align === 'center' ?
|
|
3726
3683
|
0 :
|
|
3727
3684
|
toPx(
|
|
3728
|
-
|
|
3685
|
+
css(element, '--uk-position-shift-offset'),
|
|
3729
3686
|
this.axis === 'y' ? 'width' : 'height',
|
|
3730
3687
|
element) * (
|
|
3731
3688
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3732
3689
|
},
|
|
3733
3690
|
|
|
3734
3691
|
getViewportOffset(element) {
|
|
3735
|
-
return toPx(
|
|
3692
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3736
3693
|
} } };
|
|
3737
3694
|
|
|
3738
|
-
|
|
3695
|
+
var Style = {
|
|
3696
|
+
beforeConnect() {
|
|
3697
|
+
this._style = attr(this.$el, 'style');
|
|
3698
|
+
},
|
|
3739
3699
|
|
|
3740
|
-
|
|
3741
|
-
|
|
3700
|
+
disconnected() {
|
|
3701
|
+
attr(this.$el, 'style', this._style);
|
|
3702
|
+
} };
|
|
3742
3703
|
|
|
3743
|
-
|
|
3704
|
+
const active$1 = [];
|
|
3705
|
+
|
|
3706
|
+
var Modal = {
|
|
3707
|
+
mixins: [Class, Container, Togglable],
|
|
3744
3708
|
|
|
3745
3709
|
props: {
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
delayHide: Number,
|
|
3752
|
-
display: String,
|
|
3753
|
-
clsDrop: String,
|
|
3754
|
-
animateOut: Boolean },
|
|
3710
|
+
selPanel: String,
|
|
3711
|
+
selClose: String,
|
|
3712
|
+
escClose: Boolean,
|
|
3713
|
+
bgClose: Boolean,
|
|
3714
|
+
stack: Boolean },
|
|
3755
3715
|
|
|
3756
3716
|
|
|
3757
3717
|
data: {
|
|
3758
|
-
mode: ['click', 'hover'],
|
|
3759
|
-
toggle: '- *',
|
|
3760
|
-
boundary: true,
|
|
3761
|
-
boundaryAlign: false,
|
|
3762
|
-
delayShow: 0,
|
|
3763
|
-
delayHide: 800,
|
|
3764
|
-
display: null,
|
|
3765
|
-
clsDrop: false,
|
|
3766
|
-
animation: ['uk-animation-fade'],
|
|
3767
3718
|
cls: 'uk-open',
|
|
3768
|
-
|
|
3769
|
-
|
|
3719
|
+
escClose: true,
|
|
3720
|
+
bgClose: true,
|
|
3721
|
+
overlay: true,
|
|
3722
|
+
stack: false },
|
|
3770
3723
|
|
|
3771
3724
|
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3725
|
+
computed: {
|
|
3726
|
+
panel(_ref, $el) {let { selPanel } = _ref;
|
|
3727
|
+
return $(selPanel, $el);
|
|
3728
|
+
},
|
|
3775
3729
|
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3730
|
+
transitionElement() {
|
|
3731
|
+
return this.panel;
|
|
3732
|
+
},
|
|
3779
3733
|
|
|
3780
|
-
|
|
3781
|
-
|
|
3734
|
+
bgClose(_ref2) {let { bgClose } = _ref2;
|
|
3735
|
+
return bgClose && this.panel;
|
|
3736
|
+
} },
|
|
3782
3737
|
|
|
3783
|
-
if (this.toggle && !this.target) {
|
|
3784
|
-
this.target = this.$create('toggle', query(this.toggle, this.$el), {
|
|
3785
|
-
target: this.$el,
|
|
3786
|
-
mode: this.mode }).
|
|
3787
|
-
$el;
|
|
3788
|
-
attr(this.target, 'aria-haspopup', true);
|
|
3789
|
-
this.lazyload(this.target);
|
|
3790
|
-
}
|
|
3791
|
-
},
|
|
3792
3738
|
|
|
3793
|
-
|
|
3794
|
-
if (this
|
|
3795
|
-
|
|
3739
|
+
beforeDisconnect() {
|
|
3740
|
+
if (includes(active$1, this)) {
|
|
3741
|
+
this.toggleElement(this.$el, false, false);
|
|
3796
3742
|
}
|
|
3797
3743
|
},
|
|
3798
3744
|
|
|
@@ -3801,55 +3747,433 @@
|
|
|
3801
3747
|
name: 'click',
|
|
3802
3748
|
|
|
3803
3749
|
delegate() {
|
|
3804
|
-
return
|
|
3750
|
+
return this.selClose;
|
|
3805
3751
|
},
|
|
3806
3752
|
|
|
3807
3753
|
handler(e) {
|
|
3808
3754
|
e.preventDefault();
|
|
3809
|
-
this.hide(
|
|
3755
|
+
this.hide();
|
|
3810
3756
|
} },
|
|
3811
3757
|
|
|
3812
3758
|
|
|
3813
3759
|
{
|
|
3814
|
-
name: '
|
|
3760
|
+
name: 'toggle',
|
|
3815
3761
|
|
|
3816
|
-
|
|
3817
|
-
return 'a[href^="#"]';
|
|
3818
|
-
},
|
|
3762
|
+
self: true,
|
|
3819
3763
|
|
|
3820
|
-
handler(
|
|
3821
|
-
if (
|
|
3822
|
-
|
|
3764
|
+
handler(e) {
|
|
3765
|
+
if (e.defaultPrevented) {
|
|
3766
|
+
return;
|
|
3823
3767
|
}
|
|
3824
|
-
} },
|
|
3825
|
-
|
|
3826
3768
|
|
|
3827
|
-
|
|
3828
|
-
name: 'beforescroll',
|
|
3769
|
+
e.preventDefault();
|
|
3829
3770
|
|
|
3830
|
-
|
|
3831
|
-
|
|
3771
|
+
if (this.isToggled() === includes(active$1, this)) {
|
|
3772
|
+
this.toggle();
|
|
3773
|
+
}
|
|
3832
3774
|
} },
|
|
3833
3775
|
|
|
3834
3776
|
|
|
3835
3777
|
{
|
|
3836
|
-
name: '
|
|
3778
|
+
name: 'beforeshow',
|
|
3837
3779
|
|
|
3838
3780
|
self: true,
|
|
3839
3781
|
|
|
3840
|
-
handler(e
|
|
3841
|
-
|
|
3782
|
+
handler(e) {
|
|
3783
|
+
if (includes(active$1, this)) {
|
|
3784
|
+
return false;
|
|
3785
|
+
}
|
|
3842
3786
|
|
|
3843
|
-
if (this.
|
|
3844
|
-
|
|
3787
|
+
if (!this.stack && active$1.length) {
|
|
3788
|
+
Promise.all(active$1.map((modal) => modal.hide())).then(this.show);
|
|
3789
|
+
e.preventDefault();
|
|
3845
3790
|
} else {
|
|
3846
|
-
|
|
3791
|
+
active$1.push(this);
|
|
3847
3792
|
}
|
|
3848
3793
|
} },
|
|
3849
3794
|
|
|
3850
3795
|
|
|
3851
3796
|
{
|
|
3852
|
-
name: '
|
|
3797
|
+
name: 'show',
|
|
3798
|
+
|
|
3799
|
+
self: true,
|
|
3800
|
+
|
|
3801
|
+
handler() {
|
|
3802
|
+
once(
|
|
3803
|
+
this.$el,
|
|
3804
|
+
'hide',
|
|
3805
|
+
on(document, 'focusin', (e) => {
|
|
3806
|
+
if (last(active$1) === this && !within(e.target, this.$el)) {
|
|
3807
|
+
this.$el.focus();
|
|
3808
|
+
}
|
|
3809
|
+
}));
|
|
3810
|
+
|
|
3811
|
+
|
|
3812
|
+
if (this.overlay) {
|
|
3813
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3814
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3815
|
+
}
|
|
3816
|
+
|
|
3817
|
+
if (this.stack) {
|
|
3818
|
+
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active$1.length);
|
|
3819
|
+
}
|
|
3820
|
+
|
|
3821
|
+
addClass(document.documentElement, this.clsPage);
|
|
3822
|
+
|
|
3823
|
+
if (this.bgClose) {
|
|
3824
|
+
once(
|
|
3825
|
+
this.$el,
|
|
3826
|
+
'hide',
|
|
3827
|
+
on(document, pointerDown$1, (_ref3) => {let { target } = _ref3;
|
|
3828
|
+
if (
|
|
3829
|
+
last(active$1) !== this ||
|
|
3830
|
+
this.overlay && !within(target, this.$el) ||
|
|
3831
|
+
within(target, this.panel))
|
|
3832
|
+
{
|
|
3833
|
+
return;
|
|
3834
|
+
}
|
|
3835
|
+
|
|
3836
|
+
once(
|
|
3837
|
+
document,
|
|
3838
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
3839
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3840
|
+
if (
|
|
3841
|
+
!defaultPrevented &&
|
|
3842
|
+
type === pointerUp$1 &&
|
|
3843
|
+
target === newTarget)
|
|
3844
|
+
{
|
|
3845
|
+
this.hide();
|
|
3846
|
+
}
|
|
3847
|
+
},
|
|
3848
|
+
true);
|
|
3849
|
+
|
|
3850
|
+
}),
|
|
3851
|
+
{ self: true });
|
|
3852
|
+
|
|
3853
|
+
}
|
|
3854
|
+
|
|
3855
|
+
if (this.escClose) {
|
|
3856
|
+
once(
|
|
3857
|
+
this.$el,
|
|
3858
|
+
'hide',
|
|
3859
|
+
on(document, 'keydown', (e) => {
|
|
3860
|
+
if (e.keyCode === 27 && last(active$1) === this) {
|
|
3861
|
+
this.hide();
|
|
3862
|
+
}
|
|
3863
|
+
}),
|
|
3864
|
+
{ self: true });
|
|
3865
|
+
|
|
3866
|
+
}
|
|
3867
|
+
} },
|
|
3868
|
+
|
|
3869
|
+
|
|
3870
|
+
{
|
|
3871
|
+
name: 'shown',
|
|
3872
|
+
|
|
3873
|
+
self: true,
|
|
3874
|
+
|
|
3875
|
+
handler() {
|
|
3876
|
+
if (!isFocusable(this.$el)) {
|
|
3877
|
+
attr(this.$el, 'tabindex', '-1');
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3880
|
+
if (!$(':focus', this.$el)) {
|
|
3881
|
+
this.$el.focus();
|
|
3882
|
+
}
|
|
3883
|
+
} },
|
|
3884
|
+
|
|
3885
|
+
|
|
3886
|
+
{
|
|
3887
|
+
name: 'hidden',
|
|
3888
|
+
|
|
3889
|
+
self: true,
|
|
3890
|
+
|
|
3891
|
+
handler() {
|
|
3892
|
+
if (includes(active$1, this)) {
|
|
3893
|
+
active$1.splice(active$1.indexOf(this), 1);
|
|
3894
|
+
}
|
|
3895
|
+
|
|
3896
|
+
css(this.$el, 'zIndex', '');
|
|
3897
|
+
|
|
3898
|
+
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
3899
|
+
removeClass(document.documentElement, this.clsPage);
|
|
3900
|
+
}
|
|
3901
|
+
} }],
|
|
3902
|
+
|
|
3903
|
+
|
|
3904
|
+
|
|
3905
|
+
methods: {
|
|
3906
|
+
toggle() {
|
|
3907
|
+
return this.isToggled() ? this.hide() : this.show();
|
|
3908
|
+
},
|
|
3909
|
+
|
|
3910
|
+
show() {
|
|
3911
|
+
if (this.container && parent(this.$el) !== this.container) {
|
|
3912
|
+
append(this.container, this.$el);
|
|
3913
|
+
return new Promise((resolve) =>
|
|
3914
|
+
requestAnimationFrame(() => this.show().then(resolve)));
|
|
3915
|
+
|
|
3916
|
+
}
|
|
3917
|
+
|
|
3918
|
+
return this.toggleElement(this.$el, true, animate(this));
|
|
3919
|
+
},
|
|
3920
|
+
|
|
3921
|
+
hide() {
|
|
3922
|
+
return this.toggleElement(this.$el, false, animate(this));
|
|
3923
|
+
} } };
|
|
3924
|
+
|
|
3925
|
+
|
|
3926
|
+
|
|
3927
|
+
function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
|
|
3928
|
+
return (el, show) =>
|
|
3929
|
+
new Promise((resolve, reject) =>
|
|
3930
|
+
once(el, 'show hide', () => {
|
|
3931
|
+
el._reject == null ? void 0 : el._reject();
|
|
3932
|
+
el._reject = reject;
|
|
3933
|
+
|
|
3934
|
+
_toggle(el, show);
|
|
3935
|
+
|
|
3936
|
+
const off = once(
|
|
3937
|
+
transitionElement,
|
|
3938
|
+
'transitionstart',
|
|
3939
|
+
() => {
|
|
3940
|
+
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
3941
|
+
self: true });
|
|
3942
|
+
|
|
3943
|
+
clearTimeout(timer);
|
|
3944
|
+
},
|
|
3945
|
+
{ self: true });
|
|
3946
|
+
|
|
3947
|
+
|
|
3948
|
+
const timer = setTimeout(() => {
|
|
3949
|
+
off();
|
|
3950
|
+
resolve();
|
|
3951
|
+
}, toMs(css(transitionElement, 'transitionDuration')));
|
|
3952
|
+
})).
|
|
3953
|
+
then(() => delete el._reject);
|
|
3954
|
+
}
|
|
3955
|
+
|
|
3956
|
+
function toMs(time) {
|
|
3957
|
+
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
3958
|
+
}
|
|
3959
|
+
|
|
3960
|
+
function preventOverscroll(el) {
|
|
3961
|
+
if (CSS.supports('overscroll-behavior', 'contain')) {
|
|
3962
|
+
const elements = filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')));
|
|
3963
|
+
css(elements, 'overscrollBehavior', 'contain');
|
|
3964
|
+
return () => css(elements, 'overscrollBehavior', '');
|
|
3965
|
+
}
|
|
3966
|
+
|
|
3967
|
+
let startClientY;
|
|
3968
|
+
|
|
3969
|
+
const events = [
|
|
3970
|
+
on(
|
|
3971
|
+
el,
|
|
3972
|
+
'touchstart',
|
|
3973
|
+
(_ref6) => {let { targetTouches } = _ref6;
|
|
3974
|
+
if (targetTouches.length === 1) {
|
|
3975
|
+
startClientY = targetTouches[0].clientY;
|
|
3976
|
+
}
|
|
3977
|
+
},
|
|
3978
|
+
{ passive: true }),
|
|
3979
|
+
|
|
3980
|
+
|
|
3981
|
+
on(
|
|
3982
|
+
el,
|
|
3983
|
+
'touchmove',
|
|
3984
|
+
(e) => {
|
|
3985
|
+
if (e.targetTouches.length !== 1) {
|
|
3986
|
+
return;
|
|
3987
|
+
}
|
|
3988
|
+
|
|
3989
|
+
let [scrollParent] = scrollParents(e.target, /auto|scroll/);
|
|
3990
|
+
if (!within(scrollParent, el)) {
|
|
3991
|
+
scrollParent = el;
|
|
3992
|
+
}
|
|
3993
|
+
|
|
3994
|
+
const clientY = e.targetTouches[0].clientY - startClientY;
|
|
3995
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollParent;
|
|
3996
|
+
|
|
3997
|
+
if (
|
|
3998
|
+
clientHeight >= scrollHeight ||
|
|
3999
|
+
scrollTop === 0 && clientY > 0 ||
|
|
4000
|
+
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
4001
|
+
{
|
|
4002
|
+
e.cancelable && e.preventDefault();
|
|
4003
|
+
}
|
|
4004
|
+
},
|
|
4005
|
+
{ passive: false })];
|
|
4006
|
+
|
|
4007
|
+
|
|
4008
|
+
|
|
4009
|
+
return () => events.forEach((fn) => fn());
|
|
4010
|
+
}
|
|
4011
|
+
|
|
4012
|
+
let prevented;
|
|
4013
|
+
function preventBackgroundScroll() {
|
|
4014
|
+
if (prevented) {
|
|
4015
|
+
return noop;
|
|
4016
|
+
}
|
|
4017
|
+
prevented = true;
|
|
4018
|
+
const { body, documentElement } = document;
|
|
4019
|
+
css(body, {
|
|
4020
|
+
overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
|
|
4021
|
+
touchAction: 'none' });
|
|
4022
|
+
|
|
4023
|
+
css(documentElement, 'overflowY', 'hidden');
|
|
4024
|
+
return () => {
|
|
4025
|
+
prevented = false;
|
|
4026
|
+
css(documentElement, 'overflowY', '');
|
|
4027
|
+
css(body, { overflowY: '', touchAction: '' });
|
|
4028
|
+
};
|
|
4029
|
+
}
|
|
4030
|
+
|
|
4031
|
+
function filterChildren(el, fn) {
|
|
4032
|
+
const children = [];
|
|
4033
|
+
apply(el, (node) => {
|
|
4034
|
+
if (fn(node)) {
|
|
4035
|
+
children.push(node);
|
|
4036
|
+
}
|
|
4037
|
+
});
|
|
4038
|
+
return children;
|
|
4039
|
+
}
|
|
4040
|
+
|
|
4041
|
+
let active;
|
|
4042
|
+
|
|
4043
|
+
var drop = {
|
|
4044
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4045
|
+
|
|
4046
|
+
args: 'pos',
|
|
4047
|
+
|
|
4048
|
+
props: {
|
|
4049
|
+
mode: 'list',
|
|
4050
|
+
toggle: Boolean,
|
|
4051
|
+
boundary: Boolean,
|
|
4052
|
+
target: Boolean,
|
|
4053
|
+
targetX: Boolean,
|
|
4054
|
+
targetY: Boolean,
|
|
4055
|
+
stretch: Boolean,
|
|
4056
|
+
delayShow: Number,
|
|
4057
|
+
delayHide: Number,
|
|
4058
|
+
autoUpdate: Boolean,
|
|
4059
|
+
clsDrop: String,
|
|
4060
|
+
animateOut: Boolean,
|
|
4061
|
+
bgScroll: Boolean },
|
|
4062
|
+
|
|
4063
|
+
|
|
4064
|
+
data: {
|
|
4065
|
+
mode: ['click', 'hover'],
|
|
4066
|
+
toggle: '- *',
|
|
4067
|
+
boundary: false,
|
|
4068
|
+
target: false,
|
|
4069
|
+
targetX: false,
|
|
4070
|
+
targetY: false,
|
|
4071
|
+
stretch: false,
|
|
4072
|
+
delayShow: 0,
|
|
4073
|
+
delayHide: 800,
|
|
4074
|
+
autoUpdate: true,
|
|
4075
|
+
clsDrop: false,
|
|
4076
|
+
animateOut: false,
|
|
4077
|
+
bgScroll: true,
|
|
4078
|
+
animation: ['uk-animation-fade'],
|
|
4079
|
+
cls: 'uk-open',
|
|
4080
|
+
container: false },
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
computed: {
|
|
4084
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4085
|
+
targetX = targetX || target || this.targetEl;
|
|
4086
|
+
targetY = targetY || target || this.targetEl;
|
|
4087
|
+
|
|
4088
|
+
return [
|
|
4089
|
+
targetX === true ? window : query(targetX, $el),
|
|
4090
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4091
|
+
|
|
4092
|
+
} },
|
|
4093
|
+
|
|
4094
|
+
|
|
4095
|
+
created() {
|
|
4096
|
+
this.tracker = new MouseTracker();
|
|
4097
|
+
},
|
|
4098
|
+
|
|
4099
|
+
beforeConnect() {
|
|
4100
|
+
this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
|
|
4101
|
+
},
|
|
4102
|
+
|
|
4103
|
+
connected() {
|
|
4104
|
+
addClass(this.$el, this.clsDrop);
|
|
4105
|
+
|
|
4106
|
+
if (this.toggle && !this.targetEl) {
|
|
4107
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4108
|
+
target: this.$el,
|
|
4109
|
+
mode: this.mode }).
|
|
4110
|
+
$el;
|
|
4111
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4112
|
+
this.lazyload(this.targetEl);
|
|
4113
|
+
}
|
|
4114
|
+
},
|
|
4115
|
+
|
|
4116
|
+
disconnected() {
|
|
4117
|
+
if (this.isActive()) {
|
|
4118
|
+
this.hide(false);
|
|
4119
|
+
active = null;
|
|
4120
|
+
}
|
|
4121
|
+
},
|
|
4122
|
+
|
|
4123
|
+
events: [
|
|
4124
|
+
{
|
|
4125
|
+
name: 'click',
|
|
4126
|
+
|
|
4127
|
+
delegate() {
|
|
4128
|
+
return "." + this.clsDrop + "-close";
|
|
4129
|
+
},
|
|
4130
|
+
|
|
4131
|
+
handler(e) {
|
|
4132
|
+
e.preventDefault();
|
|
4133
|
+
this.hide(false);
|
|
4134
|
+
} },
|
|
4135
|
+
|
|
4136
|
+
|
|
4137
|
+
{
|
|
4138
|
+
name: 'click',
|
|
4139
|
+
|
|
4140
|
+
delegate() {
|
|
4141
|
+
return 'a[href^="#"]';
|
|
4142
|
+
},
|
|
4143
|
+
|
|
4144
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4145
|
+
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4146
|
+
this.hide(false);
|
|
4147
|
+
}
|
|
4148
|
+
} },
|
|
4149
|
+
|
|
4150
|
+
|
|
4151
|
+
{
|
|
4152
|
+
name: 'beforescroll',
|
|
4153
|
+
|
|
4154
|
+
handler() {
|
|
4155
|
+
this.hide(false);
|
|
4156
|
+
} },
|
|
4157
|
+
|
|
4158
|
+
|
|
4159
|
+
{
|
|
4160
|
+
name: 'toggle',
|
|
4161
|
+
|
|
4162
|
+
self: true,
|
|
4163
|
+
|
|
4164
|
+
handler(e, toggle) {
|
|
4165
|
+
e.preventDefault();
|
|
4166
|
+
|
|
4167
|
+
if (this.isToggled()) {
|
|
4168
|
+
this.hide(false);
|
|
4169
|
+
} else {
|
|
4170
|
+
this.show(toggle == null ? void 0 : toggle.$el, false);
|
|
4171
|
+
}
|
|
4172
|
+
} },
|
|
4173
|
+
|
|
4174
|
+
|
|
4175
|
+
{
|
|
4176
|
+
name: 'toggleshow',
|
|
3853
4177
|
|
|
3854
4178
|
self: true,
|
|
3855
4179
|
|
|
@@ -3921,25 +4245,26 @@
|
|
|
3921
4245
|
self: true,
|
|
3922
4246
|
|
|
3923
4247
|
handler() {
|
|
3924
|
-
active
|
|
4248
|
+
active = this;
|
|
3925
4249
|
|
|
3926
4250
|
this.tracker.init();
|
|
3927
4251
|
|
|
3928
|
-
|
|
4252
|
+
const update = () => this.$emit();
|
|
4253
|
+
const handlers = [
|
|
3929
4254
|
on(
|
|
3930
4255
|
document,
|
|
3931
|
-
pointerDown,
|
|
3932
|
-
(
|
|
4256
|
+
pointerDown$1,
|
|
4257
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
3933
4258
|
!within(target, this.$el) &&
|
|
3934
4259
|
once(
|
|
3935
4260
|
document,
|
|
3936
|
-
pointerUp + " " + pointerCancel + " scroll",
|
|
3937
|
-
(
|
|
4261
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
4262
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3938
4263
|
if (
|
|
3939
4264
|
!defaultPrevented &&
|
|
3940
|
-
type === pointerUp &&
|
|
4265
|
+
type === pointerUp$1 &&
|
|
3941
4266
|
target === newTarget &&
|
|
3942
|
-
!(this.
|
|
4267
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
3943
4268
|
{
|
|
3944
4269
|
this.hide(false);
|
|
3945
4270
|
}
|
|
@@ -3954,25 +4279,28 @@
|
|
|
3954
4279
|
}
|
|
3955
4280
|
}),
|
|
3956
4281
|
|
|
3957
|
-
|
|
3958
|
-
|
|
4282
|
+
on(window, 'resize', update),
|
|
4283
|
+
|
|
3959
4284
|
(() => {
|
|
3960
|
-
const
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
(
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
4285
|
+
const observer = observeResize(
|
|
4286
|
+
scrollParents(this.$el).concat(this.targetEl),
|
|
4287
|
+
update);
|
|
4288
|
+
|
|
4289
|
+
return () => observer.disconnect();
|
|
4290
|
+
})(),
|
|
4291
|
+
|
|
4292
|
+
...(this.autoUpdate ?
|
|
4293
|
+
[on([document, scrollParents(this.$el)], 'scroll', update)] :
|
|
4294
|
+
[]),
|
|
4295
|
+
|
|
4296
|
+
...(this.bgScroll ?
|
|
4297
|
+
[] :
|
|
4298
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()])];
|
|
4299
|
+
|
|
4300
|
+
|
|
4301
|
+
once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
|
|
4302
|
+
self: true });
|
|
4303
|
+
|
|
3976
4304
|
} },
|
|
3977
4305
|
|
|
3978
4306
|
|
|
@@ -3989,16 +4317,16 @@
|
|
|
3989
4317
|
{
|
|
3990
4318
|
name: 'hide',
|
|
3991
4319
|
|
|
3992
|
-
handler(
|
|
4320
|
+
handler(_ref5) {let { target } = _ref5;
|
|
3993
4321
|
if (this.$el !== target) {
|
|
3994
|
-
active
|
|
3995
|
-
active
|
|
4322
|
+
active =
|
|
4323
|
+
active === null && within(target, this.$el) && this.isToggled() ?
|
|
3996
4324
|
this :
|
|
3997
|
-
active
|
|
4325
|
+
active;
|
|
3998
4326
|
return;
|
|
3999
4327
|
}
|
|
4000
4328
|
|
|
4001
|
-
active
|
|
4329
|
+
active = this.isActive() ? null : active;
|
|
4002
4330
|
this.tracker.cancel();
|
|
4003
4331
|
} }],
|
|
4004
4332
|
|
|
@@ -4013,12 +4341,12 @@
|
|
|
4013
4341
|
|
|
4014
4342
|
|
|
4015
4343
|
methods: {
|
|
4016
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4017
|
-
if (this.isToggled() && target && this.
|
|
4344
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4345
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4018
4346
|
this.hide(false, false);
|
|
4019
4347
|
}
|
|
4020
4348
|
|
|
4021
|
-
this.
|
|
4349
|
+
this.targetEl = target;
|
|
4022
4350
|
|
|
4023
4351
|
this.clearTimers();
|
|
4024
4352
|
|
|
@@ -4026,16 +4354,16 @@
|
|
|
4026
4354
|
return;
|
|
4027
4355
|
}
|
|
4028
4356
|
|
|
4029
|
-
if (active
|
|
4030
|
-
if (delay && active
|
|
4357
|
+
if (active) {
|
|
4358
|
+
if (delay && active.isDelaying) {
|
|
4031
4359
|
this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
|
|
4032
4360
|
return;
|
|
4033
4361
|
}
|
|
4034
4362
|
|
|
4035
4363
|
let prev;
|
|
4036
|
-
while (active
|
|
4037
|
-
prev = active
|
|
4038
|
-
active
|
|
4364
|
+
while (active && prev !== active && !within(this.$el, active.$el)) {
|
|
4365
|
+
prev = active;
|
|
4366
|
+
active.hide(false, false);
|
|
4039
4367
|
}
|
|
4040
4368
|
}
|
|
4041
4369
|
|
|
@@ -4076,65 +4404,74 @@
|
|
|
4076
4404
|
},
|
|
4077
4405
|
|
|
4078
4406
|
isActive() {
|
|
4079
|
-
return active
|
|
4407
|
+
return active === this;
|
|
4080
4408
|
},
|
|
4081
4409
|
|
|
4082
4410
|
position() {
|
|
4083
4411
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4084
|
-
|
|
4085
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4412
|
+
attr(this.$el, 'style', this._style);
|
|
4086
4413
|
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
const [scrollParent] = scrollParents(
|
|
4090
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4414
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4415
|
+
this.$el.hidden = true;
|
|
4091
4416
|
|
|
4092
|
-
const
|
|
4093
|
-
const boundaryOffset = boundary
|
|
4417
|
+
const boundary = query(this.boundary, this.$el);
|
|
4418
|
+
const boundaryOffset = offsetViewport(boundary || window);
|
|
4419
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4094
4420
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4095
4421
|
|
|
4096
|
-
|
|
4097
|
-
|
|
4422
|
+
const dirs = [
|
|
4423
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4424
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4098
4425
|
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4116
|
-
|
|
4117
|
-
css(this.$el, {
|
|
4118
|
-
width:
|
|
4119
|
-
this.axis === 'y' ?
|
|
4120
|
-
viewport.width :
|
|
4121
|
-
(this.dir === 'left' ?
|
|
4122
|
-
targetDim.left - viewport.left :
|
|
4123
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4124
|
-
height:
|
|
4125
|
-
this.axis === 'x' ?
|
|
4126
|
-
viewport.height :
|
|
4127
|
-
(this.dir === 'top' ?
|
|
4128
|
-
targetDim.top - viewport.top :
|
|
4129
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4130
|
-
|
|
4131
|
-
} else if (this.$el.offsetWidth > maxWidth) {
|
|
4426
|
+
|
|
4427
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4428
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4429
|
+
css(this.$el, {
|
|
4430
|
+
[prop]: Math.min(
|
|
4431
|
+
boundaryOffset[prop],
|
|
4432
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4433
|
+
|
|
4434
|
+
["overflow-" + axis]: 'auto' });
|
|
4435
|
+
|
|
4436
|
+
}
|
|
4437
|
+
}
|
|
4438
|
+
|
|
4439
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4440
|
+
|
|
4441
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4132
4442
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4133
4443
|
}
|
|
4134
4444
|
|
|
4135
4445
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4136
4446
|
|
|
4137
|
-
this
|
|
4447
|
+
this.$el.hidden = false;
|
|
4448
|
+
|
|
4449
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4450
|
+
|
|
4451
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4452
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4453
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4454
|
+
const targetOffset = offset(this.target[i]);
|
|
4455
|
+
const elOffset = offset(this.$el);
|
|
4456
|
+
|
|
4457
|
+
css(this.$el, {
|
|
4458
|
+
[prop]:
|
|
4459
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4460
|
+
targetOffset[start] -
|
|
4461
|
+
Math.max(
|
|
4462
|
+
boundaryOffset[start],
|
|
4463
|
+
viewports[i][start] + viewportOffset) :
|
|
4464
|
+
|
|
4465
|
+
Math.min(
|
|
4466
|
+
boundaryOffset[end],
|
|
4467
|
+
viewports[i][end] - viewportOffset) -
|
|
4468
|
+
targetOffset[end]) - positionOffset,
|
|
4469
|
+
["overflow-" + axis]: 'auto' });
|
|
4470
|
+
|
|
4471
|
+
|
|
4472
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4473
|
+
}
|
|
4474
|
+
}
|
|
4138
4475
|
} } };
|
|
4139
4476
|
|
|
4140
4477
|
|
|
@@ -4631,8 +4968,11 @@
|
|
|
4631
4968
|
let minHeight = '';
|
|
4632
4969
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4633
4970
|
|
|
4971
|
+
const { body, scrollingElement } = document;
|
|
4634
4972
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4635
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4973
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4974
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4975
|
+
|
|
4636
4976
|
|
|
4637
4977
|
if (this.expand) {
|
|
4638
4978
|
minHeight = Math.max(
|
|
@@ -4642,14 +4982,19 @@
|
|
|
4642
4982
|
0);
|
|
4643
4983
|
|
|
4644
4984
|
} else {
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
|
|
4985
|
+
const isScrollingElement =
|
|
4986
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
4648
4987
|
|
|
4988
|
+
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4989
|
+
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
4649
4990
|
|
|
4650
4991
|
if (this.offsetTop) {
|
|
4651
|
-
|
|
4652
|
-
|
|
4992
|
+
if (isScrollingElement) {
|
|
4993
|
+
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4994
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4995
|
+
} else {
|
|
4996
|
+
minHeight += " - " + css(scrollElement, 'paddingTop');
|
|
4997
|
+
}
|
|
4653
4998
|
}
|
|
4654
4999
|
|
|
4655
5000
|
if (this.offsetBottom === true) {
|
|
@@ -4888,11 +5233,17 @@
|
|
|
4888
5233
|
|
|
4889
5234
|
var closeIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"1\" y1=\"1\" x2=\"13\" y2=\"13\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"13\" y1=\"1\" x2=\"1\" y2=\"13\"/></svg>";
|
|
4890
5235
|
|
|
4891
|
-
var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>";
|
|
5236
|
+
var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>";
|
|
5237
|
+
|
|
5238
|
+
var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>";
|
|
5239
|
+
|
|
5240
|
+
var navParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
|
|
5241
|
+
|
|
5242
|
+
var navParentIconLarge = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 4 7 10 13 4\"/></svg>";
|
|
4892
5243
|
|
|
4893
|
-
var
|
|
5244
|
+
var navbarParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
|
|
4894
5245
|
|
|
4895
|
-
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"
|
|
5246
|
+
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><style>.uk-navbar-toggle svg > [class*='line-'] {\n transition: 0.2s ease-in-out;\n transition-property: transform, opacity,;\n transform-origin: center;\n opacity: 1;\n }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-2 { transform: rotate(45deg); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-3 { transform: rotate(-45deg); }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1,\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { opacity: 0; }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1 { transform: translateY(6px) scaleX(0); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { transform: translateY(-6px) scaleX(0); }</style><rect class=\"line-1\" y=\"3\" width=\"20\" height=\"2\"/><rect class=\"line-2\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-3\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-4\" y=\"15\" width=\"20\" height=\"2\"/></svg>";
|
|
4896
5247
|
|
|
4897
5248
|
var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>";
|
|
4898
5249
|
|
|
@@ -4924,6 +5275,9 @@
|
|
|
4924
5275
|
marker,
|
|
4925
5276
|
'close-icon': closeIcon,
|
|
4926
5277
|
'close-large': closeLarge,
|
|
5278
|
+
'nav-parent-icon': navParentIcon,
|
|
5279
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5280
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
4927
5281
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
4928
5282
|
'overlay-icon': overlayIcon,
|
|
4929
5283
|
'pagination-next': paginationNext,
|
|
@@ -4981,6 +5335,15 @@
|
|
|
4981
5335
|
} };
|
|
4982
5336
|
|
|
4983
5337
|
|
|
5338
|
+
const NavParentIcon = {
|
|
5339
|
+
extends: IconComponent,
|
|
5340
|
+
|
|
5341
|
+
beforeConnect() {
|
|
5342
|
+
const icon = this.$props.icon;
|
|
5343
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5344
|
+
} };
|
|
5345
|
+
|
|
5346
|
+
|
|
4984
5347
|
const Slidenav = {
|
|
4985
5348
|
extends: IconComponent,
|
|
4986
5349
|
|
|
@@ -5192,385 +5555,133 @@
|
|
|
5192
5555
|
append(picture, source);
|
|
5193
5556
|
}
|
|
5194
5557
|
append(picture, img);
|
|
5195
|
-
}
|
|
5196
|
-
}
|
|
5197
|
-
|
|
5198
|
-
function parseSources(sources) {
|
|
5199
|
-
if (!sources) {
|
|
5200
|
-
return [];
|
|
5201
|
-
}
|
|
5202
|
-
|
|
5203
|
-
if (startsWith(sources, '[')) {
|
|
5204
|
-
try {
|
|
5205
|
-
sources = JSON.parse(sources);
|
|
5206
|
-
} catch (e) {
|
|
5207
|
-
sources = [];
|
|
5208
|
-
}
|
|
5209
|
-
} else {
|
|
5210
|
-
sources = parseOptions(sources);
|
|
5211
|
-
}
|
|
5212
|
-
|
|
5213
|
-
if (!isArray(sources)) {
|
|
5214
|
-
sources = [sources];
|
|
5215
|
-
}
|
|
5216
|
-
|
|
5217
|
-
return sources.filter((source) => !isEmpty(source));
|
|
5218
|
-
}
|
|
5219
|
-
|
|
5220
|
-
function ensureSrcAttribute(el) {
|
|
5221
|
-
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
5222
|
-
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
5223
|
-
}
|
|
5224
|
-
}
|
|
5225
|
-
|
|
5226
|
-
function isPicture(el) {
|
|
5227
|
-
return isTag(el, 'picture');
|
|
5228
|
-
}
|
|
5229
|
-
|
|
5230
|
-
function isImg(el) {
|
|
5231
|
-
return isTag(el, 'img');
|
|
5232
|
-
}
|
|
5233
|
-
|
|
5234
|
-
var Media = {
|
|
5235
|
-
props: {
|
|
5236
|
-
media: Boolean },
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
data: {
|
|
5240
|
-
media: false },
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
connected() {
|
|
5244
|
-
const media = toMedia(this.media);
|
|
5245
|
-
this.matchMedia = true;
|
|
5246
|
-
if (media) {
|
|
5247
|
-
this.mediaObj = window.matchMedia(media);
|
|
5248
|
-
const handler = () => {
|
|
5249
|
-
this.matchMedia = this.mediaObj.matches;
|
|
5250
|
-
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5251
|
-
};
|
|
5252
|
-
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5253
|
-
handler();
|
|
5254
|
-
this.$emit('resize');
|
|
5255
|
-
});
|
|
5256
|
-
handler();
|
|
5257
|
-
}
|
|
5258
|
-
},
|
|
5259
|
-
|
|
5260
|
-
disconnected() {var _this$offMediaObj;
|
|
5261
|
-
(_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
|
|
5262
|
-
} };
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
function toMedia(value) {
|
|
5266
|
-
if (isString(value)) {
|
|
5267
|
-
if (startsWith(value, '@')) {
|
|
5268
|
-
const name = "breakpoint-" + value.substr(1);
|
|
5269
|
-
value = toFloat(getCssVar(name));
|
|
5270
|
-
} else if (isNaN(value)) {
|
|
5271
|
-
return value;
|
|
5272
|
-
}
|
|
5273
|
-
}
|
|
5274
|
-
|
|
5275
|
-
return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
|
|
5276
|
-
}
|
|
5277
|
-
|
|
5278
|
-
var leader = {
|
|
5279
|
-
mixins: [Class, Media, Resize],
|
|
5280
|
-
|
|
5281
|
-
props: {
|
|
5282
|
-
fill: String },
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
data: {
|
|
5286
|
-
fill: '',
|
|
5287
|
-
clsWrapper: 'uk-leader-fill',
|
|
5288
|
-
clsHide: 'uk-leader-hide',
|
|
5289
|
-
attrFill: 'data-fill' },
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
computed: {
|
|
5293
|
-
fill(_ref) {let { fill } = _ref;
|
|
5294
|
-
return fill || getCssVar('leader-fill-content');
|
|
5295
|
-
} },
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
connected() {
|
|
5299
|
-
[this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
|
|
5300
|
-
},
|
|
5301
|
-
|
|
5302
|
-
disconnected() {
|
|
5303
|
-
unwrap(this.wrapper.childNodes);
|
|
5304
|
-
},
|
|
5305
|
-
|
|
5306
|
-
update: {
|
|
5307
|
-
read() {
|
|
5308
|
-
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5309
|
-
|
|
5310
|
-
return {
|
|
5311
|
-
width,
|
|
5312
|
-
fill: this.fill,
|
|
5313
|
-
hide: !this.matchMedia };
|
|
5314
|
-
|
|
5315
|
-
},
|
|
5316
|
-
|
|
5317
|
-
write(_ref2) {let { width, fill, hide } = _ref2;
|
|
5318
|
-
toggleClass(this.wrapper, this.clsHide, hide);
|
|
5319
|
-
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5320
|
-
},
|
|
5321
|
-
|
|
5322
|
-
events: ['resize'] } };
|
|
5323
|
-
|
|
5324
|
-
const active = [];
|
|
5325
|
-
|
|
5326
|
-
var Modal = {
|
|
5327
|
-
mixins: [Class, Container, Togglable],
|
|
5328
|
-
|
|
5329
|
-
props: {
|
|
5330
|
-
selPanel: String,
|
|
5331
|
-
selClose: String,
|
|
5332
|
-
escClose: Boolean,
|
|
5333
|
-
bgClose: Boolean,
|
|
5334
|
-
stack: Boolean },
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
data: {
|
|
5338
|
-
cls: 'uk-open',
|
|
5339
|
-
escClose: true,
|
|
5340
|
-
bgClose: true,
|
|
5341
|
-
overlay: true,
|
|
5342
|
-
stack: false },
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
computed: {
|
|
5346
|
-
panel(_ref, $el) {let { selPanel } = _ref;
|
|
5347
|
-
return $(selPanel, $el);
|
|
5348
|
-
},
|
|
5349
|
-
|
|
5350
|
-
transitionElement() {
|
|
5351
|
-
return this.panel;
|
|
5352
|
-
},
|
|
5353
|
-
|
|
5354
|
-
bgClose(_ref2) {let { bgClose } = _ref2;
|
|
5355
|
-
return bgClose && this.panel;
|
|
5356
|
-
} },
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
beforeDisconnect() {
|
|
5360
|
-
if (includes(active, this)) {
|
|
5361
|
-
this.toggleElement(this.$el, false, false);
|
|
5362
|
-
}
|
|
5363
|
-
},
|
|
5364
|
-
|
|
5365
|
-
events: [
|
|
5366
|
-
{
|
|
5367
|
-
name: 'click',
|
|
5368
|
-
|
|
5369
|
-
delegate() {
|
|
5370
|
-
return this.selClose;
|
|
5371
|
-
},
|
|
5372
|
-
|
|
5373
|
-
handler(e) {
|
|
5374
|
-
e.preventDefault();
|
|
5375
|
-
this.hide();
|
|
5376
|
-
} },
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
{
|
|
5380
|
-
name: 'toggle',
|
|
5381
|
-
|
|
5382
|
-
self: true,
|
|
5383
|
-
|
|
5384
|
-
handler(e) {
|
|
5385
|
-
if (e.defaultPrevented) {
|
|
5386
|
-
return;
|
|
5387
|
-
}
|
|
5388
|
-
|
|
5389
|
-
e.preventDefault();
|
|
5390
|
-
|
|
5391
|
-
if (this.isToggled() === includes(active, this)) {
|
|
5392
|
-
this.toggle();
|
|
5393
|
-
}
|
|
5394
|
-
} },
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
{
|
|
5398
|
-
name: 'beforeshow',
|
|
5399
|
-
|
|
5400
|
-
self: true,
|
|
5401
|
-
|
|
5402
|
-
handler(e) {
|
|
5403
|
-
if (includes(active, this)) {
|
|
5404
|
-
return false;
|
|
5405
|
-
}
|
|
5406
|
-
|
|
5407
|
-
if (!this.stack && active.length) {
|
|
5408
|
-
Promise.all(active.map((modal) => modal.hide())).then(this.show);
|
|
5409
|
-
e.preventDefault();
|
|
5410
|
-
} else {
|
|
5411
|
-
active.push(this);
|
|
5412
|
-
}
|
|
5413
|
-
} },
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
{
|
|
5417
|
-
name: 'show',
|
|
5418
|
-
|
|
5419
|
-
self: true,
|
|
5420
|
-
|
|
5421
|
-
handler() {
|
|
5422
|
-
const docEl = document.documentElement;
|
|
5423
|
-
|
|
5424
|
-
if (width(window) > docEl.clientWidth && this.overlay) {
|
|
5425
|
-
css(document.body, 'overflowY', 'scroll');
|
|
5426
|
-
}
|
|
5427
|
-
|
|
5428
|
-
if (this.stack) {
|
|
5429
|
-
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active.length);
|
|
5430
|
-
}
|
|
5431
|
-
|
|
5432
|
-
addClass(docEl, this.clsPage);
|
|
5433
|
-
|
|
5434
|
-
if (this.bgClose) {
|
|
5435
|
-
once(
|
|
5436
|
-
this.$el,
|
|
5437
|
-
'hide',
|
|
5438
|
-
on(document, pointerDown, (_ref3) => {let { target } = _ref3;
|
|
5439
|
-
if (
|
|
5440
|
-
last(active) !== this ||
|
|
5441
|
-
this.overlay && !within(target, this.$el) ||
|
|
5442
|
-
within(target, this.panel))
|
|
5443
|
-
{
|
|
5444
|
-
return;
|
|
5445
|
-
}
|
|
5446
|
-
|
|
5447
|
-
once(
|
|
5448
|
-
document,
|
|
5449
|
-
pointerUp + " " + pointerCancel + " scroll",
|
|
5450
|
-
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
5451
|
-
if (
|
|
5452
|
-
!defaultPrevented &&
|
|
5453
|
-
type === pointerUp &&
|
|
5454
|
-
target === newTarget)
|
|
5455
|
-
{
|
|
5456
|
-
this.hide();
|
|
5457
|
-
}
|
|
5458
|
-
},
|
|
5459
|
-
true);
|
|
5460
|
-
|
|
5461
|
-
}),
|
|
5462
|
-
{ self: true });
|
|
5558
|
+
}
|
|
5559
|
+
}
|
|
5463
5560
|
|
|
5464
|
-
|
|
5561
|
+
function parseSources(sources) {
|
|
5562
|
+
if (!sources) {
|
|
5563
|
+
return [];
|
|
5564
|
+
}
|
|
5465
5565
|
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
{ self: true });
|
|
5566
|
+
if (startsWith(sources, '[')) {
|
|
5567
|
+
try {
|
|
5568
|
+
sources = JSON.parse(sources);
|
|
5569
|
+
} catch (e) {
|
|
5570
|
+
sources = [];
|
|
5571
|
+
}
|
|
5572
|
+
} else {
|
|
5573
|
+
sources = parseOptions(sources);
|
|
5574
|
+
}
|
|
5476
5575
|
|
|
5477
|
-
|
|
5478
|
-
|
|
5576
|
+
if (!isArray(sources)) {
|
|
5577
|
+
sources = [sources];
|
|
5578
|
+
}
|
|
5479
5579
|
|
|
5580
|
+
return sources.filter((source) => !isEmpty(source));
|
|
5581
|
+
}
|
|
5480
5582
|
|
|
5481
|
-
|
|
5482
|
-
|
|
5583
|
+
function ensureSrcAttribute(el) {
|
|
5584
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
5585
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
5586
|
+
}
|
|
5587
|
+
}
|
|
5483
5588
|
|
|
5484
|
-
|
|
5589
|
+
function isPicture(el) {
|
|
5590
|
+
return isTag(el, 'picture');
|
|
5591
|
+
}
|
|
5485
5592
|
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
}
|
|
5593
|
+
function isImg(el) {
|
|
5594
|
+
return isTag(el, 'img');
|
|
5595
|
+
}
|
|
5490
5596
|
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
} },
|
|
5597
|
+
var Media = {
|
|
5598
|
+
props: {
|
|
5599
|
+
media: Boolean },
|
|
5495
5600
|
|
|
5496
5601
|
|
|
5497
|
-
{
|
|
5498
|
-
|
|
5602
|
+
data: {
|
|
5603
|
+
media: false },
|
|
5499
5604
|
|
|
5500
|
-
self: true,
|
|
5501
5605
|
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5606
|
+
connected() {
|
|
5607
|
+
const media = toMedia(this.media, this.$el);
|
|
5608
|
+
this.matchMedia = true;
|
|
5609
|
+
if (media) {
|
|
5610
|
+
this.mediaObj = window.matchMedia(media);
|
|
5611
|
+
const handler = () => {
|
|
5612
|
+
this.matchMedia = this.mediaObj.matches;
|
|
5613
|
+
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5614
|
+
};
|
|
5615
|
+
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5616
|
+
handler();
|
|
5617
|
+
this.$emit('resize');
|
|
5618
|
+
});
|
|
5619
|
+
handler();
|
|
5620
|
+
}
|
|
5621
|
+
},
|
|
5506
5622
|
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5623
|
+
disconnected() {var _this$offMediaObj;
|
|
5624
|
+
(_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
|
|
5625
|
+
} };
|
|
5510
5626
|
|
|
5511
|
-
css(this.$el, 'zIndex', '');
|
|
5512
5627
|
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5628
|
+
function toMedia(value, element) {
|
|
5629
|
+
if (isString(value)) {
|
|
5630
|
+
if (startsWith(value, '@')) {
|
|
5631
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5632
|
+
} else if (isNaN(value)) {
|
|
5633
|
+
return value;
|
|
5634
|
+
}
|
|
5635
|
+
}
|
|
5517
5636
|
|
|
5637
|
+
return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
|
|
5638
|
+
}
|
|
5518
5639
|
|
|
5640
|
+
var leader = {
|
|
5641
|
+
mixins: [Class, Media, Resize],
|
|
5519
5642
|
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
return this.isToggled() ? this.hide() : this.show();
|
|
5523
|
-
},
|
|
5643
|
+
props: {
|
|
5644
|
+
fill: String },
|
|
5524
5645
|
|
|
5525
|
-
show() {
|
|
5526
|
-
if (this.container && parent(this.$el) !== this.container) {
|
|
5527
|
-
append(this.container, this.$el);
|
|
5528
|
-
return new Promise((resolve) =>
|
|
5529
|
-
requestAnimationFrame(() => this.show().then(resolve)));
|
|
5530
5646
|
|
|
5531
|
-
|
|
5647
|
+
data: {
|
|
5648
|
+
fill: '',
|
|
5649
|
+
clsWrapper: 'uk-leader-fill',
|
|
5650
|
+
clsHide: 'uk-leader-hide',
|
|
5651
|
+
attrFill: 'data-fill' },
|
|
5532
5652
|
|
|
5533
|
-
return this.toggleElement(this.$el, true, animate(this));
|
|
5534
|
-
},
|
|
5535
5653
|
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5654
|
+
computed: {
|
|
5655
|
+
fill(_ref) {let { fill } = _ref;
|
|
5656
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5657
|
+
} },
|
|
5539
5658
|
|
|
5540
5659
|
|
|
5660
|
+
connected() {
|
|
5661
|
+
[this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
|
|
5662
|
+
},
|
|
5541
5663
|
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
once(el, 'show hide', () => {
|
|
5546
|
-
el._reject == null ? void 0 : el._reject();
|
|
5547
|
-
el._reject = reject;
|
|
5664
|
+
disconnected() {
|
|
5665
|
+
unwrap(this.wrapper.childNodes);
|
|
5666
|
+
},
|
|
5548
5667
|
|
|
5549
|
-
|
|
5668
|
+
update: {
|
|
5669
|
+
read() {
|
|
5670
|
+
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5550
5671
|
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
5556
|
-
self: true });
|
|
5672
|
+
return {
|
|
5673
|
+
width,
|
|
5674
|
+
fill: this.fill,
|
|
5675
|
+
hide: !this.matchMedia };
|
|
5557
5676
|
|
|
5558
|
-
clearTimeout(timer);
|
|
5559
5677
|
},
|
|
5560
|
-
{ self: true });
|
|
5561
5678
|
|
|
5679
|
+
write(_ref2) {let { width, fill, hide } = _ref2;
|
|
5680
|
+
toggleClass(this.wrapper, this.clsHide, hide);
|
|
5681
|
+
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5682
|
+
},
|
|
5562
5683
|
|
|
5563
|
-
|
|
5564
|
-
off();
|
|
5565
|
-
resolve();
|
|
5566
|
-
}, toMs(css(transitionElement, 'transitionDuration')));
|
|
5567
|
-
})).
|
|
5568
|
-
then(() => delete el._reject);
|
|
5569
|
-
}
|
|
5570
|
-
|
|
5571
|
-
function toMs(time) {
|
|
5572
|
-
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
5573
|
-
}
|
|
5684
|
+
events: ['resize'] } };
|
|
5574
5685
|
|
|
5575
5686
|
var modal = {
|
|
5576
5687
|
install: install$2,
|
|
@@ -5734,7 +5845,9 @@
|
|
|
5734
5845
|
align: String,
|
|
5735
5846
|
offset: Number,
|
|
5736
5847
|
boundary: Boolean,
|
|
5737
|
-
|
|
5848
|
+
target: Boolean,
|
|
5849
|
+
targetX: Boolean,
|
|
5850
|
+
targetY: Boolean,
|
|
5738
5851
|
clsDrop: String,
|
|
5739
5852
|
delayShow: Number,
|
|
5740
5853
|
delayHide: Number,
|
|
@@ -5751,9 +5864,12 @@
|
|
|
5751
5864
|
offset: undefined,
|
|
5752
5865
|
delayShow: undefined,
|
|
5753
5866
|
delayHide: undefined,
|
|
5754
|
-
|
|
5755
|
-
|
|
5867
|
+
flip: false,
|
|
5868
|
+
shift: true,
|
|
5756
5869
|
boundary: true,
|
|
5870
|
+
target: false,
|
|
5871
|
+
targetX: false,
|
|
5872
|
+
targetY: false,
|
|
5757
5873
|
dropbar: false,
|
|
5758
5874
|
dropbarAnchor: false,
|
|
5759
5875
|
duration: 200,
|
|
@@ -5788,7 +5904,7 @@
|
|
|
5788
5904
|
},
|
|
5789
5905
|
|
|
5790
5906
|
watch(dropbar) {
|
|
5791
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5907
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5792
5908
|
},
|
|
5793
5909
|
|
|
5794
5910
|
immediate: true },
|
|
@@ -5804,7 +5920,7 @@
|
|
|
5804
5920
|
|
|
5805
5921
|
if (this.dropContainer !== $el) {
|
|
5806
5922
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5807
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5923
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5808
5924
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5809
5925
|
dropdowns.push(el);
|
|
5810
5926
|
}
|
|
@@ -5821,8 +5937,7 @@
|
|
|
5821
5937
|
{
|
|
5822
5938
|
...this.$props,
|
|
5823
5939
|
boundary: this.boundary,
|
|
5824
|
-
pos: this.pos
|
|
5825
|
-
offset: this.dropbar || this.offset });
|
|
5940
|
+
pos: this.pos });
|
|
5826
5941
|
|
|
5827
5942
|
|
|
5828
5943
|
},
|
|
@@ -5867,8 +5982,8 @@
|
|
|
5867
5982
|
if (
|
|
5868
5983
|
active &&
|
|
5869
5984
|
includes(active.mode, 'hover') &&
|
|
5870
|
-
active.
|
|
5871
|
-
!within(active.
|
|
5985
|
+
active.targetEl &&
|
|
5986
|
+
!within(active.targetEl, current) &&
|
|
5872
5987
|
!active.isDelaying)
|
|
5873
5988
|
{
|
|
5874
5989
|
active.hide(false);
|
|
@@ -5890,7 +6005,7 @@
|
|
|
5890
6005
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5891
6006
|
e.preventDefault();
|
|
5892
6007
|
|
|
5893
|
-
if (!active || active.
|
|
6008
|
+
if (!active || active.targetEl !== current) {
|
|
5894
6009
|
current.click();
|
|
5895
6010
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5896
6011
|
focusFirstFocusableElement(target));});
|
|
@@ -5940,8 +6055,8 @@
|
|
|
5940
6055
|
}
|
|
5941
6056
|
}
|
|
5942
6057
|
|
|
5943
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
5944
|
-
active == null ? void 0 : (_active$
|
|
6058
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6059
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
5945
6060
|
}
|
|
5946
6061
|
|
|
5947
6062
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -5983,8 +6098,8 @@
|
|
|
5983
6098
|
return this.dropbar;
|
|
5984
6099
|
},
|
|
5985
6100
|
|
|
5986
|
-
handler(
|
|
5987
|
-
if (!
|
|
6101
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6102
|
+
if (!this.isDropbarDrop(target)) {
|
|
5988
6103
|
return;
|
|
5989
6104
|
}
|
|
5990
6105
|
|
|
@@ -5992,7 +6107,7 @@
|
|
|
5992
6107
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
5993
6108
|
}
|
|
5994
6109
|
|
|
5995
|
-
addClass(
|
|
6110
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
5996
6111
|
} },
|
|
5997
6112
|
|
|
5998
6113
|
|
|
@@ -6007,19 +6122,24 @@
|
|
|
6007
6122
|
return this.dropbar;
|
|
6008
6123
|
},
|
|
6009
6124
|
|
|
6010
|
-
handler(
|
|
6011
|
-
if (!
|
|
6125
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6126
|
+
if (!this.isDropbarDrop(target)) {
|
|
6012
6127
|
return;
|
|
6013
6128
|
}
|
|
6014
6129
|
|
|
6015
|
-
this._observer = observeResize(
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6130
|
+
this._observer = observeResize(target, () => {
|
|
6131
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6132
|
+
concat(target).
|
|
6133
|
+
map((el) => offset(el));
|
|
6134
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6135
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6136
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6137
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6138
|
+
this.transitionTo(
|
|
6139
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6140
|
+
target);
|
|
6022
6141
|
|
|
6142
|
+
});
|
|
6023
6143
|
} },
|
|
6024
6144
|
|
|
6025
6145
|
|
|
@@ -6034,13 +6154,13 @@
|
|
|
6034
6154
|
return this.dropbar;
|
|
6035
6155
|
},
|
|
6036
6156
|
|
|
6037
|
-
handler(e
|
|
6157
|
+
handler(e) {
|
|
6038
6158
|
const active = this.getActive();
|
|
6039
6159
|
|
|
6040
6160
|
if (
|
|
6041
6161
|
matches(this.dropbar, ':hover') &&
|
|
6042
|
-
(active == null ? void 0 : active.$el) ===
|
|
6043
|
-
!this.toggles.some((el) => active.
|
|
6162
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6163
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6044
6164
|
{
|
|
6045
6165
|
e.preventDefault();
|
|
6046
6166
|
}
|
|
@@ -6058,8 +6178,8 @@
|
|
|
6058
6178
|
return this.dropbar;
|
|
6059
6179
|
},
|
|
6060
6180
|
|
|
6061
|
-
handler(
|
|
6062
|
-
if (!
|
|
6181
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6182
|
+
if (!this.isDropbarDrop(target)) {
|
|
6063
6183
|
return;
|
|
6064
6184
|
}
|
|
6065
6185
|
|
|
@@ -6067,7 +6187,7 @@
|
|
|
6067
6187
|
|
|
6068
6188
|
const active = this.getActive();
|
|
6069
6189
|
|
|
6070
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6190
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6071
6191
|
this.transitionTo(0);
|
|
6072
6192
|
}
|
|
6073
6193
|
} }],
|
|
@@ -6076,7 +6196,7 @@
|
|
|
6076
6196
|
|
|
6077
6197
|
methods: {
|
|
6078
6198
|
getActive() {
|
|
6079
|
-
return active
|
|
6199
|
+
return includes(this.dropdowns, active == null ? void 0 : active.$el) && active;
|
|
6080
6200
|
},
|
|
6081
6201
|
|
|
6082
6202
|
transitionTo(newHeight, el) {
|
|
@@ -6106,13 +6226,17 @@
|
|
|
6106
6226
|
|
|
6107
6227
|
getDropdown(el) {
|
|
6108
6228
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6229
|
+
},
|
|
6230
|
+
|
|
6231
|
+
isDropbarDrop(el) {
|
|
6232
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6109
6233
|
} } };
|
|
6110
6234
|
|
|
6111
6235
|
|
|
6112
6236
|
|
|
6113
6237
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6114
6238
|
const { current, keyCode } = e;
|
|
6115
|
-
const target = (active == null ? void 0 : active.
|
|
6239
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6116
6240
|
const i = toggles.indexOf(target);
|
|
6117
6241
|
|
|
6118
6242
|
// Left
|
|
@@ -6169,7 +6293,7 @@
|
|
|
6169
6293
|
|
|
6170
6294
|
registerEvent(this, {
|
|
6171
6295
|
el: this.swipeTarget,
|
|
6172
|
-
name: pointerDown,
|
|
6296
|
+
name: pointerDown$1,
|
|
6173
6297
|
passive: true,
|
|
6174
6298
|
handler(e) {
|
|
6175
6299
|
if (!isTouch(e)) {
|
|
@@ -6179,7 +6303,7 @@
|
|
|
6179
6303
|
// Handle Swipe Gesture
|
|
6180
6304
|
const pos = getEventPos(e);
|
|
6181
6305
|
const target = 'tagName' in e.target ? e.target : parent(e.target);
|
|
6182
|
-
once(document, pointerUp + " " + pointerCancel + " scroll", (e) => {
|
|
6306
|
+
once(document, pointerUp$1 + " " + pointerCancel + " scroll", (e) => {
|
|
6183
6307
|
const { x, y } = getEventPos(e);
|
|
6184
6308
|
|
|
6185
6309
|
// swipe
|
|
@@ -6286,22 +6410,6 @@
|
|
|
6286
6410
|
} },
|
|
6287
6411
|
|
|
6288
6412
|
|
|
6289
|
-
{
|
|
6290
|
-
name: 'touchstart',
|
|
6291
|
-
|
|
6292
|
-
passive: true,
|
|
6293
|
-
|
|
6294
|
-
el() {
|
|
6295
|
-
return this.panel;
|
|
6296
|
-
},
|
|
6297
|
-
|
|
6298
|
-
handler(_ref8) {let { targetTouches } = _ref8;
|
|
6299
|
-
if (targetTouches.length === 1) {
|
|
6300
|
-
this.clientY = targetTouches[0].clientY;
|
|
6301
|
-
}
|
|
6302
|
-
} },
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
6413
|
{
|
|
6306
6414
|
name: 'touchmove',
|
|
6307
6415
|
|
|
@@ -6317,33 +6425,6 @@
|
|
|
6317
6425
|
} },
|
|
6318
6426
|
|
|
6319
6427
|
|
|
6320
|
-
{
|
|
6321
|
-
name: 'touchmove',
|
|
6322
|
-
|
|
6323
|
-
passive: false,
|
|
6324
|
-
|
|
6325
|
-
el() {
|
|
6326
|
-
return this.panel;
|
|
6327
|
-
},
|
|
6328
|
-
|
|
6329
|
-
handler(e) {
|
|
6330
|
-
if (e.targetTouches.length !== 1) {
|
|
6331
|
-
return;
|
|
6332
|
-
}
|
|
6333
|
-
|
|
6334
|
-
const clientY = e.targetTouches[0].clientY - this.clientY;
|
|
6335
|
-
const { scrollTop, scrollHeight, clientHeight } = this.panel;
|
|
6336
|
-
|
|
6337
|
-
if (
|
|
6338
|
-
clientHeight >= scrollHeight ||
|
|
6339
|
-
scrollTop === 0 && clientY > 0 ||
|
|
6340
|
-
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
6341
|
-
{
|
|
6342
|
-
e.cancelable && e.preventDefault();
|
|
6343
|
-
}
|
|
6344
|
-
} },
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
6428
|
{
|
|
6348
6429
|
name: 'show',
|
|
6349
6430
|
|
|
@@ -6355,7 +6436,6 @@
|
|
|
6355
6436
|
addClass(parent(this.panel), this.clsMode);
|
|
6356
6437
|
}
|
|
6357
6438
|
|
|
6358
|
-
css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : '');
|
|
6359
6439
|
addClass(document.body, this.clsContainer, this.clsFlip);
|
|
6360
6440
|
css(document.body, 'touch-action', 'pan-y pinch-zoom');
|
|
6361
6441
|
css(this.$el, 'display', 'block');
|
|
@@ -6363,7 +6443,7 @@
|
|
|
6363
6443
|
addClass(
|
|
6364
6444
|
this.panel,
|
|
6365
6445
|
this.clsSidebarAnimation,
|
|
6366
|
-
this.mode
|
|
6446
|
+
this.mode === 'reveal' ? '' : this.clsMode);
|
|
6367
6447
|
|
|
6368
6448
|
|
|
6369
6449
|
height(document.body); // force reflow
|
|
@@ -6400,8 +6480,6 @@
|
|
|
6400
6480
|
removeClass(this.$el, this.clsOverlay);
|
|
6401
6481
|
css(this.$el, 'display', '');
|
|
6402
6482
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
6403
|
-
|
|
6404
|
-
css(document.documentElement, 'overflowY', '');
|
|
6405
6483
|
} },
|
|
6406
6484
|
|
|
6407
6485
|
|
|
@@ -6526,6 +6604,14 @@
|
|
|
6526
6604
|
offset: 0 },
|
|
6527
6605
|
|
|
6528
6606
|
|
|
6607
|
+
connected() {
|
|
6608
|
+
registerClick(this);
|
|
6609
|
+
},
|
|
6610
|
+
|
|
6611
|
+
disconnected() {
|
|
6612
|
+
unregisterClick(this);
|
|
6613
|
+
},
|
|
6614
|
+
|
|
6529
6615
|
methods: {
|
|
6530
6616
|
async scrollTo(el) {
|
|
6531
6617
|
el = el && $(el) || document.body;
|
|
@@ -6534,20 +6620,39 @@
|
|
|
6534
6620
|
await scrollIntoView(el, { offset: this.offset });
|
|
6535
6621
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6536
6622
|
}
|
|
6537
|
-
} }
|
|
6623
|
+
} } };
|
|
6538
6624
|
|
|
6539
6625
|
|
|
6540
|
-
events: {
|
|
6541
|
-
click(e) {
|
|
6542
|
-
if (e.defaultPrevented) {
|
|
6543
|
-
return;
|
|
6544
|
-
}
|
|
6545
6626
|
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6627
|
+
const components$2 = new Set();
|
|
6628
|
+
function registerClick(cmp) {
|
|
6629
|
+
if (!components$2.size) {
|
|
6630
|
+
on(document, 'click', clickHandler);
|
|
6631
|
+
}
|
|
6632
|
+
|
|
6633
|
+
components$2.add(cmp);
|
|
6634
|
+
}
|
|
6635
|
+
|
|
6636
|
+
function unregisterClick(cmp) {
|
|
6637
|
+
components$2.delete(cmp);
|
|
6638
|
+
|
|
6639
|
+
if (!components$2.length) {
|
|
6640
|
+
off(document, 'click', clickHandler);
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6549
6643
|
|
|
6644
|
+
function clickHandler(e) {
|
|
6645
|
+
if (e.defaultPrevented) {
|
|
6646
|
+
return;
|
|
6647
|
+
}
|
|
6550
6648
|
|
|
6649
|
+
for (const component of components$2) {
|
|
6650
|
+
if (within(e.target, component.$el)) {
|
|
6651
|
+
e.preventDefault();
|
|
6652
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6653
|
+
}
|
|
6654
|
+
}
|
|
6655
|
+
}
|
|
6551
6656
|
|
|
6552
6657
|
function getTargetElement(el) {
|
|
6553
6658
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -6877,7 +6982,9 @@
|
|
|
6877
6982
|
},
|
|
6878
6983
|
|
|
6879
6984
|
handler() {
|
|
6880
|
-
|
|
6985
|
+
const { scrollingElement } = document;
|
|
6986
|
+
|
|
6987
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6881
6988
|
return;
|
|
6882
6989
|
}
|
|
6883
6990
|
|
|
@@ -6886,13 +6993,11 @@
|
|
|
6886
6993
|
const elOffset = offset(this.$el);
|
|
6887
6994
|
|
|
6888
6995
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6889
|
-
scrollTop
|
|
6890
|
-
window,
|
|
6996
|
+
scrollingElement.scrollTop =
|
|
6891
6997
|
targetOffset.top -
|
|
6892
6998
|
elOffset.height -
|
|
6893
6999
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6894
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6895
|
-
|
|
7000
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6896
7001
|
}
|
|
6897
7002
|
});
|
|
6898
7003
|
} }],
|
|
@@ -6990,7 +7095,7 @@
|
|
|
6990
7095
|
|
|
6991
7096
|
|
|
6992
7097
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
6993
|
-
const scroll = scrollTop
|
|
7098
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
6994
7099
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
6995
7100
|
|
|
6996
7101
|
return {
|
|
@@ -7399,7 +7504,7 @@
|
|
|
7399
7504
|
|
|
7400
7505
|
events: [
|
|
7401
7506
|
{
|
|
7402
|
-
name: pointerDown,
|
|
7507
|
+
name: pointerDown$1,
|
|
7403
7508
|
|
|
7404
7509
|
filter() {
|
|
7405
7510
|
return includes(this.mode, 'hover');
|
|
@@ -7417,7 +7522,7 @@
|
|
|
7417
7522
|
trigger(this.$el, 'focus');
|
|
7418
7523
|
once(
|
|
7419
7524
|
document,
|
|
7420
|
-
pointerDown,
|
|
7525
|
+
pointerDown$1,
|
|
7421
7526
|
() => trigger(this.$el, 'blur'),
|
|
7422
7527
|
true,
|
|
7423
7528
|
(e) => !within(e.target, this.$el));
|
|
@@ -7510,7 +7615,7 @@
|
|
|
7510
7615
|
|
|
7511
7616
|
|
|
7512
7617
|
{
|
|
7513
|
-
name: '
|
|
7618
|
+
name: 'hide show',
|
|
7514
7619
|
|
|
7515
7620
|
self: true,
|
|
7516
7621
|
|
|
@@ -7518,10 +7623,8 @@
|
|
|
7518
7623
|
return this.target;
|
|
7519
7624
|
},
|
|
7520
7625
|
|
|
7521
|
-
handler(
|
|
7522
|
-
|
|
7523
|
-
this.updateAria(toggled);
|
|
7524
|
-
}
|
|
7626
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7627
|
+
this.updateAria(type === 'show');
|
|
7525
7628
|
} },
|
|
7526
7629
|
|
|
7527
7630
|
|
|
@@ -7616,10 +7719,12 @@
|
|
|
7616
7719
|
Video: Video,
|
|
7617
7720
|
Close: Close,
|
|
7618
7721
|
Spinner: Spinner,
|
|
7722
|
+
NavParentIcon: NavParentIcon,
|
|
7619
7723
|
SlidenavNext: Slidenav,
|
|
7620
7724
|
SlidenavPrevious: Slidenav,
|
|
7621
7725
|
SearchIcon: Search,
|
|
7622
7726
|
Marker: IconComponent,
|
|
7727
|
+
NavbarParentIcon: IconComponent,
|
|
7623
7728
|
NavbarToggleIcon: IconComponent,
|
|
7624
7729
|
OverlayIcon: IconComponent,
|
|
7625
7730
|
PaginationNext: IconComponent,
|
|
@@ -8109,7 +8214,7 @@
|
|
|
8109
8214
|
|
|
8110
8215
|
},
|
|
8111
8216
|
|
|
8112
|
-
setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8217
|
+
async setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8113
8218
|
state = { filter: { '': '' }, sort: [], ...state };
|
|
8114
8219
|
|
|
8115
8220
|
trigger(this.$el, 'beforeFilter', [this, state]);
|
|
@@ -8118,15 +8223,17 @@
|
|
|
8118
8223
|
toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
|
|
8119
8224
|
|
|
8120
8225
|
|
|
8121
|
-
Promise.all(
|
|
8226
|
+
await Promise.all(
|
|
8122
8227
|
$$(this.target, this.$el).map((target) => {
|
|
8123
8228
|
const filterFn = () => {
|
|
8124
8229
|
applyState(state, target, children(target));
|
|
8125
8230
|
this.$update(this.$el);
|
|
8126
8231
|
};
|
|
8127
8232
|
return animate ? this.animate(filterFn, target) : filterFn();
|
|
8128
|
-
}))
|
|
8129
|
-
|
|
8233
|
+
}));
|
|
8234
|
+
|
|
8235
|
+
|
|
8236
|
+
trigger(this.$el, 'afterFilter', [this]);
|
|
8130
8237
|
},
|
|
8131
8238
|
|
|
8132
8239
|
updateState() {
|
|
@@ -8416,6 +8523,11 @@
|
|
|
8416
8523
|
this.interval && clearInterval(this.interval);
|
|
8417
8524
|
} } };
|
|
8418
8525
|
|
|
8526
|
+
const pointerOptions = { passive: false, capture: true };
|
|
8527
|
+
const pointerDown = 'touchstart mousedown';
|
|
8528
|
+
const pointerMove = 'touchmove mousemove';
|
|
8529
|
+
const pointerUp = 'touchend touchcancel mouseup click input';
|
|
8530
|
+
|
|
8419
8531
|
var SliderDrag = {
|
|
8420
8532
|
props: {
|
|
8421
8533
|
draggable: Boolean },
|
|
@@ -8468,7 +8580,17 @@
|
|
|
8468
8580
|
|
|
8469
8581
|
handler(e) {
|
|
8470
8582
|
e.preventDefault();
|
|
8471
|
-
} }
|
|
8583
|
+
} },
|
|
8584
|
+
|
|
8585
|
+
|
|
8586
|
+
{
|
|
8587
|
+
// iOS workaround for slider stopping if swiping fast
|
|
8588
|
+
name: pointerMove + " " + pointerUp,
|
|
8589
|
+
el() {
|
|
8590
|
+
return this.list;
|
|
8591
|
+
},
|
|
8592
|
+
handler: noop,
|
|
8593
|
+
...pointerOptions }],
|
|
8472
8594
|
|
|
8473
8595
|
|
|
8474
8596
|
|
|
@@ -8490,10 +8612,10 @@
|
|
|
8490
8612
|
this.prevIndex = this.index;
|
|
8491
8613
|
}
|
|
8492
8614
|
|
|
8493
|
-
on(document, pointerMove, this.move,
|
|
8615
|
+
on(document, pointerMove, this.move, pointerOptions);
|
|
8494
8616
|
|
|
8495
8617
|
// 'input' event is triggered by video controls
|
|
8496
|
-
on(document, pointerUp
|
|
8618
|
+
on(document, pointerUp, this.end, pointerOptions);
|
|
8497
8619
|
|
|
8498
8620
|
css(this.list, 'userSelect', 'none');
|
|
8499
8621
|
},
|
|
@@ -8573,8 +8695,8 @@
|
|
|
8573
8695
|
},
|
|
8574
8696
|
|
|
8575
8697
|
end() {
|
|
8576
|
-
off(document, pointerMove, this.move,
|
|
8577
|
-
off(document, pointerUp
|
|
8698
|
+
off(document, pointerMove, this.move, pointerOptions);
|
|
8699
|
+
off(document, pointerUp, this.end, pointerOptions);
|
|
8578
8700
|
|
|
8579
8701
|
if (this.dragging) {
|
|
8580
8702
|
this.dragging = null;
|
|
@@ -8982,7 +9104,7 @@
|
|
|
8982
9104
|
|
|
8983
9105
|
events: [
|
|
8984
9106
|
{
|
|
8985
|
-
name: pointerMove + " " + pointerDown + " keydown",
|
|
9107
|
+
name: pointerMove$1 + " " + pointerDown$1 + " keydown",
|
|
8986
9108
|
|
|
8987
9109
|
handler: 'showControls' },
|
|
8988
9110
|
|
|
@@ -10637,7 +10759,7 @@
|
|
|
10637
10759
|
},
|
|
10638
10760
|
|
|
10639
10761
|
events: {
|
|
10640
|
-
name: pointerDown,
|
|
10762
|
+
name: pointerDown$1,
|
|
10641
10763
|
passive: false,
|
|
10642
10764
|
handler: 'init' },
|
|
10643
10765
|
|
|
@@ -10767,8 +10889,8 @@
|
|
|
10767
10889
|
this.placeholder = placeholder;
|
|
10768
10890
|
this.origin = { target, index: index(placeholder), ...this.pos };
|
|
10769
10891
|
|
|
10770
|
-
on(document, pointerMove, this.move);
|
|
10771
|
-
on(document, pointerUp, this.end);
|
|
10892
|
+
on(document, pointerMove$1, this.move);
|
|
10893
|
+
on(document, pointerUp$1, this.end);
|
|
10772
10894
|
|
|
10773
10895
|
if (!this.threshold) {
|
|
10774
10896
|
this.start(e);
|
|
@@ -10804,8 +10926,8 @@
|
|
|
10804
10926
|
},
|
|
10805
10927
|
|
|
10806
10928
|
end() {
|
|
10807
|
-
off(document, pointerMove, this.move);
|
|
10808
|
-
off(document, pointerUp, this.end);
|
|
10929
|
+
off(document, pointerMove$1, this.move);
|
|
10930
|
+
off(document, pointerUp$1, this.end);
|
|
10809
10931
|
|
|
10810
10932
|
if (!this.drag) {
|
|
10811
10933
|
return;
|
|
@@ -10874,7 +10996,7 @@
|
|
|
10874
10996
|
let last = Date.now();
|
|
10875
10997
|
trackTimer = setInterval(() => {
|
|
10876
10998
|
let { x, y } = pos;
|
|
10877
|
-
y += scrollTop
|
|
10999
|
+
y += document.scrollingElement.scrollTop;
|
|
10878
11000
|
|
|
10879
11001
|
const dist = (Date.now() - last) * 0.3;
|
|
10880
11002
|
last = Date.now();
|
|
@@ -10895,7 +11017,7 @@
|
|
|
10895
11017
|
}
|
|
10896
11018
|
|
|
10897
11019
|
if (scroll > 0 && scroll < scrollHeight - height) {
|
|
10898
|
-
scrollTop
|
|
11020
|
+
scrollEl.scrollTop = scroll;
|
|
10899
11021
|
return true;
|
|
10900
11022
|
}
|
|
10901
11023
|
});
|
|
@@ -11040,11 +11162,11 @@
|
|
|
11040
11162
|
|
|
11041
11163
|
this._unbind = once(
|
|
11042
11164
|
document, "show keydown " +
|
|
11043
|
-
pointerDown,
|
|
11165
|
+
pointerDown$1,
|
|
11044
11166
|
this.hide,
|
|
11045
11167
|
false,
|
|
11046
11168
|
(e) =>
|
|
11047
|
-
e.type === pointerDown && !within(e.target, this.$el) ||
|
|
11169
|
+
e.type === pointerDown$1 && !within(e.target, this.$el) ||
|
|
11048
11170
|
e.type === 'keydown' && e.keyCode === 27 ||
|
|
11049
11171
|
e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name);
|
|
11050
11172
|
|
|
@@ -11115,7 +11237,7 @@
|
|
|
11115
11237
|
|
|
11116
11238
|
// Clicking a button does not give it focus on all browsers and platforms
|
|
11117
11239
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
|
|
11118
|
-
[pointerDown](e) {
|
|
11240
|
+
[pointerDown$1](e) {
|
|
11119
11241
|
if (isTouch(e)) {
|
|
11120
11242
|
this.show();
|
|
11121
11243
|
}
|