uikit 3.14.4-dev.a02c81d72 → 3.14.4-dev.a3fc077ea
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 +34 -17
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +339 -109
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +339 -109
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +359 -113
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +359 -113
- 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 +89 -132
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +89 -132
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +1 -1
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +4 -5
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +4 -5
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +4 -5
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +102 -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 +476 -452
- package/dist/js/uikit-core.min.js +14 -1
- package/dist/js/uikit-icons.js +1 -1
- package/dist/js/uikit-icons.min.js +1 -1
- package/dist/js/uikit.js +476 -452
- package/dist/js/uikit.min.js +14 -1
- package/package.json +1 -1
- package/src/images/{backgrounds/nav-parent-close.svg → components/nav-parent-icon-large.svg} +0 -0
- package/src/images/{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 +22 -3
- package/src/js/api/state.js +2 -2
- package/src/js/core/accordion.js +9 -17
- package/src/js/core/alert.js +35 -14
- package/src/js/core/drop.js +89 -62
- 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/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 +9 -6
- 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 +4 -3
- package/src/js/util/class.js +3 -1
- package/src/js/util/filter.js +3 -7
- package/src/js/util/position.js +107 -107
- package/src/js/util/style.js +4 -13
- package/src/js/util/viewport.js +3 -5
- package/src/less/components/_import.less +1 -0
- package/src/less/components/drop.less +1 -18
- package/src/less/components/dropbar.less +115 -0
- package/src/less/components/dropdown.less +11 -19
- package/src/less/components/leader.less +1 -1
- package/src/less/components/nav.less +218 -59
- package/src/less/components/navbar.less +54 -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 +1 -5
- package/src/scss/components/_import.scss +1 -0
- package/src/scss/components/drop.scss +1 -18
- package/src/scss/components/dropbar.scss +115 -0
- package/src/scss/components/dropdown.scss +11 -19
- package/src/scss/components/leader.scss +1 -1
- package/src/scss/components/nav.scss +167 -47
- package/src/scss/components/navbar.scss +42 -47
- package/src/scss/components/utility.scss +8 -1
- package/src/scss/mixins-theme.scss +92 -21
- 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 +1 -5
- package/src/scss/variables-theme.scss +56 -19
- package/src/scss/variables.scss +45 -17
- package/tests/accordion.html +2 -2
- package/tests/alert.html +2 -2
- package/tests/countdown.html +1 -1
- package/tests/drop.html +442 -412
- package/tests/dropbar.html +456 -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 +102 -237
- package/tests/offcanvas.html +17 -21
- package/tests/parallax.html +1 -1
- package/tests/position.html +18 -16
- package/tests/progress.html +9 -9
- package/tests/scroll.html +7 -10
- package/tests/search.html +5 -5
- package/tests/slider.html +6 -5
- package/tests/slideshow.html +8 -8
- package/tests/sortable.html +6 -8
- package/tests/sticky-navbar.html +6 -6
- package/tests/sticky.html +8 -8
- package/tests/switcher.html +1 -1
- package/tests/tab.html +1 -1
- package/tests/table.html +7 -7
- package/tests/toggle.html +2 -2
- package/tests/tooltip.html +1 -1
- package/tests/upload.html +11 -11
- package/tests/utility.html +19 -0
- package/src/images/backgrounds/nav-parent-open.svg +0 -3
package/dist/js/uikit.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.a3fc077ea | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -383,12 +383,8 @@
|
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
function closest(element, selector) {
|
|
386
|
-
if (startsWith(selector, '>')) {
|
|
387
|
-
selector = selector.slice(1);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
386
|
return isElement(element) ?
|
|
391
|
-
element.closest(selector) :
|
|
387
|
+
element.closest(startsWith(selector, '>') ? selector.slice(1) : selector) :
|
|
392
388
|
toNodes(element).
|
|
393
389
|
map((element) => closest(element, selector)).
|
|
394
390
|
filter(Boolean);
|
|
@@ -396,8 +392,8 @@
|
|
|
396
392
|
|
|
397
393
|
function within(element, selector) {
|
|
398
394
|
return isString(selector) ?
|
|
399
|
-
|
|
400
|
-
|
|
395
|
+
!!closest(element, selector) :
|
|
396
|
+
toNode(selector).contains(toNode(element));
|
|
401
397
|
}
|
|
402
398
|
|
|
403
399
|
function parents(element, selector) {
|
|
@@ -785,18 +781,11 @@
|
|
|
785
781
|
return elements[0];
|
|
786
782
|
}
|
|
787
783
|
|
|
788
|
-
const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
|
|
789
|
-
function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
|
|
790
|
-
return css(element, "--uk-" + name).replace(propertyRe, '$2');
|
|
791
|
-
}
|
|
792
|
-
|
|
793
784
|
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
|
|
794
785
|
const propName = memoize((name) => vendorPropName(name));
|
|
795
786
|
|
|
796
|
-
const cssPrefixes = ['webkit', 'moz'];
|
|
797
|
-
|
|
798
787
|
function vendorPropName(name) {
|
|
799
|
-
if (name
|
|
788
|
+
if (startsWith(name, '--')) {
|
|
800
789
|
return name;
|
|
801
790
|
}
|
|
802
791
|
|
|
@@ -808,11 +797,8 @@
|
|
|
808
797
|
return name;
|
|
809
798
|
}
|
|
810
799
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
while (i--) {
|
|
815
|
-
prefixedName = "-" + cssPrefixes[i] + "-" + name;
|
|
800
|
+
for (const prefix of ['webkit', 'moz']) {
|
|
801
|
+
const prefixedName = "-" + prefix + "-" + name;
|
|
816
802
|
if (prefixedName in style) {
|
|
817
803
|
return prefixedName;
|
|
818
804
|
}
|
|
@@ -828,7 +814,9 @@
|
|
|
828
814
|
}
|
|
829
815
|
|
|
830
816
|
function removeClasses(element, cls) {
|
|
831
|
-
attr(element, 'class', (value) =>
|
|
817
|
+
attr(element, 'class', (value) =>
|
|
818
|
+
(value || '').replace(new RegExp("\\b" + cls + "\\b\\s?", 'g'), ''));
|
|
819
|
+
|
|
832
820
|
}
|
|
833
821
|
|
|
834
822
|
function replaceClass(element) {
|
|
@@ -913,13 +901,14 @@
|
|
|
913
901
|
const Transition = {
|
|
914
902
|
start: transition,
|
|
915
903
|
|
|
916
|
-
stop(element) {
|
|
904
|
+
async stop(element) {
|
|
917
905
|
trigger(element, 'transitionend');
|
|
918
|
-
|
|
906
|
+
await Promise.resolve();
|
|
919
907
|
},
|
|
920
908
|
|
|
921
|
-
cancel(element) {
|
|
909
|
+
async cancel(element) {
|
|
922
910
|
trigger(element, 'transitioncanceled');
|
|
911
|
+
await Promise.resolve();
|
|
923
912
|
},
|
|
924
913
|
|
|
925
914
|
inProgress(element) {
|
|
@@ -929,7 +918,7 @@
|
|
|
929
918
|
|
|
930
919
|
const animationPrefix = 'uk-animation-';
|
|
931
920
|
|
|
932
|
-
function animate$
|
|
921
|
+
function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
|
|
933
922
|
return Promise.all(
|
|
934
923
|
toNodes(element).map(
|
|
935
924
|
(element) =>
|
|
@@ -965,10 +954,10 @@
|
|
|
965
954
|
|
|
966
955
|
const inProgress = new RegExp(animationPrefix + "(enter|leave)");
|
|
967
956
|
const Animation = {
|
|
968
|
-
in: animate$
|
|
957
|
+
in: animate$2,
|
|
969
958
|
|
|
970
959
|
out(element, animation, duration, origin) {
|
|
971
|
-
return animate$
|
|
960
|
+
return animate$2(element, animation, duration, origin, true);
|
|
972
961
|
},
|
|
973
962
|
|
|
974
963
|
inProgress(element) {
|
|
@@ -1899,12 +1888,10 @@
|
|
|
1899
1888
|
function offsetViewport(scrollElement) {
|
|
1900
1889
|
const window = toWindow(scrollElement);
|
|
1901
1890
|
const {
|
|
1902
|
-
document: {
|
|
1891
|
+
document: { documentElement } } =
|
|
1903
1892
|
window;
|
|
1904
1893
|
let viewportElement =
|
|
1905
|
-
scrollElement === scrollingElement(scrollElement)
|
|
1906
|
-
window :
|
|
1907
|
-
scrollElement;
|
|
1894
|
+
scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1908
1895
|
|
|
1909
1896
|
const { visualViewport } = window;
|
|
1910
1897
|
if (isWindow(viewportElement) && visualViewport) {
|
|
@@ -1923,7 +1910,7 @@
|
|
|
1923
1910
|
// iOS 12 returns <body> as scrollingElement
|
|
1924
1911
|
viewportElement = documentElement;
|
|
1925
1912
|
} else {
|
|
1926
|
-
rect[start] += toFloat(css(viewportElement, "border" +
|
|
1913
|
+
rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
|
|
1927
1914
|
}
|
|
1928
1915
|
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1929
1916
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -1948,126 +1935,65 @@
|
|
|
1948
1935
|
...options.attach },
|
|
1949
1936
|
|
|
1950
1937
|
offset: [0, 0],
|
|
1938
|
+
placement: [],
|
|
1951
1939
|
...options };
|
|
1952
1940
|
|
|
1953
1941
|
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
attachTo(element, target, options);
|
|
1957
|
-
|
|
1958
|
-
offset(element, dim);
|
|
1959
|
-
}
|
|
1960
|
-
|
|
1961
|
-
function attachTo(element, target, options) {
|
|
1962
|
-
let { attach, offset: offsetBy } = {
|
|
1963
|
-
attach: {
|
|
1964
|
-
element: ['left', 'top'],
|
|
1965
|
-
target: ['left', 'top'],
|
|
1966
|
-
...options.attach },
|
|
1967
|
-
|
|
1968
|
-
offset: [0, 0],
|
|
1969
|
-
...options };
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
const position = offset(element);
|
|
1973
|
-
const targetOffset = offset(target);
|
|
1974
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1975
|
-
position[start] = position[dir] =
|
|
1976
|
-
targetOffset[start] +
|
|
1977
|
-
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
1978
|
-
moveBy(attach.element[i], end, position[prop]) +
|
|
1979
|
-
+offsetBy[i];
|
|
1980
|
-
position[end] = position[start] + position[prop];
|
|
1942
|
+
if (!isArray(target)) {
|
|
1943
|
+
target = [target, target];
|
|
1981
1944
|
}
|
|
1982
|
-
return position;
|
|
1983
|
-
}
|
|
1984
1945
|
|
|
1985
|
-
|
|
1986
|
-
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
1946
|
+
offset(element, getPosition(element, target, options));
|
|
1987
1947
|
}
|
|
1988
1948
|
|
|
1989
|
-
function
|
|
1949
|
+
function getPosition(element, target, options) {
|
|
1990
1950
|
const position = attachTo(element, target, options);
|
|
1991
|
-
const targetDim = offset(target);
|
|
1992
1951
|
|
|
1993
1952
|
let {
|
|
1994
|
-
flip,
|
|
1995
1953
|
attach: { element: elAttach, target: targetAttach },
|
|
1996
1954
|
offset: elOffset,
|
|
1997
1955
|
boundary,
|
|
1998
|
-
|
|
1999
|
-
|
|
1956
|
+
viewportOffset,
|
|
1957
|
+
placement } =
|
|
2000
1958
|
options;
|
|
2001
1959
|
|
|
2002
|
-
let
|
|
2003
|
-
|
|
2004
|
-
viewports =
|
|
2005
|
-
|
|
2006
|
-
const [scrollElement] = viewports;
|
|
2007
|
-
viewports.push(viewport);
|
|
2008
|
-
|
|
2009
|
-
const offsetPosition = { ...position };
|
|
2010
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2011
|
-
if (flip !== true && !includes(flip, dir)) {
|
|
2012
|
-
continue;
|
|
2013
|
-
}
|
|
1960
|
+
let offsetPosition = position;
|
|
1961
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
1962
|
+
let viewports = scrollParents(target[i]);
|
|
1963
|
+
const [scrollElement] = viewports;
|
|
2014
1964
|
|
|
2015
|
-
|
|
2016
|
-
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
2017
|
-
|
|
2018
|
-
viewport = getIntersectionArea(...viewports.filter(Boolean).map(offsetViewport));
|
|
1965
|
+
let viewport = getIntersectionArea(...viewports.map(offsetViewport));
|
|
2019
1966
|
|
|
2020
1967
|
if (viewportOffset) {
|
|
2021
1968
|
viewport[start] += viewportOffset;
|
|
2022
1969
|
viewport[end] -= viewportOffset;
|
|
2023
1970
|
}
|
|
2024
1971
|
|
|
2025
|
-
if (boundary
|
|
2026
|
-
viewport = getIntersectionArea(viewport,
|
|
1972
|
+
if (boundary) {
|
|
1973
|
+
viewport = getIntersectionArea(viewport, offsetViewport(boundary));
|
|
2027
1974
|
}
|
|
2028
1975
|
|
|
2029
|
-
const
|
|
2030
|
-
const
|
|
1976
|
+
const isInStartViewport = position[start] >= viewport[start];
|
|
1977
|
+
const isInEndViewport = position[end] <= viewport[end];
|
|
2031
1978
|
|
|
2032
|
-
if (
|
|
1979
|
+
if (isInStartViewport && isInEndViewport) {
|
|
2033
1980
|
continue;
|
|
2034
1981
|
}
|
|
2035
1982
|
|
|
2036
|
-
let offsetBy;
|
|
1983
|
+
let offsetBy = 0;
|
|
2037
1984
|
|
|
2038
1985
|
// Flip
|
|
2039
|
-
if (
|
|
1986
|
+
if (placement[i] === 'flip') {
|
|
2040
1987
|
if (
|
|
2041
|
-
|
|
2042
|
-
|
|
1988
|
+
targetAttach[i] === end && isInEndViewport ||
|
|
1989
|
+
targetAttach[i] === start && isInStartViewport)
|
|
2043
1990
|
{
|
|
2044
1991
|
continue;
|
|
2045
1992
|
}
|
|
2046
1993
|
|
|
2047
|
-
offsetBy =
|
|
2048
|
-
(elAttach[i] === start ?
|
|
2049
|
-
-position[prop] :
|
|
2050
|
-
elAttach[i] === end ?
|
|
2051
|
-
position[prop] :
|
|
2052
|
-
0) + (
|
|
2053
|
-
targetAttach[i] === start ?
|
|
2054
|
-
targetDim[prop] :
|
|
2055
|
-
targetAttach[i] === end ?
|
|
2056
|
-
-targetDim[prop] :
|
|
2057
|
-
0) -
|
|
2058
|
-
elOffset[i] * 2;
|
|
2059
|
-
|
|
2060
|
-
if (
|
|
2061
|
-
!isInScrollArea(
|
|
2062
|
-
{
|
|
2063
|
-
...position,
|
|
2064
|
-
[start]: position[start] + offsetBy,
|
|
2065
|
-
[end]: position[end] + offsetBy },
|
|
2066
|
-
|
|
2067
|
-
scrollElement,
|
|
2068
|
-
i))
|
|
1994
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2069
1995
|
|
|
2070
|
-
{
|
|
1996
|
+
if (!isInScrollArea(applyOffset(position, offsetBy, i), scrollElement, i)) {
|
|
2071
1997
|
if (isInScrollArea(position, scrollElement, i)) {
|
|
2072
1998
|
continue;
|
|
2073
1999
|
}
|
|
@@ -2076,27 +2002,27 @@
|
|
|
2076
2002
|
return false;
|
|
2077
2003
|
}
|
|
2078
2004
|
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2005
|
+
const newPos = getPosition(element, target, {
|
|
2006
|
+
...options,
|
|
2007
|
+
attach: {
|
|
2008
|
+
element: elAttach.map(flipAxis).reverse(),
|
|
2009
|
+
target: targetAttach.map(flipAxis).reverse() },
|
|
2085
2010
|
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2011
|
+
offset: elOffset.reverse(),
|
|
2012
|
+
placement: placement.reverse(),
|
|
2013
|
+
recursion: true });
|
|
2089
2014
|
|
|
2090
2015
|
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
}
|
|
2016
|
+
if (newPos && isInScrollArea(newPos, scrollElement, 1 - i)) {
|
|
2017
|
+
return newPos;
|
|
2094
2018
|
}
|
|
2019
|
+
|
|
2095
2020
|
continue;
|
|
2096
2021
|
}
|
|
2097
2022
|
|
|
2098
|
-
//
|
|
2099
|
-
} else {
|
|
2023
|
+
// Shift
|
|
2024
|
+
} else if (placement[i] === 'shift') {
|
|
2025
|
+
const targetDim = offset(target[i]);
|
|
2100
2026
|
offsetBy =
|
|
2101
2027
|
clamp(
|
|
2102
2028
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2105,13 +2031,54 @@
|
|
|
2105
2031
|
position[start];
|
|
2106
2032
|
}
|
|
2107
2033
|
|
|
2108
|
-
offsetPosition
|
|
2109
|
-
offsetPosition[end] += offsetBy;
|
|
2034
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2110
2035
|
}
|
|
2111
2036
|
|
|
2112
2037
|
return offsetPosition;
|
|
2113
2038
|
}
|
|
2114
2039
|
|
|
2040
|
+
function attachTo(element, target, options) {
|
|
2041
|
+
let { attach, offset: offsetBy } = {
|
|
2042
|
+
attach: {
|
|
2043
|
+
element: ['left', 'top'],
|
|
2044
|
+
target: ['left', 'top'],
|
|
2045
|
+
...options.attach },
|
|
2046
|
+
|
|
2047
|
+
offset: [0, 0],
|
|
2048
|
+
...options };
|
|
2049
|
+
|
|
2050
|
+
|
|
2051
|
+
let elOffset = offset(element);
|
|
2052
|
+
|
|
2053
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
2054
|
+
const targetOffset =
|
|
2055
|
+
attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
|
|
2056
|
+
|
|
2057
|
+
elOffset = applyOffset(
|
|
2058
|
+
elOffset,
|
|
2059
|
+
targetOffset[start] -
|
|
2060
|
+
elOffset[start] +
|
|
2061
|
+
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
2062
|
+
moveBy(attach.element[i], end, elOffset[prop]) +
|
|
2063
|
+
+offsetBy[i],
|
|
2064
|
+
i);
|
|
2065
|
+
|
|
2066
|
+
}
|
|
2067
|
+
return elOffset;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
function applyOffset(position, offset, i) {
|
|
2071
|
+
const [, dir, start, end] = dirs[i];
|
|
2072
|
+
const newPos = { ...position };
|
|
2073
|
+
newPos[start] = position[dir] = position[start] + offset;
|
|
2074
|
+
newPos[end] += offset;
|
|
2075
|
+
return newPos;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
function moveBy(attach, end, dim) {
|
|
2079
|
+
return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2115
2082
|
function getIntersectionArea() {
|
|
2116
2083
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2117
2084
|
for (const rect of rects) {
|
|
@@ -2132,12 +2099,32 @@
|
|
|
2132
2099
|
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2133
2100
|
}
|
|
2134
2101
|
|
|
2135
|
-
function
|
|
2136
|
-
|
|
2137
|
-
|
|
2102
|
+
function flip(element, target, _ref, i) {let { offset, attach } = _ref;
|
|
2103
|
+
return attachTo(element, target, {
|
|
2104
|
+
attach: {
|
|
2105
|
+
element: flipAttach(attach.element, i),
|
|
2106
|
+
target: flipAttach(attach.target, i) },
|
|
2107
|
+
|
|
2108
|
+
offset: flipOffset(offset, i) });
|
|
2109
|
+
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
|
+
function flipAttach(attach, i) {
|
|
2113
|
+
const newAttach = [...attach];
|
|
2114
|
+
const index = dirs[i].indexOf(attach[i]);
|
|
2115
|
+
if (~index) {
|
|
2116
|
+
newAttach[i] = dirs[i][1 - index % 2 + 2];
|
|
2117
|
+
}
|
|
2118
|
+
return newAttach;
|
|
2138
2119
|
}
|
|
2139
2120
|
|
|
2140
|
-
function
|
|
2121
|
+
function flipOffset(offset, i) {
|
|
2122
|
+
offset = [...offset];
|
|
2123
|
+
offset[i] *= -1;
|
|
2124
|
+
return offset;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
function flipAxis(prop) {
|
|
2141
2128
|
for (let i = 0; i < dirs.length; i++) {
|
|
2142
2129
|
const index = dirs[i].indexOf(prop);
|
|
2143
2130
|
if (~index) {
|
|
@@ -2152,7 +2139,7 @@
|
|
|
2152
2139
|
getImage: getImage,
|
|
2153
2140
|
transition: transition,
|
|
2154
2141
|
Transition: Transition,
|
|
2155
|
-
animate: animate$
|
|
2142
|
+
animate: animate$2,
|
|
2156
2143
|
Animation: Animation,
|
|
2157
2144
|
attr: attr,
|
|
2158
2145
|
hasAttr: hasAttr,
|
|
@@ -2282,7 +2269,6 @@
|
|
|
2282
2269
|
findAll: findAll,
|
|
2283
2270
|
escape: escape,
|
|
2284
2271
|
css: css,
|
|
2285
|
-
getCssVar: getCssVar,
|
|
2286
2272
|
propName: propName,
|
|
2287
2273
|
isInView: isInView,
|
|
2288
2274
|
scrollIntoView: scrollIntoView,
|
|
@@ -2607,7 +2593,7 @@
|
|
|
2607
2593
|
|
|
2608
2594
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2609
2595
|
|
|
2610
|
-
if (prop === 'target' &&
|
|
2596
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2611
2597
|
continue;
|
|
2612
2598
|
}
|
|
2613
2599
|
|
|
@@ -2618,7 +2604,7 @@
|
|
|
2618
2604
|
|
|
2619
2605
|
for (const key in options) {
|
|
2620
2606
|
const prop = camelize(key);
|
|
2621
|
-
if (props[prop]
|
|
2607
|
+
if (!isUndefined(props[prop])) {
|
|
2622
2608
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2623
2609
|
}
|
|
2624
2610
|
}
|
|
@@ -2947,7 +2933,7 @@
|
|
|
2947
2933
|
UIkit.data = '__uikit__';
|
|
2948
2934
|
UIkit.prefix = 'uk-';
|
|
2949
2935
|
UIkit.options = {};
|
|
2950
|
-
UIkit.version = '3.14.4-dev.
|
|
2936
|
+
UIkit.version = '3.14.4-dev.a3fc077ea';
|
|
2951
2937
|
|
|
2952
2938
|
globalAPI(UIkit);
|
|
2953
2939
|
hooksAPI(UIkit);
|
|
@@ -3052,27 +3038,7 @@
|
|
|
3052
3038
|
origin: false,
|
|
3053
3039
|
transition: 'ease',
|
|
3054
3040
|
clsEnter: 'uk-togglabe-enter',
|
|
3055
|
-
clsLeave: 'uk-togglabe-leave',
|
|
3056
|
-
|
|
3057
|
-
initProps: {
|
|
3058
|
-
overflow: '',
|
|
3059
|
-
maxHeight: '',
|
|
3060
|
-
paddingTop: '',
|
|
3061
|
-
paddingBottom: '',
|
|
3062
|
-
marginTop: '',
|
|
3063
|
-
marginBottom: '',
|
|
3064
|
-
boxShadow: '' },
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
hideProps: {
|
|
3068
|
-
overflow: 'hidden',
|
|
3069
|
-
maxHeight: 0,
|
|
3070
|
-
paddingTop: 0,
|
|
3071
|
-
paddingBottom: 0,
|
|
3072
|
-
marginTop: 0,
|
|
3073
|
-
marginBottom: 0,
|
|
3074
|
-
boxShadow: 'none' } },
|
|
3075
|
-
|
|
3041
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3076
3042
|
|
|
3077
3043
|
|
|
3078
3044
|
computed: {
|
|
@@ -3081,7 +3047,7 @@
|
|
|
3081
3047
|
},
|
|
3082
3048
|
|
|
3083
3049
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3084
|
-
return startsWith(animation[0],
|
|
3050
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3085
3051
|
} },
|
|
3086
3052
|
|
|
3087
3053
|
|
|
@@ -3174,130 +3140,105 @@
|
|
|
3174
3140
|
};
|
|
3175
3141
|
}
|
|
3176
3142
|
|
|
3177
|
-
function toggleTransition(cmp) {
|
|
3178
|
-
|
|
3179
|
-
case 'slide-left':
|
|
3180
|
-
return slideHorizontal(cmp);
|
|
3181
|
-
case 'slide-right':
|
|
3182
|
-
return slideHorizontal(cmp, true);}
|
|
3183
|
-
|
|
3184
|
-
return slide$1(cmp);
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
function slide$1(_ref4)
|
|
3188
|
-
|
|
3189
|
-
|
|
3143
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3144
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3190
3145
|
|
|
3146
|
+
const dirs = [
|
|
3147
|
+
['left', 'right'],
|
|
3148
|
+
['top', 'bottom']];
|
|
3191
3149
|
|
|
3150
|
+
const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
|
|
3151
|
+
const end = dir[1] === startProp;
|
|
3152
|
+
const props = ['width', 'height'];
|
|
3153
|
+
const dimProp = props[dirs.indexOf(dir)];
|
|
3154
|
+
const marginProp = "margin-" + dir[0];
|
|
3155
|
+
const marginStartProp = "margin-" + startProp;
|
|
3192
3156
|
|
|
3157
|
+
return async (el, show) => {
|
|
3158
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3193
3159
|
|
|
3160
|
+
let currentDim = dimensions$1(el)[dimProp];
|
|
3194
3161
|
|
|
3195
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3196
|
-
return (el, show) => {
|
|
3197
3162
|
const inProgress = Transition.inProgress(el);
|
|
3198
|
-
|
|
3199
|
-
!inProgress && el.hasChildNodes() ?
|
|
3200
|
-
toFloat(css(el.firstElementChild, 'marginTop')) +
|
|
3201
|
-
toFloat(css(el.lastElementChild, 'marginBottom')) :
|
|
3202
|
-
0;
|
|
3203
|
-
const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
|
|
3163
|
+
await Transition.cancel(el);
|
|
3204
3164
|
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
Transition.cancel(el);
|
|
3208
|
-
|
|
3209
|
-
if (!isToggled(el)) {
|
|
3165
|
+
if (show) {
|
|
3210
3166
|
_toggle(el, true);
|
|
3211
3167
|
}
|
|
3212
3168
|
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
el
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
css(scrollElement, 'overflowX', 'hidden');
|
|
3250
|
-
|
|
3251
|
-
if (!isToggled(el)) {
|
|
3252
|
-
_toggle(el, true);
|
|
3253
|
-
}
|
|
3169
|
+
const prevProps = Object.fromEntries(
|
|
3170
|
+
[
|
|
3171
|
+
'padding',
|
|
3172
|
+
'border',
|
|
3173
|
+
'width',
|
|
3174
|
+
'height',
|
|
3175
|
+
'overflowY',
|
|
3176
|
+
'overflowX',
|
|
3177
|
+
marginProp,
|
|
3178
|
+
marginStartProp].
|
|
3179
|
+
map((key) => [key, el.style[key]]));
|
|
3180
|
+
|
|
3181
|
+
|
|
3182
|
+
const dim = dimensions$1(el);
|
|
3183
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3184
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3185
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3186
|
+
|
|
3187
|
+
if (!inProgress && !show) {
|
|
3188
|
+
currentDim += marginStart;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3192
|
+
css(wrapper, {
|
|
3193
|
+
boxSizing: 'border-box',
|
|
3194
|
+
height: dim.height,
|
|
3195
|
+
width: dim.width,
|
|
3196
|
+
...css(el, [
|
|
3197
|
+
'overflow',
|
|
3198
|
+
'padding',
|
|
3199
|
+
'borderTop',
|
|
3200
|
+
'borderRight',
|
|
3201
|
+
'borderBottom',
|
|
3202
|
+
'borderLeft',
|
|
3203
|
+
'borderImage',
|
|
3204
|
+
marginStartProp]) });
|
|
3254
3205
|
|
|
3255
|
-
const width = toFloat(css(el, 'width'));
|
|
3256
|
-
duration = velocity * width + duration;
|
|
3257
3206
|
|
|
3258
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3259
|
-
const offsetEl = offset(el);
|
|
3260
|
-
const useClipPath = right ?
|
|
3261
|
-
offsetEl.right < scrollElement.clientWidth :
|
|
3262
|
-
Math.round(offsetEl.left) > 0;
|
|
3263
3207
|
|
|
3264
3208
|
css(el, {
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3209
|
+
padding: 0,
|
|
3210
|
+
border: 0,
|
|
3211
|
+
[marginStartProp]: 0,
|
|
3212
|
+
width: dim.width,
|
|
3213
|
+
height: dim.height,
|
|
3214
|
+
overflow: 'hidden',
|
|
3215
|
+
[dimProp]: currentDim });
|
|
3272
3216
|
|
|
3273
|
-
return (
|
|
3274
|
-
show ?
|
|
3275
|
-
Transition.start(
|
|
3276
|
-
el,
|
|
3277
|
-
{
|
|
3278
|
-
clipPath: useClipPath ? "polygon(0 0,100% 0,100% 100%,0 100%)" : '',
|
|
3279
|
-
marginLeft: 0 },
|
|
3280
3217
|
|
|
3281
|
-
|
|
3282
|
-
|
|
3218
|
+
const percent = currentDim / endDim;
|
|
3219
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3220
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3283
3221
|
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
right ? "polygon(0 0,0 0,0 100%,0 100%)" : "polygon(100% 0,100% 0,100% 100%,100% 100%)" :
|
|
3222
|
+
if (end) {
|
|
3223
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3224
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3225
|
+
}
|
|
3289
3226
|
|
|
3227
|
+
if (!end ^ mode === 'reveal') {
|
|
3228
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3229
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3230
|
+
}
|
|
3290
3231
|
|
|
3291
|
-
|
|
3292
|
-
|
|
3232
|
+
try {
|
|
3233
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3234
|
+
} finally {
|
|
3235
|
+
css(el, prevProps);
|
|
3236
|
+
unwrap(wrapper.firstChild);
|
|
3293
3237
|
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
css(scrollElement, 'overflowX', '');
|
|
3299
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3300
|
-
});
|
|
3238
|
+
if (!show) {
|
|
3239
|
+
_toggle(el, false);
|
|
3240
|
+
}
|
|
3241
|
+
}
|
|
3301
3242
|
};
|
|
3302
3243
|
}
|
|
3303
3244
|
|
|
@@ -3322,6 +3263,7 @@
|
|
|
3322
3263
|
mixins: [Class, Lazyload, Togglable],
|
|
3323
3264
|
|
|
3324
3265
|
props: {
|
|
3266
|
+
animation: Boolean,
|
|
3325
3267
|
targets: String,
|
|
3326
3268
|
active: null,
|
|
3327
3269
|
collapsible: Boolean,
|
|
@@ -3334,7 +3276,7 @@
|
|
|
3334
3276
|
data: {
|
|
3335
3277
|
targets: '> *',
|
|
3336
3278
|
active: false,
|
|
3337
|
-
animation:
|
|
3279
|
+
animation: true,
|
|
3338
3280
|
collapsible: true,
|
|
3339
3281
|
multiple: false,
|
|
3340
3282
|
clsOpen: 'uk-open',
|
|
@@ -3380,7 +3322,7 @@
|
|
|
3380
3322
|
hide(
|
|
3381
3323
|
el,
|
|
3382
3324
|
!hasClass(
|
|
3383
|
-
this.items.find((item) =>
|
|
3325
|
+
this.items.find((item) => within(el, item)),
|
|
3384
3326
|
this.clsOpen));
|
|
3385
3327
|
|
|
3386
3328
|
|
|
@@ -3432,23 +3374,15 @@
|
|
|
3432
3374
|
toggleClass(el, this.clsOpen, show);
|
|
3433
3375
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3434
3376
|
|
|
3435
|
-
const content = $(
|
|
3377
|
+
const content = $(this.content, el);
|
|
3436
3378
|
|
|
3437
|
-
if (animate === false || !this.
|
|
3379
|
+
if (animate === false || !this.animation) {
|
|
3380
|
+
content.hidden = !show;
|
|
3438
3381
|
hide(content, !show);
|
|
3439
3382
|
return;
|
|
3440
3383
|
}
|
|
3441
3384
|
|
|
3442
|
-
|
|
3443
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3444
|
-
}
|
|
3445
|
-
|
|
3446
|
-
hide(content, false);
|
|
3447
|
-
await slide$1(this)(el._wrapper, show);
|
|
3448
|
-
hide(content, !show);
|
|
3449
|
-
|
|
3450
|
-
delete el._wrapper;
|
|
3451
|
-
unwrap(content);
|
|
3385
|
+
await toggleTransition(this)(content, show);
|
|
3452
3386
|
|
|
3453
3387
|
if (show) {
|
|
3454
3388
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3474,18 +3408,17 @@
|
|
|
3474
3408
|
args: 'animation',
|
|
3475
3409
|
|
|
3476
3410
|
props: {
|
|
3411
|
+
animation: Boolean,
|
|
3477
3412
|
close: String },
|
|
3478
3413
|
|
|
3479
3414
|
|
|
3480
3415
|
data: {
|
|
3481
|
-
animation:
|
|
3416
|
+
animation: true,
|
|
3482
3417
|
selClose: '.uk-alert-close',
|
|
3483
|
-
duration: 150,
|
|
3484
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3418
|
+
duration: 150 },
|
|
3485
3419
|
|
|
3486
3420
|
|
|
3487
|
-
events:
|
|
3488
|
-
{
|
|
3421
|
+
events: {
|
|
3489
3422
|
name: 'click',
|
|
3490
3423
|
|
|
3491
3424
|
delegate() {
|
|
@@ -3495,16 +3428,39 @@
|
|
|
3495
3428
|
handler(e) {
|
|
3496
3429
|
e.preventDefault();
|
|
3497
3430
|
this.close();
|
|
3498
|
-
} }
|
|
3499
|
-
|
|
3431
|
+
} },
|
|
3500
3432
|
|
|
3501
3433
|
|
|
3502
3434
|
methods: {
|
|
3503
3435
|
async close() {
|
|
3504
|
-
await this.toggleElement(this.$el);
|
|
3436
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3505
3437
|
this.$destroy(true);
|
|
3506
3438
|
} } };
|
|
3507
3439
|
|
|
3440
|
+
|
|
3441
|
+
|
|
3442
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3443
|
+
return (el) => {
|
|
3444
|
+
const height = toFloat(css(el, 'height'));
|
|
3445
|
+
css(el, 'height', height);
|
|
3446
|
+
return Transition.start(
|
|
3447
|
+
el,
|
|
3448
|
+
{
|
|
3449
|
+
height: 0,
|
|
3450
|
+
marginTop: 0,
|
|
3451
|
+
marginBottom: 0,
|
|
3452
|
+
paddingTop: 0,
|
|
3453
|
+
paddingBottom: 0,
|
|
3454
|
+
borderTop: 0,
|
|
3455
|
+
borderBottom: 0,
|
|
3456
|
+
opacity: 0 },
|
|
3457
|
+
|
|
3458
|
+
velocity * height + duration,
|
|
3459
|
+
transition);
|
|
3460
|
+
|
|
3461
|
+
};
|
|
3462
|
+
}
|
|
3463
|
+
|
|
3508
3464
|
var Video = {
|
|
3509
3465
|
args: 'autoplay',
|
|
3510
3466
|
|
|
@@ -3653,13 +3609,17 @@
|
|
|
3653
3609
|
props: {
|
|
3654
3610
|
pos: String,
|
|
3655
3611
|
offset: null,
|
|
3656
|
-
flip: Boolean
|
|
3612
|
+
flip: Boolean,
|
|
3613
|
+
shift: Boolean,
|
|
3614
|
+
inset: Boolean },
|
|
3657
3615
|
|
|
3658
3616
|
|
|
3659
3617
|
data: {
|
|
3660
3618
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3619
|
+
offset: false,
|
|
3661
3620
|
flip: true,
|
|
3662
|
-
|
|
3621
|
+
shift: true,
|
|
3622
|
+
inset: false },
|
|
3663
3623
|
|
|
3664
3624
|
|
|
3665
3625
|
connected() {
|
|
@@ -3671,17 +3631,19 @@
|
|
|
3671
3631
|
methods: {
|
|
3672
3632
|
positionAt(element, target, boundary) {
|
|
3673
3633
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3634
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3674
3635
|
|
|
3675
3636
|
const attach = {
|
|
3676
|
-
element: [flipPosition(this.dir), this.align],
|
|
3637
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3677
3638
|
target: [this.dir, this.align] };
|
|
3678
3639
|
|
|
3679
3640
|
|
|
3680
3641
|
if (this.axis === 'y') {
|
|
3681
3642
|
for (const prop in attach) {
|
|
3682
|
-
attach[prop]
|
|
3643
|
+
attach[prop].reverse();
|
|
3683
3644
|
}
|
|
3684
|
-
offset
|
|
3645
|
+
offset.reverse();
|
|
3646
|
+
placement.reverse();
|
|
3685
3647
|
}
|
|
3686
3648
|
|
|
3687
3649
|
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
@@ -3691,21 +3653,13 @@
|
|
|
3691
3653
|
const elDim = dimensions$1(element);
|
|
3692
3654
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3693
3655
|
|
|
3694
|
-
|
|
3695
|
-
element,
|
|
3696
|
-
target,
|
|
3697
|
-
{
|
|
3656
|
+
positionAt(element, target, {
|
|
3698
3657
|
attach,
|
|
3699
3658
|
offset,
|
|
3700
3659
|
boundary,
|
|
3701
|
-
|
|
3702
|
-
viewportOffset: this.getViewportOffset(element) }
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
trigger(element, 'beforeposition', args);
|
|
3660
|
+
placement,
|
|
3661
|
+
viewportOffset: this.getViewportOffset(element) });
|
|
3707
3662
|
|
|
3708
|
-
positionAt(...args);
|
|
3709
3663
|
|
|
3710
3664
|
// Restore scroll position
|
|
3711
3665
|
scrollElement.scrollTop = scrollTop;
|
|
@@ -3715,27 +3669,38 @@
|
|
|
3715
3669
|
getPositionOffset(element) {
|
|
3716
3670
|
return (
|
|
3717
3671
|
toPx(
|
|
3718
|
-
this.offset === false ?
|
|
3672
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3719
3673
|
this.axis === 'x' ? 'width' : 'height',
|
|
3720
3674
|
element) * (
|
|
3721
|
-
|
|
3675
|
+
|
|
3676
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3677
|
+
this.inset ? -1 : 1));
|
|
3722
3678
|
|
|
3723
3679
|
},
|
|
3724
3680
|
|
|
3725
3681
|
getShiftOffset(element) {
|
|
3726
|
-
return
|
|
3682
|
+
return this.align === 'center' ?
|
|
3727
3683
|
0 :
|
|
3728
3684
|
toPx(
|
|
3729
|
-
|
|
3685
|
+
css(element, '--uk-position-shift-offset'),
|
|
3730
3686
|
this.axis === 'y' ? 'width' : 'height',
|
|
3731
3687
|
element) * (
|
|
3732
3688
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3733
3689
|
},
|
|
3734
3690
|
|
|
3735
3691
|
getViewportOffset(element) {
|
|
3736
|
-
return toPx(
|
|
3692
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3737
3693
|
} } };
|
|
3738
3694
|
|
|
3695
|
+
var Style = {
|
|
3696
|
+
beforeConnect() {
|
|
3697
|
+
this._style = attr(this.$el, 'style');
|
|
3698
|
+
},
|
|
3699
|
+
|
|
3700
|
+
disconnected() {
|
|
3701
|
+
attr(this.$el, 'style', this._style);
|
|
3702
|
+
} };
|
|
3703
|
+
|
|
3739
3704
|
const active$1 = [];
|
|
3740
3705
|
|
|
3741
3706
|
var Modal = {
|
|
@@ -3845,8 +3810,8 @@
|
|
|
3845
3810
|
|
|
3846
3811
|
|
|
3847
3812
|
if (this.overlay) {
|
|
3848
|
-
once(this.$el, '
|
|
3849
|
-
once(this.$el, '
|
|
3813
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3814
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3850
3815
|
}
|
|
3851
3816
|
|
|
3852
3817
|
if (this.stack) {
|
|
@@ -3928,10 +3893,6 @@
|
|
|
3928
3893
|
active$1.splice(active$1.indexOf(this), 1);
|
|
3929
3894
|
}
|
|
3930
3895
|
|
|
3931
|
-
if (!active$1.length) {
|
|
3932
|
-
css(document.body, 'overflowY', '');
|
|
3933
|
-
}
|
|
3934
|
-
|
|
3935
3896
|
css(this.$el, 'zIndex', '');
|
|
3936
3897
|
|
|
3937
3898
|
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
@@ -4048,7 +4009,12 @@
|
|
|
4048
4009
|
return () => events.forEach((fn) => fn());
|
|
4049
4010
|
}
|
|
4050
4011
|
|
|
4012
|
+
let prevented;
|
|
4051
4013
|
function preventBackgroundScroll() {
|
|
4014
|
+
if (prevented) {
|
|
4015
|
+
return noop;
|
|
4016
|
+
}
|
|
4017
|
+
prevented = true;
|
|
4052
4018
|
const { body, documentElement } = document;
|
|
4053
4019
|
css(body, {
|
|
4054
4020
|
overflowY: width(window) > documentElement.clientWidth ? 'scroll' : '',
|
|
@@ -4056,6 +4022,7 @@
|
|
|
4056
4022
|
|
|
4057
4023
|
css(documentElement, 'overflowY', 'hidden');
|
|
4058
4024
|
return () => {
|
|
4025
|
+
prevented = false;
|
|
4059
4026
|
css(documentElement, 'overflowY', '');
|
|
4060
4027
|
css(body, { overflowY: '', touchAction: '' });
|
|
4061
4028
|
};
|
|
@@ -4074,7 +4041,7 @@
|
|
|
4074
4041
|
let active;
|
|
4075
4042
|
|
|
4076
4043
|
var drop = {
|
|
4077
|
-
mixins: [Container, Lazyload, Position, Togglable],
|
|
4044
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4078
4045
|
|
|
4079
4046
|
args: 'pos',
|
|
4080
4047
|
|
|
@@ -4082,7 +4049,10 @@
|
|
|
4082
4049
|
mode: 'list',
|
|
4083
4050
|
toggle: Boolean,
|
|
4084
4051
|
boundary: Boolean,
|
|
4085
|
-
|
|
4052
|
+
target: Boolean,
|
|
4053
|
+
targetX: Boolean,
|
|
4054
|
+
targetY: Boolean,
|
|
4055
|
+
stretch: Boolean,
|
|
4086
4056
|
delayShow: Number,
|
|
4087
4057
|
delayHide: Number,
|
|
4088
4058
|
display: String,
|
|
@@ -4094,17 +4064,32 @@
|
|
|
4094
4064
|
data: {
|
|
4095
4065
|
mode: ['click', 'hover'],
|
|
4096
4066
|
toggle: '- *',
|
|
4097
|
-
boundary:
|
|
4098
|
-
|
|
4067
|
+
boundary: false,
|
|
4068
|
+
target: false,
|
|
4069
|
+
targetX: false,
|
|
4070
|
+
targetY: false,
|
|
4071
|
+
stretch: false,
|
|
4099
4072
|
delayShow: 0,
|
|
4100
4073
|
delayHide: 800,
|
|
4101
4074
|
display: null,
|
|
4102
4075
|
clsDrop: false,
|
|
4076
|
+
animateOut: false,
|
|
4077
|
+
bgScroll: true,
|
|
4103
4078
|
animation: ['uk-animation-fade'],
|
|
4104
4079
|
cls: 'uk-open',
|
|
4105
|
-
container: false,
|
|
4106
|
-
|
|
4107
|
-
|
|
4080
|
+
container: false },
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
computed: {
|
|
4084
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4085
|
+
targetX = targetX || target || this.targetEl;
|
|
4086
|
+
targetY = targetY || target || this.targetEl;
|
|
4087
|
+
|
|
4088
|
+
return [
|
|
4089
|
+
targetX === true ? window : query(targetX, $el),
|
|
4090
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4091
|
+
|
|
4092
|
+
} },
|
|
4108
4093
|
|
|
4109
4094
|
|
|
4110
4095
|
created() {
|
|
@@ -4118,13 +4103,13 @@
|
|
|
4118
4103
|
connected() {
|
|
4119
4104
|
addClass(this.$el, this.clsDrop);
|
|
4120
4105
|
|
|
4121
|
-
if (this.toggle && !this.
|
|
4122
|
-
this.
|
|
4106
|
+
if (this.toggle && !this.targetEl) {
|
|
4107
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4123
4108
|
target: this.$el,
|
|
4124
4109
|
mode: this.mode }).
|
|
4125
4110
|
$el;
|
|
4126
|
-
attr(this.
|
|
4127
|
-
this.lazyload(this.
|
|
4111
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4112
|
+
this.lazyload(this.targetEl);
|
|
4128
4113
|
}
|
|
4129
4114
|
},
|
|
4130
4115
|
|
|
@@ -4155,7 +4140,7 @@
|
|
|
4155
4140
|
return 'a[href^="#"]';
|
|
4156
4141
|
},
|
|
4157
4142
|
|
|
4158
|
-
handler(
|
|
4143
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4159
4144
|
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4160
4145
|
this.hide(false);
|
|
4161
4146
|
}
|
|
@@ -4267,17 +4252,17 @@
|
|
|
4267
4252
|
on(
|
|
4268
4253
|
document,
|
|
4269
4254
|
pointerDown$1,
|
|
4270
|
-
(
|
|
4255
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4271
4256
|
!within(target, this.$el) &&
|
|
4272
4257
|
once(
|
|
4273
4258
|
document,
|
|
4274
4259
|
pointerUp$1 + " " + pointerCancel + " scroll",
|
|
4275
|
-
(
|
|
4260
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4276
4261
|
if (
|
|
4277
4262
|
!defaultPrevented &&
|
|
4278
4263
|
type === pointerUp$1 &&
|
|
4279
4264
|
target === newTarget &&
|
|
4280
|
-
!(this.
|
|
4265
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4281
4266
|
{
|
|
4282
4267
|
this.hide(false);
|
|
4283
4268
|
}
|
|
@@ -4296,13 +4281,13 @@
|
|
|
4296
4281
|
[] :
|
|
4297
4282
|
[preventOverscroll(this.$el), preventBackgroundScroll()]),
|
|
4298
4283
|
|
|
4299
|
-
...(this.display === 'static'
|
|
4284
|
+
...(this.display === 'static' ?
|
|
4300
4285
|
[] :
|
|
4301
4286
|
(() => {
|
|
4302
4287
|
const handler = () => this.$emit();
|
|
4303
4288
|
return [
|
|
4304
4289
|
on(window, 'resize', handler),
|
|
4305
|
-
on(document, 'scroll', handler
|
|
4290
|
+
on([document, scrollParents(this.$el)], 'scroll', handler),
|
|
4306
4291
|
(() => {
|
|
4307
4292
|
const observer = observeResize(
|
|
4308
4293
|
scrollParents(this.$el),
|
|
@@ -4331,7 +4316,7 @@
|
|
|
4331
4316
|
{
|
|
4332
4317
|
name: 'hide',
|
|
4333
4318
|
|
|
4334
|
-
handler(
|
|
4319
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4335
4320
|
if (this.$el !== target) {
|
|
4336
4321
|
active =
|
|
4337
4322
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4355,12 +4340,12 @@
|
|
|
4355
4340
|
|
|
4356
4341
|
|
|
4357
4342
|
methods: {
|
|
4358
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4359
|
-
if (this.isToggled() && target && this.
|
|
4343
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4344
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4360
4345
|
this.hide(false, false);
|
|
4361
4346
|
}
|
|
4362
4347
|
|
|
4363
|
-
this.
|
|
4348
|
+
this.targetEl = target;
|
|
4364
4349
|
|
|
4365
4350
|
this.clearTimers();
|
|
4366
4351
|
|
|
@@ -4423,60 +4408,69 @@
|
|
|
4423
4408
|
|
|
4424
4409
|
position() {
|
|
4425
4410
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4426
|
-
|
|
4427
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4411
|
+
attr(this.$el, 'style', this._style);
|
|
4428
4412
|
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
const [scrollParent] = scrollParents(
|
|
4432
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4413
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4414
|
+
this.$el.hidden = true;
|
|
4433
4415
|
|
|
4434
|
-
const
|
|
4435
|
-
const boundaryOffset = boundary
|
|
4416
|
+
const boundary = query(this.boundary, this.$el);
|
|
4417
|
+
const boundaryOffset = offsetViewport(boundary || window);
|
|
4418
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4436
4419
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4437
4420
|
|
|
4438
|
-
|
|
4439
|
-
|
|
4421
|
+
const dirs = [
|
|
4422
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4423
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4440
4424
|
|
|
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) {
|
|
4425
|
+
|
|
4426
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4427
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4428
|
+
css(this.$el, {
|
|
4429
|
+
[prop]: Math.min(
|
|
4430
|
+
boundaryOffset[prop],
|
|
4431
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4432
|
+
|
|
4433
|
+
["overflow-" + axis]: 'auto' });
|
|
4434
|
+
|
|
4435
|
+
}
|
|
4436
|
+
}
|
|
4437
|
+
|
|
4438
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4439
|
+
|
|
4440
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4474
4441
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4475
4442
|
}
|
|
4476
4443
|
|
|
4477
4444
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4478
4445
|
|
|
4479
|
-
this
|
|
4446
|
+
this.$el.hidden = false;
|
|
4447
|
+
|
|
4448
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4449
|
+
|
|
4450
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4451
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4452
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4453
|
+
const targetOffset = offset(this.target[i]);
|
|
4454
|
+
const elOffset = offset(this.$el);
|
|
4455
|
+
|
|
4456
|
+
css(this.$el, {
|
|
4457
|
+
[prop]:
|
|
4458
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4459
|
+
targetOffset[start] -
|
|
4460
|
+
Math.max(
|
|
4461
|
+
boundaryOffset[start],
|
|
4462
|
+
viewports[i][start] + viewportOffset) :
|
|
4463
|
+
|
|
4464
|
+
Math.min(
|
|
4465
|
+
boundaryOffset[end],
|
|
4466
|
+
viewports[i][end] - viewportOffset) -
|
|
4467
|
+
targetOffset[end]) - positionOffset,
|
|
4468
|
+
["overflow-" + axis]: 'auto' });
|
|
4469
|
+
|
|
4470
|
+
|
|
4471
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4472
|
+
}
|
|
4473
|
+
}
|
|
4480
4474
|
} } };
|
|
4481
4475
|
|
|
4482
4476
|
|
|
@@ -4973,8 +4967,11 @@
|
|
|
4973
4967
|
let minHeight = '';
|
|
4974
4968
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4975
4969
|
|
|
4970
|
+
const { body, scrollingElement } = document;
|
|
4976
4971
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4977
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4972
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4973
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4974
|
+
|
|
4978
4975
|
|
|
4979
4976
|
if (this.expand) {
|
|
4980
4977
|
minHeight = Math.max(
|
|
@@ -4984,7 +4981,6 @@
|
|
|
4984
4981
|
0);
|
|
4985
4982
|
|
|
4986
4983
|
} else {
|
|
4987
|
-
const { body, scrollingElement } = document;
|
|
4988
4984
|
const isScrollingElement =
|
|
4989
4985
|
scrollingElement === scrollElement || body === scrollElement;
|
|
4990
4986
|
|
|
@@ -5240,7 +5236,13 @@
|
|
|
5240
5236
|
|
|
5241
5237
|
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>";
|
|
5242
5238
|
|
|
5243
|
-
var
|
|
5239
|
+
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>";
|
|
5240
|
+
|
|
5241
|
+
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>";
|
|
5242
|
+
|
|
5243
|
+
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>";
|
|
5244
|
+
|
|
5245
|
+
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><style>.uk-navbar-toggle svg > [class*='line-'] {\n transition: 0.2s ease-in-out;\n transition-property: transform, opacity,;\n transform-origin: center;\n opacity: 1;\n }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-2 { transform: rotate(45deg); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-3 { transform: rotate(-45deg); }\n\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1,\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { opacity: 0; }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-1 { transform: translateY(6px) scaleX(0); }\n .uk-navbar-toggle[aria-expanded=\"true\"] svg > .line-4 { transform: translateY(-6px) scaleX(0); }</style><rect class=\"line-1\" y=\"3\" width=\"20\" height=\"2\"/><rect class=\"line-2\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-3\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-4\" y=\"15\" width=\"20\" height=\"2\"/></svg>";
|
|
5244
5246
|
|
|
5245
5247
|
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>";
|
|
5246
5248
|
|
|
@@ -5272,6 +5274,9 @@
|
|
|
5272
5274
|
marker,
|
|
5273
5275
|
'close-icon': closeIcon,
|
|
5274
5276
|
'close-large': closeLarge,
|
|
5277
|
+
'nav-parent-icon': navParentIcon,
|
|
5278
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5279
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
5275
5280
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
5276
5281
|
'overlay-icon': overlayIcon,
|
|
5277
5282
|
'pagination-next': paginationNext,
|
|
@@ -5329,6 +5334,15 @@
|
|
|
5329
5334
|
} };
|
|
5330
5335
|
|
|
5331
5336
|
|
|
5337
|
+
const NavParentIcon = {
|
|
5338
|
+
extends: IconComponent,
|
|
5339
|
+
|
|
5340
|
+
beforeConnect() {
|
|
5341
|
+
const icon = this.$props.icon;
|
|
5342
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5343
|
+
} };
|
|
5344
|
+
|
|
5345
|
+
|
|
5332
5346
|
const Slidenav = {
|
|
5333
5347
|
extends: IconComponent,
|
|
5334
5348
|
|
|
@@ -5589,7 +5603,7 @@
|
|
|
5589
5603
|
|
|
5590
5604
|
|
|
5591
5605
|
connected() {
|
|
5592
|
-
const media = toMedia(this.media);
|
|
5606
|
+
const media = toMedia(this.media, this.$el);
|
|
5593
5607
|
this.matchMedia = true;
|
|
5594
5608
|
if (media) {
|
|
5595
5609
|
this.mediaObj = window.matchMedia(media);
|
|
@@ -5610,11 +5624,10 @@
|
|
|
5610
5624
|
} };
|
|
5611
5625
|
|
|
5612
5626
|
|
|
5613
|
-
function toMedia(value) {
|
|
5627
|
+
function toMedia(value, element) {
|
|
5614
5628
|
if (isString(value)) {
|
|
5615
5629
|
if (startsWith(value, '@')) {
|
|
5616
|
-
|
|
5617
|
-
value = toFloat(getCssVar(name));
|
|
5630
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5618
5631
|
} else if (isNaN(value)) {
|
|
5619
5632
|
return value;
|
|
5620
5633
|
}
|
|
@@ -5639,7 +5652,7 @@
|
|
|
5639
5652
|
|
|
5640
5653
|
computed: {
|
|
5641
5654
|
fill(_ref) {let { fill } = _ref;
|
|
5642
|
-
return fill ||
|
|
5655
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5643
5656
|
} },
|
|
5644
5657
|
|
|
5645
5658
|
|
|
@@ -5831,7 +5844,9 @@
|
|
|
5831
5844
|
align: String,
|
|
5832
5845
|
offset: Number,
|
|
5833
5846
|
boundary: Boolean,
|
|
5834
|
-
|
|
5847
|
+
target: Boolean,
|
|
5848
|
+
targetX: Boolean,
|
|
5849
|
+
targetY: Boolean,
|
|
5835
5850
|
clsDrop: String,
|
|
5836
5851
|
delayShow: Number,
|
|
5837
5852
|
delayHide: Number,
|
|
@@ -5848,9 +5863,12 @@
|
|
|
5848
5863
|
offset: undefined,
|
|
5849
5864
|
delayShow: undefined,
|
|
5850
5865
|
delayHide: undefined,
|
|
5851
|
-
|
|
5852
|
-
|
|
5866
|
+
flip: false,
|
|
5867
|
+
shift: true,
|
|
5853
5868
|
boundary: true,
|
|
5869
|
+
target: false,
|
|
5870
|
+
targetX: false,
|
|
5871
|
+
targetY: false,
|
|
5854
5872
|
dropbar: false,
|
|
5855
5873
|
dropbarAnchor: false,
|
|
5856
5874
|
duration: 200,
|
|
@@ -5885,7 +5903,7 @@
|
|
|
5885
5903
|
},
|
|
5886
5904
|
|
|
5887
5905
|
watch(dropbar) {
|
|
5888
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5906
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5889
5907
|
},
|
|
5890
5908
|
|
|
5891
5909
|
immediate: true },
|
|
@@ -5901,7 +5919,7 @@
|
|
|
5901
5919
|
|
|
5902
5920
|
if (this.dropContainer !== $el) {
|
|
5903
5921
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5904
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5922
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5905
5923
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5906
5924
|
dropdowns.push(el);
|
|
5907
5925
|
}
|
|
@@ -5963,8 +5981,8 @@
|
|
|
5963
5981
|
if (
|
|
5964
5982
|
active &&
|
|
5965
5983
|
includes(active.mode, 'hover') &&
|
|
5966
|
-
active.
|
|
5967
|
-
!within(active.
|
|
5984
|
+
active.targetEl &&
|
|
5985
|
+
!within(active.targetEl, current) &&
|
|
5968
5986
|
!active.isDelaying)
|
|
5969
5987
|
{
|
|
5970
5988
|
active.hide(false);
|
|
@@ -5986,7 +6004,7 @@
|
|
|
5986
6004
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5987
6005
|
e.preventDefault();
|
|
5988
6006
|
|
|
5989
|
-
if (!active || active.
|
|
6007
|
+
if (!active || active.targetEl !== current) {
|
|
5990
6008
|
current.click();
|
|
5991
6009
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5992
6010
|
focusFirstFocusableElement(target));});
|
|
@@ -6036,8 +6054,8 @@
|
|
|
6036
6054
|
}
|
|
6037
6055
|
}
|
|
6038
6056
|
|
|
6039
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
6040
|
-
active == null ? void 0 : (_active$
|
|
6057
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6058
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
6041
6059
|
}
|
|
6042
6060
|
|
|
6043
6061
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -6108,39 +6126,19 @@
|
|
|
6108
6126
|
return;
|
|
6109
6127
|
}
|
|
6110
6128
|
|
|
6111
|
-
this._observer = observeResize(target, () =>
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6129
|
+
this._observer = observeResize(target, () => {
|
|
6130
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6131
|
+
concat(target).
|
|
6132
|
+
map((el) => offset(el));
|
|
6133
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6134
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6135
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6136
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6137
|
+
this.transitionTo(
|
|
6138
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6139
|
+
target);
|
|
6121
6140
|
|
|
6122
|
-
|
|
6123
|
-
name: 'beforeposition',
|
|
6124
|
-
|
|
6125
|
-
el() {
|
|
6126
|
-
return this.dropContainer;
|
|
6127
|
-
},
|
|
6128
|
-
|
|
6129
|
-
filter() {
|
|
6130
|
-
return this.dropbar;
|
|
6131
|
-
},
|
|
6132
|
-
|
|
6133
|
-
handler(e, element, target, options) {
|
|
6134
|
-
if (!this.isDropbarDrop(element)) {
|
|
6135
|
-
return;
|
|
6136
|
-
}
|
|
6137
|
-
|
|
6138
|
-
const dropbarOffset = offset(this.dropbar);
|
|
6139
|
-
|
|
6140
|
-
css(element, 'maxWidth', dropbarOffset.width - options.viewportOffset * 2);
|
|
6141
|
-
|
|
6142
|
-
options.offset[1] = dropbarOffset.top - offset(target).bottom;
|
|
6143
|
-
options.viewportOffset += dropbarOffset.left;
|
|
6141
|
+
});
|
|
6144
6142
|
} },
|
|
6145
6143
|
|
|
6146
6144
|
|
|
@@ -6161,7 +6159,7 @@
|
|
|
6161
6159
|
if (
|
|
6162
6160
|
matches(this.dropbar, ':hover') &&
|
|
6163
6161
|
(active == null ? void 0 : active.$el) === e.target &&
|
|
6164
|
-
!this.toggles.some((el) => active.
|
|
6162
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6165
6163
|
{
|
|
6166
6164
|
e.preventDefault();
|
|
6167
6165
|
}
|
|
@@ -6179,7 +6177,7 @@
|
|
|
6179
6177
|
return this.dropbar;
|
|
6180
6178
|
},
|
|
6181
6179
|
|
|
6182
|
-
handler(
|
|
6180
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6183
6181
|
if (!this.isDropbarDrop(target)) {
|
|
6184
6182
|
return;
|
|
6185
6183
|
}
|
|
@@ -6197,7 +6195,7 @@
|
|
|
6197
6195
|
|
|
6198
6196
|
methods: {
|
|
6199
6197
|
getActive() {
|
|
6200
|
-
return active && within(active.
|
|
6198
|
+
return active && within(active.targetEl, this.$el) && active;
|
|
6201
6199
|
},
|
|
6202
6200
|
|
|
6203
6201
|
transitionTo(newHeight, el) {
|
|
@@ -6230,15 +6228,14 @@
|
|
|
6230
6228
|
},
|
|
6231
6229
|
|
|
6232
6230
|
isDropbarDrop(el) {
|
|
6233
|
-
|
|
6234
|
-
return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
|
|
6231
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6235
6232
|
} } };
|
|
6236
6233
|
|
|
6237
6234
|
|
|
6238
6235
|
|
|
6239
6236
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6240
6237
|
const { current, keyCode } = e;
|
|
6241
|
-
const target = (active == null ? void 0 : active.
|
|
6238
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6242
6239
|
const i = toggles.indexOf(target);
|
|
6243
6240
|
|
|
6244
6241
|
// Left
|
|
@@ -6606,6 +6603,14 @@
|
|
|
6606
6603
|
offset: 0 },
|
|
6607
6604
|
|
|
6608
6605
|
|
|
6606
|
+
connected() {
|
|
6607
|
+
registerClick(this);
|
|
6608
|
+
},
|
|
6609
|
+
|
|
6610
|
+
disconnected() {
|
|
6611
|
+
unregisterClick(this);
|
|
6612
|
+
},
|
|
6613
|
+
|
|
6609
6614
|
methods: {
|
|
6610
6615
|
async scrollTo(el) {
|
|
6611
6616
|
el = el && $(el) || document.body;
|
|
@@ -6614,20 +6619,39 @@
|
|
|
6614
6619
|
await scrollIntoView(el, { offset: this.offset });
|
|
6615
6620
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6616
6621
|
}
|
|
6617
|
-
} }
|
|
6622
|
+
} } };
|
|
6618
6623
|
|
|
6619
6624
|
|
|
6620
|
-
events: {
|
|
6621
|
-
click(e) {
|
|
6622
|
-
if (e.defaultPrevented) {
|
|
6623
|
-
return;
|
|
6624
|
-
}
|
|
6625
6625
|
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6626
|
+
const components$2 = new Set();
|
|
6627
|
+
function registerClick(cmp) {
|
|
6628
|
+
if (!components$2.size) {
|
|
6629
|
+
on(document, 'click', clickHandler);
|
|
6630
|
+
}
|
|
6629
6631
|
|
|
6632
|
+
components$2.add(cmp);
|
|
6633
|
+
}
|
|
6634
|
+
|
|
6635
|
+
function unregisterClick(cmp) {
|
|
6636
|
+
components$2.delete(cmp);
|
|
6637
|
+
|
|
6638
|
+
if (!components$2.length) {
|
|
6639
|
+
off(document, 'click', clickHandler);
|
|
6640
|
+
}
|
|
6641
|
+
}
|
|
6642
|
+
|
|
6643
|
+
function clickHandler(e) {
|
|
6644
|
+
if (e.defaultPrevented) {
|
|
6645
|
+
return;
|
|
6646
|
+
}
|
|
6630
6647
|
|
|
6648
|
+
for (const component of components$2) {
|
|
6649
|
+
if (within(e.target, component.$el)) {
|
|
6650
|
+
e.preventDefault();
|
|
6651
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6652
|
+
}
|
|
6653
|
+
}
|
|
6654
|
+
}
|
|
6631
6655
|
|
|
6632
6656
|
function getTargetElement(el) {
|
|
6633
6657
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -7590,7 +7614,7 @@
|
|
|
7590
7614
|
|
|
7591
7615
|
|
|
7592
7616
|
{
|
|
7593
|
-
name: '
|
|
7617
|
+
name: 'hide show',
|
|
7594
7618
|
|
|
7595
7619
|
self: true,
|
|
7596
7620
|
|
|
@@ -7598,10 +7622,8 @@
|
|
|
7598
7622
|
return this.target;
|
|
7599
7623
|
},
|
|
7600
7624
|
|
|
7601
|
-
handler(
|
|
7602
|
-
|
|
7603
|
-
this.updateAria(toggled);
|
|
7604
|
-
}
|
|
7625
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7626
|
+
this.updateAria(type === 'show');
|
|
7605
7627
|
} },
|
|
7606
7628
|
|
|
7607
7629
|
|
|
@@ -7696,10 +7718,12 @@
|
|
|
7696
7718
|
Video: Video,
|
|
7697
7719
|
Close: Close,
|
|
7698
7720
|
Spinner: Spinner,
|
|
7721
|
+
NavParentIcon: NavParentIcon,
|
|
7699
7722
|
SlidenavNext: Slidenav,
|
|
7700
7723
|
SlidenavPrevious: Slidenav,
|
|
7701
7724
|
SearchIcon: Search,
|
|
7702
7725
|
Marker: IconComponent,
|
|
7726
|
+
NavbarParentIcon: IconComponent,
|
|
7703
7727
|
NavbarToggleIcon: IconComponent,
|
|
7704
7728
|
OverlayIcon: IconComponent,
|
|
7705
7729
|
PaginationNext: IconComponent,
|