uikit 3.14.4-dev.f2e3be255 → 3.14.4-dev.fef7412a0
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 -109
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +349 -109
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +372 -139
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +372 -139
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +7 -5
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +96 -139
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +96 -139
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +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 -147
- 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 +522 -488
- 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 +531 -493
- 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/filter.js +5 -3
- 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 +6 -2
- package/src/js/core/icon.js +16 -0
- package/src/js/core/index.js +2 -0
- package/src/js/core/leader.js +2 -2
- package/src/js/core/navbar.js +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 -133
- 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 +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 +126 -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 +62 -47
- 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 +2 -37
- 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 +167 -47
- package/src/scss/components/navbar.scss +50 -47
- package/src/scss/components/utility.scss +8 -1
- package/src/scss/mixins-theme.scss +93 -49
- package/src/scss/mixins.scss +89 -17
- package/src/scss/theme/_import.scss +1 -0
- package/src/scss/theme/dropbar.scss +44 -0
- package/src/scss/theme/dropdown.scss +0 -8
- package/src/scss/theme/nav.scss +43 -7
- package/src/scss/theme/navbar.scss +2 -10
- package/src/scss/variables-theme.scss +61 -22
- package/src/scss/variables.scss +49 -17
- 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 +125 -245
- 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.fef7412a0 | 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,126 +1936,65 @@
|
|
|
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 [scrollElement] = viewports;
|
|
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
|
|
2026
|
-
viewport = getIntersectionArea(viewport,
|
|
1973
|
+
if (boundary) {
|
|
1974
|
+
viewport = getIntersectionArea(viewport, offsetViewport(boundary));
|
|
2027
1975
|
}
|
|
2028
1976
|
|
|
2029
|
-
const
|
|
2030
|
-
const
|
|
1977
|
+
const isInStartViewport = position[start] >= viewport[start];
|
|
1978
|
+
const isInEndViewport = position[end] <= viewport[end];
|
|
2031
1979
|
|
|
2032
|
-
if (
|
|
1980
|
+
if (isInStartViewport && isInEndViewport) {
|
|
2033
1981
|
continue;
|
|
2034
1982
|
}
|
|
2035
1983
|
|
|
2036
|
-
let offsetBy;
|
|
1984
|
+
let offsetBy = 0;
|
|
2037
1985
|
|
|
2038
1986
|
// Flip
|
|
2039
|
-
if (
|
|
1987
|
+
if (placement[i] === 'flip') {
|
|
2040
1988
|
if (
|
|
2041
|
-
|
|
2042
|
-
|
|
1989
|
+
targetAttach[i] === end && isInEndViewport ||
|
|
1990
|
+
targetAttach[i] === start && isInStartViewport)
|
|
2043
1991
|
{
|
|
2044
1992
|
continue;
|
|
2045
1993
|
}
|
|
2046
1994
|
|
|
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))
|
|
1995
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2069
1996
|
|
|
2070
|
-
{
|
|
1997
|
+
if (!isInScrollArea(applyOffset(position, offsetBy, i), scrollElement, i)) {
|
|
2071
1998
|
if (isInScrollArea(position, scrollElement, i)) {
|
|
2072
1999
|
continue;
|
|
2073
2000
|
}
|
|
@@ -2076,27 +2003,27 @@
|
|
|
2076
2003
|
return false;
|
|
2077
2004
|
}
|
|
2078
2005
|
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2006
|
+
const newPos = getPosition(element, target, {
|
|
2007
|
+
...options,
|
|
2008
|
+
attach: {
|
|
2009
|
+
element: elAttach.map(flipAxis).reverse(),
|
|
2010
|
+
target: targetAttach.map(flipAxis).reverse() },
|
|
2085
2011
|
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2012
|
+
offset: elOffset.reverse(),
|
|
2013
|
+
placement: placement.reverse(),
|
|
2014
|
+
recursion: true });
|
|
2089
2015
|
|
|
2090
2016
|
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
}
|
|
2017
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2018
|
+
return newPos;
|
|
2094
2019
|
}
|
|
2020
|
+
|
|
2095
2021
|
continue;
|
|
2096
2022
|
}
|
|
2097
2023
|
|
|
2098
|
-
//
|
|
2099
|
-
} else {
|
|
2024
|
+
// Shift
|
|
2025
|
+
} else if (placement[i] === 'shift') {
|
|
2026
|
+
const targetDim = offset(target[i]);
|
|
2100
2027
|
offsetBy =
|
|
2101
2028
|
clamp(
|
|
2102
2029
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2105,13 +2032,54 @@
|
|
|
2105
2032
|
position[start];
|
|
2106
2033
|
}
|
|
2107
2034
|
|
|
2108
|
-
offsetPosition
|
|
2109
|
-
offsetPosition[end] += offsetBy;
|
|
2035
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2110
2036
|
}
|
|
2111
2037
|
|
|
2112
2038
|
return offsetPosition;
|
|
2113
2039
|
}
|
|
2114
2040
|
|
|
2041
|
+
function attachTo(element, target, options) {
|
|
2042
|
+
let { attach, offset: offsetBy } = {
|
|
2043
|
+
attach: {
|
|
2044
|
+
element: ['left', 'top'],
|
|
2045
|
+
target: ['left', 'top'],
|
|
2046
|
+
...options.attach },
|
|
2047
|
+
|
|
2048
|
+
offset: [0, 0],
|
|
2049
|
+
...options };
|
|
2050
|
+
|
|
2051
|
+
|
|
2052
|
+
let elOffset = offset(element);
|
|
2053
|
+
|
|
2054
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
2055
|
+
const targetOffset =
|
|
2056
|
+
attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
|
|
2057
|
+
|
|
2058
|
+
elOffset = applyOffset(
|
|
2059
|
+
elOffset,
|
|
2060
|
+
targetOffset[start] -
|
|
2061
|
+
elOffset[start] +
|
|
2062
|
+
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
2063
|
+
moveBy(attach.element[i], end, elOffset[prop]) +
|
|
2064
|
+
+offsetBy[i],
|
|
2065
|
+
i);
|
|
2066
|
+
|
|
2067
|
+
}
|
|
2068
|
+
return elOffset;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
function applyOffset(position, offset, i) {
|
|
2072
|
+
const [, dir, start, end] = dirs[i];
|
|
2073
|
+
const newPos = { ...position };
|
|
2074
|
+
newPos[start] = position[dir] = position[start] + offset;
|
|
2075
|
+
newPos[end] += offset;
|
|
2076
|
+
return newPos;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
function moveBy(attach, end, dim) {
|
|
2080
|
+
return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2115
2083
|
function getIntersectionArea() {
|
|
2116
2084
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2117
2085
|
for (const rect of rects) {
|
|
@@ -2132,12 +2100,32 @@
|
|
|
2132
2100
|
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2133
2101
|
}
|
|
2134
2102
|
|
|
2135
|
-
function
|
|
2136
|
-
|
|
2137
|
-
|
|
2103
|
+
function flip(element, target, _ref, i) {let { offset, attach } = _ref;
|
|
2104
|
+
return attachTo(element, target, {
|
|
2105
|
+
attach: {
|
|
2106
|
+
element: flipAttach(attach.element, i),
|
|
2107
|
+
target: flipAttach(attach.target, i) },
|
|
2108
|
+
|
|
2109
|
+
offset: flipOffset(offset, i) });
|
|
2110
|
+
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
function flipAttach(attach, i) {
|
|
2114
|
+
const newAttach = [...attach];
|
|
2115
|
+
const index = dirs[i].indexOf(attach[i]);
|
|
2116
|
+
if (~index) {
|
|
2117
|
+
newAttach[i] = dirs[i][1 - index % 2 + 2];
|
|
2118
|
+
}
|
|
2119
|
+
return newAttach;
|
|
2138
2120
|
}
|
|
2139
2121
|
|
|
2140
|
-
function
|
|
2122
|
+
function flipOffset(offset, i) {
|
|
2123
|
+
offset = [...offset];
|
|
2124
|
+
offset[i] *= -1;
|
|
2125
|
+
return offset;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
function flipAxis(prop) {
|
|
2141
2129
|
for (let i = 0; i < dirs.length; i++) {
|
|
2142
2130
|
const index = dirs[i].indexOf(prop);
|
|
2143
2131
|
if (~index) {
|
|
@@ -2150,9 +2138,7 @@
|
|
|
2150
2138
|
__proto__: null,
|
|
2151
2139
|
ajax: ajax,
|
|
2152
2140
|
getImage: getImage,
|
|
2153
|
-
transition: transition,
|
|
2154
2141
|
Transition: Transition,
|
|
2155
|
-
animate: animate$1,
|
|
2156
2142
|
Animation: Animation,
|
|
2157
2143
|
attr: attr,
|
|
2158
2144
|
hasAttr: hasAttr,
|
|
@@ -2282,7 +2268,6 @@
|
|
|
2282
2268
|
findAll: findAll,
|
|
2283
2269
|
escape: escape,
|
|
2284
2270
|
css: css,
|
|
2285
|
-
getCssVar: getCssVar,
|
|
2286
2271
|
propName: propName,
|
|
2287
2272
|
isInView: isInView,
|
|
2288
2273
|
scrollIntoView: scrollIntoView,
|
|
@@ -2458,7 +2443,11 @@
|
|
|
2458
2443
|
}
|
|
2459
2444
|
|
|
2460
2445
|
if (write && result !== false) {
|
|
2461
|
-
fastdom.write(() =>
|
|
2446
|
+
fastdom.write(() => {
|
|
2447
|
+
if (this._connected) {
|
|
2448
|
+
write.call(this, this._data, types);
|
|
2449
|
+
}
|
|
2450
|
+
});
|
|
2462
2451
|
}
|
|
2463
2452
|
}
|
|
2464
2453
|
}
|
|
@@ -2607,7 +2596,7 @@
|
|
|
2607
2596
|
|
|
2608
2597
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2609
2598
|
|
|
2610
|
-
if (prop === 'target' &&
|
|
2599
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2611
2600
|
continue;
|
|
2612
2601
|
}
|
|
2613
2602
|
|
|
@@ -2618,7 +2607,7 @@
|
|
|
2618
2607
|
|
|
2619
2608
|
for (const key in options) {
|
|
2620
2609
|
const prop = camelize(key);
|
|
2621
|
-
if (props[prop]
|
|
2610
|
+
if (!isUndefined(props[prop])) {
|
|
2622
2611
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2623
2612
|
}
|
|
2624
2613
|
}
|
|
@@ -2947,7 +2936,7 @@
|
|
|
2947
2936
|
UIkit.data = '__uikit__';
|
|
2948
2937
|
UIkit.prefix = 'uk-';
|
|
2949
2938
|
UIkit.options = {};
|
|
2950
|
-
UIkit.version = '3.14.4-dev.
|
|
2939
|
+
UIkit.version = '3.14.4-dev.fef7412a0';
|
|
2951
2940
|
|
|
2952
2941
|
globalAPI(UIkit);
|
|
2953
2942
|
hooksAPI(UIkit);
|
|
@@ -3052,27 +3041,7 @@
|
|
|
3052
3041
|
origin: false,
|
|
3053
3042
|
transition: 'ease',
|
|
3054
3043
|
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
|
-
|
|
3044
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3076
3045
|
|
|
3077
3046
|
|
|
3078
3047
|
computed: {
|
|
@@ -3081,7 +3050,7 @@
|
|
|
3081
3050
|
},
|
|
3082
3051
|
|
|
3083
3052
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3084
|
-
return startsWith(animation[0],
|
|
3053
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3085
3054
|
} },
|
|
3086
3055
|
|
|
3087
3056
|
|
|
@@ -3174,130 +3143,105 @@
|
|
|
3174
3143
|
};
|
|
3175
3144
|
}
|
|
3176
3145
|
|
|
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
|
-
|
|
3146
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3147
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3189
3148
|
|
|
3149
|
+
const dirs = [
|
|
3150
|
+
['left', 'right'],
|
|
3151
|
+
['top', 'bottom']];
|
|
3190
3152
|
|
|
3153
|
+
const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
|
|
3154
|
+
const end = dir[1] === startProp;
|
|
3155
|
+
const props = ['width', 'height'];
|
|
3156
|
+
const dimProp = props[dirs.indexOf(dir)];
|
|
3157
|
+
const marginProp = "margin-" + dir[0];
|
|
3158
|
+
const marginStartProp = "margin-" + startProp;
|
|
3191
3159
|
|
|
3160
|
+
return async (el, show) => {
|
|
3161
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3192
3162
|
|
|
3163
|
+
let currentDim = dimensions(el)[dimProp];
|
|
3193
3164
|
|
|
3194
|
-
|
|
3195
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3196
|
-
return (el, show) => {
|
|
3197
3165
|
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;
|
|
3206
|
-
|
|
3207
|
-
Transition.cancel(el);
|
|
3166
|
+
await Transition.cancel(el);
|
|
3208
3167
|
|
|
3209
|
-
if (
|
|
3168
|
+
if (show) {
|
|
3210
3169
|
_toggle(el, true);
|
|
3211
3170
|
}
|
|
3212
3171
|
|
|
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
|
-
}
|
|
3172
|
+
const prevProps = Object.fromEntries(
|
|
3173
|
+
[
|
|
3174
|
+
'padding',
|
|
3175
|
+
'border',
|
|
3176
|
+
'width',
|
|
3177
|
+
'height',
|
|
3178
|
+
'overflowY',
|
|
3179
|
+
'overflowX',
|
|
3180
|
+
marginProp,
|
|
3181
|
+
marginStartProp].
|
|
3182
|
+
map((key) => [key, el.style[key]]));
|
|
3183
|
+
|
|
3184
|
+
|
|
3185
|
+
const dim = dimensions(el);
|
|
3186
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3187
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3188
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3189
|
+
|
|
3190
|
+
if (!inProgress && !show) {
|
|
3191
|
+
currentDim += marginStart;
|
|
3192
|
+
}
|
|
3193
|
+
|
|
3194
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3195
|
+
css(wrapper, {
|
|
3196
|
+
boxSizing: 'border-box',
|
|
3197
|
+
height: dim.height,
|
|
3198
|
+
width: dim.width,
|
|
3199
|
+
...css(el, [
|
|
3200
|
+
'overflow',
|
|
3201
|
+
'padding',
|
|
3202
|
+
'borderTop',
|
|
3203
|
+
'borderRight',
|
|
3204
|
+
'borderBottom',
|
|
3205
|
+
'borderLeft',
|
|
3206
|
+
'borderImage',
|
|
3207
|
+
marginStartProp]) });
|
|
3254
3208
|
|
|
3255
|
-
const width = toFloat(css(el, 'width'));
|
|
3256
|
-
duration = velocity * width + duration;
|
|
3257
3209
|
|
|
3258
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3259
|
-
const offsetEl = offset(el);
|
|
3260
|
-
const useClipPath = right ?
|
|
3261
|
-
offsetEl.right < scrollElement.clientWidth :
|
|
3262
|
-
Math.round(offsetEl.left) > 0;
|
|
3263
3210
|
|
|
3264
3211
|
css(el, {
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3212
|
+
padding: 0,
|
|
3213
|
+
border: 0,
|
|
3214
|
+
[marginStartProp]: 0,
|
|
3215
|
+
width: dim.width,
|
|
3216
|
+
height: dim.height,
|
|
3217
|
+
overflow: 'hidden',
|
|
3218
|
+
[dimProp]: currentDim });
|
|
3272
3219
|
|
|
3273
|
-
return (
|
|
3274
|
-
show ?
|
|
3275
|
-
Transition.start(
|
|
3276
|
-
el,
|
|
3277
|
-
{
|
|
3278
|
-
clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
|
|
3279
|
-
marginLeft: 0 },
|
|
3280
3220
|
|
|
3281
|
-
|
|
3282
|
-
|
|
3221
|
+
const percent = currentDim / endDim;
|
|
3222
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3223
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3283
3224
|
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
3225
|
+
if (end) {
|
|
3226
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3227
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3228
|
+
}
|
|
3289
3229
|
|
|
3230
|
+
if (!end ^ mode === 'reveal') {
|
|
3231
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3232
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3233
|
+
}
|
|
3290
3234
|
|
|
3291
|
-
|
|
3292
|
-
|
|
3235
|
+
try {
|
|
3236
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3237
|
+
} finally {
|
|
3238
|
+
css(el, prevProps);
|
|
3239
|
+
unwrap(wrapper.firstChild);
|
|
3293
3240
|
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
css(scrollElement, 'overflowX', '');
|
|
3299
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3300
|
-
});
|
|
3241
|
+
if (!show) {
|
|
3242
|
+
_toggle(el, false);
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3301
3245
|
};
|
|
3302
3246
|
}
|
|
3303
3247
|
|
|
@@ -3322,6 +3266,7 @@
|
|
|
3322
3266
|
mixins: [Class, Lazyload, Togglable],
|
|
3323
3267
|
|
|
3324
3268
|
props: {
|
|
3269
|
+
animation: Boolean,
|
|
3325
3270
|
targets: String,
|
|
3326
3271
|
active: null,
|
|
3327
3272
|
collapsible: Boolean,
|
|
@@ -3334,7 +3279,7 @@
|
|
|
3334
3279
|
data: {
|
|
3335
3280
|
targets: '> *',
|
|
3336
3281
|
active: false,
|
|
3337
|
-
animation:
|
|
3282
|
+
animation: true,
|
|
3338
3283
|
collapsible: true,
|
|
3339
3284
|
multiple: false,
|
|
3340
3285
|
clsOpen: 'uk-open',
|
|
@@ -3380,7 +3325,7 @@
|
|
|
3380
3325
|
hide(
|
|
3381
3326
|
el,
|
|
3382
3327
|
!hasClass(
|
|
3383
|
-
this.items.find((item) =>
|
|
3328
|
+
this.items.find((item) => within(el, item)),
|
|
3384
3329
|
this.clsOpen));
|
|
3385
3330
|
|
|
3386
3331
|
|
|
@@ -3432,23 +3377,15 @@
|
|
|
3432
3377
|
toggleClass(el, this.clsOpen, show);
|
|
3433
3378
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3434
3379
|
|
|
3435
|
-
const content = $(
|
|
3380
|
+
const content = $(this.content, el);
|
|
3436
3381
|
|
|
3437
|
-
if (animate === false || !this.
|
|
3382
|
+
if (animate === false || !this.animation) {
|
|
3383
|
+
content.hidden = !show;
|
|
3438
3384
|
hide(content, !show);
|
|
3439
3385
|
return;
|
|
3440
3386
|
}
|
|
3441
3387
|
|
|
3442
|
-
|
|
3443
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3444
|
-
}
|
|
3445
|
-
|
|
3446
|
-
hide(content, false);
|
|
3447
|
-
await slide(this)(el._wrapper, show);
|
|
3448
|
-
hide(content, !show);
|
|
3449
|
-
|
|
3450
|
-
delete el._wrapper;
|
|
3451
|
-
unwrap(content);
|
|
3388
|
+
await toggleTransition(this)(content, show);
|
|
3452
3389
|
|
|
3453
3390
|
if (show) {
|
|
3454
3391
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3474,18 +3411,17 @@
|
|
|
3474
3411
|
args: 'animation',
|
|
3475
3412
|
|
|
3476
3413
|
props: {
|
|
3414
|
+
animation: Boolean,
|
|
3477
3415
|
close: String },
|
|
3478
3416
|
|
|
3479
3417
|
|
|
3480
3418
|
data: {
|
|
3481
|
-
animation:
|
|
3419
|
+
animation: true,
|
|
3482
3420
|
selClose: '.uk-alert-close',
|
|
3483
|
-
duration: 150,
|
|
3484
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3421
|
+
duration: 150 },
|
|
3485
3422
|
|
|
3486
3423
|
|
|
3487
|
-
events:
|
|
3488
|
-
{
|
|
3424
|
+
events: {
|
|
3489
3425
|
name: 'click',
|
|
3490
3426
|
|
|
3491
3427
|
delegate() {
|
|
@@ -3495,16 +3431,39 @@
|
|
|
3495
3431
|
handler(e) {
|
|
3496
3432
|
e.preventDefault();
|
|
3497
3433
|
this.close();
|
|
3498
|
-
} }
|
|
3499
|
-
|
|
3434
|
+
} },
|
|
3500
3435
|
|
|
3501
3436
|
|
|
3502
3437
|
methods: {
|
|
3503
3438
|
async close() {
|
|
3504
|
-
await this.toggleElement(this.$el);
|
|
3439
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3505
3440
|
this.$destroy(true);
|
|
3506
3441
|
} } };
|
|
3507
3442
|
|
|
3443
|
+
|
|
3444
|
+
|
|
3445
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3446
|
+
return (el) => {
|
|
3447
|
+
const height = toFloat(css(el, 'height'));
|
|
3448
|
+
css(el, 'height', height);
|
|
3449
|
+
return Transition.start(
|
|
3450
|
+
el,
|
|
3451
|
+
{
|
|
3452
|
+
height: 0,
|
|
3453
|
+
marginTop: 0,
|
|
3454
|
+
marginBottom: 0,
|
|
3455
|
+
paddingTop: 0,
|
|
3456
|
+
paddingBottom: 0,
|
|
3457
|
+
borderTop: 0,
|
|
3458
|
+
borderBottom: 0,
|
|
3459
|
+
opacity: 0 },
|
|
3460
|
+
|
|
3461
|
+
velocity * height + duration,
|
|
3462
|
+
transition);
|
|
3463
|
+
|
|
3464
|
+
};
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3508
3467
|
var Video = {
|
|
3509
3468
|
args: 'autoplay',
|
|
3510
3469
|
|
|
@@ -3653,13 +3612,17 @@
|
|
|
3653
3612
|
props: {
|
|
3654
3613
|
pos: String,
|
|
3655
3614
|
offset: null,
|
|
3656
|
-
flip: Boolean
|
|
3615
|
+
flip: Boolean,
|
|
3616
|
+
shift: Boolean,
|
|
3617
|
+
inset: Boolean },
|
|
3657
3618
|
|
|
3658
3619
|
|
|
3659
3620
|
data: {
|
|
3660
3621
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3622
|
+
offset: false,
|
|
3661
3623
|
flip: true,
|
|
3662
|
-
|
|
3624
|
+
shift: true,
|
|
3625
|
+
inset: false },
|
|
3663
3626
|
|
|
3664
3627
|
|
|
3665
3628
|
connected() {
|
|
@@ -3671,17 +3634,19 @@
|
|
|
3671
3634
|
methods: {
|
|
3672
3635
|
positionAt(element, target, boundary) {
|
|
3673
3636
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3637
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3674
3638
|
|
|
3675
3639
|
const attach = {
|
|
3676
|
-
element: [flipPosition(this.dir), this.align],
|
|
3640
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3677
3641
|
target: [this.dir, this.align] };
|
|
3678
3642
|
|
|
3679
3643
|
|
|
3680
3644
|
if (this.axis === 'y') {
|
|
3681
3645
|
for (const prop in attach) {
|
|
3682
|
-
attach[prop]
|
|
3646
|
+
attach[prop].reverse();
|
|
3683
3647
|
}
|
|
3684
|
-
offset
|
|
3648
|
+
offset.reverse();
|
|
3649
|
+
placement.reverse();
|
|
3685
3650
|
}
|
|
3686
3651
|
|
|
3687
3652
|
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
@@ -3691,22 +3656,14 @@
|
|
|
3691
3656
|
const elDim = dimensions(element);
|
|
3692
3657
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3693
3658
|
|
|
3694
|
-
|
|
3695
|
-
element,
|
|
3696
|
-
target,
|
|
3697
|
-
{
|
|
3659
|
+
positionAt(element, target, {
|
|
3698
3660
|
attach,
|
|
3699
3661
|
offset,
|
|
3700
3662
|
boundary,
|
|
3701
|
-
|
|
3702
|
-
viewportOffset: this.getViewportOffset(element) }
|
|
3663
|
+
placement,
|
|
3664
|
+
viewportOffset: this.getViewportOffset(element) });
|
|
3703
3665
|
|
|
3704
3666
|
|
|
3705
|
-
|
|
3706
|
-
trigger(element, 'beforeposition', args);
|
|
3707
|
-
|
|
3708
|
-
positionAt(...args);
|
|
3709
|
-
|
|
3710
3667
|
// Restore scroll position
|
|
3711
3668
|
scrollElement.scrollTop = scrollTop;
|
|
3712
3669
|
scrollElement.scrollLeft = scrollLeft;
|
|
@@ -3715,27 +3672,38 @@
|
|
|
3715
3672
|
getPositionOffset(element) {
|
|
3716
3673
|
return (
|
|
3717
3674
|
toPx(
|
|
3718
|
-
this.offset === false ?
|
|
3675
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3719
3676
|
this.axis === 'x' ? 'width' : 'height',
|
|
3720
3677
|
element) * (
|
|
3721
|
-
|
|
3678
|
+
|
|
3679
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3680
|
+
this.inset ? -1 : 1));
|
|
3722
3681
|
|
|
3723
3682
|
},
|
|
3724
3683
|
|
|
3725
3684
|
getShiftOffset(element) {
|
|
3726
|
-
return
|
|
3685
|
+
return this.align === 'center' ?
|
|
3727
3686
|
0 :
|
|
3728
3687
|
toPx(
|
|
3729
|
-
|
|
3688
|
+
css(element, '--uk-position-shift-offset'),
|
|
3730
3689
|
this.axis === 'y' ? 'width' : 'height',
|
|
3731
3690
|
element) * (
|
|
3732
3691
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3733
3692
|
},
|
|
3734
3693
|
|
|
3735
3694
|
getViewportOffset(element) {
|
|
3736
|
-
return toPx(
|
|
3695
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3737
3696
|
} } };
|
|
3738
3697
|
|
|
3698
|
+
var Style = {
|
|
3699
|
+
beforeConnect() {
|
|
3700
|
+
this._style = attr(this.$el, 'style');
|
|
3701
|
+
},
|
|
3702
|
+
|
|
3703
|
+
disconnected() {
|
|
3704
|
+
attr(this.$el, 'style', this._style);
|
|
3705
|
+
} };
|
|
3706
|
+
|
|
3739
3707
|
const active$1 = [];
|
|
3740
3708
|
|
|
3741
3709
|
var Modal = {
|
|
@@ -3845,8 +3813,8 @@
|
|
|
3845
3813
|
|
|
3846
3814
|
|
|
3847
3815
|
if (this.overlay) {
|
|
3848
|
-
once(this.$el, '
|
|
3849
|
-
once(this.$el, '
|
|
3816
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3817
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3850
3818
|
}
|
|
3851
3819
|
|
|
3852
3820
|
if (this.stack) {
|
|
@@ -3928,10 +3896,6 @@
|
|
|
3928
3896
|
active$1.splice(active$1.indexOf(this), 1);
|
|
3929
3897
|
}
|
|
3930
3898
|
|
|
3931
|
-
if (!active$1.length) {
|
|
3932
|
-
css(document.body, 'overflowY', '');
|
|
3933
|
-
}
|
|
3934
|
-
|
|
3935
3899
|
css(this.$el, 'zIndex', '');
|
|
3936
3900
|
|
|
3937
3901
|
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
@@ -4048,16 +4012,22 @@
|
|
|
4048
4012
|
return () => events.forEach((fn) => fn());
|
|
4049
4013
|
}
|
|
4050
4014
|
|
|
4015
|
+
let prevented;
|
|
4051
4016
|
function preventBackgroundScroll() {
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4017
|
+
if (prevented) {
|
|
4018
|
+
return noop;
|
|
4019
|
+
}
|
|
4020
|
+
prevented = true;
|
|
4021
|
+
|
|
4022
|
+
const { scrollingElement } = document;
|
|
4023
|
+
css(scrollingElement, {
|
|
4024
|
+
overflowY: 'hidden',
|
|
4025
|
+
touchAction: 'none',
|
|
4026
|
+
paddingRight: width(window) - scrollingElement.clientWidth });
|
|
4056
4027
|
|
|
4057
|
-
css(documentElement, 'overflowY', 'hidden');
|
|
4058
4028
|
return () => {
|
|
4059
|
-
|
|
4060
|
-
css(
|
|
4029
|
+
prevented = false;
|
|
4030
|
+
css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
|
|
4061
4031
|
};
|
|
4062
4032
|
}
|
|
4063
4033
|
|
|
@@ -4074,7 +4044,7 @@
|
|
|
4074
4044
|
let active;
|
|
4075
4045
|
|
|
4076
4046
|
var drop = {
|
|
4077
|
-
mixins: [Container, Lazyload, Position, Togglable],
|
|
4047
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4078
4048
|
|
|
4079
4049
|
args: 'pos',
|
|
4080
4050
|
|
|
@@ -4082,10 +4052,13 @@
|
|
|
4082
4052
|
mode: 'list',
|
|
4083
4053
|
toggle: Boolean,
|
|
4084
4054
|
boundary: Boolean,
|
|
4085
|
-
|
|
4055
|
+
target: Boolean,
|
|
4056
|
+
targetX: Boolean,
|
|
4057
|
+
targetY: Boolean,
|
|
4058
|
+
stretch: Boolean,
|
|
4086
4059
|
delayShow: Number,
|
|
4087
4060
|
delayHide: Number,
|
|
4088
|
-
|
|
4061
|
+
autoUpdate: Boolean,
|
|
4089
4062
|
clsDrop: String,
|
|
4090
4063
|
animateOut: Boolean,
|
|
4091
4064
|
bgScroll: Boolean },
|
|
@@ -4094,17 +4067,32 @@
|
|
|
4094
4067
|
data: {
|
|
4095
4068
|
mode: ['click', 'hover'],
|
|
4096
4069
|
toggle: '- *',
|
|
4097
|
-
boundary:
|
|
4098
|
-
|
|
4070
|
+
boundary: false,
|
|
4071
|
+
target: false,
|
|
4072
|
+
targetX: false,
|
|
4073
|
+
targetY: false,
|
|
4074
|
+
stretch: false,
|
|
4099
4075
|
delayShow: 0,
|
|
4100
4076
|
delayHide: 800,
|
|
4101
|
-
|
|
4077
|
+
autoUpdate: true,
|
|
4102
4078
|
clsDrop: false,
|
|
4079
|
+
animateOut: false,
|
|
4080
|
+
bgScroll: true,
|
|
4103
4081
|
animation: ['uk-animation-fade'],
|
|
4104
4082
|
cls: 'uk-open',
|
|
4105
|
-
container: false,
|
|
4106
|
-
|
|
4107
|
-
|
|
4083
|
+
container: false },
|
|
4084
|
+
|
|
4085
|
+
|
|
4086
|
+
computed: {
|
|
4087
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4088
|
+
targetX = targetX || target || this.targetEl;
|
|
4089
|
+
targetY = targetY || target || this.targetEl;
|
|
4090
|
+
|
|
4091
|
+
return [
|
|
4092
|
+
targetX === true ? window : query(targetX, $el),
|
|
4093
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4094
|
+
|
|
4095
|
+
} },
|
|
4108
4096
|
|
|
4109
4097
|
|
|
4110
4098
|
created() {
|
|
@@ -4118,18 +4106,19 @@
|
|
|
4118
4106
|
connected() {
|
|
4119
4107
|
addClass(this.$el, this.clsDrop);
|
|
4120
4108
|
|
|
4121
|
-
if (this.toggle && !this.
|
|
4122
|
-
this.
|
|
4109
|
+
if (this.toggle && !this.targetEl) {
|
|
4110
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4123
4111
|
target: this.$el,
|
|
4124
4112
|
mode: this.mode }).
|
|
4125
4113
|
$el;
|
|
4126
|
-
attr(this.
|
|
4127
|
-
this.lazyload(this.
|
|
4114
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4115
|
+
this.lazyload(this.targetEl);
|
|
4128
4116
|
}
|
|
4129
4117
|
},
|
|
4130
4118
|
|
|
4131
4119
|
disconnected() {
|
|
4132
4120
|
if (this.isActive()) {
|
|
4121
|
+
this.hide(false);
|
|
4133
4122
|
active = null;
|
|
4134
4123
|
}
|
|
4135
4124
|
},
|
|
@@ -4155,7 +4144,7 @@
|
|
|
4155
4144
|
return 'a[href^="#"]';
|
|
4156
4145
|
},
|
|
4157
4146
|
|
|
4158
|
-
handler(
|
|
4147
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4159
4148
|
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4160
4149
|
this.hide(false);
|
|
4161
4150
|
}
|
|
@@ -4263,21 +4252,22 @@
|
|
|
4263
4252
|
|
|
4264
4253
|
this.tracker.init();
|
|
4265
4254
|
|
|
4266
|
-
|
|
4255
|
+
const update = () => this.$emit();
|
|
4256
|
+
const handlers = [
|
|
4267
4257
|
on(
|
|
4268
4258
|
document,
|
|
4269
4259
|
pointerDown,
|
|
4270
|
-
(
|
|
4260
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4271
4261
|
!within(target, this.$el) &&
|
|
4272
4262
|
once(
|
|
4273
4263
|
document,
|
|
4274
4264
|
pointerUp + " " + pointerCancel + " scroll",
|
|
4275
|
-
(
|
|
4265
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4276
4266
|
if (
|
|
4277
4267
|
!defaultPrevented &&
|
|
4278
4268
|
type === pointerUp &&
|
|
4279
4269
|
target === newTarget &&
|
|
4280
|
-
!(this.
|
|
4270
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4281
4271
|
{
|
|
4282
4272
|
this.hide(false);
|
|
4283
4273
|
}
|
|
@@ -4292,29 +4282,28 @@
|
|
|
4292
4282
|
}
|
|
4293
4283
|
}),
|
|
4294
4284
|
|
|
4285
|
+
on(window, 'resize', update),
|
|
4286
|
+
|
|
4287
|
+
(() => {
|
|
4288
|
+
const observer = observeResize(
|
|
4289
|
+
scrollParents(this.$el).concat(this.targetEl),
|
|
4290
|
+
update);
|
|
4291
|
+
|
|
4292
|
+
return () => observer.disconnect();
|
|
4293
|
+
})(),
|
|
4294
|
+
|
|
4295
|
+
...(this.autoUpdate ?
|
|
4296
|
+
[on([document, scrollParents(this.$el)], 'scroll', update)] :
|
|
4297
|
+
[]),
|
|
4298
|
+
|
|
4295
4299
|
...(this.bgScroll ?
|
|
4296
4300
|
[] :
|
|
4297
|
-
[preventOverscroll(this.$el), preventBackgroundScroll()])
|
|
4301
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()])];
|
|
4302
|
+
|
|
4303
|
+
|
|
4304
|
+
once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
|
|
4305
|
+
self: true });
|
|
4298
4306
|
|
|
4299
|
-
...(this.display === 'static' && this.align !== 'stretch' ?
|
|
4300
|
-
[] :
|
|
4301
|
-
(() => {
|
|
4302
|
-
const handler = () => this.$emit();
|
|
4303
|
-
return [
|
|
4304
|
-
on(window, 'resize', handler),
|
|
4305
|
-
on(document, 'scroll', handler, true),
|
|
4306
|
-
(() => {
|
|
4307
|
-
const observer = observeResize(
|
|
4308
|
-
scrollParents(this.$el),
|
|
4309
|
-
handler);
|
|
4310
|
-
|
|
4311
|
-
return () => observer.disconnect();
|
|
4312
|
-
})()];
|
|
4313
|
-
|
|
4314
|
-
})())])
|
|
4315
|
-
{
|
|
4316
|
-
once(this.$el, 'hide', handler, { self: true });
|
|
4317
|
-
}
|
|
4318
4307
|
} },
|
|
4319
4308
|
|
|
4320
4309
|
|
|
@@ -4331,7 +4320,7 @@
|
|
|
4331
4320
|
{
|
|
4332
4321
|
name: 'hide',
|
|
4333
4322
|
|
|
4334
|
-
handler(
|
|
4323
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4335
4324
|
if (this.$el !== target) {
|
|
4336
4325
|
active =
|
|
4337
4326
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4355,12 +4344,12 @@
|
|
|
4355
4344
|
|
|
4356
4345
|
|
|
4357
4346
|
methods: {
|
|
4358
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4359
|
-
if (this.isToggled() && target && this.
|
|
4347
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4348
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4360
4349
|
this.hide(false, false);
|
|
4361
4350
|
}
|
|
4362
4351
|
|
|
4363
|
-
this.
|
|
4352
|
+
this.targetEl = target;
|
|
4364
4353
|
|
|
4365
4354
|
this.clearTimers();
|
|
4366
4355
|
|
|
@@ -4423,60 +4412,69 @@
|
|
|
4423
4412
|
|
|
4424
4413
|
position() {
|
|
4425
4414
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4426
|
-
|
|
4427
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4415
|
+
attr(this.$el, 'style', this._style);
|
|
4428
4416
|
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
const [scrollParent] = scrollParents(
|
|
4432
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4417
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4418
|
+
this.$el.hidden = true;
|
|
4433
4419
|
|
|
4434
|
-
const
|
|
4435
|
-
const boundaryOffset = boundary
|
|
4420
|
+
const boundary = query(this.boundary, this.$el);
|
|
4421
|
+
const boundaryOffset = offsetViewport(boundary || window);
|
|
4422
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4436
4423
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4437
4424
|
|
|
4438
|
-
|
|
4439
|
-
|
|
4425
|
+
const dirs = [
|
|
4426
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4427
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4440
4428
|
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4458
|
-
|
|
4459
|
-
css(this.$el, {
|
|
4460
|
-
width:
|
|
4461
|
-
this.axis === 'y' ?
|
|
4462
|
-
viewport.width :
|
|
4463
|
-
(this.dir === 'left' ?
|
|
4464
|
-
targetDim.left - viewport.left :
|
|
4465
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4466
|
-
height:
|
|
4467
|
-
this.axis === 'x' ?
|
|
4468
|
-
viewport.height :
|
|
4469
|
-
(this.dir === 'top' ?
|
|
4470
|
-
targetDim.top - viewport.top :
|
|
4471
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4472
|
-
|
|
4473
|
-
} else if (this.$el.offsetWidth > maxWidth) {
|
|
4429
|
+
|
|
4430
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4431
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4432
|
+
css(this.$el, {
|
|
4433
|
+
[prop]: Math.min(
|
|
4434
|
+
boundaryOffset[prop],
|
|
4435
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4436
|
+
|
|
4437
|
+
["overflow-" + axis]: 'auto' });
|
|
4438
|
+
|
|
4439
|
+
}
|
|
4440
|
+
}
|
|
4441
|
+
|
|
4442
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4443
|
+
|
|
4444
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4474
4445
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4475
4446
|
}
|
|
4476
4447
|
|
|
4477
4448
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4478
4449
|
|
|
4479
|
-
this
|
|
4450
|
+
this.$el.hidden = false;
|
|
4451
|
+
|
|
4452
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4453
|
+
|
|
4454
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4455
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4456
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4457
|
+
const targetOffset = offset(this.target[i]);
|
|
4458
|
+
const elOffset = offset(this.$el);
|
|
4459
|
+
|
|
4460
|
+
css(this.$el, {
|
|
4461
|
+
[prop]:
|
|
4462
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4463
|
+
targetOffset[start] -
|
|
4464
|
+
Math.max(
|
|
4465
|
+
boundaryOffset[start],
|
|
4466
|
+
viewports[i][start] + viewportOffset) :
|
|
4467
|
+
|
|
4468
|
+
Math.min(
|
|
4469
|
+
boundaryOffset[end],
|
|
4470
|
+
viewports[i][end] - viewportOffset) -
|
|
4471
|
+
targetOffset[end]) - positionOffset,
|
|
4472
|
+
["overflow-" + axis]: 'auto' });
|
|
4473
|
+
|
|
4474
|
+
|
|
4475
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4476
|
+
}
|
|
4477
|
+
}
|
|
4480
4478
|
} } };
|
|
4481
4479
|
|
|
4482
4480
|
|
|
@@ -4973,8 +4971,11 @@
|
|
|
4973
4971
|
let minHeight = '';
|
|
4974
4972
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4975
4973
|
|
|
4974
|
+
const { body, scrollingElement } = document;
|
|
4976
4975
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4977
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4976
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4977
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4978
|
+
|
|
4978
4979
|
|
|
4979
4980
|
if (this.expand) {
|
|
4980
4981
|
minHeight = Math.max(
|
|
@@ -4984,7 +4985,8 @@
|
|
|
4984
4985
|
0);
|
|
4985
4986
|
|
|
4986
4987
|
} else {
|
|
4987
|
-
const isScrollingElement =
|
|
4988
|
+
const isScrollingElement =
|
|
4989
|
+
scrollingElement === scrollElement || body === scrollElement;
|
|
4988
4990
|
|
|
4989
4991
|
// on mobile devices (iOS and Android) window.innerHeight !== 100vh
|
|
4990
4992
|
minHeight = "calc(" + (isScrollingElement ? '100vh' : viewportHeight + "px");
|
|
@@ -5238,7 +5240,13 @@
|
|
|
5238
5240
|
|
|
5239
5241
|
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>";
|
|
5240
5242
|
|
|
5241
|
-
var
|
|
5243
|
+
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>";
|
|
5244
|
+
|
|
5245
|
+
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>";
|
|
5246
|
+
|
|
5247
|
+
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>";
|
|
5248
|
+
|
|
5249
|
+
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>";
|
|
5242
5250
|
|
|
5243
5251
|
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>";
|
|
5244
5252
|
|
|
@@ -5270,6 +5278,9 @@
|
|
|
5270
5278
|
marker,
|
|
5271
5279
|
'close-icon': closeIcon,
|
|
5272
5280
|
'close-large': closeLarge,
|
|
5281
|
+
'nav-parent-icon': navParentIcon,
|
|
5282
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5283
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
5273
5284
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
5274
5285
|
'overlay-icon': overlayIcon,
|
|
5275
5286
|
'pagination-next': paginationNext,
|
|
@@ -5327,6 +5338,15 @@
|
|
|
5327
5338
|
} };
|
|
5328
5339
|
|
|
5329
5340
|
|
|
5341
|
+
const NavParentIcon = {
|
|
5342
|
+
extends: IconComponent,
|
|
5343
|
+
|
|
5344
|
+
beforeConnect() {
|
|
5345
|
+
const icon = this.$props.icon;
|
|
5346
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5347
|
+
} };
|
|
5348
|
+
|
|
5349
|
+
|
|
5330
5350
|
const Slidenav = {
|
|
5331
5351
|
extends: IconComponent,
|
|
5332
5352
|
|
|
@@ -5587,7 +5607,7 @@
|
|
|
5587
5607
|
|
|
5588
5608
|
|
|
5589
5609
|
connected() {
|
|
5590
|
-
const media = toMedia(this.media);
|
|
5610
|
+
const media = toMedia(this.media, this.$el);
|
|
5591
5611
|
this.matchMedia = true;
|
|
5592
5612
|
if (media) {
|
|
5593
5613
|
this.mediaObj = window.matchMedia(media);
|
|
@@ -5608,11 +5628,10 @@
|
|
|
5608
5628
|
} };
|
|
5609
5629
|
|
|
5610
5630
|
|
|
5611
|
-
function toMedia(value) {
|
|
5631
|
+
function toMedia(value, element) {
|
|
5612
5632
|
if (isString(value)) {
|
|
5613
5633
|
if (startsWith(value, '@')) {
|
|
5614
|
-
|
|
5615
|
-
value = toFloat(getCssVar(name));
|
|
5634
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5616
5635
|
} else if (isNaN(value)) {
|
|
5617
5636
|
return value;
|
|
5618
5637
|
}
|
|
@@ -5637,7 +5656,7 @@
|
|
|
5637
5656
|
|
|
5638
5657
|
computed: {
|
|
5639
5658
|
fill(_ref) {let { fill } = _ref;
|
|
5640
|
-
return fill ||
|
|
5659
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5641
5660
|
} },
|
|
5642
5661
|
|
|
5643
5662
|
|
|
@@ -5829,7 +5848,9 @@
|
|
|
5829
5848
|
align: String,
|
|
5830
5849
|
offset: Number,
|
|
5831
5850
|
boundary: Boolean,
|
|
5832
|
-
|
|
5851
|
+
target: Boolean,
|
|
5852
|
+
targetX: Boolean,
|
|
5853
|
+
targetY: Boolean,
|
|
5833
5854
|
clsDrop: String,
|
|
5834
5855
|
delayShow: Number,
|
|
5835
5856
|
delayHide: Number,
|
|
@@ -5846,9 +5867,12 @@
|
|
|
5846
5867
|
offset: undefined,
|
|
5847
5868
|
delayShow: undefined,
|
|
5848
5869
|
delayHide: undefined,
|
|
5849
|
-
|
|
5850
|
-
|
|
5870
|
+
flip: false,
|
|
5871
|
+
shift: true,
|
|
5851
5872
|
boundary: true,
|
|
5873
|
+
target: false,
|
|
5874
|
+
targetX: false,
|
|
5875
|
+
targetY: false,
|
|
5852
5876
|
dropbar: false,
|
|
5853
5877
|
dropbarAnchor: false,
|
|
5854
5878
|
duration: 200,
|
|
@@ -5883,7 +5907,7 @@
|
|
|
5883
5907
|
},
|
|
5884
5908
|
|
|
5885
5909
|
watch(dropbar) {
|
|
5886
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5910
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5887
5911
|
},
|
|
5888
5912
|
|
|
5889
5913
|
immediate: true },
|
|
@@ -5899,7 +5923,7 @@
|
|
|
5899
5923
|
|
|
5900
5924
|
if (this.dropContainer !== $el) {
|
|
5901
5925
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5902
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5926
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5903
5927
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5904
5928
|
dropdowns.push(el);
|
|
5905
5929
|
}
|
|
@@ -5961,8 +5985,8 @@
|
|
|
5961
5985
|
if (
|
|
5962
5986
|
active &&
|
|
5963
5987
|
includes(active.mode, 'hover') &&
|
|
5964
|
-
active.
|
|
5965
|
-
!within(active.
|
|
5988
|
+
active.targetEl &&
|
|
5989
|
+
!within(active.targetEl, current) &&
|
|
5966
5990
|
!active.isDelaying)
|
|
5967
5991
|
{
|
|
5968
5992
|
active.hide(false);
|
|
@@ -5984,7 +6008,7 @@
|
|
|
5984
6008
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5985
6009
|
e.preventDefault();
|
|
5986
6010
|
|
|
5987
|
-
if (!active || active.
|
|
6011
|
+
if (!active || active.targetEl !== current) {
|
|
5988
6012
|
current.click();
|
|
5989
6013
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5990
6014
|
focusFirstFocusableElement(target));});
|
|
@@ -6034,8 +6058,8 @@
|
|
|
6034
6058
|
}
|
|
6035
6059
|
}
|
|
6036
6060
|
|
|
6037
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
6038
|
-
active == null ? void 0 : (_active$
|
|
6061
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6062
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
6039
6063
|
}
|
|
6040
6064
|
|
|
6041
6065
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -6106,39 +6130,19 @@
|
|
|
6106
6130
|
return;
|
|
6107
6131
|
}
|
|
6108
6132
|
|
|
6109
|
-
this._observer = observeResize(target, () =>
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
{
|
|
6121
|
-
name: 'beforeposition',
|
|
6122
|
-
|
|
6123
|
-
el() {
|
|
6124
|
-
return this.dropContainer;
|
|
6125
|
-
},
|
|
6126
|
-
|
|
6127
|
-
filter() {
|
|
6128
|
-
return this.dropbar;
|
|
6129
|
-
},
|
|
6130
|
-
|
|
6131
|
-
handler(e, element, target, options) {
|
|
6132
|
-
if (!this.isDropbarDrop(element)) {
|
|
6133
|
-
return;
|
|
6134
|
-
}
|
|
6135
|
-
|
|
6136
|
-
const dropbarOffset = offset(this.dropbar);
|
|
6133
|
+
this._observer = observeResize(target, () => {
|
|
6134
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6135
|
+
concat(target).
|
|
6136
|
+
map((el) => offset(el));
|
|
6137
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6138
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6139
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6140
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6141
|
+
this.transitionTo(
|
|
6142
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6143
|
+
target);
|
|
6137
6144
|
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
options.offset[1] = dropbarOffset.top - offset(target).bottom;
|
|
6141
|
-
options.viewportOffset += dropbarOffset.left;
|
|
6145
|
+
});
|
|
6142
6146
|
} },
|
|
6143
6147
|
|
|
6144
6148
|
|
|
@@ -6159,7 +6163,7 @@
|
|
|
6159
6163
|
if (
|
|
6160
6164
|
matches(this.dropbar, ':hover') &&
|
|
6161
6165
|
(active == null ? void 0 : active.$el) === e.target &&
|
|
6162
|
-
!this.toggles.some((el) => active.
|
|
6166
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6163
6167
|
{
|
|
6164
6168
|
e.preventDefault();
|
|
6165
6169
|
}
|
|
@@ -6177,7 +6181,7 @@
|
|
|
6177
6181
|
return this.dropbar;
|
|
6178
6182
|
},
|
|
6179
6183
|
|
|
6180
|
-
handler(
|
|
6184
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6181
6185
|
if (!this.isDropbarDrop(target)) {
|
|
6182
6186
|
return;
|
|
6183
6187
|
}
|
|
@@ -6195,7 +6199,7 @@
|
|
|
6195
6199
|
|
|
6196
6200
|
methods: {
|
|
6197
6201
|
getActive() {
|
|
6198
|
-
return active
|
|
6202
|
+
return includes(this.dropdowns, active == null ? void 0 : active.$el) && active;
|
|
6199
6203
|
},
|
|
6200
6204
|
|
|
6201
6205
|
transitionTo(newHeight, el) {
|
|
@@ -6228,15 +6232,14 @@
|
|
|
6228
6232
|
},
|
|
6229
6233
|
|
|
6230
6234
|
isDropbarDrop(el) {
|
|
6231
|
-
|
|
6232
|
-
return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
|
|
6235
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6233
6236
|
} } };
|
|
6234
6237
|
|
|
6235
6238
|
|
|
6236
6239
|
|
|
6237
6240
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6238
6241
|
const { current, keyCode } = e;
|
|
6239
|
-
const target = (active == null ? void 0 : active.
|
|
6242
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6240
6243
|
const i = toggles.indexOf(target);
|
|
6241
6244
|
|
|
6242
6245
|
// Left
|
|
@@ -6436,9 +6439,12 @@
|
|
|
6436
6439
|
addClass(parent(this.panel), this.clsMode);
|
|
6437
6440
|
}
|
|
6438
6441
|
|
|
6439
|
-
|
|
6440
|
-
|
|
6442
|
+
const { body, scrollingElement } = document;
|
|
6443
|
+
|
|
6444
|
+
addClass(body, this.clsContainer, this.clsFlip);
|
|
6445
|
+
css(body, 'touch-action', 'pan-y pinch-zoom');
|
|
6441
6446
|
css(this.$el, 'display', 'block');
|
|
6447
|
+
css(this.panel, 'maxWidth', scrollingElement.clientWidth);
|
|
6442
6448
|
addClass(this.$el, this.clsOverlay);
|
|
6443
6449
|
addClass(
|
|
6444
6450
|
this.panel,
|
|
@@ -6446,8 +6452,8 @@
|
|
|
6446
6452
|
this.mode === 'reveal' ? '' : this.clsMode);
|
|
6447
6453
|
|
|
6448
6454
|
|
|
6449
|
-
height(
|
|
6450
|
-
addClass(
|
|
6455
|
+
height(body); // force reflow
|
|
6456
|
+
addClass(body, this.clsContainerAnimation);
|
|
6451
6457
|
|
|
6452
6458
|
this.clsContainerAnimation && suppressUserScale();
|
|
6453
6459
|
} },
|
|
@@ -6479,6 +6485,7 @@
|
|
|
6479
6485
|
removeClass(this.panel, this.clsSidebarAnimation, this.clsMode);
|
|
6480
6486
|
removeClass(this.$el, this.clsOverlay);
|
|
6481
6487
|
css(this.$el, 'display', '');
|
|
6488
|
+
css(this.panel, 'maxWidth', '');
|
|
6482
6489
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
6483
6490
|
} },
|
|
6484
6491
|
|
|
@@ -6604,6 +6611,14 @@
|
|
|
6604
6611
|
offset: 0 },
|
|
6605
6612
|
|
|
6606
6613
|
|
|
6614
|
+
connected() {
|
|
6615
|
+
registerClick(this);
|
|
6616
|
+
},
|
|
6617
|
+
|
|
6618
|
+
disconnected() {
|
|
6619
|
+
unregisterClick(this);
|
|
6620
|
+
},
|
|
6621
|
+
|
|
6607
6622
|
methods: {
|
|
6608
6623
|
async scrollTo(el) {
|
|
6609
6624
|
el = el && $(el) || document.body;
|
|
@@ -6612,20 +6627,39 @@
|
|
|
6612
6627
|
await scrollIntoView(el, { offset: this.offset });
|
|
6613
6628
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6614
6629
|
}
|
|
6615
|
-
} }
|
|
6630
|
+
} } };
|
|
6616
6631
|
|
|
6617
6632
|
|
|
6618
|
-
events: {
|
|
6619
|
-
click(e) {
|
|
6620
|
-
if (e.defaultPrevented) {
|
|
6621
|
-
return;
|
|
6622
|
-
}
|
|
6623
6633
|
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6634
|
+
const components$1 = new Set();
|
|
6635
|
+
function registerClick(cmp) {
|
|
6636
|
+
if (!components$1.size) {
|
|
6637
|
+
on(document, 'click', clickHandler);
|
|
6638
|
+
}
|
|
6639
|
+
|
|
6640
|
+
components$1.add(cmp);
|
|
6641
|
+
}
|
|
6642
|
+
|
|
6643
|
+
function unregisterClick(cmp) {
|
|
6644
|
+
components$1.delete(cmp);
|
|
6627
6645
|
|
|
6646
|
+
if (!components$1.length) {
|
|
6647
|
+
off(document, 'click', clickHandler);
|
|
6648
|
+
}
|
|
6649
|
+
}
|
|
6650
|
+
|
|
6651
|
+
function clickHandler(e) {
|
|
6652
|
+
if (e.defaultPrevented) {
|
|
6653
|
+
return;
|
|
6654
|
+
}
|
|
6628
6655
|
|
|
6656
|
+
for (const component of components$1) {
|
|
6657
|
+
if (within(e.target, component.$el)) {
|
|
6658
|
+
e.preventDefault();
|
|
6659
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6660
|
+
}
|
|
6661
|
+
}
|
|
6662
|
+
}
|
|
6629
6663
|
|
|
6630
6664
|
function getTargetElement(el) {
|
|
6631
6665
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -7588,7 +7622,7 @@
|
|
|
7588
7622
|
|
|
7589
7623
|
|
|
7590
7624
|
{
|
|
7591
|
-
name: '
|
|
7625
|
+
name: 'hide show',
|
|
7592
7626
|
|
|
7593
7627
|
self: true,
|
|
7594
7628
|
|
|
@@ -7596,10 +7630,8 @@
|
|
|
7596
7630
|
return this.target;
|
|
7597
7631
|
},
|
|
7598
7632
|
|
|
7599
|
-
handler(
|
|
7600
|
-
|
|
7601
|
-
this.updateAria(toggled);
|
|
7602
|
-
}
|
|
7633
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7634
|
+
this.updateAria(type === 'show');
|
|
7603
7635
|
} },
|
|
7604
7636
|
|
|
7605
7637
|
|
|
@@ -7694,10 +7726,12 @@
|
|
|
7694
7726
|
Video: Video,
|
|
7695
7727
|
Close: Close,
|
|
7696
7728
|
Spinner: Spinner,
|
|
7729
|
+
NavParentIcon: NavParentIcon,
|
|
7697
7730
|
SlidenavNext: Slidenav,
|
|
7698
7731
|
SlidenavPrevious: Slidenav,
|
|
7699
7732
|
SearchIcon: Search,
|
|
7700
7733
|
Marker: IconComponent,
|
|
7734
|
+
NavbarParentIcon: IconComponent,
|
|
7701
7735
|
NavbarToggleIcon: IconComponent,
|
|
7702
7736
|
OverlayIcon: IconComponent,
|
|
7703
7737
|
PaginationNext: IconComponent,
|