uikit 3.14.4-dev.6a00f7fe6 → 3.14.4-dev.74723a7ef
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 +186 -137
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +186 -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 +98 -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 +1822 -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 +1061 -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 +44 -30
- package/src/js/core/offcanvas.js +1 -47
- package/src/js/core/scroll.js +37 -10
- package/src/js/core/sticky.js +8 -9
- package/src/js/core/toggle.js +3 -5
- package/src/js/mixin/media.js +4 -5
- package/src/js/mixin/modal.js +97 -8
- package/src/js/mixin/position.js +26 -11
- package/src/js/mixin/slider-drag.js +20 -8
- package/src/js/mixin/style.js +11 -0
- package/src/js/mixin/togglable.js +81 -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 +2002 -1131
- package/tests/offcanvas.html +17 -21
- package/tests/parallax.html +1 -1
- package/tests/position.html +18 -16
- package/tests/progress.html +9 -9
- package/tests/scroll.html +7 -10
- package/tests/search.html +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.74723a7ef | 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.74723a7ef';
|
|
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,98 @@
|
|
|
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
|
+
'overflow',
|
|
3189
|
+
'padding',
|
|
3190
|
+
'borderTop',
|
|
3191
|
+
'borderRight',
|
|
3192
|
+
'borderBottom',
|
|
3193
|
+
'borderLeft',
|
|
3194
|
+
'borderImage',
|
|
3195
|
+
marginStartProp]) });
|
|
3260
3196
|
|
|
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
3197
|
|
|
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
3198
|
|
|
3199
|
+
css(el, {
|
|
3200
|
+
padding: 0,
|
|
3201
|
+
border: 0,
|
|
3202
|
+
[marginStartProp]: 0,
|
|
3203
|
+
width: dim.width,
|
|
3204
|
+
height: dim.height,
|
|
3205
|
+
overflow: 'hidden',
|
|
3206
|
+
[dimProp]: currentDim });
|
|
3275
3207
|
|
|
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
3208
|
|
|
3284
|
-
|
|
3285
|
-
|
|
3209
|
+
const percent = currentDim / endDim;
|
|
3210
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3211
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3286
3212
|
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
3213
|
+
if (end) {
|
|
3214
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3215
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3216
|
+
}
|
|
3292
3217
|
|
|
3218
|
+
if (!end ^ mode === 'reveal') {
|
|
3219
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3220
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3221
|
+
}
|
|
3293
3222
|
|
|
3294
|
-
|
|
3295
|
-
|
|
3223
|
+
try {
|
|
3224
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3225
|
+
} finally {
|
|
3226
|
+
css(el, prevProps);
|
|
3227
|
+
unwrap(wrapper.firstChild);
|
|
3296
3228
|
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
css(scrollElement, 'overflowX', '');
|
|
3302
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3303
|
-
});
|
|
3229
|
+
if (!show) {
|
|
3230
|
+
_toggle(el, false);
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3304
3233
|
};
|
|
3305
3234
|
}
|
|
3306
3235
|
|
|
@@ -3325,6 +3254,7 @@
|
|
|
3325
3254
|
mixins: [Class, Lazyload, Togglable],
|
|
3326
3255
|
|
|
3327
3256
|
props: {
|
|
3257
|
+
animation: Boolean,
|
|
3328
3258
|
targets: String,
|
|
3329
3259
|
active: null,
|
|
3330
3260
|
collapsible: Boolean,
|
|
@@ -3337,7 +3267,7 @@
|
|
|
3337
3267
|
data: {
|
|
3338
3268
|
targets: '> *',
|
|
3339
3269
|
active: false,
|
|
3340
|
-
animation:
|
|
3270
|
+
animation: true,
|
|
3341
3271
|
collapsible: true,
|
|
3342
3272
|
multiple: false,
|
|
3343
3273
|
clsOpen: 'uk-open',
|
|
@@ -3383,7 +3313,7 @@
|
|
|
3383
3313
|
hide(
|
|
3384
3314
|
el,
|
|
3385
3315
|
!hasClass(
|
|
3386
|
-
this.items.find((item) =>
|
|
3316
|
+
this.items.find((item) => within(el, item)),
|
|
3387
3317
|
this.clsOpen));
|
|
3388
3318
|
|
|
3389
3319
|
|
|
@@ -3435,23 +3365,15 @@
|
|
|
3435
3365
|
toggleClass(el, this.clsOpen, show);
|
|
3436
3366
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3437
3367
|
|
|
3438
|
-
const content = $(
|
|
3368
|
+
const content = $(this.content, el);
|
|
3439
3369
|
|
|
3440
|
-
if (animate === false || !this.
|
|
3370
|
+
if (animate === false || !this.animation) {
|
|
3371
|
+
content.hidden = !show;
|
|
3441
3372
|
hide(content, !show);
|
|
3442
3373
|
return;
|
|
3443
3374
|
}
|
|
3444
3375
|
|
|
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);
|
|
3376
|
+
await toggleTransition(this)(content, show);
|
|
3455
3377
|
|
|
3456
3378
|
if (show) {
|
|
3457
3379
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3477,18 +3399,17 @@
|
|
|
3477
3399
|
args: 'animation',
|
|
3478
3400
|
|
|
3479
3401
|
props: {
|
|
3402
|
+
animation: Boolean,
|
|
3480
3403
|
close: String },
|
|
3481
3404
|
|
|
3482
3405
|
|
|
3483
3406
|
data: {
|
|
3484
|
-
animation:
|
|
3407
|
+
animation: true,
|
|
3485
3408
|
selClose: '.uk-alert-close',
|
|
3486
|
-
duration: 150,
|
|
3487
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3409
|
+
duration: 150 },
|
|
3488
3410
|
|
|
3489
3411
|
|
|
3490
|
-
events:
|
|
3491
|
-
{
|
|
3412
|
+
events: {
|
|
3492
3413
|
name: 'click',
|
|
3493
3414
|
|
|
3494
3415
|
delegate() {
|
|
@@ -3498,16 +3419,39 @@
|
|
|
3498
3419
|
handler(e) {
|
|
3499
3420
|
e.preventDefault();
|
|
3500
3421
|
this.close();
|
|
3501
|
-
} }
|
|
3502
|
-
|
|
3422
|
+
} },
|
|
3503
3423
|
|
|
3504
3424
|
|
|
3505
3425
|
methods: {
|
|
3506
3426
|
async close() {
|
|
3507
|
-
await this.toggleElement(this.$el);
|
|
3427
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3508
3428
|
this.$destroy(true);
|
|
3509
3429
|
} } };
|
|
3510
3430
|
|
|
3431
|
+
|
|
3432
|
+
|
|
3433
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3434
|
+
return (el) => {
|
|
3435
|
+
const height = toFloat(css(el, 'height'));
|
|
3436
|
+
css(el, 'height', height);
|
|
3437
|
+
return Transition.start(
|
|
3438
|
+
el,
|
|
3439
|
+
{
|
|
3440
|
+
height: 0,
|
|
3441
|
+
marginTop: 0,
|
|
3442
|
+
marginBottom: 0,
|
|
3443
|
+
paddingTop: 0,
|
|
3444
|
+
paddingBottom: 0,
|
|
3445
|
+
borderTop: 0,
|
|
3446
|
+
borderBottom: 0,
|
|
3447
|
+
opacity: 0 },
|
|
3448
|
+
|
|
3449
|
+
velocity * height + duration,
|
|
3450
|
+
transition);
|
|
3451
|
+
|
|
3452
|
+
};
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3511
3455
|
var Video = {
|
|
3512
3456
|
args: 'autoplay',
|
|
3513
3457
|
|
|
@@ -3656,13 +3600,17 @@
|
|
|
3656
3600
|
props: {
|
|
3657
3601
|
pos: String,
|
|
3658
3602
|
offset: null,
|
|
3659
|
-
flip: Boolean
|
|
3603
|
+
flip: Boolean,
|
|
3604
|
+
shift: Boolean,
|
|
3605
|
+
inset: Boolean },
|
|
3660
3606
|
|
|
3661
3607
|
|
|
3662
3608
|
data: {
|
|
3663
3609
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3610
|
+
offset: false,
|
|
3664
3611
|
flip: true,
|
|
3665
|
-
|
|
3612
|
+
shift: true,
|
|
3613
|
+
inset: false },
|
|
3666
3614
|
|
|
3667
3615
|
|
|
3668
3616
|
connected() {
|
|
@@ -3674,19 +3622,24 @@
|
|
|
3674
3622
|
methods: {
|
|
3675
3623
|
positionAt(element, target, boundary) {
|
|
3676
3624
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3625
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3677
3626
|
|
|
3678
3627
|
const attach = {
|
|
3679
|
-
element: [flipPosition(this.dir), this.align],
|
|
3628
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3680
3629
|
target: [this.dir, this.align] };
|
|
3681
3630
|
|
|
3682
3631
|
|
|
3683
3632
|
if (this.axis === 'y') {
|
|
3684
3633
|
for (const prop in attach) {
|
|
3685
|
-
attach[prop]
|
|
3634
|
+
attach[prop].reverse();
|
|
3686
3635
|
}
|
|
3687
|
-
offset
|
|
3636
|
+
offset.reverse();
|
|
3637
|
+
placement.reverse();
|
|
3688
3638
|
}
|
|
3689
3639
|
|
|
3640
|
+
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
3641
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
3642
|
+
|
|
3690
3643
|
// Ensure none positioned element does not generate scrollbars
|
|
3691
3644
|
const elDim = dimensions$1(element);
|
|
3692
3645
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
@@ -3695,93 +3648,88 @@
|
|
|
3695
3648
|
attach,
|
|
3696
3649
|
offset,
|
|
3697
3650
|
boundary,
|
|
3698
|
-
|
|
3651
|
+
placement,
|
|
3699
3652
|
viewportOffset: this.getViewportOffset(element) });
|
|
3700
3653
|
|
|
3654
|
+
|
|
3655
|
+
// Restore scroll position
|
|
3656
|
+
scrollElement.scrollTop = scrollTop;
|
|
3657
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
3701
3658
|
},
|
|
3702
3659
|
|
|
3703
3660
|
getPositionOffset(element) {
|
|
3704
3661
|
return (
|
|
3705
3662
|
toPx(
|
|
3706
|
-
this.offset === false ?
|
|
3663
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3707
3664
|
this.axis === 'x' ? 'width' : 'height',
|
|
3708
3665
|
element) * (
|
|
3709
|
-
|
|
3666
|
+
|
|
3667
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3668
|
+
this.inset ? -1 : 1));
|
|
3710
3669
|
|
|
3711
3670
|
},
|
|
3712
3671
|
|
|
3713
3672
|
getShiftOffset(element) {
|
|
3714
|
-
return
|
|
3673
|
+
return this.align === 'center' ?
|
|
3715
3674
|
0 :
|
|
3716
3675
|
toPx(
|
|
3717
|
-
|
|
3676
|
+
css(element, '--uk-position-shift-offset'),
|
|
3718
3677
|
this.axis === 'y' ? 'width' : 'height',
|
|
3719
3678
|
element) * (
|
|
3720
3679
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3721
3680
|
},
|
|
3722
3681
|
|
|
3723
3682
|
getViewportOffset(element) {
|
|
3724
|
-
return toPx(
|
|
3683
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3725
3684
|
} } };
|
|
3726
3685
|
|
|
3727
|
-
|
|
3686
|
+
var Style = {
|
|
3687
|
+
beforeConnect() {
|
|
3688
|
+
this._style = attr(this.$el, 'style');
|
|
3689
|
+
},
|
|
3728
3690
|
|
|
3729
|
-
|
|
3730
|
-
|
|
3691
|
+
disconnected() {
|
|
3692
|
+
attr(this.$el, 'style', this._style);
|
|
3693
|
+
} };
|
|
3731
3694
|
|
|
3732
|
-
|
|
3695
|
+
const active$1 = [];
|
|
3696
|
+
|
|
3697
|
+
var Modal = {
|
|
3698
|
+
mixins: [Class, Container, Togglable],
|
|
3733
3699
|
|
|
3734
3700
|
props: {
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
delayHide: Number,
|
|
3741
|
-
display: String,
|
|
3742
|
-
clsDrop: String,
|
|
3743
|
-
animateOut: Boolean },
|
|
3701
|
+
selPanel: String,
|
|
3702
|
+
selClose: String,
|
|
3703
|
+
escClose: Boolean,
|
|
3704
|
+
bgClose: Boolean,
|
|
3705
|
+
stack: Boolean },
|
|
3744
3706
|
|
|
3745
3707
|
|
|
3746
3708
|
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
3709
|
cls: 'uk-open',
|
|
3757
|
-
|
|
3758
|
-
|
|
3710
|
+
escClose: true,
|
|
3711
|
+
bgClose: true,
|
|
3712
|
+
overlay: true,
|
|
3713
|
+
stack: false },
|
|
3759
3714
|
|
|
3760
3715
|
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3716
|
+
computed: {
|
|
3717
|
+
panel(_ref, $el) {let { selPanel } = _ref;
|
|
3718
|
+
return $(selPanel, $el);
|
|
3719
|
+
},
|
|
3764
3720
|
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3721
|
+
transitionElement() {
|
|
3722
|
+
return this.panel;
|
|
3723
|
+
},
|
|
3768
3724
|
|
|
3769
|
-
|
|
3770
|
-
|
|
3725
|
+
bgClose(_ref2) {let { bgClose } = _ref2;
|
|
3726
|
+
return bgClose && this.panel;
|
|
3727
|
+
} },
|
|
3771
3728
|
|
|
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
3729
|
|
|
3782
|
-
|
|
3783
|
-
if (this
|
|
3784
|
-
|
|
3730
|
+
beforeDisconnect() {
|
|
3731
|
+
if (includes(active$1, this)) {
|
|
3732
|
+
this.toggleElement(this.$el, false, false);
|
|
3785
3733
|
}
|
|
3786
3734
|
},
|
|
3787
3735
|
|
|
@@ -3790,47 +3738,424 @@
|
|
|
3790
3738
|
name: 'click',
|
|
3791
3739
|
|
|
3792
3740
|
delegate() {
|
|
3793
|
-
return
|
|
3741
|
+
return this.selClose;
|
|
3794
3742
|
},
|
|
3795
3743
|
|
|
3796
3744
|
handler(e) {
|
|
3797
3745
|
e.preventDefault();
|
|
3798
|
-
this.hide(
|
|
3746
|
+
this.hide();
|
|
3799
3747
|
} },
|
|
3800
3748
|
|
|
3801
3749
|
|
|
3802
3750
|
{
|
|
3803
|
-
name: '
|
|
3751
|
+
name: 'toggle',
|
|
3804
3752
|
|
|
3805
|
-
|
|
3806
|
-
return 'a[href^="#"]';
|
|
3807
|
-
},
|
|
3753
|
+
self: true,
|
|
3808
3754
|
|
|
3809
|
-
handler(
|
|
3810
|
-
if (
|
|
3811
|
-
|
|
3755
|
+
handler(e) {
|
|
3756
|
+
if (e.defaultPrevented) {
|
|
3757
|
+
return;
|
|
3812
3758
|
}
|
|
3813
|
-
} },
|
|
3814
3759
|
|
|
3760
|
+
e.preventDefault();
|
|
3815
3761
|
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
handler() {
|
|
3820
|
-
this.hide(false);
|
|
3762
|
+
if (this.isToggled() === includes(active$1, this)) {
|
|
3763
|
+
this.toggle();
|
|
3764
|
+
}
|
|
3821
3765
|
} },
|
|
3822
3766
|
|
|
3823
3767
|
|
|
3824
3768
|
{
|
|
3825
|
-
name: '
|
|
3769
|
+
name: 'beforeshow',
|
|
3826
3770
|
|
|
3827
3771
|
self: true,
|
|
3828
3772
|
|
|
3829
|
-
handler(e
|
|
3830
|
-
|
|
3773
|
+
handler(e) {
|
|
3774
|
+
if (includes(active$1, this)) {
|
|
3775
|
+
return false;
|
|
3776
|
+
}
|
|
3831
3777
|
|
|
3832
|
-
if (this.
|
|
3833
|
-
|
|
3778
|
+
if (!this.stack && active$1.length) {
|
|
3779
|
+
Promise.all(active$1.map((modal) => modal.hide())).then(this.show);
|
|
3780
|
+
e.preventDefault();
|
|
3781
|
+
} else {
|
|
3782
|
+
active$1.push(this);
|
|
3783
|
+
}
|
|
3784
|
+
} },
|
|
3785
|
+
|
|
3786
|
+
|
|
3787
|
+
{
|
|
3788
|
+
name: 'show',
|
|
3789
|
+
|
|
3790
|
+
self: true,
|
|
3791
|
+
|
|
3792
|
+
handler() {
|
|
3793
|
+
once(
|
|
3794
|
+
this.$el,
|
|
3795
|
+
'hide',
|
|
3796
|
+
on(document, 'focusin', (e) => {
|
|
3797
|
+
if (last(active$1) === this && !within(e.target, this.$el)) {
|
|
3798
|
+
this.$el.focus();
|
|
3799
|
+
}
|
|
3800
|
+
}));
|
|
3801
|
+
|
|
3802
|
+
|
|
3803
|
+
if (this.overlay) {
|
|
3804
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3805
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3808
|
+
if (this.stack) {
|
|
3809
|
+
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active$1.length);
|
|
3810
|
+
}
|
|
3811
|
+
|
|
3812
|
+
addClass(document.documentElement, this.clsPage);
|
|
3813
|
+
|
|
3814
|
+
if (this.bgClose) {
|
|
3815
|
+
once(
|
|
3816
|
+
this.$el,
|
|
3817
|
+
'hide',
|
|
3818
|
+
on(document, pointerDown$1, (_ref3) => {let { target } = _ref3;
|
|
3819
|
+
if (
|
|
3820
|
+
last(active$1) !== this ||
|
|
3821
|
+
this.overlay && !within(target, this.$el) ||
|
|
3822
|
+
within(target, this.panel))
|
|
3823
|
+
{
|
|
3824
|
+
return;
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
once(
|
|
3828
|
+
document,
|
|
3829
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
3830
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3831
|
+
if (
|
|
3832
|
+
!defaultPrevented &&
|
|
3833
|
+
type === pointerUp$1 &&
|
|
3834
|
+
target === newTarget)
|
|
3835
|
+
{
|
|
3836
|
+
this.hide();
|
|
3837
|
+
}
|
|
3838
|
+
},
|
|
3839
|
+
true);
|
|
3840
|
+
|
|
3841
|
+
}),
|
|
3842
|
+
{ self: true });
|
|
3843
|
+
|
|
3844
|
+
}
|
|
3845
|
+
|
|
3846
|
+
if (this.escClose) {
|
|
3847
|
+
once(
|
|
3848
|
+
this.$el,
|
|
3849
|
+
'hide',
|
|
3850
|
+
on(document, 'keydown', (e) => {
|
|
3851
|
+
if (e.keyCode === 27 && last(active$1) === this) {
|
|
3852
|
+
this.hide();
|
|
3853
|
+
}
|
|
3854
|
+
}),
|
|
3855
|
+
{ self: true });
|
|
3856
|
+
|
|
3857
|
+
}
|
|
3858
|
+
} },
|
|
3859
|
+
|
|
3860
|
+
|
|
3861
|
+
{
|
|
3862
|
+
name: 'shown',
|
|
3863
|
+
|
|
3864
|
+
self: true,
|
|
3865
|
+
|
|
3866
|
+
handler() {
|
|
3867
|
+
if (!isFocusable(this.$el)) {
|
|
3868
|
+
attr(this.$el, 'tabindex', '-1');
|
|
3869
|
+
}
|
|
3870
|
+
|
|
3871
|
+
if (!$(':focus', this.$el)) {
|
|
3872
|
+
this.$el.focus();
|
|
3873
|
+
}
|
|
3874
|
+
} },
|
|
3875
|
+
|
|
3876
|
+
|
|
3877
|
+
{
|
|
3878
|
+
name: 'hidden',
|
|
3879
|
+
|
|
3880
|
+
self: true,
|
|
3881
|
+
|
|
3882
|
+
handler() {
|
|
3883
|
+
if (includes(active$1, this)) {
|
|
3884
|
+
active$1.splice(active$1.indexOf(this), 1);
|
|
3885
|
+
}
|
|
3886
|
+
|
|
3887
|
+
css(this.$el, 'zIndex', '');
|
|
3888
|
+
|
|
3889
|
+
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
3890
|
+
removeClass(document.documentElement, this.clsPage);
|
|
3891
|
+
}
|
|
3892
|
+
} }],
|
|
3893
|
+
|
|
3894
|
+
|
|
3895
|
+
|
|
3896
|
+
methods: {
|
|
3897
|
+
toggle() {
|
|
3898
|
+
return this.isToggled() ? this.hide() : this.show();
|
|
3899
|
+
},
|
|
3900
|
+
|
|
3901
|
+
show() {
|
|
3902
|
+
if (this.container && parent(this.$el) !== this.container) {
|
|
3903
|
+
append(this.container, this.$el);
|
|
3904
|
+
return new Promise((resolve) =>
|
|
3905
|
+
requestAnimationFrame(() => this.show().then(resolve)));
|
|
3906
|
+
|
|
3907
|
+
}
|
|
3908
|
+
|
|
3909
|
+
return this.toggleElement(this.$el, true, animate(this));
|
|
3910
|
+
},
|
|
3911
|
+
|
|
3912
|
+
hide() {
|
|
3913
|
+
return this.toggleElement(this.$el, false, animate(this));
|
|
3914
|
+
} } };
|
|
3915
|
+
|
|
3916
|
+
|
|
3917
|
+
|
|
3918
|
+
function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
|
|
3919
|
+
return (el, show) =>
|
|
3920
|
+
new Promise((resolve, reject) =>
|
|
3921
|
+
once(el, 'show hide', () => {
|
|
3922
|
+
el._reject == null ? void 0 : el._reject();
|
|
3923
|
+
el._reject = reject;
|
|
3924
|
+
|
|
3925
|
+
_toggle(el, show);
|
|
3926
|
+
|
|
3927
|
+
const off = once(
|
|
3928
|
+
transitionElement,
|
|
3929
|
+
'transitionstart',
|
|
3930
|
+
() => {
|
|
3931
|
+
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
3932
|
+
self: true });
|
|
3933
|
+
|
|
3934
|
+
clearTimeout(timer);
|
|
3935
|
+
},
|
|
3936
|
+
{ self: true });
|
|
3937
|
+
|
|
3938
|
+
|
|
3939
|
+
const timer = setTimeout(() => {
|
|
3940
|
+
off();
|
|
3941
|
+
resolve();
|
|
3942
|
+
}, toMs(css(transitionElement, 'transitionDuration')));
|
|
3943
|
+
})).
|
|
3944
|
+
then(() => delete el._reject);
|
|
3945
|
+
}
|
|
3946
|
+
|
|
3947
|
+
function toMs(time) {
|
|
3948
|
+
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
3949
|
+
}
|
|
3950
|
+
|
|
3951
|
+
function preventOverscroll(el) {
|
|
3952
|
+
if (CSS.supports('overscroll-behavior', 'contain')) {
|
|
3953
|
+
const elements = filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')));
|
|
3954
|
+
css(elements, 'overscrollBehavior', 'contain');
|
|
3955
|
+
return () => css(elements, 'overscrollBehavior', '');
|
|
3956
|
+
}
|
|
3957
|
+
|
|
3958
|
+
let startClientY;
|
|
3959
|
+
|
|
3960
|
+
const events = [
|
|
3961
|
+
on(
|
|
3962
|
+
el,
|
|
3963
|
+
'touchstart',
|
|
3964
|
+
(_ref6) => {let { targetTouches } = _ref6;
|
|
3965
|
+
if (targetTouches.length === 1) {
|
|
3966
|
+
startClientY = targetTouches[0].clientY;
|
|
3967
|
+
}
|
|
3968
|
+
},
|
|
3969
|
+
{ passive: true }),
|
|
3970
|
+
|
|
3971
|
+
|
|
3972
|
+
on(
|
|
3973
|
+
el,
|
|
3974
|
+
'touchmove',
|
|
3975
|
+
(e) => {
|
|
3976
|
+
if (e.targetTouches.length !== 1) {
|
|
3977
|
+
return;
|
|
3978
|
+
}
|
|
3979
|
+
|
|
3980
|
+
let [scrollParent] = scrollParents(e.target, /auto|scroll/);
|
|
3981
|
+
if (!within(scrollParent, el)) {
|
|
3982
|
+
scrollParent = el;
|
|
3983
|
+
}
|
|
3984
|
+
|
|
3985
|
+
const clientY = e.targetTouches[0].clientY - startClientY;
|
|
3986
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollParent;
|
|
3987
|
+
|
|
3988
|
+
if (
|
|
3989
|
+
clientHeight >= scrollHeight ||
|
|
3990
|
+
scrollTop === 0 && clientY > 0 ||
|
|
3991
|
+
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
3992
|
+
{
|
|
3993
|
+
e.cancelable && e.preventDefault();
|
|
3994
|
+
}
|
|
3995
|
+
},
|
|
3996
|
+
{ passive: false })];
|
|
3997
|
+
|
|
3998
|
+
|
|
3999
|
+
|
|
4000
|
+
return () => events.forEach((fn) => fn());
|
|
4001
|
+
}
|
|
4002
|
+
|
|
4003
|
+
let prevented;
|
|
4004
|
+
function preventBackgroundScroll() {
|
|
4005
|
+
if (prevented) {
|
|
4006
|
+
return noop;
|
|
4007
|
+
}
|
|
4008
|
+
prevented = true;
|
|
4009
|
+
const { body, documentElement } = document;
|
|
4010
|
+
css(body, {
|
|
4011
|
+
overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
|
|
4012
|
+
touchAction: 'none' });
|
|
4013
|
+
|
|
4014
|
+
css(documentElement, 'overflowY', 'hidden');
|
|
4015
|
+
return () => {
|
|
4016
|
+
prevented = false;
|
|
4017
|
+
css(documentElement, 'overflowY', '');
|
|
4018
|
+
css(body, { overflowY: '', touchAction: '' });
|
|
4019
|
+
};
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
function filterChildren(el, fn) {
|
|
4023
|
+
const children = [];
|
|
4024
|
+
apply(el, (node) => {
|
|
4025
|
+
if (fn(node)) {
|
|
4026
|
+
children.push(node);
|
|
4027
|
+
}
|
|
4028
|
+
});
|
|
4029
|
+
return children;
|
|
4030
|
+
}
|
|
4031
|
+
|
|
4032
|
+
let active;
|
|
4033
|
+
|
|
4034
|
+
var drop = {
|
|
4035
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4036
|
+
|
|
4037
|
+
args: 'pos',
|
|
4038
|
+
|
|
4039
|
+
props: {
|
|
4040
|
+
mode: 'list',
|
|
4041
|
+
toggle: Boolean,
|
|
4042
|
+
boundary: Boolean,
|
|
4043
|
+
target: Boolean,
|
|
4044
|
+
targetX: Boolean,
|
|
4045
|
+
targetY: Boolean,
|
|
4046
|
+
stretch: Boolean,
|
|
4047
|
+
delayShow: Number,
|
|
4048
|
+
delayHide: Number,
|
|
4049
|
+
display: String,
|
|
4050
|
+
clsDrop: String,
|
|
4051
|
+
animateOut: Boolean,
|
|
4052
|
+
bgScroll: Boolean },
|
|
4053
|
+
|
|
4054
|
+
|
|
4055
|
+
data: {
|
|
4056
|
+
mode: ['click', 'hover'],
|
|
4057
|
+
toggle: '- *',
|
|
4058
|
+
boundary: false,
|
|
4059
|
+
target: false,
|
|
4060
|
+
targetX: false,
|
|
4061
|
+
targetY: false,
|
|
4062
|
+
stretch: false,
|
|
4063
|
+
delayShow: 0,
|
|
4064
|
+
delayHide: 800,
|
|
4065
|
+
display: null,
|
|
4066
|
+
clsDrop: false,
|
|
4067
|
+
animateOut: false,
|
|
4068
|
+
bgScroll: true,
|
|
4069
|
+
animation: ['uk-animation-fade'],
|
|
4070
|
+
cls: 'uk-open',
|
|
4071
|
+
container: false },
|
|
4072
|
+
|
|
4073
|
+
|
|
4074
|
+
computed: {
|
|
4075
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4076
|
+
targetX = targetX || target || this.targetEl;
|
|
4077
|
+
targetY = targetY || target || this.targetEl;
|
|
4078
|
+
|
|
4079
|
+
return [
|
|
4080
|
+
targetX === true ? window : query(targetX, $el),
|
|
4081
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4082
|
+
|
|
4083
|
+
} },
|
|
4084
|
+
|
|
4085
|
+
|
|
4086
|
+
created() {
|
|
4087
|
+
this.tracker = new MouseTracker();
|
|
4088
|
+
},
|
|
4089
|
+
|
|
4090
|
+
beforeConnect() {
|
|
4091
|
+
this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
|
|
4092
|
+
},
|
|
4093
|
+
|
|
4094
|
+
connected() {
|
|
4095
|
+
addClass(this.$el, this.clsDrop);
|
|
4096
|
+
|
|
4097
|
+
if (this.toggle && !this.targetEl) {
|
|
4098
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4099
|
+
target: this.$el,
|
|
4100
|
+
mode: this.mode }).
|
|
4101
|
+
$el;
|
|
4102
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4103
|
+
this.lazyload(this.targetEl);
|
|
4104
|
+
}
|
|
4105
|
+
},
|
|
4106
|
+
|
|
4107
|
+
disconnected() {
|
|
4108
|
+
if (this.isActive()) {
|
|
4109
|
+
active = null;
|
|
4110
|
+
}
|
|
4111
|
+
},
|
|
4112
|
+
|
|
4113
|
+
events: [
|
|
4114
|
+
{
|
|
4115
|
+
name: 'click',
|
|
4116
|
+
|
|
4117
|
+
delegate() {
|
|
4118
|
+
return "." + this.clsDrop + "-close";
|
|
4119
|
+
},
|
|
4120
|
+
|
|
4121
|
+
handler(e) {
|
|
4122
|
+
e.preventDefault();
|
|
4123
|
+
this.hide(false);
|
|
4124
|
+
} },
|
|
4125
|
+
|
|
4126
|
+
|
|
4127
|
+
{
|
|
4128
|
+
name: 'click',
|
|
4129
|
+
|
|
4130
|
+
delegate() {
|
|
4131
|
+
return 'a[href^="#"]';
|
|
4132
|
+
},
|
|
4133
|
+
|
|
4134
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4135
|
+
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4136
|
+
this.hide(false);
|
|
4137
|
+
}
|
|
4138
|
+
} },
|
|
4139
|
+
|
|
4140
|
+
|
|
4141
|
+
{
|
|
4142
|
+
name: 'beforescroll',
|
|
4143
|
+
|
|
4144
|
+
handler() {
|
|
4145
|
+
this.hide(false);
|
|
4146
|
+
} },
|
|
4147
|
+
|
|
4148
|
+
|
|
4149
|
+
{
|
|
4150
|
+
name: 'toggle',
|
|
4151
|
+
|
|
4152
|
+
self: true,
|
|
4153
|
+
|
|
4154
|
+
handler(e, toggle) {
|
|
4155
|
+
e.preventDefault();
|
|
4156
|
+
|
|
4157
|
+
if (this.isToggled()) {
|
|
4158
|
+
this.hide(false);
|
|
3834
4159
|
} else {
|
|
3835
4160
|
this.show(toggle == null ? void 0 : toggle.$el, false);
|
|
3836
4161
|
}
|
|
@@ -3910,25 +4235,25 @@
|
|
|
3910
4235
|
self: true,
|
|
3911
4236
|
|
|
3912
4237
|
handler() {
|
|
3913
|
-
active
|
|
4238
|
+
active = this;
|
|
3914
4239
|
|
|
3915
4240
|
this.tracker.init();
|
|
3916
4241
|
|
|
3917
4242
|
for (const handler of [
|
|
3918
4243
|
on(
|
|
3919
4244
|
document,
|
|
3920
|
-
pointerDown,
|
|
3921
|
-
(
|
|
4245
|
+
pointerDown$1,
|
|
4246
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
3922
4247
|
!within(target, this.$el) &&
|
|
3923
4248
|
once(
|
|
3924
4249
|
document,
|
|
3925
|
-
pointerUp + " " + pointerCancel + " scroll",
|
|
3926
|
-
(
|
|
4250
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
4251
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3927
4252
|
if (
|
|
3928
4253
|
!defaultPrevented &&
|
|
3929
|
-
type === pointerUp &&
|
|
4254
|
+
type === pointerUp$1 &&
|
|
3930
4255
|
target === newTarget &&
|
|
3931
|
-
!(this.
|
|
4256
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
3932
4257
|
{
|
|
3933
4258
|
this.hide(false);
|
|
3934
4259
|
}
|
|
@@ -3943,13 +4268,17 @@
|
|
|
3943
4268
|
}
|
|
3944
4269
|
}),
|
|
3945
4270
|
|
|
3946
|
-
...(this.
|
|
4271
|
+
...(this.bgScroll ?
|
|
4272
|
+
[] :
|
|
4273
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()]),
|
|
4274
|
+
|
|
4275
|
+
...(this.display === 'static' ?
|
|
3947
4276
|
[] :
|
|
3948
4277
|
(() => {
|
|
3949
4278
|
const handler = () => this.$emit();
|
|
3950
4279
|
return [
|
|
3951
4280
|
on(window, 'resize', handler),
|
|
3952
|
-
on(document, 'scroll', handler
|
|
4281
|
+
on([document, scrollParents(this.$el)], 'scroll', handler),
|
|
3953
4282
|
(() => {
|
|
3954
4283
|
const observer = observeResize(
|
|
3955
4284
|
scrollParents(this.$el),
|
|
@@ -3978,16 +4307,16 @@
|
|
|
3978
4307
|
{
|
|
3979
4308
|
name: 'hide',
|
|
3980
4309
|
|
|
3981
|
-
handler(
|
|
4310
|
+
handler(_ref5) {let { target } = _ref5;
|
|
3982
4311
|
if (this.$el !== target) {
|
|
3983
|
-
active
|
|
3984
|
-
active
|
|
4312
|
+
active =
|
|
4313
|
+
active === null && within(target, this.$el) && this.isToggled() ?
|
|
3985
4314
|
this :
|
|
3986
|
-
active
|
|
4315
|
+
active;
|
|
3987
4316
|
return;
|
|
3988
4317
|
}
|
|
3989
4318
|
|
|
3990
|
-
active
|
|
4319
|
+
active = this.isActive() ? null : active;
|
|
3991
4320
|
this.tracker.cancel();
|
|
3992
4321
|
} }],
|
|
3993
4322
|
|
|
@@ -4002,12 +4331,12 @@
|
|
|
4002
4331
|
|
|
4003
4332
|
|
|
4004
4333
|
methods: {
|
|
4005
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4006
|
-
if (this.isToggled() && target && this.
|
|
4334
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4335
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4007
4336
|
this.hide(false, false);
|
|
4008
4337
|
}
|
|
4009
4338
|
|
|
4010
|
-
this.
|
|
4339
|
+
this.targetEl = target;
|
|
4011
4340
|
|
|
4012
4341
|
this.clearTimers();
|
|
4013
4342
|
|
|
@@ -4015,16 +4344,16 @@
|
|
|
4015
4344
|
return;
|
|
4016
4345
|
}
|
|
4017
4346
|
|
|
4018
|
-
if (active
|
|
4019
|
-
if (delay && active
|
|
4347
|
+
if (active) {
|
|
4348
|
+
if (delay && active.isDelaying) {
|
|
4020
4349
|
this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
|
|
4021
4350
|
return;
|
|
4022
4351
|
}
|
|
4023
4352
|
|
|
4024
4353
|
let prev;
|
|
4025
|
-
while (active
|
|
4026
|
-
prev = active
|
|
4027
|
-
active
|
|
4354
|
+
while (active && prev !== active && !within(this.$el, active.$el)) {
|
|
4355
|
+
prev = active;
|
|
4356
|
+
active.hide(false, false);
|
|
4028
4357
|
}
|
|
4029
4358
|
}
|
|
4030
4359
|
|
|
@@ -4065,65 +4394,74 @@
|
|
|
4065
4394
|
},
|
|
4066
4395
|
|
|
4067
4396
|
isActive() {
|
|
4068
|
-
return active
|
|
4397
|
+
return active === this;
|
|
4069
4398
|
},
|
|
4070
4399
|
|
|
4071
4400
|
position() {
|
|
4072
4401
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4073
|
-
|
|
4074
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4402
|
+
attr(this.$el, 'style', this._style);
|
|
4075
4403
|
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
const [scrollParent] = scrollParents(
|
|
4079
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4404
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4405
|
+
this.$el.hidden = true;
|
|
4080
4406
|
|
|
4081
|
-
const
|
|
4082
|
-
const boundaryOffset = boundary
|
|
4407
|
+
const boundary = query(this.boundary, this.$el);
|
|
4408
|
+
const boundaryOffset = offsetViewport(boundary || window);
|
|
4409
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4083
4410
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4084
4411
|
|
|
4085
|
-
|
|
4086
|
-
|
|
4412
|
+
const dirs = [
|
|
4413
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4414
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4087
4415
|
|
|
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) {
|
|
4416
|
+
|
|
4417
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4418
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4419
|
+
css(this.$el, {
|
|
4420
|
+
[prop]: Math.min(
|
|
4421
|
+
boundaryOffset[prop],
|
|
4422
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4423
|
+
|
|
4424
|
+
["overflow-" + axis]: 'auto' });
|
|
4425
|
+
|
|
4426
|
+
}
|
|
4427
|
+
}
|
|
4428
|
+
|
|
4429
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4430
|
+
|
|
4431
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4121
4432
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4122
4433
|
}
|
|
4123
4434
|
|
|
4124
4435
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4125
4436
|
|
|
4126
|
-
this
|
|
4437
|
+
this.$el.hidden = false;
|
|
4438
|
+
|
|
4439
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4440
|
+
|
|
4441
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4442
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4443
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4444
|
+
const targetOffset = offset(this.target[i]);
|
|
4445
|
+
const elOffset = offset(this.$el);
|
|
4446
|
+
|
|
4447
|
+
css(this.$el, {
|
|
4448
|
+
[prop]:
|
|
4449
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4450
|
+
targetOffset[start] -
|
|
4451
|
+
Math.max(
|
|
4452
|
+
boundaryOffset[start],
|
|
4453
|
+
viewports[i][start] + viewportOffset) :
|
|
4454
|
+
|
|
4455
|
+
Math.min(
|
|
4456
|
+
boundaryOffset[end],
|
|
4457
|
+
viewports[i][end] - viewportOffset) -
|
|
4458
|
+
targetOffset[end]) - positionOffset,
|
|
4459
|
+
["overflow-" + axis]: 'auto' });
|
|
4460
|
+
|
|
4461
|
+
|
|
4462
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4463
|
+
}
|
|
4464
|
+
}
|
|
4127
4465
|
} } };
|
|
4128
4466
|
|
|
4129
4467
|
|
|
@@ -4620,8 +4958,11 @@
|
|
|
4620
4958
|
let minHeight = '';
|
|
4621
4959
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4622
4960
|
|
|
4961
|
+
const { body, scrollingElement } = document;
|
|
4623
4962
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4624
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4963
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4964
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4965
|
+
|
|
4625
4966
|
|
|
4626
4967
|
if (this.expand) {
|
|
4627
4968
|
minHeight = Math.max(
|
|
@@ -4631,14 +4972,19 @@
|
|
|
4631
4972
|
0);
|
|
4632
4973
|
|
|
4633
4974
|
} else {
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
|
|
4975
|
+
const isScrollingElement =
|
|
4976
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
4637
4977
|
|
|
4978
|
+
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4979
|
+
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
4638
4980
|
|
|
4639
4981
|
if (this.offsetTop) {
|
|
4640
|
-
|
|
4641
|
-
|
|
4982
|
+
if (isScrollingElement) {
|
|
4983
|
+
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4984
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4985
|
+
} else {
|
|
4986
|
+
minHeight += " - " + css(scrollElement, 'paddingTop');
|
|
4987
|
+
}
|
|
4642
4988
|
}
|
|
4643
4989
|
|
|
4644
4990
|
if (this.offsetBottom === true) {
|
|
@@ -4877,11 +5223,17 @@
|
|
|
4877
5223
|
|
|
4878
5224
|
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
5225
|
|
|
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>";
|
|
5226
|
+
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>";
|
|
5227
|
+
|
|
5228
|
+
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>";
|
|
5229
|
+
|
|
5230
|
+
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>";
|
|
5231
|
+
|
|
5232
|
+
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
5233
|
|
|
4882
|
-
var
|
|
5234
|
+
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
5235
|
|
|
4884
|
-
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"
|
|
5236
|
+
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
5237
|
|
|
4886
5238
|
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
5239
|
|
|
@@ -4913,6 +5265,9 @@
|
|
|
4913
5265
|
marker,
|
|
4914
5266
|
'close-icon': closeIcon,
|
|
4915
5267
|
'close-large': closeLarge,
|
|
5268
|
+
'nav-parent-icon': navParentIcon,
|
|
5269
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5270
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
4916
5271
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
4917
5272
|
'overlay-icon': overlayIcon,
|
|
4918
5273
|
'pagination-next': paginationNext,
|
|
@@ -4970,6 +5325,15 @@
|
|
|
4970
5325
|
} };
|
|
4971
5326
|
|
|
4972
5327
|
|
|
5328
|
+
const NavParentIcon = {
|
|
5329
|
+
extends: IconComponent,
|
|
5330
|
+
|
|
5331
|
+
beforeConnect() {
|
|
5332
|
+
const icon = this.$props.icon;
|
|
5333
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5334
|
+
} };
|
|
5335
|
+
|
|
5336
|
+
|
|
4973
5337
|
const Slidenav = {
|
|
4974
5338
|
extends: IconComponent,
|
|
4975
5339
|
|
|
@@ -5181,385 +5545,133 @@
|
|
|
5181
5545
|
append(picture, source);
|
|
5182
5546
|
}
|
|
5183
5547
|
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 });
|
|
5548
|
+
}
|
|
5549
|
+
}
|
|
5452
5550
|
|
|
5453
|
-
|
|
5551
|
+
function parseSources(sources) {
|
|
5552
|
+
if (!sources) {
|
|
5553
|
+
return [];
|
|
5554
|
+
}
|
|
5454
5555
|
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
{ self: true });
|
|
5556
|
+
if (startsWith(sources, '[')) {
|
|
5557
|
+
try {
|
|
5558
|
+
sources = JSON.parse(sources);
|
|
5559
|
+
} catch (e) {
|
|
5560
|
+
sources = [];
|
|
5561
|
+
}
|
|
5562
|
+
} else {
|
|
5563
|
+
sources = parseOptions(sources);
|
|
5564
|
+
}
|
|
5465
5565
|
|
|
5466
|
-
|
|
5467
|
-
|
|
5566
|
+
if (!isArray(sources)) {
|
|
5567
|
+
sources = [sources];
|
|
5568
|
+
}
|
|
5468
5569
|
|
|
5570
|
+
return sources.filter((source) => !isEmpty(source));
|
|
5571
|
+
}
|
|
5469
5572
|
|
|
5470
|
-
|
|
5471
|
-
|
|
5573
|
+
function ensureSrcAttribute(el) {
|
|
5574
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
5575
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
5576
|
+
}
|
|
5577
|
+
}
|
|
5472
5578
|
|
|
5473
|
-
|
|
5579
|
+
function isPicture(el) {
|
|
5580
|
+
return isTag(el, 'picture');
|
|
5581
|
+
}
|
|
5474
5582
|
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
}
|
|
5583
|
+
function isImg(el) {
|
|
5584
|
+
return isTag(el, 'img');
|
|
5585
|
+
}
|
|
5479
5586
|
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
} },
|
|
5587
|
+
var Media = {
|
|
5588
|
+
props: {
|
|
5589
|
+
media: Boolean },
|
|
5484
5590
|
|
|
5485
5591
|
|
|
5486
|
-
{
|
|
5487
|
-
|
|
5592
|
+
data: {
|
|
5593
|
+
media: false },
|
|
5488
5594
|
|
|
5489
|
-
self: true,
|
|
5490
5595
|
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5596
|
+
connected() {
|
|
5597
|
+
const media = toMedia(this.media, this.$el);
|
|
5598
|
+
this.matchMedia = true;
|
|
5599
|
+
if (media) {
|
|
5600
|
+
this.mediaObj = window.matchMedia(media);
|
|
5601
|
+
const handler = () => {
|
|
5602
|
+
this.matchMedia = this.mediaObj.matches;
|
|
5603
|
+
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5604
|
+
};
|
|
5605
|
+
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5606
|
+
handler();
|
|
5607
|
+
this.$emit('resize');
|
|
5608
|
+
});
|
|
5609
|
+
handler();
|
|
5610
|
+
}
|
|
5611
|
+
},
|
|
5495
5612
|
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5613
|
+
disconnected() {var _this$offMediaObj;
|
|
5614
|
+
(_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
|
|
5615
|
+
} };
|
|
5499
5616
|
|
|
5500
|
-
css(this.$el, 'zIndex', '');
|
|
5501
5617
|
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5618
|
+
function toMedia(value, element) {
|
|
5619
|
+
if (isString(value)) {
|
|
5620
|
+
if (startsWith(value, '@')) {
|
|
5621
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5622
|
+
} else if (isNaN(value)) {
|
|
5623
|
+
return value;
|
|
5624
|
+
}
|
|
5625
|
+
}
|
|
5506
5626
|
|
|
5627
|
+
return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
|
|
5628
|
+
}
|
|
5507
5629
|
|
|
5630
|
+
var leader = {
|
|
5631
|
+
mixins: [Class, Media, Resize],
|
|
5508
5632
|
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
return this.isToggled() ? this.hide() : this.show();
|
|
5512
|
-
},
|
|
5633
|
+
props: {
|
|
5634
|
+
fill: String },
|
|
5513
5635
|
|
|
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
5636
|
|
|
5520
|
-
|
|
5637
|
+
data: {
|
|
5638
|
+
fill: '',
|
|
5639
|
+
clsWrapper: 'uk-leader-fill',
|
|
5640
|
+
clsHide: 'uk-leader-hide',
|
|
5641
|
+
attrFill: 'data-fill' },
|
|
5521
5642
|
|
|
5522
|
-
return this.toggleElement(this.$el, true, animate(this));
|
|
5523
|
-
},
|
|
5524
5643
|
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5644
|
+
computed: {
|
|
5645
|
+
fill(_ref) {let { fill } = _ref;
|
|
5646
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5647
|
+
} },
|
|
5528
5648
|
|
|
5529
5649
|
|
|
5650
|
+
connected() {
|
|
5651
|
+
[this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
|
|
5652
|
+
},
|
|
5530
5653
|
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
once(el, 'show hide', () => {
|
|
5535
|
-
el._reject == null ? void 0 : el._reject();
|
|
5536
|
-
el._reject = reject;
|
|
5654
|
+
disconnected() {
|
|
5655
|
+
unwrap(this.wrapper.childNodes);
|
|
5656
|
+
},
|
|
5537
5657
|
|
|
5538
|
-
|
|
5658
|
+
update: {
|
|
5659
|
+
read() {
|
|
5660
|
+
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5539
5661
|
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
5545
|
-
self: true });
|
|
5662
|
+
return {
|
|
5663
|
+
width,
|
|
5664
|
+
fill: this.fill,
|
|
5665
|
+
hide: !this.matchMedia };
|
|
5546
5666
|
|
|
5547
|
-
clearTimeout(timer);
|
|
5548
5667
|
},
|
|
5549
|
-
{ self: true });
|
|
5550
5668
|
|
|
5669
|
+
write(_ref2) {let { width, fill, hide } = _ref2;
|
|
5670
|
+
toggleClass(this.wrapper, this.clsHide, hide);
|
|
5671
|
+
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5672
|
+
},
|
|
5551
5673
|
|
|
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
|
-
}
|
|
5674
|
+
events: ['resize'] } };
|
|
5563
5675
|
|
|
5564
5676
|
var modal = {
|
|
5565
5677
|
install: install$2,
|
|
@@ -5723,7 +5835,9 @@
|
|
|
5723
5835
|
align: String,
|
|
5724
5836
|
offset: Number,
|
|
5725
5837
|
boundary: Boolean,
|
|
5726
|
-
|
|
5838
|
+
target: Boolean,
|
|
5839
|
+
targetX: Boolean,
|
|
5840
|
+
targetY: Boolean,
|
|
5727
5841
|
clsDrop: String,
|
|
5728
5842
|
delayShow: Number,
|
|
5729
5843
|
delayHide: Number,
|
|
@@ -5740,9 +5854,12 @@
|
|
|
5740
5854
|
offset: undefined,
|
|
5741
5855
|
delayShow: undefined,
|
|
5742
5856
|
delayHide: undefined,
|
|
5743
|
-
|
|
5744
|
-
|
|
5857
|
+
flip: false,
|
|
5858
|
+
shift: true,
|
|
5745
5859
|
boundary: true,
|
|
5860
|
+
target: false,
|
|
5861
|
+
targetX: false,
|
|
5862
|
+
targetY: false,
|
|
5746
5863
|
dropbar: false,
|
|
5747
5864
|
dropbarAnchor: false,
|
|
5748
5865
|
duration: 200,
|
|
@@ -5777,7 +5894,7 @@
|
|
|
5777
5894
|
},
|
|
5778
5895
|
|
|
5779
5896
|
watch(dropbar) {
|
|
5780
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5897
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5781
5898
|
},
|
|
5782
5899
|
|
|
5783
5900
|
immediate: true },
|
|
@@ -5793,7 +5910,7 @@
|
|
|
5793
5910
|
|
|
5794
5911
|
if (this.dropContainer !== $el) {
|
|
5795
5912
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5796
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5913
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5797
5914
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5798
5915
|
dropdowns.push(el);
|
|
5799
5916
|
}
|
|
@@ -5810,8 +5927,7 @@
|
|
|
5810
5927
|
{
|
|
5811
5928
|
...this.$props,
|
|
5812
5929
|
boundary: this.boundary,
|
|
5813
|
-
pos: this.pos
|
|
5814
|
-
offset: this.dropbar || this.offset });
|
|
5930
|
+
pos: this.pos });
|
|
5815
5931
|
|
|
5816
5932
|
|
|
5817
5933
|
},
|
|
@@ -5856,8 +5972,8 @@
|
|
|
5856
5972
|
if (
|
|
5857
5973
|
active &&
|
|
5858
5974
|
includes(active.mode, 'hover') &&
|
|
5859
|
-
active.
|
|
5860
|
-
!within(active.
|
|
5975
|
+
active.targetEl &&
|
|
5976
|
+
!within(active.targetEl, current) &&
|
|
5861
5977
|
!active.isDelaying)
|
|
5862
5978
|
{
|
|
5863
5979
|
active.hide(false);
|
|
@@ -5879,7 +5995,7 @@
|
|
|
5879
5995
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5880
5996
|
e.preventDefault();
|
|
5881
5997
|
|
|
5882
|
-
if (!active || active.
|
|
5998
|
+
if (!active || active.targetEl !== current) {
|
|
5883
5999
|
current.click();
|
|
5884
6000
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5885
6001
|
focusFirstFocusableElement(target));});
|
|
@@ -5929,8 +6045,8 @@
|
|
|
5929
6045
|
}
|
|
5930
6046
|
}
|
|
5931
6047
|
|
|
5932
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
5933
|
-
active == null ? void 0 : (_active$
|
|
6048
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6049
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
5934
6050
|
}
|
|
5935
6051
|
|
|
5936
6052
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -5972,8 +6088,8 @@
|
|
|
5972
6088
|
return this.dropbar;
|
|
5973
6089
|
},
|
|
5974
6090
|
|
|
5975
|
-
handler(
|
|
5976
|
-
if (!
|
|
6091
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6092
|
+
if (!this.isDropbarDrop(target)) {
|
|
5977
6093
|
return;
|
|
5978
6094
|
}
|
|
5979
6095
|
|
|
@@ -5981,7 +6097,7 @@
|
|
|
5981
6097
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
5982
6098
|
}
|
|
5983
6099
|
|
|
5984
|
-
addClass(
|
|
6100
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
5985
6101
|
} },
|
|
5986
6102
|
|
|
5987
6103
|
|
|
@@ -5996,19 +6112,24 @@
|
|
|
5996
6112
|
return this.dropbar;
|
|
5997
6113
|
},
|
|
5998
6114
|
|
|
5999
|
-
handler(
|
|
6000
|
-
if (!
|
|
6115
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6116
|
+
if (!this.isDropbarDrop(target)) {
|
|
6001
6117
|
return;
|
|
6002
6118
|
}
|
|
6003
6119
|
|
|
6004
|
-
this._observer = observeResize(
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6120
|
+
this._observer = observeResize(target, () => {
|
|
6121
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6122
|
+
concat(target).
|
|
6123
|
+
map((el) => offset(el));
|
|
6124
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6125
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6126
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6127
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6128
|
+
this.transitionTo(
|
|
6129
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6130
|
+
target);
|
|
6011
6131
|
|
|
6132
|
+
});
|
|
6012
6133
|
} },
|
|
6013
6134
|
|
|
6014
6135
|
|
|
@@ -6023,13 +6144,13 @@
|
|
|
6023
6144
|
return this.dropbar;
|
|
6024
6145
|
},
|
|
6025
6146
|
|
|
6026
|
-
handler(e
|
|
6147
|
+
handler(e) {
|
|
6027
6148
|
const active = this.getActive();
|
|
6028
6149
|
|
|
6029
6150
|
if (
|
|
6030
6151
|
matches(this.dropbar, ':hover') &&
|
|
6031
|
-
(active == null ? void 0 : active.$el) ===
|
|
6032
|
-
!this.toggles.some((el) => active.
|
|
6152
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6153
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6033
6154
|
{
|
|
6034
6155
|
e.preventDefault();
|
|
6035
6156
|
}
|
|
@@ -6047,8 +6168,8 @@
|
|
|
6047
6168
|
return this.dropbar;
|
|
6048
6169
|
},
|
|
6049
6170
|
|
|
6050
|
-
handler(
|
|
6051
|
-
if (!
|
|
6171
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6172
|
+
if (!this.isDropbarDrop(target)) {
|
|
6052
6173
|
return;
|
|
6053
6174
|
}
|
|
6054
6175
|
|
|
@@ -6056,7 +6177,7 @@
|
|
|
6056
6177
|
|
|
6057
6178
|
const active = this.getActive();
|
|
6058
6179
|
|
|
6059
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6180
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6060
6181
|
this.transitionTo(0);
|
|
6061
6182
|
}
|
|
6062
6183
|
} }],
|
|
@@ -6065,7 +6186,7 @@
|
|
|
6065
6186
|
|
|
6066
6187
|
methods: {
|
|
6067
6188
|
getActive() {
|
|
6068
|
-
return active
|
|
6189
|
+
return active && within(active.targetEl, this.$el) && active;
|
|
6069
6190
|
},
|
|
6070
6191
|
|
|
6071
6192
|
transitionTo(newHeight, el) {
|
|
@@ -6095,13 +6216,17 @@
|
|
|
6095
6216
|
|
|
6096
6217
|
getDropdown(el) {
|
|
6097
6218
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6219
|
+
},
|
|
6220
|
+
|
|
6221
|
+
isDropbarDrop(el) {
|
|
6222
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6098
6223
|
} } };
|
|
6099
6224
|
|
|
6100
6225
|
|
|
6101
6226
|
|
|
6102
6227
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6103
6228
|
const { current, keyCode } = e;
|
|
6104
|
-
const target = (active == null ? void 0 : active.
|
|
6229
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6105
6230
|
const i = toggles.indexOf(target);
|
|
6106
6231
|
|
|
6107
6232
|
// Left
|
|
@@ -6158,7 +6283,7 @@
|
|
|
6158
6283
|
|
|
6159
6284
|
registerEvent(this, {
|
|
6160
6285
|
el: this.swipeTarget,
|
|
6161
|
-
name: pointerDown,
|
|
6286
|
+
name: pointerDown$1,
|
|
6162
6287
|
passive: true,
|
|
6163
6288
|
handler(e) {
|
|
6164
6289
|
if (!isTouch(e)) {
|
|
@@ -6168,7 +6293,7 @@
|
|
|
6168
6293
|
// Handle Swipe Gesture
|
|
6169
6294
|
const pos = getEventPos(e);
|
|
6170
6295
|
const target = 'tagName' in e.target ? e.target : parent(e.target);
|
|
6171
|
-
once(document, pointerUp + " " + pointerCancel + " scroll", (e) => {
|
|
6296
|
+
once(document, pointerUp$1 + " " + pointerCancel + " scroll", (e) => {
|
|
6172
6297
|
const { x, y } = getEventPos(e);
|
|
6173
6298
|
|
|
6174
6299
|
// swipe
|
|
@@ -6275,22 +6400,6 @@
|
|
|
6275
6400
|
} },
|
|
6276
6401
|
|
|
6277
6402
|
|
|
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
6403
|
{
|
|
6295
6404
|
name: 'touchmove',
|
|
6296
6405
|
|
|
@@ -6306,33 +6415,6 @@
|
|
|
6306
6415
|
} },
|
|
6307
6416
|
|
|
6308
6417
|
|
|
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
6418
|
{
|
|
6337
6419
|
name: 'show',
|
|
6338
6420
|
|
|
@@ -6344,7 +6426,6 @@
|
|
|
6344
6426
|
addClass(parent(this.panel), this.clsMode);
|
|
6345
6427
|
}
|
|
6346
6428
|
|
|
6347
|
-
css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : '');
|
|
6348
6429
|
addClass(document.body, this.clsContainer, this.clsFlip);
|
|
6349
6430
|
css(document.body, 'touch-action', 'pan-y pinch-zoom');
|
|
6350
6431
|
css(this.$el, 'display', 'block');
|
|
@@ -6352,7 +6433,7 @@
|
|
|
6352
6433
|
addClass(
|
|
6353
6434
|
this.panel,
|
|
6354
6435
|
this.clsSidebarAnimation,
|
|
6355
|
-
this.mode
|
|
6436
|
+
this.mode === 'reveal' ? '' : this.clsMode);
|
|
6356
6437
|
|
|
6357
6438
|
|
|
6358
6439
|
height(document.body); // force reflow
|
|
@@ -6389,8 +6470,6 @@
|
|
|
6389
6470
|
removeClass(this.$el, this.clsOverlay);
|
|
6390
6471
|
css(this.$el, 'display', '');
|
|
6391
6472
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
6392
|
-
|
|
6393
|
-
css(document.documentElement, 'overflowY', '');
|
|
6394
6473
|
} },
|
|
6395
6474
|
|
|
6396
6475
|
|
|
@@ -6515,6 +6594,14 @@
|
|
|
6515
6594
|
offset: 0 },
|
|
6516
6595
|
|
|
6517
6596
|
|
|
6597
|
+
connected() {
|
|
6598
|
+
registerClick(this);
|
|
6599
|
+
},
|
|
6600
|
+
|
|
6601
|
+
disconnected() {
|
|
6602
|
+
unregisterClick(this);
|
|
6603
|
+
},
|
|
6604
|
+
|
|
6518
6605
|
methods: {
|
|
6519
6606
|
async scrollTo(el) {
|
|
6520
6607
|
el = el && $(el) || document.body;
|
|
@@ -6523,20 +6610,39 @@
|
|
|
6523
6610
|
await scrollIntoView(el, { offset: this.offset });
|
|
6524
6611
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6525
6612
|
}
|
|
6526
|
-
} }
|
|
6613
|
+
} } };
|
|
6527
6614
|
|
|
6528
6615
|
|
|
6529
|
-
events: {
|
|
6530
|
-
click(e) {
|
|
6531
|
-
if (e.defaultPrevented) {
|
|
6532
|
-
return;
|
|
6533
|
-
}
|
|
6534
6616
|
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6617
|
+
const components$2 = new Set();
|
|
6618
|
+
function registerClick(cmp) {
|
|
6619
|
+
if (!components$2.size) {
|
|
6620
|
+
on(document, 'click', clickHandler);
|
|
6621
|
+
}
|
|
6622
|
+
|
|
6623
|
+
components$2.add(cmp);
|
|
6624
|
+
}
|
|
6625
|
+
|
|
6626
|
+
function unregisterClick(cmp) {
|
|
6627
|
+
components$2.delete(cmp);
|
|
6628
|
+
|
|
6629
|
+
if (!components$2.length) {
|
|
6630
|
+
off(document, 'click', clickHandler);
|
|
6631
|
+
}
|
|
6632
|
+
}
|
|
6538
6633
|
|
|
6634
|
+
function clickHandler(e) {
|
|
6635
|
+
if (e.defaultPrevented) {
|
|
6636
|
+
return;
|
|
6637
|
+
}
|
|
6539
6638
|
|
|
6639
|
+
for (const component of components$2) {
|
|
6640
|
+
if (within(e.target, component.$el)) {
|
|
6641
|
+
e.preventDefault();
|
|
6642
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6643
|
+
}
|
|
6644
|
+
}
|
|
6645
|
+
}
|
|
6540
6646
|
|
|
6541
6647
|
function getTargetElement(el) {
|
|
6542
6648
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -6866,7 +6972,9 @@
|
|
|
6866
6972
|
},
|
|
6867
6973
|
|
|
6868
6974
|
handler() {
|
|
6869
|
-
|
|
6975
|
+
const { scrollingElement } = document;
|
|
6976
|
+
|
|
6977
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6870
6978
|
return;
|
|
6871
6979
|
}
|
|
6872
6980
|
|
|
@@ -6875,13 +6983,11 @@
|
|
|
6875
6983
|
const elOffset = offset(this.$el);
|
|
6876
6984
|
|
|
6877
6985
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6878
|
-
scrollTop
|
|
6879
|
-
window,
|
|
6986
|
+
scrollingElement.scrollTop =
|
|
6880
6987
|
targetOffset.top -
|
|
6881
6988
|
elOffset.height -
|
|
6882
6989
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6883
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6884
|
-
|
|
6990
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6885
6991
|
}
|
|
6886
6992
|
});
|
|
6887
6993
|
} }],
|
|
@@ -6979,7 +7085,7 @@
|
|
|
6979
7085
|
|
|
6980
7086
|
|
|
6981
7087
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
6982
|
-
const scroll = scrollTop
|
|
7088
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
6983
7089
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
6984
7090
|
|
|
6985
7091
|
return {
|
|
@@ -7388,7 +7494,7 @@
|
|
|
7388
7494
|
|
|
7389
7495
|
events: [
|
|
7390
7496
|
{
|
|
7391
|
-
name: pointerDown,
|
|
7497
|
+
name: pointerDown$1,
|
|
7392
7498
|
|
|
7393
7499
|
filter() {
|
|
7394
7500
|
return includes(this.mode, 'hover');
|
|
@@ -7406,7 +7512,7 @@
|
|
|
7406
7512
|
trigger(this.$el, 'focus');
|
|
7407
7513
|
once(
|
|
7408
7514
|
document,
|
|
7409
|
-
pointerDown,
|
|
7515
|
+
pointerDown$1,
|
|
7410
7516
|
() => trigger(this.$el, 'blur'),
|
|
7411
7517
|
true,
|
|
7412
7518
|
(e) => !within(e.target, this.$el));
|
|
@@ -7499,7 +7605,7 @@
|
|
|
7499
7605
|
|
|
7500
7606
|
|
|
7501
7607
|
{
|
|
7502
|
-
name: '
|
|
7608
|
+
name: 'hide show',
|
|
7503
7609
|
|
|
7504
7610
|
self: true,
|
|
7505
7611
|
|
|
@@ -7507,10 +7613,8 @@
|
|
|
7507
7613
|
return this.target;
|
|
7508
7614
|
},
|
|
7509
7615
|
|
|
7510
|
-
handler(
|
|
7511
|
-
|
|
7512
|
-
this.updateAria(toggled);
|
|
7513
|
-
}
|
|
7616
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7617
|
+
this.updateAria(type === 'show');
|
|
7514
7618
|
} },
|
|
7515
7619
|
|
|
7516
7620
|
|
|
@@ -7605,10 +7709,12 @@
|
|
|
7605
7709
|
Video: Video,
|
|
7606
7710
|
Close: Close,
|
|
7607
7711
|
Spinner: Spinner,
|
|
7712
|
+
NavParentIcon: NavParentIcon,
|
|
7608
7713
|
SlidenavNext: Slidenav,
|
|
7609
7714
|
SlidenavPrevious: Slidenav,
|
|
7610
7715
|
SearchIcon: Search,
|
|
7611
7716
|
Marker: IconComponent,
|
|
7717
|
+
NavbarParentIcon: IconComponent,
|
|
7612
7718
|
NavbarToggleIcon: IconComponent,
|
|
7613
7719
|
OverlayIcon: IconComponent,
|
|
7614
7720
|
PaginationNext: IconComponent,
|
|
@@ -8098,7 +8204,7 @@
|
|
|
8098
8204
|
|
|
8099
8205
|
},
|
|
8100
8206
|
|
|
8101
|
-
setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8207
|
+
async setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8102
8208
|
state = { filter: { '': '' }, sort: [], ...state };
|
|
8103
8209
|
|
|
8104
8210
|
trigger(this.$el, 'beforeFilter', [this, state]);
|
|
@@ -8107,15 +8213,17 @@
|
|
|
8107
8213
|
toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
|
|
8108
8214
|
|
|
8109
8215
|
|
|
8110
|
-
Promise.all(
|
|
8216
|
+
await Promise.all(
|
|
8111
8217
|
$$(this.target, this.$el).map((target) => {
|
|
8112
8218
|
const filterFn = () => {
|
|
8113
8219
|
applyState(state, target, children(target));
|
|
8114
8220
|
this.$update(this.$el);
|
|
8115
8221
|
};
|
|
8116
8222
|
return animate ? this.animate(filterFn, target) : filterFn();
|
|
8117
|
-
}))
|
|
8118
|
-
|
|
8223
|
+
}));
|
|
8224
|
+
|
|
8225
|
+
|
|
8226
|
+
trigger(this.$el, 'afterFilter', [this]);
|
|
8119
8227
|
},
|
|
8120
8228
|
|
|
8121
8229
|
updateState() {
|
|
@@ -8405,6 +8513,11 @@
|
|
|
8405
8513
|
this.interval && clearInterval(this.interval);
|
|
8406
8514
|
} } };
|
|
8407
8515
|
|
|
8516
|
+
const pointerOptions = { passive: false, capture: true };
|
|
8517
|
+
const pointerDown = 'touchstart mousedown';
|
|
8518
|
+
const pointerMove = 'touchmove mousemove';
|
|
8519
|
+
const pointerUp = 'touchend touchcancel mouseup click input';
|
|
8520
|
+
|
|
8408
8521
|
var SliderDrag = {
|
|
8409
8522
|
props: {
|
|
8410
8523
|
draggable: Boolean },
|
|
@@ -8457,7 +8570,17 @@
|
|
|
8457
8570
|
|
|
8458
8571
|
handler(e) {
|
|
8459
8572
|
e.preventDefault();
|
|
8460
|
-
} }
|
|
8573
|
+
} },
|
|
8574
|
+
|
|
8575
|
+
|
|
8576
|
+
{
|
|
8577
|
+
// iOS workaround for slider stopping if swiping fast
|
|
8578
|
+
name: pointerMove + " " + pointerUp,
|
|
8579
|
+
el() {
|
|
8580
|
+
return this.list;
|
|
8581
|
+
},
|
|
8582
|
+
handler: noop,
|
|
8583
|
+
...pointerOptions }],
|
|
8461
8584
|
|
|
8462
8585
|
|
|
8463
8586
|
|
|
@@ -8479,10 +8602,10 @@
|
|
|
8479
8602
|
this.prevIndex = this.index;
|
|
8480
8603
|
}
|
|
8481
8604
|
|
|
8482
|
-
on(document, pointerMove, this.move,
|
|
8605
|
+
on(document, pointerMove, this.move, pointerOptions);
|
|
8483
8606
|
|
|
8484
8607
|
// 'input' event is triggered by video controls
|
|
8485
|
-
on(document, pointerUp
|
|
8608
|
+
on(document, pointerUp, this.end, pointerOptions);
|
|
8486
8609
|
|
|
8487
8610
|
css(this.list, 'userSelect', 'none');
|
|
8488
8611
|
},
|
|
@@ -8562,8 +8685,8 @@
|
|
|
8562
8685
|
},
|
|
8563
8686
|
|
|
8564
8687
|
end() {
|
|
8565
|
-
off(document, pointerMove, this.move,
|
|
8566
|
-
off(document, pointerUp
|
|
8688
|
+
off(document, pointerMove, this.move, pointerOptions);
|
|
8689
|
+
off(document, pointerUp, this.end, pointerOptions);
|
|
8567
8690
|
|
|
8568
8691
|
if (this.dragging) {
|
|
8569
8692
|
this.dragging = null;
|
|
@@ -8971,7 +9094,7 @@
|
|
|
8971
9094
|
|
|
8972
9095
|
events: [
|
|
8973
9096
|
{
|
|
8974
|
-
name: pointerMove + " " + pointerDown + " keydown",
|
|
9097
|
+
name: pointerMove$1 + " " + pointerDown$1 + " keydown",
|
|
8975
9098
|
|
|
8976
9099
|
handler: 'showControls' },
|
|
8977
9100
|
|
|
@@ -10626,7 +10749,7 @@
|
|
|
10626
10749
|
},
|
|
10627
10750
|
|
|
10628
10751
|
events: {
|
|
10629
|
-
name: pointerDown,
|
|
10752
|
+
name: pointerDown$1,
|
|
10630
10753
|
passive: false,
|
|
10631
10754
|
handler: 'init' },
|
|
10632
10755
|
|
|
@@ -10756,8 +10879,8 @@
|
|
|
10756
10879
|
this.placeholder = placeholder;
|
|
10757
10880
|
this.origin = { target, index: index(placeholder), ...this.pos };
|
|
10758
10881
|
|
|
10759
|
-
on(document, pointerMove, this.move);
|
|
10760
|
-
on(document, pointerUp, this.end);
|
|
10882
|
+
on(document, pointerMove$1, this.move);
|
|
10883
|
+
on(document, pointerUp$1, this.end);
|
|
10761
10884
|
|
|
10762
10885
|
if (!this.threshold) {
|
|
10763
10886
|
this.start(e);
|
|
@@ -10793,8 +10916,8 @@
|
|
|
10793
10916
|
},
|
|
10794
10917
|
|
|
10795
10918
|
end() {
|
|
10796
|
-
off(document, pointerMove, this.move);
|
|
10797
|
-
off(document, pointerUp, this.end);
|
|
10919
|
+
off(document, pointerMove$1, this.move);
|
|
10920
|
+
off(document, pointerUp$1, this.end);
|
|
10798
10921
|
|
|
10799
10922
|
if (!this.drag) {
|
|
10800
10923
|
return;
|
|
@@ -10863,7 +10986,7 @@
|
|
|
10863
10986
|
let last = Date.now();
|
|
10864
10987
|
trackTimer = setInterval(() => {
|
|
10865
10988
|
let { x, y } = pos;
|
|
10866
|
-
y += scrollTop
|
|
10989
|
+
y += document.scrollingElement.scrollTop;
|
|
10867
10990
|
|
|
10868
10991
|
const dist = (Date.now() - last) * 0.3;
|
|
10869
10992
|
last = Date.now();
|
|
@@ -10884,7 +11007,7 @@
|
|
|
10884
11007
|
}
|
|
10885
11008
|
|
|
10886
11009
|
if (scroll > 0 && scroll < scrollHeight - height) {
|
|
10887
|
-
scrollTop
|
|
11010
|
+
scrollEl.scrollTop = scroll;
|
|
10888
11011
|
return true;
|
|
10889
11012
|
}
|
|
10890
11013
|
});
|
|
@@ -11029,11 +11152,11 @@
|
|
|
11029
11152
|
|
|
11030
11153
|
this._unbind = once(
|
|
11031
11154
|
document, "show keydown " +
|
|
11032
|
-
pointerDown,
|
|
11155
|
+
pointerDown$1,
|
|
11033
11156
|
this.hide,
|
|
11034
11157
|
false,
|
|
11035
11158
|
(e) =>
|
|
11036
|
-
e.type === pointerDown && !within(e.target, this.$el) ||
|
|
11159
|
+
e.type === pointerDown$1 && !within(e.target, this.$el) ||
|
|
11037
11160
|
e.type === 'keydown' && e.keyCode === 27 ||
|
|
11038
11161
|
e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name);
|
|
11039
11162
|
|
|
@@ -11104,7 +11227,7 @@
|
|
|
11104
11227
|
|
|
11105
11228
|
// Clicking a button does not give it focus on all browsers and platforms
|
|
11106
11229
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
|
|
11107
|
-
[pointerDown](e) {
|
|
11230
|
+
[pointerDown$1](e) {
|
|
11108
11231
|
if (isTouch(e)) {
|
|
11109
11232
|
this.show();
|
|
11110
11233
|
}
|