uikit 3.14.4-dev.871ba3c05 → 3.14.4-dev.8a6d8c5ed
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -11
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +385 -110
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +385 -110
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +402 -115
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +402 -115
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +7 -5
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +196 -140
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +196 -140
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +4 -5
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +4 -5
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +22 -7
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +4 -5
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +22 -7
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +3 -3
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +107 -137
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +1825 -1723
- 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 +1060 -941
- package/dist/js/uikit.min.js +14 -1
- package/package.json +1 -1
- package/src/images/{backgrounds/nav-parent-open.svg → components/nav-parent-icon-large.svg} +0 -0
- package/src/images/components/nav-parent-icon.svg +3 -0
- package/src/images/components/navbar-parent-icon.svg +3 -0
- package/src/images/components/navbar-toggle-icon.svg +22 -3
- package/src/js/api/state.js +2 -2
- package/src/js/components/filter.js +5 -3
- package/src/js/components/sortable.js +2 -3
- package/src/js/core/accordion.js +9 -17
- package/src/js/core/alert.js +35 -14
- package/src/js/core/drop.js +95 -61
- package/src/js/core/height-viewport.js +14 -6
- package/src/js/core/icon.js +16 -0
- package/src/js/core/index.js +2 -0
- package/src/js/core/leader.js +2 -2
- package/src/js/core/navbar.js +44 -30
- package/src/js/core/offcanvas.js +1 -47
- package/src/js/core/scroll.js +37 -10
- package/src/js/core/sticky.js +8 -9
- package/src/js/core/toggle.js +3 -5
- package/src/js/mixin/media.js +4 -5
- package/src/js/mixin/modal.js +97 -8
- package/src/js/mixin/position.js +26 -11
- package/src/js/mixin/slider-drag.js +20 -8
- package/src/js/mixin/style.js +11 -0
- package/src/js/mixin/togglable.js +88 -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 +81 -38
- package/src/less/components/utility.less +21 -4
- package/src/less/theme/_import.less +1 -0
- package/src/less/theme/dropbar.less +44 -0
- package/src/less/theme/dropdown.less +0 -11
- package/src/less/theme/nav.less +43 -9
- package/src/less/theme/navbar.less +7 -11
- package/src/scss/components/_import.scss +1 -0
- package/src/scss/components/drop.scss +1 -18
- package/src/scss/components/dropbar.scss +115 -0
- package/src/scss/components/dropdown.scss +16 -16
- package/src/scss/components/leader.scss +1 -1
- package/src/scss/components/nav.scss +189 -51
- package/src/scss/components/navbar.scss +69 -38
- package/src/scss/components/utility.scss +19 -3
- package/src/scss/mixins-theme.scss +93 -25
- package/src/scss/mixins.scss +89 -17
- package/src/scss/theme/_import.scss +1 -0
- package/src/scss/theme/dropbar.scss +44 -0
- package/src/scss/theme/dropdown.scss +0 -8
- package/src/scss/theme/nav.scss +41 -9
- package/src/scss/theme/navbar.scss +7 -8
- package/src/scss/variables-theme.scss +71 -18
- package/src/scss/variables.scss +60 -14
- package/tests/accordion.html +2 -2
- package/tests/alert.html +2 -2
- package/tests/countdown.html +1 -1
- package/tests/drop.html +457 -371
- package/tests/dropbar.html +456 -0
- package/tests/dropdown.html +26 -401
- package/tests/filter.html +9 -12
- package/tests/form.html +1 -1
- package/tests/index.html +126 -107
- package/tests/js/index.js +1 -4
- package/tests/lightbox.html +5 -5
- package/tests/list.html +8 -8
- package/tests/modal.html +13 -13
- package/tests/nav.html +117 -75
- package/tests/navbar.html +2002 -1131
- package/tests/offcanvas.html +17 -21
- package/tests/parallax.html +1 -1
- package/tests/position.html +18 -16
- package/tests/progress.html +9 -9
- package/tests/scroll.html +7 -10
- package/tests/search.html +5 -5
- package/tests/slider.html +6 -5
- package/tests/slideshow.html +8 -8
- package/tests/sortable.html +6 -8
- package/tests/sticky-navbar.html +6 -6
- package/tests/sticky.html +8 -8
- package/tests/switcher.html +1 -1
- package/tests/tab.html +1 -1
- package/tests/table.html +7 -7
- package/tests/toggle.html +2 -2
- package/tests/tooltip.html +1 -1
- package/tests/upload.html +11 -11
- package/tests/utility.html +19 -0
- package/src/images/backgrounds/nav-parent-close.svg +0 -3
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.8a6d8c5ed | 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];
|
|
@@ -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;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
function flipOffset(offset, i) {
|
|
2120
|
+
offset = [...offset];
|
|
2121
|
+
offset[i] *= -1;
|
|
2122
|
+
return offset;
|
|
2151
2123
|
}
|
|
2152
2124
|
|
|
2153
|
-
function
|
|
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,
|
|
@@ -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.8a6d8c5ed';
|
|
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,105 @@
|
|
|
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(cmp);
|
|
3199
|
-
}
|
|
3200
|
-
|
|
3201
|
-
function slide(_ref4)
|
|
3202
|
-
|
|
3141
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3142
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3203
3143
|
|
|
3144
|
+
const dirs = [
|
|
3145
|
+
['left', 'right'],
|
|
3146
|
+
['top', 'bottom']];
|
|
3204
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;
|
|
3205
3154
|
|
|
3155
|
+
return async (el, show) => {
|
|
3156
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3206
3157
|
|
|
3158
|
+
let currentDim = dimensions(el)[dimProp];
|
|
3207
3159
|
|
|
3208
|
-
|
|
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;
|
|
3220
|
-
|
|
3221
|
-
Transition.cancel(el);
|
|
3161
|
+
await Transition.cancel(el);
|
|
3222
3162
|
|
|
3223
|
-
if (
|
|
3163
|
+
if (show) {
|
|
3224
3164
|
_toggle(el, true);
|
|
3225
3165
|
}
|
|
3226
3166
|
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
el
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
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);
|
|
3167
|
+
const prevProps = Object.fromEntries(
|
|
3168
|
+
[
|
|
3169
|
+
'padding',
|
|
3170
|
+
'border',
|
|
3171
|
+
'width',
|
|
3172
|
+
'height',
|
|
3173
|
+
'overflowY',
|
|
3174
|
+
'overflowX',
|
|
3175
|
+
marginProp,
|
|
3176
|
+
marginStartProp].
|
|
3177
|
+
map((key) => [key, el.style[key]]));
|
|
3178
|
+
|
|
3179
|
+
|
|
3180
|
+
const dim = dimensions(el);
|
|
3181
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3182
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3183
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3184
|
+
|
|
3185
|
+
if (!inProgress && !show) {
|
|
3186
|
+
currentDim += marginStart;
|
|
3267
3187
|
}
|
|
3268
3188
|
|
|
3269
|
-
const
|
|
3270
|
-
|
|
3189
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3190
|
+
css(wrapper, {
|
|
3191
|
+
boxSizing: 'border-box',
|
|
3192
|
+
height: dim.height,
|
|
3193
|
+
width: dim.width,
|
|
3194
|
+
...css(el, [
|
|
3195
|
+
'overflow',
|
|
3196
|
+
'padding',
|
|
3197
|
+
'borderTop',
|
|
3198
|
+
'borderRight',
|
|
3199
|
+
'borderBottom',
|
|
3200
|
+
'borderLeft',
|
|
3201
|
+
'borderImage',
|
|
3202
|
+
marginStartProp]) });
|
|
3271
3203
|
|
|
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
3204
|
|
|
3278
|
-
css(el, {
|
|
3279
|
-
clipPath: useClipPath ?
|
|
3280
|
-
right ? "polygon(0 0," +
|
|
3281
|
-
percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
|
|
3282
|
-
100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)" :
|
|
3283
|
-
'',
|
|
3284
|
-
marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
|
|
3285
3205
|
|
|
3206
|
+
css(el, {
|
|
3207
|
+
padding: 0,
|
|
3208
|
+
border: 0,
|
|
3209
|
+
[marginStartProp]: 0,
|
|
3210
|
+
width: dim.width,
|
|
3211
|
+
height: dim.height,
|
|
3212
|
+
overflow: 'hidden',
|
|
3213
|
+
[dimProp]: currentDim });
|
|
3286
3214
|
|
|
3287
|
-
return (
|
|
3288
|
-
show ?
|
|
3289
|
-
Transition.start(
|
|
3290
|
-
el,
|
|
3291
|
-
{
|
|
3292
|
-
clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
|
|
3293
|
-
marginLeft: 0 },
|
|
3294
3215
|
|
|
3295
|
-
|
|
3296
|
-
|
|
3216
|
+
const percent = currentDim / endDim;
|
|
3217
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3218
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3297
3219
|
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
3220
|
+
if (end) {
|
|
3221
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3222
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3223
|
+
}
|
|
3303
3224
|
|
|
3225
|
+
if (!end ^ mode === 'reveal') {
|
|
3226
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3227
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3228
|
+
}
|
|
3304
3229
|
|
|
3305
|
-
|
|
3306
|
-
|
|
3230
|
+
try {
|
|
3231
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3232
|
+
} finally {
|
|
3233
|
+
css(el, prevProps);
|
|
3234
|
+
unwrap(wrapper.firstChild);
|
|
3307
3235
|
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
css(scrollElement, 'overflowX', '');
|
|
3313
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3314
|
-
});
|
|
3236
|
+
if (!show) {
|
|
3237
|
+
_toggle(el, false);
|
|
3238
|
+
}
|
|
3239
|
+
}
|
|
3315
3240
|
};
|
|
3316
3241
|
}
|
|
3317
3242
|
|
|
@@ -3336,6 +3261,7 @@
|
|
|
3336
3261
|
mixins: [Class, Lazyload, Togglable],
|
|
3337
3262
|
|
|
3338
3263
|
props: {
|
|
3264
|
+
animation: Boolean,
|
|
3339
3265
|
targets: String,
|
|
3340
3266
|
active: null,
|
|
3341
3267
|
collapsible: Boolean,
|
|
@@ -3348,7 +3274,7 @@
|
|
|
3348
3274
|
data: {
|
|
3349
3275
|
targets: '> *',
|
|
3350
3276
|
active: false,
|
|
3351
|
-
animation:
|
|
3277
|
+
animation: true,
|
|
3352
3278
|
collapsible: true,
|
|
3353
3279
|
multiple: false,
|
|
3354
3280
|
clsOpen: 'uk-open',
|
|
@@ -3394,7 +3320,7 @@
|
|
|
3394
3320
|
hide(
|
|
3395
3321
|
el,
|
|
3396
3322
|
!hasClass(
|
|
3397
|
-
this.items.find((item) =>
|
|
3323
|
+
this.items.find((item) => within(el, item)),
|
|
3398
3324
|
this.clsOpen));
|
|
3399
3325
|
|
|
3400
3326
|
|
|
@@ -3446,23 +3372,15 @@
|
|
|
3446
3372
|
toggleClass(el, this.clsOpen, show);
|
|
3447
3373
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3448
3374
|
|
|
3449
|
-
const content = $(
|
|
3375
|
+
const content = $(this.content, el);
|
|
3450
3376
|
|
|
3451
|
-
if (animate === false || !this.
|
|
3377
|
+
if (animate === false || !this.animation) {
|
|
3378
|
+
content.hidden = !show;
|
|
3452
3379
|
hide(content, !show);
|
|
3453
3380
|
return;
|
|
3454
3381
|
}
|
|
3455
3382
|
|
|
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);
|
|
3383
|
+
await toggleTransition(this)(content, show);
|
|
3466
3384
|
|
|
3467
3385
|
if (show) {
|
|
3468
3386
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3488,18 +3406,17 @@
|
|
|
3488
3406
|
args: 'animation',
|
|
3489
3407
|
|
|
3490
3408
|
props: {
|
|
3409
|
+
animation: Boolean,
|
|
3491
3410
|
close: String },
|
|
3492
3411
|
|
|
3493
3412
|
|
|
3494
3413
|
data: {
|
|
3495
|
-
animation:
|
|
3414
|
+
animation: true,
|
|
3496
3415
|
selClose: '.uk-alert-close',
|
|
3497
|
-
duration: 150,
|
|
3498
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3416
|
+
duration: 150 },
|
|
3499
3417
|
|
|
3500
3418
|
|
|
3501
|
-
events:
|
|
3502
|
-
{
|
|
3419
|
+
events: {
|
|
3503
3420
|
name: 'click',
|
|
3504
3421
|
|
|
3505
3422
|
delegate() {
|
|
@@ -3509,16 +3426,39 @@
|
|
|
3509
3426
|
handler(e) {
|
|
3510
3427
|
e.preventDefault();
|
|
3511
3428
|
this.close();
|
|
3512
|
-
} }
|
|
3513
|
-
|
|
3429
|
+
} },
|
|
3514
3430
|
|
|
3515
3431
|
|
|
3516
3432
|
methods: {
|
|
3517
3433
|
async close() {
|
|
3518
|
-
await this.toggleElement(this.$el);
|
|
3434
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3519
3435
|
this.$destroy(true);
|
|
3520
3436
|
} } };
|
|
3521
3437
|
|
|
3438
|
+
|
|
3439
|
+
|
|
3440
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3441
|
+
return (el) => {
|
|
3442
|
+
const height = toFloat(css(el, 'height'));
|
|
3443
|
+
css(el, 'height', height);
|
|
3444
|
+
return Transition.start(
|
|
3445
|
+
el,
|
|
3446
|
+
{
|
|
3447
|
+
height: 0,
|
|
3448
|
+
marginTop: 0,
|
|
3449
|
+
marginBottom: 0,
|
|
3450
|
+
paddingTop: 0,
|
|
3451
|
+
paddingBottom: 0,
|
|
3452
|
+
borderTop: 0,
|
|
3453
|
+
borderBottom: 0,
|
|
3454
|
+
opacity: 0 },
|
|
3455
|
+
|
|
3456
|
+
velocity * height + duration,
|
|
3457
|
+
transition);
|
|
3458
|
+
|
|
3459
|
+
};
|
|
3460
|
+
}
|
|
3461
|
+
|
|
3522
3462
|
var Video = {
|
|
3523
3463
|
args: 'autoplay',
|
|
3524
3464
|
|
|
@@ -3667,13 +3607,17 @@
|
|
|
3667
3607
|
props: {
|
|
3668
3608
|
pos: String,
|
|
3669
3609
|
offset: null,
|
|
3670
|
-
flip: Boolean
|
|
3610
|
+
flip: Boolean,
|
|
3611
|
+
shift: Boolean,
|
|
3612
|
+
inset: Boolean },
|
|
3671
3613
|
|
|
3672
3614
|
|
|
3673
3615
|
data: {
|
|
3674
3616
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3617
|
+
offset: false,
|
|
3675
3618
|
flip: true,
|
|
3676
|
-
|
|
3619
|
+
shift: true,
|
|
3620
|
+
inset: false },
|
|
3677
3621
|
|
|
3678
3622
|
|
|
3679
3623
|
connected() {
|
|
@@ -3685,19 +3629,24 @@
|
|
|
3685
3629
|
methods: {
|
|
3686
3630
|
positionAt(element, target, boundary) {
|
|
3687
3631
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3632
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3688
3633
|
|
|
3689
3634
|
const attach = {
|
|
3690
|
-
element: [flipPosition(this.dir), this.align],
|
|
3635
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3691
3636
|
target: [this.dir, this.align] };
|
|
3692
3637
|
|
|
3693
3638
|
|
|
3694
3639
|
if (this.axis === 'y') {
|
|
3695
3640
|
for (const prop in attach) {
|
|
3696
|
-
attach[prop]
|
|
3641
|
+
attach[prop].reverse();
|
|
3697
3642
|
}
|
|
3698
|
-
offset
|
|
3643
|
+
offset.reverse();
|
|
3644
|
+
placement.reverse();
|
|
3699
3645
|
}
|
|
3700
3646
|
|
|
3647
|
+
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
3648
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
3649
|
+
|
|
3701
3650
|
// Ensure none positioned element does not generate scrollbars
|
|
3702
3651
|
const elDim = dimensions(element);
|
|
3703
3652
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
@@ -3706,93 +3655,88 @@
|
|
|
3706
3655
|
attach,
|
|
3707
3656
|
offset,
|
|
3708
3657
|
boundary,
|
|
3709
|
-
|
|
3658
|
+
placement,
|
|
3710
3659
|
viewportOffset: this.getViewportOffset(element) });
|
|
3711
3660
|
|
|
3661
|
+
|
|
3662
|
+
// Restore scroll position
|
|
3663
|
+
scrollElement.scrollTop = scrollTop;
|
|
3664
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
3712
3665
|
},
|
|
3713
3666
|
|
|
3714
3667
|
getPositionOffset(element) {
|
|
3715
3668
|
return (
|
|
3716
3669
|
toPx(
|
|
3717
|
-
this.offset === false ?
|
|
3670
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3718
3671
|
this.axis === 'x' ? 'width' : 'height',
|
|
3719
3672
|
element) * (
|
|
3720
|
-
|
|
3673
|
+
|
|
3674
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3675
|
+
this.inset ? -1 : 1));
|
|
3721
3676
|
|
|
3722
3677
|
},
|
|
3723
3678
|
|
|
3724
3679
|
getShiftOffset(element) {
|
|
3725
|
-
return
|
|
3680
|
+
return this.align === 'center' ?
|
|
3726
3681
|
0 :
|
|
3727
3682
|
toPx(
|
|
3728
|
-
|
|
3683
|
+
css(element, '--uk-position-shift-offset'),
|
|
3729
3684
|
this.axis === 'y' ? 'width' : 'height',
|
|
3730
3685
|
element) * (
|
|
3731
3686
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3732
3687
|
},
|
|
3733
3688
|
|
|
3734
3689
|
getViewportOffset(element) {
|
|
3735
|
-
return toPx(
|
|
3690
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3736
3691
|
} } };
|
|
3737
3692
|
|
|
3738
|
-
|
|
3693
|
+
var Style = {
|
|
3694
|
+
beforeConnect() {
|
|
3695
|
+
this._style = attr(this.$el, 'style');
|
|
3696
|
+
},
|
|
3739
3697
|
|
|
3740
|
-
|
|
3741
|
-
|
|
3698
|
+
disconnected() {
|
|
3699
|
+
attr(this.$el, 'style', this._style);
|
|
3700
|
+
} };
|
|
3742
3701
|
|
|
3743
|
-
|
|
3702
|
+
const active$1 = [];
|
|
3703
|
+
|
|
3704
|
+
var Modal = {
|
|
3705
|
+
mixins: [Class, Container, Togglable],
|
|
3744
3706
|
|
|
3745
3707
|
props: {
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
delayHide: Number,
|
|
3752
|
-
display: String,
|
|
3753
|
-
clsDrop: String,
|
|
3754
|
-
animateOut: Boolean },
|
|
3708
|
+
selPanel: String,
|
|
3709
|
+
selClose: String,
|
|
3710
|
+
escClose: Boolean,
|
|
3711
|
+
bgClose: Boolean,
|
|
3712
|
+
stack: Boolean },
|
|
3755
3713
|
|
|
3756
3714
|
|
|
3757
3715
|
data: {
|
|
3758
|
-
mode: ['click', 'hover'],
|
|
3759
|
-
toggle: '- *',
|
|
3760
|
-
boundary: true,
|
|
3761
|
-
boundaryAlign: false,
|
|
3762
|
-
delayShow: 0,
|
|
3763
|
-
delayHide: 800,
|
|
3764
|
-
display: null,
|
|
3765
|
-
clsDrop: false,
|
|
3766
|
-
animation: ['uk-animation-fade'],
|
|
3767
3716
|
cls: 'uk-open',
|
|
3768
|
-
|
|
3769
|
-
|
|
3717
|
+
escClose: true,
|
|
3718
|
+
bgClose: true,
|
|
3719
|
+
overlay: true,
|
|
3720
|
+
stack: false },
|
|
3770
3721
|
|
|
3771
3722
|
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3723
|
+
computed: {
|
|
3724
|
+
panel(_ref, $el) {let { selPanel } = _ref;
|
|
3725
|
+
return $(selPanel, $el);
|
|
3726
|
+
},
|
|
3775
3727
|
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3728
|
+
transitionElement() {
|
|
3729
|
+
return this.panel;
|
|
3730
|
+
},
|
|
3779
3731
|
|
|
3780
|
-
|
|
3781
|
-
|
|
3732
|
+
bgClose(_ref2) {let { bgClose } = _ref2;
|
|
3733
|
+
return bgClose && this.panel;
|
|
3734
|
+
} },
|
|
3782
3735
|
|
|
3783
|
-
if (this.toggle && !this.target) {
|
|
3784
|
-
this.target = this.$create('toggle', query(this.toggle, this.$el), {
|
|
3785
|
-
target: this.$el,
|
|
3786
|
-
mode: this.mode }).
|
|
3787
|
-
$el;
|
|
3788
|
-
attr(this.target, 'aria-haspopup', true);
|
|
3789
|
-
this.lazyload(this.target);
|
|
3790
|
-
}
|
|
3791
|
-
},
|
|
3792
3736
|
|
|
3793
|
-
|
|
3794
|
-
if (this
|
|
3795
|
-
|
|
3737
|
+
beforeDisconnect() {
|
|
3738
|
+
if (includes(active$1, this)) {
|
|
3739
|
+
this.toggleElement(this.$el, false, false);
|
|
3796
3740
|
}
|
|
3797
3741
|
},
|
|
3798
3742
|
|
|
@@ -3801,1776 +3745,1940 @@
|
|
|
3801
3745
|
name: 'click',
|
|
3802
3746
|
|
|
3803
3747
|
delegate() {
|
|
3804
|
-
return
|
|
3748
|
+
return this.selClose;
|
|
3805
3749
|
},
|
|
3806
3750
|
|
|
3807
3751
|
handler(e) {
|
|
3808
3752
|
e.preventDefault();
|
|
3809
|
-
this.hide(
|
|
3753
|
+
this.hide();
|
|
3810
3754
|
} },
|
|
3811
3755
|
|
|
3812
3756
|
|
|
3813
3757
|
{
|
|
3814
|
-
name: '
|
|
3758
|
+
name: 'toggle',
|
|
3815
3759
|
|
|
3816
|
-
|
|
3817
|
-
return 'a[href^="#"]';
|
|
3818
|
-
},
|
|
3760
|
+
self: true,
|
|
3819
3761
|
|
|
3820
|
-
handler(
|
|
3821
|
-
if (
|
|
3822
|
-
|
|
3762
|
+
handler(e) {
|
|
3763
|
+
if (e.defaultPrevented) {
|
|
3764
|
+
return;
|
|
3823
3765
|
}
|
|
3824
|
-
} },
|
|
3825
3766
|
|
|
3767
|
+
e.preventDefault();
|
|
3826
3768
|
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
handler() {
|
|
3831
|
-
this.hide(false);
|
|
3769
|
+
if (this.isToggled() === includes(active$1, this)) {
|
|
3770
|
+
this.toggle();
|
|
3771
|
+
}
|
|
3832
3772
|
} },
|
|
3833
3773
|
|
|
3834
3774
|
|
|
3835
3775
|
{
|
|
3836
|
-
name: '
|
|
3776
|
+
name: 'beforeshow',
|
|
3837
3777
|
|
|
3838
3778
|
self: true,
|
|
3839
3779
|
|
|
3840
|
-
handler(e
|
|
3841
|
-
|
|
3780
|
+
handler(e) {
|
|
3781
|
+
if (includes(active$1, this)) {
|
|
3782
|
+
return false;
|
|
3783
|
+
}
|
|
3842
3784
|
|
|
3843
|
-
if (this.
|
|
3844
|
-
|
|
3785
|
+
if (!this.stack && active$1.length) {
|
|
3786
|
+
Promise.all(active$1.map((modal) => modal.hide())).then(this.show);
|
|
3787
|
+
e.preventDefault();
|
|
3845
3788
|
} else {
|
|
3846
|
-
|
|
3789
|
+
active$1.push(this);
|
|
3847
3790
|
}
|
|
3848
3791
|
} },
|
|
3849
3792
|
|
|
3850
3793
|
|
|
3851
3794
|
{
|
|
3852
|
-
name: '
|
|
3795
|
+
name: 'show',
|
|
3853
3796
|
|
|
3854
3797
|
self: true,
|
|
3855
3798
|
|
|
3856
|
-
handler(
|
|
3857
|
-
|
|
3858
|
-
this
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
self: true,
|
|
3866
|
-
|
|
3867
|
-
handler(e) {
|
|
3868
|
-
e.preventDefault();
|
|
3869
|
-
if (!matches(this.$el, ':focus,:hover')) {
|
|
3870
|
-
this.hide();
|
|
3871
|
-
}
|
|
3872
|
-
} },
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
{
|
|
3876
|
-
name: pointerEnter + " focusin",
|
|
3877
|
-
|
|
3878
|
-
filter() {
|
|
3879
|
-
return includes(this.mode, 'hover');
|
|
3880
|
-
},
|
|
3881
|
-
|
|
3882
|
-
handler(e) {
|
|
3883
|
-
if (!isTouch(e)) {
|
|
3884
|
-
this.clearTimers();
|
|
3885
|
-
}
|
|
3886
|
-
} },
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
{
|
|
3890
|
-
name: pointerLeave + " focusout",
|
|
3799
|
+
handler() {
|
|
3800
|
+
once(
|
|
3801
|
+
this.$el,
|
|
3802
|
+
'hide',
|
|
3803
|
+
on(document, 'focusin', (e) => {
|
|
3804
|
+
if (last(active$1) === this && !within(e.target, this.$el)) {
|
|
3805
|
+
this.$el.focus();
|
|
3806
|
+
}
|
|
3807
|
+
}));
|
|
3891
3808
|
|
|
3892
|
-
filter() {
|
|
3893
|
-
return includes(this.mode, 'hover');
|
|
3894
|
-
},
|
|
3895
3809
|
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
this
|
|
3810
|
+
if (this.overlay) {
|
|
3811
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3812
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3899
3813
|
}
|
|
3900
|
-
} },
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
{
|
|
3904
|
-
name: 'toggled',
|
|
3905
3814
|
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
handler(e, toggled) {
|
|
3909
|
-
if (!toggled) {
|
|
3910
|
-
return;
|
|
3815
|
+
if (this.stack) {
|
|
3816
|
+
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active$1.length);
|
|
3911
3817
|
}
|
|
3912
3818
|
|
|
3913
|
-
this.
|
|
3914
|
-
this.position();
|
|
3915
|
-
} },
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
{
|
|
3919
|
-
name: 'show',
|
|
3920
|
-
|
|
3921
|
-
self: true,
|
|
3922
|
-
|
|
3923
|
-
handler() {
|
|
3924
|
-
active$1 = this;
|
|
3819
|
+
addClass(document.documentElement, this.clsPage);
|
|
3925
3820
|
|
|
3926
|
-
this.
|
|
3821
|
+
if (this.bgClose) {
|
|
3822
|
+
once(
|
|
3823
|
+
this.$el,
|
|
3824
|
+
'hide',
|
|
3825
|
+
on(document, pointerDown, (_ref3) => {let { target } = _ref3;
|
|
3826
|
+
if (
|
|
3827
|
+
last(active$1) !== this ||
|
|
3828
|
+
this.overlay && !within(target, this.$el) ||
|
|
3829
|
+
within(target, this.panel))
|
|
3830
|
+
{
|
|
3831
|
+
return;
|
|
3832
|
+
}
|
|
3927
3833
|
|
|
3928
|
-
for (const handler of [
|
|
3929
|
-
on(
|
|
3930
|
-
document,
|
|
3931
|
-
pointerDown,
|
|
3932
|
-
(_ref2) => {let { target } = _ref2;return (
|
|
3933
|
-
!within(target, this.$el) &&
|
|
3934
3834
|
once(
|
|
3935
3835
|
document,
|
|
3936
3836
|
pointerUp + " " + pointerCancel + " scroll",
|
|
3937
|
-
(
|
|
3837
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3938
3838
|
if (
|
|
3939
3839
|
!defaultPrevented &&
|
|
3940
3840
|
type === pointerUp &&
|
|
3941
|
-
target === newTarget
|
|
3942
|
-
!(this.target && within(target, this.target)))
|
|
3841
|
+
target === newTarget)
|
|
3943
3842
|
{
|
|
3944
|
-
this.hide(
|
|
3843
|
+
this.hide();
|
|
3945
3844
|
}
|
|
3946
3845
|
},
|
|
3947
|
-
true)
|
|
3948
|
-
|
|
3949
|
-
|
|
3846
|
+
true);
|
|
3950
3847
|
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
this.hide(false);
|
|
3954
|
-
}
|
|
3955
|
-
}),
|
|
3848
|
+
}),
|
|
3849
|
+
{ self: true });
|
|
3956
3850
|
|
|
3957
|
-
|
|
3958
|
-
[] :
|
|
3959
|
-
(() => {
|
|
3960
|
-
const handler = () => this.$emit();
|
|
3961
|
-
return [
|
|
3962
|
-
on(window, 'resize', handler),
|
|
3963
|
-
on(document, 'scroll', handler, true),
|
|
3964
|
-
(() => {
|
|
3965
|
-
const observer = observeResize(
|
|
3966
|
-
scrollParents(this.$el),
|
|
3967
|
-
handler);
|
|
3851
|
+
}
|
|
3968
3852
|
|
|
3969
|
-
|
|
3970
|
-
|
|
3853
|
+
if (this.escClose) {
|
|
3854
|
+
once(
|
|
3855
|
+
this.$el,
|
|
3856
|
+
'hide',
|
|
3857
|
+
on(document, 'keydown', (e) => {
|
|
3858
|
+
if (e.keyCode === 27 && last(active$1) === this) {
|
|
3859
|
+
this.hide();
|
|
3860
|
+
}
|
|
3861
|
+
}),
|
|
3862
|
+
{ self: true });
|
|
3971
3863
|
|
|
3972
|
-
})())])
|
|
3973
|
-
{
|
|
3974
|
-
once(this.$el, 'hide', handler, { self: true });
|
|
3975
3864
|
}
|
|
3976
3865
|
} },
|
|
3977
3866
|
|
|
3978
3867
|
|
|
3979
3868
|
{
|
|
3980
|
-
name: '
|
|
3869
|
+
name: 'shown',
|
|
3981
3870
|
|
|
3982
3871
|
self: true,
|
|
3983
3872
|
|
|
3984
3873
|
handler() {
|
|
3985
|
-
this
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
{
|
|
3990
|
-
name: 'hide',
|
|
3874
|
+
if (!isFocusable(this.$el)) {
|
|
3875
|
+
attr(this.$el, 'tabindex', '-1');
|
|
3876
|
+
}
|
|
3991
3877
|
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
active$1 =
|
|
3995
|
-
active$1 === null && within(target, this.$el) && this.isToggled() ?
|
|
3996
|
-
this :
|
|
3997
|
-
active$1;
|
|
3998
|
-
return;
|
|
3878
|
+
if (!$(':focus', this.$el)) {
|
|
3879
|
+
this.$el.focus();
|
|
3999
3880
|
}
|
|
3881
|
+
} },
|
|
4000
3882
|
|
|
4001
|
-
active$1 = this.isActive() ? null : active$1;
|
|
4002
|
-
this.tracker.cancel();
|
|
4003
|
-
} }],
|
|
4004
3883
|
|
|
3884
|
+
{
|
|
3885
|
+
name: 'hidden',
|
|
4005
3886
|
|
|
3887
|
+
self: true,
|
|
4006
3888
|
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
this.position();
|
|
3889
|
+
handler() {
|
|
3890
|
+
if (includes(active$1, this)) {
|
|
3891
|
+
active$1.splice(active$1.indexOf(this), 1);
|
|
4011
3892
|
}
|
|
4012
|
-
} },
|
|
4013
3893
|
|
|
3894
|
+
css(this.$el, 'zIndex', '');
|
|
4014
3895
|
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
if (this.isToggled() && target && this.target && target !== this.target) {
|
|
4018
|
-
this.hide(false, false);
|
|
3896
|
+
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
3897
|
+
removeClass(document.documentElement, this.clsPage);
|
|
4019
3898
|
}
|
|
3899
|
+
} }],
|
|
4020
3900
|
|
|
4021
|
-
this.target = target;
|
|
4022
|
-
|
|
4023
|
-
this.clearTimers();
|
|
4024
|
-
|
|
4025
|
-
if (this.isActive()) {
|
|
4026
|
-
return;
|
|
4027
|
-
}
|
|
4028
3901
|
|
|
4029
|
-
if (active$1) {
|
|
4030
|
-
if (delay && active$1.isDelaying) {
|
|
4031
|
-
this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
|
|
4032
|
-
return;
|
|
4033
|
-
}
|
|
4034
3902
|
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
}
|
|
4040
|
-
}
|
|
3903
|
+
methods: {
|
|
3904
|
+
toggle() {
|
|
3905
|
+
return this.isToggled() ? this.hide() : this.show();
|
|
3906
|
+
},
|
|
4041
3907
|
|
|
3908
|
+
show() {
|
|
4042
3909
|
if (this.container && parent(this.$el) !== this.container) {
|
|
4043
3910
|
append(this.container, this.$el);
|
|
4044
|
-
|
|
3911
|
+
return new Promise((resolve) =>
|
|
3912
|
+
requestAnimationFrame(() => this.show().then(resolve)));
|
|
4045
3913
|
|
|
4046
|
-
|
|
4047
|
-
() => this.toggleElement(this.$el, true),
|
|
4048
|
-
delay && this.delayShow || 0);
|
|
3914
|
+
}
|
|
4049
3915
|
|
|
3916
|
+
return this.toggleElement(this.$el, true, animate(this));
|
|
4050
3917
|
},
|
|
4051
3918
|
|
|
4052
|
-
hide(
|
|
4053
|
-
|
|
3919
|
+
hide() {
|
|
3920
|
+
return this.toggleElement(this.$el, false, animate(this));
|
|
3921
|
+
} } };
|
|
4054
3922
|
|
|
4055
|
-
this.clearTimers();
|
|
4056
3923
|
|
|
4057
|
-
this.isDelaying = getPositionedElements(this.$el).some((el) =>
|
|
4058
|
-
this.tracker.movesTo(el));
|
|
4059
3924
|
|
|
3925
|
+
function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
|
|
3926
|
+
return (el, show) =>
|
|
3927
|
+
new Promise((resolve, reject) =>
|
|
3928
|
+
once(el, 'show hide', () => {
|
|
3929
|
+
el._reject == null ? void 0 : el._reject();
|
|
3930
|
+
el._reject = reject;
|
|
4060
3931
|
|
|
4061
|
-
|
|
4062
|
-
this.hideTimer = setTimeout(this.hide, 50);
|
|
4063
|
-
} else if (delay && this.delayHide) {
|
|
4064
|
-
this.hideTimer = setTimeout(hide, this.delayHide);
|
|
4065
|
-
} else {
|
|
4066
|
-
hide();
|
|
4067
|
-
}
|
|
4068
|
-
},
|
|
3932
|
+
_toggle(el, show);
|
|
4069
3933
|
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
},
|
|
3934
|
+
const off = once(
|
|
3935
|
+
transitionElement,
|
|
3936
|
+
'transitionstart',
|
|
3937
|
+
() => {
|
|
3938
|
+
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
3939
|
+
self: true });
|
|
4077
3940
|
|
|
4078
|
-
|
|
4079
|
-
return active$1 === this;
|
|
3941
|
+
clearTimeout(timer);
|
|
4080
3942
|
},
|
|
3943
|
+
{ self: true });
|
|
4081
3944
|
|
|
4082
|
-
position() {
|
|
4083
|
-
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4084
|
-
toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
|
|
4085
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4086
3945
|
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
3946
|
+
const timer = setTimeout(() => {
|
|
3947
|
+
off();
|
|
3948
|
+
resolve();
|
|
3949
|
+
}, toMs(css(transitionElement, 'transitionDuration')));
|
|
3950
|
+
})).
|
|
3951
|
+
then(() => delete el._reject);
|
|
3952
|
+
}
|
|
4091
3953
|
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
3954
|
+
function toMs(time) {
|
|
3955
|
+
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
3956
|
+
}
|
|
4095
3957
|
|
|
4096
|
-
|
|
4097
|
-
|
|
3958
|
+
function preventOverscroll(el) {
|
|
3959
|
+
if (CSS.supports('overscroll-behavior', 'contain')) {
|
|
3960
|
+
const elements = filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')));
|
|
3961
|
+
css(elements, 'overscrollBehavior', 'contain');
|
|
3962
|
+
return () => css(elements, 'overscrollBehavior', '');
|
|
3963
|
+
}
|
|
4098
3964
|
|
|
4099
|
-
|
|
4100
|
-
const prop = this.axis === 'y' ? 'width' : 'height';
|
|
4101
|
-
css(
|
|
4102
|
-
this.$el,
|
|
4103
|
-
prop,
|
|
4104
|
-
Math.min(
|
|
4105
|
-
(boundary ? boundaryOffset : offset(this.target))[prop],
|
|
4106
|
-
scrollParentOffset[prop] - 2 * viewportOffset));
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
} else if (this.align === 'stretch') {
|
|
4110
|
-
this.flip = this.axis === 'y' ? 'x' : 'y';
|
|
4111
|
-
this.display = 'static';
|
|
4112
|
-
|
|
4113
|
-
const viewport = offsetViewport(scrollParent);
|
|
4114
|
-
const targetDim = offset(target);
|
|
4115
|
-
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4116
|
-
|
|
4117
|
-
css(this.$el, {
|
|
4118
|
-
width:
|
|
4119
|
-
this.axis === 'y' ?
|
|
4120
|
-
viewport.width :
|
|
4121
|
-
(this.dir === 'left' ?
|
|
4122
|
-
targetDim.left - viewport.left :
|
|
4123
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4124
|
-
height:
|
|
4125
|
-
this.axis === 'x' ?
|
|
4126
|
-
viewport.height :
|
|
4127
|
-
(this.dir === 'top' ?
|
|
4128
|
-
targetDim.top - viewport.top :
|
|
4129
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4130
|
-
|
|
4131
|
-
} else if (this.$el.offsetWidth > maxWidth) {
|
|
4132
|
-
addClass(this.$el, this.clsDrop + "-stack");
|
|
4133
|
-
}
|
|
3965
|
+
let startClientY;
|
|
4134
3966
|
|
|
4135
|
-
|
|
3967
|
+
const events = [
|
|
3968
|
+
on(
|
|
3969
|
+
el,
|
|
3970
|
+
'touchstart',
|
|
3971
|
+
(_ref6) => {let { targetTouches } = _ref6;
|
|
3972
|
+
if (targetTouches.length === 1) {
|
|
3973
|
+
startClientY = targetTouches[0].clientY;
|
|
3974
|
+
}
|
|
3975
|
+
},
|
|
3976
|
+
{ passive: true }),
|
|
4136
3977
|
|
|
4137
|
-
this.positionAt(this.$el, target, boundary);
|
|
4138
|
-
} } };
|
|
4139
3978
|
|
|
3979
|
+
on(
|
|
3980
|
+
el,
|
|
3981
|
+
'touchmove',
|
|
3982
|
+
(e) => {
|
|
3983
|
+
if (e.targetTouches.length !== 1) {
|
|
3984
|
+
return;
|
|
3985
|
+
}
|
|
4140
3986
|
|
|
3987
|
+
let [scrollParent] = scrollParents(e.target, /auto|scroll/);
|
|
3988
|
+
if (!within(scrollParent, el)) {
|
|
3989
|
+
scrollParent = el;
|
|
3990
|
+
}
|
|
4141
3991
|
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
apply(el, (el) => css(el, 'position') !== 'static' && result.push(el));
|
|
4145
|
-
return result;
|
|
4146
|
-
}
|
|
3992
|
+
const clientY = e.targetTouches[0].clientY - startClientY;
|
|
3993
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollParent;
|
|
4147
3994
|
|
|
4148
|
-
|
|
4149
|
-
|
|
3995
|
+
if (
|
|
3996
|
+
clientHeight >= scrollHeight ||
|
|
3997
|
+
scrollTop === 0 && clientY > 0 ||
|
|
3998
|
+
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
3999
|
+
{
|
|
4000
|
+
e.cancelable && e.preventDefault();
|
|
4001
|
+
}
|
|
4002
|
+
},
|
|
4003
|
+
{ passive: false })];
|
|
4150
4004
|
|
|
4151
|
-
|
|
4005
|
+
|
|
4006
|
+
|
|
4007
|
+
return () => events.forEach((fn) => fn());
|
|
4008
|
+
}
|
|
4009
|
+
|
|
4010
|
+
let prevented;
|
|
4011
|
+
function preventBackgroundScroll() {
|
|
4012
|
+
if (prevented) {
|
|
4013
|
+
return noop;
|
|
4014
|
+
}
|
|
4015
|
+
prevented = true;
|
|
4016
|
+
const { body, documentElement } = document;
|
|
4017
|
+
css(body, {
|
|
4018
|
+
overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
|
|
4019
|
+
touchAction: 'none' });
|
|
4020
|
+
|
|
4021
|
+
css(documentElement, 'overflowY', 'hidden');
|
|
4022
|
+
return () => {
|
|
4023
|
+
prevented = false;
|
|
4024
|
+
css(documentElement, 'overflowY', '');
|
|
4025
|
+
css(body, { overflowY: '', touchAction: '' });
|
|
4026
|
+
};
|
|
4027
|
+
}
|
|
4028
|
+
|
|
4029
|
+
function filterChildren(el, fn) {
|
|
4030
|
+
const children = [];
|
|
4031
|
+
apply(el, (node) => {
|
|
4032
|
+
if (fn(node)) {
|
|
4033
|
+
children.push(node);
|
|
4034
|
+
}
|
|
4035
|
+
});
|
|
4036
|
+
return children;
|
|
4037
|
+
}
|
|
4038
|
+
|
|
4039
|
+
let active;
|
|
4040
|
+
|
|
4041
|
+
var drop = {
|
|
4042
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4043
|
+
|
|
4044
|
+
args: 'pos',
|
|
4152
4045
|
|
|
4153
4046
|
props: {
|
|
4154
|
-
|
|
4047
|
+
mode: 'list',
|
|
4048
|
+
toggle: Boolean,
|
|
4049
|
+
boundary: Boolean,
|
|
4050
|
+
target: Boolean,
|
|
4051
|
+
targetX: Boolean,
|
|
4052
|
+
targetY: Boolean,
|
|
4053
|
+
stretch: Boolean,
|
|
4054
|
+
delayShow: Number,
|
|
4055
|
+
delayHide: Number,
|
|
4056
|
+
display: String,
|
|
4057
|
+
clsDrop: String,
|
|
4058
|
+
animateOut: Boolean,
|
|
4059
|
+
bgScroll: Boolean },
|
|
4155
4060
|
|
|
4156
4061
|
|
|
4157
4062
|
data: {
|
|
4158
|
-
|
|
4063
|
+
mode: ['click', 'hover'],
|
|
4064
|
+
toggle: '- *',
|
|
4065
|
+
boundary: false,
|
|
4066
|
+
target: false,
|
|
4067
|
+
targetX: false,
|
|
4068
|
+
targetY: false,
|
|
4069
|
+
stretch: false,
|
|
4070
|
+
delayShow: 0,
|
|
4071
|
+
delayHide: 800,
|
|
4072
|
+
display: null,
|
|
4073
|
+
clsDrop: false,
|
|
4074
|
+
animateOut: false,
|
|
4075
|
+
bgScroll: true,
|
|
4076
|
+
animation: ['uk-animation-fade'],
|
|
4077
|
+
cls: 'uk-open',
|
|
4078
|
+
container: false },
|
|
4159
4079
|
|
|
4160
4080
|
|
|
4161
4081
|
computed: {
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
state() {
|
|
4167
|
-
return this.input.nextElementSibling;
|
|
4168
|
-
},
|
|
4082
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4083
|
+
targetX = targetX || target || this.targetEl;
|
|
4084
|
+
targetY = targetY || target || this.targetEl;
|
|
4169
4085
|
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
target === true && parent(this.input) === $el && this.input.nextElementSibling ||
|
|
4174
|
-
$(target, $el)));
|
|
4086
|
+
return [
|
|
4087
|
+
targetX === true ? window : query(targetX, $el),
|
|
4088
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4175
4089
|
|
|
4176
4090
|
} },
|
|
4177
4091
|
|
|
4178
4092
|
|
|
4179
|
-
|
|
4180
|
-
|
|
4093
|
+
created() {
|
|
4094
|
+
this.tracker = new MouseTracker();
|
|
4095
|
+
},
|
|
4181
4096
|
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4097
|
+
beforeConnect() {
|
|
4098
|
+
this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
|
|
4099
|
+
},
|
|
4185
4100
|
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
const prev = target[prop];
|
|
4189
|
-
const value = (_input$files = input.files) != null && _input$files[0] ?
|
|
4190
|
-
input.files[0].name :
|
|
4191
|
-
matches(input, 'select') && (
|
|
4192
|
-
option = $$('option', input).filter((el) => el.selected)[0]) // eslint-disable-line prefer-destructuring
|
|
4193
|
-
? option.textContent :
|
|
4194
|
-
input.value;
|
|
4101
|
+
connected() {
|
|
4102
|
+
addClass(this.$el, this.clsDrop);
|
|
4195
4103
|
|
|
4196
|
-
if (
|
|
4197
|
-
|
|
4104
|
+
if (this.toggle && !this.targetEl) {
|
|
4105
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4106
|
+
target: this.$el,
|
|
4107
|
+
mode: this.mode }).
|
|
4108
|
+
$el;
|
|
4109
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4110
|
+
this.lazyload(this.targetEl);
|
|
4111
|
+
}
|
|
4112
|
+
},
|
|
4113
|
+
|
|
4114
|
+
disconnected() {
|
|
4115
|
+
if (this.isActive()) {
|
|
4116
|
+
active = null;
|
|
4198
4117
|
}
|
|
4199
4118
|
},
|
|
4200
4119
|
|
|
4201
4120
|
events: [
|
|
4202
4121
|
{
|
|
4203
|
-
name: '
|
|
4122
|
+
name: 'click',
|
|
4204
4123
|
|
|
4205
|
-
|
|
4206
|
-
this
|
|
4124
|
+
delegate() {
|
|
4125
|
+
return "." + this.clsDrop + "-close";
|
|
4126
|
+
},
|
|
4127
|
+
|
|
4128
|
+
handler(e) {
|
|
4129
|
+
e.preventDefault();
|
|
4130
|
+
this.hide(false);
|
|
4207
4131
|
} },
|
|
4208
4132
|
|
|
4209
4133
|
|
|
4210
4134
|
{
|
|
4211
|
-
name: '
|
|
4135
|
+
name: 'click',
|
|
4212
4136
|
|
|
4213
|
-
|
|
4214
|
-
return
|
|
4137
|
+
delegate() {
|
|
4138
|
+
return 'a[href^="#"]';
|
|
4215
4139
|
},
|
|
4216
4140
|
|
|
4141
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4142
|
+
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4143
|
+
this.hide(false);
|
|
4144
|
+
}
|
|
4145
|
+
} },
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
{
|
|
4149
|
+
name: 'beforescroll',
|
|
4150
|
+
|
|
4217
4151
|
handler() {
|
|
4218
|
-
this
|
|
4219
|
-
} }
|
|
4152
|
+
this.hide(false);
|
|
4153
|
+
} },
|
|
4220
4154
|
|
|
4221
|
-
var Margin = {
|
|
4222
|
-
mixins: [Resize],
|
|
4223
4155
|
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
firstColumn: Boolean },
|
|
4156
|
+
{
|
|
4157
|
+
name: 'toggle',
|
|
4227
4158
|
|
|
4159
|
+
self: true,
|
|
4228
4160
|
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
firstColumn: 'uk-first-column' },
|
|
4161
|
+
handler(e, toggle) {
|
|
4162
|
+
e.preventDefault();
|
|
4232
4163
|
|
|
4164
|
+
if (this.isToggled()) {
|
|
4165
|
+
this.hide(false);
|
|
4166
|
+
} else {
|
|
4167
|
+
this.show(toggle == null ? void 0 : toggle.$el, false);
|
|
4168
|
+
}
|
|
4169
|
+
} },
|
|
4233
4170
|
|
|
4234
|
-
resizeTargets() {
|
|
4235
|
-
return [this.$el, ...toArray(this.$el.children)];
|
|
4236
|
-
},
|
|
4237
4171
|
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
observeMutation(this.$el, () => this.$reset(), {
|
|
4241
|
-
childList: true }));
|
|
4172
|
+
{
|
|
4173
|
+
name: 'toggleshow',
|
|
4242
4174
|
|
|
4175
|
+
self: true,
|
|
4243
4176
|
|
|
4244
|
-
|
|
4177
|
+
handler(e, toggle) {
|
|
4178
|
+
e.preventDefault();
|
|
4179
|
+
this.show(toggle == null ? void 0 : toggle.$el);
|
|
4180
|
+
} },
|
|
4245
4181
|
|
|
4246
|
-
update: {
|
|
4247
|
-
read() {
|
|
4248
|
-
const rows = getRows(this.$el.children);
|
|
4249
4182
|
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
columns: getColumns(rows) };
|
|
4183
|
+
{
|
|
4184
|
+
name: 'togglehide',
|
|
4253
4185
|
|
|
4254
|
-
|
|
4186
|
+
self: true,
|
|
4255
4187
|
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
toggleClass(column, this.firstColumn, columns[0].includes(column));
|
|
4261
|
-
}
|
|
4188
|
+
handler(e) {
|
|
4189
|
+
e.preventDefault();
|
|
4190
|
+
if (!matches(this.$el, ':focus,:hover')) {
|
|
4191
|
+
this.hide();
|
|
4262
4192
|
}
|
|
4263
|
-
},
|
|
4193
|
+
} },
|
|
4264
4194
|
|
|
4265
|
-
events: ['resize'] } };
|
|
4266
4195
|
|
|
4196
|
+
{
|
|
4197
|
+
name: pointerEnter + " focusin",
|
|
4267
4198
|
|
|
4199
|
+
filter() {
|
|
4200
|
+
return includes(this.mode, 'hover');
|
|
4201
|
+
},
|
|
4268
4202
|
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4203
|
+
handler(e) {
|
|
4204
|
+
if (!isTouch(e)) {
|
|
4205
|
+
this.clearTimers();
|
|
4206
|
+
}
|
|
4207
|
+
} },
|
|
4272
4208
|
|
|
4273
|
-
function getColumns(rows) {
|
|
4274
|
-
const columns = [];
|
|
4275
4209
|
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
for (let j = 0; j < sorted.length; j++) {
|
|
4279
|
-
columns[j] = columns[j] ? columns[j].concat(sorted[j]) : sorted[j];
|
|
4280
|
-
}
|
|
4281
|
-
}
|
|
4210
|
+
{
|
|
4211
|
+
name: pointerLeave + " focusout",
|
|
4282
4212
|
|
|
4283
|
-
|
|
4284
|
-
|
|
4213
|
+
filter() {
|
|
4214
|
+
return includes(this.mode, 'hover');
|
|
4215
|
+
},
|
|
4285
4216
|
|
|
4286
|
-
|
|
4287
|
-
|
|
4217
|
+
handler(e) {
|
|
4218
|
+
if (!isTouch(e) && e.relatedTarget) {
|
|
4219
|
+
this.hide();
|
|
4220
|
+
}
|
|
4221
|
+
} },
|
|
4288
4222
|
|
|
4289
|
-
for (const el of items) {
|
|
4290
|
-
if (!isVisible(el)) {
|
|
4291
|
-
continue;
|
|
4292
|
-
}
|
|
4293
4223
|
|
|
4294
|
-
|
|
4224
|
+
{
|
|
4225
|
+
name: 'toggled',
|
|
4295
4226
|
|
|
4296
|
-
|
|
4297
|
-
const current = sorted[i];
|
|
4227
|
+
self: true,
|
|
4298
4228
|
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4229
|
+
handler(e, toggled) {
|
|
4230
|
+
if (!toggled) {
|
|
4231
|
+
return;
|
|
4302
4232
|
}
|
|
4303
4233
|
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
} else {
|
|
4308
|
-
dim = getOffset(el, true);
|
|
4309
|
-
startDim = getOffset(current[0], true);
|
|
4310
|
-
}
|
|
4234
|
+
this.clearTimers();
|
|
4235
|
+
this.position();
|
|
4236
|
+
} },
|
|
4311
4237
|
|
|
4312
|
-
if (dim[startProp] >= startDim[endProp] - 1 && dim[startProp] !== startDim[startProp]) {
|
|
4313
|
-
sorted.push([el]);
|
|
4314
|
-
break;
|
|
4315
|
-
}
|
|
4316
4238
|
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
break;
|
|
4320
|
-
}
|
|
4239
|
+
{
|
|
4240
|
+
name: 'show',
|
|
4321
4241
|
|
|
4322
|
-
|
|
4323
|
-
sorted.unshift([el]);
|
|
4324
|
-
break;
|
|
4325
|
-
}
|
|
4326
|
-
}
|
|
4327
|
-
}
|
|
4242
|
+
self: true,
|
|
4328
4243
|
|
|
4329
|
-
|
|
4330
|
-
|
|
4244
|
+
handler() {
|
|
4245
|
+
active = this;
|
|
4331
4246
|
|
|
4332
|
-
|
|
4333
|
-
let { offsetTop, offsetLeft, offsetHeight, offsetWidth } = element;
|
|
4334
|
-
|
|
4335
|
-
if (offset) {
|
|
4336
|
-
[offsetTop, offsetLeft] = offsetPosition(element);
|
|
4337
|
-
}
|
|
4338
|
-
|
|
4339
|
-
return {
|
|
4340
|
-
top: offsetTop,
|
|
4341
|
-
left: offsetLeft,
|
|
4342
|
-
bottom: offsetTop + offsetHeight,
|
|
4343
|
-
right: offsetLeft + offsetWidth };
|
|
4247
|
+
this.tracker.init();
|
|
4344
4248
|
|
|
4345
|
-
|
|
4249
|
+
for (const handler of [
|
|
4250
|
+
on(
|
|
4251
|
+
document,
|
|
4252
|
+
pointerDown,
|
|
4253
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4254
|
+
!within(target, this.$el) &&
|
|
4255
|
+
once(
|
|
4256
|
+
document,
|
|
4257
|
+
pointerUp + " " + pointerCancel + " scroll",
|
|
4258
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4259
|
+
if (
|
|
4260
|
+
!defaultPrevented &&
|
|
4261
|
+
type === pointerUp &&
|
|
4262
|
+
target === newTarget &&
|
|
4263
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4264
|
+
{
|
|
4265
|
+
this.hide(false);
|
|
4266
|
+
}
|
|
4267
|
+
},
|
|
4268
|
+
true));}),
|
|
4346
4269
|
|
|
4347
|
-
var Scroll = {
|
|
4348
|
-
connected() {
|
|
4349
|
-
registerScrollListener(this._uid, () => this.$emit('scroll'));
|
|
4350
|
-
},
|
|
4351
4270
|
|
|
4352
|
-
disconnected() {
|
|
4353
|
-
unregisterScrollListener(this._uid);
|
|
4354
|
-
} };
|
|
4355
4271
|
|
|
4272
|
+
on(document, 'keydown', (e) => {
|
|
4273
|
+
if (e.keyCode === 27) {
|
|
4274
|
+
this.hide(false);
|
|
4275
|
+
}
|
|
4276
|
+
}),
|
|
4356
4277
|
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
unbindScrollListener =
|
|
4361
|
-
unbindScrollListener ||
|
|
4362
|
-
on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
|
|
4363
|
-
passive: true,
|
|
4364
|
-
capture: true });
|
|
4278
|
+
...(this.bgScroll ?
|
|
4279
|
+
[] :
|
|
4280
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()]),
|
|
4365
4281
|
|
|
4282
|
+
...(this.display === 'static' ?
|
|
4283
|
+
[] :
|
|
4284
|
+
(() => {
|
|
4285
|
+
const handler = () => this.$emit();
|
|
4286
|
+
return [
|
|
4287
|
+
on(window, 'resize', handler),
|
|
4288
|
+
on([document, scrollParents(this.$el)], 'scroll', handler),
|
|
4289
|
+
(() => {
|
|
4290
|
+
const observer = observeResize(
|
|
4291
|
+
scrollParents(this.$el),
|
|
4292
|
+
handler);
|
|
4366
4293
|
|
|
4367
|
-
|
|
4368
|
-
|
|
4294
|
+
return () => observer.disconnect();
|
|
4295
|
+
})()];
|
|
4369
4296
|
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
}
|
|
4376
|
-
}
|
|
4297
|
+
})())])
|
|
4298
|
+
{
|
|
4299
|
+
once(this.$el, 'hide', handler, { self: true });
|
|
4300
|
+
}
|
|
4301
|
+
} },
|
|
4377
4302
|
|
|
4378
|
-
var grid = {
|
|
4379
|
-
extends: Margin,
|
|
4380
4303
|
|
|
4381
|
-
|
|
4304
|
+
{
|
|
4305
|
+
name: 'beforehide',
|
|
4382
4306
|
|
|
4383
|
-
|
|
4307
|
+
self: true,
|
|
4384
4308
|
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4309
|
+
handler() {
|
|
4310
|
+
this.clearTimers();
|
|
4311
|
+
} },
|
|
4388
4312
|
|
|
4389
4313
|
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
clsStack: 'uk-grid-stack',
|
|
4393
|
-
masonry: false,
|
|
4394
|
-
parallax: 0 },
|
|
4314
|
+
{
|
|
4315
|
+
name: 'hide',
|
|
4395
4316
|
|
|
4317
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4318
|
+
if (this.$el !== target) {
|
|
4319
|
+
active =
|
|
4320
|
+
active === null && within(target, this.$el) && this.isToggled() ?
|
|
4321
|
+
this :
|
|
4322
|
+
active;
|
|
4323
|
+
return;
|
|
4324
|
+
}
|
|
4396
4325
|
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4326
|
+
active = this.isActive() ? null : active;
|
|
4327
|
+
this.tracker.cancel();
|
|
4328
|
+
} }],
|
|
4400
4329
|
|
|
4401
|
-
update: [
|
|
4402
|
-
{
|
|
4403
|
-
write(_ref) {let { columns } = _ref;
|
|
4404
|
-
toggleClass(this.$el, this.clsStack, columns.length < 2);
|
|
4405
|
-
},
|
|
4406
4330
|
|
|
4407
|
-
events: ['resize'] },
|
|
4408
4331
|
|
|
4332
|
+
update: {
|
|
4333
|
+
write() {
|
|
4334
|
+
if (this.isToggled() && !hasClass(this.$el, this.clsEnter)) {
|
|
4335
|
+
this.position();
|
|
4336
|
+
}
|
|
4337
|
+
} },
|
|
4409
4338
|
|
|
4410
|
-
{
|
|
4411
|
-
read(data) {
|
|
4412
|
-
let { columns, rows } = data;
|
|
4413
4339
|
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
positionedAbsolute(this.$el))
|
|
4419
|
-
{
|
|
4420
|
-
data.translates = false;
|
|
4421
|
-
return false;
|
|
4340
|
+
methods: {
|
|
4341
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4342
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4343
|
+
this.hide(false, false);
|
|
4422
4344
|
}
|
|
4423
4345
|
|
|
4424
|
-
|
|
4346
|
+
this.targetEl = target;
|
|
4425
4347
|
|
|
4426
|
-
|
|
4427
|
-
const columnHeights = getColumnHeights(columns);
|
|
4428
|
-
const margin = getMarginTop(nodes, this.margin) * (rows.length - 1);
|
|
4429
|
-
const elHeight = Math.max(...columnHeights) + margin;
|
|
4348
|
+
this.clearTimers();
|
|
4430
4349
|
|
|
4431
|
-
if (this.
|
|
4432
|
-
|
|
4433
|
-
translates = getTranslates(rows, columns);
|
|
4350
|
+
if (this.isActive()) {
|
|
4351
|
+
return;
|
|
4434
4352
|
}
|
|
4435
4353
|
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
newPadding,
|
|
4442
|
-
hgt + margin + (i % 2 ? padding : padding / 8) - elHeight),
|
|
4354
|
+
if (active) {
|
|
4355
|
+
if (delay && active.isDelaying) {
|
|
4356
|
+
this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
|
|
4357
|
+
return;
|
|
4358
|
+
}
|
|
4443
4359
|
|
|
4444
|
-
|
|
4360
|
+
let prev;
|
|
4361
|
+
while (active && prev !== active && !within(this.$el, active.$el)) {
|
|
4362
|
+
prev = active;
|
|
4363
|
+
active.hide(false, false);
|
|
4364
|
+
}
|
|
4365
|
+
}
|
|
4445
4366
|
|
|
4367
|
+
if (this.container && parent(this.$el) !== this.container) {
|
|
4368
|
+
append(this.container, this.$el);
|
|
4446
4369
|
}
|
|
4447
4370
|
|
|
4448
|
-
|
|
4449
|
-
|
|
4371
|
+
this.showTimer = setTimeout(
|
|
4372
|
+
() => this.toggleElement(this.$el, true),
|
|
4373
|
+
delay && this.delayShow || 0);
|
|
4450
4374
|
|
|
4451
|
-
write(_ref2) {let { height, padding } = _ref2;
|
|
4452
|
-
css(this.$el, 'paddingBottom', padding || '');
|
|
4453
|
-
height !== false && css(this.$el, 'height', height);
|
|
4454
4375
|
},
|
|
4455
4376
|
|
|
4456
|
-
|
|
4377
|
+
hide(delay, animate) {if (delay === void 0) {delay = true;}if (animate === void 0) {animate = true;}
|
|
4378
|
+
const hide = () => this.toggleElement(this.$el, false, this.animateOut && animate);
|
|
4457
4379
|
|
|
4380
|
+
this.clearTimers();
|
|
4458
4381
|
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4382
|
+
this.isDelaying = getPositionedElements(this.$el).some((el) =>
|
|
4383
|
+
this.tracker.movesTo(el));
|
|
4384
|
+
|
|
4385
|
+
|
|
4386
|
+
if (delay && this.isDelaying) {
|
|
4387
|
+
this.hideTimer = setTimeout(this.hide, 50);
|
|
4388
|
+
} else if (delay && this.delayHide) {
|
|
4389
|
+
this.hideTimer = setTimeout(hide, this.delayHide);
|
|
4390
|
+
} else {
|
|
4391
|
+
hide();
|
|
4463
4392
|
}
|
|
4393
|
+
},
|
|
4464
4394
|
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4395
|
+
clearTimers() {
|
|
4396
|
+
clearTimeout(this.showTimer);
|
|
4397
|
+
clearTimeout(this.hideTimer);
|
|
4398
|
+
this.showTimer = null;
|
|
4399
|
+
this.hideTimer = null;
|
|
4400
|
+
this.isDelaying = false;
|
|
4401
|
+
},
|
|
4469
4402
|
|
|
4403
|
+
isActive() {
|
|
4404
|
+
return active === this;
|
|
4470
4405
|
},
|
|
4471
4406
|
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
}
|
|
4407
|
+
position() {
|
|
4408
|
+
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4409
|
+
attr(this.$el, 'style', this._style);
|
|
4476
4410
|
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
css(
|
|
4480
|
-
el,
|
|
4481
|
-
'transform',
|
|
4482
|
-
!scrolled && !translates ?
|
|
4483
|
-
'' : "translateY(" + (
|
|
4411
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4412
|
+
this.$el.hidden = true;
|
|
4484
4413
|
|
|
4485
|
-
|
|
4486
|
-
|
|
4414
|
+
const boundary = query(this.boundary, this.$el);
|
|
4415
|
+
const boundaryOffset = offsetViewport(boundary || window);
|
|
4416
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4417
|
+
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4487
4418
|
|
|
4419
|
+
const dirs = [
|
|
4420
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4421
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4488
4422
|
|
|
4489
4423
|
|
|
4424
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4425
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4426
|
+
css(this.$el, {
|
|
4427
|
+
[prop]: Math.min(
|
|
4428
|
+
boundaryOffset[prop],
|
|
4429
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4490
4430
|
|
|
4491
|
-
|
|
4431
|
+
["overflow-" + axis]: 'auto' });
|
|
4492
4432
|
|
|
4493
|
-
|
|
4433
|
+
}
|
|
4434
|
+
}
|
|
4494
4435
|
|
|
4436
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4495
4437
|
|
|
4438
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4439
|
+
addClass(this.$el, this.clsDrop + "-stack");
|
|
4440
|
+
}
|
|
4496
4441
|
|
|
4442
|
+
css(this.$el, 'maxWidth', maxWidth);
|
|
4497
4443
|
|
|
4498
|
-
|
|
4499
|
-
return children(el).some((el) => css(el, 'position') === 'absolute');
|
|
4500
|
-
}
|
|
4444
|
+
this.$el.hidden = false;
|
|
4501
4445
|
|
|
4502
|
-
|
|
4503
|
-
const rowHeights = rows.map((row) => Math.max(...row.map((el) => el.offsetHeight)));
|
|
4446
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4504
4447
|
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4448
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4449
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4450
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4451
|
+
const targetOffset = offset(this.target[i]);
|
|
4452
|
+
const elOffset = offset(this.$el);
|
|
4510
4453
|
|
|
4511
|
-
|
|
4512
|
-
|
|
4454
|
+
css(this.$el, {
|
|
4455
|
+
[prop]:
|
|
4456
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4457
|
+
targetOffset[start] -
|
|
4458
|
+
Math.max(
|
|
4459
|
+
boundaryOffset[start],
|
|
4460
|
+
viewports[i][start] + viewportOffset) :
|
|
4513
4461
|
|
|
4514
|
-
|
|
4515
|
-
|
|
4462
|
+
Math.min(
|
|
4463
|
+
boundaryOffset[end],
|
|
4464
|
+
viewports[i][end] - viewportOffset) -
|
|
4465
|
+
targetOffset[end]) - positionOffset,
|
|
4466
|
+
["overflow-" + axis]: 'auto' });
|
|
4516
4467
|
|
|
4517
|
-
return toFloat(node ? css(node, 'marginTop') : css(nodes[0], 'paddingLeft'));
|
|
4518
|
-
}
|
|
4519
4468
|
|
|
4520
|
-
|
|
4521
|
-
|
|
4469
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4470
|
+
}
|
|
4471
|
+
}
|
|
4472
|
+
} } };
|
|
4473
|
+
|
|
4474
|
+
|
|
4475
|
+
|
|
4476
|
+
function getPositionedElements(el) {
|
|
4477
|
+
const result = [];
|
|
4478
|
+
apply(el, (el) => css(el, 'position') !== 'static' && result.push(el));
|
|
4479
|
+
return result;
|
|
4522
4480
|
}
|
|
4523
4481
|
|
|
4524
|
-
var
|
|
4525
|
-
mixins: [
|
|
4482
|
+
var formCustom = {
|
|
4483
|
+
mixins: [Class],
|
|
4526
4484
|
|
|
4527
4485
|
args: 'target',
|
|
4528
4486
|
|
|
4529
4487
|
props: {
|
|
4530
|
-
target:
|
|
4531
|
-
row: Boolean },
|
|
4488
|
+
target: Boolean },
|
|
4532
4489
|
|
|
4533
4490
|
|
|
4534
4491
|
data: {
|
|
4535
|
-
target:
|
|
4536
|
-
row: true },
|
|
4492
|
+
target: false },
|
|
4537
4493
|
|
|
4538
4494
|
|
|
4539
4495
|
computed: {
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
return $$(target, $el);
|
|
4543
|
-
},
|
|
4544
|
-
|
|
4545
|
-
watch() {
|
|
4546
|
-
this.$reset();
|
|
4547
|
-
} } },
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
resizeTargets() {
|
|
4552
|
-
return [this.$el, ...this.elements];
|
|
4553
|
-
},
|
|
4554
|
-
|
|
4555
|
-
update: {
|
|
4556
|
-
read() {
|
|
4557
|
-
return {
|
|
4558
|
-
rows: (this.row ? getRows(this.elements) : [this.elements]).map(match) };
|
|
4559
|
-
|
|
4496
|
+
input(_, $el) {
|
|
4497
|
+
return $(selInput, $el);
|
|
4560
4498
|
},
|
|
4561
4499
|
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
elements.forEach((el, i) => css(el, 'minHeight', heights[i]));
|
|
4565
|
-
}
|
|
4500
|
+
state() {
|
|
4501
|
+
return this.input.nextElementSibling;
|
|
4566
4502
|
},
|
|
4567
4503
|
|
|
4568
|
-
|
|
4504
|
+
target(_ref, $el) {let { target } = _ref;
|
|
4505
|
+
return (
|
|
4506
|
+
target && (
|
|
4507
|
+
target === true && parent(this.input) === $el && this.input.nextElementSibling ||
|
|
4508
|
+
$(target, $el)));
|
|
4569
4509
|
|
|
4510
|
+
} },
|
|
4570
4511
|
|
|
4571
4512
|
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
return { heights: [''], elements };
|
|
4575
|
-
}
|
|
4513
|
+
update() {var _input$files;
|
|
4514
|
+
const { target, input } = this;
|
|
4576
4515
|
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4516
|
+
if (!target) {
|
|
4517
|
+
return;
|
|
4518
|
+
}
|
|
4580
4519
|
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4520
|
+
let option;
|
|
4521
|
+
const prop = isInput(target) ? 'value' : 'textContent';
|
|
4522
|
+
const prev = target[prop];
|
|
4523
|
+
const value = (_input$files = input.files) != null && _input$files[0] ?
|
|
4524
|
+
input.files[0].name :
|
|
4525
|
+
matches(input, 'select') && (
|
|
4526
|
+
option = $$('option', input).filter((el) => el.selected)[0]) // eslint-disable-line prefer-destructuring
|
|
4527
|
+
? option.textContent :
|
|
4528
|
+
input.value;
|
|
4584
4529
|
|
|
4585
|
-
|
|
4530
|
+
if (prev !== value) {
|
|
4531
|
+
target[prop] = value;
|
|
4532
|
+
}
|
|
4533
|
+
},
|
|
4586
4534
|
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
style = element.style.display;
|
|
4591
|
-
css(element, 'display', 'block', 'important');
|
|
4592
|
-
}
|
|
4535
|
+
events: [
|
|
4536
|
+
{
|
|
4537
|
+
name: 'change',
|
|
4593
4538
|
|
|
4594
|
-
|
|
4539
|
+
handler() {
|
|
4540
|
+
this.$emit();
|
|
4541
|
+
} },
|
|
4595
4542
|
|
|
4596
|
-
if (style !== false) {
|
|
4597
|
-
css(element, 'display', style);
|
|
4598
|
-
}
|
|
4599
4543
|
|
|
4600
|
-
|
|
4601
|
-
|
|
4544
|
+
{
|
|
4545
|
+
name: 'reset',
|
|
4602
4546
|
|
|
4603
|
-
|
|
4547
|
+
el() {
|
|
4548
|
+
return closest(this.$el, 'form');
|
|
4549
|
+
},
|
|
4550
|
+
|
|
4551
|
+
handler() {
|
|
4552
|
+
this.$emit();
|
|
4553
|
+
} }] };
|
|
4554
|
+
|
|
4555
|
+
var Margin = {
|
|
4604
4556
|
mixins: [Resize],
|
|
4605
4557
|
|
|
4606
4558
|
props: {
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
offsetBottom: Boolean,
|
|
4610
|
-
minHeight: Number },
|
|
4559
|
+
margin: String,
|
|
4560
|
+
firstColumn: Boolean },
|
|
4611
4561
|
|
|
4612
4562
|
|
|
4613
4563
|
data: {
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
offsetBottom: false,
|
|
4617
|
-
minHeight: 0 },
|
|
4564
|
+
margin: 'uk-margin-small-top',
|
|
4565
|
+
firstColumn: 'uk-first-column' },
|
|
4618
4566
|
|
|
4619
4567
|
|
|
4620
4568
|
resizeTargets() {
|
|
4621
|
-
|
|
4622
|
-
return [this.$el, ...scrollParents(this.$el, /auto|scroll/)];
|
|
4569
|
+
return [this.$el, ...toArray(this.$el.children)];
|
|
4623
4570
|
},
|
|
4624
4571
|
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
}
|
|
4630
|
-
|
|
4631
|
-
let minHeight = '';
|
|
4632
|
-
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4633
|
-
|
|
4634
|
-
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4635
|
-
const { height: viewportHeight } = offsetViewport(scrollElement);
|
|
4636
|
-
|
|
4637
|
-
if (this.expand) {
|
|
4638
|
-
minHeight = Math.max(
|
|
4639
|
-
viewportHeight - (
|
|
4640
|
-
dimensions(scrollElement).height - dimensions(this.$el).height) -
|
|
4641
|
-
box,
|
|
4642
|
-
0);
|
|
4643
|
-
|
|
4644
|
-
} else {
|
|
4645
|
-
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4646
|
-
minHeight = "calc(" + (
|
|
4647
|
-
document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
|
|
4572
|
+
connected() {
|
|
4573
|
+
this.registerObserver(
|
|
4574
|
+
observeMutation(this.$el, () => this.$reset(), {
|
|
4575
|
+
childList: true }));
|
|
4648
4576
|
|
|
4649
4577
|
|
|
4650
|
-
|
|
4651
|
-
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4652
|
-
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4653
|
-
}
|
|
4578
|
+
},
|
|
4654
4579
|
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
minHeight += " - " + this.offsetBottom + "vh";
|
|
4659
|
-
} else if (this.offsetBottom && endsWith(this.offsetBottom, 'px')) {
|
|
4660
|
-
minHeight += " - " + toFloat(this.offsetBottom) + "px";
|
|
4661
|
-
} else if (isString(this.offsetBottom)) {
|
|
4662
|
-
minHeight += " - " + dimensions(query(this.offsetBottom, this.$el)).height + "px";
|
|
4663
|
-
}
|
|
4580
|
+
update: {
|
|
4581
|
+
read() {
|
|
4582
|
+
const rows = getRows(this.$el.children);
|
|
4664
4583
|
|
|
4665
|
-
|
|
4666
|
-
|
|
4584
|
+
return {
|
|
4585
|
+
rows,
|
|
4586
|
+
columns: getColumns(rows) };
|
|
4667
4587
|
|
|
4668
|
-
return { minHeight, prev };
|
|
4669
4588
|
},
|
|
4670
4589
|
|
|
4671
|
-
write(
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4590
|
+
write(_ref) {let { columns, rows } = _ref;
|
|
4591
|
+
for (const row of rows) {
|
|
4592
|
+
for (const column of row) {
|
|
4593
|
+
toggleClass(column, this.margin, rows[0] !== row);
|
|
4594
|
+
toggleClass(column, this.firstColumn, columns[0].includes(column));
|
|
4595
|
+
}
|
|
4676
4596
|
}
|
|
4677
4597
|
},
|
|
4678
4598
|
|
|
4679
4599
|
events: ['resize'] } };
|
|
4680
4600
|
|
|
4681
|
-
var SVG = {
|
|
4682
|
-
args: 'src',
|
|
4683
|
-
|
|
4684
|
-
props: {
|
|
4685
|
-
id: Boolean,
|
|
4686
|
-
icon: String,
|
|
4687
|
-
src: String,
|
|
4688
|
-
style: String,
|
|
4689
|
-
width: Number,
|
|
4690
|
-
height: Number,
|
|
4691
|
-
ratio: Number,
|
|
4692
|
-
class: String,
|
|
4693
|
-
strokeAnimation: Boolean,
|
|
4694
|
-
focusable: Boolean, // IE 11
|
|
4695
|
-
attributes: 'list' },
|
|
4696
|
-
|
|
4697
4601
|
|
|
4698
|
-
data: {
|
|
4699
|
-
ratio: 1,
|
|
4700
|
-
include: ['style', 'class', 'focusable'],
|
|
4701
|
-
class: '',
|
|
4702
|
-
strokeAnimation: false },
|
|
4703
4602
|
|
|
4603
|
+
function getRows(items) {
|
|
4604
|
+
return sortBy(items, 'top', 'bottom');
|
|
4605
|
+
}
|
|
4704
4606
|
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
},
|
|
4607
|
+
function getColumns(rows) {
|
|
4608
|
+
const columns = [];
|
|
4708
4609
|
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4610
|
+
for (const row of rows) {
|
|
4611
|
+
const sorted = sortBy(row, 'left', 'right');
|
|
4612
|
+
for (let j = 0; j < sorted.length; j++) {
|
|
4613
|
+
columns[j] = columns[j] ? columns[j].concat(sorted[j]) : sorted[j];
|
|
4712
4614
|
}
|
|
4615
|
+
}
|
|
4713
4616
|
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
const svg = insertSVG(el, this.$el);
|
|
4717
|
-
|
|
4718
|
-
if (this.svgEl && svg !== this.svgEl) {
|
|
4719
|
-
remove$1(this.svgEl);
|
|
4720
|
-
}
|
|
4617
|
+
return isRtl ? columns.reverse() : columns;
|
|
4618
|
+
}
|
|
4721
4619
|
|
|
4722
|
-
|
|
4620
|
+
function sortBy(items, startProp, endProp) {
|
|
4621
|
+
const sorted = [[]];
|
|
4723
4622
|
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4623
|
+
for (const el of items) {
|
|
4624
|
+
if (!isVisible(el)) {
|
|
4625
|
+
continue;
|
|
4626
|
+
}
|
|
4727
4627
|
|
|
4728
|
-
|
|
4729
|
-
this.svg.then((el) => {
|
|
4730
|
-
if (this._connected) {
|
|
4731
|
-
applyAnimation(el);
|
|
4732
|
-
this.registerObserver(
|
|
4733
|
-
observeIntersection(el, (records, observer) => {
|
|
4734
|
-
applyAnimation(el);
|
|
4735
|
-
observer.disconnect();
|
|
4736
|
-
}));
|
|
4628
|
+
let dim = getOffset(el);
|
|
4737
4629
|
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
}
|
|
4741
|
-
},
|
|
4630
|
+
for (let i = sorted.length - 1; i >= 0; i--) {
|
|
4631
|
+
const current = sorted[i];
|
|
4742
4632
|
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
return;
|
|
4633
|
+
if (!current[0]) {
|
|
4634
|
+
current.push(el);
|
|
4635
|
+
break;
|
|
4747
4636
|
}
|
|
4748
4637
|
|
|
4749
|
-
|
|
4750
|
-
|
|
4638
|
+
let startDim;
|
|
4639
|
+
if (current[0].offsetParent === el.offsetParent) {
|
|
4640
|
+
startDim = getOffset(current[0]);
|
|
4641
|
+
} else {
|
|
4642
|
+
dim = getOffset(el, true);
|
|
4643
|
+
startDim = getOffset(current[0], true);
|
|
4751
4644
|
}
|
|
4752
4645
|
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
this.svg = null;
|
|
4758
|
-
},
|
|
4759
|
-
|
|
4760
|
-
methods: {
|
|
4761
|
-
async getSvg() {
|
|
4762
|
-
if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
|
|
4763
|
-
return new Promise((resolve) =>
|
|
4764
|
-
once(this.$el, 'load', () => resolve(this.getSvg())));
|
|
4765
|
-
|
|
4766
|
-
}
|
|
4767
|
-
|
|
4768
|
-
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject('SVG not found.');
|
|
4769
|
-
},
|
|
4770
|
-
|
|
4771
|
-
applyAttributes(el, ref) {
|
|
4772
|
-
for (const prop in this.$options.props) {
|
|
4773
|
-
if (includes(this.include, prop) && prop in this) {
|
|
4774
|
-
attr(el, prop, this[prop]);
|
|
4775
|
-
}
|
|
4776
|
-
}
|
|
4777
|
-
|
|
4778
|
-
for (const attribute in this.attributes) {
|
|
4779
|
-
const [prop, value] = this.attributes[attribute].split(':', 2);
|
|
4780
|
-
attr(el, prop, value);
|
|
4781
|
-
}
|
|
4782
|
-
|
|
4783
|
-
if (!this.id) {
|
|
4784
|
-
removeAttr(el, 'id');
|
|
4646
|
+
if (dim[startProp] >= startDim[endProp] - 1 && dim[startProp] !== startDim[startProp]) {
|
|
4647
|
+
sorted.push([el]);
|
|
4648
|
+
break;
|
|
4785
4649
|
}
|
|
4786
4650
|
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
if (!dimensions.some((val) => val)) {
|
|
4791
|
-
dimensions = props.map((prop) => attr(ref, prop));
|
|
4651
|
+
if (dim[endProp] - 1 > startDim[startProp] || dim[startProp] === startDim[startProp]) {
|
|
4652
|
+
current.push(el);
|
|
4653
|
+
break;
|
|
4792
4654
|
}
|
|
4793
4655
|
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4656
|
+
if (i === 0) {
|
|
4657
|
+
sorted.unshift([el]);
|
|
4658
|
+
break;
|
|
4797
4659
|
}
|
|
4798
|
-
|
|
4799
|
-
dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));
|
|
4800
|
-
} } };
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
const loadSVG = memoize(async (src) => {
|
|
4805
|
-
if (src) {
|
|
4806
|
-
if (startsWith(src, 'data:')) {
|
|
4807
|
-
return decodeURIComponent(src.split(',')[1]);
|
|
4808
|
-
} else {
|
|
4809
|
-
return (await fetch(src)).text();
|
|
4810
4660
|
}
|
|
4811
|
-
} else {
|
|
4812
|
-
return Promise.reject();
|
|
4813
|
-
}
|
|
4814
|
-
});
|
|
4815
|
-
|
|
4816
|
-
function parseSVG(svg, icon) {var _svg;
|
|
4817
|
-
if (icon && includes(svg, '<symbol')) {
|
|
4818
|
-
svg = parseSymbols(svg, icon) || svg;
|
|
4819
4661
|
}
|
|
4820
4662
|
|
|
4821
|
-
|
|
4822
|
-
return ((_svg = svg) == null ? void 0 : _svg.hasChildNodes()) && svg;
|
|
4663
|
+
return sorted;
|
|
4823
4664
|
}
|
|
4824
4665
|
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
function parseSymbols(svg, icon) {
|
|
4829
|
-
if (!symbols[svg]) {
|
|
4830
|
-
symbols[svg] = {};
|
|
4831
|
-
|
|
4832
|
-
symbolRe.lastIndex = 0;
|
|
4666
|
+
function getOffset(element, offset) {if (offset === void 0) {offset = false;}
|
|
4667
|
+
let { offsetTop, offsetLeft, offsetHeight, offsetWidth } = element;
|
|
4833
4668
|
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
symbols[svg][match[3]] = "<svg xmlns=\"http://www.w3.org/2000/svg\"" + match[1] + "svg>";
|
|
4837
|
-
}
|
|
4669
|
+
if (offset) {
|
|
4670
|
+
[offsetTop, offsetLeft] = offsetPosition(element);
|
|
4838
4671
|
}
|
|
4839
4672
|
|
|
4840
|
-
return
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4673
|
+
return {
|
|
4674
|
+
top: offsetTop,
|
|
4675
|
+
left: offsetLeft,
|
|
4676
|
+
bottom: offsetTop + offsetHeight,
|
|
4677
|
+
right: offsetLeft + offsetWidth };
|
|
4845
4678
|
|
|
4846
|
-
if (length) {
|
|
4847
|
-
el.style.setProperty('--uk-animation-stroke', length);
|
|
4848
|
-
}
|
|
4849
4679
|
}
|
|
4850
4680
|
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
...$$('[stroke]', el).map((stroke) => {
|
|
4856
|
-
try {
|
|
4857
|
-
return stroke.getTotalLength();
|
|
4858
|
-
} catch (e) {
|
|
4859
|
-
return 0;
|
|
4860
|
-
}
|
|
4861
|
-
})));
|
|
4862
|
-
|
|
4681
|
+
var Scroll = {
|
|
4682
|
+
connected() {
|
|
4683
|
+
registerScrollListener(this._uid, () => this.$emit('scroll'));
|
|
4684
|
+
},
|
|
4863
4685
|
|
|
4864
|
-
|
|
4686
|
+
disconnected() {
|
|
4687
|
+
unregisterScrollListener(this._uid);
|
|
4688
|
+
} };
|
|
4865
4689
|
|
|
4866
|
-
function insertSVG(el, root) {
|
|
4867
|
-
if (isVoidElement(root) || isTag(root, 'canvas')) {
|
|
4868
|
-
root.hidden = true;
|
|
4869
4690
|
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4691
|
+
const scrollListeners = new Map();
|
|
4692
|
+
let unbindScrollListener;
|
|
4693
|
+
function registerScrollListener(id, listener) {
|
|
4694
|
+
unbindScrollListener =
|
|
4695
|
+
unbindScrollListener ||
|
|
4696
|
+
on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
|
|
4697
|
+
passive: true,
|
|
4698
|
+
capture: true });
|
|
4873
4699
|
|
|
4874
|
-
const last = root.lastElementChild;
|
|
4875
|
-
return equals(el, last) ? last : append(root, el);
|
|
4876
|
-
}
|
|
4877
4700
|
|
|
4878
|
-
|
|
4879
|
-
return isTag(el, 'svg') && isTag(other, 'svg') && innerHTML(el) === innerHTML(other);
|
|
4701
|
+
scrollListeners.set(id, listener);
|
|
4880
4702
|
}
|
|
4881
4703
|
|
|
4882
|
-
function
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4704
|
+
function unregisterScrollListener(id) {
|
|
4705
|
+
scrollListeners.delete(id);
|
|
4706
|
+
if (unbindScrollListener && !scrollListeners.size) {
|
|
4707
|
+
unbindScrollListener();
|
|
4708
|
+
unbindScrollListener = null;
|
|
4709
|
+
}
|
|
4887
4710
|
}
|
|
4888
4711
|
|
|
4889
|
-
var
|
|
4890
|
-
|
|
4891
|
-
var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>";
|
|
4712
|
+
var grid = {
|
|
4713
|
+
extends: Margin,
|
|
4892
4714
|
|
|
4893
|
-
|
|
4715
|
+
mixins: [Class, Scroll],
|
|
4894
4716
|
|
|
4895
|
-
|
|
4717
|
+
name: 'grid',
|
|
4896
4718
|
|
|
4897
|
-
|
|
4719
|
+
props: {
|
|
4720
|
+
masonry: Boolean,
|
|
4721
|
+
parallax: Number },
|
|
4898
4722
|
|
|
4899
|
-
var paginationNext = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 1 6 6 1 11\"/></svg>";
|
|
4900
4723
|
|
|
4901
|
-
|
|
4724
|
+
data: {
|
|
4725
|
+
margin: 'uk-grid-margin',
|
|
4726
|
+
clsStack: 'uk-grid-stack',
|
|
4727
|
+
masonry: false,
|
|
4728
|
+
parallax: 0 },
|
|
4902
4729
|
|
|
4903
|
-
var searchIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9\" cy=\"9\" r=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M14,14 L18,18 L14,14 Z\"/></svg>";
|
|
4904
4730
|
|
|
4905
|
-
|
|
4731
|
+
connected() {
|
|
4732
|
+
this.masonry && addClass(this.$el, 'uk-flex-top uk-flex-wrap-top');
|
|
4733
|
+
},
|
|
4906
4734
|
|
|
4907
|
-
|
|
4735
|
+
update: [
|
|
4736
|
+
{
|
|
4737
|
+
write(_ref) {let { columns } = _ref;
|
|
4738
|
+
toggleClass(this.$el, this.clsStack, columns.length < 2);
|
|
4739
|
+
},
|
|
4908
4740
|
|
|
4909
|
-
|
|
4741
|
+
events: ['resize'] },
|
|
4910
4742
|
|
|
4911
|
-
var slidenavNextLarge = "<svg width=\"25\" height=\"40\" viewBox=\"0 0 25 40\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"4.002,38.547 22.527,20.024 4,1.5 \"/></svg>";
|
|
4912
4743
|
|
|
4913
|
-
|
|
4744
|
+
{
|
|
4745
|
+
read(data) {
|
|
4746
|
+
let { columns, rows } = data;
|
|
4914
4747
|
|
|
4915
|
-
|
|
4748
|
+
// Filter component makes elements positioned absolute
|
|
4749
|
+
if (
|
|
4750
|
+
!columns.length ||
|
|
4751
|
+
!this.masonry && !this.parallax ||
|
|
4752
|
+
positionedAbsolute(this.$el))
|
|
4753
|
+
{
|
|
4754
|
+
data.translates = false;
|
|
4755
|
+
return false;
|
|
4756
|
+
}
|
|
4916
4757
|
|
|
4917
|
-
|
|
4758
|
+
let translates = false;
|
|
4918
4759
|
|
|
4919
|
-
|
|
4760
|
+
const nodes = children(this.$el);
|
|
4761
|
+
const columnHeights = getColumnHeights(columns);
|
|
4762
|
+
const margin = getMarginTop(nodes, this.margin) * (rows.length - 1);
|
|
4763
|
+
const elHeight = Math.max(...columnHeights) + margin;
|
|
4920
4764
|
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
'close-icon': closeIcon,
|
|
4926
|
-
'close-large': closeLarge,
|
|
4927
|
-
'navbar-toggle-icon': navbarToggleIcon,
|
|
4928
|
-
'overlay-icon': overlayIcon,
|
|
4929
|
-
'pagination-next': paginationNext,
|
|
4930
|
-
'pagination-previous': paginationPrevious,
|
|
4931
|
-
'search-icon': searchIcon,
|
|
4932
|
-
'search-large': searchLarge,
|
|
4933
|
-
'search-navbar': searchNavbar,
|
|
4934
|
-
'slidenav-next': slidenavNext,
|
|
4935
|
-
'slidenav-next-large': slidenavNextLarge,
|
|
4936
|
-
'slidenav-previous': slidenavPrevious,
|
|
4937
|
-
'slidenav-previous-large': slidenavPreviousLarge };
|
|
4765
|
+
if (this.masonry) {
|
|
4766
|
+
columns = columns.map((column) => sortBy$1(column, 'offsetTop'));
|
|
4767
|
+
translates = getTranslates(rows, columns);
|
|
4768
|
+
}
|
|
4938
4769
|
|
|
4770
|
+
let padding = Math.abs(this.parallax);
|
|
4771
|
+
if (padding) {
|
|
4772
|
+
padding = columnHeights.reduce(
|
|
4773
|
+
(newPadding, hgt, i) =>
|
|
4774
|
+
Math.max(
|
|
4775
|
+
newPadding,
|
|
4776
|
+
hgt + margin + (i % 2 ? padding : padding / 8) - elHeight),
|
|
4939
4777
|
|
|
4940
|
-
|
|
4941
|
-
install: install$1,
|
|
4778
|
+
0);
|
|
4942
4779
|
|
|
4943
|
-
|
|
4780
|
+
}
|
|
4944
4781
|
|
|
4945
|
-
|
|
4782
|
+
return { padding, columns, translates, height: translates ? elHeight : '' };
|
|
4783
|
+
},
|
|
4946
4784
|
|
|
4947
|
-
|
|
4785
|
+
write(_ref2) {let { height, padding } = _ref2;
|
|
4786
|
+
css(this.$el, 'paddingBottom', padding || '');
|
|
4787
|
+
height !== false && css(this.$el, 'height', height);
|
|
4788
|
+
},
|
|
4948
4789
|
|
|
4949
|
-
|
|
4950
|
-
include: ['focusable'] },
|
|
4790
|
+
events: ['resize'] },
|
|
4951
4791
|
|
|
4952
4792
|
|
|
4953
|
-
|
|
4793
|
+
{
|
|
4794
|
+
read() {
|
|
4795
|
+
if (this.parallax && positionedAbsolute(this.$el)) {
|
|
4796
|
+
return false;
|
|
4797
|
+
}
|
|
4954
4798
|
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4799
|
+
return {
|
|
4800
|
+
scrolled: this.parallax ?
|
|
4801
|
+
scrolledOver(this.$el) * Math.abs(this.parallax) :
|
|
4802
|
+
false };
|
|
4958
4803
|
|
|
4959
|
-
|
|
4960
|
-
async getSvg() {
|
|
4961
|
-
const icon = getIcon(this.icon);
|
|
4804
|
+
},
|
|
4962
4805
|
|
|
4963
|
-
|
|
4964
|
-
|
|
4806
|
+
write(_ref3) {let { columns, scrolled, translates } = _ref3;
|
|
4807
|
+
if (scrolled === false && !translates) {
|
|
4808
|
+
return;
|
|
4965
4809
|
}
|
|
4966
4810
|
|
|
4967
|
-
|
|
4968
|
-
|
|
4811
|
+
columns.forEach((column, i) =>
|
|
4812
|
+
column.forEach((el, j) =>
|
|
4813
|
+
css(
|
|
4814
|
+
el,
|
|
4815
|
+
'transform',
|
|
4816
|
+
!scrolled && !translates ?
|
|
4817
|
+
'' : "translateY(" + (
|
|
4969
4818
|
|
|
4970
|
-
|
|
4971
|
-
|
|
4819
|
+
(translates && -translates[i][j]) + (
|
|
4820
|
+
scrolled ? i % 2 ? scrolled : scrolled / 8 : 0)) + "px)")));
|
|
4972
4821
|
|
|
4973
|
-
extends: Icon,
|
|
4974
4822
|
|
|
4975
|
-
data: (vm) => ({
|
|
4976
|
-
icon: hyphenate(vm.constructor.options.name) }),
|
|
4977
4823
|
|
|
4978
4824
|
|
|
4979
|
-
|
|
4980
|
-
addClass(this.$el, this.$name);
|
|
4981
|
-
} };
|
|
4825
|
+
},
|
|
4982
4826
|
|
|
4827
|
+
events: ['scroll', 'resize'] }] };
|
|
4983
4828
|
|
|
4984
|
-
const Slidenav = {
|
|
4985
|
-
extends: IconComponent,
|
|
4986
4829
|
|
|
4987
|
-
beforeConnect() {
|
|
4988
|
-
addClass(this.$el, 'uk-slidenav');
|
|
4989
|
-
const icon = this.$props.icon;
|
|
4990
|
-
this.icon = hasClass(this.$el, 'uk-slidenav-large') ? icon + "-large" : icon;
|
|
4991
|
-
} };
|
|
4992
4830
|
|
|
4993
4831
|
|
|
4994
|
-
|
|
4995
|
-
|
|
4832
|
+
function positionedAbsolute(el) {
|
|
4833
|
+
return children(el).some((el) => css(el, 'position') === 'absolute');
|
|
4834
|
+
}
|
|
4996
4835
|
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
hasClass(this.$el, 'uk-search-icon') && parents(this.$el, '.uk-search-large').length ?
|
|
5000
|
-
'search-large' :
|
|
5001
|
-
parents(this.$el, '.uk-search-navbar').length ?
|
|
5002
|
-
'search-navbar' :
|
|
5003
|
-
this.$props.icon;
|
|
5004
|
-
} };
|
|
4836
|
+
function getTranslates(rows, columns) {
|
|
4837
|
+
const rowHeights = rows.map((row) => Math.max(...row.map((el) => el.offsetHeight)));
|
|
5005
4838
|
|
|
4839
|
+
return columns.map((elements) => {
|
|
4840
|
+
let prev = 0;
|
|
4841
|
+
return elements.map(
|
|
4842
|
+
(element, row) =>
|
|
4843
|
+
prev += row ? rowHeights[row - 1] - elements[row - 1].offsetHeight : 0);
|
|
5006
4844
|
|
|
5007
|
-
|
|
5008
|
-
|
|
4845
|
+
});
|
|
4846
|
+
}
|
|
5009
4847
|
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
} };
|
|
4848
|
+
function getMarginTop(nodes, cls) {
|
|
4849
|
+
const [node] = nodes.filter((el) => hasClass(el, cls));
|
|
5013
4850
|
|
|
4851
|
+
return toFloat(node ? css(node, 'marginTop') : css(nodes[0], 'paddingLeft'));
|
|
4852
|
+
}
|
|
5014
4853
|
|
|
5015
|
-
|
|
5016
|
-
|
|
4854
|
+
function getColumnHeights(columns) {
|
|
4855
|
+
return columns.map((column) => column.reduce((sum, el) => sum + el.offsetHeight, 0));
|
|
4856
|
+
}
|
|
5017
4857
|
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
const icon = await Icon.methods.getSvg.call(this);
|
|
4858
|
+
var heightMatch = {
|
|
4859
|
+
mixins: [Resize],
|
|
5021
4860
|
|
|
5022
|
-
|
|
5023
|
-
css($('circle', icon), 'strokeWidth', 1 / this.ratio);
|
|
5024
|
-
}
|
|
4861
|
+
args: 'target',
|
|
5025
4862
|
|
|
5026
|
-
|
|
5027
|
-
|
|
4863
|
+
props: {
|
|
4864
|
+
target: String,
|
|
4865
|
+
row: Boolean },
|
|
5028
4866
|
|
|
5029
4867
|
|
|
4868
|
+
data: {
|
|
4869
|
+
target: '> *',
|
|
4870
|
+
row: true },
|
|
5030
4871
|
|
|
5031
|
-
const parsed = {};
|
|
5032
|
-
function install$1(UIkit) {
|
|
5033
|
-
UIkit.icon.add = (name, svg) => {
|
|
5034
|
-
const added = isString(name) ? { [name]: svg } : name;
|
|
5035
|
-
each(added, (svg, name) => {
|
|
5036
|
-
icons[name] = svg;
|
|
5037
|
-
delete parsed[name];
|
|
5038
|
-
});
|
|
5039
4872
|
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
}
|
|
4873
|
+
computed: {
|
|
4874
|
+
elements: {
|
|
4875
|
+
get(_ref, $el) {let { target } = _ref;
|
|
4876
|
+
return $$(target, $el);
|
|
4877
|
+
},
|
|
5045
4878
|
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
4879
|
+
watch() {
|
|
4880
|
+
this.$reset();
|
|
4881
|
+
} } },
|
|
5049
4882
|
|
|
5050
|
-
function getIcon(icon) {
|
|
5051
|
-
if (!icons[icon]) {
|
|
5052
|
-
return null;
|
|
5053
|
-
}
|
|
5054
4883
|
|
|
5055
|
-
if (!parsed[icon]) {
|
|
5056
|
-
parsed[icon] = $((icons[applyRtl(icon)] || icons[icon]).trim());
|
|
5057
|
-
}
|
|
5058
4884
|
|
|
5059
|
-
|
|
5060
|
-
|
|
4885
|
+
resizeTargets() {
|
|
4886
|
+
return [this.$el, ...this.elements];
|
|
4887
|
+
},
|
|
5061
4888
|
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
4889
|
+
update: {
|
|
4890
|
+
read() {
|
|
4891
|
+
return {
|
|
4892
|
+
rows: (this.row ? getRows(this.elements) : [this.elements]).map(match) };
|
|
5065
4893
|
|
|
5066
|
-
|
|
4894
|
+
},
|
|
5067
4895
|
|
|
5068
|
-
|
|
5069
|
-
|
|
4896
|
+
write(_ref2) {let { rows } = _ref2;
|
|
4897
|
+
for (const { heights, elements } of rows) {
|
|
4898
|
+
elements.forEach((el, i) => css(el, 'minHeight', heights[i]));
|
|
4899
|
+
}
|
|
4900
|
+
},
|
|
5070
4901
|
|
|
5071
|
-
|
|
5072
|
-
dataSrc: String,
|
|
5073
|
-
sources: String,
|
|
5074
|
-
offsetTop: String,
|
|
5075
|
-
offsetLeft: String,
|
|
5076
|
-
target: String,
|
|
5077
|
-
loading: String },
|
|
4902
|
+
events: ['resize'] } };
|
|
5078
4903
|
|
|
5079
4904
|
|
|
5080
|
-
data: {
|
|
5081
|
-
dataSrc: '',
|
|
5082
|
-
sources: false,
|
|
5083
|
-
offsetTop: '50vh',
|
|
5084
|
-
offsetLeft: '50vw',
|
|
5085
|
-
target: false,
|
|
5086
|
-
loading: 'lazy' },
|
|
5087
4905
|
|
|
4906
|
+
function match(elements) {
|
|
4907
|
+
if (elements.length < 2) {
|
|
4908
|
+
return { heights: [''], elements };
|
|
4909
|
+
}
|
|
5088
4910
|
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
return;
|
|
5093
|
-
}
|
|
4911
|
+
css(elements, 'minHeight', '');
|
|
4912
|
+
let heights = elements.map(getHeight);
|
|
4913
|
+
const max = Math.max(...heights);
|
|
5094
4914
|
|
|
5095
|
-
|
|
4915
|
+
return {
|
|
4916
|
+
heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? '' : max),
|
|
4917
|
+
elements };
|
|
5096
4918
|
|
|
5097
|
-
|
|
5098
|
-
this.$el.loading = 'lazy';
|
|
5099
|
-
setSrcAttrs(this.$el);
|
|
4919
|
+
}
|
|
5100
4920
|
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
4921
|
+
function getHeight(element) {
|
|
4922
|
+
let style = false;
|
|
4923
|
+
if (!isVisible(element)) {
|
|
4924
|
+
style = element.style.display;
|
|
4925
|
+
css(element, 'display', 'block', 'important');
|
|
4926
|
+
}
|
|
5105
4927
|
|
|
5106
|
-
|
|
4928
|
+
const height = dimensions(element).height - boxModelAdjust(element, 'height', 'content-box');
|
|
5107
4929
|
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
(entries, observer) => {
|
|
5112
|
-
this.load();
|
|
5113
|
-
observer.disconnect();
|
|
5114
|
-
},
|
|
5115
|
-
{
|
|
5116
|
-
rootMargin: toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
5117
|
-
this.offsetLeft,
|
|
5118
|
-
'width') + "px" }));
|
|
4930
|
+
if (style !== false) {
|
|
4931
|
+
css(element, 'display', style);
|
|
4932
|
+
}
|
|
5119
4933
|
|
|
4934
|
+
return height;
|
|
4935
|
+
}
|
|
5120
4936
|
|
|
4937
|
+
var heightViewport = {
|
|
4938
|
+
mixins: [Resize],
|
|
5121
4939
|
|
|
4940
|
+
props: {
|
|
4941
|
+
expand: Boolean,
|
|
4942
|
+
offsetTop: Boolean,
|
|
4943
|
+
offsetBottom: Boolean,
|
|
4944
|
+
minHeight: Number },
|
|
5122
4945
|
|
|
5123
|
-
},
|
|
5124
4946
|
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
4947
|
+
data: {
|
|
4948
|
+
expand: false,
|
|
4949
|
+
offsetTop: false,
|
|
4950
|
+
offsetBottom: false,
|
|
4951
|
+
minHeight: 0 },
|
|
4952
|
+
|
|
4953
|
+
|
|
4954
|
+
resizeTargets() {
|
|
4955
|
+
// check for offsetTop change
|
|
4956
|
+
return [this.$el, ...scrollParents(this.$el, /auto|scroll/)];
|
|
5129
4957
|
},
|
|
5130
4958
|
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
if (this
|
|
5134
|
-
return
|
|
4959
|
+
update: {
|
|
4960
|
+
read(_ref) {let { minHeight: prev } = _ref;
|
|
4961
|
+
if (!isVisible(this.$el)) {
|
|
4962
|
+
return false;
|
|
5135
4963
|
}
|
|
5136
4964
|
|
|
5137
|
-
|
|
5138
|
-
this.$el
|
|
5139
|
-
getImageFromElement(this.$el, this.dataSrc, this.sources);
|
|
5140
|
-
|
|
5141
|
-
removeAttr(image, 'loading');
|
|
5142
|
-
setSrcAttrs(this.$el, image.currentSrc);
|
|
5143
|
-
return this._data.image = image;
|
|
5144
|
-
} } };
|
|
4965
|
+
let minHeight = '';
|
|
4966
|
+
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
5145
4967
|
|
|
4968
|
+
const { body, scrollingElement } = document;
|
|
4969
|
+
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4970
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4971
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
5146
4972
|
|
|
5147
4973
|
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
4974
|
+
if (this.expand) {
|
|
4975
|
+
minHeight = Math.max(
|
|
4976
|
+
viewportHeight - (
|
|
4977
|
+
dimensions(scrollElement).height - dimensions(this.$el).height) -
|
|
4978
|
+
box,
|
|
4979
|
+
0);
|
|
4980
|
+
|
|
4981
|
+
} else {
|
|
4982
|
+
const isScrollingElement =
|
|
4983
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
4984
|
+
|
|
4985
|
+
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4986
|
+
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
4987
|
+
|
|
4988
|
+
if (this.offsetTop) {
|
|
4989
|
+
if (isScrollingElement) {
|
|
4990
|
+
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4991
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4992
|
+
} else {
|
|
4993
|
+
minHeight += " - " + css(scrollElement, 'paddingTop');
|
|
4994
|
+
}
|
|
4995
|
+
}
|
|
4996
|
+
|
|
4997
|
+
if (this.offsetBottom === true) {
|
|
4998
|
+
minHeight += " - " + dimensions(this.$el.nextElementSibling).height + "px";
|
|
4999
|
+
} else if (isNumeric(this.offsetBottom)) {
|
|
5000
|
+
minHeight += " - " + this.offsetBottom + "vh";
|
|
5001
|
+
} else if (this.offsetBottom && endsWith(this.offsetBottom, 'px')) {
|
|
5002
|
+
minHeight += " - " + toFloat(this.offsetBottom) + "px";
|
|
5003
|
+
} else if (isString(this.offsetBottom)) {
|
|
5004
|
+
minHeight += " - " + dimensions(query(this.offsetBottom, this.$el)).height + "px";
|
|
5005
|
+
}
|
|
5006
|
+
|
|
5007
|
+
minHeight += (box ? " - " + box + "px" : '') + ")";
|
|
5008
|
+
}
|
|
5009
|
+
|
|
5010
|
+
return { minHeight, prev };
|
|
5011
|
+
},
|
|
5012
|
+
|
|
5013
|
+
write(_ref2) {let { minHeight } = _ref2;
|
|
5014
|
+
css(this.$el, { minHeight });
|
|
5015
|
+
|
|
5016
|
+
if (this.minHeight && toFloat(css(this.$el, 'minHeight')) < this.minHeight) {
|
|
5017
|
+
css(this.$el, 'minHeight', this.minHeight);
|
|
5018
|
+
}
|
|
5019
|
+
},
|
|
5020
|
+
|
|
5021
|
+
events: ['resize'] } };
|
|
5022
|
+
|
|
5023
|
+
var SVG = {
|
|
5024
|
+
args: 'src',
|
|
5025
|
+
|
|
5026
|
+
props: {
|
|
5027
|
+
id: Boolean,
|
|
5028
|
+
icon: String,
|
|
5029
|
+
src: String,
|
|
5030
|
+
style: String,
|
|
5031
|
+
width: Number,
|
|
5032
|
+
height: Number,
|
|
5033
|
+
ratio: Number,
|
|
5034
|
+
class: String,
|
|
5035
|
+
strokeAnimation: Boolean,
|
|
5036
|
+
focusable: Boolean, // IE 11
|
|
5037
|
+
attributes: 'list' },
|
|
5038
|
+
|
|
5039
|
+
|
|
5040
|
+
data: {
|
|
5041
|
+
ratio: 1,
|
|
5042
|
+
include: ['style', 'class', 'focusable'],
|
|
5043
|
+
class: '',
|
|
5044
|
+
strokeAnimation: false },
|
|
5045
|
+
|
|
5046
|
+
|
|
5047
|
+
beforeConnect() {
|
|
5048
|
+
this.class += ' uk-svg';
|
|
5049
|
+
},
|
|
5050
|
+
|
|
5051
|
+
connected() {
|
|
5052
|
+
if (!this.icon && includes(this.src, '#')) {
|
|
5053
|
+
[this.src, this.icon] = this.src.split('#');
|
|
5158
5054
|
}
|
|
5159
|
-
}
|
|
5160
|
-
}
|
|
5161
5055
|
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5056
|
+
this.svg = this.getSvg().then((el) => {
|
|
5057
|
+
if (this._connected) {
|
|
5058
|
+
const svg = insertSVG(el, this.$el);
|
|
5059
|
+
|
|
5060
|
+
if (this.svgEl && svg !== this.svgEl) {
|
|
5061
|
+
remove$1(this.svgEl);
|
|
5062
|
+
}
|
|
5063
|
+
|
|
5064
|
+
this.applyAttributes(svg, el);
|
|
5065
|
+
|
|
5066
|
+
return this.svgEl = svg;
|
|
5067
|
+
}
|
|
5068
|
+
}, noop);
|
|
5069
|
+
|
|
5070
|
+
if (this.strokeAnimation) {
|
|
5071
|
+
this.svg.then((el) => {
|
|
5072
|
+
if (this._connected) {
|
|
5073
|
+
applyAnimation(el);
|
|
5074
|
+
this.registerObserver(
|
|
5075
|
+
observeIntersection(el, (records, observer) => {
|
|
5076
|
+
applyAnimation(el);
|
|
5077
|
+
observer.disconnect();
|
|
5078
|
+
}));
|
|
5079
|
+
|
|
5080
|
+
}
|
|
5081
|
+
});
|
|
5168
5082
|
}
|
|
5169
|
-
}
|
|
5170
|
-
}
|
|
5083
|
+
},
|
|
5171
5084
|
|
|
5172
|
-
|
|
5173
|
-
|
|
5085
|
+
disconnected() {
|
|
5086
|
+
this.svg.then((svg) => {
|
|
5087
|
+
if (this._connected) {
|
|
5088
|
+
return;
|
|
5089
|
+
}
|
|
5174
5090
|
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5091
|
+
if (isVoidElement(this.$el)) {
|
|
5092
|
+
this.$el.hidden = false;
|
|
5093
|
+
}
|
|
5094
|
+
|
|
5095
|
+
remove$1(svg);
|
|
5096
|
+
this.svgEl = null;
|
|
5097
|
+
});
|
|
5098
|
+
|
|
5099
|
+
this.svg = null;
|
|
5100
|
+
},
|
|
5101
|
+
|
|
5102
|
+
methods: {
|
|
5103
|
+
async getSvg() {
|
|
5104
|
+
if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
|
|
5105
|
+
return new Promise((resolve) =>
|
|
5106
|
+
once(this.$el, 'load', () => resolve(this.getSvg())));
|
|
5107
|
+
|
|
5108
|
+
}
|
|
5109
|
+
|
|
5110
|
+
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject('SVG not found.');
|
|
5111
|
+
},
|
|
5112
|
+
|
|
5113
|
+
applyAttributes(el, ref) {
|
|
5114
|
+
for (const prop in this.$options.props) {
|
|
5115
|
+
if (includes(this.include, prop) && prop in this) {
|
|
5116
|
+
attr(el, prop, this[prop]);
|
|
5117
|
+
}
|
|
5118
|
+
}
|
|
5119
|
+
|
|
5120
|
+
for (const attribute in this.attributes) {
|
|
5121
|
+
const [prop, value] = this.attributes[attribute].split(':', 2);
|
|
5122
|
+
attr(el, prop, value);
|
|
5123
|
+
}
|
|
5124
|
+
|
|
5125
|
+
if (!this.id) {
|
|
5126
|
+
removeAttr(el, 'id');
|
|
5127
|
+
}
|
|
5128
|
+
|
|
5129
|
+
const props = ['width', 'height'];
|
|
5130
|
+
let dimensions = props.map((prop) => this[prop]);
|
|
5131
|
+
|
|
5132
|
+
if (!dimensions.some((val) => val)) {
|
|
5133
|
+
dimensions = props.map((prop) => attr(ref, prop));
|
|
5134
|
+
}
|
|
5135
|
+
|
|
5136
|
+
const viewBox = attr(ref, 'viewBox');
|
|
5137
|
+
if (viewBox && !dimensions.some((val) => val)) {
|
|
5138
|
+
dimensions = viewBox.split(' ').slice(2);
|
|
5139
|
+
}
|
|
5140
|
+
|
|
5141
|
+
dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));
|
|
5142
|
+
} } };
|
|
5143
|
+
|
|
5144
|
+
|
|
5145
|
+
|
|
5146
|
+
const loadSVG = memoize(async (src) => {
|
|
5147
|
+
if (src) {
|
|
5148
|
+
if (startsWith(src, 'data:')) {
|
|
5149
|
+
return decodeURIComponent(src.split(',')[1]);
|
|
5150
|
+
} else {
|
|
5151
|
+
return (await fetch(src)).text();
|
|
5152
|
+
}
|
|
5153
|
+
} else {
|
|
5154
|
+
return Promise.reject();
|
|
5155
|
+
}
|
|
5156
|
+
});
|
|
5157
|
+
|
|
5158
|
+
function parseSVG(svg, icon) {var _svg;
|
|
5159
|
+
if (icon && includes(svg, '<symbol')) {
|
|
5160
|
+
svg = parseSymbols(svg, icon) || svg;
|
|
5161
|
+
}
|
|
5162
|
+
|
|
5163
|
+
svg = $(svg.substr(svg.indexOf('<svg')));
|
|
5164
|
+
return ((_svg = svg) == null ? void 0 : _svg.hasChildNodes()) && svg;
|
|
5182
5165
|
}
|
|
5183
5166
|
|
|
5184
|
-
|
|
5185
|
-
|
|
5167
|
+
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
5168
|
+
const symbols = {};
|
|
5186
5169
|
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5170
|
+
function parseSymbols(svg, icon) {
|
|
5171
|
+
if (!symbols[svg]) {
|
|
5172
|
+
symbols[svg] = {};
|
|
5173
|
+
|
|
5174
|
+
symbolRe.lastIndex = 0;
|
|
5175
|
+
|
|
5176
|
+
let match;
|
|
5177
|
+
while (match = symbolRe.exec(svg)) {
|
|
5178
|
+
symbols[svg][match[3]] = "<svg xmlns=\"http://www.w3.org/2000/svg\"" + match[1] + "svg>";
|
|
5193
5179
|
}
|
|
5194
|
-
append(picture, img);
|
|
5195
5180
|
}
|
|
5181
|
+
|
|
5182
|
+
return symbols[svg][icon];
|
|
5196
5183
|
}
|
|
5197
5184
|
|
|
5198
|
-
function
|
|
5199
|
-
|
|
5200
|
-
|
|
5185
|
+
function applyAnimation(el) {
|
|
5186
|
+
const length = getMaxPathLength(el);
|
|
5187
|
+
|
|
5188
|
+
if (length) {
|
|
5189
|
+
el.style.setProperty('--uk-animation-stroke', length);
|
|
5201
5190
|
}
|
|
5191
|
+
}
|
|
5202
5192
|
|
|
5203
|
-
|
|
5193
|
+
function getMaxPathLength(el) {
|
|
5194
|
+
return Math.ceil(
|
|
5195
|
+
Math.max(
|
|
5196
|
+
0,
|
|
5197
|
+
...$$('[stroke]', el).map((stroke) => {
|
|
5204
5198
|
try {
|
|
5205
|
-
|
|
5199
|
+
return stroke.getTotalLength();
|
|
5206
5200
|
} catch (e) {
|
|
5207
|
-
|
|
5201
|
+
return 0;
|
|
5208
5202
|
}
|
|
5209
|
-
}
|
|
5210
|
-
sources = parseOptions(sources);
|
|
5211
|
-
}
|
|
5203
|
+
})));
|
|
5212
5204
|
|
|
5213
|
-
if (!isArray(sources)) {
|
|
5214
|
-
sources = [sources];
|
|
5215
|
-
}
|
|
5216
5205
|
|
|
5217
|
-
return sources.filter((source) => !isEmpty(source));
|
|
5218
5206
|
}
|
|
5219
5207
|
|
|
5220
|
-
function
|
|
5221
|
-
if (
|
|
5222
|
-
|
|
5208
|
+
function insertSVG(el, root) {
|
|
5209
|
+
if (isVoidElement(root) || isTag(root, 'canvas')) {
|
|
5210
|
+
root.hidden = true;
|
|
5211
|
+
|
|
5212
|
+
const next = root.nextElementSibling;
|
|
5213
|
+
return equals(el, next) ? next : after(root, el);
|
|
5223
5214
|
}
|
|
5215
|
+
|
|
5216
|
+
const last = root.lastElementChild;
|
|
5217
|
+
return equals(el, last) ? last : append(root, el);
|
|
5224
5218
|
}
|
|
5225
5219
|
|
|
5226
|
-
function
|
|
5227
|
-
return isTag(el, '
|
|
5220
|
+
function equals(el, other) {
|
|
5221
|
+
return isTag(el, 'svg') && isTag(other, 'svg') && innerHTML(el) === innerHTML(other);
|
|
5228
5222
|
}
|
|
5229
5223
|
|
|
5230
|
-
function
|
|
5231
|
-
return
|
|
5224
|
+
function innerHTML(el) {
|
|
5225
|
+
return (
|
|
5226
|
+
el.innerHTML ||
|
|
5227
|
+
new XMLSerializer().serializeToString(el).replace(/<svg.*?>(.*?)<\/svg>/g, '$1')).
|
|
5228
|
+
replace(/\s/g, '');
|
|
5232
5229
|
}
|
|
5233
5230
|
|
|
5234
|
-
var
|
|
5235
|
-
|
|
5236
|
-
|
|
5231
|
+
var closeIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"1\" y1=\"1\" x2=\"13\" y2=\"13\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"13\" y1=\"1\" x2=\"1\" y2=\"13\"/></svg>";
|
|
5232
|
+
|
|
5233
|
+
var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>";
|
|
5234
|
+
|
|
5235
|
+
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>";
|
|
5236
|
+
|
|
5237
|
+
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>";
|
|
5238
|
+
|
|
5239
|
+
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>";
|
|
5240
|
+
|
|
5241
|
+
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>";
|
|
5242
|
+
|
|
5243
|
+
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>";
|
|
5244
|
+
|
|
5245
|
+
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>";
|
|
5246
|
+
|
|
5247
|
+
var paginationNext = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 1 6 6 1 11\"/></svg>";
|
|
5248
|
+
|
|
5249
|
+
var paginationPrevious = "<svg width=\"7\" height=\"12\" viewBox=\"0 0 7 12\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"6 1 1 6 6 11\"/></svg>";
|
|
5250
|
+
|
|
5251
|
+
var searchIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"9\" cy=\"9\" r=\"7\"/><path fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" d=\"M14,14 L18,18 L14,14 Z\"/></svg>";
|
|
5252
|
+
|
|
5253
|
+
var searchLarge = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" cx=\"17.5\" cy=\"17.5\" r=\"16.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.8\" x1=\"38\" y1=\"39\" x2=\"29\" y2=\"30\"/></svg>";
|
|
5254
|
+
|
|
5255
|
+
var searchNavbar = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" cx=\"10.5\" cy=\"10.5\" r=\"9.5\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"23\" y1=\"23\" x2=\"17\" y2=\"17\"/></svg>";
|
|
5256
|
+
|
|
5257
|
+
var slidenavNext = "<svg width=\"14\" height=\"24\" viewBox=\"0 0 14 24\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"1.225,23 12.775,12 1.225,1 \"/></svg>";
|
|
5258
|
+
|
|
5259
|
+
var slidenavNextLarge = "<svg width=\"25\" height=\"40\" viewBox=\"0 0 25 40\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"4.002,38.547 22.527,20.024 4,1.5 \"/></svg>";
|
|
5260
|
+
|
|
5261
|
+
var slidenavPrevious = "<svg width=\"14\" height=\"24\" viewBox=\"0 0 14 24\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" points=\"12.775,1 1.225,12 12.775,23 \"/></svg>";
|
|
5262
|
+
|
|
5263
|
+
var slidenavPreviousLarge = "<svg width=\"25\" height=\"40\" viewBox=\"0 0 25 40\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"2\" points=\"20.527,1.5 2,20.024 20.525,38.547 \"/></svg>";
|
|
5264
|
+
|
|
5265
|
+
var spinner = "<svg width=\"30\" height=\"30\" viewBox=\"0 0 30 30\" xmlns=\"http://www.w3.org/2000/svg\"><circle fill=\"none\" stroke=\"#000\" cx=\"15\" cy=\"15\" r=\"14\"/></svg>";
|
|
5237
5266
|
|
|
5267
|
+
var totop = "<svg width=\"18\" height=\"10\" viewBox=\"0 0 18 10\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.2\" points=\"1 9 9 1 17 9 \"/></svg>";
|
|
5268
|
+
|
|
5269
|
+
const icons = {
|
|
5270
|
+
spinner,
|
|
5271
|
+
totop,
|
|
5272
|
+
marker,
|
|
5273
|
+
'close-icon': closeIcon,
|
|
5274
|
+
'close-large': closeLarge,
|
|
5275
|
+
'nav-parent-icon': navParentIcon,
|
|
5276
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5277
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
5278
|
+
'navbar-toggle-icon': navbarToggleIcon,
|
|
5279
|
+
'overlay-icon': overlayIcon,
|
|
5280
|
+
'pagination-next': paginationNext,
|
|
5281
|
+
'pagination-previous': paginationPrevious,
|
|
5282
|
+
'search-icon': searchIcon,
|
|
5283
|
+
'search-large': searchLarge,
|
|
5284
|
+
'search-navbar': searchNavbar,
|
|
5285
|
+
'slidenav-next': slidenavNext,
|
|
5286
|
+
'slidenav-next-large': slidenavNextLarge,
|
|
5287
|
+
'slidenav-previous': slidenavPrevious,
|
|
5288
|
+
'slidenav-previous-large': slidenavPreviousLarge };
|
|
5289
|
+
|
|
5290
|
+
|
|
5291
|
+
const Icon = {
|
|
5292
|
+
install: install$1,
|
|
5293
|
+
|
|
5294
|
+
extends: SVG,
|
|
5295
|
+
|
|
5296
|
+
args: 'icon',
|
|
5297
|
+
|
|
5298
|
+
props: ['icon'],
|
|
5238
5299
|
|
|
5239
5300
|
data: {
|
|
5240
|
-
|
|
5301
|
+
include: ['focusable'] },
|
|
5241
5302
|
|
|
5242
5303
|
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
this.mediaObj = window.matchMedia(media);
|
|
5248
|
-
const handler = () => {
|
|
5249
|
-
this.matchMedia = this.mediaObj.matches;
|
|
5250
|
-
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5251
|
-
};
|
|
5252
|
-
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5253
|
-
handler();
|
|
5254
|
-
this.$emit('resize');
|
|
5255
|
-
});
|
|
5256
|
-
handler();
|
|
5257
|
-
}
|
|
5304
|
+
isIcon: true,
|
|
5305
|
+
|
|
5306
|
+
beforeConnect() {
|
|
5307
|
+
addClass(this.$el, 'uk-icon');
|
|
5258
5308
|
},
|
|
5259
5309
|
|
|
5260
|
-
|
|
5261
|
-
(
|
|
5310
|
+
methods: {
|
|
5311
|
+
async getSvg() {
|
|
5312
|
+
const icon = getIcon(this.icon);
|
|
5313
|
+
|
|
5314
|
+
if (!icon) {
|
|
5315
|
+
throw 'Icon not found.';
|
|
5316
|
+
}
|
|
5317
|
+
|
|
5318
|
+
return icon;
|
|
5319
|
+
} } };
|
|
5320
|
+
|
|
5321
|
+
const IconComponent = {
|
|
5322
|
+
args: false,
|
|
5323
|
+
|
|
5324
|
+
extends: Icon,
|
|
5325
|
+
|
|
5326
|
+
data: (vm) => ({
|
|
5327
|
+
icon: hyphenate(vm.constructor.options.name) }),
|
|
5328
|
+
|
|
5329
|
+
|
|
5330
|
+
beforeConnect() {
|
|
5331
|
+
addClass(this.$el, this.$name);
|
|
5262
5332
|
} };
|
|
5263
5333
|
|
|
5264
5334
|
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
if (startsWith(value, '@')) {
|
|
5268
|
-
const name = "breakpoint-" + value.substr(1);
|
|
5269
|
-
value = toFloat(getCssVar(name));
|
|
5270
|
-
} else if (isNaN(value)) {
|
|
5271
|
-
return value;
|
|
5272
|
-
}
|
|
5273
|
-
}
|
|
5335
|
+
const NavParentIcon = {
|
|
5336
|
+
extends: IconComponent,
|
|
5274
5337
|
|
|
5275
|
-
|
|
5276
|
-
|
|
5338
|
+
beforeConnect() {
|
|
5339
|
+
const icon = this.$props.icon;
|
|
5340
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5341
|
+
} };
|
|
5277
5342
|
|
|
5278
|
-
var leader = {
|
|
5279
|
-
mixins: [Class, Media, Resize],
|
|
5280
5343
|
|
|
5281
|
-
|
|
5282
|
-
|
|
5344
|
+
const Slidenav = {
|
|
5345
|
+
extends: IconComponent,
|
|
5346
|
+
|
|
5347
|
+
beforeConnect() {
|
|
5348
|
+
addClass(this.$el, 'uk-slidenav');
|
|
5349
|
+
const icon = this.$props.icon;
|
|
5350
|
+
this.icon = hasClass(this.$el, 'uk-slidenav-large') ? icon + "-large" : icon;
|
|
5351
|
+
} };
|
|
5283
5352
|
|
|
5284
5353
|
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
clsWrapper: 'uk-leader-fill',
|
|
5288
|
-
clsHide: 'uk-leader-hide',
|
|
5289
|
-
attrFill: 'data-fill' },
|
|
5354
|
+
const Search = {
|
|
5355
|
+
extends: IconComponent,
|
|
5290
5356
|
|
|
5357
|
+
beforeConnect() {
|
|
5358
|
+
this.icon =
|
|
5359
|
+
hasClass(this.$el, 'uk-search-icon') && parents(this.$el, '.uk-search-large').length ?
|
|
5360
|
+
'search-large' :
|
|
5361
|
+
parents(this.$el, '.uk-search-navbar').length ?
|
|
5362
|
+
'search-navbar' :
|
|
5363
|
+
this.$props.icon;
|
|
5364
|
+
} };
|
|
5291
5365
|
|
|
5292
|
-
computed: {
|
|
5293
|
-
fill(_ref) {let { fill } = _ref;
|
|
5294
|
-
return fill || getCssVar('leader-fill-content');
|
|
5295
|
-
} },
|
|
5296
5366
|
|
|
5367
|
+
const Close = {
|
|
5368
|
+
extends: IconComponent,
|
|
5297
5369
|
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
}
|
|
5370
|
+
beforeConnect() {
|
|
5371
|
+
this.icon = "close-" + (hasClass(this.$el, 'uk-close-large') ? 'large' : 'icon');
|
|
5372
|
+
} };
|
|
5301
5373
|
|
|
5302
|
-
disconnected() {
|
|
5303
|
-
unwrap(this.wrapper.childNodes);
|
|
5304
|
-
},
|
|
5305
5374
|
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5375
|
+
const Spinner = {
|
|
5376
|
+
extends: IconComponent,
|
|
5309
5377
|
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
hide: !this.matchMedia };
|
|
5378
|
+
methods: {
|
|
5379
|
+
async getSvg() {
|
|
5380
|
+
const icon = await Icon.methods.getSvg.call(this);
|
|
5314
5381
|
|
|
5315
|
-
|
|
5382
|
+
if (this.ratio !== 1) {
|
|
5383
|
+
css($('circle', icon), 'strokeWidth', 1 / this.ratio);
|
|
5384
|
+
}
|
|
5316
5385
|
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5320
|
-
},
|
|
5386
|
+
return icon;
|
|
5387
|
+
} } };
|
|
5321
5388
|
|
|
5322
|
-
events: ['resize'] } };
|
|
5323
5389
|
|
|
5324
|
-
const active = [];
|
|
5325
5390
|
|
|
5326
|
-
|
|
5327
|
-
|
|
5391
|
+
const parsed = {};
|
|
5392
|
+
function install$1(UIkit) {
|
|
5393
|
+
UIkit.icon.add = (name, svg) => {
|
|
5394
|
+
const added = isString(name) ? { [name]: svg } : name;
|
|
5395
|
+
each(added, (svg, name) => {
|
|
5396
|
+
icons[name] = svg;
|
|
5397
|
+
delete parsed[name];
|
|
5398
|
+
});
|
|
5328
5399
|
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
stack: Boolean },
|
|
5400
|
+
if (UIkit._initialized) {
|
|
5401
|
+
apply(document.body, (el) =>
|
|
5402
|
+
each(UIkit.getComponents(el), (cmp) => {
|
|
5403
|
+
cmp.$options.isIcon && cmp.icon in added && cmp.$reset();
|
|
5404
|
+
}));
|
|
5335
5405
|
|
|
5406
|
+
}
|
|
5407
|
+
};
|
|
5408
|
+
}
|
|
5336
5409
|
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
overlay: true,
|
|
5342
|
-
stack: false },
|
|
5410
|
+
function getIcon(icon) {
|
|
5411
|
+
if (!icons[icon]) {
|
|
5412
|
+
return null;
|
|
5413
|
+
}
|
|
5343
5414
|
|
|
5415
|
+
if (!parsed[icon]) {
|
|
5416
|
+
parsed[icon] = $((icons[applyRtl(icon)] || icons[icon]).trim());
|
|
5417
|
+
}
|
|
5344
5418
|
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
return $(selPanel, $el);
|
|
5348
|
-
},
|
|
5419
|
+
return parsed[icon].cloneNode(true);
|
|
5420
|
+
}
|
|
5349
5421
|
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5422
|
+
function applyRtl(icon) {
|
|
5423
|
+
return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon;
|
|
5424
|
+
}
|
|
5353
5425
|
|
|
5354
|
-
|
|
5355
|
-
return bgClose && this.panel;
|
|
5356
|
-
} },
|
|
5426
|
+
const nativeLazyLoad = inBrowser && 'loading' in HTMLImageElement.prototype;
|
|
5357
5427
|
|
|
5428
|
+
var img = {
|
|
5429
|
+
args: 'dataSrc',
|
|
5358
5430
|
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5431
|
+
props: {
|
|
5432
|
+
dataSrc: String,
|
|
5433
|
+
sources: String,
|
|
5434
|
+
offsetTop: String,
|
|
5435
|
+
offsetLeft: String,
|
|
5436
|
+
target: String,
|
|
5437
|
+
loading: String },
|
|
5364
5438
|
|
|
5365
|
-
events: [
|
|
5366
|
-
{
|
|
5367
|
-
name: 'click',
|
|
5368
5439
|
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5440
|
+
data: {
|
|
5441
|
+
dataSrc: '',
|
|
5442
|
+
sources: false,
|
|
5443
|
+
offsetTop: '50vh',
|
|
5444
|
+
offsetLeft: '50vw',
|
|
5445
|
+
target: false,
|
|
5446
|
+
loading: 'lazy' },
|
|
5372
5447
|
|
|
5373
|
-
handler(e) {
|
|
5374
|
-
e.preventDefault();
|
|
5375
|
-
this.hide();
|
|
5376
|
-
} },
|
|
5377
5448
|
|
|
5449
|
+
connected() {
|
|
5450
|
+
if (this.loading !== 'lazy') {
|
|
5451
|
+
this.load();
|
|
5452
|
+
return;
|
|
5453
|
+
}
|
|
5378
5454
|
|
|
5379
|
-
|
|
5380
|
-
name: 'toggle',
|
|
5455
|
+
const target = [this.$el, ...queryAll(this.$props.target, this.$el)];
|
|
5381
5456
|
|
|
5382
|
-
|
|
5457
|
+
if (nativeLazyLoad && isImg(this.$el)) {
|
|
5458
|
+
this.$el.loading = 'lazy';
|
|
5459
|
+
setSrcAttrs(this.$el);
|
|
5383
5460
|
|
|
5384
|
-
|
|
5385
|
-
if (e.defaultPrevented) {
|
|
5461
|
+
if (target.length === 1) {
|
|
5386
5462
|
return;
|
|
5387
5463
|
}
|
|
5464
|
+
}
|
|
5388
5465
|
|
|
5389
|
-
|
|
5466
|
+
ensureSrcAttribute(this.$el);
|
|
5390
5467
|
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5468
|
+
this.registerObserver(
|
|
5469
|
+
observeIntersection(
|
|
5470
|
+
target,
|
|
5471
|
+
(entries, observer) => {
|
|
5472
|
+
this.load();
|
|
5473
|
+
observer.disconnect();
|
|
5474
|
+
},
|
|
5475
|
+
{
|
|
5476
|
+
rootMargin: toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
5477
|
+
this.offsetLeft,
|
|
5478
|
+
'width') + "px" }));
|
|
5395
5479
|
|
|
5396
5480
|
|
|
5397
|
-
{
|
|
5398
|
-
name: 'beforeshow',
|
|
5399
5481
|
|
|
5400
|
-
self: true,
|
|
5401
5482
|
|
|
5402
|
-
|
|
5403
|
-
if (includes(active, this)) {
|
|
5404
|
-
return false;
|
|
5405
|
-
}
|
|
5483
|
+
},
|
|
5406
5484
|
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
}
|
|
5413
|
-
} },
|
|
5485
|
+
disconnected() {
|
|
5486
|
+
if (this._data.image) {
|
|
5487
|
+
this._data.image.onload = '';
|
|
5488
|
+
}
|
|
5489
|
+
},
|
|
5414
5490
|
|
|
5491
|
+
methods: {
|
|
5492
|
+
load() {
|
|
5493
|
+
if (this._data.image) {
|
|
5494
|
+
return this._data.image;
|
|
5495
|
+
}
|
|
5415
5496
|
|
|
5416
|
-
|
|
5417
|
-
|
|
5497
|
+
const image = isImg(this.$el) ?
|
|
5498
|
+
this.$el :
|
|
5499
|
+
getImageFromElement(this.$el, this.dataSrc, this.sources);
|
|
5418
5500
|
|
|
5419
|
-
|
|
5501
|
+
removeAttr(image, 'loading');
|
|
5502
|
+
setSrcAttrs(this.$el, image.currentSrc);
|
|
5503
|
+
return this._data.image = image;
|
|
5504
|
+
} } };
|
|
5420
5505
|
|
|
5421
|
-
handler() {
|
|
5422
|
-
const docEl = document.documentElement;
|
|
5423
5506
|
|
|
5424
|
-
if (width(window) > docEl.clientWidth && this.overlay) {
|
|
5425
|
-
css(document.body, 'overflowY', 'scroll');
|
|
5426
|
-
}
|
|
5427
5507
|
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5508
|
+
function setSrcAttrs(el, src) {
|
|
5509
|
+
if (isImg(el)) {
|
|
5510
|
+
const parentNode = parent(el);
|
|
5511
|
+
const elements = isPicture(parentNode) ? children(parentNode) : [el];
|
|
5512
|
+
elements.forEach((el) => setSourceProps(el, el));
|
|
5513
|
+
} else if (src) {
|
|
5514
|
+
const change = !includes(el.style.backgroundImage, src);
|
|
5515
|
+
if (change) {
|
|
5516
|
+
css(el, 'backgroundImage', "url(" + escape(src) + ")");
|
|
5517
|
+
trigger(el, createEvent('load', false));
|
|
5518
|
+
}
|
|
5519
|
+
}
|
|
5520
|
+
}
|
|
5431
5521
|
|
|
5432
|
-
|
|
5522
|
+
const srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
5523
|
+
function setSourceProps(sourceEl, targetEl) {
|
|
5524
|
+
srcProps.forEach((prop) => {
|
|
5525
|
+
const value = data(sourceEl, prop);
|
|
5526
|
+
if (value) {
|
|
5527
|
+
attr(targetEl, prop.replace(/^(data-)+/, ''), value);
|
|
5528
|
+
}
|
|
5529
|
+
});
|
|
5530
|
+
}
|
|
5433
5531
|
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
this.$el,
|
|
5437
|
-
'hide',
|
|
5438
|
-
on(document, pointerDown, (_ref3) => {let { target } = _ref3;
|
|
5439
|
-
if (
|
|
5440
|
-
last(active) !== this ||
|
|
5441
|
-
this.overlay && !within(target, this.$el) ||
|
|
5442
|
-
within(target, this.panel))
|
|
5443
|
-
{
|
|
5444
|
-
return;
|
|
5445
|
-
}
|
|
5532
|
+
function getImageFromElement(el, src, sources) {
|
|
5533
|
+
const img = new Image();
|
|
5446
5534
|
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
{
|
|
5456
|
-
this.hide();
|
|
5457
|
-
}
|
|
5458
|
-
},
|
|
5459
|
-
true);
|
|
5535
|
+
wrapInPicture(img, sources);
|
|
5536
|
+
setSourceProps(el, img);
|
|
5537
|
+
img.onload = () => {
|
|
5538
|
+
setSrcAttrs(el, img.currentSrc);
|
|
5539
|
+
};
|
|
5540
|
+
attr(img, 'src', src);
|
|
5541
|
+
return img;
|
|
5542
|
+
}
|
|
5460
5543
|
|
|
5461
|
-
|
|
5462
|
-
|
|
5544
|
+
function wrapInPicture(img, sources) {
|
|
5545
|
+
sources = parseSources(sources);
|
|
5463
5546
|
|
|
5464
|
-
|
|
5547
|
+
if (sources.length) {
|
|
5548
|
+
const picture = fragment('<picture>');
|
|
5549
|
+
for (const attrs of sources) {
|
|
5550
|
+
const source = fragment('<source>');
|
|
5551
|
+
attr(source, attrs);
|
|
5552
|
+
append(picture, source);
|
|
5553
|
+
}
|
|
5554
|
+
append(picture, img);
|
|
5555
|
+
}
|
|
5556
|
+
}
|
|
5465
5557
|
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
on(document, 'keydown', (e) => {
|
|
5471
|
-
if (e.keyCode === 27 && last(active) === this) {
|
|
5472
|
-
this.hide();
|
|
5473
|
-
}
|
|
5474
|
-
}),
|
|
5475
|
-
{ self: true });
|
|
5558
|
+
function parseSources(sources) {
|
|
5559
|
+
if (!sources) {
|
|
5560
|
+
return [];
|
|
5561
|
+
}
|
|
5476
5562
|
|
|
5477
|
-
|
|
5478
|
-
|
|
5563
|
+
if (startsWith(sources, '[')) {
|
|
5564
|
+
try {
|
|
5565
|
+
sources = JSON.parse(sources);
|
|
5566
|
+
} catch (e) {
|
|
5567
|
+
sources = [];
|
|
5568
|
+
}
|
|
5569
|
+
} else {
|
|
5570
|
+
sources = parseOptions(sources);
|
|
5571
|
+
}
|
|
5479
5572
|
|
|
5573
|
+
if (!isArray(sources)) {
|
|
5574
|
+
sources = [sources];
|
|
5575
|
+
}
|
|
5480
5576
|
|
|
5481
|
-
|
|
5482
|
-
|
|
5577
|
+
return sources.filter((source) => !isEmpty(source));
|
|
5578
|
+
}
|
|
5483
5579
|
|
|
5484
|
-
|
|
5580
|
+
function ensureSrcAttribute(el) {
|
|
5581
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
5582
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
5583
|
+
}
|
|
5584
|
+
}
|
|
5485
5585
|
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
}
|
|
5586
|
+
function isPicture(el) {
|
|
5587
|
+
return isTag(el, 'picture');
|
|
5588
|
+
}
|
|
5490
5589
|
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
} },
|
|
5590
|
+
function isImg(el) {
|
|
5591
|
+
return isTag(el, 'img');
|
|
5592
|
+
}
|
|
5495
5593
|
|
|
5594
|
+
var Media = {
|
|
5595
|
+
props: {
|
|
5596
|
+
media: Boolean },
|
|
5496
5597
|
|
|
5497
|
-
{
|
|
5498
|
-
name: 'hidden',
|
|
5499
5598
|
|
|
5500
|
-
|
|
5599
|
+
data: {
|
|
5600
|
+
media: false },
|
|
5501
5601
|
|
|
5502
|
-
handler() {
|
|
5503
|
-
if (includes(active, this)) {
|
|
5504
|
-
active.splice(active.indexOf(this), 1);
|
|
5505
|
-
}
|
|
5506
5602
|
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5603
|
+
connected() {
|
|
5604
|
+
const media = toMedia(this.media, this.$el);
|
|
5605
|
+
this.matchMedia = true;
|
|
5606
|
+
if (media) {
|
|
5607
|
+
this.mediaObj = window.matchMedia(media);
|
|
5608
|
+
const handler = () => {
|
|
5609
|
+
this.matchMedia = this.mediaObj.matches;
|
|
5610
|
+
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5611
|
+
};
|
|
5612
|
+
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5613
|
+
handler();
|
|
5614
|
+
this.$emit('resize');
|
|
5615
|
+
});
|
|
5616
|
+
handler();
|
|
5617
|
+
}
|
|
5618
|
+
},
|
|
5510
5619
|
|
|
5511
|
-
|
|
5620
|
+
disconnected() {var _this$offMediaObj;
|
|
5621
|
+
(_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
|
|
5622
|
+
} };
|
|
5512
5623
|
|
|
5513
|
-
if (!active.some((modal) => modal.clsPage === this.clsPage)) {
|
|
5514
|
-
removeClass(document.documentElement, this.clsPage);
|
|
5515
|
-
}
|
|
5516
|
-
} }],
|
|
5517
5624
|
|
|
5625
|
+
function toMedia(value, element) {
|
|
5626
|
+
if (isString(value)) {
|
|
5627
|
+
if (startsWith(value, '@')) {
|
|
5628
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5629
|
+
} else if (isNaN(value)) {
|
|
5630
|
+
return value;
|
|
5631
|
+
}
|
|
5632
|
+
}
|
|
5518
5633
|
|
|
5634
|
+
return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
|
|
5635
|
+
}
|
|
5519
5636
|
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
return this.isToggled() ? this.hide() : this.show();
|
|
5523
|
-
},
|
|
5637
|
+
var leader = {
|
|
5638
|
+
mixins: [Class, Media, Resize],
|
|
5524
5639
|
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
append(this.container, this.$el);
|
|
5528
|
-
return new Promise((resolve) =>
|
|
5529
|
-
requestAnimationFrame(() => this.show().then(resolve)));
|
|
5640
|
+
props: {
|
|
5641
|
+
fill: String },
|
|
5530
5642
|
|
|
5531
|
-
}
|
|
5532
5643
|
|
|
5533
|
-
|
|
5534
|
-
|
|
5644
|
+
data: {
|
|
5645
|
+
fill: '',
|
|
5646
|
+
clsWrapper: 'uk-leader-fill',
|
|
5647
|
+
clsHide: 'uk-leader-hide',
|
|
5648
|
+
attrFill: 'data-fill' },
|
|
5535
5649
|
|
|
5536
|
-
hide() {
|
|
5537
|
-
return this.toggleElement(this.$el, false, animate(this));
|
|
5538
|
-
} } };
|
|
5539
5650
|
|
|
5651
|
+
computed: {
|
|
5652
|
+
fill(_ref) {let { fill } = _ref;
|
|
5653
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5654
|
+
} },
|
|
5540
5655
|
|
|
5541
5656
|
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
once(el, 'show hide', () => {
|
|
5546
|
-
el._reject == null ? void 0 : el._reject();
|
|
5547
|
-
el._reject = reject;
|
|
5657
|
+
connected() {
|
|
5658
|
+
[this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
|
|
5659
|
+
},
|
|
5548
5660
|
|
|
5549
|
-
|
|
5661
|
+
disconnected() {
|
|
5662
|
+
unwrap(this.wrapper.childNodes);
|
|
5663
|
+
},
|
|
5550
5664
|
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
() => {
|
|
5555
|
-
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
5556
|
-
self: true });
|
|
5665
|
+
update: {
|
|
5666
|
+
read() {
|
|
5667
|
+
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5557
5668
|
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5669
|
+
return {
|
|
5670
|
+
width,
|
|
5671
|
+
fill: this.fill,
|
|
5672
|
+
hide: !this.matchMedia };
|
|
5561
5673
|
|
|
5674
|
+
},
|
|
5562
5675
|
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
},
|
|
5567
|
-
})).
|
|
5568
|
-
then(() => delete el._reject);
|
|
5569
|
-
}
|
|
5676
|
+
write(_ref2) {let { width, fill, hide } = _ref2;
|
|
5677
|
+
toggleClass(this.wrapper, this.clsHide, hide);
|
|
5678
|
+
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5679
|
+
},
|
|
5570
5680
|
|
|
5571
|
-
|
|
5572
|
-
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
5573
|
-
}
|
|
5681
|
+
events: ['resize'] } };
|
|
5574
5682
|
|
|
5575
5683
|
var modal = {
|
|
5576
5684
|
install,
|
|
@@ -5734,7 +5842,9 @@
|
|
|
5734
5842
|
align: String,
|
|
5735
5843
|
offset: Number,
|
|
5736
5844
|
boundary: Boolean,
|
|
5737
|
-
|
|
5845
|
+
target: Boolean,
|
|
5846
|
+
targetX: Boolean,
|
|
5847
|
+
targetY: Boolean,
|
|
5738
5848
|
clsDrop: String,
|
|
5739
5849
|
delayShow: Number,
|
|
5740
5850
|
delayHide: Number,
|
|
@@ -5751,9 +5861,12 @@
|
|
|
5751
5861
|
offset: undefined,
|
|
5752
5862
|
delayShow: undefined,
|
|
5753
5863
|
delayHide: undefined,
|
|
5754
|
-
|
|
5755
|
-
|
|
5864
|
+
flip: false,
|
|
5865
|
+
shift: true,
|
|
5756
5866
|
boundary: true,
|
|
5867
|
+
target: false,
|
|
5868
|
+
targetX: false,
|
|
5869
|
+
targetY: false,
|
|
5757
5870
|
dropbar: false,
|
|
5758
5871
|
dropbarAnchor: false,
|
|
5759
5872
|
duration: 200,
|
|
@@ -5788,7 +5901,7 @@
|
|
|
5788
5901
|
},
|
|
5789
5902
|
|
|
5790
5903
|
watch(dropbar) {
|
|
5791
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5904
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5792
5905
|
},
|
|
5793
5906
|
|
|
5794
5907
|
immediate: true },
|
|
@@ -5804,7 +5917,7 @@
|
|
|
5804
5917
|
|
|
5805
5918
|
if (this.dropContainer !== $el) {
|
|
5806
5919
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5807
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5920
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5808
5921
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5809
5922
|
dropdowns.push(el);
|
|
5810
5923
|
}
|
|
@@ -5821,8 +5934,7 @@
|
|
|
5821
5934
|
{
|
|
5822
5935
|
...this.$props,
|
|
5823
5936
|
boundary: this.boundary,
|
|
5824
|
-
pos: this.pos
|
|
5825
|
-
offset: this.dropbar || this.offset });
|
|
5937
|
+
pos: this.pos });
|
|
5826
5938
|
|
|
5827
5939
|
|
|
5828
5940
|
},
|
|
@@ -5867,8 +5979,8 @@
|
|
|
5867
5979
|
if (
|
|
5868
5980
|
active &&
|
|
5869
5981
|
includes(active.mode, 'hover') &&
|
|
5870
|
-
active.
|
|
5871
|
-
!within(active.
|
|
5982
|
+
active.targetEl &&
|
|
5983
|
+
!within(active.targetEl, current) &&
|
|
5872
5984
|
!active.isDelaying)
|
|
5873
5985
|
{
|
|
5874
5986
|
active.hide(false);
|
|
@@ -5890,7 +6002,7 @@
|
|
|
5890
6002
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5891
6003
|
e.preventDefault();
|
|
5892
6004
|
|
|
5893
|
-
if (!active || active.
|
|
6005
|
+
if (!active || active.targetEl !== current) {
|
|
5894
6006
|
current.click();
|
|
5895
6007
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5896
6008
|
focusFirstFocusableElement(target));});
|
|
@@ -5940,8 +6052,8 @@
|
|
|
5940
6052
|
}
|
|
5941
6053
|
}
|
|
5942
6054
|
|
|
5943
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
5944
|
-
active == null ? void 0 : (_active$
|
|
6055
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6056
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
5945
6057
|
}
|
|
5946
6058
|
|
|
5947
6059
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -5983,8 +6095,8 @@
|
|
|
5983
6095
|
return this.dropbar;
|
|
5984
6096
|
},
|
|
5985
6097
|
|
|
5986
|
-
handler(
|
|
5987
|
-
if (!
|
|
6098
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6099
|
+
if (!this.isDropbarDrop(target)) {
|
|
5988
6100
|
return;
|
|
5989
6101
|
}
|
|
5990
6102
|
|
|
@@ -5992,7 +6104,7 @@
|
|
|
5992
6104
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
5993
6105
|
}
|
|
5994
6106
|
|
|
5995
|
-
addClass(
|
|
6107
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
5996
6108
|
} },
|
|
5997
6109
|
|
|
5998
6110
|
|
|
@@ -6007,19 +6119,24 @@
|
|
|
6007
6119
|
return this.dropbar;
|
|
6008
6120
|
},
|
|
6009
6121
|
|
|
6010
|
-
handler(
|
|
6011
|
-
if (!
|
|
6122
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6123
|
+
if (!this.isDropbarDrop(target)) {
|
|
6012
6124
|
return;
|
|
6013
6125
|
}
|
|
6014
6126
|
|
|
6015
|
-
this._observer = observeResize(
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6127
|
+
this._observer = observeResize(target, () => {
|
|
6128
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6129
|
+
concat(target).
|
|
6130
|
+
map((el) => offset(el));
|
|
6131
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6132
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6133
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6134
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6135
|
+
this.transitionTo(
|
|
6136
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6137
|
+
target);
|
|
6022
6138
|
|
|
6139
|
+
});
|
|
6023
6140
|
} },
|
|
6024
6141
|
|
|
6025
6142
|
|
|
@@ -6034,13 +6151,13 @@
|
|
|
6034
6151
|
return this.dropbar;
|
|
6035
6152
|
},
|
|
6036
6153
|
|
|
6037
|
-
handler(e
|
|
6154
|
+
handler(e) {
|
|
6038
6155
|
const active = this.getActive();
|
|
6039
6156
|
|
|
6040
6157
|
if (
|
|
6041
6158
|
matches(this.dropbar, ':hover') &&
|
|
6042
|
-
(active == null ? void 0 : active.$el) ===
|
|
6043
|
-
!this.toggles.some((el) => active.
|
|
6159
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6160
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6044
6161
|
{
|
|
6045
6162
|
e.preventDefault();
|
|
6046
6163
|
}
|
|
@@ -6058,8 +6175,8 @@
|
|
|
6058
6175
|
return this.dropbar;
|
|
6059
6176
|
},
|
|
6060
6177
|
|
|
6061
|
-
handler(
|
|
6062
|
-
if (!
|
|
6178
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6179
|
+
if (!this.isDropbarDrop(target)) {
|
|
6063
6180
|
return;
|
|
6064
6181
|
}
|
|
6065
6182
|
|
|
@@ -6067,7 +6184,7 @@
|
|
|
6067
6184
|
|
|
6068
6185
|
const active = this.getActive();
|
|
6069
6186
|
|
|
6070
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6187
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6071
6188
|
this.transitionTo(0);
|
|
6072
6189
|
}
|
|
6073
6190
|
} }],
|
|
@@ -6076,7 +6193,7 @@
|
|
|
6076
6193
|
|
|
6077
6194
|
methods: {
|
|
6078
6195
|
getActive() {
|
|
6079
|
-
return active
|
|
6196
|
+
return active && within(active.targetEl, this.$el) && active;
|
|
6080
6197
|
},
|
|
6081
6198
|
|
|
6082
6199
|
transitionTo(newHeight, el) {
|
|
@@ -6106,13 +6223,17 @@
|
|
|
6106
6223
|
|
|
6107
6224
|
getDropdown(el) {
|
|
6108
6225
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6226
|
+
},
|
|
6227
|
+
|
|
6228
|
+
isDropbarDrop(el) {
|
|
6229
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6109
6230
|
} } };
|
|
6110
6231
|
|
|
6111
6232
|
|
|
6112
6233
|
|
|
6113
6234
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6114
6235
|
const { current, keyCode } = e;
|
|
6115
|
-
const target = (active == null ? void 0 : active.
|
|
6236
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6116
6237
|
const i = toggles.indexOf(target);
|
|
6117
6238
|
|
|
6118
6239
|
// Left
|
|
@@ -6286,22 +6407,6 @@
|
|
|
6286
6407
|
} },
|
|
6287
6408
|
|
|
6288
6409
|
|
|
6289
|
-
{
|
|
6290
|
-
name: 'touchstart',
|
|
6291
|
-
|
|
6292
|
-
passive: true,
|
|
6293
|
-
|
|
6294
|
-
el() {
|
|
6295
|
-
return this.panel;
|
|
6296
|
-
},
|
|
6297
|
-
|
|
6298
|
-
handler(_ref8) {let { targetTouches } = _ref8;
|
|
6299
|
-
if (targetTouches.length === 1) {
|
|
6300
|
-
this.clientY = targetTouches[0].clientY;
|
|
6301
|
-
}
|
|
6302
|
-
} },
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
6410
|
{
|
|
6306
6411
|
name: 'touchmove',
|
|
6307
6412
|
|
|
@@ -6317,33 +6422,6 @@
|
|
|
6317
6422
|
} },
|
|
6318
6423
|
|
|
6319
6424
|
|
|
6320
|
-
{
|
|
6321
|
-
name: 'touchmove',
|
|
6322
|
-
|
|
6323
|
-
passive: false,
|
|
6324
|
-
|
|
6325
|
-
el() {
|
|
6326
|
-
return this.panel;
|
|
6327
|
-
},
|
|
6328
|
-
|
|
6329
|
-
handler(e) {
|
|
6330
|
-
if (e.targetTouches.length !== 1) {
|
|
6331
|
-
return;
|
|
6332
|
-
}
|
|
6333
|
-
|
|
6334
|
-
const clientY = e.targetTouches[0].clientY - this.clientY;
|
|
6335
|
-
const { scrollTop, scrollHeight, clientHeight } = this.panel;
|
|
6336
|
-
|
|
6337
|
-
if (
|
|
6338
|
-
clientHeight >= scrollHeight ||
|
|
6339
|
-
scrollTop === 0 && clientY > 0 ||
|
|
6340
|
-
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
6341
|
-
{
|
|
6342
|
-
e.cancelable && e.preventDefault();
|
|
6343
|
-
}
|
|
6344
|
-
} },
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
6425
|
{
|
|
6348
6426
|
name: 'show',
|
|
6349
6427
|
|
|
@@ -6355,7 +6433,6 @@
|
|
|
6355
6433
|
addClass(parent(this.panel), this.clsMode);
|
|
6356
6434
|
}
|
|
6357
6435
|
|
|
6358
|
-
css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : '');
|
|
6359
6436
|
addClass(document.body, this.clsContainer, this.clsFlip);
|
|
6360
6437
|
css(document.body, 'touch-action', 'pan-y pinch-zoom');
|
|
6361
6438
|
css(this.$el, 'display', 'block');
|
|
@@ -6363,7 +6440,7 @@
|
|
|
6363
6440
|
addClass(
|
|
6364
6441
|
this.panel,
|
|
6365
6442
|
this.clsSidebarAnimation,
|
|
6366
|
-
this.mode
|
|
6443
|
+
this.mode === 'reveal' ? '' : this.clsMode);
|
|
6367
6444
|
|
|
6368
6445
|
|
|
6369
6446
|
height(document.body); // force reflow
|
|
@@ -6400,8 +6477,6 @@
|
|
|
6400
6477
|
removeClass(this.$el, this.clsOverlay);
|
|
6401
6478
|
css(this.$el, 'display', '');
|
|
6402
6479
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
6403
|
-
|
|
6404
|
-
css(document.documentElement, 'overflowY', '');
|
|
6405
6480
|
} },
|
|
6406
6481
|
|
|
6407
6482
|
|
|
@@ -6526,6 +6601,14 @@
|
|
|
6526
6601
|
offset: 0 },
|
|
6527
6602
|
|
|
6528
6603
|
|
|
6604
|
+
connected() {
|
|
6605
|
+
registerClick(this);
|
|
6606
|
+
},
|
|
6607
|
+
|
|
6608
|
+
disconnected() {
|
|
6609
|
+
unregisterClick(this);
|
|
6610
|
+
},
|
|
6611
|
+
|
|
6529
6612
|
methods: {
|
|
6530
6613
|
async scrollTo(el) {
|
|
6531
6614
|
el = el && $(el) || document.body;
|
|
@@ -6534,20 +6617,39 @@
|
|
|
6534
6617
|
await scrollIntoView(el, { offset: this.offset });
|
|
6535
6618
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6536
6619
|
}
|
|
6537
|
-
} }
|
|
6620
|
+
} } };
|
|
6538
6621
|
|
|
6539
6622
|
|
|
6540
|
-
events: {
|
|
6541
|
-
click(e) {
|
|
6542
|
-
if (e.defaultPrevented) {
|
|
6543
|
-
return;
|
|
6544
|
-
}
|
|
6545
6623
|
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6624
|
+
const components$1 = new Set();
|
|
6625
|
+
function registerClick(cmp) {
|
|
6626
|
+
if (!components$1.size) {
|
|
6627
|
+
on(document, 'click', clickHandler);
|
|
6628
|
+
}
|
|
6629
|
+
|
|
6630
|
+
components$1.add(cmp);
|
|
6631
|
+
}
|
|
6632
|
+
|
|
6633
|
+
function unregisterClick(cmp) {
|
|
6634
|
+
components$1.delete(cmp);
|
|
6635
|
+
|
|
6636
|
+
if (!components$1.length) {
|
|
6637
|
+
off(document, 'click', clickHandler);
|
|
6638
|
+
}
|
|
6639
|
+
}
|
|
6549
6640
|
|
|
6641
|
+
function clickHandler(e) {
|
|
6642
|
+
if (e.defaultPrevented) {
|
|
6643
|
+
return;
|
|
6644
|
+
}
|
|
6550
6645
|
|
|
6646
|
+
for (const component of components$1) {
|
|
6647
|
+
if (within(e.target, component.$el)) {
|
|
6648
|
+
e.preventDefault();
|
|
6649
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6650
|
+
}
|
|
6651
|
+
}
|
|
6652
|
+
}
|
|
6551
6653
|
|
|
6552
6654
|
function getTargetElement(el) {
|
|
6553
6655
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -6877,7 +6979,9 @@
|
|
|
6877
6979
|
},
|
|
6878
6980
|
|
|
6879
6981
|
handler() {
|
|
6880
|
-
|
|
6982
|
+
const { scrollingElement } = document;
|
|
6983
|
+
|
|
6984
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6881
6985
|
return;
|
|
6882
6986
|
}
|
|
6883
6987
|
|
|
@@ -6886,13 +6990,11 @@
|
|
|
6886
6990
|
const elOffset = offset(this.$el);
|
|
6887
6991
|
|
|
6888
6992
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6889
|
-
scrollTop
|
|
6890
|
-
window,
|
|
6993
|
+
scrollingElement.scrollTop =
|
|
6891
6994
|
targetOffset.top -
|
|
6892
6995
|
elOffset.height -
|
|
6893
6996
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6894
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6895
|
-
|
|
6997
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6896
6998
|
}
|
|
6897
6999
|
});
|
|
6898
7000
|
} }],
|
|
@@ -6990,7 +7092,7 @@
|
|
|
6990
7092
|
|
|
6991
7093
|
|
|
6992
7094
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
6993
|
-
const scroll = scrollTop
|
|
7095
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
6994
7096
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
6995
7097
|
|
|
6996
7098
|
return {
|
|
@@ -7510,7 +7612,7 @@
|
|
|
7510
7612
|
|
|
7511
7613
|
|
|
7512
7614
|
{
|
|
7513
|
-
name: '
|
|
7615
|
+
name: 'hide show',
|
|
7514
7616
|
|
|
7515
7617
|
self: true,
|
|
7516
7618
|
|
|
@@ -7518,10 +7620,8 @@
|
|
|
7518
7620
|
return this.target;
|
|
7519
7621
|
},
|
|
7520
7622
|
|
|
7521
|
-
handler(
|
|
7522
|
-
|
|
7523
|
-
this.updateAria(toggled);
|
|
7524
|
-
}
|
|
7623
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7624
|
+
this.updateAria(type === 'show');
|
|
7525
7625
|
} },
|
|
7526
7626
|
|
|
7527
7627
|
|
|
@@ -7616,10 +7716,12 @@
|
|
|
7616
7716
|
Video: Video,
|
|
7617
7717
|
Close: Close,
|
|
7618
7718
|
Spinner: Spinner,
|
|
7719
|
+
NavParentIcon: NavParentIcon,
|
|
7619
7720
|
SlidenavNext: Slidenav,
|
|
7620
7721
|
SlidenavPrevious: Slidenav,
|
|
7621
7722
|
SearchIcon: Search,
|
|
7622
7723
|
Marker: IconComponent,
|
|
7724
|
+
NavbarParentIcon: IconComponent,
|
|
7623
7725
|
NavbarToggleIcon: IconComponent,
|
|
7624
7726
|
OverlayIcon: IconComponent,
|
|
7625
7727
|
PaginationNext: IconComponent,
|