uikit 3.14.4-dev.6a00f7fe6 → 3.14.4-dev.6c2d7a6e5
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 +45 -11
- 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 +185 -137
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +185 -137
- 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 +97 -135
- 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 -1716
- 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 +1058 -938
- 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 +95 -61
- 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 +42 -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 +80 -133
- package/src/js/util/animation.js +4 -3
- 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 +20 -36
- 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 +457 -371
- package/tests/dropbar.html +456 -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 +1998 -1139
- 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 +5 -5
- package/tests/slider.html +6 -5
- package/tests/slideshow.html +8 -8
- package/tests/sortable.html +6 -8
- package/tests/sticky-navbar.html +6 -6
- 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.6c2d7a6e5 | 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
|
}
|
|
@@ -913,13 +899,14 @@
|
|
|
913
899
|
const Transition = {
|
|
914
900
|
start: transition,
|
|
915
901
|
|
|
916
|
-
stop(element) {
|
|
902
|
+
async stop(element) {
|
|
917
903
|
trigger(element, 'transitionend');
|
|
918
|
-
|
|
904
|
+
await Promise.resolve();
|
|
919
905
|
},
|
|
920
906
|
|
|
921
|
-
cancel(element) {
|
|
907
|
+
async cancel(element) {
|
|
922
908
|
trigger(element, 'transitioncanceled');
|
|
909
|
+
await Promise.resolve();
|
|
923
910
|
},
|
|
924
911
|
|
|
925
912
|
inProgress(element) {
|
|
@@ -929,7 +916,7 @@
|
|
|
929
916
|
|
|
930
917
|
const animationPrefix = 'uk-animation-';
|
|
931
918
|
|
|
932
|
-
function animate$
|
|
919
|
+
function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
|
|
933
920
|
return Promise.all(
|
|
934
921
|
toNodes(element).map(
|
|
935
922
|
(element) =>
|
|
@@ -965,10 +952,10 @@
|
|
|
965
952
|
|
|
966
953
|
const inProgress = new RegExp(animationPrefix + "(enter|leave)");
|
|
967
954
|
const Animation = {
|
|
968
|
-
in: animate$
|
|
955
|
+
in: animate$2,
|
|
969
956
|
|
|
970
957
|
out(element, animation, duration, origin) {
|
|
971
|
-
return animate$
|
|
958
|
+
return animate$2(element, animation, duration, origin, true);
|
|
972
959
|
},
|
|
973
960
|
|
|
974
961
|
inProgress(element) {
|
|
@@ -1060,13 +1047,13 @@
|
|
|
1060
1047
|
}
|
|
1061
1048
|
|
|
1062
1049
|
function offsetPosition(element) {
|
|
1063
|
-
const offset = [0, 0];
|
|
1064
|
-
|
|
1065
1050
|
element = toNode(element);
|
|
1066
1051
|
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1052
|
+
const offset = [element.offsetTop, element.offsetLeft];
|
|
1053
|
+
|
|
1054
|
+
while (element = element.offsetParent) {
|
|
1055
|
+
offset[0] += element.offsetTop + toFloat(css(element, "borderTopWidth"));
|
|
1056
|
+
offset[1] += element.offsetLeft + toFloat(css(element, "borderLeftWidth"));
|
|
1070
1057
|
|
|
1071
1058
|
if (css(element, 'position') === 'fixed') {
|
|
1072
1059
|
const win = toWindow(element);
|
|
@@ -1074,7 +1061,7 @@
|
|
|
1074
1061
|
offset[1] += win.scrollX;
|
|
1075
1062
|
return offset;
|
|
1076
1063
|
}
|
|
1077
|
-
}
|
|
1064
|
+
}
|
|
1078
1065
|
|
|
1079
1066
|
return offset;
|
|
1080
1067
|
}
|
|
@@ -1293,9 +1280,9 @@
|
|
|
1293
1280
|
const hasTouch = inBrowser && 'ontouchstart' in window;
|
|
1294
1281
|
const hasPointerEvents = inBrowser && window.PointerEvent;
|
|
1295
1282
|
|
|
1296
|
-
const pointerDown = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
|
|
1297
|
-
const pointerMove = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
|
|
1298
|
-
const pointerUp = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
|
|
1283
|
+
const pointerDown$1 = hasPointerEvents ? 'pointerdown' : hasTouch ? 'touchstart' : 'mousedown';
|
|
1284
|
+
const pointerMove$1 = hasPointerEvents ? 'pointermove' : hasTouch ? 'touchmove' : 'mousemove';
|
|
1285
|
+
const pointerUp$1 = hasPointerEvents ? 'pointerup' : hasTouch ? 'touchend' : 'mouseup';
|
|
1299
1286
|
const pointerEnter = hasPointerEvents ? 'pointerenter' : hasTouch ? '' : 'mouseenter';
|
|
1300
1287
|
const pointerLeave = hasPointerEvents ? 'pointerleave' : hasTouch ? '' : 'mouseleave';
|
|
1301
1288
|
const pointerCancel = hasPointerEvents ? 'pointercancel' : 'touchcancel';
|
|
@@ -1795,20 +1782,6 @@
|
|
|
1795
1782
|
|
|
1796
1783
|
}
|
|
1797
1784
|
|
|
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
1785
|
function scrollIntoView(element, _temp) {let { offset: offsetBy = 0 } = _temp === void 0 ? {} : _temp;
|
|
1813
1786
|
const parents = isVisible(element) ? scrollParents(element) : [];
|
|
1814
1787
|
return parents.reduce(
|
|
@@ -1850,7 +1823,7 @@
|
|
|
1850
1823
|
(function step() {
|
|
1851
1824
|
const percent = ease(clamp((Date.now() - start) / duration));
|
|
1852
1825
|
|
|
1853
|
-
scrollTop
|
|
1826
|
+
element.scrollTop = scroll + top * percent;
|
|
1854
1827
|
|
|
1855
1828
|
// scroll more if we have not reached our destination
|
|
1856
1829
|
if (percent === 1) {
|
|
@@ -1911,18 +1884,31 @@
|
|
|
1911
1884
|
}
|
|
1912
1885
|
|
|
1913
1886
|
function offsetViewport(scrollElement) {
|
|
1914
|
-
|
|
1887
|
+
const window = toWindow(scrollElement);
|
|
1888
|
+
const {
|
|
1889
|
+
document: { documentElement } } =
|
|
1890
|
+
window;
|
|
1891
|
+
let viewportElement =
|
|
1892
|
+
scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1893
|
+
|
|
1894
|
+
const { visualViewport } = window;
|
|
1895
|
+
if (isWindow(viewportElement) && visualViewport) {
|
|
1896
|
+
let { height, width, scale, pageTop: top, pageLeft: left } = visualViewport;
|
|
1897
|
+
height = Math.round(height * scale);
|
|
1898
|
+
width = Math.round(width * scale);
|
|
1899
|
+
return { height, width, top, left, bottom: top + height, right: left + width };
|
|
1900
|
+
}
|
|
1915
1901
|
|
|
1916
1902
|
let rect = offset(viewportElement);
|
|
1917
1903
|
for (let [prop, dir, start, end] of [
|
|
1918
1904
|
['width', 'x', 'left', 'right'],
|
|
1919
1905
|
['height', 'y', 'top', 'bottom']])
|
|
1920
1906
|
{
|
|
1921
|
-
if (
|
|
1922
|
-
rect[start] += toFloat(css(viewportElement, "border" + ucfirst(start) + "Width"));
|
|
1923
|
-
} else {
|
|
1907
|
+
if (isWindow(viewportElement)) {
|
|
1924
1908
|
// iOS 12 returns <body> as scrollingElement
|
|
1925
|
-
viewportElement =
|
|
1909
|
+
viewportElement = documentElement;
|
|
1910
|
+
} else {
|
|
1911
|
+
rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
|
|
1926
1912
|
}
|
|
1927
1913
|
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1928
1914
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -1934,10 +1920,6 @@
|
|
|
1934
1920
|
return toWindow(element).document.scrollingElement;
|
|
1935
1921
|
}
|
|
1936
1922
|
|
|
1937
|
-
function getViewport$1(scrollElement) {
|
|
1938
|
-
return scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
1923
|
const dirs = [
|
|
1942
1924
|
['width', 'x', 'left', 'right'],
|
|
1943
1925
|
['height', 'y', 'top', 'bottom']];
|
|
@@ -1951,126 +1933,65 @@
|
|
|
1951
1933
|
...options.attach },
|
|
1952
1934
|
|
|
1953
1935
|
offset: [0, 0],
|
|
1936
|
+
placement: [],
|
|
1954
1937
|
...options };
|
|
1955
1938
|
|
|
1956
1939
|
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
attachTo(element, target, options);
|
|
1960
|
-
|
|
1961
|
-
offset(element, dim);
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
function attachTo(element, target, options) {
|
|
1965
|
-
let { attach, offset: offsetBy } = {
|
|
1966
|
-
attach: {
|
|
1967
|
-
element: ['left', 'top'],
|
|
1968
|
-
target: ['left', 'top'],
|
|
1969
|
-
...options.attach },
|
|
1970
|
-
|
|
1971
|
-
offset: [0, 0],
|
|
1972
|
-
...options };
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
const position = offset(element);
|
|
1976
|
-
const targetOffset = offset(target);
|
|
1977
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1978
|
-
position[start] = position[dir] =
|
|
1979
|
-
targetOffset[start] +
|
|
1980
|
-
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
1981
|
-
moveBy(attach.element[i], end, position[prop]) +
|
|
1982
|
-
+offsetBy[i];
|
|
1983
|
-
position[end] = position[start] + position[prop];
|
|
1940
|
+
if (!isArray(target)) {
|
|
1941
|
+
target = [target, target];
|
|
1984
1942
|
}
|
|
1985
|
-
return position;
|
|
1986
|
-
}
|
|
1987
1943
|
|
|
1988
|
-
|
|
1989
|
-
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
1944
|
+
offset(element, getPosition(element, target, options));
|
|
1990
1945
|
}
|
|
1991
1946
|
|
|
1992
|
-
function
|
|
1947
|
+
function getPosition(element, target, options) {
|
|
1993
1948
|
const position = attachTo(element, target, options);
|
|
1994
|
-
const targetDim = offset(target);
|
|
1995
1949
|
|
|
1996
1950
|
let {
|
|
1997
|
-
flip,
|
|
1998
1951
|
attach: { element: elAttach, target: targetAttach },
|
|
1999
1952
|
offset: elOffset,
|
|
2000
1953
|
boundary,
|
|
2001
|
-
|
|
2002
|
-
|
|
1954
|
+
viewportOffset,
|
|
1955
|
+
placement } =
|
|
2003
1956
|
options;
|
|
2004
1957
|
|
|
2005
|
-
let
|
|
2006
|
-
|
|
2007
|
-
viewports =
|
|
2008
|
-
|
|
2009
|
-
const [scrollElement] = viewports;
|
|
2010
|
-
viewports.push(viewport);
|
|
2011
|
-
|
|
2012
|
-
const offsetPosition = { ...position };
|
|
2013
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2014
|
-
if (flip !== true && !includes(flip, dir)) {
|
|
2015
|
-
continue;
|
|
2016
|
-
}
|
|
2017
|
-
|
|
2018
|
-
const willFlip =
|
|
2019
|
-
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
1958
|
+
let offsetPosition = position;
|
|
1959
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
1960
|
+
let viewports = scrollParents(target[i]);
|
|
1961
|
+
const [scrollElement] = viewports;
|
|
2020
1962
|
|
|
2021
|
-
viewport = getIntersectionArea(...viewports.
|
|
1963
|
+
let viewport = getIntersectionArea(...viewports.map(offsetViewport));
|
|
2022
1964
|
|
|
2023
1965
|
if (viewportOffset) {
|
|
2024
1966
|
viewport[start] += viewportOffset;
|
|
2025
1967
|
viewport[end] -= viewportOffset;
|
|
2026
1968
|
}
|
|
2027
1969
|
|
|
2028
|
-
if (boundary
|
|
2029
|
-
viewport = getIntersectionArea(viewport,
|
|
1970
|
+
if (boundary) {
|
|
1971
|
+
viewport = getIntersectionArea(viewport, offsetViewport(boundary));
|
|
2030
1972
|
}
|
|
2031
1973
|
|
|
2032
|
-
const
|
|
2033
|
-
const
|
|
1974
|
+
const isInStartViewport = position[start] >= viewport[start];
|
|
1975
|
+
const isInEndViewport = position[end] <= viewport[end];
|
|
2034
1976
|
|
|
2035
|
-
if (
|
|
1977
|
+
if (isInStartViewport && isInEndViewport) {
|
|
2036
1978
|
continue;
|
|
2037
1979
|
}
|
|
2038
1980
|
|
|
2039
|
-
let offsetBy;
|
|
1981
|
+
let offsetBy = 0;
|
|
2040
1982
|
|
|
2041
1983
|
// Flip
|
|
2042
|
-
if (
|
|
1984
|
+
if (placement[i] === 'flip') {
|
|
2043
1985
|
if (
|
|
2044
|
-
|
|
2045
|
-
|
|
1986
|
+
targetAttach[i] === end && isInEndViewport ||
|
|
1987
|
+
targetAttach[i] === start && isInStartViewport)
|
|
2046
1988
|
{
|
|
2047
1989
|
continue;
|
|
2048
1990
|
}
|
|
2049
1991
|
|
|
2050
|
-
offsetBy =
|
|
2051
|
-
(elAttach[i] === start ?
|
|
2052
|
-
-position[prop] :
|
|
2053
|
-
elAttach[i] === end ?
|
|
2054
|
-
position[prop] :
|
|
2055
|
-
0) + (
|
|
2056
|
-
targetAttach[i] === start ?
|
|
2057
|
-
targetDim[prop] :
|
|
2058
|
-
targetAttach[i] === end ?
|
|
2059
|
-
-targetDim[prop] :
|
|
2060
|
-
0) -
|
|
2061
|
-
elOffset[i] * 2;
|
|
2062
|
-
|
|
2063
|
-
if (
|
|
2064
|
-
!isInScrollArea(
|
|
2065
|
-
{
|
|
2066
|
-
...position,
|
|
2067
|
-
[start]: position[start] + offsetBy,
|
|
2068
|
-
[end]: position[end] + offsetBy },
|
|
1992
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2069
1993
|
|
|
2070
|
-
scrollElement,
|
|
2071
|
-
i))
|
|
2072
|
-
|
|
2073
|
-
{
|
|
1994
|
+
if (!isInScrollArea(applyOffset(position, offsetBy, i), scrollElement, i)) {
|
|
2074
1995
|
if (isInScrollArea(position, scrollElement, i)) {
|
|
2075
1996
|
continue;
|
|
2076
1997
|
}
|
|
@@ -2079,26 +2000,27 @@
|
|
|
2079
2000
|
return false;
|
|
2080
2001
|
}
|
|
2081
2002
|
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2003
|
+
const newPos = getPosition(element, target, {
|
|
2004
|
+
...options,
|
|
2005
|
+
attach: {
|
|
2006
|
+
element: elAttach.map(flipAxis).reverse(),
|
|
2007
|
+
target: targetAttach.map(flipAxis).reverse() },
|
|
2088
2008
|
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2009
|
+
offset: elOffset.reverse(),
|
|
2010
|
+
placement: placement.reverse(),
|
|
2011
|
+
recursion: true });
|
|
2092
2012
|
|
|
2093
2013
|
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
}
|
|
2014
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2015
|
+
return newPos;
|
|
2097
2016
|
}
|
|
2017
|
+
|
|
2018
|
+
continue;
|
|
2098
2019
|
}
|
|
2099
2020
|
|
|
2100
|
-
//
|
|
2101
|
-
} else {
|
|
2021
|
+
// Shift
|
|
2022
|
+
} else if (placement[i] === 'shift') {
|
|
2023
|
+
const targetDim = offset(target[i]);
|
|
2102
2024
|
offsetBy =
|
|
2103
2025
|
clamp(
|
|
2104
2026
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2107,13 +2029,54 @@
|
|
|
2107
2029
|
position[start];
|
|
2108
2030
|
}
|
|
2109
2031
|
|
|
2110
|
-
offsetPosition
|
|
2111
|
-
offsetPosition[end] += offsetBy;
|
|
2032
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2112
2033
|
}
|
|
2113
2034
|
|
|
2114
2035
|
return offsetPosition;
|
|
2115
2036
|
}
|
|
2116
2037
|
|
|
2038
|
+
function attachTo(element, target, options) {
|
|
2039
|
+
let { attach, offset: offsetBy } = {
|
|
2040
|
+
attach: {
|
|
2041
|
+
element: ['left', 'top'],
|
|
2042
|
+
target: ['left', 'top'],
|
|
2043
|
+
...options.attach },
|
|
2044
|
+
|
|
2045
|
+
offset: [0, 0],
|
|
2046
|
+
...options };
|
|
2047
|
+
|
|
2048
|
+
|
|
2049
|
+
let elOffset = offset(element);
|
|
2050
|
+
|
|
2051
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
2052
|
+
const targetOffset =
|
|
2053
|
+
attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
|
|
2054
|
+
|
|
2055
|
+
elOffset = applyOffset(
|
|
2056
|
+
elOffset,
|
|
2057
|
+
targetOffset[start] -
|
|
2058
|
+
elOffset[start] +
|
|
2059
|
+
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
2060
|
+
moveBy(attach.element[i], end, elOffset[prop]) +
|
|
2061
|
+
+offsetBy[i],
|
|
2062
|
+
i);
|
|
2063
|
+
|
|
2064
|
+
}
|
|
2065
|
+
return elOffset;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
function applyOffset(position, offset, i) {
|
|
2069
|
+
const [, dir, start, end] = dirs[i];
|
|
2070
|
+
const newPos = { ...position };
|
|
2071
|
+
newPos[start] = position[dir] = position[start] + offset;
|
|
2072
|
+
newPos[end] += offset;
|
|
2073
|
+
return newPos;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
function moveBy(attach, end, dim) {
|
|
2077
|
+
return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2117
2080
|
function getIntersectionArea() {
|
|
2118
2081
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2119
2082
|
for (const rect of rects) {
|
|
@@ -2134,12 +2097,32 @@
|
|
|
2134
2097
|
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2135
2098
|
}
|
|
2136
2099
|
|
|
2137
|
-
function
|
|
2138
|
-
|
|
2139
|
-
|
|
2100
|
+
function flip(element, target, _ref, i) {let { offset, attach } = _ref;
|
|
2101
|
+
return attachTo(element, target, {
|
|
2102
|
+
attach: {
|
|
2103
|
+
element: flipAttach(attach.element, i),
|
|
2104
|
+
target: flipAttach(attach.target, i) },
|
|
2105
|
+
|
|
2106
|
+
offset: flipOffset(offset, i) });
|
|
2107
|
+
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
function flipAttach(attach, i) {
|
|
2111
|
+
const newAttach = [...attach];
|
|
2112
|
+
const index = dirs[i].indexOf(attach[i]);
|
|
2113
|
+
if (~index) {
|
|
2114
|
+
newAttach[i] = dirs[i][1 - index % 2 + 2];
|
|
2115
|
+
}
|
|
2116
|
+
return newAttach;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
function flipOffset(offset, i) {
|
|
2120
|
+
offset = [...offset];
|
|
2121
|
+
offset[i] *= -1;
|
|
2122
|
+
return offset;
|
|
2140
2123
|
}
|
|
2141
2124
|
|
|
2142
|
-
function
|
|
2125
|
+
function flipAxis(prop) {
|
|
2143
2126
|
for (let i = 0; i < dirs.length; i++) {
|
|
2144
2127
|
const index = dirs[i].indexOf(prop);
|
|
2145
2128
|
if (~index) {
|
|
@@ -2154,7 +2137,7 @@
|
|
|
2154
2137
|
getImage: getImage,
|
|
2155
2138
|
transition: transition,
|
|
2156
2139
|
Transition: Transition,
|
|
2157
|
-
animate: animate$
|
|
2140
|
+
animate: animate$2,
|
|
2158
2141
|
Animation: Animation,
|
|
2159
2142
|
attr: attr,
|
|
2160
2143
|
hasAttr: hasAttr,
|
|
@@ -2194,9 +2177,9 @@
|
|
|
2194
2177
|
inBrowser: inBrowser,
|
|
2195
2178
|
isRtl: isRtl,
|
|
2196
2179
|
hasTouch: hasTouch,
|
|
2197
|
-
pointerDown: pointerDown,
|
|
2198
|
-
pointerMove: pointerMove,
|
|
2199
|
-
pointerUp: pointerUp,
|
|
2180
|
+
pointerDown: pointerDown$1,
|
|
2181
|
+
pointerMove: pointerMove$1,
|
|
2182
|
+
pointerUp: pointerUp$1,
|
|
2200
2183
|
pointerEnter: pointerEnter,
|
|
2201
2184
|
pointerLeave: pointerLeave,
|
|
2202
2185
|
pointerCancel: pointerCancel,
|
|
@@ -2284,10 +2267,8 @@
|
|
|
2284
2267
|
findAll: findAll,
|
|
2285
2268
|
escape: escape,
|
|
2286
2269
|
css: css,
|
|
2287
|
-
getCssVar: getCssVar,
|
|
2288
2270
|
propName: propName,
|
|
2289
2271
|
isInView: isInView,
|
|
2290
|
-
scrollTop: scrollTop,
|
|
2291
2272
|
scrollIntoView: scrollIntoView,
|
|
2292
2273
|
scrolledOver: scrolledOver,
|
|
2293
2274
|
scrollParents: scrollParents,
|
|
@@ -2610,7 +2591,7 @@
|
|
|
2610
2591
|
|
|
2611
2592
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2612
2593
|
|
|
2613
|
-
if (prop === 'target' &&
|
|
2594
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2614
2595
|
continue;
|
|
2615
2596
|
}
|
|
2616
2597
|
|
|
@@ -2621,7 +2602,7 @@
|
|
|
2621
2602
|
|
|
2622
2603
|
for (const key in options) {
|
|
2623
2604
|
const prop = camelize(key);
|
|
2624
|
-
if (props[prop]
|
|
2605
|
+
if (!isUndefined(props[prop])) {
|
|
2625
2606
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2626
2607
|
}
|
|
2627
2608
|
}
|
|
@@ -2950,7 +2931,7 @@
|
|
|
2950
2931
|
UIkit.data = '__uikit__';
|
|
2951
2932
|
UIkit.prefix = 'uk-';
|
|
2952
2933
|
UIkit.options = {};
|
|
2953
|
-
UIkit.version = '3.14.4-dev.
|
|
2934
|
+
UIkit.version = '3.14.4-dev.6c2d7a6e5';
|
|
2954
2935
|
|
|
2955
2936
|
globalAPI(UIkit);
|
|
2956
2937
|
hooksAPI(UIkit);
|
|
@@ -3055,27 +3036,7 @@
|
|
|
3055
3036
|
origin: false,
|
|
3056
3037
|
transition: 'ease',
|
|
3057
3038
|
clsEnter: 'uk-togglabe-enter',
|
|
3058
|
-
clsLeave: 'uk-togglabe-leave',
|
|
3059
|
-
|
|
3060
|
-
initProps: {
|
|
3061
|
-
overflow: '',
|
|
3062
|
-
maxHeight: '',
|
|
3063
|
-
paddingTop: '',
|
|
3064
|
-
paddingBottom: '',
|
|
3065
|
-
marginTop: '',
|
|
3066
|
-
marginBottom: '',
|
|
3067
|
-
boxShadow: '' },
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
hideProps: {
|
|
3071
|
-
overflow: 'hidden',
|
|
3072
|
-
maxHeight: 0,
|
|
3073
|
-
paddingTop: 0,
|
|
3074
|
-
paddingBottom: 0,
|
|
3075
|
-
marginTop: 0,
|
|
3076
|
-
marginBottom: 0,
|
|
3077
|
-
boxShadow: 'none' } },
|
|
3078
|
-
|
|
3039
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3079
3040
|
|
|
3080
3041
|
|
|
3081
3042
|
computed: {
|
|
@@ -3084,7 +3045,7 @@
|
|
|
3084
3045
|
},
|
|
3085
3046
|
|
|
3086
3047
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3087
|
-
return startsWith(animation[0],
|
|
3048
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3088
3049
|
} },
|
|
3089
3050
|
|
|
3090
3051
|
|
|
@@ -3177,130 +3138,97 @@
|
|
|
3177
3138
|
};
|
|
3178
3139
|
}
|
|
3179
3140
|
|
|
3180
|
-
function toggleTransition(cmp) {
|
|
3181
|
-
|
|
3182
|
-
case 'slide-left':
|
|
3183
|
-
return slideHorizontal(cmp);
|
|
3184
|
-
case 'slide-right':
|
|
3185
|
-
return slideHorizontal(cmp, true);}
|
|
3186
|
-
|
|
3187
|
-
return slide$1(cmp);
|
|
3188
|
-
}
|
|
3189
|
-
|
|
3190
|
-
function slide$1(_ref4)
|
|
3191
|
-
|
|
3192
|
-
|
|
3141
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3142
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3193
3143
|
|
|
3144
|
+
const dirs = [
|
|
3145
|
+
['left', 'right'],
|
|
3146
|
+
['top', 'bottom']];
|
|
3194
3147
|
|
|
3148
|
+
const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
|
|
3149
|
+
const end = dir[1] === startProp;
|
|
3150
|
+
const props = ['width', 'height'];
|
|
3151
|
+
const dimProp = props[dirs.indexOf(dir)];
|
|
3152
|
+
const marginProp = "margin-" + dir[0];
|
|
3153
|
+
const marginStartProp = "margin-" + startProp;
|
|
3195
3154
|
|
|
3155
|
+
return async (el, show) => {
|
|
3156
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3196
3157
|
|
|
3158
|
+
let currentDim = dimensions$1(el)[dimProp];
|
|
3197
3159
|
|
|
3198
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3199
|
-
return (el, show) => {
|
|
3200
3160
|
const inProgress = Transition.inProgress(el);
|
|
3201
|
-
|
|
3202
|
-
!inProgress && el.hasChildNodes() ?
|
|
3203
|
-
toFloat(css(el.firstElementChild, 'marginTop')) +
|
|
3204
|
-
toFloat(css(el.lastElementChild, 'marginBottom')) :
|
|
3205
|
-
0;
|
|
3206
|
-
const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
|
|
3161
|
+
await Transition.cancel(el);
|
|
3207
3162
|
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
Transition.cancel(el);
|
|
3211
|
-
|
|
3212
|
-
if (!isToggled(el)) {
|
|
3163
|
+
if (show) {
|
|
3213
3164
|
_toggle(el, true);
|
|
3214
3165
|
}
|
|
3215
3166
|
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
fastdom.flush();
|
|
3220
|
-
|
|
3221
|
-
const endHeight = toFloat(css(el, 'height')) + inner;
|
|
3222
|
-
duration = velocity * endHeight + duration;
|
|
3223
|
-
|
|
3224
|
-
css(el, { ...props, maxHeight: currentHeight });
|
|
3225
|
-
|
|
3226
|
-
return (
|
|
3227
|
-
show ?
|
|
3228
|
-
Transition.start(
|
|
3229
|
-
el,
|
|
3230
|
-
{ ...initProps, overflow: 'hidden', maxHeight: endHeight },
|
|
3231
|
-
duration * (1 - currentHeight / endHeight),
|
|
3232
|
-
transition) :
|
|
3233
|
-
|
|
3234
|
-
Transition.start(
|
|
3235
|
-
el,
|
|
3236
|
-
hideProps,
|
|
3237
|
-
duration * (currentHeight / endHeight),
|
|
3238
|
-
transition).
|
|
3239
|
-
then(() => _toggle(el, false))).
|
|
3240
|
-
then(() => css(el, initProps));
|
|
3241
|
-
};
|
|
3242
|
-
}
|
|
3167
|
+
const prevProps = Object.fromEntries(
|
|
3168
|
+
['padding', 'border', 'width', 'height', 'overflow', marginProp, marginStartProp].map(
|
|
3169
|
+
(key) => [key, el.style[key]]));
|
|
3243
3170
|
|
|
3244
|
-
function slideHorizontal(_ref5, right) {let { isToggled, duration, velocity, transition, _toggle } = _ref5;
|
|
3245
|
-
return (el, show) => {
|
|
3246
|
-
const visible = isVisible(el);
|
|
3247
|
-
const marginLeft = toFloat(css(el, 'marginLeft'));
|
|
3248
3171
|
|
|
3249
|
-
Transition.cancel(el);
|
|
3250
3172
|
|
|
3251
|
-
const
|
|
3252
|
-
css(
|
|
3173
|
+
const dim = dimensions$1(el);
|
|
3174
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3175
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3176
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3253
3177
|
|
|
3254
|
-
if (!
|
|
3255
|
-
|
|
3178
|
+
if (!inProgress && !show) {
|
|
3179
|
+
currentDim += marginStart;
|
|
3256
3180
|
}
|
|
3257
3181
|
|
|
3258
|
-
const
|
|
3259
|
-
|
|
3182
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3183
|
+
css(wrapper, {
|
|
3184
|
+
boxSizing: 'border-box',
|
|
3185
|
+
height: dim.height,
|
|
3186
|
+
width: dim.width,
|
|
3187
|
+
...css(el, [
|
|
3188
|
+
'padding',
|
|
3189
|
+
'borderTop',
|
|
3190
|
+
'borderRight',
|
|
3191
|
+
'borderBottom',
|
|
3192
|
+
'borderLeft',
|
|
3193
|
+
'borderImage',
|
|
3194
|
+
marginStartProp]) });
|
|
3260
3195
|
|
|
3261
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3262
|
-
const offsetEl = offset(el);
|
|
3263
|
-
const useClipPath = right ?
|
|
3264
|
-
offsetEl.right < scrollElement.clientWidth :
|
|
3265
|
-
Math.round(offsetEl.left) > 0;
|
|
3266
3196
|
|
|
3267
|
-
css(el, {
|
|
3268
|
-
clipPath: useClipPath ?
|
|
3269
|
-
right ? "polygon(0 0," +
|
|
3270
|
-
percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
|
|
3271
|
-
100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)" :
|
|
3272
|
-
'',
|
|
3273
|
-
marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
|
|
3274
3197
|
|
|
3198
|
+
css(el, {
|
|
3199
|
+
padding: 0,
|
|
3200
|
+
border: 0,
|
|
3201
|
+
[marginStartProp]: 0,
|
|
3202
|
+
width: dim.width,
|
|
3203
|
+
height: dim.height,
|
|
3204
|
+
overflow: 'hidden',
|
|
3205
|
+
[dimProp]: currentDim });
|
|
3275
3206
|
|
|
3276
|
-
return (
|
|
3277
|
-
show ?
|
|
3278
|
-
Transition.start(
|
|
3279
|
-
el,
|
|
3280
|
-
{
|
|
3281
|
-
clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
|
|
3282
|
-
marginLeft: 0 },
|
|
3283
3207
|
|
|
3284
|
-
|
|
3285
|
-
|
|
3208
|
+
const percent = currentDim / endDim;
|
|
3209
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3210
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3286
3211
|
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
3212
|
+
if (end) {
|
|
3213
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3214
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3215
|
+
}
|
|
3292
3216
|
|
|
3217
|
+
if (!end ^ mode === 'reveal') {
|
|
3218
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3219
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3220
|
+
}
|
|
3293
3221
|
|
|
3294
|
-
|
|
3295
|
-
|
|
3222
|
+
try {
|
|
3223
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3224
|
+
} finally {
|
|
3225
|
+
css(el, prevProps);
|
|
3226
|
+
unwrap(wrapper.firstChild);
|
|
3296
3227
|
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
css(scrollElement, 'overflowX', '');
|
|
3302
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3303
|
-
});
|
|
3228
|
+
if (!show) {
|
|
3229
|
+
_toggle(el, false);
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3304
3232
|
};
|
|
3305
3233
|
}
|
|
3306
3234
|
|
|
@@ -3325,6 +3253,7 @@
|
|
|
3325
3253
|
mixins: [Class, Lazyload, Togglable],
|
|
3326
3254
|
|
|
3327
3255
|
props: {
|
|
3256
|
+
animation: Boolean,
|
|
3328
3257
|
targets: String,
|
|
3329
3258
|
active: null,
|
|
3330
3259
|
collapsible: Boolean,
|
|
@@ -3337,7 +3266,7 @@
|
|
|
3337
3266
|
data: {
|
|
3338
3267
|
targets: '> *',
|
|
3339
3268
|
active: false,
|
|
3340
|
-
animation:
|
|
3269
|
+
animation: true,
|
|
3341
3270
|
collapsible: true,
|
|
3342
3271
|
multiple: false,
|
|
3343
3272
|
clsOpen: 'uk-open',
|
|
@@ -3383,7 +3312,7 @@
|
|
|
3383
3312
|
hide(
|
|
3384
3313
|
el,
|
|
3385
3314
|
!hasClass(
|
|
3386
|
-
this.items.find((item) =>
|
|
3315
|
+
this.items.find((item) => within(el, item)),
|
|
3387
3316
|
this.clsOpen));
|
|
3388
3317
|
|
|
3389
3318
|
|
|
@@ -3435,23 +3364,15 @@
|
|
|
3435
3364
|
toggleClass(el, this.clsOpen, show);
|
|
3436
3365
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3437
3366
|
|
|
3438
|
-
const content = $(
|
|
3367
|
+
const content = $(this.content, el);
|
|
3439
3368
|
|
|
3440
|
-
if (animate === false || !this.
|
|
3369
|
+
if (animate === false || !this.animation) {
|
|
3370
|
+
content.hidden = !show;
|
|
3441
3371
|
hide(content, !show);
|
|
3442
3372
|
return;
|
|
3443
3373
|
}
|
|
3444
3374
|
|
|
3445
|
-
|
|
3446
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3447
|
-
}
|
|
3448
|
-
|
|
3449
|
-
hide(content, false);
|
|
3450
|
-
await slide$1(this)(el._wrapper, show);
|
|
3451
|
-
hide(content, !show);
|
|
3452
|
-
|
|
3453
|
-
delete el._wrapper;
|
|
3454
|
-
unwrap(content);
|
|
3375
|
+
await toggleTransition(this)(content, show);
|
|
3455
3376
|
|
|
3456
3377
|
if (show) {
|
|
3457
3378
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3477,18 +3398,17 @@
|
|
|
3477
3398
|
args: 'animation',
|
|
3478
3399
|
|
|
3479
3400
|
props: {
|
|
3401
|
+
animation: Boolean,
|
|
3480
3402
|
close: String },
|
|
3481
3403
|
|
|
3482
3404
|
|
|
3483
3405
|
data: {
|
|
3484
|
-
animation:
|
|
3406
|
+
animation: true,
|
|
3485
3407
|
selClose: '.uk-alert-close',
|
|
3486
|
-
duration: 150,
|
|
3487
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3408
|
+
duration: 150 },
|
|
3488
3409
|
|
|
3489
3410
|
|
|
3490
|
-
events:
|
|
3491
|
-
{
|
|
3411
|
+
events: {
|
|
3492
3412
|
name: 'click',
|
|
3493
3413
|
|
|
3494
3414
|
delegate() {
|
|
@@ -3498,16 +3418,39 @@
|
|
|
3498
3418
|
handler(e) {
|
|
3499
3419
|
e.preventDefault();
|
|
3500
3420
|
this.close();
|
|
3501
|
-
} }
|
|
3502
|
-
|
|
3421
|
+
} },
|
|
3503
3422
|
|
|
3504
3423
|
|
|
3505
3424
|
methods: {
|
|
3506
3425
|
async close() {
|
|
3507
|
-
await this.toggleElement(this.$el);
|
|
3426
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3508
3427
|
this.$destroy(true);
|
|
3509
3428
|
} } };
|
|
3510
3429
|
|
|
3430
|
+
|
|
3431
|
+
|
|
3432
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3433
|
+
return (el) => {
|
|
3434
|
+
const height = toFloat(css(el, 'height'));
|
|
3435
|
+
css(el, 'height', height);
|
|
3436
|
+
return Transition.start(
|
|
3437
|
+
el,
|
|
3438
|
+
{
|
|
3439
|
+
height: 0,
|
|
3440
|
+
marginTop: 0,
|
|
3441
|
+
marginBottom: 0,
|
|
3442
|
+
paddingTop: 0,
|
|
3443
|
+
paddingBottom: 0,
|
|
3444
|
+
borderTop: 0,
|
|
3445
|
+
borderBottom: 0,
|
|
3446
|
+
opacity: 0 },
|
|
3447
|
+
|
|
3448
|
+
velocity * height + duration,
|
|
3449
|
+
transition);
|
|
3450
|
+
|
|
3451
|
+
};
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3511
3454
|
var Video = {
|
|
3512
3455
|
args: 'autoplay',
|
|
3513
3456
|
|
|
@@ -3656,13 +3599,17 @@
|
|
|
3656
3599
|
props: {
|
|
3657
3600
|
pos: String,
|
|
3658
3601
|
offset: null,
|
|
3659
|
-
flip: Boolean
|
|
3602
|
+
flip: Boolean,
|
|
3603
|
+
shift: Boolean,
|
|
3604
|
+
inset: Boolean },
|
|
3660
3605
|
|
|
3661
3606
|
|
|
3662
3607
|
data: {
|
|
3663
3608
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3609
|
+
offset: false,
|
|
3664
3610
|
flip: true,
|
|
3665
|
-
|
|
3611
|
+
shift: true,
|
|
3612
|
+
inset: false },
|
|
3666
3613
|
|
|
3667
3614
|
|
|
3668
3615
|
connected() {
|
|
@@ -3674,19 +3621,24 @@
|
|
|
3674
3621
|
methods: {
|
|
3675
3622
|
positionAt(element, target, boundary) {
|
|
3676
3623
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3624
|
+
const placement = [this.flip, this.shift];
|
|
3677
3625
|
|
|
3678
3626
|
const attach = {
|
|
3679
|
-
element: [flipPosition(this.dir), this.align],
|
|
3627
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3680
3628
|
target: [this.dir, this.align] };
|
|
3681
3629
|
|
|
3682
3630
|
|
|
3683
3631
|
if (this.axis === 'y') {
|
|
3684
3632
|
for (const prop in attach) {
|
|
3685
|
-
attach[prop]
|
|
3633
|
+
attach[prop].reverse();
|
|
3686
3634
|
}
|
|
3687
|
-
offset
|
|
3635
|
+
offset.reverse();
|
|
3636
|
+
placement.reverse();
|
|
3688
3637
|
}
|
|
3689
3638
|
|
|
3639
|
+
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
3640
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
3641
|
+
|
|
3690
3642
|
// Ensure none positioned element does not generate scrollbars
|
|
3691
3643
|
const elDim = dimensions$1(element);
|
|
3692
3644
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
@@ -3695,93 +3647,88 @@
|
|
|
3695
3647
|
attach,
|
|
3696
3648
|
offset,
|
|
3697
3649
|
boundary,
|
|
3698
|
-
|
|
3650
|
+
placement,
|
|
3699
3651
|
viewportOffset: this.getViewportOffset(element) });
|
|
3700
3652
|
|
|
3653
|
+
|
|
3654
|
+
// Restore scroll position
|
|
3655
|
+
scrollElement.scrollTop = scrollTop;
|
|
3656
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
3701
3657
|
},
|
|
3702
3658
|
|
|
3703
3659
|
getPositionOffset(element) {
|
|
3704
3660
|
return (
|
|
3705
3661
|
toPx(
|
|
3706
|
-
this.offset === false ?
|
|
3662
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3707
3663
|
this.axis === 'x' ? 'width' : 'height',
|
|
3708
3664
|
element) * (
|
|
3709
|
-
|
|
3665
|
+
|
|
3666
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3667
|
+
this.inset ? -1 : 1));
|
|
3710
3668
|
|
|
3711
3669
|
},
|
|
3712
3670
|
|
|
3713
3671
|
getShiftOffset(element) {
|
|
3714
|
-
return
|
|
3672
|
+
return this.align === 'center' ?
|
|
3715
3673
|
0 :
|
|
3716
3674
|
toPx(
|
|
3717
|
-
|
|
3675
|
+
css(element, '--uk-position-shift-offset'),
|
|
3718
3676
|
this.axis === 'y' ? 'width' : 'height',
|
|
3719
3677
|
element) * (
|
|
3720
3678
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3721
3679
|
},
|
|
3722
3680
|
|
|
3723
3681
|
getViewportOffset(element) {
|
|
3724
|
-
return toPx(
|
|
3682
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3725
3683
|
} } };
|
|
3726
3684
|
|
|
3727
|
-
|
|
3685
|
+
var Style = {
|
|
3686
|
+
beforeConnect() {
|
|
3687
|
+
this._style = attr(this.$el, 'style');
|
|
3688
|
+
},
|
|
3728
3689
|
|
|
3729
|
-
|
|
3730
|
-
|
|
3690
|
+
disconnected() {
|
|
3691
|
+
attr(this.$el, 'style', this._style);
|
|
3692
|
+
} };
|
|
3731
3693
|
|
|
3732
|
-
|
|
3694
|
+
const active$1 = [];
|
|
3695
|
+
|
|
3696
|
+
var Modal = {
|
|
3697
|
+
mixins: [Class, Container, Togglable],
|
|
3733
3698
|
|
|
3734
3699
|
props: {
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
delayHide: Number,
|
|
3741
|
-
display: String,
|
|
3742
|
-
clsDrop: String,
|
|
3743
|
-
animateOut: Boolean },
|
|
3700
|
+
selPanel: String,
|
|
3701
|
+
selClose: String,
|
|
3702
|
+
escClose: Boolean,
|
|
3703
|
+
bgClose: Boolean,
|
|
3704
|
+
stack: Boolean },
|
|
3744
3705
|
|
|
3745
3706
|
|
|
3746
3707
|
data: {
|
|
3747
|
-
mode: ['click', 'hover'],
|
|
3748
|
-
toggle: '- *',
|
|
3749
|
-
boundary: true,
|
|
3750
|
-
boundaryAlign: false,
|
|
3751
|
-
delayShow: 0,
|
|
3752
|
-
delayHide: 800,
|
|
3753
|
-
display: null,
|
|
3754
|
-
clsDrop: false,
|
|
3755
|
-
animation: ['uk-animation-fade'],
|
|
3756
3708
|
cls: 'uk-open',
|
|
3757
|
-
|
|
3758
|
-
|
|
3709
|
+
escClose: true,
|
|
3710
|
+
bgClose: true,
|
|
3711
|
+
overlay: true,
|
|
3712
|
+
stack: false },
|
|
3759
3713
|
|
|
3760
3714
|
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3715
|
+
computed: {
|
|
3716
|
+
panel(_ref, $el) {let { selPanel } = _ref;
|
|
3717
|
+
return $(selPanel, $el);
|
|
3718
|
+
},
|
|
3764
3719
|
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3720
|
+
transitionElement() {
|
|
3721
|
+
return this.panel;
|
|
3722
|
+
},
|
|
3768
3723
|
|
|
3769
|
-
|
|
3770
|
-
|
|
3724
|
+
bgClose(_ref2) {let { bgClose } = _ref2;
|
|
3725
|
+
return bgClose && this.panel;
|
|
3726
|
+
} },
|
|
3771
3727
|
|
|
3772
|
-
if (this.toggle && !this.target) {
|
|
3773
|
-
this.target = this.$create('toggle', query(this.toggle, this.$el), {
|
|
3774
|
-
target: this.$el,
|
|
3775
|
-
mode: this.mode }).
|
|
3776
|
-
$el;
|
|
3777
|
-
attr(this.target, 'aria-haspopup', true);
|
|
3778
|
-
this.lazyload(this.target);
|
|
3779
|
-
}
|
|
3780
|
-
},
|
|
3781
3728
|
|
|
3782
|
-
|
|
3783
|
-
if (this
|
|
3784
|
-
|
|
3729
|
+
beforeDisconnect() {
|
|
3730
|
+
if (includes(active$1, this)) {
|
|
3731
|
+
this.toggleElement(this.$el, false, false);
|
|
3785
3732
|
}
|
|
3786
3733
|
},
|
|
3787
3734
|
|
|
@@ -3790,47 +3737,424 @@
|
|
|
3790
3737
|
name: 'click',
|
|
3791
3738
|
|
|
3792
3739
|
delegate() {
|
|
3793
|
-
return
|
|
3740
|
+
return this.selClose;
|
|
3794
3741
|
},
|
|
3795
3742
|
|
|
3796
3743
|
handler(e) {
|
|
3797
3744
|
e.preventDefault();
|
|
3798
|
-
this.hide(
|
|
3745
|
+
this.hide();
|
|
3799
3746
|
} },
|
|
3800
3747
|
|
|
3801
3748
|
|
|
3802
3749
|
{
|
|
3803
|
-
name: '
|
|
3750
|
+
name: 'toggle',
|
|
3804
3751
|
|
|
3805
|
-
|
|
3806
|
-
return 'a[href^="#"]';
|
|
3807
|
-
},
|
|
3752
|
+
self: true,
|
|
3808
3753
|
|
|
3809
|
-
handler(
|
|
3810
|
-
if (
|
|
3811
|
-
|
|
3754
|
+
handler(e) {
|
|
3755
|
+
if (e.defaultPrevented) {
|
|
3756
|
+
return;
|
|
3812
3757
|
}
|
|
3813
|
-
} },
|
|
3814
3758
|
|
|
3759
|
+
e.preventDefault();
|
|
3815
3760
|
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
handler() {
|
|
3820
|
-
this.hide(false);
|
|
3761
|
+
if (this.isToggled() === includes(active$1, this)) {
|
|
3762
|
+
this.toggle();
|
|
3763
|
+
}
|
|
3821
3764
|
} },
|
|
3822
3765
|
|
|
3823
3766
|
|
|
3824
3767
|
{
|
|
3825
|
-
name: '
|
|
3768
|
+
name: 'beforeshow',
|
|
3826
3769
|
|
|
3827
3770
|
self: true,
|
|
3828
3771
|
|
|
3829
|
-
handler(e
|
|
3830
|
-
|
|
3772
|
+
handler(e) {
|
|
3773
|
+
if (includes(active$1, this)) {
|
|
3774
|
+
return false;
|
|
3775
|
+
}
|
|
3831
3776
|
|
|
3832
|
-
if (this.
|
|
3833
|
-
|
|
3777
|
+
if (!this.stack && active$1.length) {
|
|
3778
|
+
Promise.all(active$1.map((modal) => modal.hide())).then(this.show);
|
|
3779
|
+
e.preventDefault();
|
|
3780
|
+
} else {
|
|
3781
|
+
active$1.push(this);
|
|
3782
|
+
}
|
|
3783
|
+
} },
|
|
3784
|
+
|
|
3785
|
+
|
|
3786
|
+
{
|
|
3787
|
+
name: 'show',
|
|
3788
|
+
|
|
3789
|
+
self: true,
|
|
3790
|
+
|
|
3791
|
+
handler() {
|
|
3792
|
+
once(
|
|
3793
|
+
this.$el,
|
|
3794
|
+
'hide',
|
|
3795
|
+
on(document, 'focusin', (e) => {
|
|
3796
|
+
if (last(active$1) === this && !within(e.target, this.$el)) {
|
|
3797
|
+
this.$el.focus();
|
|
3798
|
+
}
|
|
3799
|
+
}));
|
|
3800
|
+
|
|
3801
|
+
|
|
3802
|
+
if (this.overlay) {
|
|
3803
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el));
|
|
3804
|
+
once(this.$el, 'hidden', preventBackgroundScroll());
|
|
3805
|
+
}
|
|
3806
|
+
|
|
3807
|
+
if (this.stack) {
|
|
3808
|
+
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active$1.length);
|
|
3809
|
+
}
|
|
3810
|
+
|
|
3811
|
+
addClass(document.documentElement, this.clsPage);
|
|
3812
|
+
|
|
3813
|
+
if (this.bgClose) {
|
|
3814
|
+
once(
|
|
3815
|
+
this.$el,
|
|
3816
|
+
'hide',
|
|
3817
|
+
on(document, pointerDown$1, (_ref3) => {let { target } = _ref3;
|
|
3818
|
+
if (
|
|
3819
|
+
last(active$1) !== this ||
|
|
3820
|
+
this.overlay && !within(target, this.$el) ||
|
|
3821
|
+
within(target, this.panel))
|
|
3822
|
+
{
|
|
3823
|
+
return;
|
|
3824
|
+
}
|
|
3825
|
+
|
|
3826
|
+
once(
|
|
3827
|
+
document,
|
|
3828
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
3829
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3830
|
+
if (
|
|
3831
|
+
!defaultPrevented &&
|
|
3832
|
+
type === pointerUp$1 &&
|
|
3833
|
+
target === newTarget)
|
|
3834
|
+
{
|
|
3835
|
+
this.hide();
|
|
3836
|
+
}
|
|
3837
|
+
},
|
|
3838
|
+
true);
|
|
3839
|
+
|
|
3840
|
+
}),
|
|
3841
|
+
{ self: true });
|
|
3842
|
+
|
|
3843
|
+
}
|
|
3844
|
+
|
|
3845
|
+
if (this.escClose) {
|
|
3846
|
+
once(
|
|
3847
|
+
this.$el,
|
|
3848
|
+
'hide',
|
|
3849
|
+
on(document, 'keydown', (e) => {
|
|
3850
|
+
if (e.keyCode === 27 && last(active$1) === this) {
|
|
3851
|
+
this.hide();
|
|
3852
|
+
}
|
|
3853
|
+
}),
|
|
3854
|
+
{ self: true });
|
|
3855
|
+
|
|
3856
|
+
}
|
|
3857
|
+
} },
|
|
3858
|
+
|
|
3859
|
+
|
|
3860
|
+
{
|
|
3861
|
+
name: 'shown',
|
|
3862
|
+
|
|
3863
|
+
self: true,
|
|
3864
|
+
|
|
3865
|
+
handler() {
|
|
3866
|
+
if (!isFocusable(this.$el)) {
|
|
3867
|
+
attr(this.$el, 'tabindex', '-1');
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
if (!$(':focus', this.$el)) {
|
|
3871
|
+
this.$el.focus();
|
|
3872
|
+
}
|
|
3873
|
+
} },
|
|
3874
|
+
|
|
3875
|
+
|
|
3876
|
+
{
|
|
3877
|
+
name: 'hidden',
|
|
3878
|
+
|
|
3879
|
+
self: true,
|
|
3880
|
+
|
|
3881
|
+
handler() {
|
|
3882
|
+
if (includes(active$1, this)) {
|
|
3883
|
+
active$1.splice(active$1.indexOf(this), 1);
|
|
3884
|
+
}
|
|
3885
|
+
|
|
3886
|
+
css(this.$el, 'zIndex', '');
|
|
3887
|
+
|
|
3888
|
+
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
3889
|
+
removeClass(document.documentElement, this.clsPage);
|
|
3890
|
+
}
|
|
3891
|
+
} }],
|
|
3892
|
+
|
|
3893
|
+
|
|
3894
|
+
|
|
3895
|
+
methods: {
|
|
3896
|
+
toggle() {
|
|
3897
|
+
return this.isToggled() ? this.hide() : this.show();
|
|
3898
|
+
},
|
|
3899
|
+
|
|
3900
|
+
show() {
|
|
3901
|
+
if (this.container && parent(this.$el) !== this.container) {
|
|
3902
|
+
append(this.container, this.$el);
|
|
3903
|
+
return new Promise((resolve) =>
|
|
3904
|
+
requestAnimationFrame(() => this.show().then(resolve)));
|
|
3905
|
+
|
|
3906
|
+
}
|
|
3907
|
+
|
|
3908
|
+
return this.toggleElement(this.$el, true, animate(this));
|
|
3909
|
+
},
|
|
3910
|
+
|
|
3911
|
+
hide() {
|
|
3912
|
+
return this.toggleElement(this.$el, false, animate(this));
|
|
3913
|
+
} } };
|
|
3914
|
+
|
|
3915
|
+
|
|
3916
|
+
|
|
3917
|
+
function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
|
|
3918
|
+
return (el, show) =>
|
|
3919
|
+
new Promise((resolve, reject) =>
|
|
3920
|
+
once(el, 'show hide', () => {
|
|
3921
|
+
el._reject == null ? void 0 : el._reject();
|
|
3922
|
+
el._reject = reject;
|
|
3923
|
+
|
|
3924
|
+
_toggle(el, show);
|
|
3925
|
+
|
|
3926
|
+
const off = once(
|
|
3927
|
+
transitionElement,
|
|
3928
|
+
'transitionstart',
|
|
3929
|
+
() => {
|
|
3930
|
+
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
3931
|
+
self: true });
|
|
3932
|
+
|
|
3933
|
+
clearTimeout(timer);
|
|
3934
|
+
},
|
|
3935
|
+
{ self: true });
|
|
3936
|
+
|
|
3937
|
+
|
|
3938
|
+
const timer = setTimeout(() => {
|
|
3939
|
+
off();
|
|
3940
|
+
resolve();
|
|
3941
|
+
}, toMs(css(transitionElement, 'transitionDuration')));
|
|
3942
|
+
})).
|
|
3943
|
+
then(() => delete el._reject);
|
|
3944
|
+
}
|
|
3945
|
+
|
|
3946
|
+
function toMs(time) {
|
|
3947
|
+
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
3948
|
+
}
|
|
3949
|
+
|
|
3950
|
+
function preventOverscroll(el) {
|
|
3951
|
+
if (CSS.supports('overscroll-behavior', 'contain')) {
|
|
3952
|
+
const elements = filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')));
|
|
3953
|
+
css(elements, 'overscrollBehavior', 'contain');
|
|
3954
|
+
return () => css(elements, 'overscrollBehavior', '');
|
|
3955
|
+
}
|
|
3956
|
+
|
|
3957
|
+
let startClientY;
|
|
3958
|
+
|
|
3959
|
+
const events = [
|
|
3960
|
+
on(
|
|
3961
|
+
el,
|
|
3962
|
+
'touchstart',
|
|
3963
|
+
(_ref6) => {let { targetTouches } = _ref6;
|
|
3964
|
+
if (targetTouches.length === 1) {
|
|
3965
|
+
startClientY = targetTouches[0].clientY;
|
|
3966
|
+
}
|
|
3967
|
+
},
|
|
3968
|
+
{ passive: true }),
|
|
3969
|
+
|
|
3970
|
+
|
|
3971
|
+
on(
|
|
3972
|
+
el,
|
|
3973
|
+
'touchmove',
|
|
3974
|
+
(e) => {
|
|
3975
|
+
if (e.targetTouches.length !== 1) {
|
|
3976
|
+
return;
|
|
3977
|
+
}
|
|
3978
|
+
|
|
3979
|
+
let [scrollParent] = scrollParents(e.target, /auto|scroll/);
|
|
3980
|
+
if (!within(scrollParent, el)) {
|
|
3981
|
+
scrollParent = el;
|
|
3982
|
+
}
|
|
3983
|
+
|
|
3984
|
+
const clientY = e.targetTouches[0].clientY - startClientY;
|
|
3985
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollParent;
|
|
3986
|
+
|
|
3987
|
+
if (
|
|
3988
|
+
clientHeight >= scrollHeight ||
|
|
3989
|
+
scrollTop === 0 && clientY > 0 ||
|
|
3990
|
+
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
3991
|
+
{
|
|
3992
|
+
e.cancelable && e.preventDefault();
|
|
3993
|
+
}
|
|
3994
|
+
},
|
|
3995
|
+
{ passive: false })];
|
|
3996
|
+
|
|
3997
|
+
|
|
3998
|
+
|
|
3999
|
+
return () => events.forEach((fn) => fn());
|
|
4000
|
+
}
|
|
4001
|
+
|
|
4002
|
+
let prevented;
|
|
4003
|
+
function preventBackgroundScroll() {
|
|
4004
|
+
if (prevented) {
|
|
4005
|
+
return noop;
|
|
4006
|
+
}
|
|
4007
|
+
prevented = true;
|
|
4008
|
+
const { body, documentElement } = document;
|
|
4009
|
+
css(body, {
|
|
4010
|
+
overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
|
|
4011
|
+
touchAction: 'none' });
|
|
4012
|
+
|
|
4013
|
+
css(documentElement, 'overflowY', 'hidden');
|
|
4014
|
+
return () => {
|
|
4015
|
+
prevented = false;
|
|
4016
|
+
css(documentElement, 'overflowY', '');
|
|
4017
|
+
css(body, { overflowY: '', touchAction: '' });
|
|
4018
|
+
};
|
|
4019
|
+
}
|
|
4020
|
+
|
|
4021
|
+
function filterChildren(el, fn) {
|
|
4022
|
+
const children = [];
|
|
4023
|
+
apply(el, (node) => {
|
|
4024
|
+
if (fn(node)) {
|
|
4025
|
+
children.push(node);
|
|
4026
|
+
}
|
|
4027
|
+
});
|
|
4028
|
+
return children;
|
|
4029
|
+
}
|
|
4030
|
+
|
|
4031
|
+
let active;
|
|
4032
|
+
|
|
4033
|
+
var drop = {
|
|
4034
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4035
|
+
|
|
4036
|
+
args: 'pos',
|
|
4037
|
+
|
|
4038
|
+
props: {
|
|
4039
|
+
mode: 'list',
|
|
4040
|
+
toggle: Boolean,
|
|
4041
|
+
boundary: Boolean,
|
|
4042
|
+
target: Boolean,
|
|
4043
|
+
targetX: Boolean,
|
|
4044
|
+
targetY: Boolean,
|
|
4045
|
+
stretch: Boolean,
|
|
4046
|
+
delayShow: Number,
|
|
4047
|
+
delayHide: Number,
|
|
4048
|
+
display: String,
|
|
4049
|
+
clsDrop: String,
|
|
4050
|
+
animateOut: Boolean,
|
|
4051
|
+
bgScroll: Boolean },
|
|
4052
|
+
|
|
4053
|
+
|
|
4054
|
+
data: {
|
|
4055
|
+
mode: ['click', 'hover'],
|
|
4056
|
+
toggle: '- *',
|
|
4057
|
+
boundary: false,
|
|
4058
|
+
target: false,
|
|
4059
|
+
targetX: false,
|
|
4060
|
+
targetY: false,
|
|
4061
|
+
stretch: false,
|
|
4062
|
+
delayShow: 0,
|
|
4063
|
+
delayHide: 800,
|
|
4064
|
+
display: null,
|
|
4065
|
+
clsDrop: false,
|
|
4066
|
+
animateOut: false,
|
|
4067
|
+
bgScroll: true,
|
|
4068
|
+
animation: ['uk-animation-fade'],
|
|
4069
|
+
cls: 'uk-open',
|
|
4070
|
+
container: false },
|
|
4071
|
+
|
|
4072
|
+
|
|
4073
|
+
computed: {
|
|
4074
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4075
|
+
targetX = targetX || target || this.targetEl;
|
|
4076
|
+
targetY = targetY || target || this.targetEl;
|
|
4077
|
+
|
|
4078
|
+
return [
|
|
4079
|
+
targetX === true ? window : query(targetX, $el),
|
|
4080
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4081
|
+
|
|
4082
|
+
} },
|
|
4083
|
+
|
|
4084
|
+
|
|
4085
|
+
created() {
|
|
4086
|
+
this.tracker = new MouseTracker();
|
|
4087
|
+
},
|
|
4088
|
+
|
|
4089
|
+
beforeConnect() {
|
|
4090
|
+
this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
|
|
4091
|
+
},
|
|
4092
|
+
|
|
4093
|
+
connected() {
|
|
4094
|
+
addClass(this.$el, this.clsDrop);
|
|
4095
|
+
|
|
4096
|
+
if (this.toggle && !this.targetEl) {
|
|
4097
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4098
|
+
target: this.$el,
|
|
4099
|
+
mode: this.mode }).
|
|
4100
|
+
$el;
|
|
4101
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4102
|
+
this.lazyload(this.targetEl);
|
|
4103
|
+
}
|
|
4104
|
+
},
|
|
4105
|
+
|
|
4106
|
+
disconnected() {
|
|
4107
|
+
if (this.isActive()) {
|
|
4108
|
+
active = null;
|
|
4109
|
+
}
|
|
4110
|
+
},
|
|
4111
|
+
|
|
4112
|
+
events: [
|
|
4113
|
+
{
|
|
4114
|
+
name: 'click',
|
|
4115
|
+
|
|
4116
|
+
delegate() {
|
|
4117
|
+
return "." + this.clsDrop + "-close";
|
|
4118
|
+
},
|
|
4119
|
+
|
|
4120
|
+
handler(e) {
|
|
4121
|
+
e.preventDefault();
|
|
4122
|
+
this.hide(false);
|
|
4123
|
+
} },
|
|
4124
|
+
|
|
4125
|
+
|
|
4126
|
+
{
|
|
4127
|
+
name: 'click',
|
|
4128
|
+
|
|
4129
|
+
delegate() {
|
|
4130
|
+
return 'a[href^="#"]';
|
|
4131
|
+
},
|
|
4132
|
+
|
|
4133
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4134
|
+
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4135
|
+
this.hide(false);
|
|
4136
|
+
}
|
|
4137
|
+
} },
|
|
4138
|
+
|
|
4139
|
+
|
|
4140
|
+
{
|
|
4141
|
+
name: 'beforescroll',
|
|
4142
|
+
|
|
4143
|
+
handler() {
|
|
4144
|
+
this.hide(false);
|
|
4145
|
+
} },
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
{
|
|
4149
|
+
name: 'toggle',
|
|
4150
|
+
|
|
4151
|
+
self: true,
|
|
4152
|
+
|
|
4153
|
+
handler(e, toggle) {
|
|
4154
|
+
e.preventDefault();
|
|
4155
|
+
|
|
4156
|
+
if (this.isToggled()) {
|
|
4157
|
+
this.hide(false);
|
|
3834
4158
|
} else {
|
|
3835
4159
|
this.show(toggle == null ? void 0 : toggle.$el, false);
|
|
3836
4160
|
}
|
|
@@ -3910,25 +4234,25 @@
|
|
|
3910
4234
|
self: true,
|
|
3911
4235
|
|
|
3912
4236
|
handler() {
|
|
3913
|
-
active
|
|
4237
|
+
active = this;
|
|
3914
4238
|
|
|
3915
4239
|
this.tracker.init();
|
|
3916
4240
|
|
|
3917
4241
|
for (const handler of [
|
|
3918
4242
|
on(
|
|
3919
4243
|
document,
|
|
3920
|
-
pointerDown,
|
|
3921
|
-
(
|
|
4244
|
+
pointerDown$1,
|
|
4245
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
3922
4246
|
!within(target, this.$el) &&
|
|
3923
4247
|
once(
|
|
3924
4248
|
document,
|
|
3925
|
-
pointerUp + " " + pointerCancel + " scroll",
|
|
3926
|
-
(
|
|
4249
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
4250
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3927
4251
|
if (
|
|
3928
4252
|
!defaultPrevented &&
|
|
3929
|
-
type === pointerUp &&
|
|
4253
|
+
type === pointerUp$1 &&
|
|
3930
4254
|
target === newTarget &&
|
|
3931
|
-
!(this.
|
|
4255
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
3932
4256
|
{
|
|
3933
4257
|
this.hide(false);
|
|
3934
4258
|
}
|
|
@@ -3943,13 +4267,17 @@
|
|
|
3943
4267
|
}
|
|
3944
4268
|
}),
|
|
3945
4269
|
|
|
3946
|
-
...(this.
|
|
4270
|
+
...(this.bgScroll ?
|
|
4271
|
+
[] :
|
|
4272
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()]),
|
|
4273
|
+
|
|
4274
|
+
...(this.display === 'static' ?
|
|
3947
4275
|
[] :
|
|
3948
4276
|
(() => {
|
|
3949
4277
|
const handler = () => this.$emit();
|
|
3950
4278
|
return [
|
|
3951
4279
|
on(window, 'resize', handler),
|
|
3952
|
-
on(document, 'scroll', handler
|
|
4280
|
+
on([document, scrollParents(this.$el)], 'scroll', handler),
|
|
3953
4281
|
(() => {
|
|
3954
4282
|
const observer = observeResize(
|
|
3955
4283
|
scrollParents(this.$el),
|
|
@@ -3978,16 +4306,16 @@
|
|
|
3978
4306
|
{
|
|
3979
4307
|
name: 'hide',
|
|
3980
4308
|
|
|
3981
|
-
handler(
|
|
4309
|
+
handler(_ref5) {let { target } = _ref5;
|
|
3982
4310
|
if (this.$el !== target) {
|
|
3983
|
-
active
|
|
3984
|
-
active
|
|
4311
|
+
active =
|
|
4312
|
+
active === null && within(target, this.$el) && this.isToggled() ?
|
|
3985
4313
|
this :
|
|
3986
|
-
active
|
|
4314
|
+
active;
|
|
3987
4315
|
return;
|
|
3988
4316
|
}
|
|
3989
4317
|
|
|
3990
|
-
active
|
|
4318
|
+
active = this.isActive() ? null : active;
|
|
3991
4319
|
this.tracker.cancel();
|
|
3992
4320
|
} }],
|
|
3993
4321
|
|
|
@@ -4002,12 +4330,12 @@
|
|
|
4002
4330
|
|
|
4003
4331
|
|
|
4004
4332
|
methods: {
|
|
4005
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4006
|
-
if (this.isToggled() && target && this.
|
|
4333
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4334
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4007
4335
|
this.hide(false, false);
|
|
4008
4336
|
}
|
|
4009
4337
|
|
|
4010
|
-
this.
|
|
4338
|
+
this.targetEl = target;
|
|
4011
4339
|
|
|
4012
4340
|
this.clearTimers();
|
|
4013
4341
|
|
|
@@ -4015,16 +4343,16 @@
|
|
|
4015
4343
|
return;
|
|
4016
4344
|
}
|
|
4017
4345
|
|
|
4018
|
-
if (active
|
|
4019
|
-
if (delay && active
|
|
4346
|
+
if (active) {
|
|
4347
|
+
if (delay && active.isDelaying) {
|
|
4020
4348
|
this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
|
|
4021
4349
|
return;
|
|
4022
4350
|
}
|
|
4023
4351
|
|
|
4024
4352
|
let prev;
|
|
4025
|
-
while (active
|
|
4026
|
-
prev = active
|
|
4027
|
-
active
|
|
4353
|
+
while (active && prev !== active && !within(this.$el, active.$el)) {
|
|
4354
|
+
prev = active;
|
|
4355
|
+
active.hide(false, false);
|
|
4028
4356
|
}
|
|
4029
4357
|
}
|
|
4030
4358
|
|
|
@@ -4065,65 +4393,74 @@
|
|
|
4065
4393
|
},
|
|
4066
4394
|
|
|
4067
4395
|
isActive() {
|
|
4068
|
-
return active
|
|
4396
|
+
return active === this;
|
|
4069
4397
|
},
|
|
4070
4398
|
|
|
4071
4399
|
position() {
|
|
4072
4400
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4073
|
-
|
|
4074
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4401
|
+
attr(this.$el, 'style', this._style);
|
|
4075
4402
|
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
const [scrollParent] = scrollParents(
|
|
4079
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4403
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4404
|
+
this.$el.hidden = true;
|
|
4080
4405
|
|
|
4081
|
-
const
|
|
4082
|
-
const boundaryOffset = boundary
|
|
4406
|
+
const boundary = query(this.boundary, this.$el);
|
|
4407
|
+
const boundaryOffset = offsetViewport(boundary || window);
|
|
4408
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4083
4409
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4084
4410
|
|
|
4085
|
-
|
|
4086
|
-
|
|
4411
|
+
const dirs = [
|
|
4412
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4413
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4087
4414
|
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4105
|
-
|
|
4106
|
-
css(this.$el, {
|
|
4107
|
-
width:
|
|
4108
|
-
this.axis === 'y' ?
|
|
4109
|
-
viewport.width :
|
|
4110
|
-
(this.dir === 'left' ?
|
|
4111
|
-
targetDim.left - viewport.left :
|
|
4112
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4113
|
-
height:
|
|
4114
|
-
this.axis === 'x' ?
|
|
4115
|
-
viewport.height :
|
|
4116
|
-
(this.dir === 'top' ?
|
|
4117
|
-
targetDim.top - viewport.top :
|
|
4118
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4119
|
-
|
|
4120
|
-
} else if (this.$el.offsetWidth > maxWidth) {
|
|
4415
|
+
|
|
4416
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4417
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4418
|
+
css(this.$el, {
|
|
4419
|
+
[prop]: Math.min(
|
|
4420
|
+
boundaryOffset[prop],
|
|
4421
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4422
|
+
|
|
4423
|
+
["overflow-" + axis]: 'auto' });
|
|
4424
|
+
|
|
4425
|
+
}
|
|
4426
|
+
}
|
|
4427
|
+
|
|
4428
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4429
|
+
|
|
4430
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4121
4431
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4122
4432
|
}
|
|
4123
4433
|
|
|
4124
4434
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4125
4435
|
|
|
4126
|
-
this
|
|
4436
|
+
this.$el.hidden = false;
|
|
4437
|
+
|
|
4438
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4439
|
+
|
|
4440
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4441
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4442
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4443
|
+
const targetOffset = offset(this.target[i]);
|
|
4444
|
+
const elOffset = offset(this.$el);
|
|
4445
|
+
|
|
4446
|
+
css(this.$el, {
|
|
4447
|
+
[prop]:
|
|
4448
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4449
|
+
targetOffset[start] -
|
|
4450
|
+
Math.max(
|
|
4451
|
+
boundaryOffset[start],
|
|
4452
|
+
viewports[i][start] + viewportOffset) :
|
|
4453
|
+
|
|
4454
|
+
Math.min(
|
|
4455
|
+
boundaryOffset[end],
|
|
4456
|
+
viewports[i][end] - viewportOffset) -
|
|
4457
|
+
targetOffset[end]) - positionOffset,
|
|
4458
|
+
["overflow-" + axis]: 'auto' });
|
|
4459
|
+
|
|
4460
|
+
|
|
4461
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4462
|
+
}
|
|
4463
|
+
}
|
|
4127
4464
|
} } };
|
|
4128
4465
|
|
|
4129
4466
|
|
|
@@ -4620,8 +4957,11 @@
|
|
|
4620
4957
|
let minHeight = '';
|
|
4621
4958
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4622
4959
|
|
|
4960
|
+
const { body, scrollingElement } = document;
|
|
4623
4961
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4624
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4962
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4963
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4964
|
+
|
|
4625
4965
|
|
|
4626
4966
|
if (this.expand) {
|
|
4627
4967
|
minHeight = Math.max(
|
|
@@ -4631,14 +4971,19 @@
|
|
|
4631
4971
|
0);
|
|
4632
4972
|
|
|
4633
4973
|
} else {
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
|
|
4974
|
+
const isScrollingElement =
|
|
4975
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
4637
4976
|
|
|
4977
|
+
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4978
|
+
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
4638
4979
|
|
|
4639
4980
|
if (this.offsetTop) {
|
|
4640
|
-
|
|
4641
|
-
|
|
4981
|
+
if (isScrollingElement) {
|
|
4982
|
+
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4983
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4984
|
+
} else {
|
|
4985
|
+
minHeight += " - " + css(scrollElement, 'paddingTop');
|
|
4986
|
+
}
|
|
4642
4987
|
}
|
|
4643
4988
|
|
|
4644
4989
|
if (this.offsetBottom === true) {
|
|
@@ -4877,11 +5222,17 @@
|
|
|
4877
5222
|
|
|
4878
5223
|
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>";
|
|
4879
5224
|
|
|
4880
|
-
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>";
|
|
5225
|
+
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>";
|
|
5226
|
+
|
|
5227
|
+
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>";
|
|
5228
|
+
|
|
5229
|
+
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>";
|
|
5230
|
+
|
|
5231
|
+
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>";
|
|
4881
5232
|
|
|
4882
|
-
var
|
|
5233
|
+
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>";
|
|
4883
5234
|
|
|
4884
|
-
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"
|
|
5235
|
+
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>";
|
|
4885
5236
|
|
|
4886
5237
|
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>";
|
|
4887
5238
|
|
|
@@ -4913,6 +5264,9 @@
|
|
|
4913
5264
|
marker,
|
|
4914
5265
|
'close-icon': closeIcon,
|
|
4915
5266
|
'close-large': closeLarge,
|
|
5267
|
+
'nav-parent-icon': navParentIcon,
|
|
5268
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5269
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
4916
5270
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
4917
5271
|
'overlay-icon': overlayIcon,
|
|
4918
5272
|
'pagination-next': paginationNext,
|
|
@@ -4970,6 +5324,15 @@
|
|
|
4970
5324
|
} };
|
|
4971
5325
|
|
|
4972
5326
|
|
|
5327
|
+
const NavParentIcon = {
|
|
5328
|
+
extends: IconComponent,
|
|
5329
|
+
|
|
5330
|
+
beforeConnect() {
|
|
5331
|
+
const icon = this.$props.icon;
|
|
5332
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5333
|
+
} };
|
|
5334
|
+
|
|
5335
|
+
|
|
4973
5336
|
const Slidenav = {
|
|
4974
5337
|
extends: IconComponent,
|
|
4975
5338
|
|
|
@@ -5181,385 +5544,133 @@
|
|
|
5181
5544
|
append(picture, source);
|
|
5182
5545
|
}
|
|
5183
5546
|
append(picture, img);
|
|
5184
|
-
}
|
|
5185
|
-
}
|
|
5186
|
-
|
|
5187
|
-
function parseSources(sources) {
|
|
5188
|
-
if (!sources) {
|
|
5189
|
-
return [];
|
|
5190
|
-
}
|
|
5191
|
-
|
|
5192
|
-
if (startsWith(sources, '[')) {
|
|
5193
|
-
try {
|
|
5194
|
-
sources = JSON.parse(sources);
|
|
5195
|
-
} catch (e) {
|
|
5196
|
-
sources = [];
|
|
5197
|
-
}
|
|
5198
|
-
} else {
|
|
5199
|
-
sources = parseOptions(sources);
|
|
5200
|
-
}
|
|
5201
|
-
|
|
5202
|
-
if (!isArray(sources)) {
|
|
5203
|
-
sources = [sources];
|
|
5204
|
-
}
|
|
5205
|
-
|
|
5206
|
-
return sources.filter((source) => !isEmpty(source));
|
|
5207
|
-
}
|
|
5208
|
-
|
|
5209
|
-
function ensureSrcAttribute(el) {
|
|
5210
|
-
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
5211
|
-
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
5212
|
-
}
|
|
5213
|
-
}
|
|
5214
|
-
|
|
5215
|
-
function isPicture(el) {
|
|
5216
|
-
return isTag(el, 'picture');
|
|
5217
|
-
}
|
|
5218
|
-
|
|
5219
|
-
function isImg(el) {
|
|
5220
|
-
return isTag(el, 'img');
|
|
5221
|
-
}
|
|
5222
|
-
|
|
5223
|
-
var Media = {
|
|
5224
|
-
props: {
|
|
5225
|
-
media: Boolean },
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
data: {
|
|
5229
|
-
media: false },
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
connected() {
|
|
5233
|
-
const media = toMedia(this.media);
|
|
5234
|
-
this.matchMedia = true;
|
|
5235
|
-
if (media) {
|
|
5236
|
-
this.mediaObj = window.matchMedia(media);
|
|
5237
|
-
const handler = () => {
|
|
5238
|
-
this.matchMedia = this.mediaObj.matches;
|
|
5239
|
-
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5240
|
-
};
|
|
5241
|
-
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5242
|
-
handler();
|
|
5243
|
-
this.$emit('resize');
|
|
5244
|
-
});
|
|
5245
|
-
handler();
|
|
5246
|
-
}
|
|
5247
|
-
},
|
|
5248
|
-
|
|
5249
|
-
disconnected() {var _this$offMediaObj;
|
|
5250
|
-
(_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
|
|
5251
|
-
} };
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
function toMedia(value) {
|
|
5255
|
-
if (isString(value)) {
|
|
5256
|
-
if (startsWith(value, '@')) {
|
|
5257
|
-
const name = "breakpoint-" + value.substr(1);
|
|
5258
|
-
value = toFloat(getCssVar(name));
|
|
5259
|
-
} else if (isNaN(value)) {
|
|
5260
|
-
return value;
|
|
5261
|
-
}
|
|
5262
|
-
}
|
|
5263
|
-
|
|
5264
|
-
return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
|
|
5265
|
-
}
|
|
5266
|
-
|
|
5267
|
-
var leader = {
|
|
5268
|
-
mixins: [Class, Media, Resize],
|
|
5269
|
-
|
|
5270
|
-
props: {
|
|
5271
|
-
fill: String },
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
data: {
|
|
5275
|
-
fill: '',
|
|
5276
|
-
clsWrapper: 'uk-leader-fill',
|
|
5277
|
-
clsHide: 'uk-leader-hide',
|
|
5278
|
-
attrFill: 'data-fill' },
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
computed: {
|
|
5282
|
-
fill(_ref) {let { fill } = _ref;
|
|
5283
|
-
return fill || getCssVar('leader-fill-content');
|
|
5284
|
-
} },
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
connected() {
|
|
5288
|
-
[this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
|
|
5289
|
-
},
|
|
5290
|
-
|
|
5291
|
-
disconnected() {
|
|
5292
|
-
unwrap(this.wrapper.childNodes);
|
|
5293
|
-
},
|
|
5294
|
-
|
|
5295
|
-
update: {
|
|
5296
|
-
read() {
|
|
5297
|
-
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5298
|
-
|
|
5299
|
-
return {
|
|
5300
|
-
width,
|
|
5301
|
-
fill: this.fill,
|
|
5302
|
-
hide: !this.matchMedia };
|
|
5303
|
-
|
|
5304
|
-
},
|
|
5305
|
-
|
|
5306
|
-
write(_ref2) {let { width, fill, hide } = _ref2;
|
|
5307
|
-
toggleClass(this.wrapper, this.clsHide, hide);
|
|
5308
|
-
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5309
|
-
},
|
|
5310
|
-
|
|
5311
|
-
events: ['resize'] } };
|
|
5312
|
-
|
|
5313
|
-
const active = [];
|
|
5314
|
-
|
|
5315
|
-
var Modal = {
|
|
5316
|
-
mixins: [Class, Container, Togglable],
|
|
5317
|
-
|
|
5318
|
-
props: {
|
|
5319
|
-
selPanel: String,
|
|
5320
|
-
selClose: String,
|
|
5321
|
-
escClose: Boolean,
|
|
5322
|
-
bgClose: Boolean,
|
|
5323
|
-
stack: Boolean },
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
data: {
|
|
5327
|
-
cls: 'uk-open',
|
|
5328
|
-
escClose: true,
|
|
5329
|
-
bgClose: true,
|
|
5330
|
-
overlay: true,
|
|
5331
|
-
stack: false },
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
computed: {
|
|
5335
|
-
panel(_ref, $el) {let { selPanel } = _ref;
|
|
5336
|
-
return $(selPanel, $el);
|
|
5337
|
-
},
|
|
5338
|
-
|
|
5339
|
-
transitionElement() {
|
|
5340
|
-
return this.panel;
|
|
5341
|
-
},
|
|
5342
|
-
|
|
5343
|
-
bgClose(_ref2) {let { bgClose } = _ref2;
|
|
5344
|
-
return bgClose && this.panel;
|
|
5345
|
-
} },
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
beforeDisconnect() {
|
|
5349
|
-
if (includes(active, this)) {
|
|
5350
|
-
this.toggleElement(this.$el, false, false);
|
|
5351
|
-
}
|
|
5352
|
-
},
|
|
5353
|
-
|
|
5354
|
-
events: [
|
|
5355
|
-
{
|
|
5356
|
-
name: 'click',
|
|
5357
|
-
|
|
5358
|
-
delegate() {
|
|
5359
|
-
return this.selClose;
|
|
5360
|
-
},
|
|
5361
|
-
|
|
5362
|
-
handler(e) {
|
|
5363
|
-
e.preventDefault();
|
|
5364
|
-
this.hide();
|
|
5365
|
-
} },
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
{
|
|
5369
|
-
name: 'toggle',
|
|
5370
|
-
|
|
5371
|
-
self: true,
|
|
5372
|
-
|
|
5373
|
-
handler(e) {
|
|
5374
|
-
if (e.defaultPrevented) {
|
|
5375
|
-
return;
|
|
5376
|
-
}
|
|
5377
|
-
|
|
5378
|
-
e.preventDefault();
|
|
5379
|
-
|
|
5380
|
-
if (this.isToggled() === includes(active, this)) {
|
|
5381
|
-
this.toggle();
|
|
5382
|
-
}
|
|
5383
|
-
} },
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
{
|
|
5387
|
-
name: 'beforeshow',
|
|
5388
|
-
|
|
5389
|
-
self: true,
|
|
5390
|
-
|
|
5391
|
-
handler(e) {
|
|
5392
|
-
if (includes(active, this)) {
|
|
5393
|
-
return false;
|
|
5394
|
-
}
|
|
5395
|
-
|
|
5396
|
-
if (!this.stack && active.length) {
|
|
5397
|
-
Promise.all(active.map((modal) => modal.hide())).then(this.show);
|
|
5398
|
-
e.preventDefault();
|
|
5399
|
-
} else {
|
|
5400
|
-
active.push(this);
|
|
5401
|
-
}
|
|
5402
|
-
} },
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
{
|
|
5406
|
-
name: 'show',
|
|
5407
|
-
|
|
5408
|
-
self: true,
|
|
5409
|
-
|
|
5410
|
-
handler() {
|
|
5411
|
-
const docEl = document.documentElement;
|
|
5412
|
-
|
|
5413
|
-
if (width(window) > docEl.clientWidth && this.overlay) {
|
|
5414
|
-
css(document.body, 'overflowY', 'scroll');
|
|
5415
|
-
}
|
|
5416
|
-
|
|
5417
|
-
if (this.stack) {
|
|
5418
|
-
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active.length);
|
|
5419
|
-
}
|
|
5420
|
-
|
|
5421
|
-
addClass(docEl, this.clsPage);
|
|
5422
|
-
|
|
5423
|
-
if (this.bgClose) {
|
|
5424
|
-
once(
|
|
5425
|
-
this.$el,
|
|
5426
|
-
'hide',
|
|
5427
|
-
on(document, pointerDown, (_ref3) => {let { target } = _ref3;
|
|
5428
|
-
if (
|
|
5429
|
-
last(active) !== this ||
|
|
5430
|
-
this.overlay && !within(target, this.$el) ||
|
|
5431
|
-
within(target, this.panel))
|
|
5432
|
-
{
|
|
5433
|
-
return;
|
|
5434
|
-
}
|
|
5435
|
-
|
|
5436
|
-
once(
|
|
5437
|
-
document,
|
|
5438
|
-
pointerUp + " " + pointerCancel + " scroll",
|
|
5439
|
-
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
5440
|
-
if (
|
|
5441
|
-
!defaultPrevented &&
|
|
5442
|
-
type === pointerUp &&
|
|
5443
|
-
target === newTarget)
|
|
5444
|
-
{
|
|
5445
|
-
this.hide();
|
|
5446
|
-
}
|
|
5447
|
-
},
|
|
5448
|
-
true);
|
|
5449
|
-
|
|
5450
|
-
}),
|
|
5451
|
-
{ self: true });
|
|
5547
|
+
}
|
|
5548
|
+
}
|
|
5452
5549
|
|
|
5453
|
-
|
|
5550
|
+
function parseSources(sources) {
|
|
5551
|
+
if (!sources) {
|
|
5552
|
+
return [];
|
|
5553
|
+
}
|
|
5454
5554
|
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
{ self: true });
|
|
5555
|
+
if (startsWith(sources, '[')) {
|
|
5556
|
+
try {
|
|
5557
|
+
sources = JSON.parse(sources);
|
|
5558
|
+
} catch (e) {
|
|
5559
|
+
sources = [];
|
|
5560
|
+
}
|
|
5561
|
+
} else {
|
|
5562
|
+
sources = parseOptions(sources);
|
|
5563
|
+
}
|
|
5465
5564
|
|
|
5466
|
-
|
|
5467
|
-
|
|
5565
|
+
if (!isArray(sources)) {
|
|
5566
|
+
sources = [sources];
|
|
5567
|
+
}
|
|
5468
5568
|
|
|
5569
|
+
return sources.filter((source) => !isEmpty(source));
|
|
5570
|
+
}
|
|
5469
5571
|
|
|
5470
|
-
|
|
5471
|
-
|
|
5572
|
+
function ensureSrcAttribute(el) {
|
|
5573
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
5574
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
5575
|
+
}
|
|
5576
|
+
}
|
|
5472
5577
|
|
|
5473
|
-
|
|
5578
|
+
function isPicture(el) {
|
|
5579
|
+
return isTag(el, 'picture');
|
|
5580
|
+
}
|
|
5474
5581
|
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
}
|
|
5582
|
+
function isImg(el) {
|
|
5583
|
+
return isTag(el, 'img');
|
|
5584
|
+
}
|
|
5479
5585
|
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
} },
|
|
5586
|
+
var Media = {
|
|
5587
|
+
props: {
|
|
5588
|
+
media: Boolean },
|
|
5484
5589
|
|
|
5485
5590
|
|
|
5486
|
-
{
|
|
5487
|
-
|
|
5591
|
+
data: {
|
|
5592
|
+
media: false },
|
|
5488
5593
|
|
|
5489
|
-
self: true,
|
|
5490
5594
|
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5595
|
+
connected() {
|
|
5596
|
+
const media = toMedia(this.media, this.$el);
|
|
5597
|
+
this.matchMedia = true;
|
|
5598
|
+
if (media) {
|
|
5599
|
+
this.mediaObj = window.matchMedia(media);
|
|
5600
|
+
const handler = () => {
|
|
5601
|
+
this.matchMedia = this.mediaObj.matches;
|
|
5602
|
+
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5603
|
+
};
|
|
5604
|
+
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5605
|
+
handler();
|
|
5606
|
+
this.$emit('resize');
|
|
5607
|
+
});
|
|
5608
|
+
handler();
|
|
5609
|
+
}
|
|
5610
|
+
},
|
|
5495
5611
|
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5612
|
+
disconnected() {var _this$offMediaObj;
|
|
5613
|
+
(_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
|
|
5614
|
+
} };
|
|
5499
5615
|
|
|
5500
|
-
css(this.$el, 'zIndex', '');
|
|
5501
5616
|
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5617
|
+
function toMedia(value, element) {
|
|
5618
|
+
if (isString(value)) {
|
|
5619
|
+
if (startsWith(value, '@')) {
|
|
5620
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5621
|
+
} else if (isNaN(value)) {
|
|
5622
|
+
return value;
|
|
5623
|
+
}
|
|
5624
|
+
}
|
|
5506
5625
|
|
|
5626
|
+
return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
|
|
5627
|
+
}
|
|
5507
5628
|
|
|
5629
|
+
var leader = {
|
|
5630
|
+
mixins: [Class, Media, Resize],
|
|
5508
5631
|
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
return this.isToggled() ? this.hide() : this.show();
|
|
5512
|
-
},
|
|
5632
|
+
props: {
|
|
5633
|
+
fill: String },
|
|
5513
5634
|
|
|
5514
|
-
show() {
|
|
5515
|
-
if (this.container && parent(this.$el) !== this.container) {
|
|
5516
|
-
append(this.container, this.$el);
|
|
5517
|
-
return new Promise((resolve) =>
|
|
5518
|
-
requestAnimationFrame(() => this.show().then(resolve)));
|
|
5519
5635
|
|
|
5520
|
-
|
|
5636
|
+
data: {
|
|
5637
|
+
fill: '',
|
|
5638
|
+
clsWrapper: 'uk-leader-fill',
|
|
5639
|
+
clsHide: 'uk-leader-hide',
|
|
5640
|
+
attrFill: 'data-fill' },
|
|
5521
5641
|
|
|
5522
|
-
return this.toggleElement(this.$el, true, animate(this));
|
|
5523
|
-
},
|
|
5524
5642
|
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5643
|
+
computed: {
|
|
5644
|
+
fill(_ref) {let { fill } = _ref;
|
|
5645
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5646
|
+
} },
|
|
5528
5647
|
|
|
5529
5648
|
|
|
5649
|
+
connected() {
|
|
5650
|
+
[this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
|
|
5651
|
+
},
|
|
5530
5652
|
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
once(el, 'show hide', () => {
|
|
5535
|
-
el._reject == null ? void 0 : el._reject();
|
|
5536
|
-
el._reject = reject;
|
|
5653
|
+
disconnected() {
|
|
5654
|
+
unwrap(this.wrapper.childNodes);
|
|
5655
|
+
},
|
|
5537
5656
|
|
|
5538
|
-
|
|
5657
|
+
update: {
|
|
5658
|
+
read() {
|
|
5659
|
+
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5539
5660
|
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
5545
|
-
self: true });
|
|
5661
|
+
return {
|
|
5662
|
+
width,
|
|
5663
|
+
fill: this.fill,
|
|
5664
|
+
hide: !this.matchMedia };
|
|
5546
5665
|
|
|
5547
|
-
clearTimeout(timer);
|
|
5548
5666
|
},
|
|
5549
|
-
{ self: true });
|
|
5550
5667
|
|
|
5668
|
+
write(_ref2) {let { width, fill, hide } = _ref2;
|
|
5669
|
+
toggleClass(this.wrapper, this.clsHide, hide);
|
|
5670
|
+
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5671
|
+
},
|
|
5551
5672
|
|
|
5552
|
-
|
|
5553
|
-
off();
|
|
5554
|
-
resolve();
|
|
5555
|
-
}, toMs(css(transitionElement, 'transitionDuration')));
|
|
5556
|
-
})).
|
|
5557
|
-
then(() => delete el._reject);
|
|
5558
|
-
}
|
|
5559
|
-
|
|
5560
|
-
function toMs(time) {
|
|
5561
|
-
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
5562
|
-
}
|
|
5673
|
+
events: ['resize'] } };
|
|
5563
5674
|
|
|
5564
5675
|
var modal = {
|
|
5565
5676
|
install: install$2,
|
|
@@ -5723,7 +5834,7 @@
|
|
|
5723
5834
|
align: String,
|
|
5724
5835
|
offset: Number,
|
|
5725
5836
|
boundary: Boolean,
|
|
5726
|
-
|
|
5837
|
+
target: Boolean,
|
|
5727
5838
|
clsDrop: String,
|
|
5728
5839
|
delayShow: Number,
|
|
5729
5840
|
delayHide: Number,
|
|
@@ -5740,9 +5851,12 @@
|
|
|
5740
5851
|
offset: undefined,
|
|
5741
5852
|
delayShow: undefined,
|
|
5742
5853
|
delayHide: undefined,
|
|
5743
|
-
|
|
5744
|
-
|
|
5854
|
+
flip: false,
|
|
5855
|
+
shift: true,
|
|
5745
5856
|
boundary: true,
|
|
5857
|
+
target: false,
|
|
5858
|
+
targetX: false,
|
|
5859
|
+
targetY: false,
|
|
5746
5860
|
dropbar: false,
|
|
5747
5861
|
dropbarAnchor: false,
|
|
5748
5862
|
duration: 200,
|
|
@@ -5777,7 +5891,7 @@
|
|
|
5777
5891
|
},
|
|
5778
5892
|
|
|
5779
5893
|
watch(dropbar) {
|
|
5780
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5894
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5781
5895
|
},
|
|
5782
5896
|
|
|
5783
5897
|
immediate: true },
|
|
@@ -5793,7 +5907,7 @@
|
|
|
5793
5907
|
|
|
5794
5908
|
if (this.dropContainer !== $el) {
|
|
5795
5909
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5796
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5910
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5797
5911
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5798
5912
|
dropdowns.push(el);
|
|
5799
5913
|
}
|
|
@@ -5810,8 +5924,7 @@
|
|
|
5810
5924
|
{
|
|
5811
5925
|
...this.$props,
|
|
5812
5926
|
boundary: this.boundary,
|
|
5813
|
-
pos: this.pos
|
|
5814
|
-
offset: this.dropbar || this.offset });
|
|
5927
|
+
pos: this.pos });
|
|
5815
5928
|
|
|
5816
5929
|
|
|
5817
5930
|
},
|
|
@@ -5856,8 +5969,8 @@
|
|
|
5856
5969
|
if (
|
|
5857
5970
|
active &&
|
|
5858
5971
|
includes(active.mode, 'hover') &&
|
|
5859
|
-
active.
|
|
5860
|
-
!within(active.
|
|
5972
|
+
active.targetEl &&
|
|
5973
|
+
!within(active.targetEl, current) &&
|
|
5861
5974
|
!active.isDelaying)
|
|
5862
5975
|
{
|
|
5863
5976
|
active.hide(false);
|
|
@@ -5879,7 +5992,7 @@
|
|
|
5879
5992
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5880
5993
|
e.preventDefault();
|
|
5881
5994
|
|
|
5882
|
-
if (!active || active.
|
|
5995
|
+
if (!active || active.targetEl !== current) {
|
|
5883
5996
|
current.click();
|
|
5884
5997
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5885
5998
|
focusFirstFocusableElement(target));});
|
|
@@ -5929,8 +6042,8 @@
|
|
|
5929
6042
|
}
|
|
5930
6043
|
}
|
|
5931
6044
|
|
|
5932
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
5933
|
-
active == null ? void 0 : (_active$
|
|
6045
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6046
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
5934
6047
|
}
|
|
5935
6048
|
|
|
5936
6049
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -5972,8 +6085,8 @@
|
|
|
5972
6085
|
return this.dropbar;
|
|
5973
6086
|
},
|
|
5974
6087
|
|
|
5975
|
-
handler(
|
|
5976
|
-
if (!
|
|
6088
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6089
|
+
if (!this.isDropbarDrop(target)) {
|
|
5977
6090
|
return;
|
|
5978
6091
|
}
|
|
5979
6092
|
|
|
@@ -5981,7 +6094,7 @@
|
|
|
5981
6094
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
5982
6095
|
}
|
|
5983
6096
|
|
|
5984
|
-
addClass(
|
|
6097
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
5985
6098
|
} },
|
|
5986
6099
|
|
|
5987
6100
|
|
|
@@ -5996,19 +6109,24 @@
|
|
|
5996
6109
|
return this.dropbar;
|
|
5997
6110
|
},
|
|
5998
6111
|
|
|
5999
|
-
handler(
|
|
6000
|
-
if (!
|
|
6112
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6113
|
+
if (!this.isDropbarDrop(target)) {
|
|
6001
6114
|
return;
|
|
6002
6115
|
}
|
|
6003
6116
|
|
|
6004
|
-
this._observer = observeResize(
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6117
|
+
this._observer = observeResize(target, () => {
|
|
6118
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6119
|
+
concat(target).
|
|
6120
|
+
map((el) => offset(el));
|
|
6121
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6122
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6123
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6124
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6125
|
+
this.transitionTo(
|
|
6126
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6127
|
+
target);
|
|
6011
6128
|
|
|
6129
|
+
});
|
|
6012
6130
|
} },
|
|
6013
6131
|
|
|
6014
6132
|
|
|
@@ -6023,13 +6141,13 @@
|
|
|
6023
6141
|
return this.dropbar;
|
|
6024
6142
|
},
|
|
6025
6143
|
|
|
6026
|
-
handler(e
|
|
6144
|
+
handler(e) {
|
|
6027
6145
|
const active = this.getActive();
|
|
6028
6146
|
|
|
6029
6147
|
if (
|
|
6030
6148
|
matches(this.dropbar, ':hover') &&
|
|
6031
|
-
(active == null ? void 0 : active.$el) ===
|
|
6032
|
-
!this.toggles.some((el) => active.
|
|
6149
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6150
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6033
6151
|
{
|
|
6034
6152
|
e.preventDefault();
|
|
6035
6153
|
}
|
|
@@ -6047,8 +6165,8 @@
|
|
|
6047
6165
|
return this.dropbar;
|
|
6048
6166
|
},
|
|
6049
6167
|
|
|
6050
|
-
handler(
|
|
6051
|
-
if (!
|
|
6168
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6169
|
+
if (!this.isDropbarDrop(target)) {
|
|
6052
6170
|
return;
|
|
6053
6171
|
}
|
|
6054
6172
|
|
|
@@ -6056,7 +6174,7 @@
|
|
|
6056
6174
|
|
|
6057
6175
|
const active = this.getActive();
|
|
6058
6176
|
|
|
6059
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6177
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6060
6178
|
this.transitionTo(0);
|
|
6061
6179
|
}
|
|
6062
6180
|
} }],
|
|
@@ -6065,7 +6183,7 @@
|
|
|
6065
6183
|
|
|
6066
6184
|
methods: {
|
|
6067
6185
|
getActive() {
|
|
6068
|
-
return active
|
|
6186
|
+
return active && within(active.targetEl, this.$el) && active;
|
|
6069
6187
|
},
|
|
6070
6188
|
|
|
6071
6189
|
transitionTo(newHeight, el) {
|
|
@@ -6095,13 +6213,17 @@
|
|
|
6095
6213
|
|
|
6096
6214
|
getDropdown(el) {
|
|
6097
6215
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6216
|
+
},
|
|
6217
|
+
|
|
6218
|
+
isDropbarDrop(el) {
|
|
6219
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6098
6220
|
} } };
|
|
6099
6221
|
|
|
6100
6222
|
|
|
6101
6223
|
|
|
6102
6224
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6103
6225
|
const { current, keyCode } = e;
|
|
6104
|
-
const target = (active == null ? void 0 : active.
|
|
6226
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6105
6227
|
const i = toggles.indexOf(target);
|
|
6106
6228
|
|
|
6107
6229
|
// Left
|
|
@@ -6158,7 +6280,7 @@
|
|
|
6158
6280
|
|
|
6159
6281
|
registerEvent(this, {
|
|
6160
6282
|
el: this.swipeTarget,
|
|
6161
|
-
name: pointerDown,
|
|
6283
|
+
name: pointerDown$1,
|
|
6162
6284
|
passive: true,
|
|
6163
6285
|
handler(e) {
|
|
6164
6286
|
if (!isTouch(e)) {
|
|
@@ -6168,7 +6290,7 @@
|
|
|
6168
6290
|
// Handle Swipe Gesture
|
|
6169
6291
|
const pos = getEventPos(e);
|
|
6170
6292
|
const target = 'tagName' in e.target ? e.target : parent(e.target);
|
|
6171
|
-
once(document, pointerUp + " " + pointerCancel + " scroll", (e) => {
|
|
6293
|
+
once(document, pointerUp$1 + " " + pointerCancel + " scroll", (e) => {
|
|
6172
6294
|
const { x, y } = getEventPos(e);
|
|
6173
6295
|
|
|
6174
6296
|
// swipe
|
|
@@ -6275,22 +6397,6 @@
|
|
|
6275
6397
|
} },
|
|
6276
6398
|
|
|
6277
6399
|
|
|
6278
|
-
{
|
|
6279
|
-
name: 'touchstart',
|
|
6280
|
-
|
|
6281
|
-
passive: true,
|
|
6282
|
-
|
|
6283
|
-
el() {
|
|
6284
|
-
return this.panel;
|
|
6285
|
-
},
|
|
6286
|
-
|
|
6287
|
-
handler(_ref8) {let { targetTouches } = _ref8;
|
|
6288
|
-
if (targetTouches.length === 1) {
|
|
6289
|
-
this.clientY = targetTouches[0].clientY;
|
|
6290
|
-
}
|
|
6291
|
-
} },
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
6400
|
{
|
|
6295
6401
|
name: 'touchmove',
|
|
6296
6402
|
|
|
@@ -6306,33 +6412,6 @@
|
|
|
6306
6412
|
} },
|
|
6307
6413
|
|
|
6308
6414
|
|
|
6309
|
-
{
|
|
6310
|
-
name: 'touchmove',
|
|
6311
|
-
|
|
6312
|
-
passive: false,
|
|
6313
|
-
|
|
6314
|
-
el() {
|
|
6315
|
-
return this.panel;
|
|
6316
|
-
},
|
|
6317
|
-
|
|
6318
|
-
handler(e) {
|
|
6319
|
-
if (e.targetTouches.length !== 1) {
|
|
6320
|
-
return;
|
|
6321
|
-
}
|
|
6322
|
-
|
|
6323
|
-
const clientY = e.targetTouches[0].clientY - this.clientY;
|
|
6324
|
-
const { scrollTop, scrollHeight, clientHeight } = this.panel;
|
|
6325
|
-
|
|
6326
|
-
if (
|
|
6327
|
-
clientHeight >= scrollHeight ||
|
|
6328
|
-
scrollTop === 0 && clientY > 0 ||
|
|
6329
|
-
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
6330
|
-
{
|
|
6331
|
-
e.cancelable && e.preventDefault();
|
|
6332
|
-
}
|
|
6333
|
-
} },
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
6415
|
{
|
|
6337
6416
|
name: 'show',
|
|
6338
6417
|
|
|
@@ -6344,7 +6423,6 @@
|
|
|
6344
6423
|
addClass(parent(this.panel), this.clsMode);
|
|
6345
6424
|
}
|
|
6346
6425
|
|
|
6347
|
-
css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : '');
|
|
6348
6426
|
addClass(document.body, this.clsContainer, this.clsFlip);
|
|
6349
6427
|
css(document.body, 'touch-action', 'pan-y pinch-zoom');
|
|
6350
6428
|
css(this.$el, 'display', 'block');
|
|
@@ -6352,7 +6430,7 @@
|
|
|
6352
6430
|
addClass(
|
|
6353
6431
|
this.panel,
|
|
6354
6432
|
this.clsSidebarAnimation,
|
|
6355
|
-
this.mode
|
|
6433
|
+
this.mode === 'reveal' ? '' : this.clsMode);
|
|
6356
6434
|
|
|
6357
6435
|
|
|
6358
6436
|
height(document.body); // force reflow
|
|
@@ -6389,8 +6467,6 @@
|
|
|
6389
6467
|
removeClass(this.$el, this.clsOverlay);
|
|
6390
6468
|
css(this.$el, 'display', '');
|
|
6391
6469
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
6392
|
-
|
|
6393
|
-
css(document.documentElement, 'overflowY', '');
|
|
6394
6470
|
} },
|
|
6395
6471
|
|
|
6396
6472
|
|
|
@@ -6515,6 +6591,14 @@
|
|
|
6515
6591
|
offset: 0 },
|
|
6516
6592
|
|
|
6517
6593
|
|
|
6594
|
+
connected() {
|
|
6595
|
+
registerClick(this);
|
|
6596
|
+
},
|
|
6597
|
+
|
|
6598
|
+
disconnected() {
|
|
6599
|
+
unregisterClick(this);
|
|
6600
|
+
},
|
|
6601
|
+
|
|
6518
6602
|
methods: {
|
|
6519
6603
|
async scrollTo(el) {
|
|
6520
6604
|
el = el && $(el) || document.body;
|
|
@@ -6523,20 +6607,39 @@
|
|
|
6523
6607
|
await scrollIntoView(el, { offset: this.offset });
|
|
6524
6608
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6525
6609
|
}
|
|
6526
|
-
} }
|
|
6610
|
+
} } };
|
|
6527
6611
|
|
|
6528
6612
|
|
|
6529
|
-
events: {
|
|
6530
|
-
click(e) {
|
|
6531
|
-
if (e.defaultPrevented) {
|
|
6532
|
-
return;
|
|
6533
|
-
}
|
|
6534
6613
|
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6614
|
+
const components$2 = new Set();
|
|
6615
|
+
function registerClick(cmp) {
|
|
6616
|
+
if (!components$2.size) {
|
|
6617
|
+
on(document, 'click', clickHandler);
|
|
6618
|
+
}
|
|
6619
|
+
|
|
6620
|
+
components$2.add(cmp);
|
|
6621
|
+
}
|
|
6622
|
+
|
|
6623
|
+
function unregisterClick(cmp) {
|
|
6624
|
+
components$2.delete(cmp);
|
|
6625
|
+
|
|
6626
|
+
if (!components$2.length) {
|
|
6627
|
+
off(document, 'click', clickHandler);
|
|
6628
|
+
}
|
|
6629
|
+
}
|
|
6538
6630
|
|
|
6631
|
+
function clickHandler(e) {
|
|
6632
|
+
if (e.defaultPrevented) {
|
|
6633
|
+
return;
|
|
6634
|
+
}
|
|
6539
6635
|
|
|
6636
|
+
for (const component of components$2) {
|
|
6637
|
+
if (within(e.target, component.$el)) {
|
|
6638
|
+
e.preventDefault();
|
|
6639
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6640
|
+
}
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6540
6643
|
|
|
6541
6644
|
function getTargetElement(el) {
|
|
6542
6645
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -6866,7 +6969,9 @@
|
|
|
6866
6969
|
},
|
|
6867
6970
|
|
|
6868
6971
|
handler() {
|
|
6869
|
-
|
|
6972
|
+
const { scrollingElement } = document;
|
|
6973
|
+
|
|
6974
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6870
6975
|
return;
|
|
6871
6976
|
}
|
|
6872
6977
|
|
|
@@ -6875,13 +6980,11 @@
|
|
|
6875
6980
|
const elOffset = offset(this.$el);
|
|
6876
6981
|
|
|
6877
6982
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6878
|
-
scrollTop
|
|
6879
|
-
window,
|
|
6983
|
+
scrollingElement.scrollTop =
|
|
6880
6984
|
targetOffset.top -
|
|
6881
6985
|
elOffset.height -
|
|
6882
6986
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6883
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6884
|
-
|
|
6987
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6885
6988
|
}
|
|
6886
6989
|
});
|
|
6887
6990
|
} }],
|
|
@@ -6979,7 +7082,7 @@
|
|
|
6979
7082
|
|
|
6980
7083
|
|
|
6981
7084
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
6982
|
-
const scroll = scrollTop
|
|
7085
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
6983
7086
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
6984
7087
|
|
|
6985
7088
|
return {
|
|
@@ -7388,7 +7491,7 @@
|
|
|
7388
7491
|
|
|
7389
7492
|
events: [
|
|
7390
7493
|
{
|
|
7391
|
-
name: pointerDown,
|
|
7494
|
+
name: pointerDown$1,
|
|
7392
7495
|
|
|
7393
7496
|
filter() {
|
|
7394
7497
|
return includes(this.mode, 'hover');
|
|
@@ -7406,7 +7509,7 @@
|
|
|
7406
7509
|
trigger(this.$el, 'focus');
|
|
7407
7510
|
once(
|
|
7408
7511
|
document,
|
|
7409
|
-
pointerDown,
|
|
7512
|
+
pointerDown$1,
|
|
7410
7513
|
() => trigger(this.$el, 'blur'),
|
|
7411
7514
|
true,
|
|
7412
7515
|
(e) => !within(e.target, this.$el));
|
|
@@ -7499,7 +7602,7 @@
|
|
|
7499
7602
|
|
|
7500
7603
|
|
|
7501
7604
|
{
|
|
7502
|
-
name: '
|
|
7605
|
+
name: 'hide show',
|
|
7503
7606
|
|
|
7504
7607
|
self: true,
|
|
7505
7608
|
|
|
@@ -7507,10 +7610,8 @@
|
|
|
7507
7610
|
return this.target;
|
|
7508
7611
|
},
|
|
7509
7612
|
|
|
7510
|
-
handler(
|
|
7511
|
-
|
|
7512
|
-
this.updateAria(toggled);
|
|
7513
|
-
}
|
|
7613
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7614
|
+
this.updateAria(type === 'show');
|
|
7514
7615
|
} },
|
|
7515
7616
|
|
|
7516
7617
|
|
|
@@ -7605,10 +7706,12 @@
|
|
|
7605
7706
|
Video: Video,
|
|
7606
7707
|
Close: Close,
|
|
7607
7708
|
Spinner: Spinner,
|
|
7709
|
+
NavParentIcon: NavParentIcon,
|
|
7608
7710
|
SlidenavNext: Slidenav,
|
|
7609
7711
|
SlidenavPrevious: Slidenav,
|
|
7610
7712
|
SearchIcon: Search,
|
|
7611
7713
|
Marker: IconComponent,
|
|
7714
|
+
NavbarParentIcon: IconComponent,
|
|
7612
7715
|
NavbarToggleIcon: IconComponent,
|
|
7613
7716
|
OverlayIcon: IconComponent,
|
|
7614
7717
|
PaginationNext: IconComponent,
|
|
@@ -8098,7 +8201,7 @@
|
|
|
8098
8201
|
|
|
8099
8202
|
},
|
|
8100
8203
|
|
|
8101
|
-
setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8204
|
+
async setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8102
8205
|
state = { filter: { '': '' }, sort: [], ...state };
|
|
8103
8206
|
|
|
8104
8207
|
trigger(this.$el, 'beforeFilter', [this, state]);
|
|
@@ -8107,15 +8210,17 @@
|
|
|
8107
8210
|
toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
|
|
8108
8211
|
|
|
8109
8212
|
|
|
8110
|
-
Promise.all(
|
|
8213
|
+
await Promise.all(
|
|
8111
8214
|
$$(this.target, this.$el).map((target) => {
|
|
8112
8215
|
const filterFn = () => {
|
|
8113
8216
|
applyState(state, target, children(target));
|
|
8114
8217
|
this.$update(this.$el);
|
|
8115
8218
|
};
|
|
8116
8219
|
return animate ? this.animate(filterFn, target) : filterFn();
|
|
8117
|
-
}))
|
|
8118
|
-
|
|
8220
|
+
}));
|
|
8221
|
+
|
|
8222
|
+
|
|
8223
|
+
trigger(this.$el, 'afterFilter', [this]);
|
|
8119
8224
|
},
|
|
8120
8225
|
|
|
8121
8226
|
updateState() {
|
|
@@ -8405,6 +8510,11 @@
|
|
|
8405
8510
|
this.interval && clearInterval(this.interval);
|
|
8406
8511
|
} } };
|
|
8407
8512
|
|
|
8513
|
+
const pointerOptions = { passive: false, capture: true };
|
|
8514
|
+
const pointerDown = 'touchstart mousedown';
|
|
8515
|
+
const pointerMove = 'touchmove mousemove';
|
|
8516
|
+
const pointerUp = 'touchend touchcancel mouseup click input';
|
|
8517
|
+
|
|
8408
8518
|
var SliderDrag = {
|
|
8409
8519
|
props: {
|
|
8410
8520
|
draggable: Boolean },
|
|
@@ -8457,7 +8567,17 @@
|
|
|
8457
8567
|
|
|
8458
8568
|
handler(e) {
|
|
8459
8569
|
e.preventDefault();
|
|
8460
|
-
} }
|
|
8570
|
+
} },
|
|
8571
|
+
|
|
8572
|
+
|
|
8573
|
+
{
|
|
8574
|
+
// iOS workaround for slider stopping if swiping fast
|
|
8575
|
+
name: pointerMove + " " + pointerUp,
|
|
8576
|
+
el() {
|
|
8577
|
+
return this.list;
|
|
8578
|
+
},
|
|
8579
|
+
handler: noop,
|
|
8580
|
+
...pointerOptions }],
|
|
8461
8581
|
|
|
8462
8582
|
|
|
8463
8583
|
|
|
@@ -8479,10 +8599,10 @@
|
|
|
8479
8599
|
this.prevIndex = this.index;
|
|
8480
8600
|
}
|
|
8481
8601
|
|
|
8482
|
-
on(document, pointerMove, this.move,
|
|
8602
|
+
on(document, pointerMove, this.move, pointerOptions);
|
|
8483
8603
|
|
|
8484
8604
|
// 'input' event is triggered by video controls
|
|
8485
|
-
on(document, pointerUp
|
|
8605
|
+
on(document, pointerUp, this.end, pointerOptions);
|
|
8486
8606
|
|
|
8487
8607
|
css(this.list, 'userSelect', 'none');
|
|
8488
8608
|
},
|
|
@@ -8562,8 +8682,8 @@
|
|
|
8562
8682
|
},
|
|
8563
8683
|
|
|
8564
8684
|
end() {
|
|
8565
|
-
off(document, pointerMove, this.move,
|
|
8566
|
-
off(document, pointerUp
|
|
8685
|
+
off(document, pointerMove, this.move, pointerOptions);
|
|
8686
|
+
off(document, pointerUp, this.end, pointerOptions);
|
|
8567
8687
|
|
|
8568
8688
|
if (this.dragging) {
|
|
8569
8689
|
this.dragging = null;
|
|
@@ -8971,7 +9091,7 @@
|
|
|
8971
9091
|
|
|
8972
9092
|
events: [
|
|
8973
9093
|
{
|
|
8974
|
-
name: pointerMove + " " + pointerDown + " keydown",
|
|
9094
|
+
name: pointerMove$1 + " " + pointerDown$1 + " keydown",
|
|
8975
9095
|
|
|
8976
9096
|
handler: 'showControls' },
|
|
8977
9097
|
|
|
@@ -10626,7 +10746,7 @@
|
|
|
10626
10746
|
},
|
|
10627
10747
|
|
|
10628
10748
|
events: {
|
|
10629
|
-
name: pointerDown,
|
|
10749
|
+
name: pointerDown$1,
|
|
10630
10750
|
passive: false,
|
|
10631
10751
|
handler: 'init' },
|
|
10632
10752
|
|
|
@@ -10756,8 +10876,8 @@
|
|
|
10756
10876
|
this.placeholder = placeholder;
|
|
10757
10877
|
this.origin = { target, index: index(placeholder), ...this.pos };
|
|
10758
10878
|
|
|
10759
|
-
on(document, pointerMove, this.move);
|
|
10760
|
-
on(document, pointerUp, this.end);
|
|
10879
|
+
on(document, pointerMove$1, this.move);
|
|
10880
|
+
on(document, pointerUp$1, this.end);
|
|
10761
10881
|
|
|
10762
10882
|
if (!this.threshold) {
|
|
10763
10883
|
this.start(e);
|
|
@@ -10793,8 +10913,8 @@
|
|
|
10793
10913
|
},
|
|
10794
10914
|
|
|
10795
10915
|
end() {
|
|
10796
|
-
off(document, pointerMove, this.move);
|
|
10797
|
-
off(document, pointerUp, this.end);
|
|
10916
|
+
off(document, pointerMove$1, this.move);
|
|
10917
|
+
off(document, pointerUp$1, this.end);
|
|
10798
10918
|
|
|
10799
10919
|
if (!this.drag) {
|
|
10800
10920
|
return;
|
|
@@ -10863,7 +10983,7 @@
|
|
|
10863
10983
|
let last = Date.now();
|
|
10864
10984
|
trackTimer = setInterval(() => {
|
|
10865
10985
|
let { x, y } = pos;
|
|
10866
|
-
y += scrollTop
|
|
10986
|
+
y += document.scrollingElement.scrollTop;
|
|
10867
10987
|
|
|
10868
10988
|
const dist = (Date.now() - last) * 0.3;
|
|
10869
10989
|
last = Date.now();
|
|
@@ -10884,7 +11004,7 @@
|
|
|
10884
11004
|
}
|
|
10885
11005
|
|
|
10886
11006
|
if (scroll > 0 && scroll < scrollHeight - height) {
|
|
10887
|
-
scrollTop
|
|
11007
|
+
scrollEl.scrollTop = scroll;
|
|
10888
11008
|
return true;
|
|
10889
11009
|
}
|
|
10890
11010
|
});
|
|
@@ -11029,11 +11149,11 @@
|
|
|
11029
11149
|
|
|
11030
11150
|
this._unbind = once(
|
|
11031
11151
|
document, "show keydown " +
|
|
11032
|
-
pointerDown,
|
|
11152
|
+
pointerDown$1,
|
|
11033
11153
|
this.hide,
|
|
11034
11154
|
false,
|
|
11035
11155
|
(e) =>
|
|
11036
|
-
e.type === pointerDown && !within(e.target, this.$el) ||
|
|
11156
|
+
e.type === pointerDown$1 && !within(e.target, this.$el) ||
|
|
11037
11157
|
e.type === 'keydown' && e.keyCode === 27 ||
|
|
11038
11158
|
e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name);
|
|
11039
11159
|
|
|
@@ -11104,7 +11224,7 @@
|
|
|
11104
11224
|
|
|
11105
11225
|
// Clicking a button does not give it focus on all browsers and platforms
|
|
11106
11226
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
|
|
11107
|
-
[pointerDown](e) {
|
|
11227
|
+
[pointerDown$1](e) {
|
|
11108
11228
|
if (isTouch(e)) {
|
|
11109
11229
|
this.show();
|
|
11110
11230
|
}
|