uikit 3.14.4-dev.e3664d0d2 → 3.14.4-dev.e8873dd80
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 +39 -15
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +353 -96
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +353 -96
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +373 -101
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +373 -101
- 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 +96 -139
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +96 -139
- 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 +1 -1
- 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 +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +100 -137
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +518 -454
- package/dist/js/uikit-core.min.js +17 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +524 -458
- package/dist/js/uikit.min.js +17 -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 +25 -3
- package/src/js/api/state.js +2 -2
- package/src/js/components/filter.js +5 -3
- package/src/js/core/accordion.js +9 -17
- package/src/js/core/alert.js +35 -14
- package/src/js/core/drop.js +110 -82
- package/src/js/core/height-viewport.js +6 -2
- 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/scroll.js +37 -10
- package/src/js/core/toggle.js +3 -5
- package/src/js/mixin/media.js +4 -5
- package/src/js/mixin/modal.js +15 -12
- package/src/js/mixin/position.js +18 -11
- package/src/js/mixin/style.js +11 -0
- package/src/js/mixin/togglable.js +88 -133
- package/src/js/util/animation.js +4 -3
- package/src/js/util/class.js +3 -1
- package/src/js/util/filter.js +3 -7
- package/src/js/util/position.js +107 -107
- package/src/js/util/style.js +4 -13
- package/src/js/util/viewport.js +3 -5
- 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 +218 -59
- package/src/less/components/navbar.less +73 -27
- package/src/less/components/utility.less +10 -2
- 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 +45 -7
- package/src/less/theme/navbar.less +4 -10
- package/src/scss/components/_import.scss +1 -0
- package/src/scss/components/drop.scss +1 -18
- package/src/scss/components/dropbar.scss +115 -0
- package/src/scss/components/dropdown.scss +16 -16
- package/src/scss/components/leader.scss +1 -1
- package/src/scss/components/nav.scss +167 -47
- package/src/scss/components/navbar.scss +61 -27
- package/src/scss/components/utility.scss +8 -1
- package/src/scss/mixins-theme.scss +92 -24
- 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 +43 -7
- package/src/scss/theme/navbar.scss +4 -7
- package/src/scss/variables-theme.scss +61 -14
- package/src/scss/variables.scss +50 -11
- package/tests/accordion.html +2 -2
- package/tests/alert.html +2 -2
- package/tests/countdown.html +1 -1
- package/tests/drop.html +455 -375
- package/tests/dropbar.html +458 -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 +330 -233
- 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 +6 -6
- package/tests/slider.html +6 -5
- package/tests/slideshow.html +8 -8
- package/tests/sortable.html +6 -8
- package/tests/sticky-navbar.html +15 -15
- package/tests/sticky.html +8 -8
- package/tests/switcher.html +1 -1
- package/tests/tab.html +1 -1
- package/tests/table.html +7 -7
- package/tests/toggle.html +2 -2
- package/tests/tooltip.html +1 -1
- package/tests/upload.html +11 -11
- package/tests/utility.html +19 -0
- package/src/images/backgrounds/nav-parent-close.svg +0 -3
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.e8873dd80 | 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
|
}
|
|
@@ -828,7 +814,9 @@
|
|
|
828
814
|
}
|
|
829
815
|
|
|
830
816
|
function removeClasses(element, cls) {
|
|
831
|
-
attr(element, 'class', (value) =>
|
|
817
|
+
attr(element, 'class', (value) =>
|
|
818
|
+
(value || '').replace(new RegExp("\\b" + cls + "\\b\\s?", 'g'), ''));
|
|
819
|
+
|
|
832
820
|
}
|
|
833
821
|
|
|
834
822
|
function replaceClass(element) {
|
|
@@ -913,13 +901,14 @@
|
|
|
913
901
|
const Transition = {
|
|
914
902
|
start: transition,
|
|
915
903
|
|
|
916
|
-
stop(element) {
|
|
904
|
+
async stop(element) {
|
|
917
905
|
trigger(element, 'transitionend');
|
|
918
|
-
|
|
906
|
+
await Promise.resolve();
|
|
919
907
|
},
|
|
920
908
|
|
|
921
|
-
cancel(element) {
|
|
909
|
+
async cancel(element) {
|
|
922
910
|
trigger(element, 'transitioncanceled');
|
|
911
|
+
await Promise.resolve();
|
|
923
912
|
},
|
|
924
913
|
|
|
925
914
|
inProgress(element) {
|
|
@@ -929,7 +918,7 @@
|
|
|
929
918
|
|
|
930
919
|
const animationPrefix = 'uk-animation-';
|
|
931
920
|
|
|
932
|
-
function animate$
|
|
921
|
+
function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
|
|
933
922
|
return Promise.all(
|
|
934
923
|
toNodes(element).map(
|
|
935
924
|
(element) =>
|
|
@@ -965,10 +954,10 @@
|
|
|
965
954
|
|
|
966
955
|
const inProgress = new RegExp(animationPrefix + "(enter|leave)");
|
|
967
956
|
const Animation = {
|
|
968
|
-
in: animate$
|
|
957
|
+
in: animate$2,
|
|
969
958
|
|
|
970
959
|
out(element, animation, duration, origin) {
|
|
971
|
-
return animate$
|
|
960
|
+
return animate$2(element, animation, duration, origin, true);
|
|
972
961
|
},
|
|
973
962
|
|
|
974
963
|
inProgress(element) {
|
|
@@ -1899,12 +1888,10 @@
|
|
|
1899
1888
|
function offsetViewport(scrollElement) {
|
|
1900
1889
|
const window = toWindow(scrollElement);
|
|
1901
1890
|
const {
|
|
1902
|
-
document: {
|
|
1891
|
+
document: { documentElement } } =
|
|
1903
1892
|
window;
|
|
1904
1893
|
let viewportElement =
|
|
1905
|
-
scrollElement === scrollingElement(scrollElement)
|
|
1906
|
-
window :
|
|
1907
|
-
scrollElement;
|
|
1894
|
+
scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1908
1895
|
|
|
1909
1896
|
const { visualViewport } = window;
|
|
1910
1897
|
if (isWindow(viewportElement) && visualViewport) {
|
|
@@ -1923,7 +1910,7 @@
|
|
|
1923
1910
|
// iOS 12 returns <body> as scrollingElement
|
|
1924
1911
|
viewportElement = documentElement;
|
|
1925
1912
|
} else {
|
|
1926
|
-
rect[start] += toFloat(css(viewportElement, "border" +
|
|
1913
|
+
rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
|
|
1927
1914
|
}
|
|
1928
1915
|
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1929
1916
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -1948,126 +1935,65 @@
|
|
|
1948
1935
|
...options.attach },
|
|
1949
1936
|
|
|
1950
1937
|
offset: [0, 0],
|
|
1938
|
+
placement: [],
|
|
1951
1939
|
...options };
|
|
1952
1940
|
|
|
1953
1941
|
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
attachTo(element, target, options);
|
|
1957
|
-
|
|
1958
|
-
offset(element, dim);
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
function attachTo(element, target, options) {
|
|
1962
|
-
let { attach, offset: offsetBy } = {
|
|
1963
|
-
attach: {
|
|
1964
|
-
element: ['left', 'top'],
|
|
1965
|
-
target: ['left', 'top'],
|
|
1966
|
-
...options.attach },
|
|
1967
|
-
|
|
1968
|
-
offset: [0, 0],
|
|
1969
|
-
...options };
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
const position = offset(element);
|
|
1973
|
-
const targetOffset = offset(target);
|
|
1974
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1975
|
-
position[start] = position[dir] =
|
|
1976
|
-
targetOffset[start] +
|
|
1977
|
-
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
1978
|
-
moveBy(attach.element[i], end, position[prop]) +
|
|
1979
|
-
+offsetBy[i];
|
|
1980
|
-
position[end] = position[start] + position[prop];
|
|
1942
|
+
if (!isArray(target)) {
|
|
1943
|
+
target = [target, target];
|
|
1981
1944
|
}
|
|
1982
|
-
return position;
|
|
1983
|
-
}
|
|
1984
1945
|
|
|
1985
|
-
|
|
1986
|
-
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
1946
|
+
offset(element, getPosition(element, target, options));
|
|
1987
1947
|
}
|
|
1988
1948
|
|
|
1989
|
-
function
|
|
1949
|
+
function getPosition(element, target, options) {
|
|
1990
1950
|
const position = attachTo(element, target, options);
|
|
1991
|
-
const targetDim = offset(target);
|
|
1992
1951
|
|
|
1993
1952
|
let {
|
|
1994
|
-
flip,
|
|
1995
1953
|
attach: { element: elAttach, target: targetAttach },
|
|
1996
1954
|
offset: elOffset,
|
|
1997
1955
|
boundary,
|
|
1998
|
-
|
|
1999
|
-
|
|
1956
|
+
viewportOffset,
|
|
1957
|
+
placement } =
|
|
2000
1958
|
options;
|
|
2001
1959
|
|
|
2002
|
-
let
|
|
2003
|
-
|
|
2004
|
-
viewports =
|
|
2005
|
-
|
|
2006
|
-
const [scrollElement] = viewports;
|
|
2007
|
-
viewports.push(viewport);
|
|
2008
|
-
|
|
2009
|
-
const offsetPosition = { ...position };
|
|
2010
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2011
|
-
if (flip !== true && !includes(flip, dir)) {
|
|
2012
|
-
continue;
|
|
2013
|
-
}
|
|
1960
|
+
let offsetPosition = position;
|
|
1961
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
1962
|
+
let viewports = scrollParents(target[i]);
|
|
1963
|
+
const [scrollElement] = viewports;
|
|
2014
1964
|
|
|
2015
|
-
|
|
2016
|
-
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
2017
|
-
|
|
2018
|
-
viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
|
|
1965
|
+
let viewport = getIntersectionArea(...viewports.map(offsetViewport));
|
|
2019
1966
|
|
|
2020
1967
|
if (viewportOffset) {
|
|
2021
1968
|
viewport[start] += viewportOffset;
|
|
2022
1969
|
viewport[end] -= viewportOffset;
|
|
2023
1970
|
}
|
|
2024
1971
|
|
|
2025
|
-
if (boundary
|
|
2026
|
-
viewport = getIntersectionArea(viewport,
|
|
1972
|
+
if (boundary) {
|
|
1973
|
+
viewport = getIntersectionArea(viewport, offsetViewport(boundary));
|
|
2027
1974
|
}
|
|
2028
1975
|
|
|
2029
|
-
const
|
|
2030
|
-
const
|
|
1976
|
+
const isInStartViewport = position[start] >= viewport[start];
|
|
1977
|
+
const isInEndViewport = position[end] <= viewport[end];
|
|
2031
1978
|
|
|
2032
|
-
if (
|
|
1979
|
+
if (isInStartViewport && isInEndViewport) {
|
|
2033
1980
|
continue;
|
|
2034
1981
|
}
|
|
2035
1982
|
|
|
2036
|
-
let offsetBy;
|
|
1983
|
+
let offsetBy = 0;
|
|
2037
1984
|
|
|
2038
1985
|
// Flip
|
|
2039
|
-
if (
|
|
1986
|
+
if (placement[i] === 'flip') {
|
|
2040
1987
|
if (
|
|
2041
|
-
|
|
2042
|
-
|
|
1988
|
+
targetAttach[i] === end && isInEndViewport ||
|
|
1989
|
+
targetAttach[i] === start && isInStartViewport)
|
|
2043
1990
|
{
|
|
2044
1991
|
continue;
|
|
2045
1992
|
}
|
|
2046
1993
|
|
|
2047
|
-
offsetBy =
|
|
2048
|
-
(elAttach[i] === start ?
|
|
2049
|
-
-position[prop] :
|
|
2050
|
-
elAttach[i] === end ?
|
|
2051
|
-
position[prop] :
|
|
2052
|
-
0) + (
|
|
2053
|
-
targetAttach[i] === start ?
|
|
2054
|
-
targetDim[prop] :
|
|
2055
|
-
targetAttach[i] === end ?
|
|
2056
|
-
-targetDim[prop] :
|
|
2057
|
-
0) -
|
|
2058
|
-
elOffset[i] * 2;
|
|
2059
|
-
|
|
2060
|
-
if (
|
|
2061
|
-
!isInScrollArea(
|
|
2062
|
-
{
|
|
2063
|
-
...position,
|
|
2064
|
-
[start]: position[start] + offsetBy,
|
|
2065
|
-
[end]: position[end] + offsetBy },
|
|
2066
|
-
|
|
2067
|
-
scrollElement,
|
|
2068
|
-
i))
|
|
1994
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2069
1995
|
|
|
2070
|
-
{
|
|
1996
|
+
if (!isInScrollArea(applyOffset(position, offsetBy, i), scrollElement, i)) {
|
|
2071
1997
|
if (isInScrollArea(position, scrollElement, i)) {
|
|
2072
1998
|
continue;
|
|
2073
1999
|
}
|
|
@@ -2076,27 +2002,27 @@
|
|
|
2076
2002
|
return false;
|
|
2077
2003
|
}
|
|
2078
2004
|
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2005
|
+
const newPos = getPosition(element, target, {
|
|
2006
|
+
...options,
|
|
2007
|
+
attach: {
|
|
2008
|
+
element: elAttach.map(flipAxis).reverse(),
|
|
2009
|
+
target: targetAttach.map(flipAxis).reverse() },
|
|
2085
2010
|
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2011
|
+
offset: elOffset.reverse(),
|
|
2012
|
+
placement: placement.reverse(),
|
|
2013
|
+
recursion: true });
|
|
2089
2014
|
|
|
2090
2015
|
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
}
|
|
2016
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2017
|
+
return newPos;
|
|
2094
2018
|
}
|
|
2019
|
+
|
|
2095
2020
|
continue;
|
|
2096
2021
|
}
|
|
2097
2022
|
|
|
2098
|
-
//
|
|
2099
|
-
} else {
|
|
2023
|
+
// Shift
|
|
2024
|
+
} else if (placement[i] === 'shift') {
|
|
2025
|
+
const targetDim = offset(target[i]);
|
|
2100
2026
|
offsetBy =
|
|
2101
2027
|
clamp(
|
|
2102
2028
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2105,13 +2031,54 @@
|
|
|
2105
2031
|
position[start];
|
|
2106
2032
|
}
|
|
2107
2033
|
|
|
2108
|
-
offsetPosition
|
|
2109
|
-
offsetPosition[end] += offsetBy;
|
|
2034
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2110
2035
|
}
|
|
2111
2036
|
|
|
2112
2037
|
return offsetPosition;
|
|
2113
2038
|
}
|
|
2114
2039
|
|
|
2040
|
+
function attachTo(element, target, options) {
|
|
2041
|
+
let { attach, offset: offsetBy } = {
|
|
2042
|
+
attach: {
|
|
2043
|
+
element: ['left', 'top'],
|
|
2044
|
+
target: ['left', 'top'],
|
|
2045
|
+
...options.attach },
|
|
2046
|
+
|
|
2047
|
+
offset: [0, 0],
|
|
2048
|
+
...options };
|
|
2049
|
+
|
|
2050
|
+
|
|
2051
|
+
let elOffset = offset(element);
|
|
2052
|
+
|
|
2053
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
2054
|
+
const targetOffset =
|
|
2055
|
+
attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
|
|
2056
|
+
|
|
2057
|
+
elOffset = applyOffset(
|
|
2058
|
+
elOffset,
|
|
2059
|
+
targetOffset[start] -
|
|
2060
|
+
elOffset[start] +
|
|
2061
|
+
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
2062
|
+
moveBy(attach.element[i], end, elOffset[prop]) +
|
|
2063
|
+
+offsetBy[i],
|
|
2064
|
+
i);
|
|
2065
|
+
|
|
2066
|
+
}
|
|
2067
|
+
return elOffset;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
function applyOffset(position, offset, i) {
|
|
2071
|
+
const [, dir, start, end] = dirs[i];
|
|
2072
|
+
const newPos = { ...position };
|
|
2073
|
+
newPos[start] = position[dir] = position[start] + offset;
|
|
2074
|
+
newPos[end] += offset;
|
|
2075
|
+
return newPos;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
function moveBy(attach, end, dim) {
|
|
2079
|
+
return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2115
2082
|
function getIntersectionArea() {
|
|
2116
2083
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2117
2084
|
for (const rect of rects) {
|
|
@@ -2132,12 +2099,32 @@
|
|
|
2132
2099
|
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2133
2100
|
}
|
|
2134
2101
|
|
|
2135
|
-
function
|
|
2136
|
-
|
|
2137
|
-
|
|
2102
|
+
function flip(element, target, _ref, i) {let { offset, attach } = _ref;
|
|
2103
|
+
return attachTo(element, target, {
|
|
2104
|
+
attach: {
|
|
2105
|
+
element: flipAttach(attach.element, i),
|
|
2106
|
+
target: flipAttach(attach.target, i) },
|
|
2107
|
+
|
|
2108
|
+
offset: flipOffset(offset, i) });
|
|
2109
|
+
|
|
2138
2110
|
}
|
|
2139
2111
|
|
|
2140
|
-
function
|
|
2112
|
+
function flipAttach(attach, i) {
|
|
2113
|
+
const newAttach = [...attach];
|
|
2114
|
+
const index = dirs[i].indexOf(attach[i]);
|
|
2115
|
+
if (~index) {
|
|
2116
|
+
newAttach[i] = dirs[i][1 - index % 2 + 2];
|
|
2117
|
+
}
|
|
2118
|
+
return newAttach;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
function flipOffset(offset, i) {
|
|
2122
|
+
offset = [...offset];
|
|
2123
|
+
offset[i] *= -1;
|
|
2124
|
+
return offset;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
function flipAxis(prop) {
|
|
2141
2128
|
for (let i = 0; i < dirs.length; i++) {
|
|
2142
2129
|
const index = dirs[i].indexOf(prop);
|
|
2143
2130
|
if (~index) {
|
|
@@ -2152,7 +2139,7 @@
|
|
|
2152
2139
|
getImage: getImage,
|
|
2153
2140
|
transition: transition,
|
|
2154
2141
|
Transition: Transition,
|
|
2155
|
-
animate: animate$
|
|
2142
|
+
animate: animate$2,
|
|
2156
2143
|
Animation: Animation,
|
|
2157
2144
|
attr: attr,
|
|
2158
2145
|
hasAttr: hasAttr,
|
|
@@ -2282,7 +2269,6 @@
|
|
|
2282
2269
|
findAll: findAll,
|
|
2283
2270
|
escape: escape,
|
|
2284
2271
|
css: css,
|
|
2285
|
-
getCssVar: getCssVar,
|
|
2286
2272
|
propName: propName,
|
|
2287
2273
|
isInView: isInView,
|
|
2288
2274
|
scrollIntoView: scrollIntoView,
|
|
@@ -2607,7 +2593,7 @@
|
|
|
2607
2593
|
|
|
2608
2594
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2609
2595
|
|
|
2610
|
-
if (prop === 'target' &&
|
|
2596
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2611
2597
|
continue;
|
|
2612
2598
|
}
|
|
2613
2599
|
|
|
@@ -2618,7 +2604,7 @@
|
|
|
2618
2604
|
|
|
2619
2605
|
for (const key in options) {
|
|
2620
2606
|
const prop = camelize(key);
|
|
2621
|
-
if (props[prop]
|
|
2607
|
+
if (!isUndefined(props[prop])) {
|
|
2622
2608
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2623
2609
|
}
|
|
2624
2610
|
}
|
|
@@ -2947,7 +2933,7 @@
|
|
|
2947
2933
|
UIkit.data = '__uikit__';
|
|
2948
2934
|
UIkit.prefix = 'uk-';
|
|
2949
2935
|
UIkit.options = {};
|
|
2950
|
-
UIkit.version = '3.14.4-dev.
|
|
2936
|
+
UIkit.version = '3.14.4-dev.e8873dd80';
|
|
2951
2937
|
|
|
2952
2938
|
globalAPI(UIkit);
|
|
2953
2939
|
hooksAPI(UIkit);
|
|
@@ -3052,27 +3038,7 @@
|
|
|
3052
3038
|
origin: false,
|
|
3053
3039
|
transition: 'ease',
|
|
3054
3040
|
clsEnter: 'uk-togglabe-enter',
|
|
3055
|
-
clsLeave: 'uk-togglabe-leave',
|
|
3056
|
-
|
|
3057
|
-
initProps: {
|
|
3058
|
-
overflow: '',
|
|
3059
|
-
maxHeight: '',
|
|
3060
|
-
paddingTop: '',
|
|
3061
|
-
paddingBottom: '',
|
|
3062
|
-
marginTop: '',
|
|
3063
|
-
marginBottom: '',
|
|
3064
|
-
boxShadow: '' },
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
hideProps: {
|
|
3068
|
-
overflow: 'hidden',
|
|
3069
|
-
maxHeight: 0,
|
|
3070
|
-
paddingTop: 0,
|
|
3071
|
-
paddingBottom: 0,
|
|
3072
|
-
marginTop: 0,
|
|
3073
|
-
marginBottom: 0,
|
|
3074
|
-
boxShadow: 'none' } },
|
|
3075
|
-
|
|
3041
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3076
3042
|
|
|
3077
3043
|
|
|
3078
3044
|
computed: {
|
|
@@ -3081,7 +3047,7 @@
|
|
|
3081
3047
|
},
|
|
3082
3048
|
|
|
3083
3049
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3084
|
-
return startsWith(animation[0],
|
|
3050
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3085
3051
|
} },
|
|
3086
3052
|
|
|
3087
3053
|
|
|
@@ -3174,130 +3140,105 @@
|
|
|
3174
3140
|
};
|
|
3175
3141
|
}
|
|
3176
3142
|
|
|
3177
|
-
function toggleTransition(cmp) {
|
|
3178
|
-
|
|
3179
|
-
case 'slide-left':
|
|
3180
|
-
return slideHorizontal(cmp);
|
|
3181
|
-
case 'slide-right':
|
|
3182
|
-
return slideHorizontal(cmp, true);}
|
|
3183
|
-
|
|
3184
|
-
return slide$1(cmp);
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
function slide$1(_ref4)
|
|
3188
|
-
|
|
3189
|
-
|
|
3143
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3144
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3190
3145
|
|
|
3146
|
+
const dirs = [
|
|
3147
|
+
['left', 'right'],
|
|
3148
|
+
['top', 'bottom']];
|
|
3191
3149
|
|
|
3150
|
+
const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
|
|
3151
|
+
const end = dir[1] === startProp;
|
|
3152
|
+
const props = ['width', 'height'];
|
|
3153
|
+
const dimProp = props[dirs.indexOf(dir)];
|
|
3154
|
+
const marginProp = "margin-" + dir[0];
|
|
3155
|
+
const marginStartProp = "margin-" + startProp;
|
|
3192
3156
|
|
|
3157
|
+
return async (el, show) => {
|
|
3158
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3193
3159
|
|
|
3160
|
+
let currentDim = dimensions$1(el)[dimProp];
|
|
3194
3161
|
|
|
3195
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3196
|
-
return (el, show) => {
|
|
3197
3162
|
const inProgress = Transition.inProgress(el);
|
|
3198
|
-
|
|
3199
|
-
!inProgress && el.hasChildNodes() ?
|
|
3200
|
-
toFloat(css(el.firstElementChild, 'marginTop')) +
|
|
3201
|
-
toFloat(css(el.lastElementChild, 'marginBottom')) :
|
|
3202
|
-
0;
|
|
3203
|
-
const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
|
|
3163
|
+
await Transition.cancel(el);
|
|
3204
3164
|
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
Transition.cancel(el);
|
|
3208
|
-
|
|
3209
|
-
if (!isToggled(el)) {
|
|
3165
|
+
if (show) {
|
|
3210
3166
|
_toggle(el, true);
|
|
3211
3167
|
}
|
|
3212
3168
|
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
el
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
css(scrollElement, 'overflowX', 'hidden');
|
|
3250
|
-
|
|
3251
|
-
if (!isToggled(el)) {
|
|
3252
|
-
_toggle(el, true);
|
|
3253
|
-
}
|
|
3169
|
+
const prevProps = Object.fromEntries(
|
|
3170
|
+
[
|
|
3171
|
+
'padding',
|
|
3172
|
+
'border',
|
|
3173
|
+
'width',
|
|
3174
|
+
'height',
|
|
3175
|
+
'overflowY',
|
|
3176
|
+
'overflowX',
|
|
3177
|
+
marginProp,
|
|
3178
|
+
marginStartProp].
|
|
3179
|
+
map((key) => [key, el.style[key]]));
|
|
3180
|
+
|
|
3181
|
+
|
|
3182
|
+
const dim = dimensions$1(el);
|
|
3183
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3184
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3185
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3186
|
+
|
|
3187
|
+
if (!inProgress && !show) {
|
|
3188
|
+
currentDim += marginStart;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3192
|
+
css(wrapper, {
|
|
3193
|
+
boxSizing: 'border-box',
|
|
3194
|
+
height: dim.height,
|
|
3195
|
+
width: dim.width,
|
|
3196
|
+
...css(el, [
|
|
3197
|
+
'overflow',
|
|
3198
|
+
'padding',
|
|
3199
|
+
'borderTop',
|
|
3200
|
+
'borderRight',
|
|
3201
|
+
'borderBottom',
|
|
3202
|
+
'borderLeft',
|
|
3203
|
+
'borderImage',
|
|
3204
|
+
marginStartProp]) });
|
|
3254
3205
|
|
|
3255
|
-
const width = toFloat(css(el, 'width'));
|
|
3256
|
-
duration = velocity * width + duration;
|
|
3257
3206
|
|
|
3258
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3259
|
-
const offsetEl = offset(el);
|
|
3260
|
-
const useClipPath = right ?
|
|
3261
|
-
offsetEl.right < scrollElement.clientWidth :
|
|
3262
|
-
Math.round(offsetEl.left) > 0;
|
|
3263
3207
|
|
|
3264
3208
|
css(el, {
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3209
|
+
padding: 0,
|
|
3210
|
+
border: 0,
|
|
3211
|
+
[marginStartProp]: 0,
|
|
3212
|
+
width: dim.width,
|
|
3213
|
+
height: dim.height,
|
|
3214
|
+
overflow: 'hidden',
|
|
3215
|
+
[dimProp]: currentDim });
|
|
3272
3216
|
|
|
3273
|
-
return (
|
|
3274
|
-
show ?
|
|
3275
|
-
Transition.start(
|
|
3276
|
-
el,
|
|
3277
|
-
{
|
|
3278
|
-
clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
|
|
3279
|
-
marginLeft: 0 },
|
|
3280
3217
|
|
|
3281
|
-
|
|
3282
|
-
|
|
3218
|
+
const percent = currentDim / endDim;
|
|
3219
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3220
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3283
3221
|
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
3222
|
+
if (end) {
|
|
3223
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3224
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3225
|
+
}
|
|
3289
3226
|
|
|
3227
|
+
if (!end ^ mode === 'reveal') {
|
|
3228
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3229
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3230
|
+
}
|
|
3290
3231
|
|
|
3291
|
-
|
|
3292
|
-
|
|
3232
|
+
try {
|
|
3233
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3234
|
+
} finally {
|
|
3235
|
+
css(el, prevProps);
|
|
3236
|
+
unwrap(wrapper.firstChild);
|
|
3293
3237
|
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
css(scrollElement, 'overflowX', '');
|
|
3299
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3300
|
-
});
|
|
3238
|
+
if (!show) {
|
|
3239
|
+
_toggle(el, false);
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3301
3242
|
};
|
|
3302
3243
|
}
|
|
3303
3244
|
|
|
@@ -3322,6 +3263,7 @@
|
|
|
3322
3263
|
mixins: [Class, Lazyload, Togglable],
|
|
3323
3264
|
|
|
3324
3265
|
props: {
|
|
3266
|
+
animation: Boolean,
|
|
3325
3267
|
targets: String,
|
|
3326
3268
|
active: null,
|
|
3327
3269
|
collapsible: Boolean,
|
|
@@ -3334,7 +3276,7 @@
|
|
|
3334
3276
|
data: {
|
|
3335
3277
|
targets: '> *',
|
|
3336
3278
|
active: false,
|
|
3337
|
-
animation:
|
|
3279
|
+
animation: true,
|
|
3338
3280
|
collapsible: true,
|
|
3339
3281
|
multiple: false,
|
|
3340
3282
|
clsOpen: 'uk-open',
|
|
@@ -3380,7 +3322,7 @@
|
|
|
3380
3322
|
hide(
|
|
3381
3323
|
el,
|
|
3382
3324
|
!hasClass(
|
|
3383
|
-
this.items.find((item) =>
|
|
3325
|
+
this.items.find((item) => within(el, item)),
|
|
3384
3326
|
this.clsOpen));
|
|
3385
3327
|
|
|
3386
3328
|
|
|
@@ -3432,23 +3374,15 @@
|
|
|
3432
3374
|
toggleClass(el, this.clsOpen, show);
|
|
3433
3375
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3434
3376
|
|
|
3435
|
-
const content = $(
|
|
3377
|
+
const content = $(this.content, el);
|
|
3436
3378
|
|
|
3437
|
-
if (animate === false || !this.
|
|
3379
|
+
if (animate === false || !this.animation) {
|
|
3380
|
+
content.hidden = !show;
|
|
3438
3381
|
hide(content, !show);
|
|
3439
3382
|
return;
|
|
3440
3383
|
}
|
|
3441
3384
|
|
|
3442
|
-
|
|
3443
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3444
|
-
}
|
|
3445
|
-
|
|
3446
|
-
hide(content, false);
|
|
3447
|
-
await slide$1(this)(el._wrapper, show);
|
|
3448
|
-
hide(content, !show);
|
|
3449
|
-
|
|
3450
|
-
delete el._wrapper;
|
|
3451
|
-
unwrap(content);
|
|
3385
|
+
await toggleTransition(this)(content, show);
|
|
3452
3386
|
|
|
3453
3387
|
if (show) {
|
|
3454
3388
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3474,18 +3408,17 @@
|
|
|
3474
3408
|
args: 'animation',
|
|
3475
3409
|
|
|
3476
3410
|
props: {
|
|
3411
|
+
animation: Boolean,
|
|
3477
3412
|
close: String },
|
|
3478
3413
|
|
|
3479
3414
|
|
|
3480
3415
|
data: {
|
|
3481
|
-
animation:
|
|
3416
|
+
animation: true,
|
|
3482
3417
|
selClose: '.uk-alert-close',
|
|
3483
|
-
duration: 150,
|
|
3484
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3418
|
+
duration: 150 },
|
|
3485
3419
|
|
|
3486
3420
|
|
|
3487
|
-
events:
|
|
3488
|
-
{
|
|
3421
|
+
events: {
|
|
3489
3422
|
name: 'click',
|
|
3490
3423
|
|
|
3491
3424
|
delegate() {
|
|
@@ -3495,16 +3428,39 @@
|
|
|
3495
3428
|
handler(e) {
|
|
3496
3429
|
e.preventDefault();
|
|
3497
3430
|
this.close();
|
|
3498
|
-
} }
|
|
3499
|
-
|
|
3431
|
+
} },
|
|
3500
3432
|
|
|
3501
3433
|
|
|
3502
3434
|
methods: {
|
|
3503
3435
|
async close() {
|
|
3504
|
-
await this.toggleElement(this.$el);
|
|
3436
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3505
3437
|
this.$destroy(true);
|
|
3506
3438
|
} } };
|
|
3507
3439
|
|
|
3440
|
+
|
|
3441
|
+
|
|
3442
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3443
|
+
return (el) => {
|
|
3444
|
+
const height = toFloat(css(el, 'height'));
|
|
3445
|
+
css(el, 'height', height);
|
|
3446
|
+
return Transition.start(
|
|
3447
|
+
el,
|
|
3448
|
+
{
|
|
3449
|
+
height: 0,
|
|
3450
|
+
marginTop: 0,
|
|
3451
|
+
marginBottom: 0,
|
|
3452
|
+
paddingTop: 0,
|
|
3453
|
+
paddingBottom: 0,
|
|
3454
|
+
borderTop: 0,
|
|
3455
|
+
borderBottom: 0,
|
|
3456
|
+
opacity: 0 },
|
|
3457
|
+
|
|
3458
|
+
velocity * height + duration,
|
|
3459
|
+
transition);
|
|
3460
|
+
|
|
3461
|
+
};
|
|
3462
|
+
}
|
|
3463
|
+
|
|
3508
3464
|
var Video = {
|
|
3509
3465
|
args: 'autoplay',
|
|
3510
3466
|
|
|
@@ -3653,13 +3609,17 @@
|
|
|
3653
3609
|
props: {
|
|
3654
3610
|
pos: String,
|
|
3655
3611
|
offset: null,
|
|
3656
|
-
flip: Boolean
|
|
3612
|
+
flip: Boolean,
|
|
3613
|
+
shift: Boolean,
|
|
3614
|
+
inset: Boolean },
|
|
3657
3615
|
|
|
3658
3616
|
|
|
3659
3617
|
data: {
|
|
3660
3618
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3619
|
+
offset: false,
|
|
3661
3620
|
flip: true,
|
|
3662
|
-
|
|
3621
|
+
shift: true,
|
|
3622
|
+
inset: false },
|
|
3663
3623
|
|
|
3664
3624
|
|
|
3665
3625
|
connected() {
|
|
@@ -3671,17 +3631,19 @@
|
|
|
3671
3631
|
methods: {
|
|
3672
3632
|
positionAt(element, target, boundary) {
|
|
3673
3633
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3634
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3674
3635
|
|
|
3675
3636
|
const attach = {
|
|
3676
|
-
element: [flipPosition(this.dir), this.align],
|
|
3637
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3677
3638
|
target: [this.dir, this.align] };
|
|
3678
3639
|
|
|
3679
3640
|
|
|
3680
3641
|
if (this.axis === 'y') {
|
|
3681
3642
|
for (const prop in attach) {
|
|
3682
|
-
attach[prop]
|
|
3643
|
+
attach[prop].reverse();
|
|
3683
3644
|
}
|
|
3684
|
-
offset
|
|
3645
|
+
offset.reverse();
|
|
3646
|
+
placement.reverse();
|
|
3685
3647
|
}
|
|
3686
3648
|
|
|
3687
3649
|
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
@@ -3695,7 +3657,7 @@
|
|
|
3695
3657
|
attach,
|
|
3696
3658
|
offset,
|
|
3697
3659
|
boundary,
|
|
3698
|
-
|
|
3660
|
+
placement,
|
|
3699
3661
|
viewportOffset: this.getViewportOffset(element) });
|
|
3700
3662
|
|
|
3701
3663
|
|
|
@@ -3707,27 +3669,38 @@
|
|
|
3707
3669
|
getPositionOffset(element) {
|
|
3708
3670
|
return (
|
|
3709
3671
|
toPx(
|
|
3710
|
-
this.offset === false ?
|
|
3672
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3711
3673
|
this.axis === 'x' ? 'width' : 'height',
|
|
3712
3674
|
element) * (
|
|
3713
|
-
|
|
3675
|
+
|
|
3676
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3677
|
+
this.inset ? -1 : 1));
|
|
3714
3678
|
|
|
3715
3679
|
},
|
|
3716
3680
|
|
|
3717
3681
|
getShiftOffset(element) {
|
|
3718
|
-
return
|
|
3682
|
+
return this.align === 'center' ?
|
|
3719
3683
|
0 :
|
|
3720
3684
|
toPx(
|
|
3721
|
-
|
|
3685
|
+
css(element, '--uk-position-shift-offset'),
|
|
3722
3686
|
this.axis === 'y' ? 'width' : 'height',
|
|
3723
3687
|
element) * (
|
|
3724
3688
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3725
3689
|
},
|
|
3726
3690
|
|
|
3727
3691
|
getViewportOffset(element) {
|
|
3728
|
-
return toPx(
|
|
3692
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3729
3693
|
} } };
|
|
3730
3694
|
|
|
3695
|
+
var Style = {
|
|
3696
|
+
beforeConnect() {
|
|
3697
|
+
this._style = attr(this.$el, 'style');
|
|
3698
|
+
},
|
|
3699
|
+
|
|
3700
|
+
disconnected() {
|
|
3701
|
+
attr(this.$el, 'style', this._style);
|
|
3702
|
+
} };
|
|
3703
|
+
|
|
3731
3704
|
const active$1 = [];
|
|
3732
3705
|
|
|
3733
3706
|
var Modal = {
|
|
@@ -3837,8 +3810,8 @@
|
|
|
3837
3810
|
|
|
3838
3811
|
|
|
3839
3812
|
if (this.overlay) {
|
|
3840
|
-
once(this.$el, '
|
|
3841
|
-
once(this.$el, '
|
|
3813
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3814
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3842
3815
|
}
|
|
3843
3816
|
|
|
3844
3817
|
if (this.stack) {
|
|
@@ -3920,10 +3893,6 @@
|
|
|
3920
3893
|
active$1.splice(active$1.indexOf(this), 1);
|
|
3921
3894
|
}
|
|
3922
3895
|
|
|
3923
|
-
if (!active$1.length) {
|
|
3924
|
-
css(document.body, 'overflowY', '');
|
|
3925
|
-
}
|
|
3926
|
-
|
|
3927
3896
|
css(this.$el, 'zIndex', '');
|
|
3928
3897
|
|
|
3929
3898
|
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
@@ -4040,16 +4009,22 @@
|
|
|
4040
4009
|
return () => events.forEach((fn) => fn());
|
|
4041
4010
|
}
|
|
4042
4011
|
|
|
4012
|
+
let prevented;
|
|
4043
4013
|
function preventBackgroundScroll() {
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4014
|
+
if (prevented) {
|
|
4015
|
+
return noop;
|
|
4016
|
+
}
|
|
4017
|
+
prevented = true;
|
|
4018
|
+
|
|
4019
|
+
const { scrollingElement } = document;
|
|
4020
|
+
css(scrollingElement, {
|
|
4021
|
+
overflowY: 'hidden',
|
|
4022
|
+
touchAction: 'none',
|
|
4023
|
+
paddingRight: width(window) - scrollingElement.clientWidth });
|
|
4048
4024
|
|
|
4049
|
-
css(documentElement, 'overflowY', 'hidden');
|
|
4050
4025
|
return () => {
|
|
4051
|
-
|
|
4052
|
-
css(
|
|
4026
|
+
prevented = false;
|
|
4027
|
+
css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
|
|
4053
4028
|
};
|
|
4054
4029
|
}
|
|
4055
4030
|
|
|
@@ -4066,7 +4041,7 @@
|
|
|
4066
4041
|
let active;
|
|
4067
4042
|
|
|
4068
4043
|
var drop = {
|
|
4069
|
-
mixins: [Container, Lazyload, Position, Togglable],
|
|
4044
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4070
4045
|
|
|
4071
4046
|
args: 'pos',
|
|
4072
4047
|
|
|
@@ -4074,10 +4049,13 @@
|
|
|
4074
4049
|
mode: 'list',
|
|
4075
4050
|
toggle: Boolean,
|
|
4076
4051
|
boundary: Boolean,
|
|
4077
|
-
|
|
4052
|
+
target: Boolean,
|
|
4053
|
+
targetX: Boolean,
|
|
4054
|
+
targetY: Boolean,
|
|
4055
|
+
stretch: Boolean,
|
|
4078
4056
|
delayShow: Number,
|
|
4079
4057
|
delayHide: Number,
|
|
4080
|
-
|
|
4058
|
+
autoUpdate: Boolean,
|
|
4081
4059
|
clsDrop: String,
|
|
4082
4060
|
animateOut: Boolean,
|
|
4083
4061
|
bgScroll: Boolean },
|
|
@@ -4086,17 +4064,32 @@
|
|
|
4086
4064
|
data: {
|
|
4087
4065
|
mode: ['click', 'hover'],
|
|
4088
4066
|
toggle: '- *',
|
|
4089
|
-
boundary:
|
|
4090
|
-
|
|
4067
|
+
boundary: false,
|
|
4068
|
+
target: false,
|
|
4069
|
+
targetX: false,
|
|
4070
|
+
targetY: false,
|
|
4071
|
+
stretch: false,
|
|
4091
4072
|
delayShow: 0,
|
|
4092
4073
|
delayHide: 800,
|
|
4093
|
-
|
|
4074
|
+
autoUpdate: true,
|
|
4094
4075
|
clsDrop: false,
|
|
4076
|
+
animateOut: false,
|
|
4077
|
+
bgScroll: true,
|
|
4095
4078
|
animation: ['uk-animation-fade'],
|
|
4096
4079
|
cls: 'uk-open',
|
|
4097
|
-
container: false,
|
|
4098
|
-
|
|
4099
|
-
|
|
4080
|
+
container: false },
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
computed: {
|
|
4084
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4085
|
+
targetX = targetX || target || this.targetEl;
|
|
4086
|
+
targetY = targetY || target || this.targetEl;
|
|
4087
|
+
|
|
4088
|
+
return [
|
|
4089
|
+
targetX === true ? window : query(targetX, $el),
|
|
4090
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4091
|
+
|
|
4092
|
+
} },
|
|
4100
4093
|
|
|
4101
4094
|
|
|
4102
4095
|
created() {
|
|
@@ -4110,18 +4103,19 @@
|
|
|
4110
4103
|
connected() {
|
|
4111
4104
|
addClass(this.$el, this.clsDrop);
|
|
4112
4105
|
|
|
4113
|
-
if (this.toggle && !this.
|
|
4114
|
-
this.
|
|
4106
|
+
if (this.toggle && !this.targetEl) {
|
|
4107
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4115
4108
|
target: this.$el,
|
|
4116
4109
|
mode: this.mode }).
|
|
4117
4110
|
$el;
|
|
4118
|
-
attr(this.
|
|
4119
|
-
this.lazyload(this.
|
|
4111
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4112
|
+
this.lazyload(this.targetEl);
|
|
4120
4113
|
}
|
|
4121
4114
|
},
|
|
4122
4115
|
|
|
4123
4116
|
disconnected() {
|
|
4124
4117
|
if (this.isActive()) {
|
|
4118
|
+
this.hide(false);
|
|
4125
4119
|
active = null;
|
|
4126
4120
|
}
|
|
4127
4121
|
},
|
|
@@ -4147,7 +4141,7 @@
|
|
|
4147
4141
|
return 'a[href^="#"]';
|
|
4148
4142
|
},
|
|
4149
4143
|
|
|
4150
|
-
handler(
|
|
4144
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4151
4145
|
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4152
4146
|
this.hide(false);
|
|
4153
4147
|
}
|
|
@@ -4255,21 +4249,22 @@
|
|
|
4255
4249
|
|
|
4256
4250
|
this.tracker.init();
|
|
4257
4251
|
|
|
4258
|
-
|
|
4252
|
+
const update = () => this.$emit();
|
|
4253
|
+
const handlers = [
|
|
4259
4254
|
on(
|
|
4260
4255
|
document,
|
|
4261
4256
|
pointerDown$1,
|
|
4262
|
-
(
|
|
4257
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4263
4258
|
!within(target, this.$el) &&
|
|
4264
4259
|
once(
|
|
4265
4260
|
document,
|
|
4266
4261
|
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
4267
|
-
(
|
|
4262
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4268
4263
|
if (
|
|
4269
4264
|
!defaultPrevented &&
|
|
4270
4265
|
type === pointerUp$1 &&
|
|
4271
4266
|
target === newTarget &&
|
|
4272
|
-
!(this.
|
|
4267
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4273
4268
|
{
|
|
4274
4269
|
this.hide(false);
|
|
4275
4270
|
}
|
|
@@ -4284,29 +4279,28 @@
|
|
|
4284
4279
|
}
|
|
4285
4280
|
}),
|
|
4286
4281
|
|
|
4282
|
+
on(window, 'resize', update),
|
|
4283
|
+
|
|
4284
|
+
(() => {
|
|
4285
|
+
const observer = observeResize(
|
|
4286
|
+
scrollParents(this.$el).concat(this.targetEl),
|
|
4287
|
+
update);
|
|
4288
|
+
|
|
4289
|
+
return () => observer.disconnect();
|
|
4290
|
+
})(),
|
|
4291
|
+
|
|
4292
|
+
...(this.autoUpdate ?
|
|
4293
|
+
[on([document, scrollParents(this.$el)], 'scroll', update)] :
|
|
4294
|
+
[]),
|
|
4295
|
+
|
|
4287
4296
|
...(this.bgScroll ?
|
|
4288
4297
|
[] :
|
|
4289
|
-
[preventOverscroll(this.$el), preventBackgroundScroll()])
|
|
4298
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()])];
|
|
4299
|
+
|
|
4300
|
+
|
|
4301
|
+
once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
|
|
4302
|
+
self: true });
|
|
4290
4303
|
|
|
4291
|
-
...(this.display === 'static' && this.align !== 'stretch' ?
|
|
4292
|
-
[] :
|
|
4293
|
-
(() => {
|
|
4294
|
-
const handler = () => this.$emit();
|
|
4295
|
-
return [
|
|
4296
|
-
on(window, 'resize', handler),
|
|
4297
|
-
on(document, 'scroll', handler, true),
|
|
4298
|
-
(() => {
|
|
4299
|
-
const observer = observeResize(
|
|
4300
|
-
scrollParents(this.$el),
|
|
4301
|
-
handler);
|
|
4302
|
-
|
|
4303
|
-
return () => observer.disconnect();
|
|
4304
|
-
})()];
|
|
4305
|
-
|
|
4306
|
-
})())])
|
|
4307
|
-
{
|
|
4308
|
-
once(this.$el, 'hide', handler, { self: true });
|
|
4309
|
-
}
|
|
4310
4304
|
} },
|
|
4311
4305
|
|
|
4312
4306
|
|
|
@@ -4323,7 +4317,7 @@
|
|
|
4323
4317
|
{
|
|
4324
4318
|
name: 'hide',
|
|
4325
4319
|
|
|
4326
|
-
handler(
|
|
4320
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4327
4321
|
if (this.$el !== target) {
|
|
4328
4322
|
active =
|
|
4329
4323
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4347,12 +4341,12 @@
|
|
|
4347
4341
|
|
|
4348
4342
|
|
|
4349
4343
|
methods: {
|
|
4350
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4351
|
-
if (this.isToggled() && target && this.
|
|
4344
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4345
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4352
4346
|
this.hide(false, false);
|
|
4353
4347
|
}
|
|
4354
4348
|
|
|
4355
|
-
this.
|
|
4349
|
+
this.targetEl = target;
|
|
4356
4350
|
|
|
4357
4351
|
this.clearTimers();
|
|
4358
4352
|
|
|
@@ -4415,60 +4409,69 @@
|
|
|
4415
4409
|
|
|
4416
4410
|
position() {
|
|
4417
4411
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4418
|
-
|
|
4419
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4412
|
+
attr(this.$el, 'style', this._style);
|
|
4420
4413
|
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
const [scrollParent] = scrollParents(
|
|
4424
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4414
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4415
|
+
this.$el.hidden = true;
|
|
4425
4416
|
|
|
4426
|
-
const
|
|
4427
|
-
const boundaryOffset = boundary
|
|
4417
|
+
const boundary = query(this.boundary, this.$el);
|
|
4418
|
+
const boundaryOffset = offsetViewport(boundary || window);
|
|
4419
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4428
4420
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4429
4421
|
|
|
4430
|
-
|
|
4431
|
-
|
|
4422
|
+
const dirs = [
|
|
4423
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4424
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4432
4425
|
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4450
|
-
|
|
4451
|
-
css(this.$el, {
|
|
4452
|
-
width:
|
|
4453
|
-
this.axis === 'y' ?
|
|
4454
|
-
viewport.width :
|
|
4455
|
-
(this.dir === 'left' ?
|
|
4456
|
-
targetDim.left - viewport.left :
|
|
4457
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4458
|
-
height:
|
|
4459
|
-
this.axis === 'x' ?
|
|
4460
|
-
viewport.height :
|
|
4461
|
-
(this.dir === 'top' ?
|
|
4462
|
-
targetDim.top - viewport.top :
|
|
4463
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4464
|
-
|
|
4465
|
-
} else if (this.$el.offsetWidth > maxWidth) {
|
|
4426
|
+
|
|
4427
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4428
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4429
|
+
css(this.$el, {
|
|
4430
|
+
[prop]: Math.min(
|
|
4431
|
+
boundaryOffset[prop],
|
|
4432
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4433
|
+
|
|
4434
|
+
["overflow-" + axis]: 'auto' });
|
|
4435
|
+
|
|
4436
|
+
}
|
|
4437
|
+
}
|
|
4438
|
+
|
|
4439
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4440
|
+
|
|
4441
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4466
4442
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4467
4443
|
}
|
|
4468
4444
|
|
|
4469
4445
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4470
4446
|
|
|
4471
|
-
this
|
|
4447
|
+
this.$el.hidden = false;
|
|
4448
|
+
|
|
4449
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4450
|
+
|
|
4451
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4452
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4453
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4454
|
+
const targetOffset = offset(this.target[i]);
|
|
4455
|
+
const elOffset = offset(this.$el);
|
|
4456
|
+
|
|
4457
|
+
css(this.$el, {
|
|
4458
|
+
[prop]:
|
|
4459
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4460
|
+
targetOffset[start] -
|
|
4461
|
+
Math.max(
|
|
4462
|
+
boundaryOffset[start],
|
|
4463
|
+
viewports[i][start] + viewportOffset) :
|
|
4464
|
+
|
|
4465
|
+
Math.min(
|
|
4466
|
+
boundaryOffset[end],
|
|
4467
|
+
viewports[i][end] - viewportOffset) -
|
|
4468
|
+
targetOffset[end]) - positionOffset,
|
|
4469
|
+
["overflow-" + axis]: 'auto' });
|
|
4470
|
+
|
|
4471
|
+
|
|
4472
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4473
|
+
}
|
|
4474
|
+
}
|
|
4472
4475
|
} } };
|
|
4473
4476
|
|
|
4474
4477
|
|
|
@@ -4965,8 +4968,11 @@
|
|
|
4965
4968
|
let minHeight = '';
|
|
4966
4969
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4967
4970
|
|
|
4971
|
+
const { body, scrollingElement } = document;
|
|
4968
4972
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4969
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4973
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4974
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4975
|
+
|
|
4970
4976
|
|
|
4971
4977
|
if (this.expand) {
|
|
4972
4978
|
minHeight = Math.max(
|
|
@@ -4976,7 +4982,8 @@
|
|
|
4976
4982
|
0);
|
|
4977
4983
|
|
|
4978
4984
|
} else {
|
|
4979
|
-
const isScrollingElement =
|
|
4985
|
+
const isScrollingElement =
|
|
4986
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
4980
4987
|
|
|
4981
4988
|
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4982
4989
|
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
@@ -5230,7 +5237,13 @@
|
|
|
5230
5237
|
|
|
5231
5238
|
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>";
|
|
5232
5239
|
|
|
5233
|
-
var
|
|
5240
|
+
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>";
|
|
5241
|
+
|
|
5242
|
+
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>";
|
|
5243
|
+
|
|
5244
|
+
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>";
|
|
5245
|
+
|
|
5246
|
+
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><style>.uk-navbar-toggle-animate 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 svg > .line-3 { opacity: 0; }\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-3 { opacity: 1; }\n\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-2 { transform: rotate(45deg); }\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-3 { transform: rotate(-45deg); }\n\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-1,\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-4 { opacity: 0; }\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-1 { transform: translateY(6px) scaleX(0); }\n .uk-navbar-toggle-animate[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>";
|
|
5234
5247
|
|
|
5235
5248
|
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>";
|
|
5236
5249
|
|
|
@@ -5262,6 +5275,9 @@
|
|
|
5262
5275
|
marker,
|
|
5263
5276
|
'close-icon': closeIcon,
|
|
5264
5277
|
'close-large': closeLarge,
|
|
5278
|
+
'nav-parent-icon': navParentIcon,
|
|
5279
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5280
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
5265
5281
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
5266
5282
|
'overlay-icon': overlayIcon,
|
|
5267
5283
|
'pagination-next': paginationNext,
|
|
@@ -5319,6 +5335,15 @@
|
|
|
5319
5335
|
} };
|
|
5320
5336
|
|
|
5321
5337
|
|
|
5338
|
+
const NavParentIcon = {
|
|
5339
|
+
extends: IconComponent,
|
|
5340
|
+
|
|
5341
|
+
beforeConnect() {
|
|
5342
|
+
const icon = this.$props.icon;
|
|
5343
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5344
|
+
} };
|
|
5345
|
+
|
|
5346
|
+
|
|
5322
5347
|
const Slidenav = {
|
|
5323
5348
|
extends: IconComponent,
|
|
5324
5349
|
|
|
@@ -5579,7 +5604,7 @@
|
|
|
5579
5604
|
|
|
5580
5605
|
|
|
5581
5606
|
connected() {
|
|
5582
|
-
const media = toMedia(this.media);
|
|
5607
|
+
const media = toMedia(this.media, this.$el);
|
|
5583
5608
|
this.matchMedia = true;
|
|
5584
5609
|
if (media) {
|
|
5585
5610
|
this.mediaObj = window.matchMedia(media);
|
|
@@ -5600,11 +5625,10 @@
|
|
|
5600
5625
|
} };
|
|
5601
5626
|
|
|
5602
5627
|
|
|
5603
|
-
function toMedia(value) {
|
|
5628
|
+
function toMedia(value, element) {
|
|
5604
5629
|
if (isString(value)) {
|
|
5605
5630
|
if (startsWith(value, '@')) {
|
|
5606
|
-
|
|
5607
|
-
value = toFloat(getCssVar(name));
|
|
5631
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5608
5632
|
} else if (isNaN(value)) {
|
|
5609
5633
|
return value;
|
|
5610
5634
|
}
|
|
@@ -5629,7 +5653,7 @@
|
|
|
5629
5653
|
|
|
5630
5654
|
computed: {
|
|
5631
5655
|
fill(_ref) {let { fill } = _ref;
|
|
5632
|
-
return fill ||
|
|
5656
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5633
5657
|
} },
|
|
5634
5658
|
|
|
5635
5659
|
|
|
@@ -5821,7 +5845,9 @@
|
|
|
5821
5845
|
align: String,
|
|
5822
5846
|
offset: Number,
|
|
5823
5847
|
boundary: Boolean,
|
|
5824
|
-
|
|
5848
|
+
target: Boolean,
|
|
5849
|
+
targetX: Boolean,
|
|
5850
|
+
targetY: Boolean,
|
|
5825
5851
|
clsDrop: String,
|
|
5826
5852
|
delayShow: Number,
|
|
5827
5853
|
delayHide: Number,
|
|
@@ -5838,9 +5864,12 @@
|
|
|
5838
5864
|
offset: undefined,
|
|
5839
5865
|
delayShow: undefined,
|
|
5840
5866
|
delayHide: undefined,
|
|
5841
|
-
|
|
5842
|
-
|
|
5867
|
+
flip: false,
|
|
5868
|
+
shift: true,
|
|
5843
5869
|
boundary: true,
|
|
5870
|
+
target: false,
|
|
5871
|
+
targetX: false,
|
|
5872
|
+
targetY: false,
|
|
5844
5873
|
dropbar: false,
|
|
5845
5874
|
dropbarAnchor: false,
|
|
5846
5875
|
duration: 200,
|
|
@@ -5875,7 +5904,7 @@
|
|
|
5875
5904
|
},
|
|
5876
5905
|
|
|
5877
5906
|
watch(dropbar) {
|
|
5878
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5907
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5879
5908
|
},
|
|
5880
5909
|
|
|
5881
5910
|
immediate: true },
|
|
@@ -5891,7 +5920,7 @@
|
|
|
5891
5920
|
|
|
5892
5921
|
if (this.dropContainer !== $el) {
|
|
5893
5922
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5894
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5923
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5895
5924
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5896
5925
|
dropdowns.push(el);
|
|
5897
5926
|
}
|
|
@@ -5908,8 +5937,7 @@
|
|
|
5908
5937
|
{
|
|
5909
5938
|
...this.$props,
|
|
5910
5939
|
boundary: this.boundary,
|
|
5911
|
-
pos: this.pos
|
|
5912
|
-
offset: this.dropbar || this.offset });
|
|
5940
|
+
pos: this.pos });
|
|
5913
5941
|
|
|
5914
5942
|
|
|
5915
5943
|
},
|
|
@@ -5954,8 +5982,8 @@
|
|
|
5954
5982
|
if (
|
|
5955
5983
|
active &&
|
|
5956
5984
|
includes(active.mode, 'hover') &&
|
|
5957
|
-
active.
|
|
5958
|
-
!within(active.
|
|
5985
|
+
active.targetEl &&
|
|
5986
|
+
!within(active.targetEl, current) &&
|
|
5959
5987
|
!active.isDelaying)
|
|
5960
5988
|
{
|
|
5961
5989
|
active.hide(false);
|
|
@@ -5977,7 +6005,7 @@
|
|
|
5977
6005
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5978
6006
|
e.preventDefault();
|
|
5979
6007
|
|
|
5980
|
-
if (!active || active.
|
|
6008
|
+
if (!active || active.targetEl !== current) {
|
|
5981
6009
|
current.click();
|
|
5982
6010
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5983
6011
|
focusFirstFocusableElement(target));});
|
|
@@ -6027,8 +6055,8 @@
|
|
|
6027
6055
|
}
|
|
6028
6056
|
}
|
|
6029
6057
|
|
|
6030
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
6031
|
-
active == null ? void 0 : (_active$
|
|
6058
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6059
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
6032
6060
|
}
|
|
6033
6061
|
|
|
6034
6062
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -6070,8 +6098,8 @@
|
|
|
6070
6098
|
return this.dropbar;
|
|
6071
6099
|
},
|
|
6072
6100
|
|
|
6073
|
-
handler(
|
|
6074
|
-
if (!
|
|
6101
|
+
handler(_ref9) {let { target } = _ref9;
|
|
6102
|
+
if (!this.isDropbarDrop(target)) {
|
|
6075
6103
|
return;
|
|
6076
6104
|
}
|
|
6077
6105
|
|
|
@@ -6079,7 +6107,7 @@
|
|
|
6079
6107
|
after(this.dropbarAnchor || this.$el, this.dropbar);
|
|
6080
6108
|
}
|
|
6081
6109
|
|
|
6082
|
-
addClass(
|
|
6110
|
+
addClass(target, this.clsDrop + "-dropbar");
|
|
6083
6111
|
} },
|
|
6084
6112
|
|
|
6085
6113
|
|
|
@@ -6094,19 +6122,24 @@
|
|
|
6094
6122
|
return this.dropbar;
|
|
6095
6123
|
},
|
|
6096
6124
|
|
|
6097
|
-
handler(
|
|
6098
|
-
if (!
|
|
6125
|
+
handler(_ref10) {let { target } = _ref10;
|
|
6126
|
+
if (!this.isDropbarDrop(target)) {
|
|
6099
6127
|
return;
|
|
6100
6128
|
}
|
|
6101
6129
|
|
|
6102
|
-
this._observer = observeResize(
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6130
|
+
this._observer = observeResize(target, () => {
|
|
6131
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6132
|
+
concat(target).
|
|
6133
|
+
map((el) => offset(el));
|
|
6134
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6135
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6136
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6137
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6138
|
+
this.transitionTo(
|
|
6139
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6140
|
+
target);
|
|
6109
6141
|
|
|
6142
|
+
});
|
|
6110
6143
|
} },
|
|
6111
6144
|
|
|
6112
6145
|
|
|
@@ -6121,13 +6154,13 @@
|
|
|
6121
6154
|
return this.dropbar;
|
|
6122
6155
|
},
|
|
6123
6156
|
|
|
6124
|
-
handler(e
|
|
6157
|
+
handler(e) {
|
|
6125
6158
|
const active = this.getActive();
|
|
6126
6159
|
|
|
6127
6160
|
if (
|
|
6128
6161
|
matches(this.dropbar, ':hover') &&
|
|
6129
|
-
(active == null ? void 0 : active.$el) ===
|
|
6130
|
-
!this.toggles.some((el) => active.
|
|
6162
|
+
(active == null ? void 0 : active.$el) === e.target &&
|
|
6163
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6131
6164
|
{
|
|
6132
6165
|
e.preventDefault();
|
|
6133
6166
|
}
|
|
@@ -6145,8 +6178,8 @@
|
|
|
6145
6178
|
return this.dropbar;
|
|
6146
6179
|
},
|
|
6147
6180
|
|
|
6148
|
-
handler(
|
|
6149
|
-
if (!
|
|
6181
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6182
|
+
if (!this.isDropbarDrop(target)) {
|
|
6150
6183
|
return;
|
|
6151
6184
|
}
|
|
6152
6185
|
|
|
@@ -6154,7 +6187,7 @@
|
|
|
6154
6187
|
|
|
6155
6188
|
const active = this.getActive();
|
|
6156
6189
|
|
|
6157
|
-
if (!active || (active == null ? void 0 : active.$el) ===
|
|
6190
|
+
if (!active || (active == null ? void 0 : active.$el) === target) {
|
|
6158
6191
|
this.transitionTo(0);
|
|
6159
6192
|
}
|
|
6160
6193
|
} }],
|
|
@@ -6163,7 +6196,7 @@
|
|
|
6163
6196
|
|
|
6164
6197
|
methods: {
|
|
6165
6198
|
getActive() {
|
|
6166
|
-
return active
|
|
6199
|
+
return includes(this.dropdowns, active == null ? void 0 : active.$el) && active;
|
|
6167
6200
|
},
|
|
6168
6201
|
|
|
6169
6202
|
transitionTo(newHeight, el) {
|
|
@@ -6193,13 +6226,17 @@
|
|
|
6193
6226
|
|
|
6194
6227
|
getDropdown(el) {
|
|
6195
6228
|
return this.$getComponent(el, 'drop') || this.$getComponent(el, 'dropdown');
|
|
6229
|
+
},
|
|
6230
|
+
|
|
6231
|
+
isDropbarDrop(el) {
|
|
6232
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6196
6233
|
} } };
|
|
6197
6234
|
|
|
6198
6235
|
|
|
6199
6236
|
|
|
6200
6237
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6201
6238
|
const { current, keyCode } = e;
|
|
6202
|
-
const target = (active == null ? void 0 : active.
|
|
6239
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6203
6240
|
const i = toggles.indexOf(target);
|
|
6204
6241
|
|
|
6205
6242
|
// Left
|
|
@@ -6567,6 +6604,14 @@
|
|
|
6567
6604
|
offset: 0 },
|
|
6568
6605
|
|
|
6569
6606
|
|
|
6607
|
+
connected() {
|
|
6608
|
+
registerClick(this);
|
|
6609
|
+
},
|
|
6610
|
+
|
|
6611
|
+
disconnected() {
|
|
6612
|
+
unregisterClick(this);
|
|
6613
|
+
},
|
|
6614
|
+
|
|
6570
6615
|
methods: {
|
|
6571
6616
|
async scrollTo(el) {
|
|
6572
6617
|
el = el && $(el) || document.body;
|
|
@@ -6575,20 +6620,39 @@
|
|
|
6575
6620
|
await scrollIntoView(el, { offset: this.offset });
|
|
6576
6621
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6577
6622
|
}
|
|
6578
|
-
} }
|
|
6623
|
+
} } };
|
|
6579
6624
|
|
|
6580
6625
|
|
|
6581
|
-
events: {
|
|
6582
|
-
click(e) {
|
|
6583
|
-
if (e.defaultPrevented) {
|
|
6584
|
-
return;
|
|
6585
|
-
}
|
|
6586
6626
|
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6627
|
+
const components$2 = new Set();
|
|
6628
|
+
function registerClick(cmp) {
|
|
6629
|
+
if (!components$2.size) {
|
|
6630
|
+
on(document, 'click', clickHandler);
|
|
6631
|
+
}
|
|
6632
|
+
|
|
6633
|
+
components$2.add(cmp);
|
|
6634
|
+
}
|
|
6635
|
+
|
|
6636
|
+
function unregisterClick(cmp) {
|
|
6637
|
+
components$2.delete(cmp);
|
|
6638
|
+
|
|
6639
|
+
if (!components$2.length) {
|
|
6640
|
+
off(document, 'click', clickHandler);
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6590
6643
|
|
|
6644
|
+
function clickHandler(e) {
|
|
6645
|
+
if (e.defaultPrevented) {
|
|
6646
|
+
return;
|
|
6647
|
+
}
|
|
6591
6648
|
|
|
6649
|
+
for (const component of components$2) {
|
|
6650
|
+
if (within(e.target, component.$el)) {
|
|
6651
|
+
e.preventDefault();
|
|
6652
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6653
|
+
}
|
|
6654
|
+
}
|
|
6655
|
+
}
|
|
6592
6656
|
|
|
6593
6657
|
function getTargetElement(el) {
|
|
6594
6658
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -7551,7 +7615,7 @@
|
|
|
7551
7615
|
|
|
7552
7616
|
|
|
7553
7617
|
{
|
|
7554
|
-
name: '
|
|
7618
|
+
name: 'hide show',
|
|
7555
7619
|
|
|
7556
7620
|
self: true,
|
|
7557
7621
|
|
|
@@ -7559,10 +7623,8 @@
|
|
|
7559
7623
|
return this.target;
|
|
7560
7624
|
},
|
|
7561
7625
|
|
|
7562
|
-
handler(
|
|
7563
|
-
|
|
7564
|
-
this.updateAria(toggled);
|
|
7565
|
-
}
|
|
7626
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7627
|
+
this.updateAria(type === 'show');
|
|
7566
7628
|
} },
|
|
7567
7629
|
|
|
7568
7630
|
|
|
@@ -7657,10 +7719,12 @@
|
|
|
7657
7719
|
Video: Video,
|
|
7658
7720
|
Close: Close,
|
|
7659
7721
|
Spinner: Spinner,
|
|
7722
|
+
NavParentIcon: NavParentIcon,
|
|
7660
7723
|
SlidenavNext: Slidenav,
|
|
7661
7724
|
SlidenavPrevious: Slidenav,
|
|
7662
7725
|
SearchIcon: Search,
|
|
7663
7726
|
Marker: IconComponent,
|
|
7727
|
+
NavbarParentIcon: IconComponent,
|
|
7664
7728
|
NavbarToggleIcon: IconComponent,
|
|
7665
7729
|
OverlayIcon: IconComponent,
|
|
7666
7730
|
PaginationNext: IconComponent,
|
|
@@ -8150,7 +8214,7 @@
|
|
|
8150
8214
|
|
|
8151
8215
|
},
|
|
8152
8216
|
|
|
8153
|
-
setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8217
|
+
async setState(state, animate) {if (animate === void 0) {animate = true;}
|
|
8154
8218
|
state = { filter: { '': '' }, sort: [], ...state };
|
|
8155
8219
|
|
|
8156
8220
|
trigger(this.$el, 'beforeFilter', [this, state]);
|
|
@@ -8159,15 +8223,17 @@
|
|
|
8159
8223
|
toggleClass(el, this.cls, !!matchFilter(el, this.attrItem, state)));
|
|
8160
8224
|
|
|
8161
8225
|
|
|
8162
|
-
Promise.all(
|
|
8226
|
+
await Promise.all(
|
|
8163
8227
|
$$(this.target, this.$el).map((target) => {
|
|
8164
8228
|
const filterFn = () => {
|
|
8165
8229
|
applyState(state, target, children(target));
|
|
8166
8230
|
this.$update(this.$el);
|
|
8167
8231
|
};
|
|
8168
8232
|
return animate ? this.animate(filterFn, target) : filterFn();
|
|
8169
|
-
}))
|
|
8170
|
-
|
|
8233
|
+
}));
|
|
8234
|
+
|
|
8235
|
+
|
|
8236
|
+
trigger(this.$el, 'afterFilter', [this]);
|
|
8171
8237
|
},
|
|
8172
8238
|
|
|
8173
8239
|
updateState() {
|