uikit 3.14.4-dev.4bd89c5ca → 3.14.4-dev.6002e7046
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 -18
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +349 -160
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +349 -160
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +372 -190
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +372 -190
- 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 +4 -2
- 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 +527 -486
- 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 +530 -487
- package/dist/js/uikit.min.js +17 -1
- package/package.json +11 -11
- package/src/images/{backgrounds/nav-parent-close.svg → components/nav-parent-icon-large.svg} +0 -0
- package/src/images/{backgrounds/navbar-parent-close.svg → components/nav-parent-icon.svg} +0 -0
- package/src/images/{backgrounds/navbar-parent-open.svg → components/navbar-parent-icon.svg} +1 -1
- package/src/images/components/navbar-toggle-icon.svg +25 -3
- package/src/js/api/hooks.js +5 -1
- package/src/js/api/state.js +2 -2
- package/src/js/components/notification.js +3 -1
- 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 +16 -0
- package/src/js/core/index.js +2 -0
- package/src/js/core/leader.js +2 -2
- package/src/js/core/navbar.js +30 -45
- package/src/js/core/offcanvas.js +8 -4
- 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 +9 -7
- package/src/js/util/class.js +3 -1
- package/src/js/util/filter.js +3 -7
- package/src/js/util/position.js +115 -114
- 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 +126 -0
- package/src/less/components/dropdown.less +11 -19
- package/src/less/components/leader.less +1 -1
- package/src/less/components/nav.less +219 -58
- package/src/less/components/navbar.less +49 -81
- 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 +5 -44
- package/src/scss/components/_import.scss +1 -0
- package/src/scss/components/drop.scss +1 -18
- package/src/scss/components/dropbar.scss +126 -0
- package/src/scss/components/dropdown.scss +11 -19
- package/src/scss/components/leader.scss +1 -1
- package/src/scss/components/nav.scss +168 -46
- package/src/scss/components/navbar.scss +49 -69
- package/src/scss/components/utility.scss +8 -1
- package/src/scss/mixins-theme.scss +83 -61
- package/src/scss/mixins.scss +79 -29
- 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 -16
- package/src/scss/variables-theme.scss +62 -26
- package/src/scss/variables.scss +50 -21
- 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 +117 -75
- package/tests/navbar.html +129 -249
- 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-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.6002e7046 | 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) =>
|
|
@@ -963,16 +952,17 @@
|
|
|
963
952
|
|
|
964
953
|
}
|
|
965
954
|
|
|
966
|
-
const
|
|
955
|
+
const inProgressRe = new RegExp(animationPrefix + "(enter|leave)");
|
|
956
|
+
|
|
967
957
|
const Animation = {
|
|
968
|
-
in: animate$
|
|
958
|
+
in: animate$2,
|
|
969
959
|
|
|
970
960
|
out(element, animation, duration, origin) {
|
|
971
|
-
return animate$
|
|
961
|
+
return animate$2(element, animation, duration, origin, true);
|
|
972
962
|
},
|
|
973
963
|
|
|
974
964
|
inProgress(element) {
|
|
975
|
-
return
|
|
965
|
+
return inProgressRe.test(attr(element, 'class'));
|
|
976
966
|
},
|
|
977
967
|
|
|
978
968
|
cancel(element) {
|
|
@@ -1899,12 +1889,10 @@
|
|
|
1899
1889
|
function offsetViewport(scrollElement) {
|
|
1900
1890
|
const window = toWindow(scrollElement);
|
|
1901
1891
|
const {
|
|
1902
|
-
document: {
|
|
1892
|
+
document: { documentElement } } =
|
|
1903
1893
|
window;
|
|
1904
1894
|
let viewportElement =
|
|
1905
|
-
scrollElement === scrollingElement(scrollElement)
|
|
1906
|
-
window :
|
|
1907
|
-
scrollElement;
|
|
1895
|
+
scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1908
1896
|
|
|
1909
1897
|
const { visualViewport } = window;
|
|
1910
1898
|
if (isWindow(viewportElement) && visualViewport) {
|
|
@@ -1923,7 +1911,7 @@
|
|
|
1923
1911
|
// iOS 12 returns <body> as scrollingElement
|
|
1924
1912
|
viewportElement = documentElement;
|
|
1925
1913
|
} else {
|
|
1926
|
-
rect[start] += toFloat(css(viewportElement, "border" +
|
|
1914
|
+
rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
|
|
1927
1915
|
}
|
|
1928
1916
|
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1929
1917
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -1948,127 +1936,63 @@
|
|
|
1948
1936
|
...options.attach },
|
|
1949
1937
|
|
|
1950
1938
|
offset: [0, 0],
|
|
1939
|
+
placement: [],
|
|
1951
1940
|
...options };
|
|
1952
1941
|
|
|
1953
1942
|
|
|
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];
|
|
1943
|
+
if (!isArray(target)) {
|
|
1944
|
+
target = [target, target];
|
|
1981
1945
|
}
|
|
1982
|
-
return position;
|
|
1983
|
-
}
|
|
1984
1946
|
|
|
1985
|
-
|
|
1986
|
-
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
1947
|
+
offset(element, getPosition(element, target, options));
|
|
1987
1948
|
}
|
|
1988
1949
|
|
|
1989
|
-
function
|
|
1950
|
+
function getPosition(element, target, options) {
|
|
1990
1951
|
const position = attachTo(element, target, options);
|
|
1991
|
-
const targetDim = offset(target);
|
|
1992
1952
|
|
|
1993
1953
|
let {
|
|
1994
|
-
flip,
|
|
1995
1954
|
attach: { element: elAttach, target: targetAttach },
|
|
1996
1955
|
offset: elOffset,
|
|
1997
1956
|
boundary,
|
|
1998
|
-
|
|
1999
|
-
|
|
1957
|
+
viewportOffset,
|
|
1958
|
+
placement } =
|
|
2000
1959
|
options;
|
|
2001
1960
|
|
|
2002
|
-
let
|
|
2003
|
-
|
|
2004
|
-
viewports =
|
|
2005
|
-
|
|
2006
|
-
const [scrollElement] = viewports;
|
|
2007
|
-
viewports.push(viewport);
|
|
1961
|
+
let offsetPosition = position;
|
|
1962
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
1963
|
+
let viewports = scrollParents(target[i]);
|
|
1964
|
+
const scrollArea = getScrollArea(viewports[0], viewportOffset, i);
|
|
2008
1965
|
|
|
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));
|
|
1966
|
+
let viewport = getIntersectionArea(...viewports.map(offsetViewport));
|
|
2019
1967
|
|
|
2020
1968
|
if (viewportOffset) {
|
|
2021
1969
|
viewport[start] += viewportOffset;
|
|
2022
1970
|
viewport[end] -= viewportOffset;
|
|
2023
1971
|
}
|
|
2024
1972
|
|
|
2025
|
-
if (boundary
|
|
1973
|
+
if (boundary) {
|
|
2026
1974
|
viewport = getIntersectionArea(viewport, offset(boundary));
|
|
2027
1975
|
}
|
|
2028
1976
|
|
|
2029
|
-
|
|
2030
|
-
const isInEndBoundary = position[end] <= viewport[end];
|
|
2031
|
-
|
|
2032
|
-
if (isInStartBoundary && isInEndBoundary) {
|
|
1977
|
+
if (isWithin(position, viewport, i)) {
|
|
2033
1978
|
continue;
|
|
2034
1979
|
}
|
|
2035
1980
|
|
|
2036
|
-
let offsetBy;
|
|
1981
|
+
let offsetBy = 0;
|
|
2037
1982
|
|
|
2038
1983
|
// Flip
|
|
2039
|
-
if (
|
|
1984
|
+
if (placement[i] === 'flip') {
|
|
2040
1985
|
if (
|
|
2041
|
-
|
|
2042
|
-
|
|
1986
|
+
targetAttach[i] === end && position[end] <= viewport[end] ||
|
|
1987
|
+
targetAttach[i] === start && position[start] >= viewport[start])
|
|
2043
1988
|
{
|
|
2044
1989
|
continue;
|
|
2045
1990
|
}
|
|
2046
1991
|
|
|
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))
|
|
1992
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2069
1993
|
|
|
2070
|
-
{
|
|
2071
|
-
if (
|
|
1994
|
+
if (!isWithin(applyOffset(position, offsetBy, i), scrollArea, i)) {
|
|
1995
|
+
if (isWithin(position, scrollArea, i)) {
|
|
2072
1996
|
continue;
|
|
2073
1997
|
}
|
|
2074
1998
|
|
|
@@ -2076,27 +2000,27 @@
|
|
|
2076
2000
|
return false;
|
|
2077
2001
|
}
|
|
2078
2002
|
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2003
|
+
const newPos = getPosition(element, target, {
|
|
2004
|
+
...options,
|
|
2005
|
+
attach: {
|
|
2006
|
+
element: elAttach.map(flipAxis).reverse(),
|
|
2007
|
+
target: targetAttach.map(flipAxis).reverse() },
|
|
2085
2008
|
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2009
|
+
offset: elOffset.reverse(),
|
|
2010
|
+
placement: placement.reverse(),
|
|
2011
|
+
recursion: true });
|
|
2089
2012
|
|
|
2090
2013
|
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
}
|
|
2014
|
+
if (newPos && isWithin(newPos, scrollArea, 1 - i)) {
|
|
2015
|
+
return newPos;
|
|
2094
2016
|
}
|
|
2017
|
+
|
|
2095
2018
|
continue;
|
|
2096
2019
|
}
|
|
2097
2020
|
|
|
2098
|
-
//
|
|
2099
|
-
} else {
|
|
2021
|
+
// Shift
|
|
2022
|
+
} else if (placement[i] === 'shift') {
|
|
2023
|
+
const targetDim = offset(target[i]);
|
|
2100
2024
|
offsetBy =
|
|
2101
2025
|
clamp(
|
|
2102
2026
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2105,13 +2029,54 @@
|
|
|
2105
2029
|
position[start];
|
|
2106
2030
|
}
|
|
2107
2031
|
|
|
2108
|
-
offsetPosition
|
|
2109
|
-
offsetPosition[end] += offsetBy;
|
|
2032
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2110
2033
|
}
|
|
2111
2034
|
|
|
2112
2035
|
return offsetPosition;
|
|
2113
2036
|
}
|
|
2114
2037
|
|
|
2038
|
+
function attachTo(element, target, options) {
|
|
2039
|
+
let { attach, offset: offsetBy } = {
|
|
2040
|
+
attach: {
|
|
2041
|
+
element: ['left', 'top'],
|
|
2042
|
+
target: ['left', 'top'],
|
|
2043
|
+
...options.attach },
|
|
2044
|
+
|
|
2045
|
+
offset: [0, 0],
|
|
2046
|
+
...options };
|
|
2047
|
+
|
|
2048
|
+
|
|
2049
|
+
let elOffset = offset(element);
|
|
2050
|
+
|
|
2051
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
2052
|
+
const targetOffset =
|
|
2053
|
+
attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
|
|
2054
|
+
|
|
2055
|
+
elOffset = applyOffset(
|
|
2056
|
+
elOffset,
|
|
2057
|
+
targetOffset[start] -
|
|
2058
|
+
elOffset[start] +
|
|
2059
|
+
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
2060
|
+
moveBy(attach.element[i], end, elOffset[prop]) +
|
|
2061
|
+
+offsetBy[i],
|
|
2062
|
+
i);
|
|
2063
|
+
|
|
2064
|
+
}
|
|
2065
|
+
return elOffset;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
function applyOffset(position, offset, i) {
|
|
2069
|
+
const [, dir, start, end] = dirs[i];
|
|
2070
|
+
const newPos = { ...position };
|
|
2071
|
+
newPos[start] = position[dir] = position[start] + offset;
|
|
2072
|
+
newPos[end] += offset;
|
|
2073
|
+
return newPos;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
function moveBy(attach, end, dim) {
|
|
2077
|
+
return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2115
2080
|
function getIntersectionArea() {
|
|
2116
2081
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2117
2082
|
for (const rect of rects) {
|
|
@@ -2123,21 +2088,45 @@
|
|
|
2123
2088
|
return area;
|
|
2124
2089
|
}
|
|
2125
2090
|
|
|
2126
|
-
function
|
|
2091
|
+
function getScrollArea(scrollElement, viewportOffset, i) {
|
|
2092
|
+
const [prop,, start, end] = dirs[i];
|
|
2127
2093
|
const viewport = offsetViewport(scrollElement);
|
|
2128
|
-
|
|
2129
|
-
viewport[start]
|
|
2130
|
-
|
|
2094
|
+
viewport[start] -= scrollElement["scroll" + ucfirst(start)] - viewportOffset;
|
|
2095
|
+
viewport[end] = viewport[start] + scrollElement["scroll" + ucfirst(prop)] - viewportOffset;
|
|
2096
|
+
return viewport;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
function isWithin(positionA, positionB, i) {
|
|
2100
|
+
const [,, start, end] = dirs[i];
|
|
2101
|
+
return positionA[start] >= positionB[start] && positionA[end] <= positionB[end];
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
function flip(element, target, _ref, i) {let { offset, attach } = _ref;
|
|
2105
|
+
return attachTo(element, target, {
|
|
2106
|
+
attach: {
|
|
2107
|
+
element: flipAttach(attach.element, i),
|
|
2108
|
+
target: flipAttach(attach.target, i) },
|
|
2109
|
+
|
|
2110
|
+
offset: flipOffset(offset, i) });
|
|
2131
2111
|
|
|
2132
|
-
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2133
2112
|
}
|
|
2134
2113
|
|
|
2135
|
-
function
|
|
2136
|
-
const
|
|
2137
|
-
|
|
2114
|
+
function flipAttach(attach, i) {
|
|
2115
|
+
const newAttach = [...attach];
|
|
2116
|
+
const index = dirs[i].indexOf(attach[i]);
|
|
2117
|
+
if (~index) {
|
|
2118
|
+
newAttach[i] = dirs[i][1 - index % 2 + 2];
|
|
2119
|
+
}
|
|
2120
|
+
return newAttach;
|
|
2138
2121
|
}
|
|
2139
2122
|
|
|
2140
|
-
function
|
|
2123
|
+
function flipOffset(offset, i) {
|
|
2124
|
+
offset = [...offset];
|
|
2125
|
+
offset[i] *= -1;
|
|
2126
|
+
return offset;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
function flipAxis(prop) {
|
|
2141
2130
|
for (let i = 0; i < dirs.length; i++) {
|
|
2142
2131
|
const index = dirs[i].indexOf(prop);
|
|
2143
2132
|
if (~index) {
|
|
@@ -2150,9 +2139,7 @@
|
|
|
2150
2139
|
__proto__: null,
|
|
2151
2140
|
ajax: ajax,
|
|
2152
2141
|
getImage: getImage,
|
|
2153
|
-
transition: transition,
|
|
2154
2142
|
Transition: Transition,
|
|
2155
|
-
animate: animate$1,
|
|
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,
|
|
@@ -2458,7 +2444,11 @@
|
|
|
2458
2444
|
}
|
|
2459
2445
|
|
|
2460
2446
|
if (write && result !== false) {
|
|
2461
|
-
fastdom.write(() =>
|
|
2447
|
+
fastdom.write(() => {
|
|
2448
|
+
if (this._connected) {
|
|
2449
|
+
write.call(this, this._data, types);
|
|
2450
|
+
}
|
|
2451
|
+
});
|
|
2462
2452
|
}
|
|
2463
2453
|
}
|
|
2464
2454
|
}
|
|
@@ -2607,7 +2597,7 @@
|
|
|
2607
2597
|
|
|
2608
2598
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2609
2599
|
|
|
2610
|
-
if (prop === 'target' &&
|
|
2600
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2611
2601
|
continue;
|
|
2612
2602
|
}
|
|
2613
2603
|
|
|
@@ -2618,7 +2608,7 @@
|
|
|
2618
2608
|
|
|
2619
2609
|
for (const key in options) {
|
|
2620
2610
|
const prop = camelize(key);
|
|
2621
|
-
if (props[prop]
|
|
2611
|
+
if (!isUndefined(props[prop])) {
|
|
2622
2612
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2623
2613
|
}
|
|
2624
2614
|
}
|
|
@@ -2947,7 +2937,7 @@
|
|
|
2947
2937
|
UIkit.data = '__uikit__';
|
|
2948
2938
|
UIkit.prefix = 'uk-';
|
|
2949
2939
|
UIkit.options = {};
|
|
2950
|
-
UIkit.version = '3.14.4-dev.
|
|
2940
|
+
UIkit.version = '3.14.4-dev.6002e7046';
|
|
2951
2941
|
|
|
2952
2942
|
globalAPI(UIkit);
|
|
2953
2943
|
hooksAPI(UIkit);
|
|
@@ -3052,27 +3042,7 @@
|
|
|
3052
3042
|
origin: false,
|
|
3053
3043
|
transition: 'ease',
|
|
3054
3044
|
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
|
-
|
|
3045
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3076
3046
|
|
|
3077
3047
|
|
|
3078
3048
|
computed: {
|
|
@@ -3081,7 +3051,7 @@
|
|
|
3081
3051
|
},
|
|
3082
3052
|
|
|
3083
3053
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3084
|
-
return startsWith(animation[0],
|
|
3054
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3085
3055
|
} },
|
|
3086
3056
|
|
|
3087
3057
|
|
|
@@ -3174,122 +3144,105 @@
|
|
|
3174
3144
|
};
|
|
3175
3145
|
}
|
|
3176
3146
|
|
|
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(cmp);
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
function slide(_ref4)
|
|
3188
|
-
|
|
3189
|
-
|
|
3147
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3148
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3190
3149
|
|
|
3150
|
+
const dirs = [
|
|
3151
|
+
['left', 'right'],
|
|
3152
|
+
['top', 'bottom']];
|
|
3191
3153
|
|
|
3154
|
+
const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
|
|
3155
|
+
const end = dir[1] === startProp;
|
|
3156
|
+
const props = ['width', 'height'];
|
|
3157
|
+
const dimProp = props[dirs.indexOf(dir)];
|
|
3158
|
+
const marginProp = "margin-" + dir[0];
|
|
3159
|
+
const marginStartProp = "margin-" + startProp;
|
|
3192
3160
|
|
|
3161
|
+
return async (el, show) => {
|
|
3162
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3193
3163
|
|
|
3164
|
+
let currentDim = dimensions(el)[dimProp];
|
|
3194
3165
|
|
|
3195
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3196
|
-
return (el, show) => {
|
|
3197
3166
|
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;
|
|
3204
|
-
|
|
3205
|
-
const props = inProgress ? css(el, Object.keys(initProps)) : show ? hideProps : initProps;
|
|
3167
|
+
await Transition.cancel(el);
|
|
3206
3168
|
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
if (!isToggled(el)) {
|
|
3169
|
+
if (show) {
|
|
3210
3170
|
_toggle(el, true);
|
|
3211
3171
|
}
|
|
3212
3172
|
|
|
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
|
-
}
|
|
3173
|
+
const prevProps = Object.fromEntries(
|
|
3174
|
+
[
|
|
3175
|
+
'padding',
|
|
3176
|
+
'border',
|
|
3177
|
+
'width',
|
|
3178
|
+
'height',
|
|
3179
|
+
'overflowY',
|
|
3180
|
+
'overflowX',
|
|
3181
|
+
marginProp,
|
|
3182
|
+
marginStartProp].
|
|
3183
|
+
map((key) => [key, el.style[key]]));
|
|
3184
|
+
|
|
3185
|
+
|
|
3186
|
+
const dim = dimensions(el);
|
|
3187
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3188
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3189
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3190
|
+
|
|
3191
|
+
if (!inProgress && !show) {
|
|
3192
|
+
currentDim += marginStart;
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3196
|
+
css(wrapper, {
|
|
3197
|
+
boxSizing: 'border-box',
|
|
3198
|
+
height: dim.height,
|
|
3199
|
+
width: dim.width,
|
|
3200
|
+
...css(el, [
|
|
3201
|
+
'overflow',
|
|
3202
|
+
'padding',
|
|
3203
|
+
'borderTop',
|
|
3204
|
+
'borderRight',
|
|
3205
|
+
'borderBottom',
|
|
3206
|
+
'borderLeft',
|
|
3207
|
+
'borderImage',
|
|
3208
|
+
marginStartProp]) });
|
|
3254
3209
|
|
|
3255
|
-
const width = toFloat(css(el, 'width'));
|
|
3256
|
-
duration = velocity * width + duration;
|
|
3257
3210
|
|
|
3258
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3259
3211
|
|
|
3260
3212
|
css(el, {
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3213
|
+
padding: 0,
|
|
3214
|
+
border: 0,
|
|
3215
|
+
[marginStartProp]: 0,
|
|
3216
|
+
width: dim.width,
|
|
3217
|
+
height: dim.height,
|
|
3218
|
+
overflow: 'hidden',
|
|
3219
|
+
[dimProp]: currentDim });
|
|
3266
3220
|
|
|
3267
|
-
return (
|
|
3268
|
-
show ?
|
|
3269
|
-
Transition.start(
|
|
3270
|
-
el,
|
|
3271
|
-
{
|
|
3272
|
-
clipPath: "polygon(0 0,100% 0,100% 100%,0 100%)",
|
|
3273
|
-
marginLeft: 0 },
|
|
3274
3221
|
|
|
3275
|
-
|
|
3276
|
-
|
|
3222
|
+
const percent = currentDim / endDim;
|
|
3223
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3224
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3277
3225
|
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3226
|
+
if (end) {
|
|
3227
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3228
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3229
|
+
}
|
|
3282
3230
|
|
|
3231
|
+
if (!end ^ mode === 'reveal') {
|
|
3232
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3233
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3234
|
+
}
|
|
3283
3235
|
|
|
3284
|
-
|
|
3236
|
+
try {
|
|
3237
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3238
|
+
} finally {
|
|
3239
|
+
css(el, prevProps);
|
|
3240
|
+
unwrap(wrapper.firstChild);
|
|
3285
3241
|
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
css(scrollElement, 'overflowX', '');
|
|
3291
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3292
|
-
});
|
|
3242
|
+
if (!show) {
|
|
3243
|
+
_toggle(el, false);
|
|
3244
|
+
}
|
|
3245
|
+
}
|
|
3293
3246
|
};
|
|
3294
3247
|
}
|
|
3295
3248
|
|
|
@@ -3314,6 +3267,7 @@
|
|
|
3314
3267
|
mixins: [Class, Lazyload, Togglable],
|
|
3315
3268
|
|
|
3316
3269
|
props: {
|
|
3270
|
+
animation: Boolean,
|
|
3317
3271
|
targets: String,
|
|
3318
3272
|
active: null,
|
|
3319
3273
|
collapsible: Boolean,
|
|
@@ -3326,7 +3280,7 @@
|
|
|
3326
3280
|
data: {
|
|
3327
3281
|
targets: '> *',
|
|
3328
3282
|
active: false,
|
|
3329
|
-
animation:
|
|
3283
|
+
animation: true,
|
|
3330
3284
|
collapsible: true,
|
|
3331
3285
|
multiple: false,
|
|
3332
3286
|
clsOpen: 'uk-open',
|
|
@@ -3372,7 +3326,7 @@
|
|
|
3372
3326
|
hide(
|
|
3373
3327
|
el,
|
|
3374
3328
|
!hasClass(
|
|
3375
|
-
this.items.find((item) =>
|
|
3329
|
+
this.items.find((item) => within(el, item)),
|
|
3376
3330
|
this.clsOpen));
|
|
3377
3331
|
|
|
3378
3332
|
|
|
@@ -3424,23 +3378,15 @@
|
|
|
3424
3378
|
toggleClass(el, this.clsOpen, show);
|
|
3425
3379
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3426
3380
|
|
|
3427
|
-
const content = $(
|
|
3381
|
+
const content = $(this.content, el);
|
|
3428
3382
|
|
|
3429
|
-
if (animate === false || !this.
|
|
3383
|
+
if (animate === false || !this.animation) {
|
|
3384
|
+
content.hidden = !show;
|
|
3430
3385
|
hide(content, !show);
|
|
3431
3386
|
return;
|
|
3432
3387
|
}
|
|
3433
3388
|
|
|
3434
|
-
|
|
3435
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3436
|
-
}
|
|
3437
|
-
|
|
3438
|
-
hide(content, false);
|
|
3439
|
-
await slide(this)(el._wrapper, show);
|
|
3440
|
-
hide(content, !show);
|
|
3441
|
-
|
|
3442
|
-
delete el._wrapper;
|
|
3443
|
-
unwrap(content);
|
|
3389
|
+
await toggleTransition(this)(content, show);
|
|
3444
3390
|
|
|
3445
3391
|
if (show) {
|
|
3446
3392
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3466,18 +3412,17 @@
|
|
|
3466
3412
|
args: 'animation',
|
|
3467
3413
|
|
|
3468
3414
|
props: {
|
|
3415
|
+
animation: Boolean,
|
|
3469
3416
|
close: String },
|
|
3470
3417
|
|
|
3471
3418
|
|
|
3472
3419
|
data: {
|
|
3473
|
-
animation:
|
|
3420
|
+
animation: true,
|
|
3474
3421
|
selClose: '.uk-alert-close',
|
|
3475
|
-
duration: 150,
|
|
3476
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3422
|
+
duration: 150 },
|
|
3477
3423
|
|
|
3478
3424
|
|
|
3479
|
-
events:
|
|
3480
|
-
{
|
|
3425
|
+
events: {
|
|
3481
3426
|
name: 'click',
|
|
3482
3427
|
|
|
3483
3428
|
delegate() {
|
|
@@ -3487,16 +3432,39 @@
|
|
|
3487
3432
|
handler(e) {
|
|
3488
3433
|
e.preventDefault();
|
|
3489
3434
|
this.close();
|
|
3490
|
-
} }
|
|
3491
|
-
|
|
3435
|
+
} },
|
|
3492
3436
|
|
|
3493
3437
|
|
|
3494
3438
|
methods: {
|
|
3495
3439
|
async close() {
|
|
3496
|
-
await this.toggleElement(this.$el);
|
|
3440
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3497
3441
|
this.$destroy(true);
|
|
3498
3442
|
} } };
|
|
3499
3443
|
|
|
3444
|
+
|
|
3445
|
+
|
|
3446
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3447
|
+
return (el) => {
|
|
3448
|
+
const height = toFloat(css(el, 'height'));
|
|
3449
|
+
css(el, 'height', height);
|
|
3450
|
+
return Transition.start(
|
|
3451
|
+
el,
|
|
3452
|
+
{
|
|
3453
|
+
height: 0,
|
|
3454
|
+
marginTop: 0,
|
|
3455
|
+
marginBottom: 0,
|
|
3456
|
+
paddingTop: 0,
|
|
3457
|
+
paddingBottom: 0,
|
|
3458
|
+
borderTop: 0,
|
|
3459
|
+
borderBottom: 0,
|
|
3460
|
+
opacity: 0 },
|
|
3461
|
+
|
|
3462
|
+
velocity * height + duration,
|
|
3463
|
+
transition);
|
|
3464
|
+
|
|
3465
|
+
};
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3500
3468
|
var Video = {
|
|
3501
3469
|
args: 'autoplay',
|
|
3502
3470
|
|
|
@@ -3645,13 +3613,17 @@
|
|
|
3645
3613
|
props: {
|
|
3646
3614
|
pos: String,
|
|
3647
3615
|
offset: null,
|
|
3648
|
-
flip: Boolean
|
|
3616
|
+
flip: Boolean,
|
|
3617
|
+
shift: Boolean,
|
|
3618
|
+
inset: Boolean },
|
|
3649
3619
|
|
|
3650
3620
|
|
|
3651
3621
|
data: {
|
|
3652
3622
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3623
|
+
offset: false,
|
|
3653
3624
|
flip: true,
|
|
3654
|
-
|
|
3625
|
+
shift: true,
|
|
3626
|
+
inset: false },
|
|
3655
3627
|
|
|
3656
3628
|
|
|
3657
3629
|
connected() {
|
|
@@ -3663,17 +3635,19 @@
|
|
|
3663
3635
|
methods: {
|
|
3664
3636
|
positionAt(element, target, boundary) {
|
|
3665
3637
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3638
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3666
3639
|
|
|
3667
3640
|
const attach = {
|
|
3668
|
-
element: [flipPosition(this.dir), this.align],
|
|
3641
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3669
3642
|
target: [this.dir, this.align] };
|
|
3670
3643
|
|
|
3671
3644
|
|
|
3672
3645
|
if (this.axis === 'y') {
|
|
3673
3646
|
for (const prop in attach) {
|
|
3674
|
-
attach[prop]
|
|
3647
|
+
attach[prop].reverse();
|
|
3675
3648
|
}
|
|
3676
|
-
offset
|
|
3649
|
+
offset.reverse();
|
|
3650
|
+
placement.reverse();
|
|
3677
3651
|
}
|
|
3678
3652
|
|
|
3679
3653
|
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
@@ -3683,21 +3657,13 @@
|
|
|
3683
3657
|
const elDim = dimensions(element);
|
|
3684
3658
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3685
3659
|
|
|
3686
|
-
|
|
3687
|
-
element,
|
|
3688
|
-
target,
|
|
3689
|
-
{
|
|
3660
|
+
positionAt(element, target, {
|
|
3690
3661
|
attach,
|
|
3691
3662
|
offset,
|
|
3692
3663
|
boundary,
|
|
3693
|
-
|
|
3694
|
-
viewportOffset: this.getViewportOffset(element) }
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
trigger(element, 'beforeposition', args);
|
|
3664
|
+
placement,
|
|
3665
|
+
viewportOffset: this.getViewportOffset(element) });
|
|
3699
3666
|
|
|
3700
|
-
positionAt(...args);
|
|
3701
3667
|
|
|
3702
3668
|
// Restore scroll position
|
|
3703
3669
|
scrollElement.scrollTop = scrollTop;
|
|
@@ -3707,27 +3673,38 @@
|
|
|
3707
3673
|
getPositionOffset(element) {
|
|
3708
3674
|
return (
|
|
3709
3675
|
toPx(
|
|
3710
|
-
this.offset === false ?
|
|
3676
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3711
3677
|
this.axis === 'x' ? 'width' : 'height',
|
|
3712
3678
|
element) * (
|
|
3713
|
-
|
|
3679
|
+
|
|
3680
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3681
|
+
this.inset ? -1 : 1));
|
|
3714
3682
|
|
|
3715
3683
|
},
|
|
3716
3684
|
|
|
3717
3685
|
getShiftOffset(element) {
|
|
3718
|
-
return
|
|
3686
|
+
return this.align === 'center' ?
|
|
3719
3687
|
0 :
|
|
3720
3688
|
toPx(
|
|
3721
|
-
|
|
3689
|
+
css(element, '--uk-position-shift-offset'),
|
|
3722
3690
|
this.axis === 'y' ? 'width' : 'height',
|
|
3723
3691
|
element) * (
|
|
3724
3692
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3725
3693
|
},
|
|
3726
3694
|
|
|
3727
3695
|
getViewportOffset(element) {
|
|
3728
|
-
return toPx(
|
|
3696
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3729
3697
|
} } };
|
|
3730
3698
|
|
|
3699
|
+
var Style = {
|
|
3700
|
+
beforeConnect() {
|
|
3701
|
+
this._style = attr(this.$el, 'style');
|
|
3702
|
+
},
|
|
3703
|
+
|
|
3704
|
+
disconnected() {
|
|
3705
|
+
attr(this.$el, 'style', this._style);
|
|
3706
|
+
} };
|
|
3707
|
+
|
|
3731
3708
|
const active$1 = [];
|
|
3732
3709
|
|
|
3733
3710
|
var Modal = {
|
|
@@ -3837,8 +3814,8 @@
|
|
|
3837
3814
|
|
|
3838
3815
|
|
|
3839
3816
|
if (this.overlay) {
|
|
3840
|
-
once(this.$el, '
|
|
3841
|
-
once(this.$el, '
|
|
3817
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3818
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3842
3819
|
}
|
|
3843
3820
|
|
|
3844
3821
|
if (this.stack) {
|
|
@@ -3920,10 +3897,6 @@
|
|
|
3920
3897
|
active$1.splice(active$1.indexOf(this), 1);
|
|
3921
3898
|
}
|
|
3922
3899
|
|
|
3923
|
-
if (!active$1.length) {
|
|
3924
|
-
css(document.body, 'overflowY', '');
|
|
3925
|
-
}
|
|
3926
|
-
|
|
3927
3900
|
css(this.$el, 'zIndex', '');
|
|
3928
3901
|
|
|
3929
3902
|
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
@@ -4040,16 +4013,22 @@
|
|
|
4040
4013
|
return () => events.forEach((fn) => fn());
|
|
4041
4014
|
}
|
|
4042
4015
|
|
|
4016
|
+
let prevented;
|
|
4043
4017
|
function preventBackgroundScroll() {
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4018
|
+
if (prevented) {
|
|
4019
|
+
return noop;
|
|
4020
|
+
}
|
|
4021
|
+
prevented = true;
|
|
4022
|
+
|
|
4023
|
+
const { scrollingElement } = document;
|
|
4024
|
+
css(scrollingElement, {
|
|
4025
|
+
overflowY: 'hidden',
|
|
4026
|
+
touchAction: 'none',
|
|
4027
|
+
paddingRight: width(window) - scrollingElement.clientWidth });
|
|
4048
4028
|
|
|
4049
|
-
css(documentElement, 'overflowY', 'hidden');
|
|
4050
4029
|
return () => {
|
|
4051
|
-
|
|
4052
|
-
css(
|
|
4030
|
+
prevented = false;
|
|
4031
|
+
css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
|
|
4053
4032
|
};
|
|
4054
4033
|
}
|
|
4055
4034
|
|
|
@@ -4066,7 +4045,7 @@
|
|
|
4066
4045
|
let active;
|
|
4067
4046
|
|
|
4068
4047
|
var drop = {
|
|
4069
|
-
mixins: [Container, Lazyload, Position, Togglable],
|
|
4048
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4070
4049
|
|
|
4071
4050
|
args: 'pos',
|
|
4072
4051
|
|
|
@@ -4074,10 +4053,13 @@
|
|
|
4074
4053
|
mode: 'list',
|
|
4075
4054
|
toggle: Boolean,
|
|
4076
4055
|
boundary: Boolean,
|
|
4077
|
-
|
|
4056
|
+
target: Boolean,
|
|
4057
|
+
targetX: Boolean,
|
|
4058
|
+
targetY: Boolean,
|
|
4059
|
+
stretch: Boolean,
|
|
4078
4060
|
delayShow: Number,
|
|
4079
4061
|
delayHide: Number,
|
|
4080
|
-
|
|
4062
|
+
autoUpdate: Boolean,
|
|
4081
4063
|
clsDrop: String,
|
|
4082
4064
|
animateOut: Boolean,
|
|
4083
4065
|
bgScroll: Boolean },
|
|
@@ -4086,17 +4068,32 @@
|
|
|
4086
4068
|
data: {
|
|
4087
4069
|
mode: ['click', 'hover'],
|
|
4088
4070
|
toggle: '- *',
|
|
4089
|
-
boundary:
|
|
4090
|
-
|
|
4071
|
+
boundary: false,
|
|
4072
|
+
target: false,
|
|
4073
|
+
targetX: false,
|
|
4074
|
+
targetY: false,
|
|
4075
|
+
stretch: false,
|
|
4091
4076
|
delayShow: 0,
|
|
4092
4077
|
delayHide: 800,
|
|
4093
|
-
|
|
4078
|
+
autoUpdate: true,
|
|
4094
4079
|
clsDrop: false,
|
|
4080
|
+
animateOut: false,
|
|
4081
|
+
bgScroll: true,
|
|
4095
4082
|
animation: ['uk-animation-fade'],
|
|
4096
4083
|
cls: 'uk-open',
|
|
4097
|
-
container: false,
|
|
4098
|
-
|
|
4099
|
-
|
|
4084
|
+
container: false },
|
|
4085
|
+
|
|
4086
|
+
|
|
4087
|
+
computed: {
|
|
4088
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4089
|
+
targetX = targetX || target || this.targetEl;
|
|
4090
|
+
targetY = targetY || target || this.targetEl;
|
|
4091
|
+
|
|
4092
|
+
return [
|
|
4093
|
+
targetX === true ? window : query(targetX, $el),
|
|
4094
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4095
|
+
|
|
4096
|
+
} },
|
|
4100
4097
|
|
|
4101
4098
|
|
|
4102
4099
|
created() {
|
|
@@ -4110,18 +4107,19 @@
|
|
|
4110
4107
|
connected() {
|
|
4111
4108
|
addClass(this.$el, this.clsDrop);
|
|
4112
4109
|
|
|
4113
|
-
if (this.toggle && !this.
|
|
4114
|
-
this.
|
|
4110
|
+
if (this.toggle && !this.targetEl) {
|
|
4111
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4115
4112
|
target: this.$el,
|
|
4116
4113
|
mode: this.mode }).
|
|
4117
4114
|
$el;
|
|
4118
|
-
attr(this.
|
|
4119
|
-
this.lazyload(this.
|
|
4115
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4116
|
+
this.lazyload(this.targetEl);
|
|
4120
4117
|
}
|
|
4121
4118
|
},
|
|
4122
4119
|
|
|
4123
4120
|
disconnected() {
|
|
4124
4121
|
if (this.isActive()) {
|
|
4122
|
+
this.hide(false);
|
|
4125
4123
|
active = null;
|
|
4126
4124
|
}
|
|
4127
4125
|
},
|
|
@@ -4147,7 +4145,7 @@
|
|
|
4147
4145
|
return 'a[href^="#"]';
|
|
4148
4146
|
},
|
|
4149
4147
|
|
|
4150
|
-
handler(
|
|
4148
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4151
4149
|
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4152
4150
|
this.hide(false);
|
|
4153
4151
|
}
|
|
@@ -4255,21 +4253,22 @@
|
|
|
4255
4253
|
|
|
4256
4254
|
this.tracker.init();
|
|
4257
4255
|
|
|
4258
|
-
|
|
4256
|
+
const update = () => this.$emit();
|
|
4257
|
+
const handlers = [
|
|
4259
4258
|
on(
|
|
4260
4259
|
document,
|
|
4261
4260
|
pointerDown,
|
|
4262
|
-
(
|
|
4261
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4263
4262
|
!within(target, this.$el) &&
|
|
4264
4263
|
once(
|
|
4265
4264
|
document,
|
|
4266
4265
|
pointerUp + " " + pointerCancel + " scroll",
|
|
4267
|
-
(
|
|
4266
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4268
4267
|
if (
|
|
4269
4268
|
!defaultPrevented &&
|
|
4270
4269
|
type === pointerUp &&
|
|
4271
4270
|
target === newTarget &&
|
|
4272
|
-
!(this.
|
|
4271
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4273
4272
|
{
|
|
4274
4273
|
this.hide(false);
|
|
4275
4274
|
}
|
|
@@ -4284,29 +4283,28 @@
|
|
|
4284
4283
|
}
|
|
4285
4284
|
}),
|
|
4286
4285
|
|
|
4286
|
+
on(window, 'resize', update),
|
|
4287
|
+
|
|
4288
|
+
(() => {
|
|
4289
|
+
const observer = observeResize(
|
|
4290
|
+
scrollParents(this.$el).concat(this.targetEl),
|
|
4291
|
+
update);
|
|
4292
|
+
|
|
4293
|
+
return () => observer.disconnect();
|
|
4294
|
+
})(),
|
|
4295
|
+
|
|
4296
|
+
...(this.autoUpdate ?
|
|
4297
|
+
[on([document, scrollParents(this.$el)], 'scroll', update)] :
|
|
4298
|
+
[]),
|
|
4299
|
+
|
|
4287
4300
|
...(this.bgScroll ?
|
|
4288
4301
|
[] :
|
|
4289
|
-
[preventOverscroll(this.$el), preventBackgroundScroll()])
|
|
4302
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()])];
|
|
4303
|
+
|
|
4304
|
+
|
|
4305
|
+
once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
|
|
4306
|
+
self: true });
|
|
4290
4307
|
|
|
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
4308
|
} },
|
|
4311
4309
|
|
|
4312
4310
|
|
|
@@ -4323,7 +4321,7 @@
|
|
|
4323
4321
|
{
|
|
4324
4322
|
name: 'hide',
|
|
4325
4323
|
|
|
4326
|
-
handler(
|
|
4324
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4327
4325
|
if (this.$el !== target) {
|
|
4328
4326
|
active =
|
|
4329
4327
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4347,12 +4345,12 @@
|
|
|
4347
4345
|
|
|
4348
4346
|
|
|
4349
4347
|
methods: {
|
|
4350
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4351
|
-
if (this.isToggled() && target && this.
|
|
4348
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4349
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4352
4350
|
this.hide(false, false);
|
|
4353
4351
|
}
|
|
4354
4352
|
|
|
4355
|
-
this.
|
|
4353
|
+
this.targetEl = target;
|
|
4356
4354
|
|
|
4357
4355
|
this.clearTimers();
|
|
4358
4356
|
|
|
@@ -4415,60 +4413,69 @@
|
|
|
4415
4413
|
|
|
4416
4414
|
position() {
|
|
4417
4415
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4418
|
-
|
|
4419
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4416
|
+
attr(this.$el, 'style', this._style);
|
|
4420
4417
|
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
const [scrollParent] = scrollParents(
|
|
4424
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4418
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4419
|
+
this.$el.hidden = true;
|
|
4425
4420
|
|
|
4426
|
-
const
|
|
4427
|
-
const boundaryOffset =
|
|
4421
|
+
const boundary = query(this.boundary, this.$el);
|
|
4422
|
+
const boundaryOffset = offset(boundary || window);
|
|
4423
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4428
4424
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4429
4425
|
|
|
4430
|
-
|
|
4431
|
-
|
|
4426
|
+
const dirs = [
|
|
4427
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4428
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4432
4429
|
|
|
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) {
|
|
4430
|
+
|
|
4431
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4432
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4433
|
+
css(this.$el, {
|
|
4434
|
+
[prop]: Math.min(
|
|
4435
|
+
boundaryOffset[prop],
|
|
4436
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4437
|
+
|
|
4438
|
+
["overflow-" + axis]: 'auto' });
|
|
4439
|
+
|
|
4440
|
+
}
|
|
4441
|
+
}
|
|
4442
|
+
|
|
4443
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4444
|
+
|
|
4445
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4466
4446
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4467
4447
|
}
|
|
4468
4448
|
|
|
4469
4449
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4470
4450
|
|
|
4471
|
-
this
|
|
4451
|
+
this.$el.hidden = false;
|
|
4452
|
+
|
|
4453
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4454
|
+
|
|
4455
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4456
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4457
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4458
|
+
const targetOffset = offset(this.target[i]);
|
|
4459
|
+
const elOffset = offset(this.$el);
|
|
4460
|
+
|
|
4461
|
+
css(this.$el, {
|
|
4462
|
+
[prop]:
|
|
4463
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4464
|
+
targetOffset[start] -
|
|
4465
|
+
Math.max(
|
|
4466
|
+
boundaryOffset[start],
|
|
4467
|
+
viewports[i][start] + viewportOffset) :
|
|
4468
|
+
|
|
4469
|
+
Math.min(
|
|
4470
|
+
boundaryOffset[end],
|
|
4471
|
+
viewports[i][end] - viewportOffset) -
|
|
4472
|
+
targetOffset[end]) - positionOffset,
|
|
4473
|
+
["overflow-" + axis]: 'auto' });
|
|
4474
|
+
|
|
4475
|
+
|
|
4476
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4477
|
+
}
|
|
4478
|
+
}
|
|
4472
4479
|
} } };
|
|
4473
4480
|
|
|
4474
4481
|
|
|
@@ -4965,8 +4972,11 @@
|
|
|
4965
4972
|
let minHeight = '';
|
|
4966
4973
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4967
4974
|
|
|
4975
|
+
const { body, scrollingElement } = document;
|
|
4968
4976
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4969
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4977
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4978
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4979
|
+
|
|
4970
4980
|
|
|
4971
4981
|
if (this.expand) {
|
|
4972
4982
|
minHeight = Math.max(
|
|
@@ -4976,7 +4986,6 @@
|
|
|
4976
4986
|
0);
|
|
4977
4987
|
|
|
4978
4988
|
} else {
|
|
4979
|
-
const { body, scrollingElement } = document;
|
|
4980
4989
|
const isScrollingElement =
|
|
4981
4990
|
scrollingElement === scrollElement || body === scrollElement;
|
|
4982
4991
|
|
|
@@ -5232,7 +5241,13 @@
|
|
|
5232
5241
|
|
|
5233
5242
|
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
5243
|
|
|
5235
|
-
var
|
|
5244
|
+
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>";
|
|
5245
|
+
|
|
5246
|
+
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>";
|
|
5247
|
+
|
|
5248
|
+
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>";
|
|
5249
|
+
|
|
5250
|
+
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>";
|
|
5236
5251
|
|
|
5237
5252
|
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>";
|
|
5238
5253
|
|
|
@@ -5264,6 +5279,9 @@
|
|
|
5264
5279
|
marker,
|
|
5265
5280
|
'close-icon': closeIcon,
|
|
5266
5281
|
'close-large': closeLarge,
|
|
5282
|
+
'nav-parent-icon': navParentIcon,
|
|
5283
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5284
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
5267
5285
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
5268
5286
|
'overlay-icon': overlayIcon,
|
|
5269
5287
|
'pagination-next': paginationNext,
|
|
@@ -5321,6 +5339,15 @@
|
|
|
5321
5339
|
} };
|
|
5322
5340
|
|
|
5323
5341
|
|
|
5342
|
+
const NavParentIcon = {
|
|
5343
|
+
extends: IconComponent,
|
|
5344
|
+
|
|
5345
|
+
beforeConnect() {
|
|
5346
|
+
const icon = this.$props.icon;
|
|
5347
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5348
|
+
} };
|
|
5349
|
+
|
|
5350
|
+
|
|
5324
5351
|
const Slidenav = {
|
|
5325
5352
|
extends: IconComponent,
|
|
5326
5353
|
|
|
@@ -5581,7 +5608,7 @@
|
|
|
5581
5608
|
|
|
5582
5609
|
|
|
5583
5610
|
connected() {
|
|
5584
|
-
const media = toMedia(this.media);
|
|
5611
|
+
const media = toMedia(this.media, this.$el);
|
|
5585
5612
|
this.matchMedia = true;
|
|
5586
5613
|
if (media) {
|
|
5587
5614
|
this.mediaObj = window.matchMedia(media);
|
|
@@ -5602,11 +5629,10 @@
|
|
|
5602
5629
|
} };
|
|
5603
5630
|
|
|
5604
5631
|
|
|
5605
|
-
function toMedia(value) {
|
|
5632
|
+
function toMedia(value, element) {
|
|
5606
5633
|
if (isString(value)) {
|
|
5607
5634
|
if (startsWith(value, '@')) {
|
|
5608
|
-
|
|
5609
|
-
value = toFloat(getCssVar(name));
|
|
5635
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5610
5636
|
} else if (isNaN(value)) {
|
|
5611
5637
|
return value;
|
|
5612
5638
|
}
|
|
@@ -5631,7 +5657,7 @@
|
|
|
5631
5657
|
|
|
5632
5658
|
computed: {
|
|
5633
5659
|
fill(_ref) {let { fill } = _ref;
|
|
5634
|
-
return fill ||
|
|
5660
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5635
5661
|
} },
|
|
5636
5662
|
|
|
5637
5663
|
|
|
@@ -5823,7 +5849,9 @@
|
|
|
5823
5849
|
align: String,
|
|
5824
5850
|
offset: Number,
|
|
5825
5851
|
boundary: Boolean,
|
|
5826
|
-
|
|
5852
|
+
target: Boolean,
|
|
5853
|
+
targetX: Boolean,
|
|
5854
|
+
targetY: Boolean,
|
|
5827
5855
|
clsDrop: String,
|
|
5828
5856
|
delayShow: Number,
|
|
5829
5857
|
delayHide: Number,
|
|
@@ -5840,9 +5868,12 @@
|
|
|
5840
5868
|
offset: undefined,
|
|
5841
5869
|
delayShow: undefined,
|
|
5842
5870
|
delayHide: undefined,
|
|
5843
|
-
|
|
5844
|
-
|
|
5871
|
+
flip: false,
|
|
5872
|
+
shift: true,
|
|
5845
5873
|
boundary: true,
|
|
5874
|
+
target: false,
|
|
5875
|
+
targetX: false,
|
|
5876
|
+
targetY: false,
|
|
5846
5877
|
dropbar: false,
|
|
5847
5878
|
dropbarAnchor: false,
|
|
5848
5879
|
duration: 200,
|
|
@@ -5877,7 +5908,7 @@
|
|
|
5877
5908
|
},
|
|
5878
5909
|
|
|
5879
5910
|
watch(dropbar) {
|
|
5880
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5911
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5881
5912
|
},
|
|
5882
5913
|
|
|
5883
5914
|
immediate: true },
|
|
@@ -5893,7 +5924,7 @@
|
|
|
5893
5924
|
|
|
5894
5925
|
if (this.dropContainer !== $el) {
|
|
5895
5926
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5896
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5927
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5897
5928
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5898
5929
|
dropdowns.push(el);
|
|
5899
5930
|
}
|
|
@@ -5955,8 +5986,8 @@
|
|
|
5955
5986
|
if (
|
|
5956
5987
|
active &&
|
|
5957
5988
|
includes(active.mode, 'hover') &&
|
|
5958
|
-
active.
|
|
5959
|
-
!within(active.
|
|
5989
|
+
active.targetEl &&
|
|
5990
|
+
!within(active.targetEl, current) &&
|
|
5960
5991
|
!active.isDelaying)
|
|
5961
5992
|
{
|
|
5962
5993
|
active.hide(false);
|
|
@@ -5978,7 +6009,7 @@
|
|
|
5978
6009
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5979
6010
|
e.preventDefault();
|
|
5980
6011
|
|
|
5981
|
-
if (!active || active.
|
|
6012
|
+
if (!active || active.targetEl !== current) {
|
|
5982
6013
|
current.click();
|
|
5983
6014
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5984
6015
|
focusFirstFocusableElement(target));});
|
|
@@ -6028,8 +6059,8 @@
|
|
|
6028
6059
|
}
|
|
6029
6060
|
}
|
|
6030
6061
|
|
|
6031
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
6032
|
-
active == null ? void 0 : (_active$
|
|
6062
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6063
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
6033
6064
|
}
|
|
6034
6065
|
|
|
6035
6066
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -6100,39 +6131,19 @@
|
|
|
6100
6131
|
return;
|
|
6101
6132
|
}
|
|
6102
6133
|
|
|
6103
|
-
this._observer = observeResize(target, () =>
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
{
|
|
6115
|
-
name: 'beforeposition',
|
|
6116
|
-
|
|
6117
|
-
el() {
|
|
6118
|
-
return this.dropContainer;
|
|
6119
|
-
},
|
|
6120
|
-
|
|
6121
|
-
filter() {
|
|
6122
|
-
return this.dropbar;
|
|
6123
|
-
},
|
|
6124
|
-
|
|
6125
|
-
handler(e, element, target, options) {
|
|
6126
|
-
if (!this.isDropbarDrop(element)) {
|
|
6127
|
-
return;
|
|
6128
|
-
}
|
|
6129
|
-
|
|
6130
|
-
const dropbarOffset = offset(this.dropbar);
|
|
6131
|
-
|
|
6132
|
-
css(element, 'maxWidth', dropbarOffset.width - options.viewportOffset * 2);
|
|
6134
|
+
this._observer = observeResize(target, () => {
|
|
6135
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6136
|
+
concat(target).
|
|
6137
|
+
map((el) => offset(el));
|
|
6138
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6139
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6140
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6141
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6142
|
+
this.transitionTo(
|
|
6143
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6144
|
+
target);
|
|
6133
6145
|
|
|
6134
|
-
|
|
6135
|
-
options.viewportOffset += dropbarOffset.left;
|
|
6146
|
+
});
|
|
6136
6147
|
} },
|
|
6137
6148
|
|
|
6138
6149
|
|
|
@@ -6153,7 +6164,7 @@
|
|
|
6153
6164
|
if (
|
|
6154
6165
|
matches(this.dropbar, ':hover') &&
|
|
6155
6166
|
(active == null ? void 0 : active.$el) === e.target &&
|
|
6156
|
-
!this.toggles.some((el) => active.
|
|
6167
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6157
6168
|
{
|
|
6158
6169
|
e.preventDefault();
|
|
6159
6170
|
}
|
|
@@ -6171,7 +6182,7 @@
|
|
|
6171
6182
|
return this.dropbar;
|
|
6172
6183
|
},
|
|
6173
6184
|
|
|
6174
|
-
handler(
|
|
6185
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6175
6186
|
if (!this.isDropbarDrop(target)) {
|
|
6176
6187
|
return;
|
|
6177
6188
|
}
|
|
@@ -6189,7 +6200,7 @@
|
|
|
6189
6200
|
|
|
6190
6201
|
methods: {
|
|
6191
6202
|
getActive() {
|
|
6192
|
-
return active
|
|
6203
|
+
return includes(this.dropdowns, active == null ? void 0 : active.$el) && active;
|
|
6193
6204
|
},
|
|
6194
6205
|
|
|
6195
6206
|
transitionTo(newHeight, el) {
|
|
@@ -6222,15 +6233,14 @@
|
|
|
6222
6233
|
},
|
|
6223
6234
|
|
|
6224
6235
|
isDropbarDrop(el) {
|
|
6225
|
-
|
|
6226
|
-
return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
|
|
6236
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6227
6237
|
} } };
|
|
6228
6238
|
|
|
6229
6239
|
|
|
6230
6240
|
|
|
6231
6241
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6232
6242
|
const { current, keyCode } = e;
|
|
6233
|
-
const target = (active == null ? void 0 : active.
|
|
6243
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6234
6244
|
const i = toggles.indexOf(target);
|
|
6235
6245
|
|
|
6236
6246
|
// Left
|
|
@@ -6430,9 +6440,12 @@
|
|
|
6430
6440
|
addClass(parent(this.panel), this.clsMode);
|
|
6431
6441
|
}
|
|
6432
6442
|
|
|
6433
|
-
|
|
6434
|
-
|
|
6443
|
+
const { body, scrollingElement } = document;
|
|
6444
|
+
|
|
6445
|
+
addClass(body, this.clsContainer, this.clsFlip);
|
|
6446
|
+
css(body, 'touch-action', 'pan-y pinch-zoom');
|
|
6435
6447
|
css(this.$el, 'display', 'block');
|
|
6448
|
+
css(this.panel, 'maxWidth', scrollingElement.clientWidth);
|
|
6436
6449
|
addClass(this.$el, this.clsOverlay);
|
|
6437
6450
|
addClass(
|
|
6438
6451
|
this.panel,
|
|
@@ -6440,8 +6453,8 @@
|
|
|
6440
6453
|
this.mode === 'reveal' ? '' : this.clsMode);
|
|
6441
6454
|
|
|
6442
6455
|
|
|
6443
|
-
height(
|
|
6444
|
-
addClass(
|
|
6456
|
+
height(body); // force reflow
|
|
6457
|
+
addClass(body, this.clsContainerAnimation);
|
|
6445
6458
|
|
|
6446
6459
|
this.clsContainerAnimation && suppressUserScale();
|
|
6447
6460
|
} },
|
|
@@ -6473,6 +6486,7 @@
|
|
|
6473
6486
|
removeClass(this.panel, this.clsSidebarAnimation, this.clsMode);
|
|
6474
6487
|
removeClass(this.$el, this.clsOverlay);
|
|
6475
6488
|
css(this.$el, 'display', '');
|
|
6489
|
+
css(this.panel, 'maxWidth', '');
|
|
6476
6490
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
6477
6491
|
} },
|
|
6478
6492
|
|
|
@@ -6598,6 +6612,14 @@
|
|
|
6598
6612
|
offset: 0 },
|
|
6599
6613
|
|
|
6600
6614
|
|
|
6615
|
+
connected() {
|
|
6616
|
+
registerClick(this);
|
|
6617
|
+
},
|
|
6618
|
+
|
|
6619
|
+
disconnected() {
|
|
6620
|
+
unregisterClick(this);
|
|
6621
|
+
},
|
|
6622
|
+
|
|
6601
6623
|
methods: {
|
|
6602
6624
|
async scrollTo(el) {
|
|
6603
6625
|
el = el && $(el) || document.body;
|
|
@@ -6606,20 +6628,39 @@
|
|
|
6606
6628
|
await scrollIntoView(el, { offset: this.offset });
|
|
6607
6629
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6608
6630
|
}
|
|
6609
|
-
} }
|
|
6631
|
+
} } };
|
|
6610
6632
|
|
|
6611
6633
|
|
|
6612
|
-
events: {
|
|
6613
|
-
click(e) {
|
|
6614
|
-
if (e.defaultPrevented) {
|
|
6615
|
-
return;
|
|
6616
|
-
}
|
|
6617
6634
|
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6635
|
+
const components$1 = new Set();
|
|
6636
|
+
function registerClick(cmp) {
|
|
6637
|
+
if (!components$1.size) {
|
|
6638
|
+
on(document, 'click', clickHandler);
|
|
6639
|
+
}
|
|
6621
6640
|
|
|
6641
|
+
components$1.add(cmp);
|
|
6642
|
+
}
|
|
6622
6643
|
|
|
6644
|
+
function unregisterClick(cmp) {
|
|
6645
|
+
components$1.delete(cmp);
|
|
6646
|
+
|
|
6647
|
+
if (!components$1.length) {
|
|
6648
|
+
off(document, 'click', clickHandler);
|
|
6649
|
+
}
|
|
6650
|
+
}
|
|
6651
|
+
|
|
6652
|
+
function clickHandler(e) {
|
|
6653
|
+
if (e.defaultPrevented) {
|
|
6654
|
+
return;
|
|
6655
|
+
}
|
|
6656
|
+
|
|
6657
|
+
for (const component of components$1) {
|
|
6658
|
+
if (within(e.target, component.$el)) {
|
|
6659
|
+
e.preventDefault();
|
|
6660
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6661
|
+
}
|
|
6662
|
+
}
|
|
6663
|
+
}
|
|
6623
6664
|
|
|
6624
6665
|
function getTargetElement(el) {
|
|
6625
6666
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -7582,7 +7623,7 @@
|
|
|
7582
7623
|
|
|
7583
7624
|
|
|
7584
7625
|
{
|
|
7585
|
-
name: '
|
|
7626
|
+
name: 'hide show',
|
|
7586
7627
|
|
|
7587
7628
|
self: true,
|
|
7588
7629
|
|
|
@@ -7590,10 +7631,8 @@
|
|
|
7590
7631
|
return this.target;
|
|
7591
7632
|
},
|
|
7592
7633
|
|
|
7593
|
-
handler(
|
|
7594
|
-
|
|
7595
|
-
this.updateAria(toggled);
|
|
7596
|
-
}
|
|
7634
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7635
|
+
this.updateAria(type === 'show');
|
|
7597
7636
|
} },
|
|
7598
7637
|
|
|
7599
7638
|
|
|
@@ -7688,10 +7727,12 @@
|
|
|
7688
7727
|
Video: Video,
|
|
7689
7728
|
Close: Close,
|
|
7690
7729
|
Spinner: Spinner,
|
|
7730
|
+
NavParentIcon: NavParentIcon,
|
|
7691
7731
|
SlidenavNext: Slidenav,
|
|
7692
7732
|
SlidenavPrevious: Slidenav,
|
|
7693
7733
|
SearchIcon: Search,
|
|
7694
7734
|
Marker: IconComponent,
|
|
7735
|
+
NavbarParentIcon: IconComponent,
|
|
7695
7736
|
NavbarToggleIcon: IconComponent,
|
|
7696
7737
|
OverlayIcon: IconComponent,
|
|
7697
7738
|
PaginationNext: IconComponent,
|