uikit 3.14.4-dev.4bd89c5ca → 3.14.4-dev.5fbbc45fb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -18
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +349 -160
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +349 -160
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +372 -190
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +372 -190
- package/dist/css/uikit.min.css +1 -1
- package/dist/js/components/countdown.js +1 -1
- package/dist/js/components/countdown.min.js +1 -1
- package/dist/js/components/filter.js +1 -1
- package/dist/js/components/filter.min.js +1 -1
- package/dist/js/components/lightbox-panel.js +96 -131
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +96 -131
- package/dist/js/components/lightbox.min.js +1 -1
- package/dist/js/components/notification.js +4 -2
- package/dist/js/components/notification.min.js +1 -1
- package/dist/js/components/parallax.js +4 -5
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +4 -5
- package/dist/js/components/slider-parallax.min.js +1 -1
- package/dist/js/components/slider.js +1 -1
- package/dist/js/components/slider.min.js +1 -1
- package/dist/js/components/slideshow-parallax.js +4 -5
- package/dist/js/components/slideshow-parallax.min.js +1 -1
- package/dist/js/components/slideshow.js +1 -1
- package/dist/js/components/slideshow.min.js +1 -1
- package/dist/js/components/sortable.js +1 -1
- package/dist/js/components/sortable.min.js +1 -1
- package/dist/js/components/tooltip.js +102 -139
- package/dist/js/components/tooltip.min.js +1 -1
- package/dist/js/components/upload.js +1 -1
- package/dist/js/components/upload.min.js +1 -1
- package/dist/js/uikit-core.js +549 -503
- 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 +552 -504
- package/dist/js/uikit.min.js +17 -1
- package/package.json +11 -11
- package/src/images/{backgrounds/nav-parent-close.svg → components/nav-parent-icon-large.svg} +0 -0
- package/src/images/{backgrounds/navbar-parent-close.svg → components/nav-parent-icon.svg} +0 -0
- package/src/images/{backgrounds/navbar-parent-open.svg → components/navbar-parent-icon.svg} +1 -1
- package/src/images/components/navbar-toggle-icon.svg +25 -3
- package/src/js/api/hooks.js +5 -1
- package/src/js/api/state.js +2 -2
- package/src/js/components/notification.js +3 -1
- package/src/js/core/accordion.js +9 -17
- package/src/js/core/alert.js +35 -14
- package/src/js/core/drop.js +110 -82
- package/src/js/core/height-viewport.js +4 -2
- package/src/js/core/icon.js +16 -0
- package/src/js/core/index.js +2 -0
- package/src/js/core/leader.js +2 -2
- package/src/js/core/navbar.js +30 -45
- package/src/js/core/offcanvas.js +8 -4
- package/src/js/core/scroll.js +37 -10
- package/src/js/core/toggle.js +3 -5
- package/src/js/mixin/media.js +4 -5
- package/src/js/mixin/modal.js +15 -12
- package/src/js/mixin/position.js +24 -26
- package/src/js/mixin/style.js +11 -0
- package/src/js/mixin/togglable.js +88 -124
- package/src/js/util/animation.js +9 -7
- package/src/js/util/class.js +3 -1
- package/src/js/util/filter.js +3 -7
- package/src/js/util/position.js +136 -130
- package/src/js/util/style.js +4 -13
- package/src/js/util/viewport.js +3 -5
- package/src/less/components/_import.less +1 -0
- package/src/less/components/drop.less +1 -18
- package/src/less/components/dropbar.less +126 -0
- package/src/less/components/dropdown.less +11 -19
- package/src/less/components/leader.less +1 -1
- package/src/less/components/nav.less +219 -58
- package/src/less/components/navbar.less +49 -81
- package/src/less/components/utility.less +10 -2
- package/src/less/theme/_import.less +1 -0
- package/src/less/theme/dropbar.less +44 -0
- package/src/less/theme/dropdown.less +0 -11
- package/src/less/theme/nav.less +45 -7
- package/src/less/theme/navbar.less +5 -44
- package/src/scss/components/_import.scss +1 -0
- package/src/scss/components/drop.scss +1 -18
- package/src/scss/components/dropbar.scss +126 -0
- package/src/scss/components/dropdown.scss +11 -19
- package/src/scss/components/leader.scss +1 -1
- package/src/scss/components/nav.scss +168 -46
- package/src/scss/components/navbar.scss +49 -69
- package/src/scss/components/utility.scss +8 -1
- package/src/scss/mixins-theme.scss +83 -61
- package/src/scss/mixins.scss +79 -29
- package/src/scss/theme/_import.scss +1 -0
- package/src/scss/theme/dropbar.scss +44 -0
- package/src/scss/theme/dropdown.scss +0 -8
- package/src/scss/theme/nav.scss +43 -7
- package/src/scss/theme/navbar.scss +4 -16
- package/src/scss/variables-theme.scss +62 -26
- package/src/scss/variables.scss +50 -21
- package/tests/accordion.html +2 -2
- package/tests/alert.html +2 -2
- package/tests/countdown.html +1 -1
- package/tests/drop.html +446 -416
- package/tests/dropbar.html +458 -0
- package/tests/dropdown.html +8 -470
- package/tests/filter.html +9 -12
- package/tests/flex.html +36 -36
- package/tests/form.html +1 -1
- package/tests/grid.html +22 -22
- package/tests/height.html +6 -6
- package/tests/index.html +129 -110
- package/tests/js/index.js +1 -4
- package/tests/lightbox.html +5 -5
- package/tests/list.html +8 -8
- package/tests/modal.html +13 -13
- package/tests/nav.html +117 -75
- package/tests/navbar.html +129 -249
- package/tests/offcanvas.html +17 -21
- package/tests/pagination.html +6 -6
- 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 +35 -16
- 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.5fbbc45fb | https://www.getuikit.com | (c) 2014 - 2022 YOOtheme | MIT License */
|
|
2
2
|
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -383,12 +383,8 @@
|
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
function closest(element, selector) {
|
|
386
|
-
if (startsWith(selector, '>')) {
|
|
387
|
-
selector = selector.slice(1);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
386
|
return isElement(element) ?
|
|
391
|
-
element.closest(selector) :
|
|
387
|
+
element.closest(startsWith(selector, '>') ? selector.slice(1) : selector) :
|
|
392
388
|
toNodes(element).
|
|
393
389
|
map((element) => closest(element, selector)).
|
|
394
390
|
filter(Boolean);
|
|
@@ -396,8 +392,8 @@
|
|
|
396
392
|
|
|
397
393
|
function within(element, selector) {
|
|
398
394
|
return isString(selector) ?
|
|
399
|
-
|
|
400
|
-
|
|
395
|
+
!!closest(element, selector) :
|
|
396
|
+
toNode(selector).contains(toNode(element));
|
|
401
397
|
}
|
|
402
398
|
|
|
403
399
|
function parents(element, selector) {
|
|
@@ -785,18 +781,11 @@
|
|
|
785
781
|
return elements[0];
|
|
786
782
|
}
|
|
787
783
|
|
|
788
|
-
const propertyRe = /^\s*(["'])?(.*?)\1\s*$/;
|
|
789
|
-
function getCssVar(name, element) {if (element === void 0) {element = document.documentElement;}
|
|
790
|
-
return css(element, "--uk-" + name).replace(propertyRe, '$2');
|
|
791
|
-
}
|
|
792
|
-
|
|
793
784
|
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-setproperty
|
|
794
785
|
const propName = memoize((name) => vendorPropName(name));
|
|
795
786
|
|
|
796
|
-
const cssPrefixes = ['webkit', 'moz'];
|
|
797
|
-
|
|
798
787
|
function vendorPropName(name) {
|
|
799
|
-
if (name
|
|
788
|
+
if (startsWith(name, '--')) {
|
|
800
789
|
return name;
|
|
801
790
|
}
|
|
802
791
|
|
|
@@ -808,11 +797,8 @@
|
|
|
808
797
|
return name;
|
|
809
798
|
}
|
|
810
799
|
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
while (i--) {
|
|
815
|
-
prefixedName = "-" + cssPrefixes[i] + "-" + name;
|
|
800
|
+
for (const prefix of ['webkit', 'moz']) {
|
|
801
|
+
const prefixedName = "-" + prefix + "-" + name;
|
|
816
802
|
if (prefixedName in style) {
|
|
817
803
|
return prefixedName;
|
|
818
804
|
}
|
|
@@ -828,7 +814,9 @@
|
|
|
828
814
|
}
|
|
829
815
|
|
|
830
816
|
function removeClasses(element, cls) {
|
|
831
|
-
attr(element, 'class', (value) =>
|
|
817
|
+
attr(element, 'class', (value) =>
|
|
818
|
+
(value || '').replace(new RegExp("\\b" + cls + "\\b\\s?", 'g'), ''));
|
|
819
|
+
|
|
832
820
|
}
|
|
833
821
|
|
|
834
822
|
function replaceClass(element) {
|
|
@@ -913,13 +901,14 @@
|
|
|
913
901
|
const Transition = {
|
|
914
902
|
start: transition,
|
|
915
903
|
|
|
916
|
-
stop(element) {
|
|
904
|
+
async stop(element) {
|
|
917
905
|
trigger(element, 'transitionend');
|
|
918
|
-
|
|
906
|
+
await Promise.resolve();
|
|
919
907
|
},
|
|
920
908
|
|
|
921
|
-
cancel(element) {
|
|
909
|
+
async cancel(element) {
|
|
922
910
|
trigger(element, 'transitioncanceled');
|
|
911
|
+
await Promise.resolve();
|
|
923
912
|
},
|
|
924
913
|
|
|
925
914
|
inProgress(element) {
|
|
@@ -929,7 +918,7 @@
|
|
|
929
918
|
|
|
930
919
|
const animationPrefix = 'uk-animation-';
|
|
931
920
|
|
|
932
|
-
function animate$
|
|
921
|
+
function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
|
|
933
922
|
return Promise.all(
|
|
934
923
|
toNodes(element).map(
|
|
935
924
|
(element) =>
|
|
@@ -963,16 +952,17 @@
|
|
|
963
952
|
|
|
964
953
|
}
|
|
965
954
|
|
|
966
|
-
const
|
|
955
|
+
const inProgressRe = new RegExp(animationPrefix + "(enter|leave)");
|
|
956
|
+
|
|
967
957
|
const Animation = {
|
|
968
|
-
in: animate$
|
|
958
|
+
in: animate$2,
|
|
969
959
|
|
|
970
960
|
out(element, animation, duration, origin) {
|
|
971
|
-
return animate$
|
|
961
|
+
return animate$2(element, animation, duration, origin, true);
|
|
972
962
|
},
|
|
973
963
|
|
|
974
964
|
inProgress(element) {
|
|
975
|
-
return
|
|
965
|
+
return inProgressRe.test(attr(element, 'class'));
|
|
976
966
|
},
|
|
977
967
|
|
|
978
968
|
cancel(element) {
|
|
@@ -1899,12 +1889,10 @@
|
|
|
1899
1889
|
function offsetViewport(scrollElement) {
|
|
1900
1890
|
const window = toWindow(scrollElement);
|
|
1901
1891
|
const {
|
|
1902
|
-
document: {
|
|
1892
|
+
document: { documentElement } } =
|
|
1903
1893
|
window;
|
|
1904
1894
|
let viewportElement =
|
|
1905
|
-
scrollElement === scrollingElement(scrollElement)
|
|
1906
|
-
window :
|
|
1907
|
-
scrollElement;
|
|
1895
|
+
scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1908
1896
|
|
|
1909
1897
|
const { visualViewport } = window;
|
|
1910
1898
|
if (isWindow(viewportElement) && visualViewport) {
|
|
@@ -1923,7 +1911,7 @@
|
|
|
1923
1911
|
// iOS 12 returns <body> as scrollingElement
|
|
1924
1912
|
viewportElement = documentElement;
|
|
1925
1913
|
} else {
|
|
1926
|
-
rect[start] += toFloat(css(viewportElement, "border" +
|
|
1914
|
+
rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
|
|
1927
1915
|
}
|
|
1928
1916
|
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1929
1917
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -1948,127 +1936,47 @@
|
|
|
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
|
|
1992
|
-
|
|
1993
|
-
let {
|
|
1994
|
-
flip,
|
|
1995
|
-
attach: { element: elAttach, target: targetAttach },
|
|
1996
|
-
offset: elOffset,
|
|
1997
|
-
boundary,
|
|
1998
|
-
viewport,
|
|
1999
|
-
viewportOffset } =
|
|
2000
|
-
options;
|
|
2001
|
-
|
|
2002
|
-
let viewports = scrollParents(element);
|
|
2003
|
-
if (boundary === target) {
|
|
2004
|
-
viewports = viewports.filter((viewport) => viewport !== boundary);
|
|
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
|
-
}
|
|
2014
|
-
|
|
2015
|
-
const willFlip =
|
|
2016
|
-
!intersectLine(position, targetDim, i) && intersectLine(position, targetDim, 1 - i);
|
|
1952
|
+
const { boundary, viewportOffset = 0, placement } = options;
|
|
2017
1953
|
|
|
2018
|
-
|
|
1954
|
+
let offsetPosition = position;
|
|
1955
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
1956
|
+
const viewport = getViewport$1(target[i], viewportOffset, boundary, i);
|
|
2019
1957
|
|
|
2020
|
-
if (
|
|
2021
|
-
viewport[start] += viewportOffset;
|
|
2022
|
-
viewport[end] -= viewportOffset;
|
|
2023
|
-
}
|
|
2024
|
-
|
|
2025
|
-
if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
|
|
2026
|
-
viewport = getIntersectionArea(viewport, offset(boundary));
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
const isInStartBoundary = position[start] >= viewport[start];
|
|
2030
|
-
const isInEndBoundary = position[end] <= viewport[end];
|
|
2031
|
-
|
|
2032
|
-
if (isInStartBoundary && isInEndBoundary) {
|
|
1958
|
+
if (isWithin(position, viewport, i)) {
|
|
2033
1959
|
continue;
|
|
2034
1960
|
}
|
|
2035
1961
|
|
|
2036
|
-
let offsetBy;
|
|
1962
|
+
let offsetBy = 0;
|
|
2037
1963
|
|
|
2038
1964
|
// Flip
|
|
2039
|
-
if (
|
|
1965
|
+
if (placement[i] === 'flip') {
|
|
1966
|
+
const attach = options.attach.target[i];
|
|
2040
1967
|
if (
|
|
2041
|
-
|
|
2042
|
-
|
|
1968
|
+
attach === end && position[end] <= viewport[end] ||
|
|
1969
|
+
attach === start && position[start] >= viewport[start])
|
|
2043
1970
|
{
|
|
2044
1971
|
continue;
|
|
2045
1972
|
}
|
|
2046
1973
|
|
|
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 },
|
|
1974
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2066
1975
|
|
|
2067
|
-
|
|
2068
|
-
i))
|
|
1976
|
+
const scrollArea = getScrollArea(target[i], viewportOffset, i);
|
|
2069
1977
|
|
|
2070
|
-
{
|
|
2071
|
-
if (
|
|
1978
|
+
if (!isWithin(applyOffset(position, offsetBy, i), scrollArea, i)) {
|
|
1979
|
+
if (isWithin(position, scrollArea, i)) {
|
|
2072
1980
|
continue;
|
|
2073
1981
|
}
|
|
2074
1982
|
|
|
@@ -2076,27 +1984,19 @@
|
|
|
2076
1984
|
return false;
|
|
2077
1985
|
}
|
|
2078
1986
|
|
|
2079
|
-
|
|
2080
|
-
const newPos = attachToWithFlip(element, target, {
|
|
2081
|
-
...options,
|
|
2082
|
-
attach: {
|
|
2083
|
-
element: elAttach.map(flipDir).reverse(),
|
|
2084
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2085
|
-
|
|
2086
|
-
offset: elOffset.reverse(),
|
|
2087
|
-
flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
|
|
2088
|
-
recursion: true });
|
|
2089
|
-
|
|
1987
|
+
const newPos = flipAxis(element, target, options);
|
|
2090
1988
|
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
}
|
|
1989
|
+
if (newPos && isWithin(newPos, scrollArea, 1 - i)) {
|
|
1990
|
+
return newPos;
|
|
2094
1991
|
}
|
|
1992
|
+
|
|
2095
1993
|
continue;
|
|
2096
1994
|
}
|
|
2097
1995
|
|
|
2098
|
-
//
|
|
2099
|
-
} else {
|
|
1996
|
+
// Shift
|
|
1997
|
+
} else if (placement[i] === 'shift') {
|
|
1998
|
+
const targetDim = offset(target[i]);
|
|
1999
|
+
const { offset: elOffset } = options;
|
|
2100
2000
|
offsetBy =
|
|
2101
2001
|
clamp(
|
|
2102
2002
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2105,13 +2005,78 @@
|
|
|
2105
2005
|
position[start];
|
|
2106
2006
|
}
|
|
2107
2007
|
|
|
2108
|
-
offsetPosition
|
|
2109
|
-
offsetPosition[end] += offsetBy;
|
|
2008
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2110
2009
|
}
|
|
2111
2010
|
|
|
2112
2011
|
return offsetPosition;
|
|
2113
2012
|
}
|
|
2114
2013
|
|
|
2014
|
+
function attachTo(element, target, options) {
|
|
2015
|
+
let { attach, offset: offsetBy } = {
|
|
2016
|
+
attach: {
|
|
2017
|
+
element: ['left', 'top'],
|
|
2018
|
+
target: ['left', 'top'],
|
|
2019
|
+
...options.attach },
|
|
2020
|
+
|
|
2021
|
+
offset: [0, 0],
|
|
2022
|
+
...options };
|
|
2023
|
+
|
|
2024
|
+
|
|
2025
|
+
let elOffset = offset(element);
|
|
2026
|
+
|
|
2027
|
+
for (const [i, [prop,, start, end]] of Object.entries(dirs)) {
|
|
2028
|
+
const targetOffset =
|
|
2029
|
+
attach.target[i] === attach.element[i] ? offsetViewport(target[i]) : offset(target[i]);
|
|
2030
|
+
|
|
2031
|
+
elOffset = applyOffset(
|
|
2032
|
+
elOffset,
|
|
2033
|
+
targetOffset[start] -
|
|
2034
|
+
elOffset[start] +
|
|
2035
|
+
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
2036
|
+
moveBy(attach.element[i], end, elOffset[prop]) +
|
|
2037
|
+
+offsetBy[i],
|
|
2038
|
+
i);
|
|
2039
|
+
|
|
2040
|
+
}
|
|
2041
|
+
return elOffset;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
function applyOffset(position, offset, i) {
|
|
2045
|
+
const [, dir, start, end] = dirs[i];
|
|
2046
|
+
const newPos = { ...position };
|
|
2047
|
+
newPos[start] = position[dir] = position[start] + offset;
|
|
2048
|
+
newPos[end] += offset;
|
|
2049
|
+
return newPos;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
function moveBy(attach, end, dim) {
|
|
2053
|
+
return attach === 'center' ? dim / 2 : attach === end ? dim : 0;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
function getViewport$1(element, viewportOffset, boundary, i) {
|
|
2057
|
+
let viewport = getIntersectionArea(...scrollParents(element).map(offsetViewport));
|
|
2058
|
+
|
|
2059
|
+
if (viewportOffset) {
|
|
2060
|
+
viewport[dirs[i][2]] += viewportOffset;
|
|
2061
|
+
viewport[dirs[i][3]] -= viewportOffset;
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
if (boundary) {
|
|
2065
|
+
viewport = getIntersectionArea(viewport, offset(boundary));
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
return viewport;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
function getScrollArea(element, viewportOffset, i) {
|
|
2072
|
+
const [prop,, start, end] = dirs[i];
|
|
2073
|
+
const [scrollElement] = scrollParents(element);
|
|
2074
|
+
const viewport = offsetViewport(scrollElement);
|
|
2075
|
+
viewport[start] -= scrollElement["scroll" + ucfirst(start)] - viewportOffset;
|
|
2076
|
+
viewport[end] = viewport[start] + scrollElement["scroll" + ucfirst(prop)] - viewportOffset;
|
|
2077
|
+
return viewport;
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2115
2080
|
function getIntersectionArea() {
|
|
2116
2081
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2117
2082
|
for (const rect of rects) {
|
|
@@ -2123,21 +2088,44 @@
|
|
|
2123
2088
|
return area;
|
|
2124
2089
|
}
|
|
2125
2090
|
|
|
2126
|
-
function
|
|
2127
|
-
const
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2091
|
+
function isWithin(positionA, positionB, i) {
|
|
2092
|
+
const [,, start, end] = dirs[i];
|
|
2093
|
+
return positionA[start] >= positionB[start] && positionA[end] <= positionB[end];
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
function flip(element, target, _ref, i) {let { offset, attach } = _ref;
|
|
2097
|
+
return attachTo(element, target, {
|
|
2098
|
+
attach: {
|
|
2099
|
+
element: flipAttach(attach.element, i),
|
|
2100
|
+
target: flipAttach(attach.target, i) },
|
|
2101
|
+
|
|
2102
|
+
offset: flipOffset(offset, i) });
|
|
2103
|
+
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
function flipAxis(element, target, options) {
|
|
2107
|
+
return getPosition(element, target, {
|
|
2108
|
+
...options,
|
|
2109
|
+
attach: {
|
|
2110
|
+
element: options.attach.element.map(flipAttachAxis).reverse(),
|
|
2111
|
+
target: options.attach.target.map(flipAttachAxis).reverse() },
|
|
2112
|
+
|
|
2113
|
+
offset: options.offset.reverse(),
|
|
2114
|
+
placement: options.placement.reverse(),
|
|
2115
|
+
recursion: true });
|
|
2131
2116
|
|
|
2132
|
-
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2133
2117
|
}
|
|
2134
2118
|
|
|
2135
|
-
function
|
|
2136
|
-
const
|
|
2137
|
-
|
|
2119
|
+
function flipAttach(attach, i) {
|
|
2120
|
+
const newAttach = [...attach];
|
|
2121
|
+
const index = dirs[i].indexOf(attach[i]);
|
|
2122
|
+
if (~index) {
|
|
2123
|
+
newAttach[i] = dirs[i][1 - index % 2 + 2];
|
|
2124
|
+
}
|
|
2125
|
+
return newAttach;
|
|
2138
2126
|
}
|
|
2139
2127
|
|
|
2140
|
-
function
|
|
2128
|
+
function flipAttachAxis(prop) {
|
|
2141
2129
|
for (let i = 0; i < dirs.length; i++) {
|
|
2142
2130
|
const index = dirs[i].indexOf(prop);
|
|
2143
2131
|
if (~index) {
|
|
@@ -2146,13 +2134,17 @@
|
|
|
2146
2134
|
}
|
|
2147
2135
|
}
|
|
2148
2136
|
|
|
2137
|
+
function flipOffset(offset, i) {
|
|
2138
|
+
offset = [...offset];
|
|
2139
|
+
offset[i] *= -1;
|
|
2140
|
+
return offset;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2149
2143
|
var util = /*#__PURE__*/Object.freeze({
|
|
2150
2144
|
__proto__: null,
|
|
2151
2145
|
ajax: ajax,
|
|
2152
2146
|
getImage: getImage,
|
|
2153
|
-
transition: transition,
|
|
2154
2147
|
Transition: Transition,
|
|
2155
|
-
animate: animate$1,
|
|
2156
2148
|
Animation: Animation,
|
|
2157
2149
|
attr: attr,
|
|
2158
2150
|
hasAttr: hasAttr,
|
|
@@ -2282,7 +2274,6 @@
|
|
|
2282
2274
|
findAll: findAll,
|
|
2283
2275
|
escape: escape,
|
|
2284
2276
|
css: css,
|
|
2285
|
-
getCssVar: getCssVar,
|
|
2286
2277
|
propName: propName,
|
|
2287
2278
|
isInView: isInView,
|
|
2288
2279
|
scrollIntoView: scrollIntoView,
|
|
@@ -2458,7 +2449,11 @@
|
|
|
2458
2449
|
}
|
|
2459
2450
|
|
|
2460
2451
|
if (write && result !== false) {
|
|
2461
|
-
fastdom.write(() =>
|
|
2452
|
+
fastdom.write(() => {
|
|
2453
|
+
if (this._connected) {
|
|
2454
|
+
write.call(this, this._data, types);
|
|
2455
|
+
}
|
|
2456
|
+
});
|
|
2462
2457
|
}
|
|
2463
2458
|
}
|
|
2464
2459
|
}
|
|
@@ -2607,7 +2602,7 @@
|
|
|
2607
2602
|
|
|
2608
2603
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2609
2604
|
|
|
2610
|
-
if (prop === 'target' &&
|
|
2605
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2611
2606
|
continue;
|
|
2612
2607
|
}
|
|
2613
2608
|
|
|
@@ -2618,7 +2613,7 @@
|
|
|
2618
2613
|
|
|
2619
2614
|
for (const key in options) {
|
|
2620
2615
|
const prop = camelize(key);
|
|
2621
|
-
if (props[prop]
|
|
2616
|
+
if (!isUndefined(props[prop])) {
|
|
2622
2617
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2623
2618
|
}
|
|
2624
2619
|
}
|
|
@@ -2947,7 +2942,7 @@
|
|
|
2947
2942
|
UIkit.data = '__uikit__';
|
|
2948
2943
|
UIkit.prefix = 'uk-';
|
|
2949
2944
|
UIkit.options = {};
|
|
2950
|
-
UIkit.version = '3.14.4-dev.
|
|
2945
|
+
UIkit.version = '3.14.4-dev.5fbbc45fb';
|
|
2951
2946
|
|
|
2952
2947
|
globalAPI(UIkit);
|
|
2953
2948
|
hooksAPI(UIkit);
|
|
@@ -3052,27 +3047,7 @@
|
|
|
3052
3047
|
origin: false,
|
|
3053
3048
|
transition: 'ease',
|
|
3054
3049
|
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
|
-
|
|
3050
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3076
3051
|
|
|
3077
3052
|
|
|
3078
3053
|
computed: {
|
|
@@ -3081,7 +3056,7 @@
|
|
|
3081
3056
|
},
|
|
3082
3057
|
|
|
3083
3058
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3084
|
-
return startsWith(animation[0],
|
|
3059
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3085
3060
|
} },
|
|
3086
3061
|
|
|
3087
3062
|
|
|
@@ -3174,122 +3149,105 @@
|
|
|
3174
3149
|
};
|
|
3175
3150
|
}
|
|
3176
3151
|
|
|
3177
|
-
function toggleTransition(cmp) {
|
|
3178
|
-
|
|
3179
|
-
case 'slide-left':
|
|
3180
|
-
return slideHorizontal(cmp);
|
|
3181
|
-
case 'slide-right':
|
|
3182
|
-
return slideHorizontal(cmp, true);}
|
|
3183
|
-
|
|
3184
|
-
return slide(cmp);
|
|
3185
|
-
}
|
|
3186
|
-
|
|
3187
|
-
function slide(_ref4)
|
|
3188
|
-
|
|
3189
|
-
|
|
3152
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3153
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3190
3154
|
|
|
3155
|
+
const dirs = [
|
|
3156
|
+
['left', 'right'],
|
|
3157
|
+
['top', 'bottom']];
|
|
3191
3158
|
|
|
3159
|
+
const dir = dirs[includes(dirs[0], startProp) ? 0 : 1];
|
|
3160
|
+
const end = dir[1] === startProp;
|
|
3161
|
+
const props = ['width', 'height'];
|
|
3162
|
+
const dimProp = props[dirs.indexOf(dir)];
|
|
3163
|
+
const marginProp = "margin-" + dir[0];
|
|
3164
|
+
const marginStartProp = "margin-" + startProp;
|
|
3192
3165
|
|
|
3166
|
+
return async (el, show) => {
|
|
3167
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3193
3168
|
|
|
3169
|
+
let currentDim = dimensions(el)[dimProp];
|
|
3194
3170
|
|
|
3195
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3196
|
-
return (el, show) => {
|
|
3197
3171
|
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);
|
|
3172
|
+
await Transition.cancel(el);
|
|
3208
3173
|
|
|
3209
|
-
if (
|
|
3174
|
+
if (show) {
|
|
3210
3175
|
_toggle(el, true);
|
|
3211
3176
|
}
|
|
3212
3177
|
|
|
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
|
-
}
|
|
3178
|
+
const prevProps = Object.fromEntries(
|
|
3179
|
+
[
|
|
3180
|
+
'padding',
|
|
3181
|
+
'border',
|
|
3182
|
+
'width',
|
|
3183
|
+
'height',
|
|
3184
|
+
'overflowY',
|
|
3185
|
+
'overflowX',
|
|
3186
|
+
marginProp,
|
|
3187
|
+
marginStartProp].
|
|
3188
|
+
map((key) => [key, el.style[key]]));
|
|
3189
|
+
|
|
3190
|
+
|
|
3191
|
+
const dim = dimensions(el);
|
|
3192
|
+
const currentMargin = toFloat(css(el, marginProp));
|
|
3193
|
+
const marginStart = toFloat(css(el, marginStartProp));
|
|
3194
|
+
const endDim = dim[dimProp] + marginStart;
|
|
3195
|
+
|
|
3196
|
+
if (!inProgress && !show) {
|
|
3197
|
+
currentDim += marginStart;
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
const [wrapper] = wrapInner(el, '<div>');
|
|
3201
|
+
css(wrapper, {
|
|
3202
|
+
boxSizing: 'border-box',
|
|
3203
|
+
height: dim.height,
|
|
3204
|
+
width: dim.width,
|
|
3205
|
+
...css(el, [
|
|
3206
|
+
'overflow',
|
|
3207
|
+
'padding',
|
|
3208
|
+
'borderTop',
|
|
3209
|
+
'borderRight',
|
|
3210
|
+
'borderBottom',
|
|
3211
|
+
'borderLeft',
|
|
3212
|
+
'borderImage',
|
|
3213
|
+
marginStartProp]) });
|
|
3254
3214
|
|
|
3255
|
-
const width = toFloat(css(el, 'width'));
|
|
3256
|
-
duration = velocity * width + duration;
|
|
3257
3215
|
|
|
3258
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3259
3216
|
|
|
3260
3217
|
css(el, {
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3218
|
+
padding: 0,
|
|
3219
|
+
border: 0,
|
|
3220
|
+
[marginStartProp]: 0,
|
|
3221
|
+
width: dim.width,
|
|
3222
|
+
height: dim.height,
|
|
3223
|
+
overflow: 'hidden',
|
|
3224
|
+
[dimProp]: currentDim });
|
|
3265
3225
|
|
|
3266
3226
|
|
|
3267
|
-
|
|
3268
|
-
show ?
|
|
3269
|
-
|
|
3270
|
-
el,
|
|
3271
|
-
{
|
|
3272
|
-
clipPath: "polygon(0 0,100% 0,100% 100%,0 100%)",
|
|
3273
|
-
marginLeft: 0 },
|
|
3274
|
-
|
|
3275
|
-
duration * (1 - percent / 100),
|
|
3276
|
-
transition) :
|
|
3227
|
+
const percent = currentDim / endDim;
|
|
3228
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3229
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3277
3230
|
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3231
|
+
if (end) {
|
|
3232
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3233
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3234
|
+
}
|
|
3282
3235
|
|
|
3236
|
+
if (!end ^ mode === 'reveal') {
|
|
3237
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3238
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3239
|
+
}
|
|
3283
3240
|
|
|
3284
|
-
|
|
3241
|
+
try {
|
|
3242
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3243
|
+
} finally {
|
|
3244
|
+
css(el, prevProps);
|
|
3245
|
+
unwrap(wrapper.firstChild);
|
|
3285
3246
|
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
css(scrollElement, 'overflowX', '');
|
|
3291
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3292
|
-
});
|
|
3247
|
+
if (!show) {
|
|
3248
|
+
_toggle(el, false);
|
|
3249
|
+
}
|
|
3250
|
+
}
|
|
3293
3251
|
};
|
|
3294
3252
|
}
|
|
3295
3253
|
|
|
@@ -3314,6 +3272,7 @@
|
|
|
3314
3272
|
mixins: [Class, Lazyload, Togglable],
|
|
3315
3273
|
|
|
3316
3274
|
props: {
|
|
3275
|
+
animation: Boolean,
|
|
3317
3276
|
targets: String,
|
|
3318
3277
|
active: null,
|
|
3319
3278
|
collapsible: Boolean,
|
|
@@ -3326,7 +3285,7 @@
|
|
|
3326
3285
|
data: {
|
|
3327
3286
|
targets: '> *',
|
|
3328
3287
|
active: false,
|
|
3329
|
-
animation:
|
|
3288
|
+
animation: true,
|
|
3330
3289
|
collapsible: true,
|
|
3331
3290
|
multiple: false,
|
|
3332
3291
|
clsOpen: 'uk-open',
|
|
@@ -3372,7 +3331,7 @@
|
|
|
3372
3331
|
hide(
|
|
3373
3332
|
el,
|
|
3374
3333
|
!hasClass(
|
|
3375
|
-
this.items.find((item) =>
|
|
3334
|
+
this.items.find((item) => within(el, item)),
|
|
3376
3335
|
this.clsOpen));
|
|
3377
3336
|
|
|
3378
3337
|
|
|
@@ -3424,23 +3383,15 @@
|
|
|
3424
3383
|
toggleClass(el, this.clsOpen, show);
|
|
3425
3384
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3426
3385
|
|
|
3427
|
-
const content = $(
|
|
3386
|
+
const content = $(this.content, el);
|
|
3428
3387
|
|
|
3429
|
-
if (animate === false || !this.
|
|
3388
|
+
if (animate === false || !this.animation) {
|
|
3389
|
+
content.hidden = !show;
|
|
3430
3390
|
hide(content, !show);
|
|
3431
3391
|
return;
|
|
3432
3392
|
}
|
|
3433
3393
|
|
|
3434
|
-
|
|
3435
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3436
|
-
}
|
|
3437
|
-
|
|
3438
|
-
hide(content, false);
|
|
3439
|
-
await slide(this)(el._wrapper, show);
|
|
3440
|
-
hide(content, !show);
|
|
3441
|
-
|
|
3442
|
-
delete el._wrapper;
|
|
3443
|
-
unwrap(content);
|
|
3394
|
+
await toggleTransition(this)(content, show);
|
|
3444
3395
|
|
|
3445
3396
|
if (show) {
|
|
3446
3397
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3466,18 +3417,17 @@
|
|
|
3466
3417
|
args: 'animation',
|
|
3467
3418
|
|
|
3468
3419
|
props: {
|
|
3420
|
+
animation: Boolean,
|
|
3469
3421
|
close: String },
|
|
3470
3422
|
|
|
3471
3423
|
|
|
3472
3424
|
data: {
|
|
3473
|
-
animation:
|
|
3425
|
+
animation: true,
|
|
3474
3426
|
selClose: '.uk-alert-close',
|
|
3475
|
-
duration: 150,
|
|
3476
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3427
|
+
duration: 150 },
|
|
3477
3428
|
|
|
3478
3429
|
|
|
3479
|
-
events:
|
|
3480
|
-
{
|
|
3430
|
+
events: {
|
|
3481
3431
|
name: 'click',
|
|
3482
3432
|
|
|
3483
3433
|
delegate() {
|
|
@@ -3487,16 +3437,39 @@
|
|
|
3487
3437
|
handler(e) {
|
|
3488
3438
|
e.preventDefault();
|
|
3489
3439
|
this.close();
|
|
3490
|
-
} }
|
|
3491
|
-
|
|
3440
|
+
} },
|
|
3492
3441
|
|
|
3493
3442
|
|
|
3494
3443
|
methods: {
|
|
3495
3444
|
async close() {
|
|
3496
|
-
await this.toggleElement(this.$el);
|
|
3445
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3497
3446
|
this.$destroy(true);
|
|
3498
3447
|
} } };
|
|
3499
3448
|
|
|
3449
|
+
|
|
3450
|
+
|
|
3451
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3452
|
+
return (el) => {
|
|
3453
|
+
const height = toFloat(css(el, 'height'));
|
|
3454
|
+
css(el, 'height', height);
|
|
3455
|
+
return Transition.start(
|
|
3456
|
+
el,
|
|
3457
|
+
{
|
|
3458
|
+
height: 0,
|
|
3459
|
+
marginTop: 0,
|
|
3460
|
+
marginBottom: 0,
|
|
3461
|
+
paddingTop: 0,
|
|
3462
|
+
paddingBottom: 0,
|
|
3463
|
+
borderTop: 0,
|
|
3464
|
+
borderBottom: 0,
|
|
3465
|
+
opacity: 0 },
|
|
3466
|
+
|
|
3467
|
+
velocity * height + duration,
|
|
3468
|
+
transition);
|
|
3469
|
+
|
|
3470
|
+
};
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3500
3473
|
var Video = {
|
|
3501
3474
|
args: 'autoplay',
|
|
3502
3475
|
|
|
@@ -3645,13 +3618,17 @@
|
|
|
3645
3618
|
props: {
|
|
3646
3619
|
pos: String,
|
|
3647
3620
|
offset: null,
|
|
3648
|
-
flip: Boolean
|
|
3621
|
+
flip: Boolean,
|
|
3622
|
+
shift: Boolean,
|
|
3623
|
+
inset: Boolean },
|
|
3649
3624
|
|
|
3650
3625
|
|
|
3651
3626
|
data: {
|
|
3652
3627
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3628
|
+
offset: false,
|
|
3653
3629
|
flip: true,
|
|
3654
|
-
|
|
3630
|
+
shift: true,
|
|
3631
|
+
inset: false },
|
|
3655
3632
|
|
|
3656
3633
|
|
|
3657
3634
|
connected() {
|
|
@@ -3663,17 +3640,19 @@
|
|
|
3663
3640
|
methods: {
|
|
3664
3641
|
positionAt(element, target, boundary) {
|
|
3665
3642
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3643
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3666
3644
|
|
|
3667
3645
|
const attach = {
|
|
3668
|
-
element: [flipPosition(this.dir), this.align],
|
|
3646
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3669
3647
|
target: [this.dir, this.align] };
|
|
3670
3648
|
|
|
3671
3649
|
|
|
3672
3650
|
if (this.axis === 'y') {
|
|
3673
3651
|
for (const prop in attach) {
|
|
3674
|
-
attach[prop]
|
|
3652
|
+
attach[prop].reverse();
|
|
3675
3653
|
}
|
|
3676
|
-
offset
|
|
3654
|
+
offset.reverse();
|
|
3655
|
+
placement.reverse();
|
|
3677
3656
|
}
|
|
3678
3657
|
|
|
3679
3658
|
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
@@ -3683,22 +3662,14 @@
|
|
|
3683
3662
|
const elDim = dimensions(element);
|
|
3684
3663
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3685
3664
|
|
|
3686
|
-
|
|
3687
|
-
element,
|
|
3688
|
-
target,
|
|
3689
|
-
{
|
|
3665
|
+
positionAt(element, target, {
|
|
3690
3666
|
attach,
|
|
3691
3667
|
offset,
|
|
3692
3668
|
boundary,
|
|
3693
|
-
|
|
3694
|
-
viewportOffset: this.getViewportOffset(element) }
|
|
3695
|
-
|
|
3669
|
+
placement,
|
|
3670
|
+
viewportOffset: this.getViewportOffset(element) });
|
|
3696
3671
|
|
|
3697
3672
|
|
|
3698
|
-
trigger(element, 'beforeposition', args);
|
|
3699
|
-
|
|
3700
|
-
positionAt(...args);
|
|
3701
|
-
|
|
3702
3673
|
// Restore scroll position
|
|
3703
3674
|
scrollElement.scrollTop = scrollTop;
|
|
3704
3675
|
scrollElement.scrollLeft = scrollLeft;
|
|
@@ -3707,27 +3678,38 @@
|
|
|
3707
3678
|
getPositionOffset(element) {
|
|
3708
3679
|
return (
|
|
3709
3680
|
toPx(
|
|
3710
|
-
this.offset === false ?
|
|
3681
|
+
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3711
3682
|
this.axis === 'x' ? 'width' : 'height',
|
|
3712
3683
|
element) * (
|
|
3713
|
-
|
|
3684
|
+
|
|
3685
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3686
|
+
this.inset ? -1 : 1));
|
|
3714
3687
|
|
|
3715
3688
|
},
|
|
3716
3689
|
|
|
3717
3690
|
getShiftOffset(element) {
|
|
3718
|
-
return
|
|
3691
|
+
return this.align === 'center' ?
|
|
3719
3692
|
0 :
|
|
3720
3693
|
toPx(
|
|
3721
|
-
|
|
3694
|
+
css(element, '--uk-position-shift-offset'),
|
|
3722
3695
|
this.axis === 'y' ? 'width' : 'height',
|
|
3723
3696
|
element) * (
|
|
3724
3697
|
includes(['left', 'top'], this.align) ? 1 : -1);
|
|
3725
3698
|
},
|
|
3726
3699
|
|
|
3727
3700
|
getViewportOffset(element) {
|
|
3728
|
-
return toPx(
|
|
3701
|
+
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3729
3702
|
} } };
|
|
3730
3703
|
|
|
3704
|
+
var Style = {
|
|
3705
|
+
beforeConnect() {
|
|
3706
|
+
this._style = attr(this.$el, 'style');
|
|
3707
|
+
},
|
|
3708
|
+
|
|
3709
|
+
disconnected() {
|
|
3710
|
+
attr(this.$el, 'style', this._style);
|
|
3711
|
+
} };
|
|
3712
|
+
|
|
3731
3713
|
const active$1 = [];
|
|
3732
3714
|
|
|
3733
3715
|
var Modal = {
|
|
@@ -3837,8 +3819,8 @@
|
|
|
3837
3819
|
|
|
3838
3820
|
|
|
3839
3821
|
if (this.overlay) {
|
|
3840
|
-
once(this.$el, '
|
|
3841
|
-
once(this.$el, '
|
|
3822
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3823
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3842
3824
|
}
|
|
3843
3825
|
|
|
3844
3826
|
if (this.stack) {
|
|
@@ -3920,10 +3902,6 @@
|
|
|
3920
3902
|
active$1.splice(active$1.indexOf(this), 1);
|
|
3921
3903
|
}
|
|
3922
3904
|
|
|
3923
|
-
if (!active$1.length) {
|
|
3924
|
-
css(document.body, 'overflowY', '');
|
|
3925
|
-
}
|
|
3926
|
-
|
|
3927
3905
|
css(this.$el, 'zIndex', '');
|
|
3928
3906
|
|
|
3929
3907
|
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
@@ -4040,16 +4018,22 @@
|
|
|
4040
4018
|
return () => events.forEach((fn) => fn());
|
|
4041
4019
|
}
|
|
4042
4020
|
|
|
4021
|
+
let prevented;
|
|
4043
4022
|
function preventBackgroundScroll() {
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4023
|
+
if (prevented) {
|
|
4024
|
+
return noop;
|
|
4025
|
+
}
|
|
4026
|
+
prevented = true;
|
|
4027
|
+
|
|
4028
|
+
const { scrollingElement } = document;
|
|
4029
|
+
css(scrollingElement, {
|
|
4030
|
+
overflowY: 'hidden',
|
|
4031
|
+
touchAction: 'none',
|
|
4032
|
+
paddingRight: width(window) - scrollingElement.clientWidth });
|
|
4048
4033
|
|
|
4049
|
-
css(documentElement, 'overflowY', 'hidden');
|
|
4050
4034
|
return () => {
|
|
4051
|
-
|
|
4052
|
-
css(
|
|
4035
|
+
prevented = false;
|
|
4036
|
+
css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
|
|
4053
4037
|
};
|
|
4054
4038
|
}
|
|
4055
4039
|
|
|
@@ -4066,7 +4050,7 @@
|
|
|
4066
4050
|
let active;
|
|
4067
4051
|
|
|
4068
4052
|
var drop = {
|
|
4069
|
-
mixins: [Container, Lazyload, Position, Togglable],
|
|
4053
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4070
4054
|
|
|
4071
4055
|
args: 'pos',
|
|
4072
4056
|
|
|
@@ -4074,10 +4058,13 @@
|
|
|
4074
4058
|
mode: 'list',
|
|
4075
4059
|
toggle: Boolean,
|
|
4076
4060
|
boundary: Boolean,
|
|
4077
|
-
|
|
4061
|
+
target: Boolean,
|
|
4062
|
+
targetX: Boolean,
|
|
4063
|
+
targetY: Boolean,
|
|
4064
|
+
stretch: Boolean,
|
|
4078
4065
|
delayShow: Number,
|
|
4079
4066
|
delayHide: Number,
|
|
4080
|
-
|
|
4067
|
+
autoUpdate: Boolean,
|
|
4081
4068
|
clsDrop: String,
|
|
4082
4069
|
animateOut: Boolean,
|
|
4083
4070
|
bgScroll: Boolean },
|
|
@@ -4086,17 +4073,32 @@
|
|
|
4086
4073
|
data: {
|
|
4087
4074
|
mode: ['click', 'hover'],
|
|
4088
4075
|
toggle: '- *',
|
|
4089
|
-
boundary:
|
|
4090
|
-
|
|
4076
|
+
boundary: false,
|
|
4077
|
+
target: false,
|
|
4078
|
+
targetX: false,
|
|
4079
|
+
targetY: false,
|
|
4080
|
+
stretch: false,
|
|
4091
4081
|
delayShow: 0,
|
|
4092
4082
|
delayHide: 800,
|
|
4093
|
-
|
|
4083
|
+
autoUpdate: true,
|
|
4094
4084
|
clsDrop: false,
|
|
4085
|
+
animateOut: false,
|
|
4086
|
+
bgScroll: true,
|
|
4095
4087
|
animation: ['uk-animation-fade'],
|
|
4096
4088
|
cls: 'uk-open',
|
|
4097
|
-
container: false,
|
|
4098
|
-
|
|
4099
|
-
|
|
4089
|
+
container: false },
|
|
4090
|
+
|
|
4091
|
+
|
|
4092
|
+
computed: {
|
|
4093
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4094
|
+
targetX = targetX || target || this.targetEl;
|
|
4095
|
+
targetY = targetY || target || this.targetEl;
|
|
4096
|
+
|
|
4097
|
+
return [
|
|
4098
|
+
targetX === true ? window : query(targetX, $el),
|
|
4099
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4100
|
+
|
|
4101
|
+
} },
|
|
4100
4102
|
|
|
4101
4103
|
|
|
4102
4104
|
created() {
|
|
@@ -4110,18 +4112,19 @@
|
|
|
4110
4112
|
connected() {
|
|
4111
4113
|
addClass(this.$el, this.clsDrop);
|
|
4112
4114
|
|
|
4113
|
-
if (this.toggle && !this.
|
|
4114
|
-
this.
|
|
4115
|
+
if (this.toggle && !this.targetEl) {
|
|
4116
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4115
4117
|
target: this.$el,
|
|
4116
4118
|
mode: this.mode }).
|
|
4117
4119
|
$el;
|
|
4118
|
-
attr(this.
|
|
4119
|
-
this.lazyload(this.
|
|
4120
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4121
|
+
this.lazyload(this.targetEl);
|
|
4120
4122
|
}
|
|
4121
4123
|
},
|
|
4122
4124
|
|
|
4123
4125
|
disconnected() {
|
|
4124
4126
|
if (this.isActive()) {
|
|
4127
|
+
this.hide(false);
|
|
4125
4128
|
active = null;
|
|
4126
4129
|
}
|
|
4127
4130
|
},
|
|
@@ -4147,7 +4150,7 @@
|
|
|
4147
4150
|
return 'a[href^="#"]';
|
|
4148
4151
|
},
|
|
4149
4152
|
|
|
4150
|
-
handler(
|
|
4153
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4151
4154
|
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4152
4155
|
this.hide(false);
|
|
4153
4156
|
}
|
|
@@ -4255,21 +4258,22 @@
|
|
|
4255
4258
|
|
|
4256
4259
|
this.tracker.init();
|
|
4257
4260
|
|
|
4258
|
-
|
|
4261
|
+
const update = () => this.$emit();
|
|
4262
|
+
const handlers = [
|
|
4259
4263
|
on(
|
|
4260
4264
|
document,
|
|
4261
4265
|
pointerDown,
|
|
4262
|
-
(
|
|
4266
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4263
4267
|
!within(target, this.$el) &&
|
|
4264
4268
|
once(
|
|
4265
4269
|
document,
|
|
4266
4270
|
pointerUp + " " + pointerCancel + " scroll",
|
|
4267
|
-
(
|
|
4271
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4268
4272
|
if (
|
|
4269
4273
|
!defaultPrevented &&
|
|
4270
4274
|
type === pointerUp &&
|
|
4271
4275
|
target === newTarget &&
|
|
4272
|
-
!(this.
|
|
4276
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4273
4277
|
{
|
|
4274
4278
|
this.hide(false);
|
|
4275
4279
|
}
|
|
@@ -4284,29 +4288,28 @@
|
|
|
4284
4288
|
}
|
|
4285
4289
|
}),
|
|
4286
4290
|
|
|
4291
|
+
on(window, 'resize', update),
|
|
4292
|
+
|
|
4293
|
+
(() => {
|
|
4294
|
+
const observer = observeResize(
|
|
4295
|
+
scrollParents(this.$el).concat(this.targetEl),
|
|
4296
|
+
update);
|
|
4297
|
+
|
|
4298
|
+
return () => observer.disconnect();
|
|
4299
|
+
})(),
|
|
4300
|
+
|
|
4301
|
+
...(this.autoUpdate ?
|
|
4302
|
+
[on([document, scrollParents(this.$el)], 'scroll', update)] :
|
|
4303
|
+
[]),
|
|
4304
|
+
|
|
4287
4305
|
...(this.bgScroll ?
|
|
4288
4306
|
[] :
|
|
4289
|
-
[preventOverscroll(this.$el), preventBackgroundScroll()])
|
|
4307
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()])];
|
|
4308
|
+
|
|
4309
|
+
|
|
4310
|
+
once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
|
|
4311
|
+
self: true });
|
|
4290
4312
|
|
|
4291
|
-
...(this.display === 'static' && this.align !== 'stretch' ?
|
|
4292
|
-
[] :
|
|
4293
|
-
(() => {
|
|
4294
|
-
const handler = () => this.$emit();
|
|
4295
|
-
return [
|
|
4296
|
-
on(window, 'resize', handler),
|
|
4297
|
-
on(document, 'scroll', handler, true),
|
|
4298
|
-
(() => {
|
|
4299
|
-
const observer = observeResize(
|
|
4300
|
-
scrollParents(this.$el),
|
|
4301
|
-
handler);
|
|
4302
|
-
|
|
4303
|
-
return () => observer.disconnect();
|
|
4304
|
-
})()];
|
|
4305
|
-
|
|
4306
|
-
})())])
|
|
4307
|
-
{
|
|
4308
|
-
once(this.$el, 'hide', handler, { self: true });
|
|
4309
|
-
}
|
|
4310
4313
|
} },
|
|
4311
4314
|
|
|
4312
4315
|
|
|
@@ -4323,7 +4326,7 @@
|
|
|
4323
4326
|
{
|
|
4324
4327
|
name: 'hide',
|
|
4325
4328
|
|
|
4326
|
-
handler(
|
|
4329
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4327
4330
|
if (this.$el !== target) {
|
|
4328
4331
|
active =
|
|
4329
4332
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4347,12 +4350,12 @@
|
|
|
4347
4350
|
|
|
4348
4351
|
|
|
4349
4352
|
methods: {
|
|
4350
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4351
|
-
if (this.isToggled() && target && this.
|
|
4353
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4354
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4352
4355
|
this.hide(false, false);
|
|
4353
4356
|
}
|
|
4354
4357
|
|
|
4355
|
-
this.
|
|
4358
|
+
this.targetEl = target;
|
|
4356
4359
|
|
|
4357
4360
|
this.clearTimers();
|
|
4358
4361
|
|
|
@@ -4415,60 +4418,69 @@
|
|
|
4415
4418
|
|
|
4416
4419
|
position() {
|
|
4417
4420
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4418
|
-
|
|
4419
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4421
|
+
attr(this.$el, 'style', this._style);
|
|
4420
4422
|
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
const [scrollParent] = scrollParents(
|
|
4424
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4423
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4424
|
+
this.$el.hidden = true;
|
|
4425
4425
|
|
|
4426
|
-
const
|
|
4427
|
-
const boundaryOffset =
|
|
4426
|
+
const boundary = query(this.boundary, this.$el);
|
|
4427
|
+
const boundaryOffset = offset(boundary || window);
|
|
4428
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4428
4429
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4429
4430
|
|
|
4430
|
-
|
|
4431
|
-
|
|
4431
|
+
const dirs = [
|
|
4432
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4433
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4432
4434
|
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4450
|
-
|
|
4451
|
-
css(this.$el, {
|
|
4452
|
-
width:
|
|
4453
|
-
this.axis === 'y' ?
|
|
4454
|
-
viewport.width :
|
|
4455
|
-
(this.dir === 'left' ?
|
|
4456
|
-
targetDim.left - viewport.left :
|
|
4457
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4458
|
-
height:
|
|
4459
|
-
this.axis === 'x' ?
|
|
4460
|
-
viewport.height :
|
|
4461
|
-
(this.dir === 'top' ?
|
|
4462
|
-
targetDim.top - viewport.top :
|
|
4463
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4464
|
-
|
|
4465
|
-
} else if (this.$el.offsetWidth > maxWidth) {
|
|
4435
|
+
|
|
4436
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4437
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4438
|
+
css(this.$el, {
|
|
4439
|
+
[prop]: Math.min(
|
|
4440
|
+
boundaryOffset[prop],
|
|
4441
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4442
|
+
|
|
4443
|
+
["overflow-" + axis]: 'auto' });
|
|
4444
|
+
|
|
4445
|
+
}
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4449
|
+
|
|
4450
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4466
4451
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4467
4452
|
}
|
|
4468
4453
|
|
|
4469
4454
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4470
4455
|
|
|
4471
|
-
this
|
|
4456
|
+
this.$el.hidden = false;
|
|
4457
|
+
|
|
4458
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4459
|
+
|
|
4460
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4461
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4462
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4463
|
+
const targetOffset = offset(this.target[i]);
|
|
4464
|
+
const elOffset = offset(this.$el);
|
|
4465
|
+
|
|
4466
|
+
css(this.$el, {
|
|
4467
|
+
[prop]:
|
|
4468
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4469
|
+
targetOffset[start] -
|
|
4470
|
+
Math.max(
|
|
4471
|
+
boundaryOffset[start],
|
|
4472
|
+
viewports[i][start] + viewportOffset) :
|
|
4473
|
+
|
|
4474
|
+
Math.min(
|
|
4475
|
+
boundaryOffset[end],
|
|
4476
|
+
viewports[i][end] - viewportOffset) -
|
|
4477
|
+
targetOffset[end]) - positionOffset,
|
|
4478
|
+
["overflow-" + axis]: 'auto' });
|
|
4479
|
+
|
|
4480
|
+
|
|
4481
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4482
|
+
}
|
|
4483
|
+
}
|
|
4472
4484
|
} } };
|
|
4473
4485
|
|
|
4474
4486
|
|
|
@@ -4965,8 +4977,11 @@
|
|
|
4965
4977
|
let minHeight = '';
|
|
4966
4978
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4967
4979
|
|
|
4980
|
+
const { body, scrollingElement } = document;
|
|
4968
4981
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4969
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4982
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4983
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4984
|
+
|
|
4970
4985
|
|
|
4971
4986
|
if (this.expand) {
|
|
4972
4987
|
minHeight = Math.max(
|
|
@@ -4976,7 +4991,6 @@
|
|
|
4976
4991
|
0);
|
|
4977
4992
|
|
|
4978
4993
|
} else {
|
|
4979
|
-
const { body, scrollingElement } = document;
|
|
4980
4994
|
const isScrollingElement =
|
|
4981
4995
|
scrollingElement === scrollElement || body === scrollElement;
|
|
4982
4996
|
|
|
@@ -5232,7 +5246,13 @@
|
|
|
5232
5246
|
|
|
5233
5247
|
var marker = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"9\" y=\"4\" width=\"1\" height=\"11\"/><rect x=\"4\" y=\"9\" width=\"11\" height=\"1\"/></svg>";
|
|
5234
5248
|
|
|
5235
|
-
var
|
|
5249
|
+
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>";
|
|
5250
|
+
|
|
5251
|
+
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>";
|
|
5252
|
+
|
|
5253
|
+
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>";
|
|
5254
|
+
|
|
5255
|
+
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><style>.uk-navbar-toggle-animate svg > [class*='line-'] {\n transition: 0.2s ease-in-out;\n transition-property: transform, opacity,;\n transform-origin: center;\n opacity: 1;\n }\n\n .uk-navbar-toggle svg > .line-3 { opacity: 0; }\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-3 { opacity: 1; }\n\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-2 { transform: rotate(45deg); }\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-3 { transform: rotate(-45deg); }\n\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-1,\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-4 { opacity: 0; }\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-1 { transform: translateY(6px) scaleX(0); }\n .uk-navbar-toggle-animate[aria-expanded=\"true\"] svg > .line-4 { transform: translateY(-6px) scaleX(0); }</style><rect class=\"line-1\" y=\"3\" width=\"20\" height=\"2\"/><rect class=\"line-2\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-3\" y=\"9\" width=\"20\" height=\"2\"/><rect class=\"line-4\" y=\"15\" width=\"20\" height=\"2\"/></svg>";
|
|
5236
5256
|
|
|
5237
5257
|
var overlayIcon = "<svg width=\"40\" height=\"40\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"19\" y=\"0\" width=\"1\" height=\"40\"/><rect x=\"0\" y=\"19\" width=\"40\" height=\"1\"/></svg>";
|
|
5238
5258
|
|
|
@@ -5264,6 +5284,9 @@
|
|
|
5264
5284
|
marker,
|
|
5265
5285
|
'close-icon': closeIcon,
|
|
5266
5286
|
'close-large': closeLarge,
|
|
5287
|
+
'nav-parent-icon': navParentIcon,
|
|
5288
|
+
'nav-parent-icon-large': navParentIconLarge,
|
|
5289
|
+
'navbar-parent-icon': navbarParentIcon,
|
|
5267
5290
|
'navbar-toggle-icon': navbarToggleIcon,
|
|
5268
5291
|
'overlay-icon': overlayIcon,
|
|
5269
5292
|
'pagination-next': paginationNext,
|
|
@@ -5321,6 +5344,15 @@
|
|
|
5321
5344
|
} };
|
|
5322
5345
|
|
|
5323
5346
|
|
|
5347
|
+
const NavParentIcon = {
|
|
5348
|
+
extends: IconComponent,
|
|
5349
|
+
|
|
5350
|
+
beforeConnect() {
|
|
5351
|
+
const icon = this.$props.icon;
|
|
5352
|
+
this.icon = closest(this.$el, '.uk-nav-primary') ? icon + "-large" : icon;
|
|
5353
|
+
} };
|
|
5354
|
+
|
|
5355
|
+
|
|
5324
5356
|
const Slidenav = {
|
|
5325
5357
|
extends: IconComponent,
|
|
5326
5358
|
|
|
@@ -5581,7 +5613,7 @@
|
|
|
5581
5613
|
|
|
5582
5614
|
|
|
5583
5615
|
connected() {
|
|
5584
|
-
const media = toMedia(this.media);
|
|
5616
|
+
const media = toMedia(this.media, this.$el);
|
|
5585
5617
|
this.matchMedia = true;
|
|
5586
5618
|
if (media) {
|
|
5587
5619
|
this.mediaObj = window.matchMedia(media);
|
|
@@ -5602,11 +5634,10 @@
|
|
|
5602
5634
|
} };
|
|
5603
5635
|
|
|
5604
5636
|
|
|
5605
|
-
function toMedia(value) {
|
|
5637
|
+
function toMedia(value, element) {
|
|
5606
5638
|
if (isString(value)) {
|
|
5607
5639
|
if (startsWith(value, '@')) {
|
|
5608
|
-
|
|
5609
|
-
value = toFloat(getCssVar(name));
|
|
5640
|
+
value = toFloat(css(element, "--uk-breakpoint-" + value.substr(1)));
|
|
5610
5641
|
} else if (isNaN(value)) {
|
|
5611
5642
|
return value;
|
|
5612
5643
|
}
|
|
@@ -5631,7 +5662,7 @@
|
|
|
5631
5662
|
|
|
5632
5663
|
computed: {
|
|
5633
5664
|
fill(_ref) {let { fill } = _ref;
|
|
5634
|
-
return fill ||
|
|
5665
|
+
return fill || css(this.$el, '--uk-leader-fill-content');
|
|
5635
5666
|
} },
|
|
5636
5667
|
|
|
5637
5668
|
|
|
@@ -5823,7 +5854,9 @@
|
|
|
5823
5854
|
align: String,
|
|
5824
5855
|
offset: Number,
|
|
5825
5856
|
boundary: Boolean,
|
|
5826
|
-
|
|
5857
|
+
target: Boolean,
|
|
5858
|
+
targetX: Boolean,
|
|
5859
|
+
targetY: Boolean,
|
|
5827
5860
|
clsDrop: String,
|
|
5828
5861
|
delayShow: Number,
|
|
5829
5862
|
delayHide: Number,
|
|
@@ -5840,9 +5873,12 @@
|
|
|
5840
5873
|
offset: undefined,
|
|
5841
5874
|
delayShow: undefined,
|
|
5842
5875
|
delayHide: undefined,
|
|
5843
|
-
|
|
5844
|
-
|
|
5876
|
+
flip: false,
|
|
5877
|
+
shift: true,
|
|
5845
5878
|
boundary: true,
|
|
5879
|
+
target: false,
|
|
5880
|
+
targetX: false,
|
|
5881
|
+
targetY: false,
|
|
5846
5882
|
dropbar: false,
|
|
5847
5883
|
dropbarAnchor: false,
|
|
5848
5884
|
duration: 200,
|
|
@@ -5877,7 +5913,7 @@
|
|
|
5877
5913
|
},
|
|
5878
5914
|
|
|
5879
5915
|
watch(dropbar) {
|
|
5880
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5916
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5881
5917
|
},
|
|
5882
5918
|
|
|
5883
5919
|
immediate: true },
|
|
@@ -5893,7 +5929,7 @@
|
|
|
5893
5929
|
|
|
5894
5930
|
if (this.dropContainer !== $el) {
|
|
5895
5931
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5896
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5932
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5897
5933
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5898
5934
|
dropdowns.push(el);
|
|
5899
5935
|
}
|
|
@@ -5955,8 +5991,8 @@
|
|
|
5955
5991
|
if (
|
|
5956
5992
|
active &&
|
|
5957
5993
|
includes(active.mode, 'hover') &&
|
|
5958
|
-
active.
|
|
5959
|
-
!within(active.
|
|
5994
|
+
active.targetEl &&
|
|
5995
|
+
!within(active.targetEl, current) &&
|
|
5960
5996
|
!active.isDelaying)
|
|
5961
5997
|
{
|
|
5962
5998
|
active.hide(false);
|
|
@@ -5978,7 +6014,7 @@
|
|
|
5978
6014
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5979
6015
|
e.preventDefault();
|
|
5980
6016
|
|
|
5981
|
-
if (!active || active.
|
|
6017
|
+
if (!active || active.targetEl !== current) {
|
|
5982
6018
|
current.click();
|
|
5983
6019
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5984
6020
|
focusFirstFocusableElement(target));});
|
|
@@ -6028,8 +6064,8 @@
|
|
|
6028
6064
|
}
|
|
6029
6065
|
}
|
|
6030
6066
|
|
|
6031
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
6032
|
-
active == null ? void 0 : (_active$
|
|
6067
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6068
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
6033
6069
|
}
|
|
6034
6070
|
|
|
6035
6071
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -6100,39 +6136,19 @@
|
|
|
6100
6136
|
return;
|
|
6101
6137
|
}
|
|
6102
6138
|
|
|
6103
|
-
this._observer = observeResize(target, () =>
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
{
|
|
6115
|
-
name: 'beforeposition',
|
|
6116
|
-
|
|
6117
|
-
el() {
|
|
6118
|
-
return this.dropContainer;
|
|
6119
|
-
},
|
|
6120
|
-
|
|
6121
|
-
filter() {
|
|
6122
|
-
return this.dropbar;
|
|
6123
|
-
},
|
|
6124
|
-
|
|
6125
|
-
handler(e, element, target, options) {
|
|
6126
|
-
if (!this.isDropbarDrop(element)) {
|
|
6127
|
-
return;
|
|
6128
|
-
}
|
|
6129
|
-
|
|
6130
|
-
const dropbarOffset = offset(this.dropbar);
|
|
6139
|
+
this._observer = observeResize(target, () => {
|
|
6140
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6141
|
+
concat(target).
|
|
6142
|
+
map((el) => offset(el));
|
|
6143
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6144
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6145
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6146
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6147
|
+
this.transitionTo(
|
|
6148
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6149
|
+
target);
|
|
6131
6150
|
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
options.offset[1] = dropbarOffset.top - offset(target).bottom;
|
|
6135
|
-
options.viewportOffset += dropbarOffset.left;
|
|
6151
|
+
});
|
|
6136
6152
|
} },
|
|
6137
6153
|
|
|
6138
6154
|
|
|
@@ -6153,7 +6169,7 @@
|
|
|
6153
6169
|
if (
|
|
6154
6170
|
matches(this.dropbar, ':hover') &&
|
|
6155
6171
|
(active == null ? void 0 : active.$el) === e.target &&
|
|
6156
|
-
!this.toggles.some((el) => active.
|
|
6172
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6157
6173
|
{
|
|
6158
6174
|
e.preventDefault();
|
|
6159
6175
|
}
|
|
@@ -6171,7 +6187,7 @@
|
|
|
6171
6187
|
return this.dropbar;
|
|
6172
6188
|
},
|
|
6173
6189
|
|
|
6174
|
-
handler(
|
|
6190
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6175
6191
|
if (!this.isDropbarDrop(target)) {
|
|
6176
6192
|
return;
|
|
6177
6193
|
}
|
|
@@ -6189,7 +6205,7 @@
|
|
|
6189
6205
|
|
|
6190
6206
|
methods: {
|
|
6191
6207
|
getActive() {
|
|
6192
|
-
return active
|
|
6208
|
+
return includes(this.dropdowns, active == null ? void 0 : active.$el) && active;
|
|
6193
6209
|
},
|
|
6194
6210
|
|
|
6195
6211
|
transitionTo(newHeight, el) {
|
|
@@ -6222,15 +6238,14 @@
|
|
|
6222
6238
|
},
|
|
6223
6239
|
|
|
6224
6240
|
isDropbarDrop(el) {
|
|
6225
|
-
|
|
6226
|
-
return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
|
|
6241
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6227
6242
|
} } };
|
|
6228
6243
|
|
|
6229
6244
|
|
|
6230
6245
|
|
|
6231
6246
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6232
6247
|
const { current, keyCode } = e;
|
|
6233
|
-
const target = (active == null ? void 0 : active.
|
|
6248
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6234
6249
|
const i = toggles.indexOf(target);
|
|
6235
6250
|
|
|
6236
6251
|
// Left
|
|
@@ -6430,9 +6445,12 @@
|
|
|
6430
6445
|
addClass(parent(this.panel), this.clsMode);
|
|
6431
6446
|
}
|
|
6432
6447
|
|
|
6433
|
-
|
|
6434
|
-
|
|
6448
|
+
const { body, scrollingElement } = document;
|
|
6449
|
+
|
|
6450
|
+
addClass(body, this.clsContainer, this.clsFlip);
|
|
6451
|
+
css(body, 'touch-action', 'pan-y pinch-zoom');
|
|
6435
6452
|
css(this.$el, 'display', 'block');
|
|
6453
|
+
css(this.panel, 'maxWidth', scrollingElement.clientWidth);
|
|
6436
6454
|
addClass(this.$el, this.clsOverlay);
|
|
6437
6455
|
addClass(
|
|
6438
6456
|
this.panel,
|
|
@@ -6440,8 +6458,8 @@
|
|
|
6440
6458
|
this.mode === 'reveal' ? '' : this.clsMode);
|
|
6441
6459
|
|
|
6442
6460
|
|
|
6443
|
-
height(
|
|
6444
|
-
addClass(
|
|
6461
|
+
height(body); // force reflow
|
|
6462
|
+
addClass(body, this.clsContainerAnimation);
|
|
6445
6463
|
|
|
6446
6464
|
this.clsContainerAnimation && suppressUserScale();
|
|
6447
6465
|
} },
|
|
@@ -6473,6 +6491,7 @@
|
|
|
6473
6491
|
removeClass(this.panel, this.clsSidebarAnimation, this.clsMode);
|
|
6474
6492
|
removeClass(this.$el, this.clsOverlay);
|
|
6475
6493
|
css(this.$el, 'display', '');
|
|
6494
|
+
css(this.panel, 'maxWidth', '');
|
|
6476
6495
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
6477
6496
|
} },
|
|
6478
6497
|
|
|
@@ -6598,6 +6617,14 @@
|
|
|
6598
6617
|
offset: 0 },
|
|
6599
6618
|
|
|
6600
6619
|
|
|
6620
|
+
connected() {
|
|
6621
|
+
registerClick(this);
|
|
6622
|
+
},
|
|
6623
|
+
|
|
6624
|
+
disconnected() {
|
|
6625
|
+
unregisterClick(this);
|
|
6626
|
+
},
|
|
6627
|
+
|
|
6601
6628
|
methods: {
|
|
6602
6629
|
async scrollTo(el) {
|
|
6603
6630
|
el = el && $(el) || document.body;
|
|
@@ -6606,20 +6633,39 @@
|
|
|
6606
6633
|
await scrollIntoView(el, { offset: this.offset });
|
|
6607
6634
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6608
6635
|
}
|
|
6609
|
-
} }
|
|
6636
|
+
} } };
|
|
6610
6637
|
|
|
6611
6638
|
|
|
6612
|
-
events: {
|
|
6613
|
-
click(e) {
|
|
6614
|
-
if (e.defaultPrevented) {
|
|
6615
|
-
return;
|
|
6616
|
-
}
|
|
6617
6639
|
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6640
|
+
const components$1 = new Set();
|
|
6641
|
+
function registerClick(cmp) {
|
|
6642
|
+
if (!components$1.size) {
|
|
6643
|
+
on(document, 'click', clickHandler);
|
|
6644
|
+
}
|
|
6645
|
+
|
|
6646
|
+
components$1.add(cmp);
|
|
6647
|
+
}
|
|
6648
|
+
|
|
6649
|
+
function unregisterClick(cmp) {
|
|
6650
|
+
components$1.delete(cmp);
|
|
6651
|
+
|
|
6652
|
+
if (!components$1.length) {
|
|
6653
|
+
off(document, 'click', clickHandler);
|
|
6654
|
+
}
|
|
6655
|
+
}
|
|
6621
6656
|
|
|
6657
|
+
function clickHandler(e) {
|
|
6658
|
+
if (e.defaultPrevented) {
|
|
6659
|
+
return;
|
|
6660
|
+
}
|
|
6622
6661
|
|
|
6662
|
+
for (const component of components$1) {
|
|
6663
|
+
if (within(e.target, component.$el)) {
|
|
6664
|
+
e.preventDefault();
|
|
6665
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6666
|
+
}
|
|
6667
|
+
}
|
|
6668
|
+
}
|
|
6623
6669
|
|
|
6624
6670
|
function getTargetElement(el) {
|
|
6625
6671
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -7582,7 +7628,7 @@
|
|
|
7582
7628
|
|
|
7583
7629
|
|
|
7584
7630
|
{
|
|
7585
|
-
name: '
|
|
7631
|
+
name: 'hide show',
|
|
7586
7632
|
|
|
7587
7633
|
self: true,
|
|
7588
7634
|
|
|
@@ -7590,10 +7636,8 @@
|
|
|
7590
7636
|
return this.target;
|
|
7591
7637
|
},
|
|
7592
7638
|
|
|
7593
|
-
handler(
|
|
7594
|
-
|
|
7595
|
-
this.updateAria(toggled);
|
|
7596
|
-
}
|
|
7639
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7640
|
+
this.updateAria(type === 'show');
|
|
7597
7641
|
} },
|
|
7598
7642
|
|
|
7599
7643
|
|
|
@@ -7688,10 +7732,12 @@
|
|
|
7688
7732
|
Video: Video,
|
|
7689
7733
|
Close: Close,
|
|
7690
7734
|
Spinner: Spinner,
|
|
7735
|
+
NavParentIcon: NavParentIcon,
|
|
7691
7736
|
SlidenavNext: Slidenav,
|
|
7692
7737
|
SlidenavPrevious: Slidenav,
|
|
7693
7738
|
SearchIcon: Search,
|
|
7694
7739
|
Marker: IconComponent,
|
|
7740
|
+
NavbarParentIcon: IconComponent,
|
|
7695
7741
|
NavbarToggleIcon: IconComponent,
|
|
7696
7742
|
OverlayIcon: IconComponent,
|
|
7697
7743
|
PaginationNext: IconComponent,
|