uikit 3.14.4-dev.3a6c538ab → 3.14.4-dev.3c3ec2cad
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 +31 -17
- package/build/util.js +1 -0
- package/dist/css/uikit-core-rtl.css +284 -63
- package/dist/css/uikit-core-rtl.min.css +1 -1
- package/dist/css/uikit-core.css +284 -63
- package/dist/css/uikit-core.min.css +1 -1
- package/dist/css/uikit-rtl.css +306 -92
- package/dist/css/uikit-rtl.min.css +1 -1
- package/dist/css/uikit.css +306 -92
- 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 +98 -131
- package/dist/js/components/lightbox-panel.min.js +1 -1
- package/dist/js/components/lightbox.js +98 -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 +1 -1
- package/dist/js/components/parallax.min.js +1 -1
- package/dist/js/components/slider-parallax.js +1 -1
- 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 +1 -1
- 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 +101 -136
- 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 +521 -481
- 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 +524 -482
- package/dist/js/uikit.min.js +17 -1
- package/package.json +11 -11
- 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/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/modal.js +15 -12
- package/src/js/mixin/position.js +21 -22
- package/src/js/mixin/style.js +11 -0
- package/src/js/mixin/togglable.js +90 -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/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 +6 -20
- package/src/less/components/nav.less +214 -23
- package/src/less/components/navbar.less +26 -54
- 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 +46 -0
- package/src/less/theme/navbar.less +5 -36
- 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 +6 -20
- package/src/scss/components/nav.scss +163 -22
- package/src/scss/components/navbar.scss +26 -54
- package/src/scss/mixins-theme.scss +81 -35
- package/src/scss/mixins.scss +77 -3
- 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 +44 -0
- package/src/scss/theme/navbar.scss +4 -8
- package/src/scss/variables-theme.scss +58 -13
- package/src/scss/variables.scss +46 -8
- 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 +127 -108
- 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 +121 -12
- package/tests/navbar.html +111 -220
- package/tests/offcanvas.html +10 -14
- 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 +16 -16
package/dist/js/uikit-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! UIkit 3.14.4-dev.
|
|
1
|
+
/*! UIkit 3.14.4-dev.3c3ec2cad | 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) {
|
|
@@ -818,7 +814,9 @@
|
|
|
818
814
|
}
|
|
819
815
|
|
|
820
816
|
function removeClasses(element, cls) {
|
|
821
|
-
attr(element, 'class', (value) =>
|
|
817
|
+
attr(element, 'class', (value) =>
|
|
818
|
+
(value || '').replace(new RegExp("\\b" + cls + "\\b\\s?", 'g'), ''));
|
|
819
|
+
|
|
822
820
|
}
|
|
823
821
|
|
|
824
822
|
function replaceClass(element) {
|
|
@@ -903,13 +901,14 @@
|
|
|
903
901
|
const Transition = {
|
|
904
902
|
start: transition,
|
|
905
903
|
|
|
906
|
-
stop(element) {
|
|
904
|
+
async stop(element) {
|
|
907
905
|
trigger(element, 'transitionend');
|
|
908
|
-
|
|
906
|
+
await Promise.resolve();
|
|
909
907
|
},
|
|
910
908
|
|
|
911
|
-
cancel(element) {
|
|
909
|
+
async cancel(element) {
|
|
912
910
|
trigger(element, 'transitioncanceled');
|
|
911
|
+
await Promise.resolve();
|
|
913
912
|
},
|
|
914
913
|
|
|
915
914
|
inProgress(element) {
|
|
@@ -919,7 +918,7 @@
|
|
|
919
918
|
|
|
920
919
|
const animationPrefix = 'uk-animation-';
|
|
921
920
|
|
|
922
|
-
function animate$
|
|
921
|
+
function animate$2(element, animation, duration, origin, out) {if (duration === void 0) {duration = 200;}
|
|
923
922
|
return Promise.all(
|
|
924
923
|
toNodes(element).map(
|
|
925
924
|
(element) =>
|
|
@@ -953,16 +952,17 @@
|
|
|
953
952
|
|
|
954
953
|
}
|
|
955
954
|
|
|
956
|
-
const
|
|
955
|
+
const inProgressRe = new RegExp(animationPrefix + "(enter|leave)");
|
|
956
|
+
|
|
957
957
|
const Animation = {
|
|
958
|
-
in: animate$
|
|
958
|
+
in: animate$2,
|
|
959
959
|
|
|
960
960
|
out(element, animation, duration, origin) {
|
|
961
|
-
return animate$
|
|
961
|
+
return animate$2(element, animation, duration, origin, true);
|
|
962
962
|
},
|
|
963
963
|
|
|
964
964
|
inProgress(element) {
|
|
965
|
-
return
|
|
965
|
+
return inProgressRe.test(attr(element, 'class'));
|
|
966
966
|
},
|
|
967
967
|
|
|
968
968
|
cancel(element) {
|
|
@@ -1889,12 +1889,10 @@
|
|
|
1889
1889
|
function offsetViewport(scrollElement) {
|
|
1890
1890
|
const window = toWindow(scrollElement);
|
|
1891
1891
|
const {
|
|
1892
|
-
document: {
|
|
1892
|
+
document: { documentElement } } =
|
|
1893
1893
|
window;
|
|
1894
1894
|
let viewportElement =
|
|
1895
|
-
scrollElement === scrollingElement(scrollElement)
|
|
1896
|
-
window :
|
|
1897
|
-
scrollElement;
|
|
1895
|
+
scrollElement === scrollingElement(scrollElement) ? window : scrollElement;
|
|
1898
1896
|
|
|
1899
1897
|
const { visualViewport } = window;
|
|
1900
1898
|
if (isWindow(viewportElement) && visualViewport) {
|
|
@@ -1913,7 +1911,7 @@
|
|
|
1913
1911
|
// iOS 12 returns <body> as scrollingElement
|
|
1914
1912
|
viewportElement = documentElement;
|
|
1915
1913
|
} else {
|
|
1916
|
-
rect[start] += toFloat(css(viewportElement, "border" +
|
|
1914
|
+
rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
|
|
1917
1915
|
}
|
|
1918
1916
|
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1919
1917
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -1938,127 +1936,47 @@
|
|
|
1938
1936
|
...options.attach },
|
|
1939
1937
|
|
|
1940
1938
|
offset: [0, 0],
|
|
1939
|
+
placement: [],
|
|
1941
1940
|
...options };
|
|
1942
1941
|
|
|
1943
1942
|
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
attachTo(element, target, options);
|
|
1947
|
-
|
|
1948
|
-
offset(element, dim);
|
|
1949
|
-
}
|
|
1950
|
-
|
|
1951
|
-
function attachTo(element, target, options) {
|
|
1952
|
-
let { attach, offset: offsetBy } = {
|
|
1953
|
-
attach: {
|
|
1954
|
-
element: ['left', 'top'],
|
|
1955
|
-
target: ['left', 'top'],
|
|
1956
|
-
...options.attach },
|
|
1957
|
-
|
|
1958
|
-
offset: [0, 0],
|
|
1959
|
-
...options };
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
const position = offset(element);
|
|
1963
|
-
const targetOffset = offset(target);
|
|
1964
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1965
|
-
position[start] = position[dir] =
|
|
1966
|
-
targetOffset[start] +
|
|
1967
|
-
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
1968
|
-
moveBy(attach.element[i], end, position[prop]) +
|
|
1969
|
-
+offsetBy[i];
|
|
1970
|
-
position[end] = position[start] + position[prop];
|
|
1943
|
+
if (!isArray(target)) {
|
|
1944
|
+
target = [target, target];
|
|
1971
1945
|
}
|
|
1972
|
-
return position;
|
|
1973
|
-
}
|
|
1974
1946
|
|
|
1975
|
-
|
|
1976
|
-
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
1947
|
+
offset(element, getPosition(element, target, options));
|
|
1977
1948
|
}
|
|
1978
1949
|
|
|
1979
|
-
function
|
|
1950
|
+
function getPosition(element, target, options) {
|
|
1980
1951
|
const position = attachTo(element, target, options);
|
|
1981
|
-
const
|
|
1982
|
-
|
|
1983
|
-
let {
|
|
1984
|
-
flip,
|
|
1985
|
-
attach: { element: elAttach, target: targetAttach },
|
|
1986
|
-
offset: elOffset,
|
|
1987
|
-
boundary,
|
|
1988
|
-
viewport,
|
|
1989
|
-
viewportOffset } =
|
|
1990
|
-
options;
|
|
1991
|
-
|
|
1992
|
-
let viewports = scrollParents(element);
|
|
1993
|
-
if (boundary === target) {
|
|
1994
|
-
viewports = viewports.filter((viewport) => viewport !== boundary);
|
|
1995
|
-
}
|
|
1996
|
-
const [scrollElement] = viewports;
|
|
1997
|
-
viewports.push(viewport);
|
|
1998
|
-
|
|
1999
|
-
const offsetPosition = { ...position };
|
|
2000
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
2001
|
-
if (flip !== true && !includes(flip, dir)) {
|
|
2002
|
-
continue;
|
|
2003
|
-
}
|
|
1952
|
+
const { boundary, viewportOffset = 0, placement } = options;
|
|
2004
1953
|
|
|
2005
|
-
|
|
2006
|
-
|
|
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);
|
|
2007
1957
|
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
if (viewportOffset) {
|
|
2011
|
-
viewport[start] += viewportOffset;
|
|
2012
|
-
viewport[end] -= viewportOffset;
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
|
|
2016
|
-
viewport = getIntersectionArea(viewport, offset(boundary));
|
|
2017
|
-
}
|
|
2018
|
-
|
|
2019
|
-
const isInStartBoundary = position[start] >= viewport[start];
|
|
2020
|
-
const isInEndBoundary = position[end] <= viewport[end];
|
|
2021
|
-
|
|
2022
|
-
if (isInStartBoundary && isInEndBoundary) {
|
|
1958
|
+
if (isWithin(position, viewport, i)) {
|
|
2023
1959
|
continue;
|
|
2024
1960
|
}
|
|
2025
1961
|
|
|
2026
|
-
let offsetBy;
|
|
1962
|
+
let offsetBy = 0;
|
|
2027
1963
|
|
|
2028
1964
|
// Flip
|
|
2029
|
-
if (
|
|
1965
|
+
if (placement[i] === 'flip') {
|
|
1966
|
+
const attach = options.attach.target[i];
|
|
2030
1967
|
if (
|
|
2031
|
-
|
|
2032
|
-
|
|
1968
|
+
attach === end && position[end] <= viewport[end] ||
|
|
1969
|
+
attach === start && position[start] >= viewport[start])
|
|
2033
1970
|
{
|
|
2034
1971
|
continue;
|
|
2035
1972
|
}
|
|
2036
1973
|
|
|
2037
|
-
offsetBy =
|
|
2038
|
-
(elAttach[i] === start ?
|
|
2039
|
-
-position[prop] :
|
|
2040
|
-
elAttach[i] === end ?
|
|
2041
|
-
position[prop] :
|
|
2042
|
-
0) + (
|
|
2043
|
-
targetAttach[i] === start ?
|
|
2044
|
-
targetDim[prop] :
|
|
2045
|
-
targetAttach[i] === end ?
|
|
2046
|
-
-targetDim[prop] :
|
|
2047
|
-
0) -
|
|
2048
|
-
elOffset[i] * 2;
|
|
2049
|
-
|
|
2050
|
-
if (
|
|
2051
|
-
!isInScrollArea(
|
|
2052
|
-
{
|
|
2053
|
-
...position,
|
|
2054
|
-
[start]: position[start] + offsetBy,
|
|
2055
|
-
[end]: position[end] + offsetBy },
|
|
1974
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2056
1975
|
|
|
2057
|
-
|
|
2058
|
-
i))
|
|
1976
|
+
const scrollArea = getScrollArea(target[i], viewportOffset, i);
|
|
2059
1977
|
|
|
2060
|
-
{
|
|
2061
|
-
if (
|
|
1978
|
+
if (!isWithin(applyOffset(position, offsetBy, i), scrollArea, i)) {
|
|
1979
|
+
if (isWithin(position, scrollArea, i)) {
|
|
2062
1980
|
continue;
|
|
2063
1981
|
}
|
|
2064
1982
|
|
|
@@ -2066,27 +1984,19 @@
|
|
|
2066
1984
|
return false;
|
|
2067
1985
|
}
|
|
2068
1986
|
|
|
2069
|
-
|
|
2070
|
-
const newPos = attachToWithFlip(element, target, {
|
|
2071
|
-
...options,
|
|
2072
|
-
attach: {
|
|
2073
|
-
element: elAttach.map(flipDir).reverse(),
|
|
2074
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2075
|
-
|
|
2076
|
-
offset: elOffset.reverse(),
|
|
2077
|
-
flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
|
|
2078
|
-
recursion: true });
|
|
1987
|
+
const newPos = flipAxis(element, target, options);
|
|
2079
1988
|
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
return newPos;
|
|
2083
|
-
}
|
|
1989
|
+
if (newPos && isWithin(newPos, scrollArea, 1 - i)) {
|
|
1990
|
+
return newPos;
|
|
2084
1991
|
}
|
|
1992
|
+
|
|
2085
1993
|
continue;
|
|
2086
1994
|
}
|
|
2087
1995
|
|
|
2088
|
-
//
|
|
2089
|
-
} else {
|
|
1996
|
+
// Shift
|
|
1997
|
+
} else if (placement[i] === 'shift') {
|
|
1998
|
+
const targetDim = offset(target[i]);
|
|
1999
|
+
const { offset: elOffset } = options;
|
|
2090
2000
|
offsetBy =
|
|
2091
2001
|
clamp(
|
|
2092
2002
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2095,13 +2005,78 @@
|
|
|
2095
2005
|
position[start];
|
|
2096
2006
|
}
|
|
2097
2007
|
|
|
2098
|
-
offsetPosition
|
|
2099
|
-
offsetPosition[end] += offsetBy;
|
|
2008
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2100
2009
|
}
|
|
2101
2010
|
|
|
2102
2011
|
return offsetPosition;
|
|
2103
2012
|
}
|
|
2104
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
|
+
|
|
2105
2080
|
function getIntersectionArea() {
|
|
2106
2081
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2107
2082
|
for (const rect of rects) {
|
|
@@ -2113,21 +2088,44 @@
|
|
|
2113
2088
|
return area;
|
|
2114
2089
|
}
|
|
2115
2090
|
|
|
2116
|
-
function
|
|
2117
|
-
const
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
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 });
|
|
2121
2116
|
|
|
2122
|
-
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2123
2117
|
}
|
|
2124
2118
|
|
|
2125
|
-
function
|
|
2126
|
-
const
|
|
2127
|
-
|
|
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;
|
|
2128
2126
|
}
|
|
2129
2127
|
|
|
2130
|
-
function
|
|
2128
|
+
function flipAttachAxis(prop) {
|
|
2131
2129
|
for (let i = 0; i < dirs.length; i++) {
|
|
2132
2130
|
const index = dirs[i].indexOf(prop);
|
|
2133
2131
|
if (~index) {
|
|
@@ -2136,13 +2134,17 @@
|
|
|
2136
2134
|
}
|
|
2137
2135
|
}
|
|
2138
2136
|
|
|
2137
|
+
function flipOffset(offset, i) {
|
|
2138
|
+
offset = [...offset];
|
|
2139
|
+
offset[i] *= -1;
|
|
2140
|
+
return offset;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2139
2143
|
var util = /*#__PURE__*/Object.freeze({
|
|
2140
2144
|
__proto__: null,
|
|
2141
2145
|
ajax: ajax,
|
|
2142
2146
|
getImage: getImage,
|
|
2143
|
-
transition: transition,
|
|
2144
2147
|
Transition: Transition,
|
|
2145
|
-
animate: animate$1,
|
|
2146
2148
|
Animation: Animation,
|
|
2147
2149
|
attr: attr,
|
|
2148
2150
|
hasAttr: hasAttr,
|
|
@@ -2447,7 +2449,11 @@
|
|
|
2447
2449
|
}
|
|
2448
2450
|
|
|
2449
2451
|
if (write && result !== false) {
|
|
2450
|
-
fastdom.write(() =>
|
|
2452
|
+
fastdom.write(() => {
|
|
2453
|
+
if (this._connected) {
|
|
2454
|
+
write.call(this, this._data, types);
|
|
2455
|
+
}
|
|
2456
|
+
});
|
|
2451
2457
|
}
|
|
2452
2458
|
}
|
|
2453
2459
|
}
|
|
@@ -2596,7 +2602,7 @@
|
|
|
2596
2602
|
|
|
2597
2603
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2598
2604
|
|
|
2599
|
-
if (prop === 'target' &&
|
|
2605
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2600
2606
|
continue;
|
|
2601
2607
|
}
|
|
2602
2608
|
|
|
@@ -2607,7 +2613,7 @@
|
|
|
2607
2613
|
|
|
2608
2614
|
for (const key in options) {
|
|
2609
2615
|
const prop = camelize(key);
|
|
2610
|
-
if (props[prop]
|
|
2616
|
+
if (!isUndefined(props[prop])) {
|
|
2611
2617
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2612
2618
|
}
|
|
2613
2619
|
}
|
|
@@ -2936,7 +2942,7 @@
|
|
|
2936
2942
|
UIkit.data = '__uikit__';
|
|
2937
2943
|
UIkit.prefix = 'uk-';
|
|
2938
2944
|
UIkit.options = {};
|
|
2939
|
-
UIkit.version = '3.14.4-dev.
|
|
2945
|
+
UIkit.version = '3.14.4-dev.3c3ec2cad';
|
|
2940
2946
|
|
|
2941
2947
|
globalAPI(UIkit);
|
|
2942
2948
|
hooksAPI(UIkit);
|
|
@@ -3041,27 +3047,7 @@
|
|
|
3041
3047
|
origin: false,
|
|
3042
3048
|
transition: 'ease',
|
|
3043
3049
|
clsEnter: 'uk-togglabe-enter',
|
|
3044
|
-
clsLeave: 'uk-togglabe-leave',
|
|
3045
|
-
|
|
3046
|
-
initProps: {
|
|
3047
|
-
overflow: '',
|
|
3048
|
-
maxHeight: '',
|
|
3049
|
-
paddingTop: '',
|
|
3050
|
-
paddingBottom: '',
|
|
3051
|
-
marginTop: '',
|
|
3052
|
-
marginBottom: '',
|
|
3053
|
-
boxShadow: '' },
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
hideProps: {
|
|
3057
|
-
overflow: 'hidden',
|
|
3058
|
-
maxHeight: 0,
|
|
3059
|
-
paddingTop: 0,
|
|
3060
|
-
paddingBottom: 0,
|
|
3061
|
-
marginTop: 0,
|
|
3062
|
-
marginBottom: 0,
|
|
3063
|
-
boxShadow: 'none' } },
|
|
3064
|
-
|
|
3050
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3065
3051
|
|
|
3066
3052
|
|
|
3067
3053
|
computed: {
|
|
@@ -3070,7 +3056,7 @@
|
|
|
3070
3056
|
},
|
|
3071
3057
|
|
|
3072
3058
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3073
|
-
return startsWith(animation[0],
|
|
3059
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3074
3060
|
} },
|
|
3075
3061
|
|
|
3076
3062
|
|
|
@@ -3163,122 +3149,107 @@
|
|
|
3163
3149
|
};
|
|
3164
3150
|
}
|
|
3165
3151
|
|
|
3166
|
-
function toggleTransition(cmp) {
|
|
3167
|
-
|
|
3168
|
-
case 'slide-left':
|
|
3169
|
-
return slideHorizontal(cmp);
|
|
3170
|
-
case 'slide-right':
|
|
3171
|
-
return slideHorizontal(cmp, true);}
|
|
3172
|
-
|
|
3173
|
-
return slide(cmp);
|
|
3174
|
-
}
|
|
3175
|
-
|
|
3176
|
-
function slide(_ref4)
|
|
3177
|
-
|
|
3152
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3153
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3178
3154
|
|
|
3155
|
+
const dirs = [
|
|
3156
|
+
['left', 'right'],
|
|
3157
|
+
['top', 'bottom']];
|
|
3179
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;
|
|
3180
3165
|
|
|
3166
|
+
return async (el, show) => {
|
|
3167
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3181
3168
|
|
|
3169
|
+
let currentDim = dimensions(el)[dimProp];
|
|
3182
3170
|
|
|
3183
|
-
|
|
3184
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3185
|
-
return (el, show) => {
|
|
3186
3171
|
const inProgress = Transition.inProgress(el);
|
|
3187
|
-
|
|
3188
|
-
!inProgress && el.hasChildNodes() ?
|
|
3189
|
-
toFloat(css(el.firstElementChild, 'marginTop')) +
|
|
3190
|
-
toFloat(css(el.lastElementChild, 'marginBottom')) :
|
|
3191
|
-
0;
|
|
3192
|
-
const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
|
|
3172
|
+
await Transition.cancel(el);
|
|
3193
3173
|
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
Transition.cancel(el);
|
|
3197
|
-
|
|
3198
|
-
if (!isToggled(el)) {
|
|
3174
|
+
if (show) {
|
|
3199
3175
|
_toggle(el, true);
|
|
3200
3176
|
}
|
|
3201
3177
|
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
el
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
css(scrollElement, 'overflowX', 'hidden');
|
|
3239
|
-
|
|
3240
|
-
if (!isToggled(el)) {
|
|
3241
|
-
_toggle(el, true);
|
|
3242
|
-
}
|
|
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]) });
|
|
3243
3214
|
|
|
3244
|
-
const width = toFloat(css(el, 'width'));
|
|
3245
|
-
duration = velocity * width + duration;
|
|
3246
3215
|
|
|
3247
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3248
3216
|
|
|
3249
3217
|
css(el, {
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3218
|
+
padding: 0,
|
|
3219
|
+
border: 0,
|
|
3220
|
+
minWidth: 0,
|
|
3221
|
+
minHeight: 0,
|
|
3222
|
+
[marginStartProp]: 0,
|
|
3223
|
+
width: dim.width,
|
|
3224
|
+
height: dim.height,
|
|
3225
|
+
overflow: 'hidden',
|
|
3226
|
+
[dimProp]: currentDim });
|
|
3255
3227
|
|
|
3256
|
-
return (
|
|
3257
|
-
show ?
|
|
3258
|
-
Transition.start(
|
|
3259
|
-
el,
|
|
3260
|
-
{
|
|
3261
|
-
clipPath: "polygon(0 0,100% 0,100% 100%,0 100%)",
|
|
3262
|
-
marginLeft: 0 },
|
|
3263
3228
|
|
|
3264
|
-
|
|
3265
|
-
|
|
3229
|
+
const percent = currentDim / endDim;
|
|
3230
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3231
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3266
3232
|
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3233
|
+
if (end) {
|
|
3234
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3235
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3236
|
+
}
|
|
3271
3237
|
|
|
3238
|
+
if (!end ^ mode === 'reveal') {
|
|
3239
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3240
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3241
|
+
}
|
|
3272
3242
|
|
|
3273
|
-
|
|
3243
|
+
try {
|
|
3244
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3245
|
+
} finally {
|
|
3246
|
+
css(el, prevProps);
|
|
3247
|
+
unwrap(wrapper.firstChild);
|
|
3274
3248
|
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
css(scrollElement, 'overflowX', '');
|
|
3280
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3281
|
-
});
|
|
3249
|
+
if (!show) {
|
|
3250
|
+
_toggle(el, false);
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3282
3253
|
};
|
|
3283
3254
|
}
|
|
3284
3255
|
|
|
@@ -3303,6 +3274,7 @@
|
|
|
3303
3274
|
mixins: [Class, Lazyload, Togglable],
|
|
3304
3275
|
|
|
3305
3276
|
props: {
|
|
3277
|
+
animation: Boolean,
|
|
3306
3278
|
targets: String,
|
|
3307
3279
|
active: null,
|
|
3308
3280
|
collapsible: Boolean,
|
|
@@ -3315,7 +3287,7 @@
|
|
|
3315
3287
|
data: {
|
|
3316
3288
|
targets: '> *',
|
|
3317
3289
|
active: false,
|
|
3318
|
-
animation:
|
|
3290
|
+
animation: true,
|
|
3319
3291
|
collapsible: true,
|
|
3320
3292
|
multiple: false,
|
|
3321
3293
|
clsOpen: 'uk-open',
|
|
@@ -3361,7 +3333,7 @@
|
|
|
3361
3333
|
hide(
|
|
3362
3334
|
el,
|
|
3363
3335
|
!hasClass(
|
|
3364
|
-
this.items.find((item) =>
|
|
3336
|
+
this.items.find((item) => within(el, item)),
|
|
3365
3337
|
this.clsOpen));
|
|
3366
3338
|
|
|
3367
3339
|
|
|
@@ -3413,23 +3385,15 @@
|
|
|
3413
3385
|
toggleClass(el, this.clsOpen, show);
|
|
3414
3386
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3415
3387
|
|
|
3416
|
-
const content = $(
|
|
3388
|
+
const content = $(this.content, el);
|
|
3417
3389
|
|
|
3418
|
-
if (animate === false || !this.
|
|
3390
|
+
if (animate === false || !this.animation) {
|
|
3391
|
+
content.hidden = !show;
|
|
3419
3392
|
hide(content, !show);
|
|
3420
3393
|
return;
|
|
3421
3394
|
}
|
|
3422
3395
|
|
|
3423
|
-
|
|
3424
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3425
|
-
}
|
|
3426
|
-
|
|
3427
|
-
hide(content, false);
|
|
3428
|
-
await slide(this)(el._wrapper, show);
|
|
3429
|
-
hide(content, !show);
|
|
3430
|
-
|
|
3431
|
-
delete el._wrapper;
|
|
3432
|
-
unwrap(content);
|
|
3396
|
+
await toggleTransition(this)(content, show);
|
|
3433
3397
|
|
|
3434
3398
|
if (show) {
|
|
3435
3399
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3455,18 +3419,17 @@
|
|
|
3455
3419
|
args: 'animation',
|
|
3456
3420
|
|
|
3457
3421
|
props: {
|
|
3422
|
+
animation: Boolean,
|
|
3458
3423
|
close: String },
|
|
3459
3424
|
|
|
3460
3425
|
|
|
3461
3426
|
data: {
|
|
3462
|
-
animation:
|
|
3427
|
+
animation: true,
|
|
3463
3428
|
selClose: '.uk-alert-close',
|
|
3464
|
-
duration: 150,
|
|
3465
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3429
|
+
duration: 150 },
|
|
3466
3430
|
|
|
3467
3431
|
|
|
3468
|
-
events:
|
|
3469
|
-
{
|
|
3432
|
+
events: {
|
|
3470
3433
|
name: 'click',
|
|
3471
3434
|
|
|
3472
3435
|
delegate() {
|
|
@@ -3476,16 +3439,39 @@
|
|
|
3476
3439
|
handler(e) {
|
|
3477
3440
|
e.preventDefault();
|
|
3478
3441
|
this.close();
|
|
3479
|
-
} }
|
|
3480
|
-
|
|
3442
|
+
} },
|
|
3481
3443
|
|
|
3482
3444
|
|
|
3483
3445
|
methods: {
|
|
3484
3446
|
async close() {
|
|
3485
|
-
await this.toggleElement(this.$el);
|
|
3447
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3486
3448
|
this.$destroy(true);
|
|
3487
3449
|
} } };
|
|
3488
3450
|
|
|
3451
|
+
|
|
3452
|
+
|
|
3453
|
+
function animate$1(_ref) {let { duration, transition, velocity } = _ref;
|
|
3454
|
+
return (el) => {
|
|
3455
|
+
const height = toFloat(css(el, 'height'));
|
|
3456
|
+
css(el, 'height', height);
|
|
3457
|
+
return Transition.start(
|
|
3458
|
+
el,
|
|
3459
|
+
{
|
|
3460
|
+
height: 0,
|
|
3461
|
+
marginTop: 0,
|
|
3462
|
+
marginBottom: 0,
|
|
3463
|
+
paddingTop: 0,
|
|
3464
|
+
paddingBottom: 0,
|
|
3465
|
+
borderTop: 0,
|
|
3466
|
+
borderBottom: 0,
|
|
3467
|
+
opacity: 0 },
|
|
3468
|
+
|
|
3469
|
+
velocity * height + duration,
|
|
3470
|
+
transition);
|
|
3471
|
+
|
|
3472
|
+
};
|
|
3473
|
+
}
|
|
3474
|
+
|
|
3489
3475
|
var Video = {
|
|
3490
3476
|
args: 'autoplay',
|
|
3491
3477
|
|
|
@@ -3634,13 +3620,17 @@
|
|
|
3634
3620
|
props: {
|
|
3635
3621
|
pos: String,
|
|
3636
3622
|
offset: null,
|
|
3637
|
-
flip: Boolean
|
|
3623
|
+
flip: Boolean,
|
|
3624
|
+
shift: Boolean,
|
|
3625
|
+
inset: Boolean },
|
|
3638
3626
|
|
|
3639
3627
|
|
|
3640
3628
|
data: {
|
|
3641
3629
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3630
|
+
offset: false,
|
|
3642
3631
|
flip: true,
|
|
3643
|
-
|
|
3632
|
+
shift: true,
|
|
3633
|
+
inset: false },
|
|
3644
3634
|
|
|
3645
3635
|
|
|
3646
3636
|
connected() {
|
|
@@ -3652,17 +3642,19 @@
|
|
|
3652
3642
|
methods: {
|
|
3653
3643
|
positionAt(element, target, boundary) {
|
|
3654
3644
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3645
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3655
3646
|
|
|
3656
3647
|
const attach = {
|
|
3657
|
-
element: [flipPosition(this.dir), this.align],
|
|
3648
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3658
3649
|
target: [this.dir, this.align] };
|
|
3659
3650
|
|
|
3660
3651
|
|
|
3661
3652
|
if (this.axis === 'y') {
|
|
3662
3653
|
for (const prop in attach) {
|
|
3663
|
-
attach[prop]
|
|
3654
|
+
attach[prop].reverse();
|
|
3664
3655
|
}
|
|
3665
|
-
offset
|
|
3656
|
+
offset.reverse();
|
|
3657
|
+
placement.reverse();
|
|
3666
3658
|
}
|
|
3667
3659
|
|
|
3668
3660
|
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
@@ -3672,21 +3664,13 @@
|
|
|
3672
3664
|
const elDim = dimensions(element);
|
|
3673
3665
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3674
3666
|
|
|
3675
|
-
|
|
3676
|
-
element,
|
|
3677
|
-
target,
|
|
3678
|
-
{
|
|
3667
|
+
positionAt(element, target, {
|
|
3679
3668
|
attach,
|
|
3680
3669
|
offset,
|
|
3681
3670
|
boundary,
|
|
3682
|
-
|
|
3683
|
-
viewportOffset: this.getViewportOffset(element) }
|
|
3684
|
-
|
|
3685
|
-
|
|
3671
|
+
placement,
|
|
3672
|
+
viewportOffset: this.getViewportOffset(element) });
|
|
3686
3673
|
|
|
3687
|
-
trigger(element, 'beforeposition', args);
|
|
3688
|
-
|
|
3689
|
-
positionAt(...args);
|
|
3690
3674
|
|
|
3691
3675
|
// Restore scroll position
|
|
3692
3676
|
scrollElement.scrollTop = scrollTop;
|
|
@@ -3699,12 +3683,14 @@
|
|
|
3699
3683
|
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3700
3684
|
this.axis === 'x' ? 'width' : 'height',
|
|
3701
3685
|
element) * (
|
|
3702
|
-
|
|
3686
|
+
|
|
3687
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3688
|
+
this.inset ? -1 : 1));
|
|
3703
3689
|
|
|
3704
3690
|
},
|
|
3705
3691
|
|
|
3706
3692
|
getShiftOffset(element) {
|
|
3707
|
-
return
|
|
3693
|
+
return this.align === 'center' ?
|
|
3708
3694
|
0 :
|
|
3709
3695
|
toPx(
|
|
3710
3696
|
css(element, '--uk-position-shift-offset'),
|
|
@@ -3717,6 +3703,15 @@
|
|
|
3717
3703
|
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3718
3704
|
} } };
|
|
3719
3705
|
|
|
3706
|
+
var Style = {
|
|
3707
|
+
beforeConnect() {
|
|
3708
|
+
this._style = attr(this.$el, 'style');
|
|
3709
|
+
},
|
|
3710
|
+
|
|
3711
|
+
disconnected() {
|
|
3712
|
+
attr(this.$el, 'style', this._style);
|
|
3713
|
+
} };
|
|
3714
|
+
|
|
3720
3715
|
const active$1 = [];
|
|
3721
3716
|
|
|
3722
3717
|
var Modal = {
|
|
@@ -3826,8 +3821,8 @@
|
|
|
3826
3821
|
|
|
3827
3822
|
|
|
3828
3823
|
if (this.overlay) {
|
|
3829
|
-
once(this.$el, '
|
|
3830
|
-
once(this.$el, '
|
|
3824
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3825
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3831
3826
|
}
|
|
3832
3827
|
|
|
3833
3828
|
if (this.stack) {
|
|
@@ -3909,10 +3904,6 @@
|
|
|
3909
3904
|
active$1.splice(active$1.indexOf(this), 1);
|
|
3910
3905
|
}
|
|
3911
3906
|
|
|
3912
|
-
if (!active$1.length) {
|
|
3913
|
-
css(document.body, 'overflowY', '');
|
|
3914
|
-
}
|
|
3915
|
-
|
|
3916
3907
|
css(this.$el, 'zIndex', '');
|
|
3917
3908
|
|
|
3918
3909
|
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
@@ -4029,16 +4020,22 @@
|
|
|
4029
4020
|
return () => events.forEach((fn) => fn());
|
|
4030
4021
|
}
|
|
4031
4022
|
|
|
4023
|
+
let prevented;
|
|
4032
4024
|
function preventBackgroundScroll() {
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4025
|
+
if (prevented) {
|
|
4026
|
+
return noop;
|
|
4027
|
+
}
|
|
4028
|
+
prevented = true;
|
|
4029
|
+
|
|
4030
|
+
const { scrollingElement } = document;
|
|
4031
|
+
css(scrollingElement, {
|
|
4032
|
+
overflowY: 'hidden',
|
|
4033
|
+
touchAction: 'none',
|
|
4034
|
+
paddingRight: width(window) - scrollingElement.clientWidth });
|
|
4037
4035
|
|
|
4038
|
-
css(documentElement, 'overflowY', 'hidden');
|
|
4039
4036
|
return () => {
|
|
4040
|
-
|
|
4041
|
-
css(
|
|
4037
|
+
prevented = false;
|
|
4038
|
+
css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
|
|
4042
4039
|
};
|
|
4043
4040
|
}
|
|
4044
4041
|
|
|
@@ -4055,7 +4052,7 @@
|
|
|
4055
4052
|
let active;
|
|
4056
4053
|
|
|
4057
4054
|
var drop = {
|
|
4058
|
-
mixins: [Container, Lazyload, Position, Togglable],
|
|
4055
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4059
4056
|
|
|
4060
4057
|
args: 'pos',
|
|
4061
4058
|
|
|
@@ -4063,10 +4060,13 @@
|
|
|
4063
4060
|
mode: 'list',
|
|
4064
4061
|
toggle: Boolean,
|
|
4065
4062
|
boundary: Boolean,
|
|
4066
|
-
|
|
4063
|
+
target: Boolean,
|
|
4064
|
+
targetX: Boolean,
|
|
4065
|
+
targetY: Boolean,
|
|
4066
|
+
stretch: Boolean,
|
|
4067
4067
|
delayShow: Number,
|
|
4068
4068
|
delayHide: Number,
|
|
4069
|
-
|
|
4069
|
+
autoUpdate: Boolean,
|
|
4070
4070
|
clsDrop: String,
|
|
4071
4071
|
animateOut: Boolean,
|
|
4072
4072
|
bgScroll: Boolean },
|
|
@@ -4075,17 +4075,32 @@
|
|
|
4075
4075
|
data: {
|
|
4076
4076
|
mode: ['click', 'hover'],
|
|
4077
4077
|
toggle: '- *',
|
|
4078
|
-
boundary:
|
|
4079
|
-
|
|
4078
|
+
boundary: false,
|
|
4079
|
+
target: false,
|
|
4080
|
+
targetX: false,
|
|
4081
|
+
targetY: false,
|
|
4082
|
+
stretch: false,
|
|
4080
4083
|
delayShow: 0,
|
|
4081
4084
|
delayHide: 800,
|
|
4082
|
-
|
|
4085
|
+
autoUpdate: true,
|
|
4083
4086
|
clsDrop: false,
|
|
4087
|
+
animateOut: false,
|
|
4088
|
+
bgScroll: true,
|
|
4084
4089
|
animation: ['uk-animation-fade'],
|
|
4085
4090
|
cls: 'uk-open',
|
|
4086
|
-
container: false,
|
|
4087
|
-
|
|
4088
|
-
|
|
4091
|
+
container: false },
|
|
4092
|
+
|
|
4093
|
+
|
|
4094
|
+
computed: {
|
|
4095
|
+
target(_ref, $el) {let { target, targetX, targetY } = _ref;
|
|
4096
|
+
targetX = targetX || target || this.targetEl;
|
|
4097
|
+
targetY = targetY || target || this.targetEl;
|
|
4098
|
+
|
|
4099
|
+
return [
|
|
4100
|
+
targetX === true ? window : query(targetX, $el),
|
|
4101
|
+
targetY === true ? window : query(targetY, $el)];
|
|
4102
|
+
|
|
4103
|
+
} },
|
|
4089
4104
|
|
|
4090
4105
|
|
|
4091
4106
|
created() {
|
|
@@ -4099,18 +4114,19 @@
|
|
|
4099
4114
|
connected() {
|
|
4100
4115
|
addClass(this.$el, this.clsDrop);
|
|
4101
4116
|
|
|
4102
|
-
if (this.toggle && !this.
|
|
4103
|
-
this.
|
|
4117
|
+
if (this.toggle && !this.targetEl) {
|
|
4118
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4104
4119
|
target: this.$el,
|
|
4105
4120
|
mode: this.mode }).
|
|
4106
4121
|
$el;
|
|
4107
|
-
attr(this.
|
|
4108
|
-
this.lazyload(this.
|
|
4122
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4123
|
+
this.lazyload(this.targetEl);
|
|
4109
4124
|
}
|
|
4110
4125
|
},
|
|
4111
4126
|
|
|
4112
4127
|
disconnected() {
|
|
4113
4128
|
if (this.isActive()) {
|
|
4129
|
+
this.hide(false);
|
|
4114
4130
|
active = null;
|
|
4115
4131
|
}
|
|
4116
4132
|
},
|
|
@@ -4136,7 +4152,7 @@
|
|
|
4136
4152
|
return 'a[href^="#"]';
|
|
4137
4153
|
},
|
|
4138
4154
|
|
|
4139
|
-
handler(
|
|
4155
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4140
4156
|
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4141
4157
|
this.hide(false);
|
|
4142
4158
|
}
|
|
@@ -4244,21 +4260,22 @@
|
|
|
4244
4260
|
|
|
4245
4261
|
this.tracker.init();
|
|
4246
4262
|
|
|
4247
|
-
|
|
4263
|
+
const update = () => this.$emit();
|
|
4264
|
+
const handlers = [
|
|
4248
4265
|
on(
|
|
4249
4266
|
document,
|
|
4250
4267
|
pointerDown,
|
|
4251
|
-
(
|
|
4268
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4252
4269
|
!within(target, this.$el) &&
|
|
4253
4270
|
once(
|
|
4254
4271
|
document,
|
|
4255
4272
|
pointerUp + " " + pointerCancel + " scroll",
|
|
4256
|
-
(
|
|
4273
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4257
4274
|
if (
|
|
4258
4275
|
!defaultPrevented &&
|
|
4259
4276
|
type === pointerUp &&
|
|
4260
4277
|
target === newTarget &&
|
|
4261
|
-
!(this.
|
|
4278
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4262
4279
|
{
|
|
4263
4280
|
this.hide(false);
|
|
4264
4281
|
}
|
|
@@ -4273,29 +4290,28 @@
|
|
|
4273
4290
|
}
|
|
4274
4291
|
}),
|
|
4275
4292
|
|
|
4293
|
+
on(window, 'resize', update),
|
|
4294
|
+
|
|
4295
|
+
(() => {
|
|
4296
|
+
const observer = observeResize(
|
|
4297
|
+
scrollParents(this.$el).concat(this.targetEl),
|
|
4298
|
+
update);
|
|
4299
|
+
|
|
4300
|
+
return () => observer.disconnect();
|
|
4301
|
+
})(),
|
|
4302
|
+
|
|
4303
|
+
...(this.autoUpdate ?
|
|
4304
|
+
[on([document, scrollParents(this.$el)], 'scroll', update)] :
|
|
4305
|
+
[]),
|
|
4306
|
+
|
|
4276
4307
|
...(this.bgScroll ?
|
|
4277
4308
|
[] :
|
|
4278
|
-
[preventOverscroll(this.$el), preventBackgroundScroll()])
|
|
4309
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()])];
|
|
4310
|
+
|
|
4311
|
+
|
|
4312
|
+
once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
|
|
4313
|
+
self: true });
|
|
4279
4314
|
|
|
4280
|
-
...(this.display === 'static' && this.align !== 'stretch' ?
|
|
4281
|
-
[] :
|
|
4282
|
-
(() => {
|
|
4283
|
-
const handler = () => this.$emit();
|
|
4284
|
-
return [
|
|
4285
|
-
on(window, 'resize', handler),
|
|
4286
|
-
on(document, 'scroll', handler, true),
|
|
4287
|
-
(() => {
|
|
4288
|
-
const observer = observeResize(
|
|
4289
|
-
scrollParents(this.$el),
|
|
4290
|
-
handler);
|
|
4291
|
-
|
|
4292
|
-
return () => observer.disconnect();
|
|
4293
|
-
})()];
|
|
4294
|
-
|
|
4295
|
-
})())])
|
|
4296
|
-
{
|
|
4297
|
-
once(this.$el, 'hide', handler, { self: true });
|
|
4298
|
-
}
|
|
4299
4315
|
} },
|
|
4300
4316
|
|
|
4301
4317
|
|
|
@@ -4312,7 +4328,7 @@
|
|
|
4312
4328
|
{
|
|
4313
4329
|
name: 'hide',
|
|
4314
4330
|
|
|
4315
|
-
handler(
|
|
4331
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4316
4332
|
if (this.$el !== target) {
|
|
4317
4333
|
active =
|
|
4318
4334
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4336,12 +4352,12 @@
|
|
|
4336
4352
|
|
|
4337
4353
|
|
|
4338
4354
|
methods: {
|
|
4339
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4340
|
-
if (this.isToggled() && target && this.
|
|
4355
|
+
show(target, delay) {if (target === void 0) {target = this.targetEl;}if (delay === void 0) {delay = true;}
|
|
4356
|
+
if (this.isToggled() && target && this.targetEl && target !== this.targetEl) {
|
|
4341
4357
|
this.hide(false, false);
|
|
4342
4358
|
}
|
|
4343
4359
|
|
|
4344
|
-
this.
|
|
4360
|
+
this.targetEl = target;
|
|
4345
4361
|
|
|
4346
4362
|
this.clearTimers();
|
|
4347
4363
|
|
|
@@ -4404,60 +4420,69 @@
|
|
|
4404
4420
|
|
|
4405
4421
|
position() {
|
|
4406
4422
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4407
|
-
|
|
4408
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4423
|
+
attr(this.$el, 'style', this._style);
|
|
4409
4424
|
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
const [scrollParent] = scrollParents(
|
|
4413
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4425
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4426
|
+
this.$el.hidden = true;
|
|
4414
4427
|
|
|
4415
|
-
const
|
|
4416
|
-
const boundaryOffset =
|
|
4428
|
+
const boundary = query(this.boundary, this.$el);
|
|
4429
|
+
const boundaryOffset = offset(boundary || window);
|
|
4430
|
+
const viewports = this.target.map((target) => offsetViewport(scrollParents(target)[0]));
|
|
4417
4431
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4418
4432
|
|
|
4419
|
-
|
|
4420
|
-
|
|
4433
|
+
const dirs = [
|
|
4434
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4435
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4421
4436
|
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4439
|
-
|
|
4440
|
-
css(this.$el, {
|
|
4441
|
-
width:
|
|
4442
|
-
this.axis === 'y' ?
|
|
4443
|
-
viewport.width :
|
|
4444
|
-
(this.dir === 'left' ?
|
|
4445
|
-
targetDim.left - viewport.left :
|
|
4446
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4447
|
-
height:
|
|
4448
|
-
this.axis === 'x' ?
|
|
4449
|
-
viewport.height :
|
|
4450
|
-
(this.dir === 'top' ?
|
|
4451
|
-
targetDim.top - viewport.top :
|
|
4452
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4453
|
-
|
|
4454
|
-
} else if (this.$el.offsetWidth > maxWidth) {
|
|
4437
|
+
|
|
4438
|
+
for (const [i, [axis, prop]] of dirs) {
|
|
4439
|
+
if (this.axis !== axis && includes([axis, true], this.stretch)) {
|
|
4440
|
+
css(this.$el, {
|
|
4441
|
+
[prop]: Math.min(
|
|
4442
|
+
boundaryOffset[prop],
|
|
4443
|
+
viewports[i][prop] - 2 * viewportOffset),
|
|
4444
|
+
|
|
4445
|
+
["overflow-" + axis]: 'auto' });
|
|
4446
|
+
|
|
4447
|
+
}
|
|
4448
|
+
}
|
|
4449
|
+
|
|
4450
|
+
const maxWidth = viewports[0].width - 2 * viewportOffset;
|
|
4451
|
+
|
|
4452
|
+
if (this.$el.offsetWidth > maxWidth) {
|
|
4455
4453
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4456
4454
|
}
|
|
4457
4455
|
|
|
4458
4456
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4459
4457
|
|
|
4460
|
-
this
|
|
4458
|
+
this.$el.hidden = false;
|
|
4459
|
+
|
|
4460
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4461
|
+
|
|
4462
|
+
for (const [i, [axis, prop, start, end]] of dirs) {
|
|
4463
|
+
if (this.axis === axis && includes([axis, true], this.stretch)) {
|
|
4464
|
+
const positionOffset = Math.abs(this.getPositionOffset(this.$el));
|
|
4465
|
+
const targetOffset = offset(this.target[i]);
|
|
4466
|
+
const elOffset = offset(this.$el);
|
|
4467
|
+
|
|
4468
|
+
css(this.$el, {
|
|
4469
|
+
[prop]:
|
|
4470
|
+
(targetOffset[start] > elOffset[start] ?
|
|
4471
|
+
targetOffset[start] -
|
|
4472
|
+
Math.max(
|
|
4473
|
+
boundaryOffset[start],
|
|
4474
|
+
viewports[i][start] + viewportOffset) :
|
|
4475
|
+
|
|
4476
|
+
Math.min(
|
|
4477
|
+
boundaryOffset[end],
|
|
4478
|
+
viewports[i][end] - viewportOffset) -
|
|
4479
|
+
targetOffset[end]) - positionOffset,
|
|
4480
|
+
["overflow-" + axis]: 'auto' });
|
|
4481
|
+
|
|
4482
|
+
|
|
4483
|
+
this.positionAt(this.$el, this.target, boundary);
|
|
4484
|
+
}
|
|
4485
|
+
}
|
|
4461
4486
|
} } };
|
|
4462
4487
|
|
|
4463
4488
|
|
|
@@ -4954,8 +4979,11 @@
|
|
|
4954
4979
|
let minHeight = '';
|
|
4955
4980
|
const box = boxModelAdjust(this.$el, 'height', 'content-box');
|
|
4956
4981
|
|
|
4982
|
+
const { body, scrollingElement } = document;
|
|
4957
4983
|
const [scrollElement] = scrollParents(this.$el, /auto|scroll/);
|
|
4958
|
-
const { height: viewportHeight } = offsetViewport(
|
|
4984
|
+
const { height: viewportHeight } = offsetViewport(
|
|
4985
|
+
scrollElement === body ? scrollingElement : scrollElement);
|
|
4986
|
+
|
|
4959
4987
|
|
|
4960
4988
|
if (this.expand) {
|
|
4961
4989
|
minHeight = Math.max(
|
|
@@ -4965,7 +4993,6 @@
|
|
|
4965
4993
|
0);
|
|
4966
4994
|
|
|
4967
4995
|
} else {
|
|
4968
|
-
const { body, scrollingElement } = document;
|
|
4969
4996
|
const isScrollingElement =
|
|
4970
4997
|
scrollingElement === scrollElement || body === scrollElement;
|
|
4971
4998
|
|
|
@@ -5227,7 +5254,7 @@
|
|
|
5227
5254
|
|
|
5228
5255
|
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>";
|
|
5229
5256
|
|
|
5230
|
-
var navbarToggleIcon = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><rect y=\"
|
|
5257
|
+
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>";
|
|
5231
5258
|
|
|
5232
5259
|
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>";
|
|
5233
5260
|
|
|
@@ -5829,7 +5856,9 @@
|
|
|
5829
5856
|
align: String,
|
|
5830
5857
|
offset: Number,
|
|
5831
5858
|
boundary: Boolean,
|
|
5832
|
-
|
|
5859
|
+
target: Boolean,
|
|
5860
|
+
targetX: Boolean,
|
|
5861
|
+
targetY: Boolean,
|
|
5833
5862
|
clsDrop: String,
|
|
5834
5863
|
delayShow: Number,
|
|
5835
5864
|
delayHide: Number,
|
|
@@ -5846,9 +5875,12 @@
|
|
|
5846
5875
|
offset: undefined,
|
|
5847
5876
|
delayShow: undefined,
|
|
5848
5877
|
delayHide: undefined,
|
|
5849
|
-
|
|
5850
|
-
|
|
5878
|
+
flip: false,
|
|
5879
|
+
shift: true,
|
|
5851
5880
|
boundary: true,
|
|
5881
|
+
target: false,
|
|
5882
|
+
targetX: false,
|
|
5883
|
+
targetY: false,
|
|
5852
5884
|
dropbar: false,
|
|
5853
5885
|
dropbarAnchor: false,
|
|
5854
5886
|
duration: 200,
|
|
@@ -5883,7 +5915,7 @@
|
|
|
5883
5915
|
},
|
|
5884
5916
|
|
|
5885
5917
|
watch(dropbar) {
|
|
5886
|
-
addClass(dropbar, 'uk-navbar-dropbar');
|
|
5918
|
+
addClass(dropbar, 'uk-dropbar', 'uk-dropbar-top', 'uk-navbar-dropbar');
|
|
5887
5919
|
},
|
|
5888
5920
|
|
|
5889
5921
|
immediate: true },
|
|
@@ -5899,7 +5931,7 @@
|
|
|
5899
5931
|
|
|
5900
5932
|
if (this.dropContainer !== $el) {
|
|
5901
5933
|
for (const el of $$("." + clsDrop, this.dropContainer)) {var _this$getDropdown;
|
|
5902
|
-
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.
|
|
5934
|
+
const target = (_this$getDropdown = this.getDropdown(el)) == null ? void 0 : _this$getDropdown.targetEl;
|
|
5903
5935
|
if (!includes(dropdowns, el) && target && within(target, this.$el)) {
|
|
5904
5936
|
dropdowns.push(el);
|
|
5905
5937
|
}
|
|
@@ -5961,8 +5993,8 @@
|
|
|
5961
5993
|
if (
|
|
5962
5994
|
active &&
|
|
5963
5995
|
includes(active.mode, 'hover') &&
|
|
5964
|
-
active.
|
|
5965
|
-
!within(active.
|
|
5996
|
+
active.targetEl &&
|
|
5997
|
+
!within(active.targetEl, current) &&
|
|
5966
5998
|
!active.isDelaying)
|
|
5967
5999
|
{
|
|
5968
6000
|
active.hide(false);
|
|
@@ -5984,7 +6016,7 @@
|
|
|
5984
6016
|
if (keyCode === keyMap.DOWN && hasAttr(current, 'aria-expanded')) {
|
|
5985
6017
|
e.preventDefault();
|
|
5986
6018
|
|
|
5987
|
-
if (!active || active.
|
|
6019
|
+
if (!active || active.targetEl !== current) {
|
|
5988
6020
|
current.click();
|
|
5989
6021
|
once(this.dropContainer, 'show', (_ref8) => {let { target } = _ref8;return (
|
|
5990
6022
|
focusFirstFocusableElement(target));});
|
|
@@ -6034,8 +6066,8 @@
|
|
|
6034
6066
|
}
|
|
6035
6067
|
}
|
|
6036
6068
|
|
|
6037
|
-
if (keyCode === keyMap.ESC) {var _active$
|
|
6038
|
-
active == null ? void 0 : (_active$
|
|
6069
|
+
if (keyCode === keyMap.ESC) {var _active$targetEl;
|
|
6070
|
+
active == null ? void 0 : (_active$targetEl = active.targetEl) == null ? void 0 : _active$targetEl.focus();
|
|
6039
6071
|
}
|
|
6040
6072
|
|
|
6041
6073
|
handleNavItemNavigation(e, this.toggles, active);
|
|
@@ -6106,39 +6138,19 @@
|
|
|
6106
6138
|
return;
|
|
6107
6139
|
}
|
|
6108
6140
|
|
|
6109
|
-
this._observer = observeResize(target, () =>
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
{
|
|
6121
|
-
name: 'beforeposition',
|
|
6122
|
-
|
|
6123
|
-
el() {
|
|
6124
|
-
return this.dropContainer;
|
|
6125
|
-
},
|
|
6126
|
-
|
|
6127
|
-
filter() {
|
|
6128
|
-
return this.dropbar;
|
|
6129
|
-
},
|
|
6130
|
-
|
|
6131
|
-
handler(e, element, target, options) {
|
|
6132
|
-
if (!this.isDropbarDrop(element)) {
|
|
6133
|
-
return;
|
|
6134
|
-
}
|
|
6135
|
-
|
|
6136
|
-
const dropbarOffset = offset(this.dropbar);
|
|
6137
|
-
|
|
6138
|
-
css(element, 'maxWidth', dropbarOffset.width - options.viewportOffset * 2);
|
|
6141
|
+
this._observer = observeResize(target, () => {
|
|
6142
|
+
const targetOffsets = parents(target, "." + this.clsDrop).
|
|
6143
|
+
concat(target).
|
|
6144
|
+
map((el) => offset(el));
|
|
6145
|
+
const minTop = Math.min(...targetOffsets.map((_ref11) => {let { top } = _ref11;return top;}));
|
|
6146
|
+
const maxBottom = Math.max(...targetOffsets.map((_ref12) => {let { bottom } = _ref12;return bottom;}));
|
|
6147
|
+
const dropbarOffset = offset(this.dropbar);
|
|
6148
|
+
css(this.dropbar, 'top', this.dropbar.offsetTop - (dropbarOffset.top - minTop));
|
|
6149
|
+
this.transitionTo(
|
|
6150
|
+
maxBottom - minTop + toFloat(css(target, 'marginBottom')),
|
|
6151
|
+
target);
|
|
6139
6152
|
|
|
6140
|
-
|
|
6141
|
-
options.viewportOffset += dropbarOffset.left;
|
|
6153
|
+
});
|
|
6142
6154
|
} },
|
|
6143
6155
|
|
|
6144
6156
|
|
|
@@ -6159,7 +6171,7 @@
|
|
|
6159
6171
|
if (
|
|
6160
6172
|
matches(this.dropbar, ':hover') &&
|
|
6161
6173
|
(active == null ? void 0 : active.$el) === e.target &&
|
|
6162
|
-
!this.toggles.some((el) => active.
|
|
6174
|
+
!this.toggles.some((el) => active.targetEl !== el && matches(el, ':focus')))
|
|
6163
6175
|
{
|
|
6164
6176
|
e.preventDefault();
|
|
6165
6177
|
}
|
|
@@ -6177,7 +6189,7 @@
|
|
|
6177
6189
|
return this.dropbar;
|
|
6178
6190
|
},
|
|
6179
6191
|
|
|
6180
|
-
handler(
|
|
6192
|
+
handler(_ref13) {let { target } = _ref13;
|
|
6181
6193
|
if (!this.isDropbarDrop(target)) {
|
|
6182
6194
|
return;
|
|
6183
6195
|
}
|
|
@@ -6195,7 +6207,7 @@
|
|
|
6195
6207
|
|
|
6196
6208
|
methods: {
|
|
6197
6209
|
getActive() {
|
|
6198
|
-
return active
|
|
6210
|
+
return includes(this.dropdowns, active == null ? void 0 : active.$el) && active;
|
|
6199
6211
|
},
|
|
6200
6212
|
|
|
6201
6213
|
transitionTo(newHeight, el) {
|
|
@@ -6228,15 +6240,14 @@
|
|
|
6228
6240
|
},
|
|
6229
6241
|
|
|
6230
6242
|
isDropbarDrop(el) {
|
|
6231
|
-
|
|
6232
|
-
return drop && hasClass(el, this.clsDrop) && drop.align !== 'stretch';
|
|
6243
|
+
return this.getDropdown(el) && hasClass(el, this.clsDrop);
|
|
6233
6244
|
} } };
|
|
6234
6245
|
|
|
6235
6246
|
|
|
6236
6247
|
|
|
6237
6248
|
function handleNavItemNavigation(e, toggles, active) {
|
|
6238
6249
|
const { current, keyCode } = e;
|
|
6239
|
-
const target = (active == null ? void 0 : active.
|
|
6250
|
+
const target = (active == null ? void 0 : active.targetEl) || current;
|
|
6240
6251
|
const i = toggles.indexOf(target);
|
|
6241
6252
|
|
|
6242
6253
|
// Left
|
|
@@ -6436,9 +6447,12 @@
|
|
|
6436
6447
|
addClass(parent(this.panel), this.clsMode);
|
|
6437
6448
|
}
|
|
6438
6449
|
|
|
6439
|
-
|
|
6440
|
-
|
|
6450
|
+
const { body, scrollingElement } = document;
|
|
6451
|
+
|
|
6452
|
+
addClass(body, this.clsContainer, this.clsFlip);
|
|
6453
|
+
css(body, 'touch-action', 'pan-y pinch-zoom');
|
|
6441
6454
|
css(this.$el, 'display', 'block');
|
|
6455
|
+
css(this.panel, 'maxWidth', scrollingElement.clientWidth);
|
|
6442
6456
|
addClass(this.$el, this.clsOverlay);
|
|
6443
6457
|
addClass(
|
|
6444
6458
|
this.panel,
|
|
@@ -6446,8 +6460,8 @@
|
|
|
6446
6460
|
this.mode === 'reveal' ? '' : this.clsMode);
|
|
6447
6461
|
|
|
6448
6462
|
|
|
6449
|
-
height(
|
|
6450
|
-
addClass(
|
|
6463
|
+
height(body); // force reflow
|
|
6464
|
+
addClass(body, this.clsContainerAnimation);
|
|
6451
6465
|
|
|
6452
6466
|
this.clsContainerAnimation && suppressUserScale();
|
|
6453
6467
|
} },
|
|
@@ -6479,6 +6493,7 @@
|
|
|
6479
6493
|
removeClass(this.panel, this.clsSidebarAnimation, this.clsMode);
|
|
6480
6494
|
removeClass(this.$el, this.clsOverlay);
|
|
6481
6495
|
css(this.$el, 'display', '');
|
|
6496
|
+
css(this.panel, 'maxWidth', '');
|
|
6482
6497
|
removeClass(document.body, this.clsContainer, this.clsFlip);
|
|
6483
6498
|
} },
|
|
6484
6499
|
|
|
@@ -6604,6 +6619,14 @@
|
|
|
6604
6619
|
offset: 0 },
|
|
6605
6620
|
|
|
6606
6621
|
|
|
6622
|
+
connected() {
|
|
6623
|
+
registerClick(this);
|
|
6624
|
+
},
|
|
6625
|
+
|
|
6626
|
+
disconnected() {
|
|
6627
|
+
unregisterClick(this);
|
|
6628
|
+
},
|
|
6629
|
+
|
|
6607
6630
|
methods: {
|
|
6608
6631
|
async scrollTo(el) {
|
|
6609
6632
|
el = el && $(el) || document.body;
|
|
@@ -6612,20 +6635,39 @@
|
|
|
6612
6635
|
await scrollIntoView(el, { offset: this.offset });
|
|
6613
6636
|
trigger(this.$el, 'scrolled', [this, el]);
|
|
6614
6637
|
}
|
|
6615
|
-
} }
|
|
6638
|
+
} } };
|
|
6616
6639
|
|
|
6617
6640
|
|
|
6618
|
-
events: {
|
|
6619
|
-
click(e) {
|
|
6620
|
-
if (e.defaultPrevented) {
|
|
6621
|
-
return;
|
|
6622
|
-
}
|
|
6623
6641
|
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6642
|
+
const components$1 = new Set();
|
|
6643
|
+
function registerClick(cmp) {
|
|
6644
|
+
if (!components$1.size) {
|
|
6645
|
+
on(document, 'click', clickHandler);
|
|
6646
|
+
}
|
|
6627
6647
|
|
|
6648
|
+
components$1.add(cmp);
|
|
6649
|
+
}
|
|
6628
6650
|
|
|
6651
|
+
function unregisterClick(cmp) {
|
|
6652
|
+
components$1.delete(cmp);
|
|
6653
|
+
|
|
6654
|
+
if (!components$1.length) {
|
|
6655
|
+
off(document, 'click', clickHandler);
|
|
6656
|
+
}
|
|
6657
|
+
}
|
|
6658
|
+
|
|
6659
|
+
function clickHandler(e) {
|
|
6660
|
+
if (e.defaultPrevented) {
|
|
6661
|
+
return;
|
|
6662
|
+
}
|
|
6663
|
+
|
|
6664
|
+
for (const component of components$1) {
|
|
6665
|
+
if (within(e.target, component.$el)) {
|
|
6666
|
+
e.preventDefault();
|
|
6667
|
+
component.scrollTo(getTargetElement(component.$el));
|
|
6668
|
+
}
|
|
6669
|
+
}
|
|
6670
|
+
}
|
|
6629
6671
|
|
|
6630
6672
|
function getTargetElement(el) {
|
|
6631
6673
|
return document.getElementById(decodeURIComponent(el.hash).substring(1));
|
|
@@ -7588,7 +7630,7 @@
|
|
|
7588
7630
|
|
|
7589
7631
|
|
|
7590
7632
|
{
|
|
7591
|
-
name: '
|
|
7633
|
+
name: 'hide show',
|
|
7592
7634
|
|
|
7593
7635
|
self: true,
|
|
7594
7636
|
|
|
@@ -7596,10 +7638,8 @@
|
|
|
7596
7638
|
return this.target;
|
|
7597
7639
|
},
|
|
7598
7640
|
|
|
7599
|
-
handler(
|
|
7600
|
-
|
|
7601
|
-
this.updateAria(toggled);
|
|
7602
|
-
}
|
|
7641
|
+
handler(_ref2) {let { type } = _ref2;
|
|
7642
|
+
this.updateAria(type === 'show');
|
|
7603
7643
|
} },
|
|
7604
7644
|
|
|
7605
7645
|
|