uikit 3.14.4-dev.6a00f7fe6 → 3.14.4-dev.74723a7ef
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -11
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +385 -110
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +385 -110
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +402 -115
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +402 -115
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +7 -5
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +186 -137
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +186 -137
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +4 -5
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +4 -5
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +22 -7
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +4 -5
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +22 -7
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +3 -3
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +98 -135
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +1822 -1716
- package/dist/js/uikit-core.min.js +14 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +1061 -938
- package/dist/js/uikit.min.js +14 -1
- package/package.json +1 -1
- package/src/images/{backgrounds/nav-parent-open.svg → components/nav-parent-icon-large.svg} +0 -0
- package/src/images/components/nav-parent-icon.svg +3 -0
- package/src/images/components/navbar-parent-icon.svg +3 -0
- package/src/images/components/navbar-toggle-icon.svg +22 -3
- package/src/js/api/state.js +2 -2
- package/src/js/components/filter.js +5 -3
- package/src/js/components/sortable.js +2 -3
- package/src/js/core/accordion.js +9 -17
- package/src/js/core/alert.js +35 -14
- package/src/js/core/drop.js +95 -61
- package/src/js/core/height-viewport.js +14 -6
- package/src/js/core/icon.js +16 -0
- package/src/js/core/index.js +2 -0
- package/src/js/core/leader.js +2 -2
- package/src/js/core/navbar.js +44 -30
- package/src/js/core/offcanvas.js +1 -47
- package/src/js/core/scroll.js +37 -10
- package/src/js/core/sticky.js +8 -9
- package/src/js/core/toggle.js +3 -5
- package/src/js/mixin/media.js +4 -5
- package/src/js/mixin/modal.js +97 -8
- package/src/js/mixin/position.js +26 -11
- package/src/js/mixin/slider-drag.js +20 -8
- package/src/js/mixin/style.js +11 -0
- package/src/js/mixin/togglable.js +81 -133
- package/src/js/util/animation.js +4 -3
- package/src/js/util/dimensions.js +6 -6
- package/src/js/util/filter.js +3 -7
- package/src/js/util/position.js +108 -107
- package/src/js/util/style.js +4 -13
- package/src/js/util/viewport.js +20 -36
- package/src/less/components/_import.less +1 -0
- package/src/less/components/drop.less +1 -18
- package/src/less/components/dropbar.less +115 -0
- package/src/less/components/dropdown.less +16 -16
- package/src/less/components/leader.less +1 -1
- package/src/less/components/nav.less +240 -63
- package/src/less/components/navbar.less +81 -38
- package/src/less/components/utility.less +21 -4
- package/src/less/theme/_import.less +1 -0
- package/src/less/theme/dropbar.less +44 -0
- package/src/less/theme/dropdown.less +0 -11
- package/src/less/theme/nav.less +43 -9
- package/src/less/theme/navbar.less +7 -11
- package/src/scss/components/_import.scss +1 -0
- package/src/scss/components/drop.scss +1 -18
- package/src/scss/components/dropbar.scss +115 -0
- package/src/scss/components/dropdown.scss +16 -16
- package/src/scss/components/leader.scss +1 -1
- package/src/scss/components/nav.scss +189 -51
- package/src/scss/components/navbar.scss +69 -38
- package/src/scss/components/utility.scss +19 -3
- package/src/scss/mixins-theme.scss +93 -25
- package/src/scss/mixins.scss +89 -17
- package/src/scss/theme/_import.scss +1 -0
- package/src/scss/theme/dropbar.scss +44 -0
- package/src/scss/theme/dropdown.scss +0 -8
- package/src/scss/theme/nav.scss +41 -9
- package/src/scss/theme/navbar.scss +7 -8
- package/src/scss/variables-theme.scss +71 -18
- package/src/scss/variables.scss +60 -14
- package/tests/accordion.html +2 -2
- package/tests/alert.html +2 -2
- package/tests/countdown.html +1 -1
- package/tests/drop.html +457 -371
- package/tests/dropbar.html +456 -0
- package/tests/dropdown.html +26 -401
- package/tests/filter.html +9 -12
- package/tests/form.html +1 -1
- package/tests/index.html +126 -107
- package/tests/js/index.js +1 -4
- package/tests/lightbox.html +5 -5
- package/tests/list.html +8 -8
- package/tests/modal.html +13 -13
- package/tests/nav.html +117 -75
- package/tests/navbar.html +2002 -1131
- package/tests/offcanvas.html +17 -21
- package/tests/parallax.html +1 -1
- package/tests/position.html +18 -16
- package/tests/progress.html +9 -9
- package/tests/scroll.html +7 -10
- package/tests/search.html +5 -5
- package/tests/slider.html +6 -5
- package/tests/slideshow.html +8 -8
- package/tests/sortable.html +6 -8
- package/tests/sticky-navbar.html +6 -6
- package/tests/sticky.html +8 -8
- package/tests/switcher.html +1 -1
- package/tests/tab.html +1 -1
- package/tests/table.html +7 -7
- package/tests/toggle.html +2 -2
- package/tests/tooltip.html +1 -1
- package/tests/upload.html +11 -11
- package/tests/utility.html +19 -0
- package/src/images/backgrounds/nav-parent-close.svg +0 -3
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.74723a7ef | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -383,12 +383,8 @@
|
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
function closest(element, selector) {
|
|
386
|
-
if (startsWith(selector, '>')) {
|
|
387
|
-
selector = selector.slice(1);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
386
|
return isElement(element) ?
|
|
391
|
-
element.closest(selector) :
|
|
387
|
+
element.closest(startsWith(selector, '>') ? selector.slice(1) : selector) :
|
|
392
388
|
toNodes(element).
|
|
393
389
|
map((element) => closest(element, selector)).
|
|
394
390
|
filter(Boolean);
|
|
@@ -396,8 +392,8 @@
|
|
|
396
392
|
|
|
397
393
|
function within(element, selector) {
|
|
398
394
|
return isString(selector) ?
|
|
399
|
-
|
|
400
|
-
|
|
395
|
+
!!closest(element, selector) :
|
|
396
|
+
toNode(selector).contains(toNode(element));
|
|
401
397
|
}
|
|
402
398
|
|
|
403
399
|
function parents(element, selector) {
|
|
@@ -785,18 +781,11 @@
|
|
|
785
781
|
return elements[0];
|
|
786
782
|
}
|
|
787
783
|
|
|
788
|
-
const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
|
|
789
|
-
function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
|
|
790
|
-
return css(element, "--uk-" + name).replace(propertyRe, '$2');
|
|
791
|
-
}
|
|
792
|
-
|
|
793
784
|
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
|
|
794
785
|
const propName = memoize((name) => vendorPropName(name));
|
|
795
786
|
|
|
796
|
-
const cssPrefixes = ['webkit', 'moz'];
|
|
797
|
-
|
|
798
787
|
function vendorPropName(name) {
|
|
799
|
-
if (name
|
|
788
|
+
if (startsWith(name, '--')) {
|
|
800
789
|
return name;
|
|
801
790
|
}
|
|
802
791
|
|
|
@@ -808,11 +797,8 @@
|
|
|
808
797
|
return name;
|
|
809
798
|
}
|
|
810
799
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
while (i--) {
|
|
815
|
-
prefixedName = "-" + cssPrefixes[i] + "-" + name;
|
|
800
|
+
for (const prefix of ['webkit', 'moz']) {
|
|
801
|
+
const prefixedName = "-" + prefix + "-" + name;
|
|
816
802
|
if (prefixedName in style) {
|
|
817
803
|
return prefixedName;
|
|
818
804
|
}
|
|
@@ -913,13 +899,14 @@
|
|
|
913
899
|
const Transition = {
|
|
914
900
|
start: transition,
|
|
915
901
|
|
|
916
|
-
stop(element) {
|
|
902
|
+
async stop(element) {
|
|
917
903
|
trigger(element, 'transitionend');
|
|
918
|
-
|
|
904
|
+
await Promise.resolve();
|
|
919
905
|
},
|
|
920
906
|
|
|
921
|
-
cancel(element) {
|
|
907
|
+
async cancel(element) {
|
|
922
908
|
trigger(element, 'transitioncanceled');
|
|
909
|
+
await Promise.resolve();
|
|
923
910
|
},
|
|
924
911
|
|
|
925
912
|
inProgress(element) {
|
|
@@ -929,7 +916,7 @@
|
|
|
929
916
|
|
|
930
917
|
const animationPrefix = 'uk-animation-';
|
|
931
918
|
|
|
932
|
-
function animate$
|
|
919
|
+
function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
|
|
933
920
|
return Promise.all(
|
|
934
921
|
toNodes(element).map(
|
|
935
922
|
(element) =>
|
|
@@ -965,10 +952,10 @@
|
|
|
965
952
|
|
|
966
953
|
const inProgress = new RegExp(animationPrefix + "(enter|leave)");
|
|
967
954
|
const Animation = {
|
|
968
|
-
in: animate$
|
|
955
|
+
in: animate$2,
|
|
969
956
|
|
|
970
957
|
out(element, animation, duration, origin) {
|
|
971
|
-
return animate$
|
|
958
|
+
return animate$2(element, animation, duration, origin, true);
|
|
972
959
|
},
|
|
973
960
|
|
|
974
961
|
inProgress(element) {
|
|
@@ -1060,13 +1047,13 @@
|
|
|
1060
1047
|
}
|
|
1061
1048
|
|
|
1062
1049
|
function offsetPosition(element) {
|
|
1063
|
-
const offset = [0, 0];
|
|
1064
|
-
|
|
1065
1050
|
element = toNode(element);
|
|
1066
1051
|
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1052
|
+
const offset = [element.offsetTop, element.offsetLeft];
|
|
1053
|
+
|
|
1054
|
+
while (element = element.offsetParent) {
|
|
1055
|
+
offset[0] += element.offsetTop + toFloat(css(element, "borderTopWidth"));
|
|
1056
|
+
offset[1] += element.offsetLeft + toFloat(css(element, "borderLeftWidth"));
|
|
1070
1057
|
|
|
1071
1058
|
if (css(element, 'position') === 'fixed') {
|
|
1072
1059
|
const win = toWindow(element);
|
|
@@ -1074,7 +1061,7 @@
|
|
|
1074
1061
|
offset[1] += win.scrollX;
|
|
1075
1062
|
return offset;
|
|
1076
1063
|
}
|
|
1077
|
-
}
|
|
1064
|
+
}
|
|
1078
1065
|
|
|
1079
1066
|
return offset;
|
|
1080
1067
|
}
|
|
@@ -1795,20 +1782,6 @@
|
|
|
1795
1782
|
|
|
1796
1783
|
}
|
|
1797
1784
|
|
|
1798
|
-
function scrollTop(element, top) {
|
|
1799
|
-
if (isWindow(element) || isDocument(element)) {
|
|
1800
|
-
element = scrollingElement(element);
|
|
1801
|
-
} else {
|
|
1802
|
-
element = toNode(element);
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
if (isUndefined(top)) {
|
|
1806
|
-
return element.scrollTop;
|
|
1807
|
-
} else {
|
|
1808
|
-
element.scrollTop = top;
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
1785
|
function scrollIntoView(element, _temp) {let { offset: offsetBy = 0 } = _temp === void 0 ? {} : _temp;
|
|
1813
1786
|
const parents = isVisible(element) ? scrollParents(element) : [];
|
|
1814
1787
|
return parents.reduce(
|
|
@@ -1850,7 +1823,7 @@
|
|
|
1850
1823
|
(function step() {
|
|
1851
1824
|
const percent = ease(clamp((Date.now() - start) / duration));
|
|
1852
1825
|
|
|
1853
|
-
scrollTop
|
|
1826
|
+
element.scrollTop = scroll + top * percent;
|
|
1854
1827
|
|
|
1855
1828
|
// scroll more if we have not reached our destination
|
|
1856
1829
|
if (percent === 1) {
|
|
@@ -1911,18 +1884,31 @@
|
|
|
1911
1884
|
}
|
|
1912
1885
|
|
|
1913
1886
|
function offsetViewport(scrollElement) {
|
|
1914
|
-
|
|
1887
|
+
const window = toWindow(scrollElement);
|
|
1888
|
+
const {
|
|
1889
|
+
document: { documentElement } } =
|
|
1890
|
+
window;
|
|
1891
|
+
let viewportElement =
|
|
1892
|
+
scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1893
|
+
|
|
1894
|
+
const { visualViewport } = window;
|
|
1895
|
+
if (isWindow(viewportElement) && visualViewport) {
|
|
1896
|
+
let { height, width, scale, pageTop: top, pageLeft: left } = visualViewport;
|
|
1897
|
+
height = Math.round(height * scale);
|
|
1898
|
+
width = Math.round(width * scale);
|
|
1899
|
+
return { height, width, top, left, bottom: top + height, right: left + width };
|
|
1900
|
+
}
|
|
1915
1901
|
|
|
1916
1902
|
let rect = offset(viewportElement);
|
|
1917
1903
|
for (let [prop, dir, start, end] of [
|
|
1918
1904
|
['width', 'x', 'left', 'right'],
|
|
1919
1905
|
['height', 'y', 'top', 'bottom']])
|
|
1920
1906
|
{
|
|
1921
|
-
if (
|
|
1922
|
-
rect[start] += toFloat(css(viewportElement, "border" + ucfirst(start) + "Width"));
|
|
1923
|
-
} else {
|
|
1907
|
+
if (isWindow(viewportElement)) {
|
|
1924
1908
|
// iOS 12 returns <body> as scrollingElement
|
|
1925
|
-
viewportElement =
|
|
1909
|
+
viewportElement = documentElement;
|
|
1910
|
+
} else {
|
|
1911
|
+
rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
|
|
1926
1912
|
}
|
|
1927
1913
|
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1928
1914
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -1934,10 +1920,6 @@
|
|
|
1934
1920
|
return toWindow(element).document.scrollingElement;
|
|
1935
1921
|
}
|
|
1936
1922
|
|
|
1937
|
-
function getViewport$1(scrollElement) {
|
|
1938
|
-
return scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
1923
|
const dirs = [
|
|
1942
1924
|
['width', 'x', 'left', 'right'],
|
|
1943
1925
|
['height', 'y', 'top', 'bottom']];
|
|
@@ -1951,126 +1933,65 @@
|
|
|
1951
1933
|
...options.attach },
|
|
1952
1934
|
|
|
1953
1935
|
offset: [0, 0],
|
|
1936
|
+
placement: [],
|
|
1954
1937
|
...options };
|
|
1955
1938
|
|
|
1956
1939
|
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
attachTo(element, target, options);
|
|
1960
|
-
|
|
1961
|
-
offset(element, dim);
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
function attachTo(element, target, options) {
|
|
1965
|
-
let { attach, offset: offsetBy } = {
|
|
1966
|
-
attach: {
|
|
1967
|
-
element: ['left', 'top'],
|
|
1968
|
-
target: ['left', 'top'],
|
|
1969
|
-
...options.attach },
|
|
1970
|
-
|
|
1971
|
-
offset: [0, 0],
|
|
1972
|
-
...options };
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
const position = offset(element);
|
|
1976
|
-
const targetOffset = offset(target);
|
|
1977
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1978
|
-
position[start] = position[dir] =
|
|
1979
|
-
targetOffset[start] +
|
|
1980
|
-
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
1981
|
-
moveBy(attach.element[i], end, position[prop]) +
|
|
1982
|
-
+offsetBy[i];
|
|
1983
|
-
position[end] = position[start] + position[prop];
|
|
1940
|
+
if (!isArray(target)) {
|
|
1941
|
+
target = [target, target];
|
|
1984
1942
|
}
|
|
1985
|
-
return position;
|
|
1986
|
-
}
|
|
1987
1943
|
|
|
1988
|
-
|
|
1989
|
-
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
1944
|
+
offset(element, getPosition(element, target, options));
|
|
1990
1945
|
}
|
|
1991
1946
|
|
|
1992
|
-
function
|
|
1947
|
+
function getPosition(element, target, options) {
|
|
1993
1948
|
const position = attachTo(element, target, options);
|
|
1994
|
-
const targetDim = offset(target);
|
|
1995
1949
|
|
|
1996
1950
|
let {
|
|
1997
|
-
flip,
|
|
1998
1951
|
attach: { element: elAttach, target: targetAttach },
|
|
1999
1952
|
offset: elOffset,
|
|
2000
1953
|
boundary,
|
|
2001
|
-
|
|
2002
|
-
|
|
1954
|
+
viewportOffset,
|
|
1955
|
+
placement } =
|
|
2003
1956
|
options;
|
|
2004
1957
|
|
|
2005
|
-
let
|
|
2006
|
-
|
|
2007
|
-
viewports =
|
|
2008
|
-
|
|
2009
|
-
const [scrollElement] = viewports;
|
|
2010
|
-
viewports.push(viewport);
|
|
2011
|
-
|
|
2012
|
-
const offsetPosition = { ...position };
|
|
2013
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2014
|
-
if (flip !== true && !includes(flip, dir)) {
|
|
2015
|
-
continue;
|
|
2016
|
-
}
|
|
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;
|
|
2017
1962
|
|
|
2018
|
-
|
|
2019
|
-
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
2020
|
-
|
|
2021
|
-
viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
|
|
1963
|
+
let viewport = getIntersectionArea(...viewports.map(offsetViewport));
|
|
2022
1964
|
|
|
2023
1965
|
if (viewportOffset) {
|
|
2024
1966
|
viewport[start] += viewportOffset;
|
|
2025
1967
|
viewport[end] -= viewportOffset;
|
|
2026
1968
|
}
|
|
2027
1969
|
|
|
2028
|
-
if (boundary
|
|
2029
|
-
viewport = getIntersectionArea(viewport,
|
|
1970
|
+
if (boundary) {
|
|
1971
|
+
viewport = getIntersectionArea(viewport, offsetViewport(boundary));
|
|
2030
1972
|
}
|
|
2031
1973
|
|
|
2032
|
-
const
|
|
2033
|
-
const
|
|
1974
|
+
const isInStartViewport = position[start] >= viewport[start];
|
|
1975
|
+
const isInEndViewport = position[end] <= viewport[end];
|
|
2034
1976
|
|
|
2035
|
-
if (
|
|
1977
|
+
if (isInStartViewport && isInEndViewport) {
|
|
2036
1978
|
continue;
|
|
2037
1979
|
}
|
|
2038
1980
|
|
|
2039
|
-
let offsetBy;
|
|
1981
|
+
let offsetBy = 0;
|
|
2040
1982
|
|
|
2041
1983
|
// Flip
|
|
2042
|
-
if (
|
|
1984
|
+
if (placement[i] === 'flip') {
|
|
2043
1985
|
if (
|
|
2044
|
-
|
|
2045
|
-
|
|
1986
|
+
targetAttach[i] === end && isInEndViewport ||
|
|
1987
|
+
targetAttach[i] === start && isInStartViewport)
|
|
2046
1988
|
{
|
|
2047
1989
|
continue;
|
|
2048
1990
|
}
|
|
2049
1991
|
|
|
2050
|
-
offsetBy =
|
|
2051
|
-
(elAttach[i] === start ?
|
|
2052
|
-
-position[prop] :
|
|
2053
|
-
elAttach[i] === end ?
|
|
2054
|
-
position[prop] :
|
|
2055
|
-
0) + (
|
|
2056
|
-
targetAttach[i] === start ?
|
|
2057
|
-
targetDim[prop] :
|
|
2058
|
-
targetAttach[i] === end ?
|
|
2059
|
-
-targetDim[prop] :
|
|
2060
|
-
0) -
|
|
2061
|
-
elOffset[i] * 2;
|
|
2062
|
-
|
|
2063
|
-
if (
|
|
2064
|
-
!isInScrollArea(
|
|
2065
|
-
{
|
|
2066
|
-
...position,
|
|
2067
|
-
[start]: position[start] + offsetBy,
|
|
2068
|
-
[end]: position[end] + offsetBy },
|
|
2069
|
-
|
|
2070
|
-
scrollElement,
|
|
2071
|
-
i))
|
|
1992
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2072
1993
|
|
|
2073
|
-
{
|
|
1994
|
+
if (!isInScrollArea(applyOffset(position, offsetBy, i), scrollElement, i)) {
|
|
2074
1995
|
if (isInScrollArea(position, scrollElement, i)) {
|
|
2075
1996
|
continue;
|
|
2076
1997
|
}
|
|
@@ -2079,26 +2000,27 @@
|
|
|
2079
2000
|
return false;
|
|
2080
2001
|
}
|
|
2081
2002
|
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2003
|
+
const newPos = getPosition(element, target, {
|
|
2004
|
+
...options,
|
|
2005
|
+
attach: {
|
|
2006
|
+
element: elAttach.map(flipAxis).reverse(),
|
|
2007
|
+
target: targetAttach.map(flipAxis).reverse() },
|
|
2088
2008
|
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2009
|
+
offset: elOffset.reverse(),
|
|
2010
|
+
placement: placement.reverse(),
|
|
2011
|
+
recursion: true });
|
|
2092
2012
|
|
|
2093
2013
|
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
}
|
|
2014
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2015
|
+
return newPos;
|
|
2097
2016
|
}
|
|
2017
|
+
|
|
2018
|
+
continue;
|
|
2098
2019
|
}
|
|
2099
2020
|
|
|
2100
|
-
//
|
|
2101
|
-
} else {
|
|
2021
|
+
// Shift
|
|
2022
|
+
} else if (placement[i] === 'shift') {
|
|
2023
|
+
const targetDim = offset(target[i]);
|
|
2102
2024
|
offsetBy =
|
|
2103
2025
|
clamp(
|
|
2104
2026
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2107,13 +2029,54 @@
|
|
|
2107
2029
|
position[start];
|
|
2108
2030
|
}
|
|
2109
2031
|
|
|
2110
|
-
offsetPosition
|
|
2111
|
-
offsetPosition[end] += offsetBy;
|
|
2032
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2112
2033
|
}
|
|
2113
2034
|
|
|
2114
2035
|
return offsetPosition;
|
|
2115
2036
|
}
|
|
2116
2037
|
|
|
2038
|
+
function attachTo(element, target, options) {
|
|
2039
|
+
let { attach, offset: offsetBy } = {
|
|
2040
|
+
attach: {
|
|
2041
|
+
element: ['left', 'top'],
|
|
2042
|
+
target: ['left', 'top'],
|
|
2043
|
+
...options.attach },
|
|
2044
|
+
|
|
2045
|
+
offset: [0, 0],
|
|
2046
|
+
...options };
|
|
2047
|
+
|
|
2048
|
+
|
|
2049
|
+
let elOffset = offset(element);
|
|
2050
|
+
|
|
2051
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
2052
|
+
const targetOffset =
|
|
2053
|
+
attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
|
|
2054
|
+
|
|
2055
|
+
elOffset = applyOffset(
|
|
2056
|
+
elOffset,
|
|
2057
|
+
targetOffset[start] -
|
|
2058
|
+
elOffset[start] +
|
|
2059
|
+
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
2060
|
+
moveBy(attach.element[i], end, elOffset[prop]) +
|
|
2061
|
+
+offsetBy[i],
|
|
2062
|
+
i);
|
|
2063
|
+
|
|
2064
|
+
}
|
|
2065
|
+
return elOffset;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
function applyOffset(position, offset, i) {
|
|
2069
|
+
const [, dir, start, end] = dirs[i];
|
|
2070
|
+
const newPos = { ...position };
|
|
2071
|
+
newPos[start] = position[dir] = position[start] + offset;
|
|
2072
|
+
newPos[end] += offset;
|
|
2073
|
+
return newPos;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
function moveBy(attach, end, dim) {
|
|
2077
|
+
return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2117
2080
|
function getIntersectionArea() {
|
|
2118
2081
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2119
2082
|
for (const rect of rects) {
|
|
@@ -2134,12 +2097,32 @@
|
|
|
2134
2097
|
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2135
2098
|
}
|
|
2136
2099
|
|
|
2137
|
-
function
|
|
2138
|
-
|
|
2139
|
-
|
|
2100
|
+
function flip(element, target, _ref, i) {let { offset, attach } = _ref;
|
|
2101
|
+
return attachTo(element, target, {
|
|
2102
|
+
attach: {
|
|
2103
|
+
element: flipAttach(attach.element, i),
|
|
2104
|
+
target: flipAttach(attach.target, i) },
|
|
2105
|
+
|
|
2106
|
+
offset: flipOffset(offset, i) });
|
|
2107
|
+
|
|
2108
|
+
}
|
|
2109
|
+
|
|
2110
|
+
function flipAttach(attach, i) {
|
|
2111
|
+
const newAttach = [...attach];
|
|
2112
|
+
const index = dirs[i].indexOf(attach[i]);
|
|
2113
|
+
if (~index) {
|
|
2114
|
+
newAttach[i] = dirs[i][1 - index % 2 + 2];
|
|
2115
|
+
}
|
|
2116
|
+
return newAttach;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
function flipOffset(offset, i) {
|
|
2120
|
+
offset = [...offset];
|
|
2121
|
+
offset[i] *= -1;
|
|
2122
|
+
return offset;
|
|
2140
2123
|
}
|
|
2141
2124
|
|
|
2142
|
-
function
|
|
2125
|
+
function flipAxis(prop) {
|
|
2143
2126
|
for (let i = 0; i < dirs.length; i++) {
|
|
2144
2127
|
const index = dirs[i].indexOf(prop);
|
|
2145
2128
|
if (~index) {
|
|
@@ -2154,7 +2137,7 @@
|
|
|
2154
2137
|
getImage: getImage,
|
|
2155
2138
|
transition: transition,
|
|
2156
2139
|
Transition: Transition,
|
|
2157
|
-
animate: animate$
|
|
2140
|
+
animate: animate$2,
|
|
2158
2141
|
Animation: Animation,
|
|
2159
2142
|
attr: attr,
|
|
2160
2143
|
hasAttr: hasAttr,
|
|
@@ -2284,10 +2267,8 @@
|
|
|
2284
2267
|
findAll: findAll,
|
|
2285
2268
|
escape: escape,
|
|
2286
2269
|
css: css,
|
|
2287
|
-
getCssVar: getCssVar,
|
|
2288
2270
|
propName: propName,
|
|
2289
2271
|
isInView: isInView,
|
|
2290
|
-
scrollTop: scrollTop,
|
|
2291
2272
|
scrollIntoView: scrollIntoView,
|
|
2292
2273
|
scrolledOver: scrolledOver,
|
|
2293
2274
|
scrollParents: scrollParents,
|
|
@@ -2610,7 +2591,7 @@
|
|
|
2610
2591
|
|
|
2611
2592
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2612
2593
|
|
|
2613
|
-
if (prop === 'target' &&
|
|
2594
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2614
2595
|
continue;
|
|
2615
2596
|
}
|
|
2616
2597
|
|
|
@@ -2621,7 +2602,7 @@
|
|
|
2621
2602
|
|
|
2622
2603
|
for (const key in options) {
|
|
2623
2604
|
const prop = camelize(key);
|
|
2624
|
-
if (props[prop]
|
|
2605
|
+
if (!isUndefined(props[prop])) {
|
|
2625
2606
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2626
2607
|
}
|
|
2627
2608
|
}
|
|
@@ -2950,7 +2931,7 @@
|
|
|
2950
2931
|
UIkit.data = '__uikit__';
|
|
2951
2932
|
UIkit.prefix = 'uk-';
|
|
2952
2933
|
UIkit.options = {};
|
|
2953
|
-
UIkit.version = '3.14.4-dev.
|
|
2934
|
+
UIkit.version = '3.14.4-dev.74723a7ef';
|
|
2954
2935
|
|
|
2955
2936
|
globalAPI(UIkit);
|
|
2956
2937
|
hooksAPI(UIkit);
|
|
@@ -3055,27 +3036,7 @@
|
|
|
3055
3036
|
origin: false,
|
|
3056
3037
|
transition: 'ease',
|
|
3057
3038
|
clsEnter: 'uk-togglabe-enter',
|
|
3058
|
-
clsLeave: 'uk-togglabe-leave',
|
|
3059
|
-
|
|
3060
|
-
initProps: {
|
|
3061
|
-
overflow: '',
|
|
3062
|
-
maxHeight: '',
|
|
3063
|
-
paddingTop: '',
|
|
3064
|
-
paddingBottom: '',
|
|
3065
|
-
marginTop: '',
|
|
3066
|
-
marginBottom: '',
|
|
3067
|
-
boxShadow: '' },
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
hideProps: {
|
|
3071
|
-
overflow: 'hidden',
|
|
3072
|
-
maxHeight: 0,
|
|
3073
|
-
paddingTop: 0,
|
|
3074
|
-
paddingBottom: 0,
|
|
3075
|
-
marginTop: 0,
|
|
3076
|
-
marginBottom: 0,
|
|
3077
|
-
boxShadow: 'none' } },
|
|
3078
|
-
|
|
3039
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3079
3040
|
|
|
3080
3041
|
|
|
3081
3042
|
computed: {
|
|
@@ -3084,7 +3045,7 @@
|
|
|
3084
3045
|
},
|
|
3085
3046
|
|
|
3086
3047
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3087
|
-
return startsWith(animation[0],
|
|
3048
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3088
3049
|
} },
|
|
3089
3050
|
|
|
3090
3051
|
|
|
@@ -3177,130 +3138,98 @@
|
|
|
3177
3138
|
};
|
|
3178
3139
|
}
|
|
3179
3140
|
|
|
3180
|
-
function toggleTransition(cmp) {
|
|
3181
|
-
|
|
3182
|
-
case 'slide-left':
|
|
3183
|
-
return slideHorizontal(cmp);
|
|
3184
|
-
case 'slide-right':
|
|
3185
|
-
return slideHorizontal(cmp, true);}
|
|
3186
|
-
|
|
3187
|
-
return slide(cmp);
|
|
3188
|
-
}
|
|
3189
|
-
|
|
3190
|
-
function slide(_ref4)
|
|
3191
|
-
|
|
3192
|
-
|
|
3141
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3142
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3193
3143
|
|
|
3144
|
+
const dirs = [
|
|
3145
|
+
['left', 'right'],
|
|
3146
|
+
['top', 'bottom']];
|
|
3194
3147
|
|
|
3148
|
+
const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
|
|
3149
|
+
const end = dir[1] === startProp;
|
|
3150
|
+
const props = ['width', 'height'];
|
|
3151
|
+
const dimProp = props[dirs.indexOf(dir)];
|
|
3152
|
+
const marginProp = "margin-" + dir[0];
|
|
3153
|
+
const marginStartProp = "margin-" + startProp;
|
|
3195
3154
|
|
|
3155
|
+
return async (el, show) => {
|
|
3156
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3196
3157
|
|
|
3158
|
+
let currentDim = dimensions(el)[dimProp];
|
|
3197
3159
|
|
|
3198
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3199
|
-
return (el, show) => {
|
|
3200
3160
|
const inProgress = Transition.inProgress(el);
|
|
3201
|
-
|
|
3202
|
-
!inProgress && el.hasChildNodes() ?
|
|
3203
|
-
toFloat(css(el.firstElementChild, 'marginTop')) +
|
|
3204
|
-
toFloat(css(el.lastElementChild, 'marginBottom')) :
|
|
3205
|
-
0;
|
|
3206
|
-
const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
|
|
3207
|
-
|
|
3208
|
-
const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
|
|
3209
|
-
|
|
3210
|
-
Transition.cancel(el);
|
|
3161
|
+
await Transition.cancel(el);
|
|
3211
3162
|
|
|
3212
|
-
if (
|
|
3163
|
+
if (show) {
|
|
3213
3164
|
_toggle(el, true);
|
|
3214
3165
|
}
|
|
3215
3166
|
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
fastdom.flush();
|
|
3220
|
-
|
|
3221
|
-
const endHeight = toFloat(css(el, 'height')) + inner;
|
|
3222
|
-
duration = velocity * endHeight + duration;
|
|
3223
|
-
|
|
3224
|
-
css(el, { ...props, maxHeight: currentHeight });
|
|
3225
|
-
|
|
3226
|
-
return (
|
|
3227
|
-
show ?
|
|
3228
|
-
Transition.start(
|
|
3229
|
-
el,
|
|
3230
|
-
{ ...initProps, overflow: 'hidden', maxHeight: endHeight },
|
|
3231
|
-
duration * (1 - currentHeight / endHeight),
|
|
3232
|
-
transition) :
|
|
3233
|
-
|
|
3234
|
-
Transition.start(
|
|
3235
|
-
el,
|
|
3236
|
-
hideProps,
|
|
3237
|
-
duration * (currentHeight / endHeight),
|
|
3238
|
-
transition).
|
|
3239
|
-
then(() => _toggle(el, false))).
|
|
3240
|
-
then(() => css(el, initProps));
|
|
3241
|
-
};
|
|
3242
|
-
}
|
|
3167
|
+
const prevProps = Object.fromEntries(
|
|
3168
|
+
['padding', 'border', 'width', 'height', 'overflow', marginProp, marginStartProp].map(
|
|
3169
|
+
(key) => [key, el.style[key]]));
|
|
3243
3170
|
|
|
3244
|
-
function slideHorizontal(_ref5, right) {let { isToggled, duration, velocity, transition, _toggle } = _ref5;
|
|
3245
|
-
return (el, show) => {
|
|
3246
|
-
const visible = isVisible(el);
|
|
3247
|
-
const marginLeft = toFloat(css(el, 'marginLeft'));
|
|
3248
3171
|
|
|
3249
|
-
Transition.cancel(el);
|
|
3250
3172
|
|
|
3251
|
-
const
|
|
3252
|
-
css(
|
|
3173
|
+
const dim = dimensions(el);
|
|
3174
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3175
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3176
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3253
3177
|
|
|
3254
|
-
if (!
|
|
3255
|
-
|
|
3178
|
+
if (!inProgress && !show) {
|
|
3179
|
+
currentDim += marginStart;
|
|
3256
3180
|
}
|
|
3257
3181
|
|
|
3258
|
-
const
|
|
3259
|
-
|
|
3182
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3183
|
+
css(wrapper, {
|
|
3184
|
+
boxSizing: 'border-box',
|
|
3185
|
+
height: dim.height,
|
|
3186
|
+
width: dim.width,
|
|
3187
|
+
...css(el, [
|
|
3188
|
+
'overflow',
|
|
3189
|
+
'padding',
|
|
3190
|
+
'borderTop',
|
|
3191
|
+
'borderRight',
|
|
3192
|
+
'borderBottom',
|
|
3193
|
+
'borderLeft',
|
|
3194
|
+
'borderImage',
|
|
3195
|
+
marginStartProp]) });
|
|
3260
3196
|
|
|
3261
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3262
|
-
const offsetEl = offset(el);
|
|
3263
|
-
const useClipPath = right ?
|
|
3264
|
-
offsetEl.right < scrollElement.clientWidth :
|
|
3265
|
-
Math.round(offsetEl.left) > 0;
|
|
3266
3197
|
|
|
3267
|
-
css(el, {
|
|
3268
|
-
clipPath: useClipPath ?
|
|
3269
|
-
right ? "polygon(0 0," +
|
|
3270
|
-
percent + "% 0," + percent + "% 100%,0 100%)" : "polygon(" + (
|
|
3271
|
-
100 - percent) + "% 0,100% 0,100% 100%," + (100 - percent) + "% 100%)" :
|
|
3272
|
-
'',
|
|
3273
|
-
marginLeft: (100 - percent) * (right ? 1 : -1) / 100 * width });
|
|
3274
3198
|
|
|
3199
|
+
css(el, {
|
|
3200
|
+
padding: 0,
|
|
3201
|
+
border: 0,
|
|
3202
|
+
[marginStartProp]: 0,
|
|
3203
|
+
width: dim.width,
|
|
3204
|
+
height: dim.height,
|
|
3205
|
+
overflow: 'hidden',
|
|
3206
|
+
[dimProp]: currentDim });
|
|
3275
3207
|
|
|
3276
|
-
return (
|
|
3277
|
-
show ?
|
|
3278
|
-
Transition.start(
|
|
3279
|
-
el,
|
|
3280
|
-
{
|
|
3281
|
-
clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
|
|
3282
|
-
marginLeft: 0 },
|
|
3283
3208
|
|
|
3284
|
-
|
|
3285
|
-
|
|
3209
|
+
const percent = currentDim / endDim;
|
|
3210
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3211
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3286
3212
|
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
3213
|
+
if (end) {
|
|
3214
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3215
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3216
|
+
}
|
|
3292
3217
|
|
|
3218
|
+
if (!end ^ mode === 'reveal') {
|
|
3219
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3220
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3221
|
+
}
|
|
3293
3222
|
|
|
3294
|
-
|
|
3295
|
-
|
|
3223
|
+
try {
|
|
3224
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3225
|
+
} finally {
|
|
3226
|
+
css(el, prevProps);
|
|
3227
|
+
unwrap(wrapper.firstChild);
|
|
3296
3228
|
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
css(scrollElement, 'overflowX', '');
|
|
3302
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3303
|
-
});
|
|
3229
|
+
if (!show) {
|
|
3230
|
+
_toggle(el, false);
|
|
3231
|
+
}
|
|
3232
|
+
}
|
|
3304
3233
|
};
|
|
3305
3234
|
}
|
|
3306
3235
|
|
|
@@ -3325,6 +3254,7 @@
|
|
|
3325
3254
|
mixins: [Class, Lazyload, Togglable],
|
|
3326
3255
|
|
|
3327
3256
|
props: {
|
|
3257
|
+
animation: Boolean,
|
|
3328
3258
|
targets: String,
|
|
3329
3259
|
active: null,
|
|
3330
3260
|
collapsible: Boolean,
|
|
@@ -3337,7 +3267,7 @@
|
|
|
3337
3267
|
data: {
|
|
3338
3268
|
targets: '> *',
|
|
3339
3269
|
active: false,
|
|
3340
|
-
animation:
|
|
3270
|
+
animation: true,
|
|
3341
3271
|
collapsible: true,
|
|
3342
3272
|
multiple: false,
|
|
3343
3273
|
clsOpen: 'uk-open',
|
|
@@ -3383,7 +3313,7 @@
|
|
|
3383
3313
|
hide(
|
|
3384
3314
|
el,
|
|
3385
3315
|
!hasClass(
|
|
3386
|
-
this.items.find((item) =>
|
|
3316
|
+
this.items.find((item) => within(el, item)),
|
|
3387
3317
|
this.clsOpen));
|
|
3388
3318
|
|
|
3389
3319
|
|
|
@@ -3435,23 +3365,15 @@
|
|
|
3435
3365
|
toggleClass(el, this.clsOpen, show);
|
|
3436
3366
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3437
3367
|
|
|
3438
|
-
const content = $(
|
|
3368
|
+
const content = $(this.content, el);
|
|
3439
3369
|
|
|
3440
|
-
if (animate === false || !this.
|
|
3370
|
+
if (animate === false || !this.animation) {
|
|
3371
|
+
content.hidden = !show;
|
|
3441
3372
|
hide(content, !show);
|
|
3442
3373
|
return;
|
|
3443
3374
|
}
|
|
3444
3375
|
|
|
3445
|
-
|
|
3446
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3447
|
-
}
|
|
3448
|
-
|
|
3449
|
-
hide(content, false);
|
|
3450
|
-
await slide(this)(el._wrapper, show);
|
|
3451
|
-
hide(content, !show);
|
|
3452
|
-
|
|
3453
|
-
delete el._wrapper;
|
|
3454
|
-
unwrap(content);
|
|
3376
|
+
await toggleTransition(this)(content, show);
|
|
3455
3377
|
|
|
3456
3378
|
if (show) {
|
|
3457
3379
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3477,18 +3399,17 @@
|
|
|
3477
3399
|
args: 'animation',
|
|
3478
3400
|
|
|
3479
3401
|
props: {
|
|
3402
|
+
animation: Boolean,
|
|
3480
3403
|
close: String },
|
|
3481
3404
|
|
|
3482
3405
|
|
|
3483
3406
|
data: {
|
|
3484
|
-
animation:
|
|
3407
|
+
animation: true,
|
|
3485
3408
|
selClose: '.uk-alert-close',
|
|
3486
|
-
duration: 150,
|
|
3487
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3409
|
+
duration: 150 },
|
|
3488
3410
|
|
|
3489
3411
|
|
|
3490
|
-
events:
|
|
3491
|
-
{
|
|
3412
|
+
events: {
|
|
3492
3413
|
name: 'click',
|
|
3493
3414
|
|
|
3494
3415
|
delegate() {
|
|
@@ -3498,16 +3419,39 @@
|
|
|
3498
3419
|
handler(e) {
|
|
3499
3420
|
e.preventDefault();
|
|
3500
3421
|
this.close();
|
|
3501
|
-
} }
|
|
3502
|
-
|
|
3422
|
+
} },
|
|
3503
3423
|
|
|
3504
3424
|
|
|
3505
3425
|
methods: {
|
|
3506
3426
|
async close() {
|
|
3507
|
-
await this.toggleElement(this.$el);
|
|
3427
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3508
3428
|
this.$destroy(true);
|
|
3509
3429
|
} } };
|
|
3510
3430
|
|
|
3431
|
+
|
|
3432
|
+
|
|
3433
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3434
|
+
return (el) => {
|
|
3435
|
+
const height = toFloat(css(el, 'height'));
|
|
3436
|
+
css(el, 'height', height);
|
|
3437
|
+
return Transition.start(
|
|
3438
|
+
el,
|
|
3439
|
+
{
|
|
3440
|
+
height: 0,
|
|
3441
|
+
marginTop: 0,
|
|
3442
|
+
marginBottom: 0,
|
|
3443
|
+
paddingTop: 0,
|
|
3444
|
+
paddingBottom: 0,
|
|
3445
|
+
borderTop: 0,
|
|
3446
|
+
borderBottom: 0,
|
|
3447
|
+
opacity: 0 },
|
|
3448
|
+
|
|
3449
|
+
velocity * height + duration,
|
|
3450
|
+
transition);
|
|
3451
|
+
|
|
3452
|
+
};
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3511
3455
|
var Video = {
|
|
3512
3456
|
args: 'autoplay',
|
|
3513
3457
|
|
|
@@ -3656,13 +3600,17 @@
|
|
|
3656
3600
|
props: {
|
|
3657
3601
|
pos: String,
|
|
3658
3602
|
offset: null,
|
|
3659
|
-
flip: Boolean
|
|
3603
|
+
flip: Boolean,
|
|
3604
|
+
shift: Boolean,
|
|
3605
|
+
inset: Boolean },
|
|
3660
3606
|
|
|
3661
3607
|
|
|
3662
3608
|
data: {
|
|
3663
3609
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3610
|
+
offset: false,
|
|
3664
3611
|
flip: true,
|
|
3665
|
-
|
|
3612
|
+
shift: true,
|
|
3613
|
+
inset: false },
|
|
3666
3614
|
|
|
3667
3615
|
|
|
3668
3616
|
connected() {
|
|
@@ -3674,19 +3622,24 @@
|
|
|
3674
3622
|
methods: {
|
|
3675
3623
|
positionAt(element, target, boundary) {
|
|
3676
3624
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3625
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3677
3626
|
|
|
3678
3627
|
const attach = {
|
|
3679
|
-
element: [flipPosition(this.dir), this.align],
|
|
3628
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3680
3629
|
target: [this.dir, this.align] };
|
|
3681
3630
|
|
|
3682
3631
|
|
|
3683
3632
|
if (this.axis === 'y') {
|
|
3684
3633
|
for (const prop in attach) {
|
|
3685
|
-
attach[prop]
|
|
3634
|
+
attach[prop].reverse();
|
|
3686
3635
|
}
|
|
3687
|
-
offset
|
|
3636
|
+
offset.reverse();
|
|
3637
|
+
placement.reverse();
|
|
3688
3638
|
}
|
|
3689
3639
|
|
|
3640
|
+
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
3641
|
+
const { scrollTop, scrollLeft } = scrollElement;
|
|
3642
|
+
|
|
3690
3643
|
// Ensure none positioned element does not generate scrollbars
|
|
3691
3644
|
const elDim = dimensions(element);
|
|
3692
3645
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
@@ -3695,93 +3648,88 @@
|
|
|
3695
3648
|
attach,
|
|
3696
3649
|
offset,
|
|
3697
3650
|
boundary,
|
|
3698
|
-
|
|
3651
|
+
placement,
|
|
3699
3652
|
viewportOffset: this.getViewportOffset(element) });
|
|
3700
3653
|
|
|
3654
|
+
|
|
3655
|
+
// Restore scroll position
|
|
3656
|
+
scrollElement.scrollTop = scrollTop;
|
|
3657
|
+
scrollElement.scrollLeft = scrollLeft;
|
|
3701
3658
|
},
|
|
3702
3659
|
|
|
3703
3660
|
getPositionOffset(element) {
|
|
3704
3661
|
return (
|
|
3705
3662
|
toPx(
|
|
3706
|
-
this.offset === false ?
|
|
3663
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3707
3664
|
this.axis === 'x' ? 'width' : 'height',
|
|
3708
3665
|
element) * (
|
|
3709
|
-
|
|
3666
|
+
|
|
3667
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3668
|
+
this.inset ? -1 : 1));
|
|
3710
3669
|
|
|
3711
3670
|
},
|
|
3712
3671
|
|
|
3713
3672
|
getShiftOffset(element) {
|
|
3714
|
-
return
|
|
3673
|
+
return this.align === 'center' ?
|
|
3715
3674
|
0 :
|
|
3716
3675
|
toPx(
|
|
3717
|
-
|
|
3676
|
+
css(element, '--uk-position-shift-offset'),
|
|
3718
3677
|
this.axis === 'y' ? 'width' : 'height',
|
|
3719
3678
|
element) * (
|
|
3720
3679
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3721
3680
|
},
|
|
3722
3681
|
|
|
3723
3682
|
getViewportOffset(element) {
|
|
3724
|
-
return toPx(
|
|
3683
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3725
3684
|
} } };
|
|
3726
3685
|
|
|
3727
|
-
|
|
3686
|
+
var Style = {
|
|
3687
|
+
beforeConnect() {
|
|
3688
|
+
this._style = attr(this.$el, 'style');
|
|
3689
|
+
},
|
|
3690
|
+
|
|
3691
|
+
disconnected() {
|
|
3692
|
+
attr(this.$el, 'style', this._style);
|
|
3693
|
+
} };
|
|
3728
3694
|
|
|
3729
|
-
|
|
3730
|
-
mixins: [Container, Lazyload, Position, Togglable],
|
|
3695
|
+
const active$1 = [];
|
|
3731
3696
|
|
|
3732
|
-
|
|
3697
|
+
var Modal = {
|
|
3698
|
+
mixins: [Class, Container, Togglable],
|
|
3733
3699
|
|
|
3734
3700
|
props: {
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
delayHide: Number,
|
|
3741
|
-
display: String,
|
|
3742
|
-
clsDrop: String,
|
|
3743
|
-
animateOut: Boolean },
|
|
3701
|
+
selPanel: String,
|
|
3702
|
+
selClose: String,
|
|
3703
|
+
escClose: Boolean,
|
|
3704
|
+
bgClose: Boolean,
|
|
3705
|
+
stack: Boolean },
|
|
3744
3706
|
|
|
3745
3707
|
|
|
3746
3708
|
data: {
|
|
3747
|
-
mode: ['click', 'hover'],
|
|
3748
|
-
toggle: '- *',
|
|
3749
|
-
boundary: true,
|
|
3750
|
-
boundaryAlign: false,
|
|
3751
|
-
delayShow: 0,
|
|
3752
|
-
delayHide: 800,
|
|
3753
|
-
display: null,
|
|
3754
|
-
clsDrop: false,
|
|
3755
|
-
animation: ['uk-animation-fade'],
|
|
3756
3709
|
cls: 'uk-open',
|
|
3757
|
-
|
|
3758
|
-
|
|
3710
|
+
escClose: true,
|
|
3711
|
+
bgClose: true,
|
|
3712
|
+
overlay: true,
|
|
3713
|
+
stack: false },
|
|
3759
3714
|
|
|
3760
3715
|
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3716
|
+
computed: {
|
|
3717
|
+
panel(_ref, $el) {let { selPanel } = _ref;
|
|
3718
|
+
return $(selPanel, $el);
|
|
3719
|
+
},
|
|
3764
3720
|
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3721
|
+
transitionElement() {
|
|
3722
|
+
return this.panel;
|
|
3723
|
+
},
|
|
3768
3724
|
|
|
3769
|
-
|
|
3770
|
-
|
|
3725
|
+
bgClose(_ref2) {let { bgClose } = _ref2;
|
|
3726
|
+
return bgClose && this.panel;
|
|
3727
|
+
} },
|
|
3771
3728
|
|
|
3772
|
-
if (this.toggle && !this.target) {
|
|
3773
|
-
this.target = this.$create('toggle', query(this.toggle, this.$el), {
|
|
3774
|
-
target: this.$el,
|
|
3775
|
-
mode: this.mode }).
|
|
3776
|
-
$el;
|
|
3777
|
-
attr(this.target, 'aria-haspopup', true);
|
|
3778
|
-
this.lazyload(this.target);
|
|
3779
|
-
}
|
|
3780
|
-
},
|
|
3781
3729
|
|
|
3782
|
-
|
|
3783
|
-
if (this
|
|
3784
|
-
|
|
3730
|
+
beforeDisconnect() {
|
|
3731
|
+
if (includes(active$1, this)) {
|
|
3732
|
+
this.toggleElement(this.$el, false, false);
|
|
3785
3733
|
}
|
|
3786
3734
|
},
|
|
3787
3735
|
|
|
@@ -3790,1776 +3738,1940 @@
|
|
|
3790
3738
|
name: 'click',
|
|
3791
3739
|
|
|
3792
3740
|
delegate() {
|
|
3793
|
-
return
|
|
3741
|
+
return this.selClose;
|
|
3794
3742
|
},
|
|
3795
3743
|
|
|
3796
3744
|
handler(e) {
|
|
3797
3745
|
e.preventDefault();
|
|
3798
|
-
this.hide(
|
|
3746
|
+
this.hide();
|
|
3799
3747
|
} },
|
|
3800
3748
|
|
|
3801
3749
|
|
|
3802
3750
|
{
|
|
3803
|
-
name: '
|
|
3751
|
+
name: 'toggle',
|
|
3804
3752
|
|
|
3805
|
-
|
|
3806
|
-
return 'a[href^="#"]';
|
|
3807
|
-
},
|
|
3753
|
+
self: true,
|
|
3808
3754
|
|
|
3809
|
-
handler(
|
|
3810
|
-
if (
|
|
3811
|
-
|
|
3755
|
+
handler(e) {
|
|
3756
|
+
if (e.defaultPrevented) {
|
|
3757
|
+
return;
|
|
3812
3758
|
}
|
|
3813
|
-
} },
|
|
3814
3759
|
|
|
3760
|
+
e.preventDefault();
|
|
3815
3761
|
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
handler() {
|
|
3820
|
-
this.hide(false);
|
|
3762
|
+
if (this.isToggled() === includes(active$1, this)) {
|
|
3763
|
+
this.toggle();
|
|
3764
|
+
}
|
|
3821
3765
|
} },
|
|
3822
3766
|
|
|
3823
3767
|
|
|
3824
3768
|
{
|
|
3825
|
-
name: '
|
|
3769
|
+
name: 'beforeshow',
|
|
3826
3770
|
|
|
3827
3771
|
self: true,
|
|
3828
3772
|
|
|
3829
|
-
handler(e
|
|
3830
|
-
|
|
3773
|
+
handler(e) {
|
|
3774
|
+
if (includes(active$1, this)) {
|
|
3775
|
+
return false;
|
|
3776
|
+
}
|
|
3831
3777
|
|
|
3832
|
-
if (this.
|
|
3833
|
-
|
|
3778
|
+
if (!this.stack && active$1.length) {
|
|
3779
|
+
Promise.all(active$1.map((modal) => modal.hide())).then(this.show);
|
|
3780
|
+
e.preventDefault();
|
|
3834
3781
|
} else {
|
|
3835
|
-
|
|
3782
|
+
active$1.push(this);
|
|
3836
3783
|
}
|
|
3837
3784
|
} },
|
|
3838
3785
|
|
|
3839
3786
|
|
|
3840
3787
|
{
|
|
3841
|
-
name: '
|
|
3788
|
+
name: 'show',
|
|
3842
3789
|
|
|
3843
3790
|
self: true,
|
|
3844
3791
|
|
|
3845
|
-
handler(
|
|
3846
|
-
|
|
3847
|
-
this
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
self: true,
|
|
3855
|
-
|
|
3856
|
-
handler(e) {
|
|
3857
|
-
e.preventDefault();
|
|
3858
|
-
if (!matches(this.$el, ':focus,:hover')) {
|
|
3859
|
-
this.hide();
|
|
3860
|
-
}
|
|
3861
|
-
} },
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
{
|
|
3865
|
-
name: pointerEnter + " focusin",
|
|
3866
|
-
|
|
3867
|
-
filter() {
|
|
3868
|
-
return includes(this.mode, 'hover');
|
|
3869
|
-
},
|
|
3870
|
-
|
|
3871
|
-
handler(e) {
|
|
3872
|
-
if (!isTouch(e)) {
|
|
3873
|
-
this.clearTimers();
|
|
3874
|
-
}
|
|
3875
|
-
} },
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
{
|
|
3879
|
-
name: pointerLeave + " focusout",
|
|
3792
|
+
handler() {
|
|
3793
|
+
once(
|
|
3794
|
+
this.$el,
|
|
3795
|
+
'hide',
|
|
3796
|
+
on(document, 'focusin', (e) => {
|
|
3797
|
+
if (last(active$1) === this && !within(e.target, this.$el)) {
|
|
3798
|
+
this.$el.focus();
|
|
3799
|
+
}
|
|
3800
|
+
}));
|
|
3880
3801
|
|
|
3881
|
-
filter() {
|
|
3882
|
-
return includes(this.mode, 'hover');
|
|
3883
|
-
},
|
|
3884
3802
|
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
this
|
|
3803
|
+
if (this.overlay) {
|
|
3804
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3805
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3888
3806
|
}
|
|
3889
|
-
} },
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
{
|
|
3893
|
-
name: 'toggled',
|
|
3894
|
-
|
|
3895
|
-
self: true,
|
|
3896
3807
|
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
return;
|
|
3808
|
+
if (this.stack) {
|
|
3809
|
+
css(this.$el, 'zIndex', toFloat(css(this.$el, 'zIndex')) + active$1.length);
|
|
3900
3810
|
}
|
|
3901
3811
|
|
|
3902
|
-
this.
|
|
3903
|
-
this.position();
|
|
3904
|
-
} },
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
{
|
|
3908
|
-
name: 'show',
|
|
3909
|
-
|
|
3910
|
-
self: true,
|
|
3911
|
-
|
|
3912
|
-
handler() {
|
|
3913
|
-
active$1 = this;
|
|
3812
|
+
addClass(document.documentElement, this.clsPage);
|
|
3914
3813
|
|
|
3915
|
-
this.
|
|
3814
|
+
if (this.bgClose) {
|
|
3815
|
+
once(
|
|
3816
|
+
this.$el,
|
|
3817
|
+
'hide',
|
|
3818
|
+
on(document, pointerDown, (_ref3) => {let { target } = _ref3;
|
|
3819
|
+
if (
|
|
3820
|
+
last(active$1) !== this ||
|
|
3821
|
+
this.overlay && !within(target, this.$el) ||
|
|
3822
|
+
within(target, this.panel))
|
|
3823
|
+
{
|
|
3824
|
+
return;
|
|
3825
|
+
}
|
|
3916
3826
|
|
|
3917
|
-
for (const handler of [
|
|
3918
|
-
on(
|
|
3919
|
-
document,
|
|
3920
|
-
pointerDown,
|
|
3921
|
-
(_ref2) => {let { target } = _ref2;return (
|
|
3922
|
-
!within(target, this.$el) &&
|
|
3923
3827
|
once(
|
|
3924
3828
|
document,
|
|
3925
3829
|
pointerUp + " " + pointerCancel + " scroll",
|
|
3926
|
-
(
|
|
3830
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
3927
3831
|
if (
|
|
3928
3832
|
!defaultPrevented &&
|
|
3929
3833
|
type === pointerUp &&
|
|
3930
|
-
target === newTarget
|
|
3931
|
-
!(this.target && within(target, this.target)))
|
|
3834
|
+
target === newTarget)
|
|
3932
3835
|
{
|
|
3933
|
-
this.hide(
|
|
3836
|
+
this.hide();
|
|
3934
3837
|
}
|
|
3935
3838
|
},
|
|
3936
|
-
true)
|
|
3937
|
-
|
|
3938
|
-
|
|
3839
|
+
true);
|
|
3939
3840
|
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
this.hide(false);
|
|
3943
|
-
}
|
|
3944
|
-
}),
|
|
3841
|
+
}),
|
|
3842
|
+
{ self: true });
|
|
3945
3843
|
|
|
3946
|
-
|
|
3947
|
-
[] :
|
|
3948
|
-
(() => {
|
|
3949
|
-
const handler = () => this.$emit();
|
|
3950
|
-
return [
|
|
3951
|
-
on(window, 'resize', handler),
|
|
3952
|
-
on(document, 'scroll', handler, true),
|
|
3953
|
-
(() => {
|
|
3954
|
-
const observer = observeResize(
|
|
3955
|
-
scrollParents(this.$el),
|
|
3956
|
-
handler);
|
|
3844
|
+
}
|
|
3957
3845
|
|
|
3958
|
-
|
|
3959
|
-
|
|
3846
|
+
if (this.escClose) {
|
|
3847
|
+
once(
|
|
3848
|
+
this.$el,
|
|
3849
|
+
'hide',
|
|
3850
|
+
on(document, 'keydown', (e) => {
|
|
3851
|
+
if (e.keyCode === 27 && last(active$1) === this) {
|
|
3852
|
+
this.hide();
|
|
3853
|
+
}
|
|
3854
|
+
}),
|
|
3855
|
+
{ self: true });
|
|
3960
3856
|
|
|
3961
|
-
})())])
|
|
3962
|
-
{
|
|
3963
|
-
once(this.$el, 'hide', handler, { self: true });
|
|
3964
3857
|
}
|
|
3965
3858
|
} },
|
|
3966
3859
|
|
|
3967
3860
|
|
|
3968
3861
|
{
|
|
3969
|
-
name: '
|
|
3862
|
+
name: 'shown',
|
|
3970
3863
|
|
|
3971
3864
|
self: true,
|
|
3972
3865
|
|
|
3973
3866
|
handler() {
|
|
3974
|
-
this
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
{
|
|
3979
|
-
name: 'hide',
|
|
3867
|
+
if (!isFocusable(this.$el)) {
|
|
3868
|
+
attr(this.$el, 'tabindex', '-1');
|
|
3869
|
+
}
|
|
3980
3870
|
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
active$1 =
|
|
3984
|
-
active$1 === null && within(target, this.$el) && this.isToggled() ?
|
|
3985
|
-
this :
|
|
3986
|
-
active$1;
|
|
3987
|
-
return;
|
|
3871
|
+
if (!$(':focus', this.$el)) {
|
|
3872
|
+
this.$el.focus();
|
|
3988
3873
|
}
|
|
3874
|
+
} },
|
|
3989
3875
|
|
|
3990
|
-
active$1 = this.isActive() ? null : active$1;
|
|
3991
|
-
this.tracker.cancel();
|
|
3992
|
-
} }],
|
|
3993
3876
|
|
|
3877
|
+
{
|
|
3878
|
+
name: 'hidden',
|
|
3994
3879
|
|
|
3880
|
+
self: true,
|
|
3995
3881
|
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
this.position();
|
|
3882
|
+
handler() {
|
|
3883
|
+
if (includes(active$1, this)) {
|
|
3884
|
+
active$1.splice(active$1.indexOf(this), 1);
|
|
4000
3885
|
}
|
|
4001
|
-
} },
|
|
4002
3886
|
|
|
3887
|
+
css(this.$el, 'zIndex', '');
|
|
4003
3888
|
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
if (this.isToggled() && target && this.target && target !== this.target) {
|
|
4007
|
-
this.hide(false, false);
|
|
3889
|
+
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
3890
|
+
removeClass(document.documentElement, this.clsPage);
|
|
4008
3891
|
}
|
|
3892
|
+
} }],
|
|
4009
3893
|
|
|
4010
|
-
this.target = target;
|
|
4011
|
-
|
|
4012
|
-
this.clearTimers();
|
|
4013
|
-
|
|
4014
|
-
if (this.isActive()) {
|
|
4015
|
-
return;
|
|
4016
|
-
}
|
|
4017
3894
|
|
|
4018
|
-
if (active$1) {
|
|
4019
|
-
if (delay && active$1.isDelaying) {
|
|
4020
|
-
this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
|
|
4021
|
-
return;
|
|
4022
|
-
}
|
|
4023
3895
|
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
}
|
|
4029
|
-
}
|
|
3896
|
+
methods: {
|
|
3897
|
+
toggle() {
|
|
3898
|
+
return this.isToggled() ? this.hide() : this.show();
|
|
3899
|
+
},
|
|
4030
3900
|
|
|
3901
|
+
show() {
|
|
4031
3902
|
if (this.container && parent(this.$el) !== this.container) {
|
|
4032
3903
|
append(this.container, this.$el);
|
|
4033
|
-
|
|
3904
|
+
return new Promise((resolve) =>
|
|
3905
|
+
requestAnimationFrame(() => this.show().then(resolve)));
|
|
4034
3906
|
|
|
4035
|
-
|
|
4036
|
-
() => this.toggleElement(this.$el, true),
|
|
4037
|
-
delay && this.delayShow || 0);
|
|
3907
|
+
}
|
|
4038
3908
|
|
|
3909
|
+
return this.toggleElement(this.$el, true, animate(this));
|
|
4039
3910
|
},
|
|
4040
3911
|
|
|
4041
|
-
hide(
|
|
4042
|
-
|
|
3912
|
+
hide() {
|
|
3913
|
+
return this.toggleElement(this.$el, false, animate(this));
|
|
3914
|
+
} } };
|
|
4043
3915
|
|
|
4044
|
-
this.clearTimers();
|
|
4045
3916
|
|
|
4046
|
-
this.isDelaying = getPositionedElements(this.$el).some((el) =>
|
|
4047
|
-
this.tracker.movesTo(el));
|
|
4048
3917
|
|
|
3918
|
+
function animate(_ref5) {let { transitionElement, _toggle } = _ref5;
|
|
3919
|
+
return (el, show) =>
|
|
3920
|
+
new Promise((resolve, reject) =>
|
|
3921
|
+
once(el, 'show hide', () => {
|
|
3922
|
+
el._reject == null ? void 0 : el._reject();
|
|
3923
|
+
el._reject = reject;
|
|
4049
3924
|
|
|
4050
|
-
|
|
4051
|
-
this.hideTimer = setTimeout(this.hide, 50);
|
|
4052
|
-
} else if (delay && this.delayHide) {
|
|
4053
|
-
this.hideTimer = setTimeout(hide, this.delayHide);
|
|
4054
|
-
} else {
|
|
4055
|
-
hide();
|
|
4056
|
-
}
|
|
4057
|
-
},
|
|
3925
|
+
_toggle(el, show);
|
|
4058
3926
|
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
},
|
|
3927
|
+
const off = once(
|
|
3928
|
+
transitionElement,
|
|
3929
|
+
'transitionstart',
|
|
3930
|
+
() => {
|
|
3931
|
+
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
3932
|
+
self: true });
|
|
4066
3933
|
|
|
4067
|
-
|
|
4068
|
-
return active$1 === this;
|
|
3934
|
+
clearTimeout(timer);
|
|
4069
3935
|
},
|
|
3936
|
+
{ self: true });
|
|
4070
3937
|
|
|
4071
|
-
position() {
|
|
4072
|
-
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4073
|
-
toggleClass(this.$el, this.clsDrop + "-boundary", this.boundaryAlign);
|
|
4074
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4075
3938
|
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
3939
|
+
const timer = setTimeout(() => {
|
|
3940
|
+
off();
|
|
3941
|
+
resolve();
|
|
3942
|
+
}, toMs(css(transitionElement, 'transitionDuration')));
|
|
3943
|
+
})).
|
|
3944
|
+
then(() => delete el._reject);
|
|
3945
|
+
}
|
|
4080
3946
|
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
3947
|
+
function toMs(time) {
|
|
3948
|
+
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
3949
|
+
}
|
|
4084
3950
|
|
|
4085
|
-
|
|
4086
|
-
|
|
3951
|
+
function preventOverscroll(el) {
|
|
3952
|
+
if (CSS.supports('overscroll-behavior', 'contain')) {
|
|
3953
|
+
const elements = filterChildren(el, (child) => /auto|scroll/.test(css(child, 'overflow')));
|
|
3954
|
+
css(elements, 'overscrollBehavior', 'contain');
|
|
3955
|
+
return () => css(elements, 'overscrollBehavior', '');
|
|
3956
|
+
}
|
|
4087
3957
|
|
|
4088
|
-
|
|
4089
|
-
const prop = this.axis === 'y' ? 'width' : 'height';
|
|
4090
|
-
css(
|
|
4091
|
-
this.$el,
|
|
4092
|
-
prop,
|
|
4093
|
-
Math.min(
|
|
4094
|
-
(boundary ? boundaryOffset : offset(this.target))[prop],
|
|
4095
|
-
scrollParentOffset[prop] - 2 * viewportOffset));
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
} else if (this.align === 'stretch') {
|
|
4099
|
-
this.flip = this.axis === 'y' ? 'x' : 'y';
|
|
4100
|
-
this.display = 'static';
|
|
4101
|
-
|
|
4102
|
-
const viewport = offsetViewport(scrollParent);
|
|
4103
|
-
const targetDim = offset(target);
|
|
4104
|
-
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4105
|
-
|
|
4106
|
-
css(this.$el, {
|
|
4107
|
-
width:
|
|
4108
|
-
this.axis === 'y' ?
|
|
4109
|
-
viewport.width :
|
|
4110
|
-
(this.dir === 'left' ?
|
|
4111
|
-
targetDim.left - viewport.left :
|
|
4112
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4113
|
-
height:
|
|
4114
|
-
this.axis === 'x' ?
|
|
4115
|
-
viewport.height :
|
|
4116
|
-
(this.dir === 'top' ?
|
|
4117
|
-
targetDim.top - viewport.top :
|
|
4118
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4119
|
-
|
|
4120
|
-
} else if (this.$el.offsetWidth > maxWidth) {
|
|
4121
|
-
addClass(this.$el, this.clsDrop + "-stack");
|
|
4122
|
-
}
|
|
3958
|
+
let startClientY;
|
|
4123
3959
|
|
|
4124
|
-
|
|
3960
|
+
const events = [
|
|
3961
|
+
on(
|
|
3962
|
+
el,
|
|
3963
|
+
'touchstart',
|
|
3964
|
+
(_ref6) => {let { targetTouches } = _ref6;
|
|
3965
|
+
if (targetTouches.length === 1) {
|
|
3966
|
+
startClientY = targetTouches[0].clientY;
|
|
3967
|
+
}
|
|
3968
|
+
},
|
|
3969
|
+
{ passive: true }),
|
|
4125
3970
|
|
|
4126
|
-
this.positionAt(this.$el, target, boundary);
|
|
4127
|
-
} } };
|
|
4128
3971
|
|
|
3972
|
+
on(
|
|
3973
|
+
el,
|
|
3974
|
+
'touchmove',
|
|
3975
|
+
(e) => {
|
|
3976
|
+
if (e.targetTouches.length !== 1) {
|
|
3977
|
+
return;
|
|
3978
|
+
}
|
|
4129
3979
|
|
|
3980
|
+
let [scrollParent] = scrollParents(e.target, /auto|scroll/);
|
|
3981
|
+
if (!within(scrollParent, el)) {
|
|
3982
|
+
scrollParent = el;
|
|
3983
|
+
}
|
|
4130
3984
|
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
apply(el, (el) => css(el, 'position') !== 'static' && result.push(el));
|
|
4134
|
-
return result;
|
|
4135
|
-
}
|
|
3985
|
+
const clientY = e.targetTouches[0].clientY - startClientY;
|
|
3986
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollParent;
|
|
4136
3987
|
|
|
4137
|
-
|
|
4138
|
-
|
|
3988
|
+
if (
|
|
3989
|
+
clientHeight >= scrollHeight ||
|
|
3990
|
+
scrollTop === 0 && clientY > 0 ||
|
|
3991
|
+
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
3992
|
+
{
|
|
3993
|
+
e.cancelable && e.preventDefault();
|
|
3994
|
+
}
|
|
3995
|
+
},
|
|
3996
|
+
{ passive: false })];
|
|
4139
3997
|
|
|
4140
|
-
|
|
3998
|
+
|
|
3999
|
+
|
|
4000
|
+
return () => events.forEach((fn) => fn());
|
|
4001
|
+
}
|
|
4002
|
+
|
|
4003
|
+
let prevented;
|
|
4004
|
+
function preventBackgroundScroll() {
|
|
4005
|
+
if (prevented) {
|
|
4006
|
+
return noop;
|
|
4007
|
+
}
|
|
4008
|
+
prevented = true;
|
|
4009
|
+
const { body, documentElement } = document;
|
|
4010
|
+
css(body, {
|
|
4011
|
+
overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
|
|
4012
|
+
touchAction: 'none' });
|
|
4013
|
+
|
|
4014
|
+
css(documentElement, 'overflowY', 'hidden');
|
|
4015
|
+
return () => {
|
|
4016
|
+
prevented = false;
|
|
4017
|
+
css(documentElement, 'overflowY', '');
|
|
4018
|
+
css(body, { overflowY: '', touchAction: '' });
|
|
4019
|
+
};
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
function filterChildren(el, fn) {
|
|
4023
|
+
const children = [];
|
|
4024
|
+
apply(el, (node) => {
|
|
4025
|
+
if (fn(node)) {
|
|
4026
|
+
children.push(node);
|
|
4027
|
+
}
|
|
4028
|
+
});
|
|
4029
|
+
return children;
|
|
4030
|
+
}
|
|
4031
|
+
|
|
4032
|
+
let active;
|
|
4033
|
+
|
|
4034
|
+
var drop = {
|
|
4035
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4036
|
+
|
|
4037
|
+
args: 'pos',
|
|
4141
4038
|
|
|
4142
4039
|
props: {
|
|
4143
|
-
|
|
4040
|
+
mode: 'list',
|
|
4041
|
+
toggle: Boolean,
|
|
4042
|
+
boundary: Boolean,
|
|
4043
|
+
target: Boolean,
|
|
4044
|
+
targetX: Boolean,
|
|
4045
|
+
targetY: Boolean,
|
|
4046
|
+
stretch: Boolean,
|
|
4047
|
+
delayShow: Number,
|
|
4048
|
+
delayHide: Number,
|
|
4049
|
+
display: String,
|
|
4050
|
+
clsDrop: String,
|
|
4051
|
+
animateOut: Boolean,
|
|
4052
|
+
bgScroll: Boolean },
|
|
4144
4053
|
|
|
4145
4054
|
|
|
4146
4055
|
data: {
|
|
4147
|
-
|
|
4056
|
+
mode: ['click', 'hover'],
|
|
4057
|
+
toggle: '- *',
|
|
4058
|
+
boundary: false,
|
|
4059
|
+
target: false,
|
|
4060
|
+
targetX: false,
|
|
4061
|
+
targetY: false,
|
|
4062
|
+
stretch: false,
|
|
4063
|
+
delayShow: 0,
|
|
4064
|
+
delayHide: 800,
|
|
4065
|
+
display: null,
|
|
4066
|
+
clsDrop: false,
|
|
4067
|
+
animateOut: false,
|
|
4068
|
+
bgScroll: true,
|
|
4069
|
+
animation: ['uk-animation-fade'],
|
|
4070
|
+
cls: 'uk-open',
|
|
4071
|
+
container: false },
|
|
4148
4072
|
|
|
4149
4073
|
|
|
4150
4074
|
computed: {
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
state() {
|
|
4156
|
-
return this.input.nextElementSibling;
|
|
4157
|
-
},
|
|
4075
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4076
|
+
targetX = targetX || target || this.targetEl;
|
|
4077
|
+
targetY = targetY || target || this.targetEl;
|
|
4158
4078
|
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
target === true && parent(this.input) === $el && this.input.nextElementSibling ||
|
|
4163
|
-
$(target, $el)));
|
|
4079
|
+
return [
|
|
4080
|
+
targetX === true ? window : query(targetX, $el),
|
|
4081
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4164
4082
|
|
|
4165
4083
|
} },
|
|
4166
4084
|
|
|
4167
4085
|
|
|
4168
|
-
|
|
4169
|
-
|
|
4086
|
+
created() {
|
|
4087
|
+
this.tracker = new MouseTracker();
|
|
4088
|
+
},
|
|
4170
4089
|
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4090
|
+
beforeConnect() {
|
|
4091
|
+
this.clsDrop = this.$props.clsDrop || "uk-" + this.$options.name;
|
|
4092
|
+
},
|
|
4174
4093
|
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
const prev = target[prop];
|
|
4178
|
-
const value = (_input$files = input.files) != null && _input$files[0] ?
|
|
4179
|
-
input.files[0].name :
|
|
4180
|
-
matches(input, 'select') && (
|
|
4181
|
-
option = $$('option', input).filter((el) => el.selected)[0]) // eslint-disable-line prefer-destructuring
|
|
4182
|
-
? option.textContent :
|
|
4183
|
-
input.value;
|
|
4094
|
+
connected() {
|
|
4095
|
+
addClass(this.$el, this.clsDrop);
|
|
4184
4096
|
|
|
4185
|
-
if (
|
|
4186
|
-
|
|
4097
|
+
if (this.toggle && !this.targetEl) {
|
|
4098
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4099
|
+
target: this.$el,
|
|
4100
|
+
mode: this.mode }).
|
|
4101
|
+
$el;
|
|
4102
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4103
|
+
this.lazyload(this.targetEl);
|
|
4104
|
+
}
|
|
4105
|
+
},
|
|
4106
|
+
|
|
4107
|
+
disconnected() {
|
|
4108
|
+
if (this.isActive()) {
|
|
4109
|
+
active = null;
|
|
4187
4110
|
}
|
|
4188
4111
|
},
|
|
4189
4112
|
|
|
4190
4113
|
events: [
|
|
4191
4114
|
{
|
|
4192
|
-
name: '
|
|
4115
|
+
name: 'click',
|
|
4193
4116
|
|
|
4194
|
-
|
|
4195
|
-
this
|
|
4117
|
+
delegate() {
|
|
4118
|
+
return "." + this.clsDrop + "-close";
|
|
4119
|
+
},
|
|
4120
|
+
|
|
4121
|
+
handler(e) {
|
|
4122
|
+
e.preventDefault();
|
|
4123
|
+
this.hide(false);
|
|
4196
4124
|
} },
|
|
4197
4125
|
|
|
4198
4126
|
|
|
4199
4127
|
{
|
|
4200
|
-
name: '
|
|
4128
|
+
name: 'click',
|
|
4201
4129
|
|
|
4202
|
-
|
|
4203
|
-
return
|
|
4130
|
+
delegate() {
|
|
4131
|
+
return 'a[href^="#"]';
|
|
4204
4132
|
},
|
|
4205
4133
|
|
|
4134
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4135
|
+
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4136
|
+
this.hide(false);
|
|
4137
|
+
}
|
|
4138
|
+
} },
|
|
4139
|
+
|
|
4140
|
+
|
|
4141
|
+
{
|
|
4142
|
+
name: 'beforescroll',
|
|
4143
|
+
|
|
4206
4144
|
handler() {
|
|
4207
|
-
this
|
|
4208
|
-
} }
|
|
4145
|
+
this.hide(false);
|
|
4146
|
+
} },
|
|
4209
4147
|
|
|
4210
|
-
var Margin = {
|
|
4211
|
-
mixins: [Resize],
|
|
4212
4148
|
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
firstColumn: Boolean },
|
|
4149
|
+
{
|
|
4150
|
+
name: 'toggle',
|
|
4216
4151
|
|
|
4152
|
+
self: true,
|
|
4217
4153
|
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
firstColumn: 'uk-first-column' },
|
|
4154
|
+
handler(e, toggle) {
|
|
4155
|
+
e.preventDefault();
|
|
4221
4156
|
|
|
4157
|
+
if (this.isToggled()) {
|
|
4158
|
+
this.hide(false);
|
|
4159
|
+
} else {
|
|
4160
|
+
this.show(toggle == null ? void 0 : toggle.$el, false);
|
|
4161
|
+
}
|
|
4162
|
+
} },
|
|
4222
4163
|
|
|
4223
|
-
resizeTargets() {
|
|
4224
|
-
return [this.$el, ...toArray(this.$el.children)];
|
|
4225
|
-
},
|
|
4226
4164
|
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
observeMutation(this.$el, () => this.$reset(), {
|
|
4230
|
-
childList: true }));
|
|
4165
|
+
{
|
|
4166
|
+
name: 'toggleshow',
|
|
4231
4167
|
|
|
4168
|
+
self: true,
|
|
4232
4169
|
|
|
4233
|
-
|
|
4170
|
+
handler(e, toggle) {
|
|
4171
|
+
e.preventDefault();
|
|
4172
|
+
this.show(toggle == null ? void 0 : toggle.$el);
|
|
4173
|
+
} },
|
|
4234
4174
|
|
|
4235
|
-
update: {
|
|
4236
|
-
read() {
|
|
4237
|
-
const rows = getRows(this.$el.children);
|
|
4238
4175
|
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
columns: getColumns(rows) };
|
|
4176
|
+
{
|
|
4177
|
+
name: 'togglehide',
|
|
4242
4178
|
|
|
4243
|
-
|
|
4179
|
+
self: true,
|
|
4244
4180
|
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
toggleClass(column, this.firstColumn, columns[0].includes(column));
|
|
4250
|
-
}
|
|
4181
|
+
handler(e) {
|
|
4182
|
+
e.preventDefault();
|
|
4183
|
+
if (!matches(this.$el, ':focus,:hover')) {
|
|
4184
|
+
this.hide();
|
|
4251
4185
|
}
|
|
4252
|
-
},
|
|
4186
|
+
} },
|
|
4253
4187
|
|
|
4254
|
-
events: ['resize'] } };
|
|
4255
4188
|
|
|
4189
|
+
{
|
|
4190
|
+
name: pointerEnter + " focusin",
|
|
4256
4191
|
|
|
4192
|
+
filter() {
|
|
4193
|
+
return includes(this.mode, 'hover');
|
|
4194
|
+
},
|
|
4257
4195
|
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4196
|
+
handler(e) {
|
|
4197
|
+
if (!isTouch(e)) {
|
|
4198
|
+
this.clearTimers();
|
|
4199
|
+
}
|
|
4200
|
+
} },
|
|
4261
4201
|
|
|
4262
|
-
function getColumns(rows) {
|
|
4263
|
-
const columns = [];
|
|
4264
4202
|
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
for (let j = 0; j < sorted.length; j++) {
|
|
4268
|
-
columns[j] = columns[j] ? columns[j].concat(sorted[j]) : sorted[j];
|
|
4269
|
-
}
|
|
4270
|
-
}
|
|
4203
|
+
{
|
|
4204
|
+
name: pointerLeave + " focusout",
|
|
4271
4205
|
|
|
4272
|
-
|
|
4273
|
-
|
|
4206
|
+
filter() {
|
|
4207
|
+
return includes(this.mode, 'hover');
|
|
4208
|
+
},
|
|
4274
4209
|
|
|
4275
|
-
|
|
4276
|
-
|
|
4210
|
+
handler(e) {
|
|
4211
|
+
if (!isTouch(e) && e.relatedTarget) {
|
|
4212
|
+
this.hide();
|
|
4213
|
+
}
|
|
4214
|
+
} },
|
|
4277
4215
|
|
|
4278
|
-
for (const el of items) {
|
|
4279
|
-
if (!isVisible(el)) {
|
|
4280
|
-
continue;
|
|
4281
|
-
}
|
|
4282
4216
|
|
|
4283
|
-
|
|
4217
|
+
{
|
|
4218
|
+
name: 'toggled',
|
|
4284
4219
|
|
|
4285
|
-
|
|
4286
|
-
const current = sorted[i];
|
|
4220
|
+
self: true,
|
|
4287
4221
|
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4222
|
+
handler(e, toggled) {
|
|
4223
|
+
if (!toggled) {
|
|
4224
|
+
return;
|
|
4291
4225
|
}
|
|
4292
4226
|
|
|
4293
|
-
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
} else {
|
|
4297
|
-
dim = getOffset(el, true);
|
|
4298
|
-
startDim = getOffset(current[0], true);
|
|
4299
|
-
}
|
|
4227
|
+
this.clearTimers();
|
|
4228
|
+
this.position();
|
|
4229
|
+
} },
|
|
4300
4230
|
|
|
4301
|
-
if (dim[startProp] >= startDim[endProp] - 1 && dim[startProp] !== startDim[startProp]) {
|
|
4302
|
-
sorted.push([el]);
|
|
4303
|
-
break;
|
|
4304
|
-
}
|
|
4305
4231
|
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
break;
|
|
4309
|
-
}
|
|
4232
|
+
{
|
|
4233
|
+
name: 'show',
|
|
4310
4234
|
|
|
4311
|
-
|
|
4312
|
-
sorted.unshift([el]);
|
|
4313
|
-
break;
|
|
4314
|
-
}
|
|
4315
|
-
}
|
|
4316
|
-
}
|
|
4235
|
+
self: true,
|
|
4317
4236
|
|
|
4318
|
-
|
|
4319
|
-
|
|
4237
|
+
handler() {
|
|
4238
|
+
active = this;
|
|
4320
4239
|
|
|
4321
|
-
|
|
4322
|
-
let { offsetTop, offsetLeft, offsetHeight, offsetWidth } = element;
|
|
4323
|
-
|
|
4324
|
-
if (offset) {
|
|
4325
|
-
[offsetTop, offsetLeft] = offsetPosition(element);
|
|
4326
|
-
}
|
|
4327
|
-
|
|
4328
|
-
return {
|
|
4329
|
-
top: offsetTop,
|
|
4330
|
-
left: offsetLeft,
|
|
4331
|
-
bottom: offsetTop + offsetHeight,
|
|
4332
|
-
right: offsetLeft + offsetWidth };
|
|
4240
|
+
this.tracker.init();
|
|
4333
4241
|
|
|
4334
|
-
|
|
4242
|
+
for (const handler of [
|
|
4243
|
+
on(
|
|
4244
|
+
document,
|
|
4245
|
+
pointerDown,
|
|
4246
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4247
|
+
!within(target, this.$el) &&
|
|
4248
|
+
once(
|
|
4249
|
+
document,
|
|
4250
|
+
pointerUp + " " + pointerCancel + " scroll",
|
|
4251
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4252
|
+
if (
|
|
4253
|
+
!defaultPrevented &&
|
|
4254
|
+
type === pointerUp &&
|
|
4255
|
+
target === newTarget &&
|
|
4256
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4257
|
+
{
|
|
4258
|
+
this.hide(false);
|
|
4259
|
+
}
|
|
4260
|
+
},
|
|
4261
|
+
true));}),
|
|
4335
4262
|
|
|
4336
|
-
var Scroll = {
|
|
4337
|
-
connected() {
|
|
4338
|
-
registerScrollListener(this._uid, () => this.$emit('scroll'));
|
|
4339
|
-
},
|
|
4340
4263
|
|
|
4341
|
-
disconnected() {
|
|
4342
|
-
unregisterScrollListener(this._uid);
|
|
4343
|
-
} };
|
|
4344
4264
|
|
|
4265
|
+
on(document, 'keydown', (e) => {
|
|
4266
|
+
if (e.keyCode === 27) {
|
|
4267
|
+
this.hide(false);
|
|
4268
|
+
}
|
|
4269
|
+
}),
|
|
4345
4270
|
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
unbindScrollListener =
|
|
4350
|
-
unbindScrollListener ||
|
|
4351
|
-
on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
|
|
4352
|
-
passive: true,
|
|
4353
|
-
capture: true });
|
|
4271
|
+
...(this.bgScroll ?
|
|
4272
|
+
[] :
|
|
4273
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()]),
|
|
4354
4274
|
|
|
4275
|
+
...(this.display === 'static' ?
|
|
4276
|
+
[] :
|
|
4277
|
+
(() => {
|
|
4278
|
+
const handler = () => this.$emit();
|
|
4279
|
+
return [
|
|
4280
|
+
on(window, 'resize', handler),
|
|
4281
|
+
on([document, scrollParents(this.$el)], 'scroll', handler),
|
|
4282
|
+
(() => {
|
|
4283
|
+
const observer = observeResize(
|
|
4284
|
+
scrollParents(this.$el),
|
|
4285
|
+
handler);
|
|
4355
4286
|
|
|
4356
|
-
|
|
4357
|
-
|
|
4287
|
+
return () => observer.disconnect();
|
|
4288
|
+
})()];
|
|
4358
4289
|
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
}
|
|
4365
|
-
}
|
|
4290
|
+
})())])
|
|
4291
|
+
{
|
|
4292
|
+
once(this.$el, 'hide', handler, { self: true });
|
|
4293
|
+
}
|
|
4294
|
+
} },
|
|
4366
4295
|
|
|
4367
|
-
var grid = {
|
|
4368
|
-
extends: Margin,
|
|
4369
4296
|
|
|
4370
|
-
|
|
4297
|
+
{
|
|
4298
|
+
name: 'beforehide',
|
|
4371
4299
|
|
|
4372
|
-
|
|
4300
|
+
self: true,
|
|
4373
4301
|
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4302
|
+
handler() {
|
|
4303
|
+
this.clearTimers();
|
|
4304
|
+
} },
|
|
4377
4305
|
|
|
4378
4306
|
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
clsStack: 'uk-grid-stack',
|
|
4382
|
-
masonry: false,
|
|
4383
|
-
parallax: 0 },
|
|
4307
|
+
{
|
|
4308
|
+
name: 'hide',
|
|
4384
4309
|
|
|
4310
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4311
|
+
if (this.$el !== target) {
|
|
4312
|
+
active =
|
|
4313
|
+
active === null && within(target, this.$el) && this.isToggled() ?
|
|
4314
|
+
this :
|
|
4315
|
+
active;
|
|
4316
|
+
return;
|
|
4317
|
+
}
|
|
4385
4318
|
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4319
|
+
active = this.isActive() ? null : active;
|
|
4320
|
+
this.tracker.cancel();
|
|
4321
|
+
} }],
|
|
4389
4322
|
|
|
4390
|
-
update: [
|
|
4391
|
-
{
|
|
4392
|
-
write(_ref) {let { columns } = _ref;
|
|
4393
|
-
toggleClass(this.$el, this.clsStack, columns.length < 2);
|
|
4394
|
-
},
|
|
4395
4323
|
|
|
4396
|
-
events: ['resize'] },
|
|
4397
4324
|
|
|
4325
|
+
update: {
|
|
4326
|
+
write() {
|
|
4327
|
+
if (this.isToggled() && !hasClass(this.$el, this.clsEnter)) {
|
|
4328
|
+
this.position();
|
|
4329
|
+
}
|
|
4330
|
+
} },
|
|
4398
4331
|
|
|
4399
|
-
{
|
|
4400
|
-
read(data) {
|
|
4401
|
-
let { columns, rows } = data;
|
|
4402
4332
|
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
positionedAbsolute(this.$el))
|
|
4408
|
-
{
|
|
4409
|
-
data.translates = false;
|
|
4410
|
-
return false;
|
|
4333
|
+
methods: {
|
|
4334
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4335
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4336
|
+
this.hide(false, false);
|
|
4411
4337
|
}
|
|
4412
4338
|
|
|
4413
|
-
|
|
4339
|
+
this.targetEl = target;
|
|
4414
4340
|
|
|
4415
|
-
|
|
4416
|
-
const columnHeights = getColumnHeights(columns);
|
|
4417
|
-
const margin = getMarginTop(nodes, this.margin) * (rows.length - 1);
|
|
4418
|
-
const elHeight = Math.max(...columnHeights) + margin;
|
|
4341
|
+
this.clearTimers();
|
|
4419
4342
|
|
|
4420
|
-
if (this.
|
|
4421
|
-
|
|
4422
|
-
translates = getTranslates(rows, columns);
|
|
4343
|
+
if (this.isActive()) {
|
|
4344
|
+
return;
|
|
4423
4345
|
}
|
|
4424
4346
|
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
newPadding,
|
|
4431
|
-
hgt + margin + (i % 2 ? padding : padding / 8) - elHeight),
|
|
4347
|
+
if (active) {
|
|
4348
|
+
if (delay && active.isDelaying) {
|
|
4349
|
+
this.showTimer = setTimeout(() => matches(target, ':hover') && this.show(), 10);
|
|
4350
|
+
return;
|
|
4351
|
+
}
|
|
4432
4352
|
|
|
4433
|
-
|
|
4353
|
+
let prev;
|
|
4354
|
+
while (active && prev !== active && !within(this.$el, active.$el)) {
|
|
4355
|
+
prev = active;
|
|
4356
|
+
active.hide(false, false);
|
|
4357
|
+
}
|
|
4358
|
+
}
|
|
4434
4359
|
|
|
4360
|
+
if (this.container && parent(this.$el) !== this.container) {
|
|
4361
|
+
append(this.container, this.$el);
|
|
4435
4362
|
}
|
|
4436
4363
|
|
|
4437
|
-
|
|
4438
|
-
|
|
4364
|
+
this.showTimer = setTimeout(
|
|
4365
|
+
() => this.toggleElement(this.$el, true),
|
|
4366
|
+
delay && this.delayShow || 0);
|
|
4439
4367
|
|
|
4440
|
-
write(_ref2) {let { height, padding } = _ref2;
|
|
4441
|
-
css(this.$el, 'paddingBottom', padding || '');
|
|
4442
|
-
height !== false && css(this.$el, 'height', height);
|
|
4443
4368
|
},
|
|
4444
4369
|
|
|
4445
|
-
|
|
4370
|
+
hide(delay, animate) {if (delay === void 0) {delay = true;}if (animate === void 0) {animate = true;}
|
|
4371
|
+
const hide = () => this.toggleElement(this.$el, false, this.animateOut && animate);
|
|
4446
4372
|
|
|
4373
|
+
this.clearTimers();
|
|
4447
4374
|
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4375
|
+
this.isDelaying = getPositionedElements(this.$el).some((el) =>
|
|
4376
|
+
this.tracker.movesTo(el));
|
|
4377
|
+
|
|
4378
|
+
|
|
4379
|
+
if (delay && this.isDelaying) {
|
|
4380
|
+
this.hideTimer = setTimeout(this.hide, 50);
|
|
4381
|
+
} else if (delay && this.delayHide) {
|
|
4382
|
+
this.hideTimer = setTimeout(hide, this.delayHide);
|
|
4383
|
+
} else {
|
|
4384
|
+
hide();
|
|
4452
4385
|
}
|
|
4386
|
+
},
|
|
4453
4387
|
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4388
|
+
clearTimers() {
|
|
4389
|
+
clearTimeout(this.showTimer);
|
|
4390
|
+
clearTimeout(this.hideTimer);
|
|
4391
|
+
this.showTimer = null;
|
|
4392
|
+
this.hideTimer = null;
|
|
4393
|
+
this.isDelaying = false;
|
|
4394
|
+
},
|
|
4458
4395
|
|
|
4396
|
+
isActive() {
|
|
4397
|
+
return active === this;
|
|
4459
4398
|
},
|
|
4460
4399
|
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
}
|
|
4400
|
+
position() {
|
|
4401
|
+
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4402
|
+
attr(this.$el, 'style', this._style);
|
|
4465
4403
|
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
css(
|
|
4469
|
-
el,
|
|
4470
|
-
'transform',
|
|
4471
|
-
!scrolled && !translates ?
|
|
4472
|
-
'' : "translateY(" + (
|
|
4404
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4405
|
+
this.$el.hidden = true;
|
|
4473
4406
|
|
|
4474
|
-
|
|
4475
|
-
|
|
4407
|
+
const boundary = query(this.boundary, this.$el);
|
|
4408
|
+
const boundaryOffset = offsetViewport(boundary || window);
|
|
4409
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4410
|
+
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4476
4411
|
|
|
4412
|
+
const dirs = [
|
|
4413
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4414
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4477
4415
|
|
|
4478
4416
|
|
|
4417
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4418
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4419
|
+
css(this.$el, {
|
|
4420
|
+
[prop]: Math.min(
|
|
4421
|
+
boundaryOffset[prop],
|
|
4422
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4479
4423
|
|
|
4480
|
-
|
|
4424
|
+
["overflow-" + axis]: 'auto' });
|
|
4481
4425
|
|
|
4482
|
-
|
|
4426
|
+
}
|
|
4427
|
+
}
|
|
4428
|
+
|
|
4429
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4430
|
+
|
|
4431
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4432
|
+
addClass(this.$el, this.clsDrop + "-stack");
|
|
4433
|
+
}
|
|
4483
4434
|
|
|
4435
|
+
css(this.$el, 'maxWidth', maxWidth);
|
|
4484
4436
|
|
|
4437
|
+
this.$el.hidden = false;
|
|
4485
4438
|
|
|
4439
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4486
4440
|
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4441
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4442
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4443
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4444
|
+
const targetOffset = offset(this.target[i]);
|
|
4445
|
+
const elOffset = offset(this.$el);
|
|
4490
4446
|
|
|
4491
|
-
|
|
4492
|
-
|
|
4447
|
+
css(this.$el, {
|
|
4448
|
+
[prop]:
|
|
4449
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4450
|
+
targetOffset[start] -
|
|
4451
|
+
Math.max(
|
|
4452
|
+
boundaryOffset[start],
|
|
4453
|
+
viewports[i][start] + viewportOffset) :
|
|
4493
4454
|
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4455
|
+
Math.min(
|
|
4456
|
+
boundaryOffset[end],
|
|
4457
|
+
viewports[i][end] - viewportOffset) -
|
|
4458
|
+
targetOffset[end]) - positionOffset,
|
|
4459
|
+
["overflow-" + axis]: 'auto' });
|
|
4499
4460
|
|
|
4500
|
-
});
|
|
4501
|
-
}
|
|
4502
4461
|
|
|
4503
|
-
|
|
4504
|
-
|
|
4462
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4463
|
+
}
|
|
4464
|
+
}
|
|
4465
|
+
} } };
|
|
4505
4466
|
|
|
4506
|
-
return toFloat(node ? css(node, 'marginTop') : css(nodes[0], 'paddingLeft'));
|
|
4507
|
-
}
|
|
4508
4467
|
|
|
4509
|
-
|
|
4510
|
-
|
|
4468
|
+
|
|
4469
|
+
function getPositionedElements(el) {
|
|
4470
|
+
const result = [];
|
|
4471
|
+
apply(el, (el) => css(el, 'position') !== 'static' && result.push(el));
|
|
4472
|
+
return result;
|
|
4511
4473
|
}
|
|
4512
4474
|
|
|
4513
|
-
var
|
|
4514
|
-
mixins: [
|
|
4475
|
+
var formCustom = {
|
|
4476
|
+
mixins: [Class],
|
|
4515
4477
|
|
|
4516
4478
|
args: 'target',
|
|
4517
4479
|
|
|
4518
4480
|
props: {
|
|
4519
|
-
target:
|
|
4520
|
-
row: Boolean },
|
|
4481
|
+
target: Boolean },
|
|
4521
4482
|
|
|
4522
4483
|
|
|
4523
4484
|
data: {
|
|
4524
|
-
target:
|
|
4525
|
-
row: true },
|
|
4485
|
+
target: false },
|
|
4526
4486
|
|
|
4527
4487
|
|
|
4528
4488
|
computed: {
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
return $$(target, $el);
|
|
4532
|
-
},
|
|
4533
|
-
|
|
4534
|
-
watch() {
|
|
4535
|
-
this.$reset();
|
|
4536
|
-
} } },
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
resizeTargets() {
|
|
4541
|
-
return [this.$el, ...this.elements];
|
|
4542
|
-
},
|
|
4543
|
-
|
|
4544
|
-
update: {
|
|
4545
|
-
read() {
|
|
4546
|
-
return {
|
|
4547
|
-
rows: (this.row ? getRows(this.elements) : [this.elements]).map(match) };
|
|
4548
|
-
|
|
4489
|
+
input(_, $el) {
|
|
4490
|
+
return $(selInput, $el);
|
|
4549
4491
|
},
|
|
4550
4492
|
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
elements.forEach((el, i) => css(el, 'minHeight', heights[i]));
|
|
4554
|
-
}
|
|
4493
|
+
state() {
|
|
4494
|
+
return this.input.nextElementSibling;
|
|
4555
4495
|
},
|
|
4556
4496
|
|
|
4557
|
-
|
|
4497
|
+
target(_ref, $el) {let { target } = _ref;
|
|
4498
|
+
return (
|
|
4499
|
+
target && (
|
|
4500
|
+
target === true && parent(this.input) === $el && this.input.nextElementSibling ||
|
|
4501
|
+
$(target, $el)));
|
|
4558
4502
|
|
|
4503
|
+
} },
|
|
4559
4504
|
|
|
4560
4505
|
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
return { heights: [''], elements };
|
|
4564
|
-
}
|
|
4506
|
+
update() {var _input$files;
|
|
4507
|
+
const { target, input } = this;
|
|
4565
4508
|
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4509
|
+
if (!target) {
|
|
4510
|
+
return;
|
|
4511
|
+
}
|
|
4569
4512
|
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4513
|
+
let option;
|
|
4514
|
+
const prop = isInput(target) ? 'value' : 'textContent';
|
|
4515
|
+
const prev = target[prop];
|
|
4516
|
+
const value = (_input$files = input.files) != null && _input$files[0] ?
|
|
4517
|
+
input.files[0].name :
|
|
4518
|
+
matches(input, 'select') && (
|
|
4519
|
+
option = $$('option', input).filter((el) => el.selected)[0]) // eslint-disable-line prefer-destructuring
|
|
4520
|
+
? option.textContent :
|
|
4521
|
+
input.value;
|
|
4573
4522
|
|
|
4574
|
-
|
|
4523
|
+
if (prev !== value) {
|
|
4524
|
+
target[prop] = value;
|
|
4525
|
+
}
|
|
4526
|
+
},
|
|
4575
4527
|
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
style = element.style.display;
|
|
4580
|
-
css(element, 'display', 'block', 'important');
|
|
4581
|
-
}
|
|
4528
|
+
events: [
|
|
4529
|
+
{
|
|
4530
|
+
name: 'change',
|
|
4582
4531
|
|
|
4583
|
-
|
|
4532
|
+
handler() {
|
|
4533
|
+
this.$emit();
|
|
4534
|
+
} },
|
|
4584
4535
|
|
|
4585
|
-
if (style !== false) {
|
|
4586
|
-
css(element, 'display', style);
|
|
4587
|
-
}
|
|
4588
4536
|
|
|
4589
|
-
|
|
4590
|
-
|
|
4537
|
+
{
|
|
4538
|
+
name: 'reset',
|
|
4591
4539
|
|
|
4592
|
-
|
|
4540
|
+
el() {
|
|
4541
|
+
return closest(this.$el, 'form');
|
|
4542
|
+
},
|
|
4543
|
+
|
|
4544
|
+
handler() {
|
|
4545
|
+
this.$emit();
|
|
4546
|
+
} }] };
|
|
4547
|
+
|
|
4548
|
+
var Margin = {
|
|
4593
4549
|
mixins: [Resize],
|
|
4594
4550
|
|
|
4595
4551
|
props: {
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
offsetBottom: Boolean,
|
|
4599
|
-
minHeight: Number },
|
|
4552
|
+
margin: String,
|
|
4553
|
+
firstColumn: Boolean },
|
|
4600
4554
|
|
|
4601
4555
|
|
|
4602
4556
|
data: {
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
offsetBottom: false,
|
|
4606
|
-
minHeight: 0 },
|
|
4557
|
+
margin: 'uk-margin-small-top',
|
|
4558
|
+
firstColumn: 'uk-first-column' },
|
|
4607
4559
|
|
|
4608
4560
|
|
|
4609
4561
|
resizeTargets() {
|
|
4610
|
-
|
|
4611
|
-
return [this.$el, ...scrollParents(this.$el, /auto|scroll/)];
|
|
4562
|
+
return [this.$el, ...toArray(this.$el.children)];
|
|
4612
4563
|
},
|
|
4613
4564
|
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
}
|
|
4619
|
-
|
|
4620
|
-
let minHeight = '';
|
|
4621
|
-
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4622
|
-
|
|
4623
|
-
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4624
|
-
const { height: viewportHeight } = offsetViewport(scrollElement);
|
|
4625
|
-
|
|
4626
|
-
if (this.expand) {
|
|
4627
|
-
minHeight = Math.max(
|
|
4628
|
-
viewportHeight - (
|
|
4629
|
-
dimensions(scrollElement).height - dimensions(this.$el).height) -
|
|
4630
|
-
box,
|
|
4631
|
-
0);
|
|
4632
|
-
|
|
4633
|
-
} else {
|
|
4634
|
-
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4635
|
-
minHeight = "calc(" + (
|
|
4636
|
-
document.scrollingElement === scrollElement ? '100vh' : viewportHeight + "px");
|
|
4565
|
+
connected() {
|
|
4566
|
+
this.registerObserver(
|
|
4567
|
+
observeMutation(this.$el, () => this.$reset(), {
|
|
4568
|
+
childList: true }));
|
|
4637
4569
|
|
|
4638
4570
|
|
|
4639
|
-
|
|
4640
|
-
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4641
|
-
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4642
|
-
}
|
|
4571
|
+
},
|
|
4643
4572
|
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
minHeight += " - " + this.offsetBottom + "vh";
|
|
4648
|
-
} else if (this.offsetBottom && endsWith(this.offsetBottom, 'px')) {
|
|
4649
|
-
minHeight += " - " + toFloat(this.offsetBottom) + "px";
|
|
4650
|
-
} else if (isString(this.offsetBottom)) {
|
|
4651
|
-
minHeight += " - " + dimensions(query(this.offsetBottom, this.$el)).height + "px";
|
|
4652
|
-
}
|
|
4573
|
+
update: {
|
|
4574
|
+
read() {
|
|
4575
|
+
const rows = getRows(this.$el.children);
|
|
4653
4576
|
|
|
4654
|
-
|
|
4655
|
-
|
|
4577
|
+
return {
|
|
4578
|
+
rows,
|
|
4579
|
+
columns: getColumns(rows) };
|
|
4656
4580
|
|
|
4657
|
-
return { minHeight, prev };
|
|
4658
4581
|
},
|
|
4659
4582
|
|
|
4660
|
-
write(
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4583
|
+
write(_ref) {let { columns, rows } = _ref;
|
|
4584
|
+
for (const row of rows) {
|
|
4585
|
+
for (const column of row) {
|
|
4586
|
+
toggleClass(column, this.margin, rows[0] !== row);
|
|
4587
|
+
toggleClass(column, this.firstColumn, columns[0].includes(column));
|
|
4588
|
+
}
|
|
4665
4589
|
}
|
|
4666
4590
|
},
|
|
4667
4591
|
|
|
4668
4592
|
events: ['resize'] } };
|
|
4669
4593
|
|
|
4670
|
-
var SVG = {
|
|
4671
|
-
args: 'src',
|
|
4672
|
-
|
|
4673
|
-
props: {
|
|
4674
|
-
id: Boolean,
|
|
4675
|
-
icon: String,
|
|
4676
|
-
src: String,
|
|
4677
|
-
style: String,
|
|
4678
|
-
width: Number,
|
|
4679
|
-
height: Number,
|
|
4680
|
-
ratio: Number,
|
|
4681
|
-
class: String,
|
|
4682
|
-
strokeAnimation: Boolean,
|
|
4683
|
-
focusable: Boolean, // IE 11
|
|
4684
|
-
attributes: 'list' },
|
|
4685
|
-
|
|
4686
4594
|
|
|
4687
|
-
data: {
|
|
4688
|
-
ratio: 1,
|
|
4689
|
-
include: ['style', 'class', 'focusable'],
|
|
4690
|
-
class: '',
|
|
4691
|
-
strokeAnimation: false },
|
|
4692
4595
|
|
|
4596
|
+
function getRows(items) {
|
|
4597
|
+
return sortBy(items, 'top', 'bottom');
|
|
4598
|
+
}
|
|
4693
4599
|
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
},
|
|
4600
|
+
function getColumns(rows) {
|
|
4601
|
+
const columns = [];
|
|
4697
4602
|
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4603
|
+
for (const row of rows) {
|
|
4604
|
+
const sorted = sortBy(row, 'left', 'right');
|
|
4605
|
+
for (let j = 0; j < sorted.length; j++) {
|
|
4606
|
+
columns[j] = columns[j] ? columns[j].concat(sorted[j]) : sorted[j];
|
|
4701
4607
|
}
|
|
4608
|
+
}
|
|
4702
4609
|
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
const svg = insertSVG(el, this.$el);
|
|
4610
|
+
return isRtl ? columns.reverse() : columns;
|
|
4611
|
+
}
|
|
4706
4612
|
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
}
|
|
4613
|
+
function sortBy(items, startProp, endProp) {
|
|
4614
|
+
const sorted = [[]];
|
|
4710
4615
|
|
|
4711
|
-
|
|
4616
|
+
for (const el of items) {
|
|
4617
|
+
if (!isVisible(el)) {
|
|
4618
|
+
continue;
|
|
4619
|
+
}
|
|
4712
4620
|
|
|
4713
|
-
|
|
4714
|
-
}
|
|
4715
|
-
}, noop);
|
|
4621
|
+
let dim = getOffset(el);
|
|
4716
4622
|
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
if (this._connected) {
|
|
4720
|
-
applyAnimation(el);
|
|
4721
|
-
this.registerObserver(
|
|
4722
|
-
observeIntersection(el, (records, observer) => {
|
|
4723
|
-
applyAnimation(el);
|
|
4724
|
-
observer.disconnect();
|
|
4725
|
-
}));
|
|
4623
|
+
for (let i = sorted.length - 1; i >= 0; i--) {
|
|
4624
|
+
const current = sorted[i];
|
|
4726
4625
|
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4626
|
+
if (!current[0]) {
|
|
4627
|
+
current.push(el);
|
|
4628
|
+
break;
|
|
4629
|
+
}
|
|
4731
4630
|
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4631
|
+
let startDim;
|
|
4632
|
+
if (current[0].offsetParent === el.offsetParent) {
|
|
4633
|
+
startDim = getOffset(current[0]);
|
|
4634
|
+
} else {
|
|
4635
|
+
dim = getOffset(el, true);
|
|
4636
|
+
startDim = getOffset(current[0], true);
|
|
4736
4637
|
}
|
|
4737
4638
|
|
|
4738
|
-
if (
|
|
4739
|
-
|
|
4639
|
+
if (dim[startProp] >= startDim[endProp] - 1 && dim[startProp] !== startDim[startProp]) {
|
|
4640
|
+
sorted.push([el]);
|
|
4641
|
+
break;
|
|
4740
4642
|
}
|
|
4741
4643
|
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
this.svg = null;
|
|
4747
|
-
},
|
|
4748
|
-
|
|
4749
|
-
methods: {
|
|
4750
|
-
async getSvg() {
|
|
4751
|
-
if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
|
|
4752
|
-
return new Promise((resolve) =>
|
|
4753
|
-
once(this.$el, 'load', () => resolve(this.getSvg())));
|
|
4644
|
+
if (dim[endProp] - 1 > startDim[startProp] || dim[startProp] === startDim[startProp]) {
|
|
4645
|
+
current.push(el);
|
|
4646
|
+
break;
|
|
4647
|
+
}
|
|
4754
4648
|
|
|
4649
|
+
if (i === 0) {
|
|
4650
|
+
sorted.unshift([el]);
|
|
4651
|
+
break;
|
|
4755
4652
|
}
|
|
4653
|
+
}
|
|
4654
|
+
}
|
|
4756
4655
|
|
|
4757
|
-
|
|
4758
|
-
|
|
4656
|
+
return sorted;
|
|
4657
|
+
}
|
|
4759
4658
|
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
if (includes(this.include, prop) && prop in this) {
|
|
4763
|
-
attr(el, prop, this[prop]);
|
|
4764
|
-
}
|
|
4765
|
-
}
|
|
4659
|
+
function getOffset(element, offset) {if (offset === void 0) {offset = false;}
|
|
4660
|
+
let { offsetTop, offsetLeft, offsetHeight, offsetWidth } = element;
|
|
4766
4661
|
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4770
|
-
}
|
|
4662
|
+
if (offset) {
|
|
4663
|
+
[offsetTop, offsetLeft] = offsetPosition(element);
|
|
4664
|
+
}
|
|
4771
4665
|
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4666
|
+
return {
|
|
4667
|
+
top: offsetTop,
|
|
4668
|
+
left: offsetLeft,
|
|
4669
|
+
bottom: offsetTop + offsetHeight,
|
|
4670
|
+
right: offsetLeft + offsetWidth };
|
|
4775
4671
|
|
|
4776
|
-
|
|
4777
|
-
let dimensions = props.map((prop) => this[prop]);
|
|
4672
|
+
}
|
|
4778
4673
|
|
|
4779
|
-
|
|
4780
|
-
|
|
4781
|
-
|
|
4674
|
+
var Scroll = {
|
|
4675
|
+
connected() {
|
|
4676
|
+
registerScrollListener(this._uid, () => this.$emit('scroll'));
|
|
4677
|
+
},
|
|
4782
4678
|
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
}
|
|
4679
|
+
disconnected() {
|
|
4680
|
+
unregisterScrollListener(this._uid);
|
|
4681
|
+
} };
|
|
4787
4682
|
|
|
4788
|
-
dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));
|
|
4789
|
-
} } };
|
|
4790
4683
|
|
|
4684
|
+
const scrollListeners = new Map();
|
|
4685
|
+
let unbindScrollListener;
|
|
4686
|
+
function registerScrollListener(id, listener) {
|
|
4687
|
+
unbindScrollListener =
|
|
4688
|
+
unbindScrollListener ||
|
|
4689
|
+
on(window, 'scroll', () => scrollListeners.forEach((listener) => listener()), {
|
|
4690
|
+
passive: true,
|
|
4691
|
+
capture: true });
|
|
4791
4692
|
|
|
4792
4693
|
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
if (startsWith(src, 'data:')) {
|
|
4796
|
-
return decodeURIComponent(src.split(',')[1]);
|
|
4797
|
-
} else {
|
|
4798
|
-
return (await fetch(src)).text();
|
|
4799
|
-
}
|
|
4800
|
-
} else {
|
|
4801
|
-
return Promise.reject();
|
|
4802
|
-
}
|
|
4803
|
-
});
|
|
4694
|
+
scrollListeners.set(id, listener);
|
|
4695
|
+
}
|
|
4804
4696
|
|
|
4805
|
-
function
|
|
4806
|
-
|
|
4807
|
-
|
|
4697
|
+
function unregisterScrollListener(id) {
|
|
4698
|
+
scrollListeners.delete(id);
|
|
4699
|
+
if (unbindScrollListener && !scrollListeners.size) {
|
|
4700
|
+
unbindScrollListener();
|
|
4701
|
+
unbindScrollListener = null;
|
|
4808
4702
|
}
|
|
4809
|
-
|
|
4810
|
-
svg = $(svg.substr(svg.indexOf('<svg')));
|
|
4811
|
-
return ((_svg = svg) == null ? void 0 : _svg.hasChildNodes()) && svg;
|
|
4812
4703
|
}
|
|
4813
4704
|
|
|
4814
|
-
|
|
4815
|
-
|
|
4705
|
+
var grid = {
|
|
4706
|
+
extends: Margin,
|
|
4816
4707
|
|
|
4817
|
-
|
|
4818
|
-
if (!symbols[svg]) {
|
|
4819
|
-
symbols[svg] = {};
|
|
4708
|
+
mixins: [Class, Scroll],
|
|
4820
4709
|
|
|
4821
|
-
|
|
4710
|
+
name: 'grid',
|
|
4822
4711
|
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
}
|
|
4827
|
-
}
|
|
4712
|
+
props: {
|
|
4713
|
+
masonry: Boolean,
|
|
4714
|
+
parallax: Number },
|
|
4828
4715
|
|
|
4829
|
-
return symbols[svg][icon];
|
|
4830
|
-
}
|
|
4831
4716
|
|
|
4832
|
-
|
|
4833
|
-
|
|
4717
|
+
data: {
|
|
4718
|
+
margin: 'uk-grid-margin',
|
|
4719
|
+
clsStack: 'uk-grid-stack',
|
|
4720
|
+
masonry: false,
|
|
4721
|
+
parallax: 0 },
|
|
4834
4722
|
|
|
4835
|
-
if (length) {
|
|
4836
|
-
el.style.setProperty('--uk-animation-stroke', length);
|
|
4837
|
-
}
|
|
4838
|
-
}
|
|
4839
4723
|
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
0,
|
|
4844
|
-
...$$('[stroke]', el).map((stroke) => {
|
|
4845
|
-
try {
|
|
4846
|
-
return stroke.getTotalLength();
|
|
4847
|
-
} catch (e) {
|
|
4848
|
-
return 0;
|
|
4849
|
-
}
|
|
4850
|
-
})));
|
|
4724
|
+
connected() {
|
|
4725
|
+
this.masonry && addClass(this.$el, 'uk-flex-top uk-flex-wrap-top');
|
|
4726
|
+
},
|
|
4851
4727
|
|
|
4728
|
+
update: [
|
|
4729
|
+
{
|
|
4730
|
+
write(_ref) {let { columns } = _ref;
|
|
4731
|
+
toggleClass(this.$el, this.clsStack, columns.length < 2);
|
|
4732
|
+
},
|
|
4852
4733
|
|
|
4853
|
-
|
|
4734
|
+
events: ['resize'] },
|
|
4854
4735
|
|
|
4855
|
-
function insertSVG(el, root) {
|
|
4856
|
-
if (isVoidElement(root) || isTag(root, 'canvas')) {
|
|
4857
|
-
root.hidden = true;
|
|
4858
4736
|
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4737
|
+
{
|
|
4738
|
+
read(data) {
|
|
4739
|
+
let { columns, rows } = data;
|
|
4862
4740
|
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4741
|
+
// Filter component makes elements positioned absolute
|
|
4742
|
+
if (
|
|
4743
|
+
!columns.length ||
|
|
4744
|
+
!this.masonry && !this.parallax ||
|
|
4745
|
+
positionedAbsolute(this.$el))
|
|
4746
|
+
{
|
|
4747
|
+
data.translates = false;
|
|
4748
|
+
return false;
|
|
4749
|
+
}
|
|
4866
4750
|
|
|
4867
|
-
|
|
4868
|
-
return isTag(el, 'svg') && isTag(other, 'svg') && innerHTML(el) === innerHTML(other);
|
|
4869
|
-
}
|
|
4751
|
+
let translates = false;
|
|
4870
4752
|
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
replace(/\s/g, '');
|
|
4876
|
-
}
|
|
4753
|
+
const nodes = children(this.$el);
|
|
4754
|
+
const columnHeights = getColumnHeights(columns);
|
|
4755
|
+
const margin = getMarginTop(nodes, this.margin) * (rows.length - 1);
|
|
4756
|
+
const elHeight = Math.max(...columnHeights) + margin;
|
|
4877
4757
|
|
|
4878
|
-
|
|
4758
|
+
if (this.masonry) {
|
|
4759
|
+
columns = columns.map((column) => sortBy$1(column, 'offsetTop'));
|
|
4760
|
+
translates = getTranslates(rows, columns);
|
|
4761
|
+
}
|
|
4879
4762
|
|
|
4880
|
-
|
|
4763
|
+
let padding = Math.abs(this.parallax);
|
|
4764
|
+
if (padding) {
|
|
4765
|
+
padding = columnHeights.reduce(
|
|
4766
|
+
(newPadding, hgt, i) =>
|
|
4767
|
+
Math.max(
|
|
4768
|
+
newPadding,
|
|
4769
|
+
hgt + margin + (i % 2 ? padding : padding / 8) - elHeight),
|
|
4881
4770
|
|
|
4882
|
-
|
|
4771
|
+
0);
|
|
4883
4772
|
|
|
4884
|
-
|
|
4773
|
+
}
|
|
4885
4774
|
|
|
4886
|
-
|
|
4775
|
+
return { padding, columns, translates, height: translates ? elHeight : '' };
|
|
4776
|
+
},
|
|
4887
4777
|
|
|
4888
|
-
|
|
4778
|
+
write(_ref2) {let { height, padding } = _ref2;
|
|
4779
|
+
css(this.$el, 'paddingBottom', padding || '');
|
|
4780
|
+
height !== false && css(this.$el, 'height', height);
|
|
4781
|
+
},
|
|
4889
4782
|
|
|
4890
|
-
|
|
4783
|
+
events: ['resize'] },
|
|
4891
4784
|
|
|
4892
|
-
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>";
|
|
4893
4785
|
|
|
4894
|
-
|
|
4786
|
+
{
|
|
4787
|
+
read() {
|
|
4788
|
+
if (this.parallax && positionedAbsolute(this.$el)) {
|
|
4789
|
+
return false;
|
|
4790
|
+
}
|
|
4895
4791
|
|
|
4896
|
-
|
|
4792
|
+
return {
|
|
4793
|
+
scrolled: this.parallax ?
|
|
4794
|
+
scrolledOver(this.$el) * Math.abs(this.parallax) :
|
|
4795
|
+
false };
|
|
4897
4796
|
|
|
4898
|
-
|
|
4797
|
+
},
|
|
4899
4798
|
|
|
4900
|
-
|
|
4799
|
+
write(_ref3) {let { columns, scrolled, translates } = _ref3;
|
|
4800
|
+
if (scrolled === false && !translates) {
|
|
4801
|
+
return;
|
|
4802
|
+
}
|
|
4901
4803
|
|
|
4902
|
-
|
|
4804
|
+
columns.forEach((column, i) =>
|
|
4805
|
+
column.forEach((el, j) =>
|
|
4806
|
+
css(
|
|
4807
|
+
el,
|
|
4808
|
+
'transform',
|
|
4809
|
+
!scrolled && !translates ?
|
|
4810
|
+
'' : "translateY(" + (
|
|
4903
4811
|
|
|
4904
|
-
|
|
4812
|
+
(translates && -translates[i][j]) + (
|
|
4813
|
+
scrolled ? i % 2 ? scrolled : scrolled / 8 : 0)) + "px)")));
|
|
4905
4814
|
|
|
4906
|
-
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>";
|
|
4907
4815
|
|
|
4908
|
-
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>";
|
|
4909
4816
|
|
|
4910
|
-
const icons = {
|
|
4911
|
-
spinner,
|
|
4912
|
-
totop,
|
|
4913
|
-
marker,
|
|
4914
|
-
'close-icon': closeIcon,
|
|
4915
|
-
'close-large': closeLarge,
|
|
4916
|
-
'navbar-toggle-icon': navbarToggleIcon,
|
|
4917
|
-
'overlay-icon': overlayIcon,
|
|
4918
|
-
'pagination-next': paginationNext,
|
|
4919
|
-
'pagination-previous': paginationPrevious,
|
|
4920
|
-
'search-icon': searchIcon,
|
|
4921
|
-
'search-large': searchLarge,
|
|
4922
|
-
'search-navbar': searchNavbar,
|
|
4923
|
-
'slidenav-next': slidenavNext,
|
|
4924
|
-
'slidenav-next-large': slidenavNextLarge,
|
|
4925
|
-
'slidenav-previous': slidenavPrevious,
|
|
4926
|
-
'slidenav-previous-large': slidenavPreviousLarge };
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
const Icon = {
|
|
4930
|
-
install: install$1,
|
|
4931
|
-
|
|
4932
|
-
extends: SVG,
|
|
4933
4817
|
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
props: ['icon'],
|
|
4818
|
+
},
|
|
4937
4819
|
|
|
4938
|
-
|
|
4939
|
-
include: ['focusable'] },
|
|
4820
|
+
events: ['scroll', 'resize'] }] };
|
|
4940
4821
|
|
|
4941
4822
|
|
|
4942
|
-
isIcon: true,
|
|
4943
4823
|
|
|
4944
|
-
beforeConnect() {
|
|
4945
|
-
addClass(this.$el, 'uk-icon');
|
|
4946
|
-
},
|
|
4947
4824
|
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4825
|
+
function positionedAbsolute(el) {
|
|
4826
|
+
return children(el).some((el) => css(el, 'position') === 'absolute');
|
|
4827
|
+
}
|
|
4951
4828
|
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
}
|
|
4829
|
+
function getTranslates(rows, columns) {
|
|
4830
|
+
const rowHeights = rows.map((row) => Math.max(...row.map((el) => el.offsetHeight)));
|
|
4955
4831
|
|
|
4956
|
-
|
|
4957
|
-
|
|
4832
|
+
return columns.map((elements) => {
|
|
4833
|
+
let prev = 0;
|
|
4834
|
+
return elements.map(
|
|
4835
|
+
(element, row) =>
|
|
4836
|
+
prev += row ? rowHeights[row - 1] - elements[row - 1].offsetHeight : 0);
|
|
4958
4837
|
|
|
4959
|
-
|
|
4960
|
-
|
|
4838
|
+
});
|
|
4839
|
+
}
|
|
4961
4840
|
|
|
4962
|
-
|
|
4841
|
+
function getMarginTop(nodes, cls) {
|
|
4842
|
+
const [node] = nodes.filter((el) => hasClass(el, cls));
|
|
4963
4843
|
|
|
4964
|
-
|
|
4965
|
-
|
|
4844
|
+
return toFloat(node ? css(node, 'marginTop') : css(nodes[0], 'paddingLeft'));
|
|
4845
|
+
}
|
|
4966
4846
|
|
|
4847
|
+
function getColumnHeights(columns) {
|
|
4848
|
+
return columns.map((column) => column.reduce((sum, el) => sum + el.offsetHeight, 0));
|
|
4849
|
+
}
|
|
4967
4850
|
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
} };
|
|
4851
|
+
var heightMatch = {
|
|
4852
|
+
mixins: [Resize],
|
|
4971
4853
|
|
|
4854
|
+
args: 'target',
|
|
4972
4855
|
|
|
4973
|
-
|
|
4974
|
-
|
|
4856
|
+
props: {
|
|
4857
|
+
target: String,
|
|
4858
|
+
row: Boolean },
|
|
4975
4859
|
|
|
4976
|
-
beforeConnect() {
|
|
4977
|
-
addClass(this.$el, 'uk-slidenav');
|
|
4978
|
-
const icon = this.$props.icon;
|
|
4979
|
-
this.icon = hasClass(this.$el, 'uk-slidenav-large') ? icon + "-large" : icon;
|
|
4980
|
-
} };
|
|
4981
4860
|
|
|
4861
|
+
data: {
|
|
4862
|
+
target: '> *',
|
|
4863
|
+
row: true },
|
|
4982
4864
|
|
|
4983
|
-
const Search = {
|
|
4984
|
-
extends: IconComponent,
|
|
4985
4865
|
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
'search-navbar' :
|
|
4992
|
-
this.$props.icon;
|
|
4993
|
-
} };
|
|
4866
|
+
computed: {
|
|
4867
|
+
elements: {
|
|
4868
|
+
get(_ref, $el) {let { target } = _ref;
|
|
4869
|
+
return $$(target, $el);
|
|
4870
|
+
},
|
|
4994
4871
|
|
|
4872
|
+
watch() {
|
|
4873
|
+
this.$reset();
|
|
4874
|
+
} } },
|
|
4995
4875
|
|
|
4996
|
-
const Close = {
|
|
4997
|
-
extends: IconComponent,
|
|
4998
4876
|
|
|
4999
|
-
beforeConnect() {
|
|
5000
|
-
this.icon = "close-" + (hasClass(this.$el, 'uk-close-large') ? 'large' : 'icon');
|
|
5001
|
-
} };
|
|
5002
4877
|
|
|
4878
|
+
resizeTargets() {
|
|
4879
|
+
return [this.$el, ...this.elements];
|
|
4880
|
+
},
|
|
5003
4881
|
|
|
5004
|
-
|
|
5005
|
-
|
|
4882
|
+
update: {
|
|
4883
|
+
read() {
|
|
4884
|
+
return {
|
|
4885
|
+
rows: (this.row ? getRows(this.elements) : [this.elements]).map(match) };
|
|
5006
4886
|
|
|
5007
|
-
|
|
5008
|
-
async getSvg() {
|
|
5009
|
-
const icon = await Icon.methods.getSvg.call(this);
|
|
4887
|
+
},
|
|
5010
4888
|
|
|
5011
|
-
|
|
5012
|
-
|
|
4889
|
+
write(_ref2) {let { rows } = _ref2;
|
|
4890
|
+
for (const { heights, elements } of rows) {
|
|
4891
|
+
elements.forEach((el, i) => css(el, 'minHeight', heights[i]));
|
|
5013
4892
|
}
|
|
4893
|
+
},
|
|
5014
4894
|
|
|
5015
|
-
|
|
5016
|
-
} } };
|
|
4895
|
+
events: ['resize'] } };
|
|
5017
4896
|
|
|
5018
4897
|
|
|
5019
4898
|
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
each(added, (svg, name) => {
|
|
5025
|
-
icons[name] = svg;
|
|
5026
|
-
delete parsed[name];
|
|
5027
|
-
});
|
|
4899
|
+
function match(elements) {
|
|
4900
|
+
if (elements.length < 2) {
|
|
4901
|
+
return { heights: [''], elements };
|
|
4902
|
+
}
|
|
5028
4903
|
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
4904
|
+
css(elements, 'minHeight', '');
|
|
4905
|
+
let heights = elements.map(getHeight);
|
|
4906
|
+
const max = Math.max(...heights);
|
|
4907
|
+
|
|
4908
|
+
return {
|
|
4909
|
+
heights: elements.map((el, i) => heights[i].toFixed(2) === max.toFixed(2) ? '' : max),
|
|
4910
|
+
elements };
|
|
5034
4911
|
|
|
5035
|
-
}
|
|
5036
|
-
};
|
|
5037
4912
|
}
|
|
5038
4913
|
|
|
5039
|
-
function
|
|
5040
|
-
|
|
5041
|
-
|
|
4914
|
+
function getHeight(element) {
|
|
4915
|
+
let style = false;
|
|
4916
|
+
if (!isVisible(element)) {
|
|
4917
|
+
style = element.style.display;
|
|
4918
|
+
css(element, 'display', 'block', 'important');
|
|
5042
4919
|
}
|
|
5043
4920
|
|
|
5044
|
-
|
|
5045
|
-
parsed[icon] = $((icons[applyRtl(icon)] || icons[icon]).trim());
|
|
5046
|
-
}
|
|
4921
|
+
const height = dimensions(element).height - boxModelAdjust(element, 'height', 'content-box');
|
|
5047
4922
|
|
|
5048
|
-
|
|
5049
|
-
|
|
4923
|
+
if (style !== false) {
|
|
4924
|
+
css(element, 'display', style);
|
|
4925
|
+
}
|
|
5050
4926
|
|
|
5051
|
-
|
|
5052
|
-
return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon;
|
|
4927
|
+
return height;
|
|
5053
4928
|
}
|
|
5054
4929
|
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
var img = {
|
|
5058
|
-
args: 'dataSrc',
|
|
4930
|
+
var heightViewport = {
|
|
4931
|
+
mixins: [Resize],
|
|
5059
4932
|
|
|
5060
4933
|
props: {
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
target: String,
|
|
5066
|
-
loading: String },
|
|
4934
|
+
expand: Boolean,
|
|
4935
|
+
offsetTop: Boolean,
|
|
4936
|
+
offsetBottom: Boolean,
|
|
4937
|
+
minHeight: Number },
|
|
5067
4938
|
|
|
5068
4939
|
|
|
5069
4940
|
data: {
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
target: false,
|
|
5075
|
-
loading: 'lazy' },
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
connected() {
|
|
5079
|
-
if (this.loading !== 'lazy') {
|
|
5080
|
-
this.load();
|
|
5081
|
-
return;
|
|
5082
|
-
}
|
|
4941
|
+
expand: false,
|
|
4942
|
+
offsetTop: false,
|
|
4943
|
+
offsetBottom: false,
|
|
4944
|
+
minHeight: 0 },
|
|
5083
4945
|
|
|
5084
|
-
const target = [this.$el, ...queryAll(this.$props.target, this.$el)];
|
|
5085
4946
|
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
4947
|
+
resizeTargets() {
|
|
4948
|
+
// check for offsetTop change
|
|
4949
|
+
return [this.$el, ...scrollParents(this.$el, /auto|scroll/)];
|
|
4950
|
+
},
|
|
5089
4951
|
|
|
5090
|
-
|
|
5091
|
-
|
|
4952
|
+
update: {
|
|
4953
|
+
read(_ref) {let { minHeight: prev } = _ref;
|
|
4954
|
+
if (!isVisible(this.$el)) {
|
|
4955
|
+
return false;
|
|
5092
4956
|
}
|
|
5093
|
-
}
|
|
5094
|
-
|
|
5095
|
-
ensureSrcAttribute(this.$el);
|
|
5096
4957
|
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
target,
|
|
5100
|
-
(entries, observer) => {
|
|
5101
|
-
this.load();
|
|
5102
|
-
observer.disconnect();
|
|
5103
|
-
},
|
|
5104
|
-
{
|
|
5105
|
-
rootMargin: toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
5106
|
-
this.offsetLeft,
|
|
5107
|
-
'width') + "px" }));
|
|
4958
|
+
let minHeight = '';
|
|
4959
|
+
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
5108
4960
|
|
|
4961
|
+
const { body, scrollingElement } = document;
|
|
4962
|
+
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4963
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4964
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
5109
4965
|
|
|
5110
4966
|
|
|
4967
|
+
if (this.expand) {
|
|
4968
|
+
minHeight = Math.max(
|
|
4969
|
+
viewportHeight - (
|
|
4970
|
+
dimensions(scrollElement).height - dimensions(this.$el).height) -
|
|
4971
|
+
box,
|
|
4972
|
+
0);
|
|
5111
4973
|
|
|
5112
|
-
|
|
4974
|
+
} else {
|
|
4975
|
+
const isScrollingElement =
|
|
4976
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
5113
4977
|
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
this._data.image.onload = '';
|
|
5117
|
-
}
|
|
5118
|
-
},
|
|
4978
|
+
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4979
|
+
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
5119
4980
|
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
4981
|
+
if (this.offsetTop) {
|
|
4982
|
+
if (isScrollingElement) {
|
|
4983
|
+
const top = offsetPosition(this.$el)[0] - offsetPosition(scrollElement)[0];
|
|
4984
|
+
minHeight += top > 0 && top < viewportHeight / 2 ? " - " + top + "px" : '';
|
|
4985
|
+
} else {
|
|
4986
|
+
minHeight += " - " + css(scrollElement, 'paddingTop');
|
|
4987
|
+
}
|
|
4988
|
+
}
|
|
5125
4989
|
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
4990
|
+
if (this.offsetBottom === true) {
|
|
4991
|
+
minHeight += " - " + dimensions(this.$el.nextElementSibling).height + "px";
|
|
4992
|
+
} else if (isNumeric(this.offsetBottom)) {
|
|
4993
|
+
minHeight += " - " + this.offsetBottom + "vh";
|
|
4994
|
+
} else if (this.offsetBottom && endsWith(this.offsetBottom, 'px')) {
|
|
4995
|
+
minHeight += " - " + toFloat(this.offsetBottom) + "px";
|
|
4996
|
+
} else if (isString(this.offsetBottom)) {
|
|
4997
|
+
minHeight += " - " + dimensions(query(this.offsetBottom, this.$el)).height + "px";
|
|
4998
|
+
}
|
|
5129
4999
|
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5000
|
+
minHeight += (box ? " - " + box + "px" : '') + ")";
|
|
5001
|
+
}
|
|
5002
|
+
|
|
5003
|
+
return { minHeight, prev };
|
|
5004
|
+
},
|
|
5005
|
+
|
|
5006
|
+
write(_ref2) {let { minHeight } = _ref2;
|
|
5007
|
+
css(this.$el, { minHeight });
|
|
5008
|
+
|
|
5009
|
+
if (this.minHeight && toFloat(css(this.$el, 'minHeight')) < this.minHeight) {
|
|
5010
|
+
css(this.$el, 'minHeight', this.minHeight);
|
|
5011
|
+
}
|
|
5012
|
+
},
|
|
5013
|
+
|
|
5014
|
+
events: ['resize'] } };
|
|
5015
|
+
|
|
5016
|
+
var SVG = {
|
|
5017
|
+
args: 'src',
|
|
5018
|
+
|
|
5019
|
+
props: {
|
|
5020
|
+
id: Boolean,
|
|
5021
|
+
icon: String,
|
|
5022
|
+
src: String,
|
|
5023
|
+
style: String,
|
|
5024
|
+
width: Number,
|
|
5025
|
+
height: Number,
|
|
5026
|
+
ratio: Number,
|
|
5027
|
+
class: String,
|
|
5028
|
+
strokeAnimation: Boolean,
|
|
5029
|
+
focusable: Boolean, // IE 11
|
|
5030
|
+
attributes: 'list' },
|
|
5031
|
+
|
|
5032
|
+
|
|
5033
|
+
data: {
|
|
5034
|
+
ratio: 1,
|
|
5035
|
+
include: ['style', 'class', 'focusable'],
|
|
5036
|
+
class: '',
|
|
5037
|
+
strokeAnimation: false },
|
|
5038
|
+
|
|
5039
|
+
|
|
5040
|
+
beforeConnect() {
|
|
5041
|
+
this.class += ' uk-svg';
|
|
5042
|
+
},
|
|
5043
|
+
|
|
5044
|
+
connected() {
|
|
5045
|
+
if (!this.icon && includes(this.src, '#')) {
|
|
5046
|
+
[this.src, this.icon] = this.src.split('#');
|
|
5047
|
+
}
|
|
5048
|
+
|
|
5049
|
+
this.svg = this.getSvg().then((el) => {
|
|
5050
|
+
if (this._connected) {
|
|
5051
|
+
const svg = insertSVG(el, this.$el);
|
|
5052
|
+
|
|
5053
|
+
if (this.svgEl && svg !== this.svgEl) {
|
|
5054
|
+
remove$1(this.svgEl);
|
|
5055
|
+
}
|
|
5056
|
+
|
|
5057
|
+
this.applyAttributes(svg, el);
|
|
5058
|
+
|
|
5059
|
+
return this.svgEl = svg;
|
|
5060
|
+
}
|
|
5061
|
+
}, noop);
|
|
5062
|
+
|
|
5063
|
+
if (this.strokeAnimation) {
|
|
5064
|
+
this.svg.then((el) => {
|
|
5065
|
+
if (this._connected) {
|
|
5066
|
+
applyAnimation(el);
|
|
5067
|
+
this.registerObserver(
|
|
5068
|
+
observeIntersection(el, (records, observer) => {
|
|
5069
|
+
applyAnimation(el);
|
|
5070
|
+
observer.disconnect();
|
|
5071
|
+
}));
|
|
5072
|
+
|
|
5073
|
+
}
|
|
5074
|
+
});
|
|
5075
|
+
}
|
|
5076
|
+
},
|
|
5077
|
+
|
|
5078
|
+
disconnected() {
|
|
5079
|
+
this.svg.then((svg) => {
|
|
5080
|
+
if (this._connected) {
|
|
5081
|
+
return;
|
|
5082
|
+
}
|
|
5083
|
+
|
|
5084
|
+
if (isVoidElement(this.$el)) {
|
|
5085
|
+
this.$el.hidden = false;
|
|
5086
|
+
}
|
|
5087
|
+
|
|
5088
|
+
remove$1(svg);
|
|
5089
|
+
this.svgEl = null;
|
|
5090
|
+
});
|
|
5091
|
+
|
|
5092
|
+
this.svg = null;
|
|
5093
|
+
},
|
|
5094
|
+
|
|
5095
|
+
methods: {
|
|
5096
|
+
async getSvg() {
|
|
5097
|
+
if (isTag(this.$el, 'img') && !this.$el.complete && this.$el.loading === 'lazy') {
|
|
5098
|
+
return new Promise((resolve) =>
|
|
5099
|
+
once(this.$el, 'load', () => resolve(this.getSvg())));
|
|
5100
|
+
|
|
5101
|
+
}
|
|
5102
|
+
|
|
5103
|
+
return parseSVG(await loadSVG(this.src), this.icon) || Promise.reject('SVG not found.');
|
|
5104
|
+
},
|
|
5105
|
+
|
|
5106
|
+
applyAttributes(el, ref) {
|
|
5107
|
+
for (const prop in this.$options.props) {
|
|
5108
|
+
if (includes(this.include, prop) && prop in this) {
|
|
5109
|
+
attr(el, prop, this[prop]);
|
|
5110
|
+
}
|
|
5111
|
+
}
|
|
5112
|
+
|
|
5113
|
+
for (const attribute in this.attributes) {
|
|
5114
|
+
const [prop, value] = this.attributes[attribute].split(':', 2);
|
|
5115
|
+
attr(el, prop, value);
|
|
5116
|
+
}
|
|
5117
|
+
|
|
5118
|
+
if (!this.id) {
|
|
5119
|
+
removeAttr(el, 'id');
|
|
5120
|
+
}
|
|
5121
|
+
|
|
5122
|
+
const props = ['width', 'height'];
|
|
5123
|
+
let dimensions = props.map((prop) => this[prop]);
|
|
5124
|
+
|
|
5125
|
+
if (!dimensions.some((val) => val)) {
|
|
5126
|
+
dimensions = props.map((prop) => attr(ref, prop));
|
|
5127
|
+
}
|
|
5128
|
+
|
|
5129
|
+
const viewBox = attr(ref, 'viewBox');
|
|
5130
|
+
if (viewBox && !dimensions.some((val) => val)) {
|
|
5131
|
+
dimensions = viewBox.split(' ').slice(2);
|
|
5132
|
+
}
|
|
5133
|
+
|
|
5134
|
+
dimensions.forEach((val, i) => attr(el, props[i], toFloat(val) * this.ratio || null));
|
|
5133
5135
|
} } };
|
|
5134
5136
|
|
|
5135
5137
|
|
|
5136
5138
|
|
|
5137
|
-
|
|
5138
|
-
if (
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
const change = !includes(el.style.backgroundImage, src);
|
|
5144
|
-
if (change) {
|
|
5145
|
-
css(el, 'backgroundImage', "url(" + escape(src) + ")");
|
|
5146
|
-
trigger(el, createEvent('load', false));
|
|
5139
|
+
const loadSVG = memoize(async (src) => {
|
|
5140
|
+
if (src) {
|
|
5141
|
+
if (startsWith(src, 'data:')) {
|
|
5142
|
+
return decodeURIComponent(src.split(',')[1]);
|
|
5143
|
+
} else {
|
|
5144
|
+
return (await fetch(src)).text();
|
|
5147
5145
|
}
|
|
5146
|
+
} else {
|
|
5147
|
+
return Promise.reject();
|
|
5148
5148
|
}
|
|
5149
|
-
}
|
|
5149
|
+
});
|
|
5150
5150
|
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
});
|
|
5151
|
+
function parseSVG(svg, icon) {var _svg;
|
|
5152
|
+
if (icon && includes(svg, '<symbol')) {
|
|
5153
|
+
svg = parseSymbols(svg, icon) || svg;
|
|
5154
|
+
}
|
|
5155
|
+
|
|
5156
|
+
svg = $(svg.substr(svg.indexOf('<svg')));
|
|
5157
|
+
return ((_svg = svg) == null ? void 0 : _svg.hasChildNodes()) && svg;
|
|
5159
5158
|
}
|
|
5160
5159
|
|
|
5161
|
-
|
|
5162
|
-
|
|
5160
|
+
const symbolRe = /<symbol([^]*?id=(['"])(.+?)\2[^]*?<\/)symbol>/g;
|
|
5161
|
+
const symbols = {};
|
|
5163
5162
|
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
setSrcAttrs(el, img.currentSrc);
|
|
5168
|
-
};
|
|
5169
|
-
attr(img, 'src', src);
|
|
5170
|
-
return img;
|
|
5171
|
-
}
|
|
5163
|
+
function parseSymbols(svg, icon) {
|
|
5164
|
+
if (!symbols[svg]) {
|
|
5165
|
+
symbols[svg] = {};
|
|
5172
5166
|
|
|
5173
|
-
|
|
5174
|
-
sources = parseSources(sources);
|
|
5167
|
+
symbolRe.lastIndex = 0;
|
|
5175
5168
|
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
const source = fragment('<source>');
|
|
5180
|
-
attr(source, attrs);
|
|
5181
|
-
append(picture, source);
|
|
5169
|
+
let match;
|
|
5170
|
+
while (match = symbolRe.exec(svg)) {
|
|
5171
|
+
symbols[svg][match[3]] = "<svg xmlns=\"http://www.w3.org/2000/svg\"" + match[1] + "svg>";
|
|
5182
5172
|
}
|
|
5183
|
-
append(picture, img);
|
|
5184
5173
|
}
|
|
5174
|
+
|
|
5175
|
+
return symbols[svg][icon];
|
|
5185
5176
|
}
|
|
5186
5177
|
|
|
5187
|
-
function
|
|
5188
|
-
|
|
5189
|
-
|
|
5178
|
+
function applyAnimation(el) {
|
|
5179
|
+
const length = getMaxPathLength(el);
|
|
5180
|
+
|
|
5181
|
+
if (length) {
|
|
5182
|
+
el.style.setProperty('--uk-animation-stroke', length);
|
|
5190
5183
|
}
|
|
5184
|
+
}
|
|
5191
5185
|
|
|
5192
|
-
|
|
5186
|
+
function getMaxPathLength(el) {
|
|
5187
|
+
return Math.ceil(
|
|
5188
|
+
Math.max(
|
|
5189
|
+
0,
|
|
5190
|
+
...$$('[stroke]', el).map((stroke) => {
|
|
5193
5191
|
try {
|
|
5194
|
-
|
|
5192
|
+
return stroke.getTotalLength();
|
|
5195
5193
|
} catch (e) {
|
|
5196
|
-
|
|
5194
|
+
return 0;
|
|
5197
5195
|
}
|
|
5198
|
-
}
|
|
5199
|
-
sources = parseOptions(sources);
|
|
5200
|
-
}
|
|
5196
|
+
})));
|
|
5201
5197
|
|
|
5202
|
-
if (!isArray(sources)) {
|
|
5203
|
-
sources = [sources];
|
|
5204
|
-
}
|
|
5205
5198
|
|
|
5206
|
-
return sources.filter((source) => !isEmpty(source));
|
|
5207
5199
|
}
|
|
5208
5200
|
|
|
5209
|
-
function
|
|
5210
|
-
if (
|
|
5211
|
-
|
|
5201
|
+
function insertSVG(el, root) {
|
|
5202
|
+
if (isVoidElement(root) || isTag(root, 'canvas')) {
|
|
5203
|
+
root.hidden = true;
|
|
5204
|
+
|
|
5205
|
+
const next = root.nextElementSibling;
|
|
5206
|
+
return equals(el, next) ? next : after(root, el);
|
|
5212
5207
|
}
|
|
5208
|
+
|
|
5209
|
+
const last = root.lastElementChild;
|
|
5210
|
+
return equals(el, last) ? last : append(root, el);
|
|
5213
5211
|
}
|
|
5214
5212
|
|
|
5215
|
-
function
|
|
5216
|
-
return isTag(el, '
|
|
5213
|
+
function equals(el, other) {
|
|
5214
|
+
return isTag(el, 'svg') && isTag(other, 'svg') && innerHTML(el) === innerHTML(other);
|
|
5217
5215
|
}
|
|
5218
5216
|
|
|
5219
|
-
function
|
|
5220
|
-
return
|
|
5217
|
+
function innerHTML(el) {
|
|
5218
|
+
return (
|
|
5219
|
+
el.innerHTML ||
|
|
5220
|
+
new XMLSerializer().serializeToString(el).replace(/<svg.*?>(.*?)<\/svg>/g, '$1')).
|
|
5221
|
+
replace(/\s/g, '');
|
|
5221
5222
|
}
|
|
5222
5223
|
|
|
5223
|
-
var
|
|
5224
|
-
|
|
5225
|
-
|
|
5224
|
+
var closeIcon = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"1\" y1=\"1\" x2=\"13\" y2=\"13\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" x1=\"13\" y1=\"1\" x2=\"1\" y2=\"13\"/></svg>";
|
|
5225
|
+
|
|
5226
|
+
var closeLarge = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"1\" y1=\"1\" x2=\"19\" y2=\"19\"/><line fill=\"none\" stroke=\"#000\" stroke-width=\"1.4\" x1=\"19\" y1=\"1\" x2=\"1\" y2=\"19\"/></svg>";
|
|
5227
|
+
|
|
5228
|
+
var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>";
|
|
5229
|
+
|
|
5230
|
+
var navParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
|
|
5231
|
+
|
|
5232
|
+
var navParentIconLarge = "<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 4 7 10 13 4\"/></svg>";
|
|
5233
|
+
|
|
5234
|
+
var navbarParentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\"><polyline fill=\"none\" stroke=\"#000\" stroke-width=\"1.1\" points=\"1 3.5 6 8.5 11 3.5\"/></svg>";
|
|
5235
|
+
|
|
5236
|
+
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><style>.uk-navbar-toggle svg > [class*='line-'] {\n transition: 0.2s ease-in-out;\n transition-property: transform, opacity,;\n transform-origin: center;\n opacity: 1;\n }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-2 { transform: rotate(45deg); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-3 { transform: rotate(-45deg); }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1,\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { opacity: 0; }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1 { transform: translateY(6px) scaleX(0); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { transform: translateY(-6px) scaleX(0); }</style><rect class=\"line-1\" y=\"3\" width=\"20\" height=\"2\"/><rect class=\"line-2\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-3\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-4\" y=\"15\" width=\"20\" height=\"2\"/></svg>";
|
|
5237
|
+
|
|
5238
|
+
var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>";
|
|
5239
|
+
|
|
5240
|
+
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>";
|
|
5241
|
+
|
|
5242
|
+
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>";
|
|
5243
|
+
|
|
5244
|
+
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>";
|
|
5245
|
+
|
|
5246
|
+
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>";
|
|
5247
|
+
|
|
5248
|
+
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>";
|
|
5249
|
+
|
|
5250
|
+
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>";
|
|
5251
|
+
|
|
5252
|
+
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>";
|
|
5253
|
+
|
|
5254
|
+
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>";
|
|
5226
5255
|
|
|
5256
|
+
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>";
|
|
5257
|
+
|
|
5258
|
+
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>";
|
|
5259
|
+
|
|
5260
|
+
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>";
|
|
5261
|
+
|
|
5262
|
+
const icons = {
|
|
5263
|
+
spinner,
|
|
5264
|
+
totop,
|
|
5265
|
+
marker,
|
|
5266
|
+
'close-icon': closeIcon,
|
|
5267
|
+
'close-large': closeLarge,
|
|
5268
|
+
'nav-parent-icon': navParentIcon,
|
|
5269
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5270
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
5271
|
+
'navbar-toggle-icon': navbarToggleIcon,
|
|
5272
|
+
'overlay-icon': overlayIcon,
|
|
5273
|
+
'pagination-next': paginationNext,
|
|
5274
|
+
'pagination-previous': paginationPrevious,
|
|
5275
|
+
'search-icon': searchIcon,
|
|
5276
|
+
'search-large': searchLarge,
|
|
5277
|
+
'search-navbar': searchNavbar,
|
|
5278
|
+
'slidenav-next': slidenavNext,
|
|
5279
|
+
'slidenav-next-large': slidenavNextLarge,
|
|
5280
|
+
'slidenav-previous': slidenavPrevious,
|
|
5281
|
+
'slidenav-previous-large': slidenavPreviousLarge };
|
|
5282
|
+
|
|
5283
|
+
|
|
5284
|
+
const Icon = {
|
|
5285
|
+
install: install$1,
|
|
5286
|
+
|
|
5287
|
+
extends: SVG,
|
|
5288
|
+
|
|
5289
|
+
args: 'icon',
|
|
5290
|
+
|
|
5291
|
+
props: ['icon'],
|
|
5227
5292
|
|
|
5228
5293
|
data: {
|
|
5229
|
-
|
|
5294
|
+
include: ['focusable'] },
|
|
5230
5295
|
|
|
5231
5296
|
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
this.mediaObj = window.matchMedia(media);
|
|
5237
|
-
const handler = () => {
|
|
5238
|
-
this.matchMedia = this.mediaObj.matches;
|
|
5239
|
-
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5240
|
-
};
|
|
5241
|
-
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5242
|
-
handler();
|
|
5243
|
-
this.$emit('resize');
|
|
5244
|
-
});
|
|
5245
|
-
handler();
|
|
5246
|
-
}
|
|
5297
|
+
isIcon: true,
|
|
5298
|
+
|
|
5299
|
+
beforeConnect() {
|
|
5300
|
+
addClass(this.$el, 'uk-icon');
|
|
5247
5301
|
},
|
|
5248
5302
|
|
|
5249
|
-
|
|
5250
|
-
(
|
|
5303
|
+
methods: {
|
|
5304
|
+
async getSvg() {
|
|
5305
|
+
const icon = getIcon(this.icon);
|
|
5306
|
+
|
|
5307
|
+
if (!icon) {
|
|
5308
|
+
throw 'Icon not found.';
|
|
5309
|
+
}
|
|
5310
|
+
|
|
5311
|
+
return icon;
|
|
5312
|
+
} } };
|
|
5313
|
+
|
|
5314
|
+
const IconComponent = {
|
|
5315
|
+
args: false,
|
|
5316
|
+
|
|
5317
|
+
extends: Icon,
|
|
5318
|
+
|
|
5319
|
+
data: (vm) => ({
|
|
5320
|
+
icon: hyphenate(vm.constructor.options.name) }),
|
|
5321
|
+
|
|
5322
|
+
|
|
5323
|
+
beforeConnect() {
|
|
5324
|
+
addClass(this.$el, this.$name);
|
|
5251
5325
|
} };
|
|
5252
5326
|
|
|
5253
5327
|
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
if (startsWith(value, '@')) {
|
|
5257
|
-
const name = "breakpoint-" + value.substr(1);
|
|
5258
|
-
value = toFloat(getCssVar(name));
|
|
5259
|
-
} else if (isNaN(value)) {
|
|
5260
|
-
return value;
|
|
5261
|
-
}
|
|
5262
|
-
}
|
|
5328
|
+
const NavParentIcon = {
|
|
5329
|
+
extends: IconComponent,
|
|
5263
5330
|
|
|
5264
|
-
|
|
5265
|
-
|
|
5331
|
+
beforeConnect() {
|
|
5332
|
+
const icon = this.$props.icon;
|
|
5333
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5334
|
+
} };
|
|
5266
5335
|
|
|
5267
|
-
var leader = {
|
|
5268
|
-
mixins: [Class, Media, Resize],
|
|
5269
5336
|
|
|
5270
|
-
|
|
5271
|
-
|
|
5337
|
+
const Slidenav = {
|
|
5338
|
+
extends: IconComponent,
|
|
5339
|
+
|
|
5340
|
+
beforeConnect() {
|
|
5341
|
+
addClass(this.$el, 'uk-slidenav');
|
|
5342
|
+
const icon = this.$props.icon;
|
|
5343
|
+
this.icon = hasClass(this.$el, 'uk-slidenav-large') ? icon + "-large" : icon;
|
|
5344
|
+
} };
|
|
5272
5345
|
|
|
5273
5346
|
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
clsWrapper: 'uk-leader-fill',
|
|
5277
|
-
clsHide: 'uk-leader-hide',
|
|
5278
|
-
attrFill: 'data-fill' },
|
|
5347
|
+
const Search = {
|
|
5348
|
+
extends: IconComponent,
|
|
5279
5349
|
|
|
5350
|
+
beforeConnect() {
|
|
5351
|
+
this.icon =
|
|
5352
|
+
hasClass(this.$el, 'uk-search-icon') && parents(this.$el, '.uk-search-large').length ?
|
|
5353
|
+
'search-large' :
|
|
5354
|
+
parents(this.$el, '.uk-search-navbar').length ?
|
|
5355
|
+
'search-navbar' :
|
|
5356
|
+
this.$props.icon;
|
|
5357
|
+
} };
|
|
5280
5358
|
|
|
5281
|
-
computed: {
|
|
5282
|
-
fill(_ref) {let { fill } = _ref;
|
|
5283
|
-
return fill || getCssVar('leader-fill-content');
|
|
5284
|
-
} },
|
|
5285
5359
|
|
|
5360
|
+
const Close = {
|
|
5361
|
+
extends: IconComponent,
|
|
5286
5362
|
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
}
|
|
5363
|
+
beforeConnect() {
|
|
5364
|
+
this.icon = "close-" + (hasClass(this.$el, 'uk-close-large') ? 'large' : 'icon');
|
|
5365
|
+
} };
|
|
5290
5366
|
|
|
5291
|
-
disconnected() {
|
|
5292
|
-
unwrap(this.wrapper.childNodes);
|
|
5293
|
-
},
|
|
5294
5367
|
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5368
|
+
const Spinner = {
|
|
5369
|
+
extends: IconComponent,
|
|
5298
5370
|
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
hide: !this.matchMedia };
|
|
5371
|
+
methods: {
|
|
5372
|
+
async getSvg() {
|
|
5373
|
+
const icon = await Icon.methods.getSvg.call(this);
|
|
5303
5374
|
|
|
5304
|
-
|
|
5375
|
+
if (this.ratio !== 1) {
|
|
5376
|
+
css($('circle', icon), 'strokeWidth', 1 / this.ratio);
|
|
5377
|
+
}
|
|
5305
5378
|
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5309
|
-
},
|
|
5379
|
+
return icon;
|
|
5380
|
+
} } };
|
|
5310
5381
|
|
|
5311
|
-
events: ['resize'] } };
|
|
5312
5382
|
|
|
5313
|
-
const active = [];
|
|
5314
5383
|
|
|
5315
|
-
|
|
5316
|
-
|
|
5384
|
+
const parsed = {};
|
|
5385
|
+
function install$1(UIkit) {
|
|
5386
|
+
UIkit.icon.add = (name, svg) => {
|
|
5387
|
+
const added = isString(name) ? { [name]: svg } : name;
|
|
5388
|
+
each(added, (svg, name) => {
|
|
5389
|
+
icons[name] = svg;
|
|
5390
|
+
delete parsed[name];
|
|
5391
|
+
});
|
|
5317
5392
|
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
stack: Boolean },
|
|
5393
|
+
if (UIkit._initialized) {
|
|
5394
|
+
apply(document.body, (el) =>
|
|
5395
|
+
each(UIkit.getComponents(el), (cmp) => {
|
|
5396
|
+
cmp.$options.isIcon && cmp.icon in added && cmp.$reset();
|
|
5397
|
+
}));
|
|
5324
5398
|
|
|
5399
|
+
}
|
|
5400
|
+
};
|
|
5401
|
+
}
|
|
5325
5402
|
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
overlay: true,
|
|
5331
|
-
stack: false },
|
|
5403
|
+
function getIcon(icon) {
|
|
5404
|
+
if (!icons[icon]) {
|
|
5405
|
+
return null;
|
|
5406
|
+
}
|
|
5332
5407
|
|
|
5408
|
+
if (!parsed[icon]) {
|
|
5409
|
+
parsed[icon] = $((icons[applyRtl(icon)] || icons[icon]).trim());
|
|
5410
|
+
}
|
|
5333
5411
|
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
return $(selPanel, $el);
|
|
5337
|
-
},
|
|
5412
|
+
return parsed[icon].cloneNode(true);
|
|
5413
|
+
}
|
|
5338
5414
|
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5415
|
+
function applyRtl(icon) {
|
|
5416
|
+
return isRtl ? swap(swap(icon, 'left', 'right'), 'previous', 'next') : icon;
|
|
5417
|
+
}
|
|
5342
5418
|
|
|
5343
|
-
|
|
5344
|
-
return bgClose && this.panel;
|
|
5345
|
-
} },
|
|
5419
|
+
const nativeLazyLoad = inBrowser && 'loading' in HTMLImageElement.prototype;
|
|
5346
5420
|
|
|
5421
|
+
var img = {
|
|
5422
|
+
args: 'dataSrc',
|
|
5347
5423
|
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5424
|
+
props: {
|
|
5425
|
+
dataSrc: String,
|
|
5426
|
+
sources: String,
|
|
5427
|
+
offsetTop: String,
|
|
5428
|
+
offsetLeft: String,
|
|
5429
|
+
target: String,
|
|
5430
|
+
loading: String },
|
|
5353
5431
|
|
|
5354
|
-
events: [
|
|
5355
|
-
{
|
|
5356
|
-
name: 'click',
|
|
5357
5432
|
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5433
|
+
data: {
|
|
5434
|
+
dataSrc: '',
|
|
5435
|
+
sources: false,
|
|
5436
|
+
offsetTop: '50vh',
|
|
5437
|
+
offsetLeft: '50vw',
|
|
5438
|
+
target: false,
|
|
5439
|
+
loading: 'lazy' },
|
|
5361
5440
|
|
|
5362
|
-
handler(e) {
|
|
5363
|
-
e.preventDefault();
|
|
5364
|
-
this.hide();
|
|
5365
|
-
} },
|
|
5366
5441
|
|
|
5442
|
+
connected() {
|
|
5443
|
+
if (this.loading !== 'lazy') {
|
|
5444
|
+
this.load();
|
|
5445
|
+
return;
|
|
5446
|
+
}
|
|
5367
5447
|
|
|
5368
|
-
|
|
5369
|
-
name: 'toggle',
|
|
5448
|
+
const target = [this.$el, ...queryAll(this.$props.target, this.$el)];
|
|
5370
5449
|
|
|
5371
|
-
|
|
5450
|
+
if (nativeLazyLoad && isImg(this.$el)) {
|
|
5451
|
+
this.$el.loading = 'lazy';
|
|
5452
|
+
setSrcAttrs(this.$el);
|
|
5372
5453
|
|
|
5373
|
-
|
|
5374
|
-
if (e.defaultPrevented) {
|
|
5454
|
+
if (target.length === 1) {
|
|
5375
5455
|
return;
|
|
5376
5456
|
}
|
|
5457
|
+
}
|
|
5377
5458
|
|
|
5378
|
-
|
|
5459
|
+
ensureSrcAttribute(this.$el);
|
|
5379
5460
|
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5461
|
+
this.registerObserver(
|
|
5462
|
+
observeIntersection(
|
|
5463
|
+
target,
|
|
5464
|
+
(entries, observer) => {
|
|
5465
|
+
this.load();
|
|
5466
|
+
observer.disconnect();
|
|
5467
|
+
},
|
|
5468
|
+
{
|
|
5469
|
+
rootMargin: toPx(this.offsetTop, 'height') + "px " + toPx(
|
|
5470
|
+
this.offsetLeft,
|
|
5471
|
+
'width') + "px" }));
|
|
5384
5472
|
|
|
5385
5473
|
|
|
5386
|
-
{
|
|
5387
|
-
name: 'beforeshow',
|
|
5388
5474
|
|
|
5389
|
-
self: true,
|
|
5390
5475
|
|
|
5391
|
-
|
|
5392
|
-
if (includes(active, this)) {
|
|
5393
|
-
return false;
|
|
5394
|
-
}
|
|
5476
|
+
},
|
|
5395
5477
|
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
}
|
|
5402
|
-
} },
|
|
5478
|
+
disconnected() {
|
|
5479
|
+
if (this._data.image) {
|
|
5480
|
+
this._data.image.onload = '';
|
|
5481
|
+
}
|
|
5482
|
+
},
|
|
5403
5483
|
|
|
5484
|
+
methods: {
|
|
5485
|
+
load() {
|
|
5486
|
+
if (this._data.image) {
|
|
5487
|
+
return this._data.image;
|
|
5488
|
+
}
|
|
5404
5489
|
|
|
5405
|
-
|
|
5406
|
-
|
|
5490
|
+
const image = isImg(this.$el) ?
|
|
5491
|
+
this.$el :
|
|
5492
|
+
getImageFromElement(this.$el, this.dataSrc, this.sources);
|
|
5407
5493
|
|
|
5408
|
-
|
|
5494
|
+
removeAttr(image, 'loading');
|
|
5495
|
+
setSrcAttrs(this.$el, image.currentSrc);
|
|
5496
|
+
return this._data.image = image;
|
|
5497
|
+
} } };
|
|
5409
5498
|
|
|
5410
|
-
handler() {
|
|
5411
|
-
const docEl = document.documentElement;
|
|
5412
5499
|
|
|
5413
|
-
if (width(window) > docEl.clientWidth && this.overlay) {
|
|
5414
|
-
css(document.body, 'overflowY', 'scroll');
|
|
5415
|
-
}
|
|
5416
5500
|
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5501
|
+
function setSrcAttrs(el, src) {
|
|
5502
|
+
if (isImg(el)) {
|
|
5503
|
+
const parentNode = parent(el);
|
|
5504
|
+
const elements = isPicture(parentNode) ? children(parentNode) : [el];
|
|
5505
|
+
elements.forEach((el) => setSourceProps(el, el));
|
|
5506
|
+
} else if (src) {
|
|
5507
|
+
const change = !includes(el.style.backgroundImage, src);
|
|
5508
|
+
if (change) {
|
|
5509
|
+
css(el, 'backgroundImage', "url(" + escape(src) + ")");
|
|
5510
|
+
trigger(el, createEvent('load', false));
|
|
5511
|
+
}
|
|
5512
|
+
}
|
|
5513
|
+
}
|
|
5420
5514
|
|
|
5421
|
-
|
|
5515
|
+
const srcProps = ['data-src', 'data-srcset', 'sizes'];
|
|
5516
|
+
function setSourceProps(sourceEl, targetEl) {
|
|
5517
|
+
srcProps.forEach((prop) => {
|
|
5518
|
+
const value = data(sourceEl, prop);
|
|
5519
|
+
if (value) {
|
|
5520
|
+
attr(targetEl, prop.replace(/^(data-)+/, ''), value);
|
|
5521
|
+
}
|
|
5522
|
+
});
|
|
5523
|
+
}
|
|
5422
5524
|
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
this.$el,
|
|
5426
|
-
'hide',
|
|
5427
|
-
on(document, pointerDown, (_ref3) => {let { target } = _ref3;
|
|
5428
|
-
if (
|
|
5429
|
-
last(active) !== this ||
|
|
5430
|
-
this.overlay && !within(target, this.$el) ||
|
|
5431
|
-
within(target, this.panel))
|
|
5432
|
-
{
|
|
5433
|
-
return;
|
|
5434
|
-
}
|
|
5525
|
+
function getImageFromElement(el, src, sources) {
|
|
5526
|
+
const img = new Image();
|
|
5435
5527
|
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
{
|
|
5445
|
-
this.hide();
|
|
5446
|
-
}
|
|
5447
|
-
},
|
|
5448
|
-
true);
|
|
5528
|
+
wrapInPicture(img, sources);
|
|
5529
|
+
setSourceProps(el, img);
|
|
5530
|
+
img.onload = () => {
|
|
5531
|
+
setSrcAttrs(el, img.currentSrc);
|
|
5532
|
+
};
|
|
5533
|
+
attr(img, 'src', src);
|
|
5534
|
+
return img;
|
|
5535
|
+
}
|
|
5449
5536
|
|
|
5450
|
-
|
|
5451
|
-
|
|
5537
|
+
function wrapInPicture(img, sources) {
|
|
5538
|
+
sources = parseSources(sources);
|
|
5452
5539
|
|
|
5453
|
-
|
|
5540
|
+
if (sources.length) {
|
|
5541
|
+
const picture = fragment('<picture>');
|
|
5542
|
+
for (const attrs of sources) {
|
|
5543
|
+
const source = fragment('<source>');
|
|
5544
|
+
attr(source, attrs);
|
|
5545
|
+
append(picture, source);
|
|
5546
|
+
}
|
|
5547
|
+
append(picture, img);
|
|
5548
|
+
}
|
|
5549
|
+
}
|
|
5454
5550
|
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
on(document, 'keydown', (e) => {
|
|
5460
|
-
if (e.keyCode === 27 && last(active) === this) {
|
|
5461
|
-
this.hide();
|
|
5462
|
-
}
|
|
5463
|
-
}),
|
|
5464
|
-
{ self: true });
|
|
5551
|
+
function parseSources(sources) {
|
|
5552
|
+
if (!sources) {
|
|
5553
|
+
return [];
|
|
5554
|
+
}
|
|
5465
5555
|
|
|
5466
|
-
|
|
5467
|
-
|
|
5556
|
+
if (startsWith(sources, '[')) {
|
|
5557
|
+
try {
|
|
5558
|
+
sources = JSON.parse(sources);
|
|
5559
|
+
} catch (e) {
|
|
5560
|
+
sources = [];
|
|
5561
|
+
}
|
|
5562
|
+
} else {
|
|
5563
|
+
sources = parseOptions(sources);
|
|
5564
|
+
}
|
|
5468
5565
|
|
|
5566
|
+
if (!isArray(sources)) {
|
|
5567
|
+
sources = [sources];
|
|
5568
|
+
}
|
|
5469
5569
|
|
|
5470
|
-
|
|
5471
|
-
|
|
5570
|
+
return sources.filter((source) => !isEmpty(source));
|
|
5571
|
+
}
|
|
5472
5572
|
|
|
5473
|
-
|
|
5573
|
+
function ensureSrcAttribute(el) {
|
|
5574
|
+
if (isImg(el) && !hasAttr(el, 'src')) {
|
|
5575
|
+
attr(el, 'src', 'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
5576
|
+
}
|
|
5577
|
+
}
|
|
5474
5578
|
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
}
|
|
5579
|
+
function isPicture(el) {
|
|
5580
|
+
return isTag(el, 'picture');
|
|
5581
|
+
}
|
|
5479
5582
|
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
} },
|
|
5583
|
+
function isImg(el) {
|
|
5584
|
+
return isTag(el, 'img');
|
|
5585
|
+
}
|
|
5484
5586
|
|
|
5587
|
+
var Media = {
|
|
5588
|
+
props: {
|
|
5589
|
+
media: Boolean },
|
|
5485
5590
|
|
|
5486
|
-
{
|
|
5487
|
-
name: 'hidden',
|
|
5488
5591
|
|
|
5489
|
-
|
|
5592
|
+
data: {
|
|
5593
|
+
media: false },
|
|
5490
5594
|
|
|
5491
|
-
handler() {
|
|
5492
|
-
if (includes(active, this)) {
|
|
5493
|
-
active.splice(active.indexOf(this), 1);
|
|
5494
|
-
}
|
|
5495
5595
|
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5596
|
+
connected() {
|
|
5597
|
+
const media = toMedia(this.media, this.$el);
|
|
5598
|
+
this.matchMedia = true;
|
|
5599
|
+
if (media) {
|
|
5600
|
+
this.mediaObj = window.matchMedia(media);
|
|
5601
|
+
const handler = () => {
|
|
5602
|
+
this.matchMedia = this.mediaObj.matches;
|
|
5603
|
+
trigger(this.$el, createEvent('mediachange', false, true, [this.mediaObj]));
|
|
5604
|
+
};
|
|
5605
|
+
this.offMediaObj = on(this.mediaObj, 'change', () => {
|
|
5606
|
+
handler();
|
|
5607
|
+
this.$emit('resize');
|
|
5608
|
+
});
|
|
5609
|
+
handler();
|
|
5610
|
+
}
|
|
5611
|
+
},
|
|
5499
5612
|
|
|
5500
|
-
|
|
5613
|
+
disconnected() {var _this$offMediaObj;
|
|
5614
|
+
(_this$offMediaObj = this.offMediaObj) == null ? void 0 : _this$offMediaObj.call(this);
|
|
5615
|
+
} };
|
|
5501
5616
|
|
|
5502
|
-
if (!active.some((modal) => modal.clsPage === this.clsPage)) {
|
|
5503
|
-
removeClass(document.documentElement, this.clsPage);
|
|
5504
|
-
}
|
|
5505
|
-
} }],
|
|
5506
5617
|
|
|
5618
|
+
function toMedia(value, element) {
|
|
5619
|
+
if (isString(value)) {
|
|
5620
|
+
if (startsWith(value, '@')) {
|
|
5621
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5622
|
+
} else if (isNaN(value)) {
|
|
5623
|
+
return value;
|
|
5624
|
+
}
|
|
5625
|
+
}
|
|
5507
5626
|
|
|
5627
|
+
return value && isNumeric(value) ? "(min-width: " + value + "px)" : '';
|
|
5628
|
+
}
|
|
5508
5629
|
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
return this.isToggled() ? this.hide() : this.show();
|
|
5512
|
-
},
|
|
5630
|
+
var leader = {
|
|
5631
|
+
mixins: [Class, Media, Resize],
|
|
5513
5632
|
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
append(this.container, this.$el);
|
|
5517
|
-
return new Promise((resolve) =>
|
|
5518
|
-
requestAnimationFrame(() => this.show().then(resolve)));
|
|
5633
|
+
props: {
|
|
5634
|
+
fill: String },
|
|
5519
5635
|
|
|
5520
|
-
}
|
|
5521
5636
|
|
|
5522
|
-
|
|
5523
|
-
|
|
5637
|
+
data: {
|
|
5638
|
+
fill: '',
|
|
5639
|
+
clsWrapper: 'uk-leader-fill',
|
|
5640
|
+
clsHide: 'uk-leader-hide',
|
|
5641
|
+
attrFill: 'data-fill' },
|
|
5524
5642
|
|
|
5525
|
-
hide() {
|
|
5526
|
-
return this.toggleElement(this.$el, false, animate(this));
|
|
5527
|
-
} } };
|
|
5528
5643
|
|
|
5644
|
+
computed: {
|
|
5645
|
+
fill(_ref) {let { fill } = _ref;
|
|
5646
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5647
|
+
} },
|
|
5529
5648
|
|
|
5530
5649
|
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
once(el, 'show hide', () => {
|
|
5535
|
-
el._reject == null ? void 0 : el._reject();
|
|
5536
|
-
el._reject = reject;
|
|
5650
|
+
connected() {
|
|
5651
|
+
[this.wrapper] = wrapInner(this.$el, "<span class=\"" + this.clsWrapper + "\">");
|
|
5652
|
+
},
|
|
5537
5653
|
|
|
5538
|
-
|
|
5654
|
+
disconnected() {
|
|
5655
|
+
unwrap(this.wrapper.childNodes);
|
|
5656
|
+
},
|
|
5539
5657
|
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
() => {
|
|
5544
|
-
once(transitionElement, 'transitionend transitioncancel', resolve, {
|
|
5545
|
-
self: true });
|
|
5658
|
+
update: {
|
|
5659
|
+
read() {
|
|
5660
|
+
const width = Math.trunc(this.$el.offsetWidth / 2);
|
|
5546
5661
|
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5662
|
+
return {
|
|
5663
|
+
width,
|
|
5664
|
+
fill: this.fill,
|
|
5665
|
+
hide: !this.matchMedia };
|
|
5550
5666
|
|
|
5667
|
+
},
|
|
5551
5668
|
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
},
|
|
5556
|
-
})).
|
|
5557
|
-
then(() => delete el._reject);
|
|
5558
|
-
}
|
|
5669
|
+
write(_ref2) {let { width, fill, hide } = _ref2;
|
|
5670
|
+
toggleClass(this.wrapper, this.clsHide, hide);
|
|
5671
|
+
attr(this.wrapper, this.attrFill, new Array(width).join(fill));
|
|
5672
|
+
},
|
|
5559
5673
|
|
|
5560
|
-
|
|
5561
|
-
return time ? endsWith(time, 'ms') ? toFloat(time) : toFloat(time) * 1000 : 0;
|
|
5562
|
-
}
|
|
5674
|
+
events: ['resize'] } };
|
|
5563
5675
|
|
|
5564
5676
|
var modal = {
|
|
5565
5677
|
install,
|
|
@@ -5723,7 +5835,9 @@
|
|
|
5723
5835
|
align: String,
|
|
5724
5836
|
offset: Number,
|
|
5725
5837
|
boundary: Boolean,
|
|
5726
|
-
|
|
5838
|
+
target: Boolean,
|
|
5839
|
+
targetX: Boolean,
|
|
5840
|
+
targetY: Boolean,
|
|
5727
5841
|
clsDrop: String,
|
|
5728
5842
|
delayShow: Number,
|
|
5729
5843
|
delayHide: Number,
|
|
@@ -5740,9 +5854,12 @@
|
|
|
5740
5854
|
offset: undefined,
|
|
5741
5855
|
delayShow: undefined,
|
|
5742
5856
|
delayHide: undefined,
|
|
5743
|
-
|
|
5744
|
-
|
|
5857
|
+
flip: false,
|
|
5858
|
+
shift: true,
|
|
5745
5859
|
boundary: true,
|
|
5860
|
+
target: false,
|
|
5861
|
+
targetX: false,
|
|
5862
|
+
targetY: false,
|
|
5746
5863
|
dropbar: false,
|
|
5747
5864
|
dropbarAnchor: false,
|
|
5748
5865
|
duration: 200,
|
|
@@ -5777,7 +5894,7 @@
|
|
|
5777
5894
|
},
|
|
5778
5895
|
|
|
5779
5896
|
watch(dropbar) {
|
|
5780
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5897
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5781
5898
|
},
|
|
5782
5899
|
|
|
5783
5900
|
immediate: true },
|
|
@@ -5793,7 +5910,7 @@
|
|
|
5793
5910
|
|
|
5794
5911
|
if (this.dropContainer !== $el) {
|
|
5795
5912
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5796
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5913
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5797
5914
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5798
5915
|
dropdowns.push(el);
|
|
5799
5916
|
}
|
|
@@ -5810,8 +5927,7 @@
|
|
|
5810
5927
|
{
|
|
5811
5928
|
...this.$props,
|
|
5812
5929
|
boundary: this.boundary,
|
|
5813
|
-
pos: this.pos
|
|
5814
|
-
offset: this.dropbar || this.offset });
|
|
5930
|
+
pos: this.pos });
|
|
5815
5931
|
|
|
5816
5932
|
|
|
5817
5933
|
},
|
|
@@ -5856,8 +5972,8 @@
|
|
|
5856
5972
|
if (
|
|
5857
5973
|
active &&
|
|
5858
5974
|
includes(active.mode, 'hover') &&
|
|
5859
|
-
active.
|
|
5860
|
-
!within(active.
|
|
5975
|
+
active.targetEl &&
|
|
5976
|
+
!within(active.targetEl, current) &&
|
|
5861
5977
|
!active.isDelaying)
|
|
5862
5978
|
{
|
|
5863
5979
|
active.hide(false);
|
|
@@ -5879,7 +5995,7 @@
|
|
|
5879
5995
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5880
5996
|
e.preventDefault();
|
|
5881
5997
|
|
|
5882
|
-
if (!active || active.
|
|
5998
|
+
if (!active || active.targetEl !== current) {
|
|
5883
5999
|
current.click();
|
|
5884
6000
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5885
6001
|
focusFirstFocusableElement(target));});
|
|
@@ -5929,8 +6045,8 @@
|
|
|
5929
6045
|
}
|
|
5930
6046
|
}
|
|
5931
6047
|
|
|
5932
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
5933
|
-
active == null ? void 0 : (_active$
|
|
6048
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6049
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
5934
6050
|
}
|
|
5935
6051
|
|
|
5936
6052
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -5972,8 +6088,8 @@
|
|
|
5972
6088
|
return this.dropbar;
|
|
5973
6089
|
},
|
|
5974
6090
|
|
|
5975
|
-
handler(
|
|
5976
|
-
if (!
|
|
6091
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6092
|
+
if (!this.isDropbarDrop(target)) {
|
|
5977
6093
|
return;
|
|
5978
6094
|
}
|
|
5979
6095
|
|
|
@@ -5981,7 +6097,7 @@
|
|
|
5981
6097
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
5982
6098
|
}
|
|
5983
6099
|
|
|
5984
|
-
addClass(
|
|
6100
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
5985
6101
|
} },
|
|
5986
6102
|
|
|
5987
6103
|
|
|
@@ -5996,19 +6112,24 @@
|
|
|
5996
6112
|
return this.dropbar;
|
|
5997
6113
|
},
|
|
5998
6114
|
|
|
5999
|
-
handler(
|
|
6000
|
-
if (!
|
|
6115
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6116
|
+
if (!this.isDropbarDrop(target)) {
|
|
6001
6117
|
return;
|
|
6002
6118
|
}
|
|
6003
6119
|
|
|
6004
|
-
this._observer = observeResize(
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6120
|
+
this._observer = observeResize(target, () => {
|
|
6121
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6122
|
+
concat(target).
|
|
6123
|
+
map((el) => offset(el));
|
|
6124
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6125
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6126
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6127
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6128
|
+
this.transitionTo(
|
|
6129
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6130
|
+
target);
|
|
6011
6131
|
|
|
6132
|
+
});
|
|
6012
6133
|
} },
|
|
6013
6134
|
|
|
6014
6135
|
|
|
@@ -6023,13 +6144,13 @@
|
|
|
6023
6144
|
return this.dropbar;
|
|
6024
6145
|
},
|
|
6025
6146
|
|
|
6026
|
-
handler(e
|
|
6147
|
+
handler(e) {
|
|
6027
6148
|
const active = this.getActive();
|
|
6028
6149
|
|
|
6029
6150
|
if (
|
|
6030
6151
|
matches(this.dropbar, ':hover') &&
|
|
6031
|
-
(active == null ? void 0 : active.$el) ===
|
|
6032
|
-
!this.toggles.some((el) => active.
|
|
6152
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6153
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6033
6154
|
{
|
|
6034
6155
|
e.preventDefault();
|
|
6035
6156
|
}
|
|
@@ -6047,8 +6168,8 @@
|
|
|
6047
6168
|
return this.dropbar;
|
|
6048
6169
|
},
|
|
6049
6170
|
|
|
6050
|
-
handler(
|
|
6051
|
-
if (!
|
|
6171
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6172
|
+
if (!this.isDropbarDrop(target)) {
|
|
6052
6173
|
return;
|
|
6053
6174
|
}
|
|
6054
6175
|
|
|
@@ -6056,7 +6177,7 @@
|
|
|
6056
6177
|
|
|
6057
6178
|
const active = this.getActive();
|
|
6058
6179
|
|
|
6059
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6180
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6060
6181
|
this.transitionTo(0);
|
|
6061
6182
|
}
|
|
6062
6183
|
} }],
|
|
@@ -6065,7 +6186,7 @@
|
|
|
6065
6186
|
|
|
6066
6187
|
methods: {
|
|
6067
6188
|
getActive() {
|
|
6068
|
-
return active
|
|
6189
|
+
return active && within(active.targetEl, this.$el) && active;
|
|
6069
6190
|
},
|
|
6070
6191
|
|
|
6071
6192
|
transitionTo(newHeight, el) {
|
|
@@ -6095,13 +6216,17 @@
|
|
|
6095
6216
|
|
|
6096
6217
|
getDropdown(el) {
|
|
6097
6218
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6219
|
+
},
|
|
6220
|
+
|
|
6221
|
+
isDropbarDrop(el) {
|
|
6222
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6098
6223
|
} } };
|
|
6099
6224
|
|
|
6100
6225
|
|
|
6101
6226
|
|
|
6102
6227
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6103
6228
|
const { current, keyCode } = e;
|
|
6104
|
-
const target = (active == null ? void 0 : active.
|
|
6229
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6105
6230
|
const i = toggles.indexOf(target);
|
|
6106
6231
|
|
|
6107
6232
|
// Left
|
|
@@ -6275,22 +6400,6 @@
|
|
|
6275
6400
|
} },
|
|
6276
6401
|
|
|
6277
6402
|
|
|
6278
|
-
{
|
|
6279
|
-
name: 'touchstart',
|
|
6280
|
-
|
|
6281
|
-
passive: true,
|
|
6282
|
-
|
|
6283
|
-
el() {
|
|
6284
|
-
return this.panel;
|
|
6285
|
-
},
|
|
6286
|
-
|
|
6287
|
-
handler(_ref8) {let { targetTouches } = _ref8;
|
|
6288
|
-
if (targetTouches.length === 1) {
|
|
6289
|
-
this.clientY = targetTouches[0].clientY;
|
|
6290
|
-
}
|
|
6291
|
-
} },
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
6403
|
{
|
|
6295
6404
|
name: 'touchmove',
|
|
6296
6405
|
|
|
@@ -6306,33 +6415,6 @@
|
|
|
6306
6415
|
} },
|
|
6307
6416
|
|
|
6308
6417
|
|
|
6309
|
-
{
|
|
6310
|
-
name: 'touchmove',
|
|
6311
|
-
|
|
6312
|
-
passive: false,
|
|
6313
|
-
|
|
6314
|
-
el() {
|
|
6315
|
-
return this.panel;
|
|
6316
|
-
},
|
|
6317
|
-
|
|
6318
|
-
handler(e) {
|
|
6319
|
-
if (e.targetTouches.length !== 1) {
|
|
6320
|
-
return;
|
|
6321
|
-
}
|
|
6322
|
-
|
|
6323
|
-
const clientY = e.targetTouches[0].clientY - this.clientY;
|
|
6324
|
-
const { scrollTop, scrollHeight, clientHeight } = this.panel;
|
|
6325
|
-
|
|
6326
|
-
if (
|
|
6327
|
-
clientHeight >= scrollHeight ||
|
|
6328
|
-
scrollTop === 0 && clientY > 0 ||
|
|
6329
|
-
scrollHeight - scrollTop <= clientHeight && clientY < 0)
|
|
6330
|
-
{
|
|
6331
|
-
e.cancelable && e.preventDefault();
|
|
6332
|
-
}
|
|
6333
|
-
} },
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
6418
|
{
|
|
6337
6419
|
name: 'show',
|
|
6338
6420
|
|
|
@@ -6344,7 +6426,6 @@
|
|
|
6344
6426
|
addClass(parent(this.panel), this.clsMode);
|
|
6345
6427
|
}
|
|
6346
6428
|
|
|
6347
|
-
css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : '');
|
|
6348
6429
|
addClass(document.body, this.clsContainer, this.clsFlip);
|
|
6349
6430
|
css(document.body, 'touch-action', 'pan-y pinch-zoom');
|
|
6350
6431
|
css(this.$el, 'display', 'block');
|
|
@@ -6352,7 +6433,7 @@
|
|
|
6352
6433
|
addClass(
|
|
6353
6434
|
this.panel,
|
|
6354
6435
|
this.clsSidebarAnimation,
|
|
6355
|
-
this.mode
|
|
6436
|
+
this.mode === 'reveal' ? '' : this.clsMode);
|
|
6356
6437
|
|
|
6357
6438
|
|
|
6358
6439
|
height(document.body); // force reflow
|
|
@@ -6389,8 +6470,6 @@
|
|
|
6389
6470
|
removeClass(this.$el, this.clsOverlay);
|
|
6390
6471
|
css(this.$el, 'display', '');
|
|
6391
6472
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
6392
|
-
|
|
6393
|
-
css(document.documentElement, 'overflowY', '');
|
|
6394
6473
|
} },
|
|
6395
6474
|
|
|
6396
6475
|
|
|
@@ -6515,6 +6594,14 @@
|
|
|
6515
6594
|
offset: 0 },
|
|
6516
6595
|
|
|
6517
6596
|
|
|
6597
|
+
connected() {
|
|
6598
|
+
registerClick(this);
|
|
6599
|
+
},
|
|
6600
|
+
|
|
6601
|
+
disconnected() {
|
|
6602
|
+
unregisterClick(this);
|
|
6603
|
+
},
|
|
6604
|
+
|
|
6518
6605
|
methods: {
|
|
6519
6606
|
async scrollTo(el) {
|
|
6520
6607
|
el = el && $(el) || document.body;
|
|
@@ -6523,20 +6610,39 @@
|
|
|
6523
6610
|
await scrollIntoView(el, { offset: this.offset });
|
|
6524
6611
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6525
6612
|
}
|
|
6526
|
-
} }
|
|
6613
|
+
} } };
|
|
6527
6614
|
|
|
6528
6615
|
|
|
6529
|
-
events: {
|
|
6530
|
-
click(e) {
|
|
6531
|
-
if (e.defaultPrevented) {
|
|
6532
|
-
return;
|
|
6533
|
-
}
|
|
6534
6616
|
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6617
|
+
const components$1 = new Set();
|
|
6618
|
+
function registerClick(cmp) {
|
|
6619
|
+
if (!components$1.size) {
|
|
6620
|
+
on(document, 'click', clickHandler);
|
|
6621
|
+
}
|
|
6622
|
+
|
|
6623
|
+
components$1.add(cmp);
|
|
6624
|
+
}
|
|
6625
|
+
|
|
6626
|
+
function unregisterClick(cmp) {
|
|
6627
|
+
components$1.delete(cmp);
|
|
6628
|
+
|
|
6629
|
+
if (!components$1.length) {
|
|
6630
|
+
off(document, 'click', clickHandler);
|
|
6631
|
+
}
|
|
6632
|
+
}
|
|
6538
6633
|
|
|
6634
|
+
function clickHandler(e) {
|
|
6635
|
+
if (e.defaultPrevented) {
|
|
6636
|
+
return;
|
|
6637
|
+
}
|
|
6539
6638
|
|
|
6639
|
+
for (const component of components$1) {
|
|
6640
|
+
if (within(e.target, component.$el)) {
|
|
6641
|
+
e.preventDefault();
|
|
6642
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6643
|
+
}
|
|
6644
|
+
}
|
|
6645
|
+
}
|
|
6540
6646
|
|
|
6541
6647
|
function getTargetElement(el) {
|
|
6542
6648
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -6866,7 +6972,9 @@
|
|
|
6866
6972
|
},
|
|
6867
6973
|
|
|
6868
6974
|
handler() {
|
|
6869
|
-
|
|
6975
|
+
const { scrollingElement } = document;
|
|
6976
|
+
|
|
6977
|
+
if (!location.hash || scrollingElement.scrollTop === 0) {
|
|
6870
6978
|
return;
|
|
6871
6979
|
}
|
|
6872
6980
|
|
|
@@ -6875,13 +6983,11 @@
|
|
|
6875
6983
|
const elOffset = offset(this.$el);
|
|
6876
6984
|
|
|
6877
6985
|
if (this.isFixed && intersectRect(targetOffset, elOffset)) {
|
|
6878
|
-
scrollTop
|
|
6879
|
-
window,
|
|
6986
|
+
scrollingElement.scrollTop =
|
|
6880
6987
|
targetOffset.top -
|
|
6881
6988
|
elOffset.height -
|
|
6882
6989
|
toPx(this.targetOffset, 'height', this.placeholder) -
|
|
6883
|
-
toPx(this.offset, 'height', this.placeholder)
|
|
6884
|
-
|
|
6990
|
+
toPx(this.offset, 'height', this.placeholder);
|
|
6885
6991
|
}
|
|
6886
6992
|
});
|
|
6887
6993
|
} }],
|
|
@@ -6979,7 +7085,7 @@
|
|
|
6979
7085
|
|
|
6980
7086
|
|
|
6981
7087
|
{let { scroll: prevScroll = 0, dir: prevDir = 'down', overflow, overflowScroll = 0, start, end } = _ref4;
|
|
6982
|
-
const scroll = scrollTop
|
|
7088
|
+
const scroll = document.scrollingElement.scrollTop;
|
|
6983
7089
|
const dir = prevScroll <= scroll ? 'down' : 'up';
|
|
6984
7090
|
|
|
6985
7091
|
return {
|
|
@@ -7499,7 +7605,7 @@
|
|
|
7499
7605
|
|
|
7500
7606
|
|
|
7501
7607
|
{
|
|
7502
|
-
name: '
|
|
7608
|
+
name: 'hide show',
|
|
7503
7609
|
|
|
7504
7610
|
self: true,
|
|
7505
7611
|
|
|
@@ -7507,10 +7613,8 @@
|
|
|
7507
7613
|
return this.target;
|
|
7508
7614
|
},
|
|
7509
7615
|
|
|
7510
|
-
handler(
|
|
7511
|
-
|
|
7512
|
-
this.updateAria(toggled);
|
|
7513
|
-
}
|
|
7616
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7617
|
+
this.updateAria(type === 'show');
|
|
7514
7618
|
} },
|
|
7515
7619
|
|
|
7516
7620
|
|
|
@@ -7605,10 +7709,12 @@
|
|
|
7605
7709
|
Video: Video,
|
|
7606
7710
|
Close: Close,
|
|
7607
7711
|
Spinner: Spinner,
|
|
7712
|
+
NavParentIcon: NavParentIcon,
|
|
7608
7713
|
SlidenavNext: Slidenav,
|
|
7609
7714
|
SlidenavPrevious: Slidenav,
|
|
7610
7715
|
SearchIcon: Search,
|
|
7611
7716
|
Marker: IconComponent,
|
|
7717
|
+
NavbarParentIcon: IconComponent,
|
|
7612
7718
|
NavbarToggleIcon: IconComponent,
|
|
7613
7719
|
OverlayIcon: IconComponent,
|
|
7614
7720
|
PaginationNext: IconComponent,
|