uikit 3.14.4-dev.dbd727038 → 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 +36 -18
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +321 -112
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +321 -112
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +341 -116
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +341 -116
- 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 +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +96 -131
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +96 -131
- 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 +102 -139
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +501 -472
- 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 +501 -472
- package/dist/js/uikit.min.js +17 -1
- package/package.json +1 -1
- package/src/images/{backgrounds/nav-parent-close.svg → components/nav-parent-icon-large.svg} +0 -0
- package/src/images/components/nav-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/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 +4 -2
- package/src/js/core/icon.js +14 -0
- package/src/js/core/index.js +1 -0
- package/src/js/core/leader.js +2 -2
- package/src/js/core/navbar.js +30 -45
- 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 +24 -26
- package/src/js/mixin/style.js +11 -0
- package/src/js/mixin/togglable.js +88 -124
- 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 +11 -19
- package/src/less/components/leader.less +1 -1
- package/src/less/components/nav.less +218 -59
- package/src/less/components/navbar.less +17 -52
- 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 +1 -5
- 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 +11 -19
- package/src/scss/components/leader.scss +1 -1
- package/src/scss/components/nav.scss +167 -47
- package/src/scss/components/navbar.scss +17 -52
- package/src/scss/components/utility.scss +8 -1
- package/src/scss/mixins-theme.scss +80 -21
- package/src/scss/mixins.scss +77 -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 +1 -5
- package/src/scss/variables-theme.scss +51 -16
- package/src/scss/variables.scss +40 -14
- package/tests/accordion.html +2 -2
- package/tests/alert.html +2 -2
- package/tests/countdown.html +1 -1
- package/tests/drop.html +446 -416
- package/tests/dropbar.html +458 -0
- package/tests/dropdown.html +8 -470
- 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 +129 -20
- package/tests/navbar.html +97 -227
- 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-open.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);
|
|
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;
|
|
2008
1964
|
|
|
2009
|
-
|
|
2010
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2011
|
-
if (flip !== true && !includes(flip, dir)) {
|
|
2012
|
-
continue;
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
const willFlip =
|
|
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
|
+
|
|
2110
|
+
}
|
|
2111
|
+
|
|
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;
|
|
2138
2125
|
}
|
|
2139
2126
|
|
|
2140
|
-
function
|
|
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,122 +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
3207
|
|
|
3260
3208
|
css(el, {
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3209
|
+
padding: 0,
|
|
3210
|
+
border: 0,
|
|
3211
|
+
[marginStartProp]: 0,
|
|
3212
|
+
width: dim.width,
|
|
3213
|
+
height: dim.height,
|
|
3214
|
+
overflow: 'hidden',
|
|
3215
|
+
[dimProp]: currentDim });
|
|
3265
3216
|
|
|
3266
3217
|
|
|
3267
|
-
|
|
3268
|
-
show ?
|
|
3269
|
-
|
|
3270
|
-
el,
|
|
3271
|
-
{
|
|
3272
|
-
clipPath: "polygon(0 0,100% 0,100% 100%,0 100%)",
|
|
3273
|
-
marginLeft: 0 },
|
|
3274
|
-
|
|
3275
|
-
duration * (1 - percent / 100),
|
|
3276
|
-
transition) :
|
|
3218
|
+
const percent = currentDim / endDim;
|
|
3219
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3220
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3277
3221
|
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3222
|
+
if (end) {
|
|
3223
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3224
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3225
|
+
}
|
|
3282
3226
|
|
|
3227
|
+
if (!end ^ mode === 'reveal') {
|
|
3228
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3229
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3230
|
+
}
|
|
3283
3231
|
|
|
3284
|
-
|
|
3232
|
+
try {
|
|
3233
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3234
|
+
} finally {
|
|
3235
|
+
css(el, prevProps);
|
|
3236
|
+
unwrap(wrapper.firstChild);
|
|
3285
3237
|
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
css(scrollElement, 'overflowX', '');
|
|
3291
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3292
|
-
});
|
|
3238
|
+
if (!show) {
|
|
3239
|
+
_toggle(el, false);
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3293
3242
|
};
|
|
3294
3243
|
}
|
|
3295
3244
|
|
|
@@ -3314,6 +3263,7 @@
|
|
|
3314
3263
|
mixins: [Class, Lazyload, Togglable],
|
|
3315
3264
|
|
|
3316
3265
|
props: {
|
|
3266
|
+
animation: Boolean,
|
|
3317
3267
|
targets: String,
|
|
3318
3268
|
active: null,
|
|
3319
3269
|
collapsible: Boolean,
|
|
@@ -3326,7 +3276,7 @@
|
|
|
3326
3276
|
data: {
|
|
3327
3277
|
targets: '> *',
|
|
3328
3278
|
active: false,
|
|
3329
|
-
animation:
|
|
3279
|
+
animation: true,
|
|
3330
3280
|
collapsible: true,
|
|
3331
3281
|
multiple: false,
|
|
3332
3282
|
clsOpen: 'uk-open',
|
|
@@ -3372,7 +3322,7 @@
|
|
|
3372
3322
|
hide(
|
|
3373
3323
|
el,
|
|
3374
3324
|
!hasClass(
|
|
3375
|
-
this.items.find((item) =>
|
|
3325
|
+
this.items.find((item) => within(el, item)),
|
|
3376
3326
|
this.clsOpen));
|
|
3377
3327
|
|
|
3378
3328
|
|
|
@@ -3424,23 +3374,15 @@
|
|
|
3424
3374
|
toggleClass(el, this.clsOpen, show);
|
|
3425
3375
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3426
3376
|
|
|
3427
|
-
const content = $(
|
|
3377
|
+
const content = $(this.content, el);
|
|
3428
3378
|
|
|
3429
|
-
if (animate === false || !this.
|
|
3379
|
+
if (animate === false || !this.animation) {
|
|
3380
|
+
content.hidden = !show;
|
|
3430
3381
|
hide(content, !show);
|
|
3431
3382
|
return;
|
|
3432
3383
|
}
|
|
3433
3384
|
|
|
3434
|
-
|
|
3435
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3436
|
-
}
|
|
3437
|
-
|
|
3438
|
-
hide(content, false);
|
|
3439
|
-
await slide$1(this)(el._wrapper, show);
|
|
3440
|
-
hide(content, !show);
|
|
3441
|
-
|
|
3442
|
-
delete el._wrapper;
|
|
3443
|
-
unwrap(content);
|
|
3385
|
+
await toggleTransition(this)(content, show);
|
|
3444
3386
|
|
|
3445
3387
|
if (show) {
|
|
3446
3388
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3466,18 +3408,17 @@
|
|
|
3466
3408
|
args: 'animation',
|
|
3467
3409
|
|
|
3468
3410
|
props: {
|
|
3411
|
+
animation: Boolean,
|
|
3469
3412
|
close: String },
|
|
3470
3413
|
|
|
3471
3414
|
|
|
3472
3415
|
data: {
|
|
3473
|
-
animation:
|
|
3416
|
+
animation: true,
|
|
3474
3417
|
selClose: '.uk-alert-close',
|
|
3475
|
-
duration: 150,
|
|
3476
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3418
|
+
duration: 150 },
|
|
3477
3419
|
|
|
3478
3420
|
|
|
3479
|
-
events:
|
|
3480
|
-
{
|
|
3421
|
+
events: {
|
|
3481
3422
|
name: 'click',
|
|
3482
3423
|
|
|
3483
3424
|
delegate() {
|
|
@@ -3487,16 +3428,39 @@
|
|
|
3487
3428
|
handler(e) {
|
|
3488
3429
|
e.preventDefault();
|
|
3489
3430
|
this.close();
|
|
3490
|
-
} }
|
|
3491
|
-
|
|
3431
|
+
} },
|
|
3492
3432
|
|
|
3493
3433
|
|
|
3494
3434
|
methods: {
|
|
3495
3435
|
async close() {
|
|
3496
|
-
await this.toggleElement(this.$el);
|
|
3436
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3497
3437
|
this.$destroy(true);
|
|
3498
3438
|
} } };
|
|
3499
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
|
+
|
|
3500
3464
|
var Video = {
|
|
3501
3465
|
args: 'autoplay',
|
|
3502
3466
|
|
|
@@ -3645,13 +3609,17 @@
|
|
|
3645
3609
|
props: {
|
|
3646
3610
|
pos: String,
|
|
3647
3611
|
offset: null,
|
|
3648
|
-
flip: Boolean
|
|
3612
|
+
flip: Boolean,
|
|
3613
|
+
shift: Boolean,
|
|
3614
|
+
inset: Boolean },
|
|
3649
3615
|
|
|
3650
3616
|
|
|
3651
3617
|
data: {
|
|
3652
3618
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3619
|
+
offset: false,
|
|
3653
3620
|
flip: true,
|
|
3654
|
-
|
|
3621
|
+
shift: true,
|
|
3622
|
+
inset: false },
|
|
3655
3623
|
|
|
3656
3624
|
|
|
3657
3625
|
connected() {
|
|
@@ -3663,17 +3631,19 @@
|
|
|
3663
3631
|
methods: {
|
|
3664
3632
|
positionAt(element, target, boundary) {
|
|
3665
3633
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3634
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3666
3635
|
|
|
3667
3636
|
const attach = {
|
|
3668
|
-
element: [flipPosition(this.dir), this.align],
|
|
3637
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3669
3638
|
target: [this.dir, this.align] };
|
|
3670
3639
|
|
|
3671
3640
|
|
|
3672
3641
|
if (this.axis === 'y') {
|
|
3673
3642
|
for (const prop in attach) {
|
|
3674
|
-
attach[prop]
|
|
3643
|
+
attach[prop].reverse();
|
|
3675
3644
|
}
|
|
3676
|
-
offset
|
|
3645
|
+
offset.reverse();
|
|
3646
|
+
placement.reverse();
|
|
3677
3647
|
}
|
|
3678
3648
|
|
|
3679
3649
|
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
@@ -3683,21 +3653,13 @@
|
|
|
3683
3653
|
const elDim = dimensions$1(element);
|
|
3684
3654
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3685
3655
|
|
|
3686
|
-
|
|
3687
|
-
element,
|
|
3688
|
-
target,
|
|
3689
|
-
{
|
|
3656
|
+
positionAt(element, target, {
|
|
3690
3657
|
attach,
|
|
3691
3658
|
offset,
|
|
3692
3659
|
boundary,
|
|
3693
|
-
|
|
3694
|
-
viewportOffset: this.getViewportOffset(element) }
|
|
3695
|
-
|
|
3696
|
-
|
|
3660
|
+
placement,
|
|
3661
|
+
viewportOffset: this.getViewportOffset(element) });
|
|
3697
3662
|
|
|
3698
|
-
trigger(element, 'beforeposition', args);
|
|
3699
|
-
|
|
3700
|
-
positionAt(...args);
|
|
3701
3663
|
|
|
3702
3664
|
// Restore scroll position
|
|
3703
3665
|
scrollElement.scrollTop = scrollTop;
|
|
@@ -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,6 @@
|
|
|
4976
4982
|
0);
|
|
4977
4983
|
|
|
4978
4984
|
} else {
|
|
4979
|
-
const { body, scrollingElement } = document;
|
|
4980
4985
|
const isScrollingElement =
|
|
4981
4986
|
scrollingElement === scrollElement || body === scrollElement;
|
|
4982
4987
|
|
|
@@ -5232,9 +5237,13 @@
|
|
|
5232
5237
|
|
|
5233
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>";
|
|
5234
5239
|
|
|
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
|
+
|
|
5235
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>";
|
|
5236
5245
|
|
|
5237
|
-
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"
|
|
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>";
|
|
5238
5247
|
|
|
5239
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>";
|
|
5240
5249
|
|
|
@@ -5266,6 +5275,8 @@
|
|
|
5266
5275
|
marker,
|
|
5267
5276
|
'close-icon': closeIcon,
|
|
5268
5277
|
'close-large': closeLarge,
|
|
5278
|
+
'nav-parent-icon': navParentIcon,
|
|
5279
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5269
5280
|
'navbar-parent-icon': navbarParentIcon,
|
|
5270
5281
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
5271
5282
|
'overlay-icon': overlayIcon,
|
|
@@ -5324,6 +5335,15 @@
|
|
|
5324
5335
|
} };
|
|
5325
5336
|
|
|
5326
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
|
+
|
|
5327
5347
|
const Slidenav = {
|
|
5328
5348
|
extends: IconComponent,
|
|
5329
5349
|
|
|
@@ -5584,7 +5604,7 @@
|
|
|
5584
5604
|
|
|
5585
5605
|
|
|
5586
5606
|
connected() {
|
|
5587
|
-
const media = toMedia(this.media);
|
|
5607
|
+
const media = toMedia(this.media, this.$el);
|
|
5588
5608
|
this.matchMedia = true;
|
|
5589
5609
|
if (media) {
|
|
5590
5610
|
this.mediaObj = window.matchMedia(media);
|
|
@@ -5605,11 +5625,10 @@
|
|
|
5605
5625
|
} };
|
|
5606
5626
|
|
|
5607
5627
|
|
|
5608
|
-
function toMedia(value) {
|
|
5628
|
+
function toMedia(value, element) {
|
|
5609
5629
|
if (isString(value)) {
|
|
5610
5630
|
if (startsWith(value, '@')) {
|
|
5611
|
-
|
|
5612
|
-
value = toFloat(getCssVar(name));
|
|
5631
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5613
5632
|
} else if (isNaN(value)) {
|
|
5614
5633
|
return value;
|
|
5615
5634
|
}
|
|
@@ -5634,7 +5653,7 @@
|
|
|
5634
5653
|
|
|
5635
5654
|
computed: {
|
|
5636
5655
|
fill(_ref) {let { fill } = _ref;
|
|
5637
|
-
return fill ||
|
|
5656
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5638
5657
|
} },
|
|
5639
5658
|
|
|
5640
5659
|
|
|
@@ -5826,7 +5845,9 @@
|
|
|
5826
5845
|
align: String,
|
|
5827
5846
|
offset: Number,
|
|
5828
5847
|
boundary: Boolean,
|
|
5829
|
-
|
|
5848
|
+
target: Boolean,
|
|
5849
|
+
targetX: Boolean,
|
|
5850
|
+
targetY: Boolean,
|
|
5830
5851
|
clsDrop: String,
|
|
5831
5852
|
delayShow: Number,
|
|
5832
5853
|
delayHide: Number,
|
|
@@ -5843,9 +5864,12 @@
|
|
|
5843
5864
|
offset: undefined,
|
|
5844
5865
|
delayShow: undefined,
|
|
5845
5866
|
delayHide: undefined,
|
|
5846
|
-
|
|
5847
|
-
|
|
5867
|
+
flip: false,
|
|
5868
|
+
shift: true,
|
|
5848
5869
|
boundary: true,
|
|
5870
|
+
target: false,
|
|
5871
|
+
targetX: false,
|
|
5872
|
+
targetY: false,
|
|
5849
5873
|
dropbar: false,
|
|
5850
5874
|
dropbarAnchor: false,
|
|
5851
5875
|
duration: 200,
|
|
@@ -5880,7 +5904,7 @@
|
|
|
5880
5904
|
},
|
|
5881
5905
|
|
|
5882
5906
|
watch(dropbar) {
|
|
5883
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5907
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5884
5908
|
},
|
|
5885
5909
|
|
|
5886
5910
|
immediate: true },
|
|
@@ -5896,7 +5920,7 @@
|
|
|
5896
5920
|
|
|
5897
5921
|
if (this.dropContainer !== $el) {
|
|
5898
5922
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5899
|
-
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;
|
|
5900
5924
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5901
5925
|
dropdowns.push(el);
|
|
5902
5926
|
}
|
|
@@ -5958,8 +5982,8 @@
|
|
|
5958
5982
|
if (
|
|
5959
5983
|
active &&
|
|
5960
5984
|
includes(active.mode, 'hover') &&
|
|
5961
|
-
active.
|
|
5962
|
-
!within(active.
|
|
5985
|
+
active.targetEl &&
|
|
5986
|
+
!within(active.targetEl, current) &&
|
|
5963
5987
|
!active.isDelaying)
|
|
5964
5988
|
{
|
|
5965
5989
|
active.hide(false);
|
|
@@ -5981,7 +6005,7 @@
|
|
|
5981
6005
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5982
6006
|
e.preventDefault();
|
|
5983
6007
|
|
|
5984
|
-
if (!active || active.
|
|
6008
|
+
if (!active || active.targetEl !== current) {
|
|
5985
6009
|
current.click();
|
|
5986
6010
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5987
6011
|
focusFirstFocusableElement(target));});
|
|
@@ -6031,8 +6055,8 @@
|
|
|
6031
6055
|
}
|
|
6032
6056
|
}
|
|
6033
6057
|
|
|
6034
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
6035
|
-
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();
|
|
6036
6060
|
}
|
|
6037
6061
|
|
|
6038
6062
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -6103,39 +6127,19 @@
|
|
|
6103
6127
|
return;
|
|
6104
6128
|
}
|
|
6105
6129
|
|
|
6106
|
-
this._observer = observeResize(target, () =>
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
{
|
|
6118
|
-
name: 'beforeposition',
|
|
6119
|
-
|
|
6120
|
-
el() {
|
|
6121
|
-
return this.dropContainer;
|
|
6122
|
-
},
|
|
6123
|
-
|
|
6124
|
-
filter() {
|
|
6125
|
-
return this.dropbar;
|
|
6126
|
-
},
|
|
6127
|
-
|
|
6128
|
-
handler(e, element, target, options) {
|
|
6129
|
-
if (!this.isDropbarDrop(element)) {
|
|
6130
|
-
return;
|
|
6131
|
-
}
|
|
6132
|
-
|
|
6133
|
-
const dropbarOffset = offset(this.dropbar);
|
|
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);
|
|
6134
6141
|
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
options.offset[1] = dropbarOffset.top - offset(target).bottom;
|
|
6138
|
-
options.viewportOffset += dropbarOffset.left;
|
|
6142
|
+
});
|
|
6139
6143
|
} },
|
|
6140
6144
|
|
|
6141
6145
|
|
|
@@ -6156,7 +6160,7 @@
|
|
|
6156
6160
|
if (
|
|
6157
6161
|
matches(this.dropbar, ':hover') &&
|
|
6158
6162
|
(active == null ? void 0 : active.$el) === e.target &&
|
|
6159
|
-
!this.toggles.some((el) => active.
|
|
6163
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6160
6164
|
{
|
|
6161
6165
|
e.preventDefault();
|
|
6162
6166
|
}
|
|
@@ -6174,7 +6178,7 @@
|
|
|
6174
6178
|
return this.dropbar;
|
|
6175
6179
|
},
|
|
6176
6180
|
|
|
6177
|
-
handler(
|
|
6181
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6178
6182
|
if (!this.isDropbarDrop(target)) {
|
|
6179
6183
|
return;
|
|
6180
6184
|
}
|
|
@@ -6192,7 +6196,7 @@
|
|
|
6192
6196
|
|
|
6193
6197
|
methods: {
|
|
6194
6198
|
getActive() {
|
|
6195
|
-
return active
|
|
6199
|
+
return includes(this.dropdowns, active == null ? void 0 : active.$el) && active;
|
|
6196
6200
|
},
|
|
6197
6201
|
|
|
6198
6202
|
transitionTo(newHeight, el) {
|
|
@@ -6225,15 +6229,14 @@
|
|
|
6225
6229
|
},
|
|
6226
6230
|
|
|
6227
6231
|
isDropbarDrop(el) {
|
|
6228
|
-
|
|
6229
|
-
return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
|
|
6232
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6230
6233
|
} } };
|
|
6231
6234
|
|
|
6232
6235
|
|
|
6233
6236
|
|
|
6234
6237
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6235
6238
|
const { current, keyCode } = e;
|
|
6236
|
-
const target = (active == null ? void 0 : active.
|
|
6239
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6237
6240
|
const i = toggles.indexOf(target);
|
|
6238
6241
|
|
|
6239
6242
|
// Left
|
|
@@ -6601,6 +6604,14 @@
|
|
|
6601
6604
|
offset: 0 },
|
|
6602
6605
|
|
|
6603
6606
|
|
|
6607
|
+
connected() {
|
|
6608
|
+
registerClick(this);
|
|
6609
|
+
},
|
|
6610
|
+
|
|
6611
|
+
disconnected() {
|
|
6612
|
+
unregisterClick(this);
|
|
6613
|
+
},
|
|
6614
|
+
|
|
6604
6615
|
methods: {
|
|
6605
6616
|
async scrollTo(el) {
|
|
6606
6617
|
el = el && $(el) || document.body;
|
|
@@ -6609,20 +6620,39 @@
|
|
|
6609
6620
|
await scrollIntoView(el, { offset: this.offset });
|
|
6610
6621
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6611
6622
|
}
|
|
6612
|
-
} }
|
|
6623
|
+
} } };
|
|
6613
6624
|
|
|
6614
6625
|
|
|
6615
|
-
events: {
|
|
6616
|
-
click(e) {
|
|
6617
|
-
if (e.defaultPrevented) {
|
|
6618
|
-
return;
|
|
6619
|
-
}
|
|
6620
6626
|
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
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
|
+
}
|
|
6624
6635
|
|
|
6636
|
+
function unregisterClick(cmp) {
|
|
6637
|
+
components$2.delete(cmp);
|
|
6625
6638
|
|
|
6639
|
+
if (!components$2.length) {
|
|
6640
|
+
off(document, 'click', clickHandler);
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6643
|
+
|
|
6644
|
+
function clickHandler(e) {
|
|
6645
|
+
if (e.defaultPrevented) {
|
|
6646
|
+
return;
|
|
6647
|
+
}
|
|
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
|
+
}
|
|
6626
6656
|
|
|
6627
6657
|
function getTargetElement(el) {
|
|
6628
6658
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -7585,7 +7615,7 @@
|
|
|
7585
7615
|
|
|
7586
7616
|
|
|
7587
7617
|
{
|
|
7588
|
-
name: '
|
|
7618
|
+
name: 'hide show',
|
|
7589
7619
|
|
|
7590
7620
|
self: true,
|
|
7591
7621
|
|
|
@@ -7593,10 +7623,8 @@
|
|
|
7593
7623
|
return this.target;
|
|
7594
7624
|
},
|
|
7595
7625
|
|
|
7596
|
-
handler(
|
|
7597
|
-
|
|
7598
|
-
this.updateAria(toggled);
|
|
7599
|
-
}
|
|
7626
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7627
|
+
this.updateAria(type === 'show');
|
|
7600
7628
|
} },
|
|
7601
7629
|
|
|
7602
7630
|
|
|
@@ -7691,6 +7719,7 @@
|
|
|
7691
7719
|
Video: Video,
|
|
7692
7720
|
Close: Close,
|
|
7693
7721
|
Spinner: Spinner,
|
|
7722
|
+
NavParentIcon: NavParentIcon,
|
|
7694
7723
|
SlidenavNext: Slidenav,
|
|
7695
7724
|
SlidenavPrevious: Slidenav,
|
|
7696
7725
|
SearchIcon: Search,
|