uikit 3.14.4-dev.cd89debeb → 3.14.4-dev.d2929b5b7
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 -102
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +380 -102
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +397 -107
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +397 -107
- 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 +99 -135
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +99 -135
- 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 +93 -132
- 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 +419 -381
- 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 +472 -417
- 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 +1 -1
- 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 +90 -61
- package/src/js/core/height-viewport.js +14 -6
- package/src/js/core/icon.js +16 -0
- package/src/js/core/index.js +2 -0
- package/src/js/core/leader.js +2 -2
- package/src/js/core/navbar.js +42 -30
- package/src/js/core/scroll.js +37 -10
- package/src/js/core/sticky.js +8 -9
- package/src/js/mixin/media.js +4 -5
- package/src/js/mixin/modal.js +9 -6
- package/src/js/mixin/position.js +22 -8
- package/src/js/mixin/slider-drag.js +20 -8
- 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 +43 -47
- 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 -28
- 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 -28
- 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 +453 -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/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 +13 -24
- 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-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.d2929b5b7 | 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
|
}
|
|
@@ -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];
|
|
@@ -1965,11 +1936,11 @@
|
|
|
1965
1936
|
...options };
|
|
1966
1937
|
|
|
1967
1938
|
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1939
|
+
if (!isArray(target)) {
|
|
1940
|
+
target = [target, target];
|
|
1941
|
+
}
|
|
1971
1942
|
|
|
1972
|
-
offset(element,
|
|
1943
|
+
offset(element, getPosition(element, target, options));
|
|
1973
1944
|
}
|
|
1974
1945
|
|
|
1975
1946
|
function attachTo(element, target, options) {
|
|
@@ -1984,8 +1955,11 @@
|
|
|
1984
1955
|
|
|
1985
1956
|
|
|
1986
1957
|
const position = offset(element);
|
|
1987
|
-
|
|
1958
|
+
|
|
1988
1959
|
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1960
|
+
const targetOffset =
|
|
1961
|
+
attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
|
|
1962
|
+
|
|
1989
1963
|
position[start] = position[dir] =
|
|
1990
1964
|
targetOffset[start] +
|
|
1991
1965
|
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
@@ -2000,60 +1974,54 @@
|
|
|
2000
1974
|
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
2001
1975
|
}
|
|
2002
1976
|
|
|
2003
|
-
function
|
|
1977
|
+
function getPosition(element, target, options) {
|
|
2004
1978
|
const position = attachTo(element, target, options);
|
|
2005
|
-
const targetDim = offset(target);
|
|
2006
1979
|
|
|
2007
1980
|
let {
|
|
2008
1981
|
flip,
|
|
1982
|
+
shift,
|
|
2009
1983
|
attach: { element: elAttach, target: targetAttach },
|
|
2010
1984
|
offset: elOffset,
|
|
2011
1985
|
boundary,
|
|
2012
|
-
viewport,
|
|
2013
1986
|
viewportOffset } =
|
|
2014
1987
|
options;
|
|
2015
1988
|
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
viewports = viewports.filter((viewport) => viewport !== boundary);
|
|
1989
|
+
if (!flip && !shift) {
|
|
1990
|
+
return position;
|
|
2019
1991
|
}
|
|
2020
|
-
const [scrollElement] = viewports;
|
|
2021
|
-
viewports.push(viewport);
|
|
2022
1992
|
|
|
2023
1993
|
const offsetPosition = { ...position };
|
|
2024
1994
|
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
const willFlip =
|
|
2030
|
-
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
1995
|
+
let viewports = scrollParents(target[i]);
|
|
1996
|
+
const [scrollElement] = viewports;
|
|
2031
1997
|
|
|
2032
|
-
viewport = getIntersectionArea(...viewports.
|
|
1998
|
+
let viewport = getIntersectionArea(...viewports.map(offsetViewport));
|
|
2033
1999
|
|
|
2034
2000
|
if (viewportOffset) {
|
|
2035
2001
|
viewport[start] += viewportOffset;
|
|
2036
2002
|
viewport[end] -= viewportOffset;
|
|
2037
2003
|
}
|
|
2038
2004
|
|
|
2039
|
-
if (boundary
|
|
2040
|
-
viewport = getIntersectionArea(viewport,
|
|
2005
|
+
if (boundary) {
|
|
2006
|
+
viewport = getIntersectionArea(viewport, offsetViewport(boundary));
|
|
2041
2007
|
}
|
|
2042
2008
|
|
|
2043
|
-
const
|
|
2044
|
-
const
|
|
2009
|
+
const isInStartViewport = position[start] >= viewport[start];
|
|
2010
|
+
const isInEndViewport = position[end] <= viewport[end];
|
|
2045
2011
|
|
|
2046
|
-
if (
|
|
2012
|
+
if (isInStartViewport && isInEndViewport) {
|
|
2047
2013
|
continue;
|
|
2048
2014
|
}
|
|
2049
2015
|
|
|
2050
|
-
let offsetBy;
|
|
2016
|
+
let offsetBy = 0;
|
|
2017
|
+
const targetDim = offset(target[i]);
|
|
2051
2018
|
|
|
2052
2019
|
// Flip
|
|
2053
|
-
if (
|
|
2020
|
+
if (!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i)) {
|
|
2054
2021
|
if (
|
|
2055
|
-
|
|
2056
|
-
elAttach[i] ===
|
|
2022
|
+
!flip ||
|
|
2023
|
+
elAttach[i] === end && isInStartViewport ||
|
|
2024
|
+
elAttach[i] === start && isInEndViewport)
|
|
2057
2025
|
{
|
|
2058
2026
|
continue;
|
|
2059
2027
|
}
|
|
@@ -2090,26 +2058,25 @@
|
|
|
2090
2058
|
return false;
|
|
2091
2059
|
}
|
|
2092
2060
|
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2061
|
+
const newPos = getPosition(element, target, {
|
|
2062
|
+
...options,
|
|
2063
|
+
attach: {
|
|
2064
|
+
element: elAttach.map(flipDir).reverse(),
|
|
2065
|
+
target: targetAttach.map(flipDir).reverse() },
|
|
2099
2066
|
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
recursion: true });
|
|
2067
|
+
offset: elOffset.reverse(),
|
|
2068
|
+
recursion: true });
|
|
2103
2069
|
|
|
2104
2070
|
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
}
|
|
2071
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2072
|
+
return newPos;
|
|
2108
2073
|
}
|
|
2074
|
+
|
|
2075
|
+
continue;
|
|
2109
2076
|
}
|
|
2110
2077
|
|
|
2111
|
-
//
|
|
2112
|
-
} else {
|
|
2078
|
+
// Shift
|
|
2079
|
+
} else if (shift) {
|
|
2113
2080
|
offsetBy =
|
|
2114
2081
|
clamp(
|
|
2115
2082
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2165,7 +2132,7 @@
|
|
|
2165
2132
|
getImage: getImage,
|
|
2166
2133
|
transition: transition,
|
|
2167
2134
|
Transition: Transition,
|
|
2168
|
-
animate: animate$
|
|
2135
|
+
animate: animate$2,
|
|
2169
2136
|
Animation: Animation,
|
|
2170
2137
|
attr: attr,
|
|
2171
2138
|
hasAttr: hasAttr,
|
|
@@ -2295,10 +2262,8 @@
|
|
|
2295
2262
|
findAll: findAll,
|
|
2296
2263
|
escape: escape,
|
|
2297
2264
|
css: css,
|
|
2298
|
-
getCssVar: getCssVar,
|
|
2299
2265
|
propName: propName,
|
|
2300
2266
|
isInView: isInView,
|
|
2301
|
-
scrollTop: scrollTop,
|
|
2302
2267
|
scrollIntoView: scrollIntoView,
|
|
2303
2268
|
scrolledOver: scrolledOver,
|
|
2304
2269
|
scrollParents: scrollParents,
|
|
@@ -2621,7 +2586,7 @@
|
|
|
2621
2586
|
|
|
2622
2587
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2623
2588
|
|
|
2624
|
-
if (prop === 'target' &&
|
|
2589
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2625
2590
|
continue;
|
|
2626
2591
|
}
|
|
2627
2592
|
|
|
@@ -2961,7 +2926,7 @@
|
|
|
2961
2926
|
UIkit.data = '__uikit__';
|
|
2962
2927
|
UIkit.prefix = 'uk-';
|
|
2963
2928
|
UIkit.options = {};
|
|
2964
|
-
UIkit.version = '3.14.4-dev.
|
|
2929
|
+
UIkit.version = '3.14.4-dev.d2929b5b7';
|
|
2965
2930
|
|
|
2966
2931
|
globalAPI(UIkit);
|
|
2967
2932
|
hooksAPI(UIkit);
|
|
@@ -3066,27 +3031,7 @@
|
|
|
3066
3031
|
origin: false,
|
|
3067
3032
|
transition: 'ease',
|
|
3068
3033
|
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
|
-
|
|
3034
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3090
3035
|
|
|
3091
3036
|
|
|
3092
3037
|
computed: {
|
|
@@ -3095,7 +3040,7 @@
|
|
|
3095
3040
|
},
|
|
3096
3041
|
|
|
3097
3042
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3098
|
-
return startsWith(animation[0],
|
|
3043
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3099
3044
|
} },
|
|
3100
3045
|
|
|
3101
3046
|
|
|
@@ -3188,130 +3133,97 @@
|
|
|
3188
3133
|
};
|
|
3189
3134
|
}
|
|
3190
3135
|
|
|
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(cmp);
|
|
3199
|
-
}
|
|
3200
|
-
|
|
3201
|
-
function slide(_ref4)
|
|
3202
|
-
|
|
3203
|
-
|
|
3136
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3137
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3204
3138
|
|
|
3139
|
+
const dirs = [
|
|
3140
|
+
['left', 'right'],
|
|
3141
|
+
['top', 'bottom']];
|
|
3205
3142
|
|
|
3143
|
+
const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
|
|
3144
|
+
const end = dir[1] === startProp;
|
|
3145
|
+
const props = ['width', 'height'];
|
|
3146
|
+
const dimProp = props[dirs.indexOf(dir)];
|
|
3147
|
+
const marginProp = "margin-" + dir[0];
|
|
3148
|
+
const marginStartProp = "margin-" + startProp;
|
|
3206
3149
|
|
|
3150
|
+
return async (el, show) => {
|
|
3151
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3207
3152
|
|
|
3153
|
+
let currentDim = dimensions(el)[dimProp];
|
|
3208
3154
|
|
|
3209
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3210
|
-
return (el, show) => {
|
|
3211
3155
|
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;
|
|
3156
|
+
await Transition.cancel(el);
|
|
3220
3157
|
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
if (!isToggled(el)) {
|
|
3158
|
+
if (show) {
|
|
3224
3159
|
_toggle(el, true);
|
|
3225
3160
|
}
|
|
3226
3161
|
|
|
3227
|
-
|
|
3162
|
+
const prevProps = Object.fromEntries(
|
|
3163
|
+
['padding', 'border', 'width', 'height', 'overflow', marginProp, marginStartProp].map(
|
|
3164
|
+
(key) => [key, el.style[key]]));
|
|
3228
3165
|
|
|
3229
|
-
// Update child components first
|
|
3230
|
-
fastdom.flush();
|
|
3231
3166
|
|
|
3232
|
-
const endHeight = toFloat(css(el, 'height')) + inner;
|
|
3233
|
-
duration = velocity * endHeight + duration;
|
|
3234
3167
|
|
|
3235
|
-
|
|
3168
|
+
const dim = dimensions(el);
|
|
3169
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3170
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3171
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3236
3172
|
|
|
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);
|
|
3173
|
+
if (!inProgress && !show) {
|
|
3174
|
+
currentDim += marginStart;
|
|
3267
3175
|
}
|
|
3268
3176
|
|
|
3269
|
-
const
|
|
3270
|
-
|
|
3177
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3178
|
+
css(wrapper, {
|
|
3179
|
+
boxSizing: 'border-box',
|
|
3180
|
+
height: dim.height,
|
|
3181
|
+
width: dim.width,
|
|
3182
|
+
...css(el, [
|
|
3183
|
+
'padding',
|
|
3184
|
+
'borderTop',
|
|
3185
|
+
'borderRight',
|
|
3186
|
+
'borderBottom',
|
|
3187
|
+
'borderLeft',
|
|
3188
|
+
'borderImage',
|
|
3189
|
+
marginStartProp]) });
|
|
3190
|
+
|
|
3271
3191
|
|
|
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
3192
|
|
|
3278
3193
|
css(el, {
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3194
|
+
padding: 0,
|
|
3195
|
+
border: 0,
|
|
3196
|
+
[marginStartProp]: 0,
|
|
3197
|
+
width: dim.width,
|
|
3198
|
+
height: dim.height,
|
|
3199
|
+
overflow: 'hidden',
|
|
3200
|
+
[dimProp]: currentDim });
|
|
3285
3201
|
|
|
3286
3202
|
|
|
3287
|
-
|
|
3288
|
-
show ?
|
|
3289
|
-
|
|
3290
|
-
el,
|
|
3291
|
-
{
|
|
3292
|
-
clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
|
|
3293
|
-
marginLeft: 0 },
|
|
3203
|
+
const percent = currentDim / endDim;
|
|
3204
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3205
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3294
3206
|
|
|
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%)" :
|
|
3207
|
+
if (end) {
|
|
3208
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3209
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3210
|
+
}
|
|
3303
3211
|
|
|
3212
|
+
if (!end ^ mode === 'reveal') {
|
|
3213
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3214
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3215
|
+
}
|
|
3304
3216
|
|
|
3305
|
-
|
|
3306
|
-
|
|
3217
|
+
try {
|
|
3218
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3219
|
+
} finally {
|
|
3220
|
+
css(el, prevProps);
|
|
3221
|
+
unwrap(wrapper.firstChild);
|
|
3307
3222
|
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
css(scrollElement, 'overflowX', '');
|
|
3313
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3314
|
-
});
|
|
3223
|
+
if (!show) {
|
|
3224
|
+
_toggle(el, false);
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3315
3227
|
};
|
|
3316
3228
|
}
|
|
3317
3229
|
|
|
@@ -3336,6 +3248,7 @@
|
|
|
3336
3248
|
mixins: [Class, Lazyload, Togglable],
|
|
3337
3249
|
|
|
3338
3250
|
props: {
|
|
3251
|
+
animation: Boolean,
|
|
3339
3252
|
targets: String,
|
|
3340
3253
|
active: null,
|
|
3341
3254
|
collapsible: Boolean,
|
|
@@ -3348,7 +3261,7 @@
|
|
|
3348
3261
|
data: {
|
|
3349
3262
|
targets: '> *',
|
|
3350
3263
|
active: false,
|
|
3351
|
-
animation:
|
|
3264
|
+
animation: true,
|
|
3352
3265
|
collapsible: true,
|
|
3353
3266
|
multiple: false,
|
|
3354
3267
|
clsOpen: 'uk-open',
|
|
@@ -3394,7 +3307,7 @@
|
|
|
3394
3307
|
hide(
|
|
3395
3308
|
el,
|
|
3396
3309
|
!hasClass(
|
|
3397
|
-
this.items.find((item) =>
|
|
3310
|
+
this.items.find((item) => within(el, item)),
|
|
3398
3311
|
this.clsOpen));
|
|
3399
3312
|
|
|
3400
3313
|
|
|
@@ -3446,23 +3359,15 @@
|
|
|
3446
3359
|
toggleClass(el, this.clsOpen, show);
|
|
3447
3360
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3448
3361
|
|
|
3449
|
-
const content = $(
|
|
3362
|
+
const content = $(this.content, el);
|
|
3450
3363
|
|
|
3451
|
-
if (animate === false || !this.
|
|
3364
|
+
if (animate === false || !this.animation) {
|
|
3365
|
+
content.hidden = !show;
|
|
3452
3366
|
hide(content, !show);
|
|
3453
3367
|
return;
|
|
3454
3368
|
}
|
|
3455
3369
|
|
|
3456
|
-
|
|
3457
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3458
|
-
}
|
|
3459
|
-
|
|
3460
|
-
hide(content, false);
|
|
3461
|
-
await slide(this)(el._wrapper, show);
|
|
3462
|
-
hide(content, !show);
|
|
3463
|
-
|
|
3464
|
-
delete el._wrapper;
|
|
3465
|
-
unwrap(content);
|
|
3370
|
+
await toggleTransition(this)(content, show);
|
|
3466
3371
|
|
|
3467
3372
|
if (show) {
|
|
3468
3373
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3488,18 +3393,17 @@
|
|
|
3488
3393
|
args: 'animation',
|
|
3489
3394
|
|
|
3490
3395
|
props: {
|
|
3396
|
+
animation: Boolean,
|
|
3491
3397
|
close: String },
|
|
3492
3398
|
|
|
3493
3399
|
|
|
3494
3400
|
data: {
|
|
3495
|
-
animation:
|
|
3401
|
+
animation: true,
|
|
3496
3402
|
selClose: '.uk-alert-close',
|
|
3497
|
-
duration: 150,
|
|
3498
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3403
|
+
duration: 150 },
|
|
3499
3404
|
|
|
3500
3405
|
|
|
3501
|
-
events:
|
|
3502
|
-
{
|
|
3406
|
+
events: {
|
|
3503
3407
|
name: 'click',
|
|
3504
3408
|
|
|
3505
3409
|
delegate() {
|
|
@@ -3509,16 +3413,39 @@
|
|
|
3509
3413
|
handler(e) {
|
|
3510
3414
|
e.preventDefault();
|
|
3511
3415
|
this.close();
|
|
3512
|
-
} }
|
|
3513
|
-
|
|
3416
|
+
} },
|
|
3514
3417
|
|
|
3515
3418
|
|
|
3516
3419
|
methods: {
|
|
3517
3420
|
async close() {
|
|
3518
|
-
await this.toggleElement(this.$el);
|
|
3421
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3519
3422
|
this.$destroy(true);
|
|
3520
3423
|
} } };
|
|
3521
3424
|
|
|
3425
|
+
|
|
3426
|
+
|
|
3427
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3428
|
+
return (el) => {
|
|
3429
|
+
const height = toFloat(css(el, 'height'));
|
|
3430
|
+
css(el, 'height', height);
|
|
3431
|
+
return Transition.start(
|
|
3432
|
+
el,
|
|
3433
|
+
{
|
|
3434
|
+
height: 0,
|
|
3435
|
+
marginTop: 0,
|
|
3436
|
+
marginBottom: 0,
|
|
3437
|
+
paddingTop: 0,
|
|
3438
|
+
paddingBottom: 0,
|
|
3439
|
+
borderTop: 0,
|
|
3440
|
+
borderBottom: 0,
|
|
3441
|
+
opacity: 0 },
|
|
3442
|
+
|
|
3443
|
+
velocity * height + duration,
|
|
3444
|
+
transition);
|
|
3445
|
+
|
|
3446
|
+
};
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3522
3449
|
var Video = {
|
|
3523
3450
|
args: 'autoplay',
|
|
3524
3451
|
|
|
@@ -3667,13 +3594,17 @@
|
|
|
3667
3594
|
props: {
|
|
3668
3595
|
pos: String,
|
|
3669
3596
|
offset: null,
|
|
3670
|
-
flip: Boolean
|
|
3597
|
+
flip: Boolean,
|
|
3598
|
+
shift: Boolean,
|
|
3599
|
+
inset: Boolean },
|
|
3671
3600
|
|
|
3672
3601
|
|
|
3673
3602
|
data: {
|
|
3674
3603
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3604
|
+
offset: false,
|
|
3675
3605
|
flip: true,
|
|
3676
|
-
|
|
3606
|
+
shift: true,
|
|
3607
|
+
inset: false },
|
|
3677
3608
|
|
|
3678
3609
|
|
|
3679
3610
|
connected() {
|
|
@@ -3687,7 +3618,7 @@
|
|
|
3687
3618
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3688
3619
|
|
|
3689
3620
|
const attach = {
|
|
3690
|
-
element: [flipPosition(this.dir), this.align],
|
|
3621
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3691
3622
|
target: [this.dir, this.align] };
|
|
3692
3623
|
|
|
3693
3624
|
|
|
@@ -3698,6 +3629,9 @@
|
|
|
3698
3629
|
offset = offset.reverse();
|
|
3699
3630
|
}
|
|
3700
3631
|
|
|
3632
|
+
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
3633
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
3634
|
+
|
|
3701
3635
|
// Ensure none positioned element does not generate scrollbars
|
|
3702
3636
|
const elDim = dimensions(element);
|
|
3703
3637
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
@@ -3707,32 +3641,39 @@
|
|
|
3707
3641
|
offset,
|
|
3708
3642
|
boundary,
|
|
3709
3643
|
flip: this.flip,
|
|
3644
|
+
shift: this.shift,
|
|
3710
3645
|
viewportOffset: this.getViewportOffset(element) });
|
|
3711
3646
|
|
|
3647
|
+
|
|
3648
|
+
// Restore scroll position
|
|
3649
|
+
scrollElement.scrollTop = scrollTop;
|
|
3650
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
3712
3651
|
},
|
|
3713
3652
|
|
|
3714
3653
|
getPositionOffset(element) {
|
|
3715
3654
|
return (
|
|
3716
3655
|
toPx(
|
|
3717
|
-
this.offset === false ?
|
|
3656
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3718
3657
|
this.axis === 'x' ? 'width' : 'height',
|
|
3719
3658
|
element) * (
|
|
3720
|
-
|
|
3659
|
+
|
|
3660
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3661
|
+
this.inset ? -1 : 1));
|
|
3721
3662
|
|
|
3722
3663
|
},
|
|
3723
3664
|
|
|
3724
3665
|
getShiftOffset(element) {
|
|
3725
|
-
return
|
|
3666
|
+
return this.align === 'center' ?
|
|
3726
3667
|
0 :
|
|
3727
3668
|
toPx(
|
|
3728
|
-
|
|
3669
|
+
css(element, '--uk-position-shift-offset'),
|
|
3729
3670
|
this.axis === 'y' ? 'width' : 'height',
|
|
3730
3671
|
element) * (
|
|
3731
3672
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3732
3673
|
},
|
|
3733
3674
|
|
|
3734
3675
|
getViewportOffset(element) {
|
|
3735
|
-
return toPx(
|
|
3676
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3736
3677
|
} } };
|
|
3737
3678
|
|
|
3738
3679
|
const active$1 = [];
|
|
@@ -3844,8 +3785,8 @@
|
|
|
3844
3785
|
|
|
3845
3786
|
|
|
3846
3787
|
if (this.overlay) {
|
|
3847
|
-
once(this.$el, '
|
|
3848
|
-
once(this.$el, '
|
|
3788
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el));
|
|
3789
|
+
once(this.$el, 'hidden', preventBackgroundScroll());
|
|
3849
3790
|
}
|
|
3850
3791
|
|
|
3851
3792
|
if (this.stack) {
|
|
@@ -3927,10 +3868,6 @@
|
|
|
3927
3868
|
active$1.splice(active$1.indexOf(this), 1);
|
|
3928
3869
|
}
|
|
3929
3870
|
|
|
3930
|
-
if (!active$1.length) {
|
|
3931
|
-
css(document.body, 'overflowY', '');
|
|
3932
|
-
}
|
|
3933
|
-
|
|
3934
3871
|
css(this.$el, 'zIndex', '');
|
|
3935
3872
|
|
|
3936
3873
|
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
@@ -4047,7 +3984,12 @@
|
|
|
4047
3984
|
return () => events.forEach((fn) => fn());
|
|
4048
3985
|
}
|
|
4049
3986
|
|
|
3987
|
+
let prevented;
|
|
4050
3988
|
function preventBackgroundScroll() {
|
|
3989
|
+
if (prevented) {
|
|
3990
|
+
return noop;
|
|
3991
|
+
}
|
|
3992
|
+
prevented = true;
|
|
4051
3993
|
const { body, documentElement } = document;
|
|
4052
3994
|
css(body, {
|
|
4053
3995
|
overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
|
|
@@ -4055,6 +3997,7 @@
|
|
|
4055
3997
|
|
|
4056
3998
|
css(documentElement, 'overflowY', 'hidden');
|
|
4057
3999
|
return () => {
|
|
4000
|
+
prevented = false;
|
|
4058
4001
|
css(documentElement, 'overflowY', '');
|
|
4059
4002
|
css(body, { overflowY: '', touchAction: '' });
|
|
4060
4003
|
};
|
|
@@ -4081,7 +4024,10 @@
|
|
|
4081
4024
|
mode: 'list',
|
|
4082
4025
|
toggle: Boolean,
|
|
4083
4026
|
boundary: Boolean,
|
|
4084
|
-
|
|
4027
|
+
target: Boolean,
|
|
4028
|
+
targetX: Boolean,
|
|
4029
|
+
targetY: Boolean,
|
|
4030
|
+
stretch: Boolean,
|
|
4085
4031
|
delayShow: Number,
|
|
4086
4032
|
delayHide: Number,
|
|
4087
4033
|
display: String,
|
|
@@ -4093,17 +4039,32 @@
|
|
|
4093
4039
|
data: {
|
|
4094
4040
|
mode: ['click', 'hover'],
|
|
4095
4041
|
toggle: '- *',
|
|
4096
|
-
boundary:
|
|
4097
|
-
|
|
4042
|
+
boundary: false,
|
|
4043
|
+
target: false,
|
|
4044
|
+
targetX: false,
|
|
4045
|
+
targetY: false,
|
|
4046
|
+
stretch: false,
|
|
4098
4047
|
delayShow: 0,
|
|
4099
4048
|
delayHide: 800,
|
|
4100
4049
|
display: null,
|
|
4101
4050
|
clsDrop: false,
|
|
4051
|
+
animateOut: false,
|
|
4052
|
+
bgScroll: true,
|
|
4102
4053
|
animation: ['uk-animation-fade'],
|
|
4103
4054
|
cls: 'uk-open',
|
|
4104
|
-
container: false,
|
|
4105
|
-
|
|
4106
|
-
|
|
4055
|
+
container: false },
|
|
4056
|
+
|
|
4057
|
+
|
|
4058
|
+
computed: {
|
|
4059
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4060
|
+
targetX = targetX || target || this.targetEl;
|
|
4061
|
+
targetY = targetY || target || this.targetEl;
|
|
4062
|
+
|
|
4063
|
+
return [
|
|
4064
|
+
targetX === true ? window : query(targetX, $el),
|
|
4065
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4066
|
+
|
|
4067
|
+
} },
|
|
4107
4068
|
|
|
4108
4069
|
|
|
4109
4070
|
created() {
|
|
@@ -4117,13 +4078,13 @@
|
|
|
4117
4078
|
connected() {
|
|
4118
4079
|
addClass(this.$el, this.clsDrop);
|
|
4119
4080
|
|
|
4120
|
-
if (this.toggle && !this.
|
|
4121
|
-
this.
|
|
4081
|
+
if (this.toggle && !this.targetEl) {
|
|
4082
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4122
4083
|
target: this.$el,
|
|
4123
4084
|
mode: this.mode }).
|
|
4124
4085
|
$el;
|
|
4125
|
-
attr(this.
|
|
4126
|
-
this.lazyload(this.
|
|
4086
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4087
|
+
this.lazyload(this.targetEl);
|
|
4127
4088
|
}
|
|
4128
4089
|
},
|
|
4129
4090
|
|
|
@@ -4154,7 +4115,7 @@
|
|
|
4154
4115
|
return 'a[href^="#"]';
|
|
4155
4116
|
},
|
|
4156
4117
|
|
|
4157
|
-
handler(
|
|
4118
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4158
4119
|
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4159
4120
|
this.hide(false);
|
|
4160
4121
|
}
|
|
@@ -4266,17 +4227,17 @@
|
|
|
4266
4227
|
on(
|
|
4267
4228
|
document,
|
|
4268
4229
|
pointerDown,
|
|
4269
|
-
(
|
|
4230
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4270
4231
|
!within(target, this.$el) &&
|
|
4271
4232
|
once(
|
|
4272
4233
|
document,
|
|
4273
4234
|
pointerUp + " " + pointerCancel + " scroll",
|
|
4274
|
-
(
|
|
4235
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4275
4236
|
if (
|
|
4276
4237
|
!defaultPrevented &&
|
|
4277
4238
|
type === pointerUp &&
|
|
4278
4239
|
target === newTarget &&
|
|
4279
|
-
!(this.
|
|
4240
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4280
4241
|
{
|
|
4281
4242
|
this.hide(false);
|
|
4282
4243
|
}
|
|
@@ -4295,13 +4256,13 @@
|
|
|
4295
4256
|
[] :
|
|
4296
4257
|
[preventOverscroll(this.$el), preventBackgroundScroll()]),
|
|
4297
4258
|
|
|
4298
|
-
...(this.display === 'static'
|
|
4259
|
+
...(this.display === 'static' ?
|
|
4299
4260
|
[] :
|
|
4300
4261
|
(() => {
|
|
4301
4262
|
const handler = () => this.$emit();
|
|
4302
4263
|
return [
|
|
4303
4264
|
on(window, 'resize', handler),
|
|
4304
|
-
on(document, 'scroll', handler
|
|
4265
|
+
on([document, scrollParents(this.$el)], 'scroll', handler),
|
|
4305
4266
|
(() => {
|
|
4306
4267
|
const observer = observeResize(
|
|
4307
4268
|
scrollParents(this.$el),
|
|
@@ -4330,7 +4291,7 @@
|
|
|
4330
4291
|
{
|
|
4331
4292
|
name: 'hide',
|
|
4332
4293
|
|
|
4333
|
-
handler(
|
|
4294
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4334
4295
|
if (this.$el !== target) {
|
|
4335
4296
|
active =
|
|
4336
4297
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4354,12 +4315,12 @@
|
|
|
4354
4315
|
|
|
4355
4316
|
|
|
4356
4317
|
methods: {
|
|
4357
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4358
|
-
if (this.isToggled() && target && this.
|
|
4318
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4319
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4359
4320
|
this.hide(false, false);
|
|
4360
4321
|
}
|
|
4361
4322
|
|
|
4362
|
-
this.
|
|
4323
|
+
this.targetEl = target;
|
|
4363
4324
|
|
|
4364
4325
|
this.clearTimers();
|
|
4365
4326
|
|
|
@@ -4422,60 +4383,72 @@
|
|
|
4422
4383
|
|
|
4423
4384
|
position() {
|
|
4424
4385
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4425
|
-
|
|
4426
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4386
|
+
css(this.$el, { maxWidth: '', top: '', left: '' });
|
|
4427
4387
|
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
const [scrollParent] = scrollParents(
|
|
4431
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4388
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4389
|
+
this.$el.hidden = true;
|
|
4432
4390
|
|
|
4433
|
-
const
|
|
4434
|
-
const boundaryOffset = boundary
|
|
4391
|
+
const boundary = query(this.boundary, this.$el);
|
|
4392
|
+
const boundaryOffset = offsetViewport(boundary || window);
|
|
4393
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4435
4394
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4436
4395
|
|
|
4437
|
-
|
|
4438
|
-
|
|
4396
|
+
const dirs = [
|
|
4397
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4398
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4439
4399
|
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
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) {
|
|
4400
|
+
|
|
4401
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4402
|
+
if (includes([axis, true], this.stretch)) {
|
|
4403
|
+
css(this.$el, {
|
|
4404
|
+
[prop]:
|
|
4405
|
+
this.axis === axis ?
|
|
4406
|
+
'' // Reset prop in main axis before positioning to not cause the drop to flip prematurely
|
|
4407
|
+
: Math.min(
|
|
4408
|
+
boundaryOffset[prop],
|
|
4409
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4410
|
+
|
|
4411
|
+
["overflow-" + axis]: 'auto' });
|
|
4412
|
+
|
|
4413
|
+
}
|
|
4414
|
+
}
|
|
4415
|
+
|
|
4416
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4417
|
+
|
|
4418
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4473
4419
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4474
4420
|
}
|
|
4475
4421
|
|
|
4476
4422
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4477
4423
|
|
|
4478
|
-
this
|
|
4424
|
+
this.$el.hidden = false;
|
|
4425
|
+
|
|
4426
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4427
|
+
|
|
4428
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4429
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4430
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4431
|
+
const targetOffset = offset(this.target[i]);
|
|
4432
|
+
const elOffset = offset(this.$el);
|
|
4433
|
+
|
|
4434
|
+
css(this.$el, {
|
|
4435
|
+
[prop]:
|
|
4436
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4437
|
+
targetOffset[start] -
|
|
4438
|
+
Math.max(
|
|
4439
|
+
boundaryOffset[start],
|
|
4440
|
+
viewports[i][start] + viewportOffset) :
|
|
4441
|
+
|
|
4442
|
+
Math.min(
|
|
4443
|
+
boundaryOffset[end],
|
|
4444
|
+
viewports[i][end] - viewportOffset) -
|
|
4445
|
+
targetOffset[end]) - positionOffset,
|
|
4446
|
+
["overflow-" + axis]: 'auto' });
|
|
4447
|
+
|
|
4448
|
+
|
|
4449
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4450
|
+
}
|
|
4451
|
+
}
|
|
4479
4452
|
} } };
|
|
4480
4453
|
|
|
4481
4454
|
|
|
@@ -4972,8 +4945,11 @@
|
|
|
4972
4945
|
let minHeight = '';
|
|
4973
4946
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4974
4947
|
|
|
4948
|
+
const { body, scrollingElement } = document;
|
|
4975
4949
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4976
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4950
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4951
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4952
|
+
|
|
4977
4953
|
|
|
4978
4954
|
if (this.expand) {
|
|
4979
4955
|
minHeight = Math.max(
|
|
@@ -4983,14 +4959,19 @@
|
|
|
4983
4959
|
0);
|
|
4984
4960
|
|
|
4985
4961
|
} else {
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
|
|
4962
|
+
const isScrollingElement =
|
|
4963
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
4989
4964
|
|
|
4965
|
+
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4966
|
+
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
4990
4967
|
|
|
4991
4968
|
if (this.offsetTop) {
|
|
4992
|
-
|
|
4993
|
-
|
|
4969
|
+
if (isScrollingElement) {
|
|
4970
|
+
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4971
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4972
|
+
} else {
|
|
4973
|
+
minHeight += " - " + css(scrollElement, 'paddingTop');
|
|
4974
|
+
}
|
|
4994
4975
|
}
|
|
4995
4976
|
|
|
4996
4977
|
if (this.offsetBottom === true) {
|
|
@@ -5233,7 +5214,13 @@
|
|
|
5233
5214
|
|
|
5234
5215
|
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
5216
|
|
|
5236
|
-
var
|
|
5217
|
+
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>";
|
|
5218
|
+
|
|
5219
|
+
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>";
|
|
5220
|
+
|
|
5221
|
+
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>";
|
|
5222
|
+
|
|
5223
|
+
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
5224
|
|
|
5238
5225
|
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
5226
|
|
|
@@ -5265,6 +5252,9 @@
|
|
|
5265
5252
|
marker,
|
|
5266
5253
|
'close-icon': closeIcon,
|
|
5267
5254
|
'close-large': closeLarge,
|
|
5255
|
+
'nav-parent-icon': navParentIcon,
|
|
5256
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5257
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
5268
5258
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
5269
5259
|
'overlay-icon': overlayIcon,
|
|
5270
5260
|
'pagination-next': paginationNext,
|
|
@@ -5322,6 +5312,15 @@
|
|
|
5322
5312
|
} };
|
|
5323
5313
|
|
|
5324
5314
|
|
|
5315
|
+
const NavParentIcon = {
|
|
5316
|
+
extends: IconComponent,
|
|
5317
|
+
|
|
5318
|
+
beforeConnect() {
|
|
5319
|
+
const icon = this.$props.icon;
|
|
5320
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5321
|
+
} };
|
|
5322
|
+
|
|
5323
|
+
|
|
5325
5324
|
const Slidenav = {
|
|
5326
5325
|
extends: IconComponent,
|
|
5327
5326
|
|
|
@@ -5582,7 +5581,7 @@
|
|
|
5582
5581
|
|
|
5583
5582
|
|
|
5584
5583
|
connected() {
|
|
5585
|
-
const media = toMedia(this.media);
|
|
5584
|
+
const media = toMedia(this.media, this.$el);
|
|
5586
5585
|
this.matchMedia = true;
|
|
5587
5586
|
if (media) {
|
|
5588
5587
|
this.mediaObj = window.matchMedia(media);
|
|
@@ -5603,11 +5602,10 @@
|
|
|
5603
5602
|
} };
|
|
5604
5603
|
|
|
5605
5604
|
|
|
5606
|
-
function toMedia(value) {
|
|
5605
|
+
function toMedia(value, element) {
|
|
5607
5606
|
if (isString(value)) {
|
|
5608
5607
|
if (startsWith(value, '@')) {
|
|
5609
|
-
|
|
5610
|
-
value = toFloat(getCssVar(name));
|
|
5608
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5611
5609
|
} else if (isNaN(value)) {
|
|
5612
5610
|
return value;
|
|
5613
5611
|
}
|
|
@@ -5632,7 +5630,7 @@
|
|
|
5632
5630
|
|
|
5633
5631
|
computed: {
|
|
5634
5632
|
fill(_ref) {let { fill } = _ref;
|
|
5635
|
-
return fill ||
|
|
5633
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5636
5634
|
} },
|
|
5637
5635
|
|
|
5638
5636
|
|
|
@@ -5824,7 +5822,7 @@
|
|
|
5824
5822
|
align: String,
|
|
5825
5823
|
offset: Number,
|
|
5826
5824
|
boundary: Boolean,
|
|
5827
|
-
|
|
5825
|
+
target: Boolean,
|
|
5828
5826
|
clsDrop: String,
|
|
5829
5827
|
delayShow: Number,
|
|
5830
5828
|
delayHide: Number,
|
|
@@ -5841,9 +5839,12 @@
|
|
|
5841
5839
|
offset: undefined,
|
|
5842
5840
|
delayShow: undefined,
|
|
5843
5841
|
delayHide: undefined,
|
|
5844
|
-
|
|
5845
|
-
|
|
5842
|
+
flip: false,
|
|
5843
|
+
shift: true,
|
|
5846
5844
|
boundary: true,
|
|
5845
|
+
target: false,
|
|
5846
|
+
targetX: false,
|
|
5847
|
+
targetY: false,
|
|
5847
5848
|
dropbar: false,
|
|
5848
5849
|
dropbarAnchor: false,
|
|
5849
5850
|
duration: 200,
|
|
@@ -5878,7 +5879,7 @@
|
|
|
5878
5879
|
},
|
|
5879
5880
|
|
|
5880
5881
|
watch(dropbar) {
|
|
5881
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5882
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5882
5883
|
},
|
|
5883
5884
|
|
|
5884
5885
|
immediate: true },
|
|
@@ -5894,7 +5895,7 @@
|
|
|
5894
5895
|
|
|
5895
5896
|
if (this.dropContainer !== $el) {
|
|
5896
5897
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5897
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5898
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5898
5899
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5899
5900
|
dropdowns.push(el);
|
|
5900
5901
|
}
|
|
@@ -5911,8 +5912,7 @@
|
|
|
5911
5912
|
{
|
|
5912
5913
|
...this.$props,
|
|
5913
5914
|
boundary: this.boundary,
|
|
5914
|
-
pos: this.pos
|
|
5915
|
-
offset: this.dropbar || this.offset });
|
|
5915
|
+
pos: this.pos });
|
|
5916
5916
|
|
|
5917
5917
|
|
|
5918
5918
|
},
|
|
@@ -5957,8 +5957,8 @@
|
|
|
5957
5957
|
if (
|
|
5958
5958
|
active &&
|
|
5959
5959
|
includes(active.mode, 'hover') &&
|
|
5960
|
-
active.
|
|
5961
|
-
!within(active.
|
|
5960
|
+
active.targetEl &&
|
|
5961
|
+
!within(active.targetEl, current) &&
|
|
5962
5962
|
!active.isDelaying)
|
|
5963
5963
|
{
|
|
5964
5964
|
active.hide(false);
|
|
@@ -5980,7 +5980,7 @@
|
|
|
5980
5980
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5981
5981
|
e.preventDefault();
|
|
5982
5982
|
|
|
5983
|
-
if (!active || active.
|
|
5983
|
+
if (!active || active.targetEl !== current) {
|
|
5984
5984
|
current.click();
|
|
5985
5985
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5986
5986
|
focusFirstFocusableElement(target));});
|
|
@@ -6030,8 +6030,8 @@
|
|
|
6030
6030
|
}
|
|
6031
6031
|
}
|
|
6032
6032
|
|
|
6033
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
6034
|
-
active == null ? void 0 : (_active$
|
|
6033
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6034
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
6035
6035
|
}
|
|
6036
6036
|
|
|
6037
6037
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -6073,8 +6073,8 @@
|
|
|
6073
6073
|
return this.dropbar;
|
|
6074
6074
|
},
|
|
6075
6075
|
|
|
6076
|
-
handler(
|
|
6077
|
-
if (!
|
|
6076
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6077
|
+
if (!this.isDropbarDrop(target)) {
|
|
6078
6078
|
return;
|
|
6079
6079
|
}
|
|
6080
6080
|
|
|
@@ -6082,7 +6082,7 @@
|
|
|
6082
6082
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
6083
6083
|
}
|
|
6084
6084
|
|
|
6085
|
-
addClass(
|
|
6085
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
6086
6086
|
} },
|
|
6087
6087
|
|
|
6088
6088
|
|
|
@@ -6097,19 +6097,24 @@
|
|
|
6097
6097
|
return this.dropbar;
|
|
6098
6098
|
},
|
|
6099
6099
|
|
|
6100
|
-
handler(
|
|
6101
|
-
if (!
|
|
6100
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6101
|
+
if (!this.isDropbarDrop(target)) {
|
|
6102
6102
|
return;
|
|
6103
6103
|
}
|
|
6104
6104
|
|
|
6105
|
-
this._observer = observeResize(
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6105
|
+
this._observer = observeResize(target, () => {
|
|
6106
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6107
|
+
concat(target).
|
|
6108
|
+
map((el) => offset(el));
|
|
6109
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6110
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6111
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6112
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6113
|
+
this.transitionTo(
|
|
6114
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6115
|
+
target);
|
|
6112
6116
|
|
|
6117
|
+
});
|
|
6113
6118
|
} },
|
|
6114
6119
|
|
|
6115
6120
|
|
|
@@ -6124,13 +6129,13 @@
|
|
|
6124
6129
|
return this.dropbar;
|
|
6125
6130
|
},
|
|
6126
6131
|
|
|
6127
|
-
handler(e
|
|
6132
|
+
handler(e) {
|
|
6128
6133
|
const active = this.getActive();
|
|
6129
6134
|
|
|
6130
6135
|
if (
|
|
6131
6136
|
matches(this.dropbar, ':hover') &&
|
|
6132
|
-
(active == null ? void 0 : active.$el) ===
|
|
6133
|
-
!this.toggles.some((el) => active.
|
|
6137
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6138
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6134
6139
|
{
|
|
6135
6140
|
e.preventDefault();
|
|
6136
6141
|
}
|
|
@@ -6148,8 +6153,8 @@
|
|
|
6148
6153
|
return this.dropbar;
|
|
6149
6154
|
},
|
|
6150
6155
|
|
|
6151
|
-
handler(
|
|
6152
|
-
if (!
|
|
6156
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6157
|
+
if (!this.isDropbarDrop(target)) {
|
|
6153
6158
|
return;
|
|
6154
6159
|
}
|
|
6155
6160
|
|
|
@@ -6157,7 +6162,7 @@
|
|
|
6157
6162
|
|
|
6158
6163
|
const active = this.getActive();
|
|
6159
6164
|
|
|
6160
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6165
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6161
6166
|
this.transitionTo(0);
|
|
6162
6167
|
}
|
|
6163
6168
|
} }],
|
|
@@ -6166,7 +6171,7 @@
|
|
|
6166
6171
|
|
|
6167
6172
|
methods: {
|
|
6168
6173
|
getActive() {
|
|
6169
|
-
return active && within(active.
|
|
6174
|
+
return active && within(active.targetEl, this.$el) && active;
|
|
6170
6175
|
},
|
|
6171
6176
|
|
|
6172
6177
|
transitionTo(newHeight, el) {
|
|
@@ -6196,13 +6201,17 @@
|
|
|
6196
6201
|
|
|
6197
6202
|
getDropdown(el) {
|
|
6198
6203
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6204
|
+
},
|
|
6205
|
+
|
|
6206
|
+
isDropbarDrop(el) {
|
|
6207
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6199
6208
|
} } };
|
|
6200
6209
|
|
|
6201
6210
|
|
|
6202
6211
|
|
|
6203
6212
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6204
6213
|
const { current, keyCode } = e;
|
|
6205
|
-
const target = (active == null ? void 0 : active.
|
|
6214
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6206
6215
|
const i = toggles.indexOf(target);
|
|
6207
6216
|
|
|
6208
6217
|
// Left
|
|
@@ -6570,6 +6579,14 @@
|
|
|
6570
6579
|
offset: 0 },
|
|
6571
6580
|
|
|
6572
6581
|
|
|
6582
|
+
connected() {
|
|
6583
|
+
registerClick(this);
|
|
6584
|
+
},
|
|
6585
|
+
|
|
6586
|
+
disconnected() {
|
|
6587
|
+
unregisterClick(this);
|
|
6588
|
+
},
|
|
6589
|
+
|
|
6573
6590
|
methods: {
|
|
6574
6591
|
async scrollTo(el) {
|
|
6575
6592
|
el = el && $(el) || document.body;
|
|
@@ -6578,20 +6595,39 @@
|
|
|
6578
6595
|
await scrollIntoView(el, { offset: this.offset });
|
|
6579
6596
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6580
6597
|
}
|
|
6581
|
-
} }
|
|
6598
|
+
} } };
|
|
6582
6599
|
|
|
6583
6600
|
|
|
6584
|
-
events: {
|
|
6585
|
-
click(e) {
|
|
6586
|
-
if (e.defaultPrevented) {
|
|
6587
|
-
return;
|
|
6588
|
-
}
|
|
6589
6601
|
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6602
|
+
const components$1 = new Set();
|
|
6603
|
+
function registerClick(cmp) {
|
|
6604
|
+
if (!components$1.size) {
|
|
6605
|
+
on(document, 'click', clickHandler);
|
|
6606
|
+
}
|
|
6593
6607
|
|
|
6608
|
+
components$1.add(cmp);
|
|
6609
|
+
}
|
|
6594
6610
|
|
|
6611
|
+
function unregisterClick(cmp) {
|
|
6612
|
+
components$1.delete(cmp);
|
|
6613
|
+
|
|
6614
|
+
if (!components$1.length) {
|
|
6615
|
+
off(document, 'click', clickHandler);
|
|
6616
|
+
}
|
|
6617
|
+
}
|
|
6618
|
+
|
|
6619
|
+
function clickHandler(e) {
|
|
6620
|
+
if (e.defaultPrevented) {
|
|
6621
|
+
return;
|
|
6622
|
+
}
|
|
6623
|
+
|
|
6624
|
+
for (const component of components$1) {
|
|
6625
|
+
if (within(e.target, component.$el)) {
|
|
6626
|
+
e.preventDefault();
|
|
6627
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6628
|
+
}
|
|
6629
|
+
}
|
|
6630
|
+
}
|
|
6595
6631
|
|
|
6596
6632
|
function getTargetElement(el) {
|
|
6597
6633
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -6921,7 +6957,9 @@
|
|
|
6921
6957
|
},
|
|
6922
6958
|
|
|
6923
6959
|
handler() {
|
|
6924
|
-
|
|
6960
|
+
const { scrollingElement } = document;
|
|
6961
|
+
|
|
6962
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6925
6963
|
return;
|
|
6926
6964
|
}
|
|
6927
6965
|
|
|
@@ -6930,13 +6968,11 @@
|
|
|
6930
6968
|
const elOffset = offset(this.$el);
|
|
6931
6969
|
|
|
6932
6970
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6933
|
-
scrollTop
|
|
6934
|
-
window,
|
|
6971
|
+
scrollingElement.scrollTop =
|
|
6935
6972
|
targetOffset.top -
|
|
6936
6973
|
elOffset.height -
|
|
6937
6974
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6938
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6939
|
-
|
|
6975
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6940
6976
|
}
|
|
6941
6977
|
});
|
|
6942
6978
|
} }],
|
|
@@ -7034,7 +7070,7 @@
|
|
|
7034
7070
|
|
|
7035
7071
|
|
|
7036
7072
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
7037
|
-
const scroll = scrollTop
|
|
7073
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
7038
7074
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
7039
7075
|
|
|
7040
7076
|
return {
|
|
@@ -7660,10 +7696,12 @@
|
|
|
7660
7696
|
Video: Video,
|
|
7661
7697
|
Close: Close,
|
|
7662
7698
|
Spinner: Spinner,
|
|
7699
|
+
NavParentIcon: NavParentIcon,
|
|
7663
7700
|
SlidenavNext: Slidenav,
|
|
7664
7701
|
SlidenavPrevious: Slidenav,
|
|
7665
7702
|
SearchIcon: Search,
|
|
7666
7703
|
Marker: IconComponent,
|
|
7704
|
+
NavbarParentIcon: IconComponent,
|
|
7667
7705
|
NavbarToggleIcon: IconComponent,
|
|
7668
7706
|
OverlayIcon: IconComponent,
|
|
7669
7707
|
PaginationNext: IconComponent,
|