uikit 3.14.4-dev.838f092aa → 3.14.4-dev.8a8016a73
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 +41 -12
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +380 -101
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +380 -101
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +397 -106
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +397 -106
- 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 +100 -136
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +100 -136
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +4 -5
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +4 -5
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +22 -7
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +4 -5
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +22 -7
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +3 -3
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +97 -135
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +501 -453
- 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 +554 -489
- 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 +89 -62
- package/src/js/core/height-viewport.js +14 -6
- package/src/js/core/icon.js +16 -0
- package/src/js/core/index.js +2 -0
- package/src/js/core/leader.js +2 -2
- package/src/js/core/navbar.js +42 -30
- package/src/js/core/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 +10 -7
- package/src/js/mixin/position.js +26 -11
- package/src/js/mixin/slider-drag.js +20 -8
- package/src/js/mixin/style.js +11 -0
- package/src/js/mixin/togglable.js +80 -133
- package/src/js/util/animation.js +4 -3
- package/src/js/util/dimensions.js +6 -6
- package/src/js/util/filter.js +3 -7
- package/src/js/util/position.js +108 -107
- package/src/js/util/style.js +4 -13
- package/src/js/util/viewport.js +5 -32
- package/src/less/components/_import.less +1 -0
- package/src/less/components/drop.less +1 -18
- package/src/less/components/dropbar.less +115 -0
- package/src/less/components/dropdown.less +16 -16
- package/src/less/components/leader.less +1 -1
- package/src/less/components/nav.less +240 -63
- package/src/less/components/navbar.less +73 -27
- 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 +4 -10
- 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 +61 -27
- 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 +4 -7
- package/src/scss/variables-theme.scss +69 -17
- package/src/scss/variables.scss +58 -13
- package/tests/accordion.html +2 -2
- package/tests/alert.html +2 -2
- package/tests/countdown.html +1 -1
- package/tests/drop.html +451 -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 +1997 -1138
- 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.8a8016a73 | 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) {
|
|
@@ -1913,12 +1886,10 @@
|
|
|
1913
1886
|
function offsetViewport(scrollElement) {
|
|
1914
1887
|
const window = toWindow(scrollElement);
|
|
1915
1888
|
const {
|
|
1916
|
-
document: {
|
|
1889
|
+
document: { documentElement } } =
|
|
1917
1890
|
window;
|
|
1918
1891
|
let viewportElement =
|
|
1919
|
-
scrollElement === scrollingElement(scrollElement)
|
|
1920
|
-
window :
|
|
1921
|
-
scrollElement;
|
|
1892
|
+
scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1922
1893
|
|
|
1923
1894
|
const { visualViewport } = window;
|
|
1924
1895
|
if (isWindow(viewportElement) && visualViewport) {
|
|
@@ -1937,7 +1908,7 @@
|
|
|
1937
1908
|
// iOS 12 returns <body> as scrollingElement
|
|
1938
1909
|
viewportElement = documentElement;
|
|
1939
1910
|
} else {
|
|
1940
|
-
rect[start] += toFloat(css(viewportElement, "border" +
|
|
1911
|
+
rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
|
|
1941
1912
|
}
|
|
1942
1913
|
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1943
1914
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -1962,126 +1933,65 @@
|
|
|
1962
1933
|
...options.attach },
|
|
1963
1934
|
|
|
1964
1935
|
offset: [0, 0],
|
|
1936
|
+
placement: [],
|
|
1965
1937
|
...options };
|
|
1966
1938
|
|
|
1967
1939
|
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
attachTo(element, target, options);
|
|
1971
|
-
|
|
1972
|
-
offset(element, dim);
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
function attachTo(element, target, options) {
|
|
1976
|
-
let { attach, offset: offsetBy } = {
|
|
1977
|
-
attach: {
|
|
1978
|
-
element: ['left', 'top'],
|
|
1979
|
-
target: ['left', 'top'],
|
|
1980
|
-
...options.attach },
|
|
1981
|
-
|
|
1982
|
-
offset: [0, 0],
|
|
1983
|
-
...options };
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
const position = offset(element);
|
|
1987
|
-
const targetOffset = offset(target);
|
|
1988
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1989
|
-
position[start] = position[dir] =
|
|
1990
|
-
targetOffset[start] +
|
|
1991
|
-
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
1992
|
-
moveBy(attach.element[i], end, position[prop]) +
|
|
1993
|
-
+offsetBy[i];
|
|
1994
|
-
position[end] = position[start] + position[prop];
|
|
1940
|
+
if (!isArray(target)) {
|
|
1941
|
+
target = [target, target];
|
|
1995
1942
|
}
|
|
1996
|
-
return position;
|
|
1997
|
-
}
|
|
1998
1943
|
|
|
1999
|
-
|
|
2000
|
-
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
1944
|
+
offset(element, getPosition(element, target, options));
|
|
2001
1945
|
}
|
|
2002
1946
|
|
|
2003
|
-
function
|
|
1947
|
+
function getPosition(element, target, options) {
|
|
2004
1948
|
const position = attachTo(element, target, options);
|
|
2005
|
-
const targetDim = offset(target);
|
|
2006
1949
|
|
|
2007
1950
|
let {
|
|
2008
|
-
flip,
|
|
2009
1951
|
attach: { element: elAttach, target: targetAttach },
|
|
2010
1952
|
offset: elOffset,
|
|
2011
1953
|
boundary,
|
|
2012
|
-
|
|
2013
|
-
|
|
1954
|
+
viewportOffset,
|
|
1955
|
+
placement } =
|
|
2014
1956
|
options;
|
|
2015
1957
|
|
|
2016
|
-
let
|
|
2017
|
-
|
|
2018
|
-
viewports =
|
|
2019
|
-
|
|
2020
|
-
const [scrollElement] = viewports;
|
|
2021
|
-
viewports.push(viewport);
|
|
2022
|
-
|
|
2023
|
-
const offsetPosition = { ...position };
|
|
2024
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2025
|
-
if (flip !== true && !includes(flip, dir)) {
|
|
2026
|
-
continue;
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
const willFlip =
|
|
2030
|
-
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
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;
|
|
2031
1962
|
|
|
2032
|
-
viewport = getIntersectionArea(...viewports.
|
|
1963
|
+
let viewport = getIntersectionArea(...viewports.map(offsetViewport));
|
|
2033
1964
|
|
|
2034
1965
|
if (viewportOffset) {
|
|
2035
1966
|
viewport[start] += viewportOffset;
|
|
2036
1967
|
viewport[end] -= viewportOffset;
|
|
2037
1968
|
}
|
|
2038
1969
|
|
|
2039
|
-
if (boundary
|
|
2040
|
-
viewport = getIntersectionArea(viewport,
|
|
1970
|
+
if (boundary) {
|
|
1971
|
+
viewport = getIntersectionArea(viewport, offsetViewport(boundary));
|
|
2041
1972
|
}
|
|
2042
1973
|
|
|
2043
|
-
const
|
|
2044
|
-
const
|
|
1974
|
+
const isInStartViewport = position[start] >= viewport[start];
|
|
1975
|
+
const isInEndViewport = position[end] <= viewport[end];
|
|
2045
1976
|
|
|
2046
|
-
if (
|
|
1977
|
+
if (isInStartViewport && isInEndViewport) {
|
|
2047
1978
|
continue;
|
|
2048
1979
|
}
|
|
2049
1980
|
|
|
2050
|
-
let offsetBy;
|
|
1981
|
+
let offsetBy = 0;
|
|
2051
1982
|
|
|
2052
1983
|
// Flip
|
|
2053
|
-
if (
|
|
1984
|
+
if (placement[i] === 'flip') {
|
|
2054
1985
|
if (
|
|
2055
|
-
|
|
2056
|
-
|
|
1986
|
+
targetAttach[i] === end && isInEndViewport ||
|
|
1987
|
+
targetAttach[i] === start && isInStartViewport)
|
|
2057
1988
|
{
|
|
2058
1989
|
continue;
|
|
2059
1990
|
}
|
|
2060
1991
|
|
|
2061
|
-
offsetBy =
|
|
2062
|
-
(elAttach[i] === start ?
|
|
2063
|
-
-position[prop] :
|
|
2064
|
-
elAttach[i] === end ?
|
|
2065
|
-
position[prop] :
|
|
2066
|
-
0) + (
|
|
2067
|
-
targetAttach[i] === start ?
|
|
2068
|
-
targetDim[prop] :
|
|
2069
|
-
targetAttach[i] === end ?
|
|
2070
|
-
-targetDim[prop] :
|
|
2071
|
-
0) -
|
|
2072
|
-
elOffset[i] * 2;
|
|
2073
|
-
|
|
2074
|
-
if (
|
|
2075
|
-
!isInScrollArea(
|
|
2076
|
-
{
|
|
2077
|
-
...position,
|
|
2078
|
-
[start]: position[start] + offsetBy,
|
|
2079
|
-
[end]: position[end] + offsetBy },
|
|
1992
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2080
1993
|
|
|
2081
|
-
scrollElement,
|
|
2082
|
-
i))
|
|
2083
|
-
|
|
2084
|
-
{
|
|
1994
|
+
if (!isInScrollArea(applyOffset(position, offsetBy, i), scrollElement, i)) {
|
|
2085
1995
|
if (isInScrollArea(position, scrollElement, i)) {
|
|
2086
1996
|
continue;
|
|
2087
1997
|
}
|
|
@@ -2090,26 +2000,27 @@
|
|
|
2090
2000
|
return false;
|
|
2091
2001
|
}
|
|
2092
2002
|
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
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() },
|
|
2099
2008
|
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2009
|
+
offset: elOffset.reverse(),
|
|
2010
|
+
placement: placement.reverse(),
|
|
2011
|
+
recursion: true });
|
|
2103
2012
|
|
|
2104
2013
|
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
}
|
|
2014
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2015
|
+
return newPos;
|
|
2108
2016
|
}
|
|
2017
|
+
|
|
2018
|
+
continue;
|
|
2109
2019
|
}
|
|
2110
2020
|
|
|
2111
|
-
//
|
|
2112
|
-
} else {
|
|
2021
|
+
// Shift
|
|
2022
|
+
} else if (placement[i] === 'shift') {
|
|
2023
|
+
const targetDim = offset(target[i]);
|
|
2113
2024
|
offsetBy =
|
|
2114
2025
|
clamp(
|
|
2115
2026
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2118,13 +2029,54 @@
|
|
|
2118
2029
|
position[start];
|
|
2119
2030
|
}
|
|
2120
2031
|
|
|
2121
|
-
offsetPosition
|
|
2122
|
-
offsetPosition[end] += offsetBy;
|
|
2032
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2123
2033
|
}
|
|
2124
2034
|
|
|
2125
2035
|
return offsetPosition;
|
|
2126
2036
|
}
|
|
2127
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
|
+
|
|
2128
2080
|
function getIntersectionArea() {
|
|
2129
2081
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2130
2082
|
for (const rect of rects) {
|
|
@@ -2145,12 +2097,32 @@
|
|
|
2145
2097
|
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2146
2098
|
}
|
|
2147
2099
|
|
|
2148
|
-
function
|
|
2149
|
-
|
|
2150
|
-
|
|
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;
|
|
2151
2117
|
}
|
|
2152
2118
|
|
|
2153
|
-
function
|
|
2119
|
+
function flipOffset(offset, i) {
|
|
2120
|
+
offset = [...offset];
|
|
2121
|
+
offset[i] *= -1;
|
|
2122
|
+
return offset;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
function flipAxis(prop) {
|
|
2154
2126
|
for (let i = 0; i < dirs.length; i++) {
|
|
2155
2127
|
const index = dirs[i].indexOf(prop);
|
|
2156
2128
|
if (~index) {
|
|
@@ -2165,7 +2137,7 @@
|
|
|
2165
2137
|
getImage: getImage,
|
|
2166
2138
|
transition: transition,
|
|
2167
2139
|
Transition: Transition,
|
|
2168
|
-
animate: animate$
|
|
2140
|
+
animate: animate$2,
|
|
2169
2141
|
Animation: Animation,
|
|
2170
2142
|
attr: attr,
|
|
2171
2143
|
hasAttr: hasAttr,
|
|
@@ -2205,9 +2177,9 @@
|
|
|
2205
2177
|
inBrowser: inBrowser,
|
|
2206
2178
|
isRtl: isRtl,
|
|
2207
2179
|
hasTouch: hasTouch,
|
|
2208
|
-
pointerDown: pointerDown,
|
|
2209
|
-
pointerMove: pointerMove,
|
|
2210
|
-
pointerUp: pointerUp,
|
|
2180
|
+
pointerDown: pointerDown$1,
|
|
2181
|
+
pointerMove: pointerMove$1,
|
|
2182
|
+
pointerUp: pointerUp$1,
|
|
2211
2183
|
pointerEnter: pointerEnter,
|
|
2212
2184
|
pointerLeave: pointerLeave,
|
|
2213
2185
|
pointerCancel: pointerCancel,
|
|
@@ -2295,10 +2267,8 @@
|
|
|
2295
2267
|
findAll: findAll,
|
|
2296
2268
|
escape: escape,
|
|
2297
2269
|
css: css,
|
|
2298
|
-
getCssVar: getCssVar,
|
|
2299
2270
|
propName: propName,
|
|
2300
2271
|
isInView: isInView,
|
|
2301
|
-
scrollTop: scrollTop,
|
|
2302
2272
|
scrollIntoView: scrollIntoView,
|
|
2303
2273
|
scrolledOver: scrolledOver,
|
|
2304
2274
|
scrollParents: scrollParents,
|
|
@@ -2621,7 +2591,7 @@
|
|
|
2621
2591
|
|
|
2622
2592
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2623
2593
|
|
|
2624
|
-
if (prop === 'target' &&
|
|
2594
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2625
2595
|
continue;
|
|
2626
2596
|
}
|
|
2627
2597
|
|
|
@@ -2632,7 +2602,7 @@
|
|
|
2632
2602
|
|
|
2633
2603
|
for (const key in options) {
|
|
2634
2604
|
const prop = camelize(key);
|
|
2635
|
-
if (props[prop]
|
|
2605
|
+
if (!isUndefined(props[prop])) {
|
|
2636
2606
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2637
2607
|
}
|
|
2638
2608
|
}
|
|
@@ -2961,7 +2931,7 @@
|
|
|
2961
2931
|
UIkit.data = '__uikit__';
|
|
2962
2932
|
UIkit.prefix = 'uk-';
|
|
2963
2933
|
UIkit.options = {};
|
|
2964
|
-
UIkit.version = '3.14.4-dev.
|
|
2934
|
+
UIkit.version = '3.14.4-dev.8a8016a73';
|
|
2965
2935
|
|
|
2966
2936
|
globalAPI(UIkit);
|
|
2967
2937
|
hooksAPI(UIkit);
|
|
@@ -3066,27 +3036,7 @@
|
|
|
3066
3036
|
origin: false,
|
|
3067
3037
|
transition: 'ease',
|
|
3068
3038
|
clsEnter: 'uk-togglabe-enter',
|
|
3069
|
-
clsLeave: 'uk-togglabe-leave',
|
|
3070
|
-
|
|
3071
|
-
initProps: {
|
|
3072
|
-
overflow: '',
|
|
3073
|
-
maxHeight: '',
|
|
3074
|
-
paddingTop: '',
|
|
3075
|
-
paddingBottom: '',
|
|
3076
|
-
marginTop: '',
|
|
3077
|
-
marginBottom: '',
|
|
3078
|
-
boxShadow: '' },
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
hideProps: {
|
|
3082
|
-
overflow: 'hidden',
|
|
3083
|
-
maxHeight: 0,
|
|
3084
|
-
paddingTop: 0,
|
|
3085
|
-
paddingBottom: 0,
|
|
3086
|
-
marginTop: 0,
|
|
3087
|
-
marginBottom: 0,
|
|
3088
|
-
boxShadow: 'none' } },
|
|
3089
|
-
|
|
3039
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3090
3040
|
|
|
3091
3041
|
|
|
3092
3042
|
computed: {
|
|
@@ -3095,7 +3045,7 @@
|
|
|
3095
3045
|
},
|
|
3096
3046
|
|
|
3097
3047
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3098
|
-
return startsWith(animation[0],
|
|
3048
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3099
3049
|
} },
|
|
3100
3050
|
|
|
3101
3051
|
|
|
@@ -3188,130 +3138,97 @@
|
|
|
3188
3138
|
};
|
|
3189
3139
|
}
|
|
3190
3140
|
|
|
3191
|
-
function toggleTransition(cmp) {
|
|
3192
|
-
|
|
3193
|
-
case 'slide-left':
|
|
3194
|
-
return slideHorizontal(cmp);
|
|
3195
|
-
case 'slide-right':
|
|
3196
|
-
return slideHorizontal(cmp, true);}
|
|
3197
|
-
|
|
3198
|
-
return slide$1(cmp);
|
|
3199
|
-
}
|
|
3200
|
-
|
|
3201
|
-
function slide$1(_ref4)
|
|
3202
|
-
|
|
3203
|
-
|
|
3141
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3142
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3204
3143
|
|
|
3144
|
+
const dirs = [
|
|
3145
|
+
['left', 'right'],
|
|
3146
|
+
['top', 'bottom']];
|
|
3205
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;
|
|
3206
3154
|
|
|
3155
|
+
return async (el, show) => {
|
|
3156
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3207
3157
|
|
|
3158
|
+
let currentDim = dimensions$1(el)[dimProp];
|
|
3208
3159
|
|
|
3209
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3210
|
-
return (el, show) => {
|
|
3211
3160
|
const inProgress = Transition.inProgress(el);
|
|
3212
|
-
|
|
3213
|
-
!inProgress && el.hasChildNodes() ?
|
|
3214
|
-
toFloat(css(el.firstElementChild, 'marginTop')) +
|
|
3215
|
-
toFloat(css(el.lastElementChild, 'marginBottom')) :
|
|
3216
|
-
0;
|
|
3217
|
-
const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
|
|
3218
|
-
|
|
3219
|
-
const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
|
|
3161
|
+
await Transition.cancel(el);
|
|
3220
3162
|
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
if (!isToggled(el)) {
|
|
3163
|
+
if (show) {
|
|
3224
3164
|
_toggle(el, true);
|
|
3225
3165
|
}
|
|
3226
3166
|
|
|
3227
|
-
|
|
3167
|
+
const prevProps = Object.fromEntries(
|
|
3168
|
+
['padding', 'border', 'width', 'height', 'overflow', marginProp, marginStartProp].map(
|
|
3169
|
+
(key) => [key, el.style[key]]));
|
|
3228
3170
|
|
|
3229
|
-
// Update child components first
|
|
3230
|
-
fastdom.flush();
|
|
3231
3171
|
|
|
3232
|
-
const endHeight = toFloat(css(el, 'height')) + inner;
|
|
3233
|
-
duration = velocity * endHeight + duration;
|
|
3234
3172
|
|
|
3235
|
-
|
|
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;
|
|
3236
3177
|
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
Transition.start(
|
|
3240
|
-
el,
|
|
3241
|
-
{ ...initProps, overflow: 'hidden', maxHeight: endHeight },
|
|
3242
|
-
duration * (1 - currentHeight / endHeight),
|
|
3243
|
-
transition) :
|
|
3244
|
-
|
|
3245
|
-
Transition.start(
|
|
3246
|
-
el,
|
|
3247
|
-
hideProps,
|
|
3248
|
-
duration * (currentHeight / endHeight),
|
|
3249
|
-
transition).
|
|
3250
|
-
then(() => _toggle(el, false))).
|
|
3251
|
-
then(() => css(el, initProps));
|
|
3252
|
-
};
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3255
|
-
function slideHorizontal(_ref5, right) {let { isToggled, duration, velocity, transition, _toggle } = _ref5;
|
|
3256
|
-
return (el, show) => {
|
|
3257
|
-
const visible = isVisible(el);
|
|
3258
|
-
const marginLeft = toFloat(css(el, 'marginLeft'));
|
|
3259
|
-
|
|
3260
|
-
Transition.cancel(el);
|
|
3261
|
-
|
|
3262
|
-
const [scrollElement] = scrollParents(el);
|
|
3263
|
-
css(scrollElement, 'overflowX', 'hidden');
|
|
3264
|
-
|
|
3265
|
-
if (!isToggled(el)) {
|
|
3266
|
-
_toggle(el, true);
|
|
3178
|
+
if (!inProgress && !show) {
|
|
3179
|
+
currentDim += marginStart;
|
|
3267
3180
|
}
|
|
3268
3181
|
|
|
3269
|
-
const
|
|
3270
|
-
|
|
3182
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3183
|
+
css(wrapper, {
|
|
3184
|
+
boxSizing: 'border-box',
|
|
3185
|
+
height: dim.height,
|
|
3186
|
+
width: dim.width,
|
|
3187
|
+
...css(el, [
|
|
3188
|
+
'padding',
|
|
3189
|
+
'borderTop',
|
|
3190
|
+
'borderRight',
|
|
3191
|
+
'borderBottom',
|
|
3192
|
+
'borderLeft',
|
|
3193
|
+
'borderImage',
|
|
3194
|
+
marginStartProp]) });
|
|
3195
|
+
|
|
3271
3196
|
|
|
3272
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3273
|
-
const offsetEl = offset(el);
|
|
3274
|
-
const useClipPath = right ?
|
|
3275
|
-
offsetEl.right < scrollElement.clientWidth :
|
|
3276
|
-
Math.round(offsetEl.left) > 0;
|
|
3277
3197
|
|
|
3278
3198
|
css(el, {
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3199
|
+
padding: 0,
|
|
3200
|
+
border: 0,
|
|
3201
|
+
[marginStartProp]: 0,
|
|
3202
|
+
width: dim.width,
|
|
3203
|
+
height: dim.height,
|
|
3204
|
+
overflow: 'hidden',
|
|
3205
|
+
[dimProp]: currentDim });
|
|
3285
3206
|
|
|
3286
3207
|
|
|
3287
|
-
|
|
3288
|
-
show ?
|
|
3289
|
-
|
|
3290
|
-
el,
|
|
3291
|
-
{
|
|
3292
|
-
clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
|
|
3293
|
-
marginLeft: 0 },
|
|
3208
|
+
const percent = currentDim / endDim;
|
|
3209
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3210
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3294
3211
|
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
el,
|
|
3300
|
-
{
|
|
3301
|
-
clipPath: useClipPath ?
|
|
3302
|
-
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
3212
|
+
if (end) {
|
|
3213
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3214
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3215
|
+
}
|
|
3303
3216
|
|
|
3217
|
+
if (!end ^ mode === 'reveal') {
|
|
3218
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3219
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3220
|
+
}
|
|
3304
3221
|
|
|
3305
|
-
|
|
3306
|
-
|
|
3222
|
+
try {
|
|
3223
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3224
|
+
} finally {
|
|
3225
|
+
css(el, prevProps);
|
|
3226
|
+
unwrap(wrapper.firstChild);
|
|
3307
3227
|
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
css(scrollElement, 'overflowX', '');
|
|
3313
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3314
|
-
});
|
|
3228
|
+
if (!show) {
|
|
3229
|
+
_toggle(el, false);
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3315
3232
|
};
|
|
3316
3233
|
}
|
|
3317
3234
|
|
|
@@ -3336,6 +3253,7 @@
|
|
|
3336
3253
|
mixins: [Class, Lazyload, Togglable],
|
|
3337
3254
|
|
|
3338
3255
|
props: {
|
|
3256
|
+
animation: Boolean,
|
|
3339
3257
|
targets: String,
|
|
3340
3258
|
active: null,
|
|
3341
3259
|
collapsible: Boolean,
|
|
@@ -3348,7 +3266,7 @@
|
|
|
3348
3266
|
data: {
|
|
3349
3267
|
targets: '> *',
|
|
3350
3268
|
active: false,
|
|
3351
|
-
animation:
|
|
3269
|
+
animation: true,
|
|
3352
3270
|
collapsible: true,
|
|
3353
3271
|
multiple: false,
|
|
3354
3272
|
clsOpen: 'uk-open',
|
|
@@ -3394,7 +3312,7 @@
|
|
|
3394
3312
|
hide(
|
|
3395
3313
|
el,
|
|
3396
3314
|
!hasClass(
|
|
3397
|
-
this.items.find((item) =>
|
|
3315
|
+
this.items.find((item) => within(el, item)),
|
|
3398
3316
|
this.clsOpen));
|
|
3399
3317
|
|
|
3400
3318
|
|
|
@@ -3446,23 +3364,15 @@
|
|
|
3446
3364
|
toggleClass(el, this.clsOpen, show);
|
|
3447
3365
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3448
3366
|
|
|
3449
|
-
const content = $(
|
|
3367
|
+
const content = $(this.content, el);
|
|
3450
3368
|
|
|
3451
|
-
if (animate === false || !this.
|
|
3369
|
+
if (animate === false || !this.animation) {
|
|
3370
|
+
content.hidden = !show;
|
|
3452
3371
|
hide(content, !show);
|
|
3453
3372
|
return;
|
|
3454
3373
|
}
|
|
3455
3374
|
|
|
3456
|
-
|
|
3457
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3458
|
-
}
|
|
3459
|
-
|
|
3460
|
-
hide(content, false);
|
|
3461
|
-
await slide$1(this)(el._wrapper, show);
|
|
3462
|
-
hide(content, !show);
|
|
3463
|
-
|
|
3464
|
-
delete el._wrapper;
|
|
3465
|
-
unwrap(content);
|
|
3375
|
+
await toggleTransition(this)(content, show);
|
|
3466
3376
|
|
|
3467
3377
|
if (show) {
|
|
3468
3378
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3488,18 +3398,17 @@
|
|
|
3488
3398
|
args: 'animation',
|
|
3489
3399
|
|
|
3490
3400
|
props: {
|
|
3401
|
+
animation: Boolean,
|
|
3491
3402
|
close: String },
|
|
3492
3403
|
|
|
3493
3404
|
|
|
3494
3405
|
data: {
|
|
3495
|
-
animation:
|
|
3406
|
+
animation: true,
|
|
3496
3407
|
selClose: '.uk-alert-close',
|
|
3497
|
-
duration: 150,
|
|
3498
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3408
|
+
duration: 150 },
|
|
3499
3409
|
|
|
3500
3410
|
|
|
3501
|
-
events:
|
|
3502
|
-
{
|
|
3411
|
+
events: {
|
|
3503
3412
|
name: 'click',
|
|
3504
3413
|
|
|
3505
3414
|
delegate() {
|
|
@@ -3509,16 +3418,39 @@
|
|
|
3509
3418
|
handler(e) {
|
|
3510
3419
|
e.preventDefault();
|
|
3511
3420
|
this.close();
|
|
3512
|
-
} }
|
|
3513
|
-
|
|
3421
|
+
} },
|
|
3514
3422
|
|
|
3515
3423
|
|
|
3516
3424
|
methods: {
|
|
3517
3425
|
async close() {
|
|
3518
|
-
await this.toggleElement(this.$el);
|
|
3426
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3519
3427
|
this.$destroy(true);
|
|
3520
3428
|
} } };
|
|
3521
3429
|
|
|
3430
|
+
|
|
3431
|
+
|
|
3432
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3433
|
+
return (el) => {
|
|
3434
|
+
const height = toFloat(css(el, 'height'));
|
|
3435
|
+
css(el, 'height', height);
|
|
3436
|
+
return Transition.start(
|
|
3437
|
+
el,
|
|
3438
|
+
{
|
|
3439
|
+
height: 0,
|
|
3440
|
+
marginTop: 0,
|
|
3441
|
+
marginBottom: 0,
|
|
3442
|
+
paddingTop: 0,
|
|
3443
|
+
paddingBottom: 0,
|
|
3444
|
+
borderTop: 0,
|
|
3445
|
+
borderBottom: 0,
|
|
3446
|
+
opacity: 0 },
|
|
3447
|
+
|
|
3448
|
+
velocity * height + duration,
|
|
3449
|
+
transition);
|
|
3450
|
+
|
|
3451
|
+
};
|
|
3452
|
+
}
|
|
3453
|
+
|
|
3522
3454
|
var Video = {
|
|
3523
3455
|
args: 'autoplay',
|
|
3524
3456
|
|
|
@@ -3667,13 +3599,17 @@
|
|
|
3667
3599
|
props: {
|
|
3668
3600
|
pos: String,
|
|
3669
3601
|
offset: null,
|
|
3670
|
-
flip: Boolean
|
|
3602
|
+
flip: Boolean,
|
|
3603
|
+
shift: Boolean,
|
|
3604
|
+
inset: Boolean },
|
|
3671
3605
|
|
|
3672
3606
|
|
|
3673
3607
|
data: {
|
|
3674
3608
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3609
|
+
offset: false,
|
|
3675
3610
|
flip: true,
|
|
3676
|
-
|
|
3611
|
+
shift: true,
|
|
3612
|
+
inset: false },
|
|
3677
3613
|
|
|
3678
3614
|
|
|
3679
3615
|
connected() {
|
|
@@ -3685,19 +3621,24 @@
|
|
|
3685
3621
|
methods: {
|
|
3686
3622
|
positionAt(element, target, boundary) {
|
|
3687
3623
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3624
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3688
3625
|
|
|
3689
3626
|
const attach = {
|
|
3690
|
-
element: [flipPosition(this.dir), this.align],
|
|
3627
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3691
3628
|
target: [this.dir, this.align] };
|
|
3692
3629
|
|
|
3693
3630
|
|
|
3694
3631
|
if (this.axis === 'y') {
|
|
3695
3632
|
for (const prop in attach) {
|
|
3696
|
-
attach[prop]
|
|
3633
|
+
attach[prop].reverse();
|
|
3697
3634
|
}
|
|
3698
|
-
offset
|
|
3635
|
+
offset.reverse();
|
|
3636
|
+
placement.reverse();
|
|
3699
3637
|
}
|
|
3700
3638
|
|
|
3639
|
+
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
3640
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
3641
|
+
|
|
3701
3642
|
// Ensure none positioned element does not generate scrollbars
|
|
3702
3643
|
const elDim = dimensions$1(element);
|
|
3703
3644
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
@@ -3706,35 +3647,50 @@
|
|
|
3706
3647
|
attach,
|
|
3707
3648
|
offset,
|
|
3708
3649
|
boundary,
|
|
3709
|
-
|
|
3650
|
+
placement,
|
|
3710
3651
|
viewportOffset: this.getViewportOffset(element) });
|
|
3711
3652
|
|
|
3653
|
+
|
|
3654
|
+
// Restore scroll position
|
|
3655
|
+
scrollElement.scrollTop = scrollTop;
|
|
3656
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
3712
3657
|
},
|
|
3713
3658
|
|
|
3714
3659
|
getPositionOffset(element) {
|
|
3715
3660
|
return (
|
|
3716
3661
|
toPx(
|
|
3717
|
-
this.offset === false ?
|
|
3662
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3718
3663
|
this.axis === 'x' ? 'width' : 'height',
|
|
3719
3664
|
element) * (
|
|
3720
|
-
|
|
3665
|
+
|
|
3666
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3667
|
+
this.inset ? -1 : 1));
|
|
3721
3668
|
|
|
3722
3669
|
},
|
|
3723
3670
|
|
|
3724
3671
|
getShiftOffset(element) {
|
|
3725
|
-
return
|
|
3672
|
+
return this.align === 'center' ?
|
|
3726
3673
|
0 :
|
|
3727
3674
|
toPx(
|
|
3728
|
-
|
|
3675
|
+
css(element, '--uk-position-shift-offset'),
|
|
3729
3676
|
this.axis === 'y' ? 'width' : 'height',
|
|
3730
3677
|
element) * (
|
|
3731
3678
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3732
3679
|
},
|
|
3733
3680
|
|
|
3734
3681
|
getViewportOffset(element) {
|
|
3735
|
-
return toPx(
|
|
3682
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3736
3683
|
} } };
|
|
3737
3684
|
|
|
3685
|
+
var Style = {
|
|
3686
|
+
beforeConnect() {
|
|
3687
|
+
this._style = attr(this.$el, 'style');
|
|
3688
|
+
},
|
|
3689
|
+
|
|
3690
|
+
disconnected() {
|
|
3691
|
+
attr(this.$el, 'style', this._style);
|
|
3692
|
+
} };
|
|
3693
|
+
|
|
3738
3694
|
const active$1 = [];
|
|
3739
3695
|
|
|
3740
3696
|
var Modal = {
|
|
@@ -3837,15 +3793,15 @@
|
|
|
3837
3793
|
this.$el,
|
|
3838
3794
|
'hide',
|
|
3839
3795
|
on(document, 'focusin', (e) => {
|
|
3840
|
-
if (!within(e.target, this
|
|
3796
|
+
if (last(active$1) === this && !within(e.target, this.$el)) {
|
|
3841
3797
|
this.$el.focus();
|
|
3842
3798
|
}
|
|
3843
3799
|
}));
|
|
3844
3800
|
|
|
3845
3801
|
|
|
3846
3802
|
if (this.overlay) {
|
|
3847
|
-
once(this.$el, '
|
|
3848
|
-
once(this.$el, '
|
|
3803
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el));
|
|
3804
|
+
once(this.$el, 'hidden', preventBackgroundScroll());
|
|
3849
3805
|
}
|
|
3850
3806
|
|
|
3851
3807
|
if (this.stack) {
|
|
@@ -3858,7 +3814,7 @@
|
|
|
3858
3814
|
once(
|
|
3859
3815
|
this.$el,
|
|
3860
3816
|
'hide',
|
|
3861
|
-
on(document, pointerDown, (_ref3) => {let { target } = _ref3;
|
|
3817
|
+
on(document, pointerDown$1, (_ref3) => {let { target } = _ref3;
|
|
3862
3818
|
if (
|
|
3863
3819
|
last(active$1) !== this ||
|
|
3864
3820
|
this.overlay && !within(target, this.$el) ||
|
|
@@ -3869,11 +3825,11 @@
|
|
|
3869
3825
|
|
|
3870
3826
|
once(
|
|
3871
3827
|
document,
|
|
3872
|
-
pointerUp + " " + pointerCancel + " scroll",
|
|
3828
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
3873
3829
|
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3874
3830
|
if (
|
|
3875
3831
|
!defaultPrevented &&
|
|
3876
|
-
type === pointerUp &&
|
|
3832
|
+
type === pointerUp$1 &&
|
|
3877
3833
|
target === newTarget)
|
|
3878
3834
|
{
|
|
3879
3835
|
this.hide();
|
|
@@ -3927,10 +3883,6 @@
|
|
|
3927
3883
|
active$1.splice(active$1.indexOf(this), 1);
|
|
3928
3884
|
}
|
|
3929
3885
|
|
|
3930
|
-
if (!active$1.length) {
|
|
3931
|
-
css(document.body, 'overflowY', '');
|
|
3932
|
-
}
|
|
3933
|
-
|
|
3934
3886
|
css(this.$el, 'zIndex', '');
|
|
3935
3887
|
|
|
3936
3888
|
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
@@ -4047,7 +3999,12 @@
|
|
|
4047
3999
|
return () => events.forEach((fn) => fn());
|
|
4048
4000
|
}
|
|
4049
4001
|
|
|
4002
|
+
let prevented;
|
|
4050
4003
|
function preventBackgroundScroll() {
|
|
4004
|
+
if (prevented) {
|
|
4005
|
+
return noop;
|
|
4006
|
+
}
|
|
4007
|
+
prevented = true;
|
|
4051
4008
|
const { body, documentElement } = document;
|
|
4052
4009
|
css(body, {
|
|
4053
4010
|
overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
|
|
@@ -4055,6 +4012,7 @@
|
|
|
4055
4012
|
|
|
4056
4013
|
css(documentElement, 'overflowY', 'hidden');
|
|
4057
4014
|
return () => {
|
|
4015
|
+
prevented = false;
|
|
4058
4016
|
css(documentElement, 'overflowY', '');
|
|
4059
4017
|
css(body, { overflowY: '', touchAction: '' });
|
|
4060
4018
|
};
|
|
@@ -4073,7 +4031,7 @@
|
|
|
4073
4031
|
let active;
|
|
4074
4032
|
|
|
4075
4033
|
var drop = {
|
|
4076
|
-
mixins: [Container, Lazyload, Position, Togglable],
|
|
4034
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4077
4035
|
|
|
4078
4036
|
args: 'pos',
|
|
4079
4037
|
|
|
@@ -4081,7 +4039,10 @@
|
|
|
4081
4039
|
mode: 'list',
|
|
4082
4040
|
toggle: Boolean,
|
|
4083
4041
|
boundary: Boolean,
|
|
4084
|
-
|
|
4042
|
+
target: Boolean,
|
|
4043
|
+
targetX: Boolean,
|
|
4044
|
+
targetY: Boolean,
|
|
4045
|
+
stretch: Boolean,
|
|
4085
4046
|
delayShow: Number,
|
|
4086
4047
|
delayHide: Number,
|
|
4087
4048
|
display: String,
|
|
@@ -4093,17 +4054,32 @@
|
|
|
4093
4054
|
data: {
|
|
4094
4055
|
mode: ['click', 'hover'],
|
|
4095
4056
|
toggle: '- *',
|
|
4096
|
-
boundary:
|
|
4097
|
-
|
|
4057
|
+
boundary: false,
|
|
4058
|
+
target: false,
|
|
4059
|
+
targetX: false,
|
|
4060
|
+
targetY: false,
|
|
4061
|
+
stretch: false,
|
|
4098
4062
|
delayShow: 0,
|
|
4099
4063
|
delayHide: 800,
|
|
4100
4064
|
display: null,
|
|
4101
4065
|
clsDrop: false,
|
|
4066
|
+
animateOut: false,
|
|
4067
|
+
bgScroll: true,
|
|
4102
4068
|
animation: ['uk-animation-fade'],
|
|
4103
4069
|
cls: 'uk-open',
|
|
4104
|
-
container: false,
|
|
4105
|
-
|
|
4106
|
-
|
|
4070
|
+
container: false },
|
|
4071
|
+
|
|
4072
|
+
|
|
4073
|
+
computed: {
|
|
4074
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4075
|
+
targetX = targetX || target || this.targetEl;
|
|
4076
|
+
targetY = targetY || target || this.targetEl;
|
|
4077
|
+
|
|
4078
|
+
return [
|
|
4079
|
+
targetX === true ? window : query(targetX, $el),
|
|
4080
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4081
|
+
|
|
4082
|
+
} },
|
|
4107
4083
|
|
|
4108
4084
|
|
|
4109
4085
|
created() {
|
|
@@ -4117,13 +4093,13 @@
|
|
|
4117
4093
|
connected() {
|
|
4118
4094
|
addClass(this.$el, this.clsDrop);
|
|
4119
4095
|
|
|
4120
|
-
if (this.toggle && !this.
|
|
4121
|
-
this.
|
|
4096
|
+
if (this.toggle && !this.targetEl) {
|
|
4097
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4122
4098
|
target: this.$el,
|
|
4123
4099
|
mode: this.mode }).
|
|
4124
4100
|
$el;
|
|
4125
|
-
attr(this.
|
|
4126
|
-
this.lazyload(this.
|
|
4101
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4102
|
+
this.lazyload(this.targetEl);
|
|
4127
4103
|
}
|
|
4128
4104
|
},
|
|
4129
4105
|
|
|
@@ -4154,7 +4130,7 @@
|
|
|
4154
4130
|
return 'a[href^="#"]';
|
|
4155
4131
|
},
|
|
4156
4132
|
|
|
4157
|
-
handler(
|
|
4133
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4158
4134
|
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4159
4135
|
this.hide(false);
|
|
4160
4136
|
}
|
|
@@ -4265,18 +4241,18 @@
|
|
|
4265
4241
|
for (const handler of [
|
|
4266
4242
|
on(
|
|
4267
4243
|
document,
|
|
4268
|
-
pointerDown,
|
|
4269
|
-
(
|
|
4244
|
+
pointerDown$1,
|
|
4245
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4270
4246
|
!within(target, this.$el) &&
|
|
4271
4247
|
once(
|
|
4272
4248
|
document,
|
|
4273
|
-
pointerUp + " " + pointerCancel + " scroll",
|
|
4274
|
-
(
|
|
4249
|
+
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
4250
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4275
4251
|
if (
|
|
4276
4252
|
!defaultPrevented &&
|
|
4277
|
-
type === pointerUp &&
|
|
4253
|
+
type === pointerUp$1 &&
|
|
4278
4254
|
target === newTarget &&
|
|
4279
|
-
!(this.
|
|
4255
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4280
4256
|
{
|
|
4281
4257
|
this.hide(false);
|
|
4282
4258
|
}
|
|
@@ -4295,13 +4271,13 @@
|
|
|
4295
4271
|
[] :
|
|
4296
4272
|
[preventOverscroll(this.$el), preventBackgroundScroll()]),
|
|
4297
4273
|
|
|
4298
|
-
...(this.display === 'static'
|
|
4274
|
+
...(this.display === 'static' ?
|
|
4299
4275
|
[] :
|
|
4300
4276
|
(() => {
|
|
4301
4277
|
const handler = () => this.$emit();
|
|
4302
4278
|
return [
|
|
4303
4279
|
on(window, 'resize', handler),
|
|
4304
|
-
on(document, 'scroll', handler
|
|
4280
|
+
on([document, scrollParents(this.$el)], 'scroll', handler),
|
|
4305
4281
|
(() => {
|
|
4306
4282
|
const observer = observeResize(
|
|
4307
4283
|
scrollParents(this.$el),
|
|
@@ -4330,7 +4306,7 @@
|
|
|
4330
4306
|
{
|
|
4331
4307
|
name: 'hide',
|
|
4332
4308
|
|
|
4333
|
-
handler(
|
|
4309
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4334
4310
|
if (this.$el !== target) {
|
|
4335
4311
|
active =
|
|
4336
4312
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4354,12 +4330,12 @@
|
|
|
4354
4330
|
|
|
4355
4331
|
|
|
4356
4332
|
methods: {
|
|
4357
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4358
|
-
if (this.isToggled() && target && this.
|
|
4333
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4334
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4359
4335
|
this.hide(false, false);
|
|
4360
4336
|
}
|
|
4361
4337
|
|
|
4362
|
-
this.
|
|
4338
|
+
this.targetEl = target;
|
|
4363
4339
|
|
|
4364
4340
|
this.clearTimers();
|
|
4365
4341
|
|
|
@@ -4422,60 +4398,69 @@
|
|
|
4422
4398
|
|
|
4423
4399
|
position() {
|
|
4424
4400
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4425
|
-
|
|
4426
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4401
|
+
attr(this.$el, 'style', this._style);
|
|
4427
4402
|
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
const [scrollParent] = scrollParents(
|
|
4431
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4403
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4404
|
+
this.$el.hidden = true;
|
|
4432
4405
|
|
|
4433
|
-
const
|
|
4434
|
-
const boundaryOffset = boundary
|
|
4406
|
+
const boundary = query(this.boundary, this.$el);
|
|
4407
|
+
const boundaryOffset = offsetViewport(boundary || window);
|
|
4408
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4435
4409
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4436
4410
|
|
|
4437
|
-
|
|
4438
|
-
|
|
4411
|
+
const dirs = [
|
|
4412
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4413
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4439
4414
|
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4457
|
-
|
|
4458
|
-
css(this.$el, {
|
|
4459
|
-
width:
|
|
4460
|
-
this.axis === 'y' ?
|
|
4461
|
-
viewport.width :
|
|
4462
|
-
(this.dir === 'left' ?
|
|
4463
|
-
targetDim.left - viewport.left :
|
|
4464
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4465
|
-
height:
|
|
4466
|
-
this.axis === 'x' ?
|
|
4467
|
-
viewport.height :
|
|
4468
|
-
(this.dir === 'top' ?
|
|
4469
|
-
targetDim.top - viewport.top :
|
|
4470
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4471
|
-
|
|
4472
|
-
} else if (this.$el.offsetWidth > maxWidth) {
|
|
4415
|
+
|
|
4416
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4417
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4418
|
+
css(this.$el, {
|
|
4419
|
+
[prop]: Math.min(
|
|
4420
|
+
boundaryOffset[prop],
|
|
4421
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4422
|
+
|
|
4423
|
+
["overflow-" + axis]: 'auto' });
|
|
4424
|
+
|
|
4425
|
+
}
|
|
4426
|
+
}
|
|
4427
|
+
|
|
4428
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4429
|
+
|
|
4430
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4473
4431
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4474
4432
|
}
|
|
4475
4433
|
|
|
4476
4434
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4477
4435
|
|
|
4478
|
-
this
|
|
4436
|
+
this.$el.hidden = false;
|
|
4437
|
+
|
|
4438
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4439
|
+
|
|
4440
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4441
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4442
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4443
|
+
const targetOffset = offset(this.target[i]);
|
|
4444
|
+
const elOffset = offset(this.$el);
|
|
4445
|
+
|
|
4446
|
+
css(this.$el, {
|
|
4447
|
+
[prop]:
|
|
4448
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4449
|
+
targetOffset[start] -
|
|
4450
|
+
Math.max(
|
|
4451
|
+
boundaryOffset[start],
|
|
4452
|
+
viewports[i][start] + viewportOffset) :
|
|
4453
|
+
|
|
4454
|
+
Math.min(
|
|
4455
|
+
boundaryOffset[end],
|
|
4456
|
+
viewports[i][end] - viewportOffset) -
|
|
4457
|
+
targetOffset[end]) - positionOffset,
|
|
4458
|
+
["overflow-" + axis]: 'auto' });
|
|
4459
|
+
|
|
4460
|
+
|
|
4461
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4462
|
+
}
|
|
4463
|
+
}
|
|
4479
4464
|
} } };
|
|
4480
4465
|
|
|
4481
4466
|
|
|
@@ -4972,8 +4957,11 @@
|
|
|
4972
4957
|
let minHeight = '';
|
|
4973
4958
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4974
4959
|
|
|
4960
|
+
const { body, scrollingElement } = document;
|
|
4975
4961
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4976
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4962
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4963
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4964
|
+
|
|
4977
4965
|
|
|
4978
4966
|
if (this.expand) {
|
|
4979
4967
|
minHeight = Math.max(
|
|
@@ -4983,14 +4971,19 @@
|
|
|
4983
4971
|
0);
|
|
4984
4972
|
|
|
4985
4973
|
} else {
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
|
|
4974
|
+
const isScrollingElement =
|
|
4975
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
4989
4976
|
|
|
4977
|
+
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4978
|
+
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
4990
4979
|
|
|
4991
4980
|
if (this.offsetTop) {
|
|
4992
|
-
|
|
4993
|
-
|
|
4981
|
+
if (isScrollingElement) {
|
|
4982
|
+
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4983
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4984
|
+
} else {
|
|
4985
|
+
minHeight += " - " + css(scrollElement, 'paddingTop');
|
|
4986
|
+
}
|
|
4994
4987
|
}
|
|
4995
4988
|
|
|
4996
4989
|
if (this.offsetBottom === true) {
|
|
@@ -5233,7 +5226,13 @@
|
|
|
5233
5226
|
|
|
5234
5227
|
var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>";
|
|
5235
5228
|
|
|
5236
|
-
var
|
|
5229
|
+
var navParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
|
|
5230
|
+
|
|
5231
|
+
var navParentIconLarge = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 4 7 10 13 4\"/></svg>";
|
|
5232
|
+
|
|
5233
|
+
var navbarParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
|
|
5234
|
+
|
|
5235
|
+
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><style>.uk-navbar-toggle svg > [class*='line-'] {\n transition: 0.2s ease-in-out;\n transition-property: transform, opacity,;\n transform-origin: center;\n opacity: 1;\n }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-2 { transform: rotate(45deg); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-3 { transform: rotate(-45deg); }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1,\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { opacity: 0; }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1 { transform: translateY(6px) scaleX(0); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { transform: translateY(-6px) scaleX(0); }</style><rect class=\"line-1\" y=\"3\" width=\"20\" height=\"2\"/><rect class=\"line-2\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-3\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-4\" y=\"15\" width=\"20\" height=\"2\"/></svg>";
|
|
5237
5236
|
|
|
5238
5237
|
var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>";
|
|
5239
5238
|
|
|
@@ -5265,6 +5264,9 @@
|
|
|
5265
5264
|
marker,
|
|
5266
5265
|
'close-icon': closeIcon,
|
|
5267
5266
|
'close-large': closeLarge,
|
|
5267
|
+
'nav-parent-icon': navParentIcon,
|
|
5268
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5269
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
5268
5270
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
5269
5271
|
'overlay-icon': overlayIcon,
|
|
5270
5272
|
'pagination-next': paginationNext,
|
|
@@ -5322,6 +5324,15 @@
|
|
|
5322
5324
|
} };
|
|
5323
5325
|
|
|
5324
5326
|
|
|
5327
|
+
const NavParentIcon = {
|
|
5328
|
+
extends: IconComponent,
|
|
5329
|
+
|
|
5330
|
+
beforeConnect() {
|
|
5331
|
+
const icon = this.$props.icon;
|
|
5332
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5333
|
+
} };
|
|
5334
|
+
|
|
5335
|
+
|
|
5325
5336
|
const Slidenav = {
|
|
5326
5337
|
extends: IconComponent,
|
|
5327
5338
|
|
|
@@ -5582,7 +5593,7 @@
|
|
|
5582
5593
|
|
|
5583
5594
|
|
|
5584
5595
|
connected() {
|
|
5585
|
-
const media = toMedia(this.media);
|
|
5596
|
+
const media = toMedia(this.media, this.$el);
|
|
5586
5597
|
this.matchMedia = true;
|
|
5587
5598
|
if (media) {
|
|
5588
5599
|
this.mediaObj = window.matchMedia(media);
|
|
@@ -5603,11 +5614,10 @@
|
|
|
5603
5614
|
} };
|
|
5604
5615
|
|
|
5605
5616
|
|
|
5606
|
-
function toMedia(value) {
|
|
5617
|
+
function toMedia(value, element) {
|
|
5607
5618
|
if (isString(value)) {
|
|
5608
5619
|
if (startsWith(value, '@')) {
|
|
5609
|
-
|
|
5610
|
-
value = toFloat(getCssVar(name));
|
|
5620
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5611
5621
|
} else if (isNaN(value)) {
|
|
5612
5622
|
return value;
|
|
5613
5623
|
}
|
|
@@ -5632,7 +5642,7 @@
|
|
|
5632
5642
|
|
|
5633
5643
|
computed: {
|
|
5634
5644
|
fill(_ref) {let { fill } = _ref;
|
|
5635
|
-
return fill ||
|
|
5645
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5636
5646
|
} },
|
|
5637
5647
|
|
|
5638
5648
|
|
|
@@ -5824,7 +5834,7 @@
|
|
|
5824
5834
|
align: String,
|
|
5825
5835
|
offset: Number,
|
|
5826
5836
|
boundary: Boolean,
|
|
5827
|
-
|
|
5837
|
+
target: Boolean,
|
|
5828
5838
|
clsDrop: String,
|
|
5829
5839
|
delayShow: Number,
|
|
5830
5840
|
delayHide: Number,
|
|
@@ -5841,9 +5851,12 @@
|
|
|
5841
5851
|
offset: undefined,
|
|
5842
5852
|
delayShow: undefined,
|
|
5843
5853
|
delayHide: undefined,
|
|
5844
|
-
|
|
5845
|
-
|
|
5854
|
+
flip: false,
|
|
5855
|
+
shift: true,
|
|
5846
5856
|
boundary: true,
|
|
5857
|
+
target: false,
|
|
5858
|
+
targetX: false,
|
|
5859
|
+
targetY: false,
|
|
5847
5860
|
dropbar: false,
|
|
5848
5861
|
dropbarAnchor: false,
|
|
5849
5862
|
duration: 200,
|
|
@@ -5878,7 +5891,7 @@
|
|
|
5878
5891
|
},
|
|
5879
5892
|
|
|
5880
5893
|
watch(dropbar) {
|
|
5881
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5894
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5882
5895
|
},
|
|
5883
5896
|
|
|
5884
5897
|
immediate: true },
|
|
@@ -5894,7 +5907,7 @@
|
|
|
5894
5907
|
|
|
5895
5908
|
if (this.dropContainer !== $el) {
|
|
5896
5909
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5897
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5910
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5898
5911
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5899
5912
|
dropdowns.push(el);
|
|
5900
5913
|
}
|
|
@@ -5911,8 +5924,7 @@
|
|
|
5911
5924
|
{
|
|
5912
5925
|
...this.$props,
|
|
5913
5926
|
boundary: this.boundary,
|
|
5914
|
-
pos: this.pos
|
|
5915
|
-
offset: this.dropbar || this.offset });
|
|
5927
|
+
pos: this.pos });
|
|
5916
5928
|
|
|
5917
5929
|
|
|
5918
5930
|
},
|
|
@@ -5957,8 +5969,8 @@
|
|
|
5957
5969
|
if (
|
|
5958
5970
|
active &&
|
|
5959
5971
|
includes(active.mode, 'hover') &&
|
|
5960
|
-
active.
|
|
5961
|
-
!within(active.
|
|
5972
|
+
active.targetEl &&
|
|
5973
|
+
!within(active.targetEl, current) &&
|
|
5962
5974
|
!active.isDelaying)
|
|
5963
5975
|
{
|
|
5964
5976
|
active.hide(false);
|
|
@@ -5980,7 +5992,7 @@
|
|
|
5980
5992
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5981
5993
|
e.preventDefault();
|
|
5982
5994
|
|
|
5983
|
-
if (!active || active.
|
|
5995
|
+
if (!active || active.targetEl !== current) {
|
|
5984
5996
|
current.click();
|
|
5985
5997
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5986
5998
|
focusFirstFocusableElement(target));});
|
|
@@ -6030,8 +6042,8 @@
|
|
|
6030
6042
|
}
|
|
6031
6043
|
}
|
|
6032
6044
|
|
|
6033
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
6034
|
-
active == null ? void 0 : (_active$
|
|
6045
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6046
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
6035
6047
|
}
|
|
6036
6048
|
|
|
6037
6049
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -6073,8 +6085,8 @@
|
|
|
6073
6085
|
return this.dropbar;
|
|
6074
6086
|
},
|
|
6075
6087
|
|
|
6076
|
-
handler(
|
|
6077
|
-
if (!
|
|
6088
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6089
|
+
if (!this.isDropbarDrop(target)) {
|
|
6078
6090
|
return;
|
|
6079
6091
|
}
|
|
6080
6092
|
|
|
@@ -6082,7 +6094,7 @@
|
|
|
6082
6094
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
6083
6095
|
}
|
|
6084
6096
|
|
|
6085
|
-
addClass(
|
|
6097
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
6086
6098
|
} },
|
|
6087
6099
|
|
|
6088
6100
|
|
|
@@ -6097,19 +6109,24 @@
|
|
|
6097
6109
|
return this.dropbar;
|
|
6098
6110
|
},
|
|
6099
6111
|
|
|
6100
|
-
handler(
|
|
6101
|
-
if (!
|
|
6112
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6113
|
+
if (!this.isDropbarDrop(target)) {
|
|
6102
6114
|
return;
|
|
6103
6115
|
}
|
|
6104
6116
|
|
|
6105
|
-
this._observer = observeResize(
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6117
|
+
this._observer = observeResize(target, () => {
|
|
6118
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6119
|
+
concat(target).
|
|
6120
|
+
map((el) => offset(el));
|
|
6121
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6122
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6123
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6124
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6125
|
+
this.transitionTo(
|
|
6126
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6127
|
+
target);
|
|
6112
6128
|
|
|
6129
|
+
});
|
|
6113
6130
|
} },
|
|
6114
6131
|
|
|
6115
6132
|
|
|
@@ -6124,13 +6141,13 @@
|
|
|
6124
6141
|
return this.dropbar;
|
|
6125
6142
|
},
|
|
6126
6143
|
|
|
6127
|
-
handler(e
|
|
6144
|
+
handler(e) {
|
|
6128
6145
|
const active = this.getActive();
|
|
6129
6146
|
|
|
6130
6147
|
if (
|
|
6131
6148
|
matches(this.dropbar, ':hover') &&
|
|
6132
|
-
(active == null ? void 0 : active.$el) ===
|
|
6133
|
-
!this.toggles.some((el) => active.
|
|
6149
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6150
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6134
6151
|
{
|
|
6135
6152
|
e.preventDefault();
|
|
6136
6153
|
}
|
|
@@ -6148,8 +6165,8 @@
|
|
|
6148
6165
|
return this.dropbar;
|
|
6149
6166
|
},
|
|
6150
6167
|
|
|
6151
|
-
handler(
|
|
6152
|
-
if (!
|
|
6168
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6169
|
+
if (!this.isDropbarDrop(target)) {
|
|
6153
6170
|
return;
|
|
6154
6171
|
}
|
|
6155
6172
|
|
|
@@ -6157,7 +6174,7 @@
|
|
|
6157
6174
|
|
|
6158
6175
|
const active = this.getActive();
|
|
6159
6176
|
|
|
6160
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6177
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6161
6178
|
this.transitionTo(0);
|
|
6162
6179
|
}
|
|
6163
6180
|
} }],
|
|
@@ -6166,7 +6183,7 @@
|
|
|
6166
6183
|
|
|
6167
6184
|
methods: {
|
|
6168
6185
|
getActive() {
|
|
6169
|
-
return active && within(active.
|
|
6186
|
+
return active && within(active.targetEl, this.$el) && active;
|
|
6170
6187
|
},
|
|
6171
6188
|
|
|
6172
6189
|
transitionTo(newHeight, el) {
|
|
@@ -6196,13 +6213,17 @@
|
|
|
6196
6213
|
|
|
6197
6214
|
getDropdown(el) {
|
|
6198
6215
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6216
|
+
},
|
|
6217
|
+
|
|
6218
|
+
isDropbarDrop(el) {
|
|
6219
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6199
6220
|
} } };
|
|
6200
6221
|
|
|
6201
6222
|
|
|
6202
6223
|
|
|
6203
6224
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6204
6225
|
const { current, keyCode } = e;
|
|
6205
|
-
const target = (active == null ? void 0 : active.
|
|
6226
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6206
6227
|
const i = toggles.indexOf(target);
|
|
6207
6228
|
|
|
6208
6229
|
// Left
|
|
@@ -6259,7 +6280,7 @@
|
|
|
6259
6280
|
|
|
6260
6281
|
registerEvent(this, {
|
|
6261
6282
|
el: this.swipeTarget,
|
|
6262
|
-
name: pointerDown,
|
|
6283
|
+
name: pointerDown$1,
|
|
6263
6284
|
passive: true,
|
|
6264
6285
|
handler(e) {
|
|
6265
6286
|
if (!isTouch(e)) {
|
|
@@ -6269,7 +6290,7 @@
|
|
|
6269
6290
|
// Handle Swipe Gesture
|
|
6270
6291
|
const pos = getEventPos(e);
|
|
6271
6292
|
const target = 'tagName' in e.target ? e.target : parent(e.target);
|
|
6272
|
-
once(document, pointerUp + " " + pointerCancel + " scroll", (e) => {
|
|
6293
|
+
once(document, pointerUp$1 + " " + pointerCancel + " scroll", (e) => {
|
|
6273
6294
|
const { x, y } = getEventPos(e);
|
|
6274
6295
|
|
|
6275
6296
|
// swipe
|
|
@@ -6570,6 +6591,14 @@
|
|
|
6570
6591
|
offset: 0 },
|
|
6571
6592
|
|
|
6572
6593
|
|
|
6594
|
+
connected() {
|
|
6595
|
+
registerClick(this);
|
|
6596
|
+
},
|
|
6597
|
+
|
|
6598
|
+
disconnected() {
|
|
6599
|
+
unregisterClick(this);
|
|
6600
|
+
},
|
|
6601
|
+
|
|
6573
6602
|
methods: {
|
|
6574
6603
|
async scrollTo(el) {
|
|
6575
6604
|
el = el && $(el) || document.body;
|
|
@@ -6578,20 +6607,39 @@
|
|
|
6578
6607
|
await scrollIntoView(el, { offset: this.offset });
|
|
6579
6608
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6580
6609
|
}
|
|
6581
|
-
} }
|
|
6610
|
+
} } };
|
|
6582
6611
|
|
|
6583
6612
|
|
|
6584
|
-
events: {
|
|
6585
|
-
click(e) {
|
|
6586
|
-
if (e.defaultPrevented) {
|
|
6587
|
-
return;
|
|
6588
|
-
}
|
|
6589
6613
|
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6614
|
+
const components$2 = new Set();
|
|
6615
|
+
function registerClick(cmp) {
|
|
6616
|
+
if (!components$2.size) {
|
|
6617
|
+
on(document, 'click', clickHandler);
|
|
6618
|
+
}
|
|
6593
6619
|
|
|
6620
|
+
components$2.add(cmp);
|
|
6621
|
+
}
|
|
6594
6622
|
|
|
6623
|
+
function unregisterClick(cmp) {
|
|
6624
|
+
components$2.delete(cmp);
|
|
6625
|
+
|
|
6626
|
+
if (!components$2.length) {
|
|
6627
|
+
off(document, 'click', clickHandler);
|
|
6628
|
+
}
|
|
6629
|
+
}
|
|
6630
|
+
|
|
6631
|
+
function clickHandler(e) {
|
|
6632
|
+
if (e.defaultPrevented) {
|
|
6633
|
+
return;
|
|
6634
|
+
}
|
|
6635
|
+
|
|
6636
|
+
for (const component of components$2) {
|
|
6637
|
+
if (within(e.target, component.$el)) {
|
|
6638
|
+
e.preventDefault();
|
|
6639
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6640
|
+
}
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6595
6643
|
|
|
6596
6644
|
function getTargetElement(el) {
|
|
6597
6645
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -6921,7 +6969,9 @@
|
|
|
6921
6969
|
},
|
|
6922
6970
|
|
|
6923
6971
|
handler() {
|
|
6924
|
-
|
|
6972
|
+
const { scrollingElement } = document;
|
|
6973
|
+
|
|
6974
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6925
6975
|
return;
|
|
6926
6976
|
}
|
|
6927
6977
|
|
|
@@ -6930,13 +6980,11 @@
|
|
|
6930
6980
|
const elOffset = offset(this.$el);
|
|
6931
6981
|
|
|
6932
6982
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6933
|
-
scrollTop
|
|
6934
|
-
window,
|
|
6983
|
+
scrollingElement.scrollTop =
|
|
6935
6984
|
targetOffset.top -
|
|
6936
6985
|
elOffset.height -
|
|
6937
6986
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6938
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6939
|
-
|
|
6987
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6940
6988
|
}
|
|
6941
6989
|
});
|
|
6942
6990
|
} }],
|
|
@@ -7034,7 +7082,7 @@
|
|
|
7034
7082
|
|
|
7035
7083
|
|
|
7036
7084
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
7037
|
-
const scroll = scrollTop
|
|
7085
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
7038
7086
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
7039
7087
|
|
|
7040
7088
|
return {
|
|
@@ -7443,7 +7491,7 @@
|
|
|
7443
7491
|
|
|
7444
7492
|
events: [
|
|
7445
7493
|
{
|
|
7446
|
-
name: pointerDown,
|
|
7494
|
+
name: pointerDown$1,
|
|
7447
7495
|
|
|
7448
7496
|
filter() {
|
|
7449
7497
|
return includes(this.mode, 'hover');
|
|
@@ -7461,7 +7509,7 @@
|
|
|
7461
7509
|
trigger(this.$el, 'focus');
|
|
7462
7510
|
once(
|
|
7463
7511
|
document,
|
|
7464
|
-
pointerDown,
|
|
7512
|
+
pointerDown$1,
|
|
7465
7513
|
() => trigger(this.$el, 'blur'),
|
|
7466
7514
|
true,
|
|
7467
7515
|
(e) => !within(e.target, this.$el));
|
|
@@ -7554,7 +7602,7 @@
|
|
|
7554
7602
|
|
|
7555
7603
|
|
|
7556
7604
|
{
|
|
7557
|
-
name: '
|
|
7605
|
+
name: 'hide show',
|
|
7558
7606
|
|
|
7559
7607
|
self: true,
|
|
7560
7608
|
|
|
@@ -7562,10 +7610,8 @@
|
|
|
7562
7610
|
return this.target;
|
|
7563
7611
|
},
|
|
7564
7612
|
|
|
7565
|
-
handler(
|
|
7566
|
-
|
|
7567
|
-
this.updateAria(toggled);
|
|
7568
|
-
}
|
|
7613
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7614
|
+
this.updateAria(type === 'show');
|
|
7569
7615
|
} },
|
|
7570
7616
|
|
|
7571
7617
|
|
|
@@ -7660,10 +7706,12 @@
|
|
|
7660
7706
|
Video: Video,
|
|
7661
7707
|
Close: Close,
|
|
7662
7708
|
Spinner: Spinner,
|
|
7709
|
+
NavParentIcon: NavParentIcon,
|
|
7663
7710
|
SlidenavNext: Slidenav,
|
|
7664
7711
|
SlidenavPrevious: Slidenav,
|
|
7665
7712
|
SearchIcon: Search,
|
|
7666
7713
|
Marker: IconComponent,
|
|
7714
|
+
NavbarParentIcon: IconComponent,
|
|
7667
7715
|
NavbarToggleIcon: IconComponent,
|
|
7668
7716
|
OverlayIcon: IconComponent,
|
|
7669
7717
|
PaginationNext: IconComponent,
|
|
@@ -8153,7 +8201,7 @@
|
|
|
8153
8201
|
|
|
8154
8202
|
},
|
|
8155
8203
|
|
|
8156
|
-
setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8204
|
+
async setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8157
8205
|
state = { filter: { '': '' }, sort: [], ...state };
|
|
8158
8206
|
|
|
8159
8207
|
trigger(this.$el, 'beforeFilter', [this, state]);
|
|
@@ -8162,15 +8210,17 @@
|
|
|
8162
8210
|
toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
|
|
8163
8211
|
|
|
8164
8212
|
|
|
8165
|
-
Promise.all(
|
|
8213
|
+
await Promise.all(
|
|
8166
8214
|
$$(this.target, this.$el).map((target) => {
|
|
8167
8215
|
const filterFn = () => {
|
|
8168
8216
|
applyState(state, target, children(target));
|
|
8169
8217
|
this.$update(this.$el);
|
|
8170
8218
|
};
|
|
8171
8219
|
return animate ? this.animate(filterFn, target) : filterFn();
|
|
8172
|
-
}))
|
|
8173
|
-
|
|
8220
|
+
}));
|
|
8221
|
+
|
|
8222
|
+
|
|
8223
|
+
trigger(this.$el, 'afterFilter', [this]);
|
|
8174
8224
|
},
|
|
8175
8225
|
|
|
8176
8226
|
updateState() {
|
|
@@ -8460,6 +8510,11 @@
|
|
|
8460
8510
|
this.interval && clearInterval(this.interval);
|
|
8461
8511
|
} } };
|
|
8462
8512
|
|
|
8513
|
+
const pointerOptions = { passive: false, capture: true };
|
|
8514
|
+
const pointerDown = 'touchstart mousedown';
|
|
8515
|
+
const pointerMove = 'touchmove mousemove';
|
|
8516
|
+
const pointerUp = 'touchend touchcancel mouseup click input';
|
|
8517
|
+
|
|
8463
8518
|
var SliderDrag = {
|
|
8464
8519
|
props: {
|
|
8465
8520
|
draggable: Boolean },
|
|
@@ -8512,7 +8567,17 @@
|
|
|
8512
8567
|
|
|
8513
8568
|
handler(e) {
|
|
8514
8569
|
e.preventDefault();
|
|
8515
|
-
} }
|
|
8570
|
+
} },
|
|
8571
|
+
|
|
8572
|
+
|
|
8573
|
+
{
|
|
8574
|
+
// iOS workaround for slider stopping if swiping fast
|
|
8575
|
+
name: pointerMove + " " + pointerUp,
|
|
8576
|
+
el() {
|
|
8577
|
+
return this.list;
|
|
8578
|
+
},
|
|
8579
|
+
handler: noop,
|
|
8580
|
+
...pointerOptions }],
|
|
8516
8581
|
|
|
8517
8582
|
|
|
8518
8583
|
|
|
@@ -8534,10 +8599,10 @@
|
|
|
8534
8599
|
this.prevIndex = this.index;
|
|
8535
8600
|
}
|
|
8536
8601
|
|
|
8537
|
-
on(document, pointerMove, this.move,
|
|
8602
|
+
on(document, pointerMove, this.move, pointerOptions);
|
|
8538
8603
|
|
|
8539
8604
|
// 'input' event is triggered by video controls
|
|
8540
|
-
on(document, pointerUp
|
|
8605
|
+
on(document, pointerUp, this.end, pointerOptions);
|
|
8541
8606
|
|
|
8542
8607
|
css(this.list, 'userSelect', 'none');
|
|
8543
8608
|
},
|
|
@@ -8617,8 +8682,8 @@
|
|
|
8617
8682
|
},
|
|
8618
8683
|
|
|
8619
8684
|
end() {
|
|
8620
|
-
off(document, pointerMove, this.move,
|
|
8621
|
-
off(document, pointerUp
|
|
8685
|
+
off(document, pointerMove, this.move, pointerOptions);
|
|
8686
|
+
off(document, pointerUp, this.end, pointerOptions);
|
|
8622
8687
|
|
|
8623
8688
|
if (this.dragging) {
|
|
8624
8689
|
this.dragging = null;
|
|
@@ -9026,7 +9091,7 @@
|
|
|
9026
9091
|
|
|
9027
9092
|
events: [
|
|
9028
9093
|
{
|
|
9029
|
-
name: pointerMove + " " + pointerDown + " keydown",
|
|
9094
|
+
name: pointerMove$1 + " " + pointerDown$1 + " keydown",
|
|
9030
9095
|
|
|
9031
9096
|
handler: 'showControls' },
|
|
9032
9097
|
|
|
@@ -10681,7 +10746,7 @@
|
|
|
10681
10746
|
},
|
|
10682
10747
|
|
|
10683
10748
|
events: {
|
|
10684
|
-
name: pointerDown,
|
|
10749
|
+
name: pointerDown$1,
|
|
10685
10750
|
passive: false,
|
|
10686
10751
|
handler: 'init' },
|
|
10687
10752
|
|
|
@@ -10811,8 +10876,8 @@
|
|
|
10811
10876
|
this.placeholder = placeholder;
|
|
10812
10877
|
this.origin = { target, index: index(placeholder), ...this.pos };
|
|
10813
10878
|
|
|
10814
|
-
on(document, pointerMove, this.move);
|
|
10815
|
-
on(document, pointerUp, this.end);
|
|
10879
|
+
on(document, pointerMove$1, this.move);
|
|
10880
|
+
on(document, pointerUp$1, this.end);
|
|
10816
10881
|
|
|
10817
10882
|
if (!this.threshold) {
|
|
10818
10883
|
this.start(e);
|
|
@@ -10848,8 +10913,8 @@
|
|
|
10848
10913
|
},
|
|
10849
10914
|
|
|
10850
10915
|
end() {
|
|
10851
|
-
off(document, pointerMove, this.move);
|
|
10852
|
-
off(document, pointerUp, this.end);
|
|
10916
|
+
off(document, pointerMove$1, this.move);
|
|
10917
|
+
off(document, pointerUp$1, this.end);
|
|
10853
10918
|
|
|
10854
10919
|
if (!this.drag) {
|
|
10855
10920
|
return;
|
|
@@ -10918,7 +10983,7 @@
|
|
|
10918
10983
|
let last = Date.now();
|
|
10919
10984
|
trackTimer = setInterval(() => {
|
|
10920
10985
|
let { x, y } = pos;
|
|
10921
|
-
y += scrollTop
|
|
10986
|
+
y += document.scrollingElement.scrollTop;
|
|
10922
10987
|
|
|
10923
10988
|
const dist = (Date.now() - last) * 0.3;
|
|
10924
10989
|
last = Date.now();
|
|
@@ -10939,7 +11004,7 @@
|
|
|
10939
11004
|
}
|
|
10940
11005
|
|
|
10941
11006
|
if (scroll > 0 && scroll < scrollHeight - height) {
|
|
10942
|
-
scrollTop
|
|
11007
|
+
scrollEl.scrollTop = scroll;
|
|
10943
11008
|
return true;
|
|
10944
11009
|
}
|
|
10945
11010
|
});
|
|
@@ -11084,11 +11149,11 @@
|
|
|
11084
11149
|
|
|
11085
11150
|
this._unbind = once(
|
|
11086
11151
|
document, "show keydown " +
|
|
11087
|
-
pointerDown,
|
|
11152
|
+
pointerDown$1,
|
|
11088
11153
|
this.hide,
|
|
11089
11154
|
false,
|
|
11090
11155
|
(e) =>
|
|
11091
|
-
e.type === pointerDown && !within(e.target, this.$el) ||
|
|
11156
|
+
e.type === pointerDown$1 && !within(e.target, this.$el) ||
|
|
11092
11157
|
e.type === 'keydown' && e.keyCode === 27 ||
|
|
11093
11158
|
e.type === 'show' && e.detail[0] !== this && e.detail[0].$name === this.$name);
|
|
11094
11159
|
|
|
@@ -11159,7 +11224,7 @@
|
|
|
11159
11224
|
|
|
11160
11225
|
// Clicking a button does not give it focus on all browsers and platforms
|
|
11161
11226
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#clicking_and_focus
|
|
11162
|
-
[pointerDown](e) {
|
|
11227
|
+
[pointerDown$1](e) {
|
|
11163
11228
|
if (isTouch(e)) {
|
|
11164
11229
|
this.show();
|
|
11165
11230
|
}
|