uikit 3.14.4-dev.fea9fd466 → 3.15.1-dev.f849bb0c8
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 +32 -18
- 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 +518 -478
- 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 +521 -479
- 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/navbar.js +33 -49
- 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 +1 -1
- 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.
|
|
1
|
+
/*! UIkit 3.15.1-dev.f849bb0c8 | 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) {
|
|
@@ -1911,7 +1911,7 @@
|
|
|
1911
1911
|
// iOS 12 returns <body> as scrollingElement
|
|
1912
1912
|
viewportElement = documentElement;
|
|
1913
1913
|
} else {
|
|
1914
|
-
rect[start] += toFloat(css(viewportElement, "border" +
|
|
1914
|
+
rect[start] += toFloat(css(viewportElement, "border-" + start + "-width"));
|
|
1915
1915
|
}
|
|
1916
1916
|
rect[prop] = rect[dir] = viewportElement["client" + ucfirst(prop)];
|
|
1917
1917
|
rect[end] = rect[prop] + rect[start];
|
|
@@ -1936,127 +1936,47 @@
|
|
|
1936
1936
|
...options.attach },
|
|
1937
1937
|
|
|
1938
1938
|
offset: [0, 0],
|
|
1939
|
+
placement: [],
|
|
1939
1940
|
...options };
|
|
1940
1941
|
|
|
1941
1942
|
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
attachTo(element, target, options);
|
|
1945
|
-
|
|
1946
|
-
offset(element, dim);
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
function attachTo(element, target, options) {
|
|
1950
|
-
let { attach, offset: offsetBy } = {
|
|
1951
|
-
attach: {
|
|
1952
|
-
element: ['left', 'top'],
|
|
1953
|
-
target: ['left', 'top'],
|
|
1954
|
-
...options.attach },
|
|
1955
|
-
|
|
1956
|
-
offset: [0, 0],
|
|
1957
|
-
...options };
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
const position = offset(element);
|
|
1961
|
-
const targetOffset = offset(target);
|
|
1962
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1963
|
-
position[start] = position[dir] =
|
|
1964
|
-
targetOffset[start] +
|
|
1965
|
-
moveBy(attach.target[i], end, targetOffset[prop]) -
|
|
1966
|
-
moveBy(attach.element[i], end, position[prop]) +
|
|
1967
|
-
+offsetBy[i];
|
|
1968
|
-
position[end] = position[start] + position[prop];
|
|
1943
|
+
if (!isArray(target)) {
|
|
1944
|
+
target = [target, target];
|
|
1969
1945
|
}
|
|
1970
|
-
return position;
|
|
1971
|
-
}
|
|
1972
1946
|
|
|
1973
|
-
|
|
1974
|
-
return start === 'center' ? dim / 2 : start === end ? dim : 0;
|
|
1947
|
+
offset(element, getPosition(element, target, options));
|
|
1975
1948
|
}
|
|
1976
1949
|
|
|
1977
|
-
function
|
|
1950
|
+
function getPosition(element, target, options) {
|
|
1978
1951
|
const position = attachTo(element, target, options);
|
|
1979
|
-
const
|
|
1980
|
-
|
|
1981
|
-
let {
|
|
1982
|
-
flip,
|
|
1983
|
-
attach: { element: elAttach, target: targetAttach },
|
|
1984
|
-
offset: elOffset,
|
|
1985
|
-
boundary,
|
|
1986
|
-
viewport,
|
|
1987
|
-
viewportOffset } =
|
|
1988
|
-
options;
|
|
1989
|
-
|
|
1990
|
-
let viewports = scrollParents(element);
|
|
1991
|
-
if (boundary === target) {
|
|
1992
|
-
viewports = viewports.filter((viewport) => viewport !== boundary);
|
|
1993
|
-
}
|
|
1994
|
-
const [scrollElement] = viewports;
|
|
1995
|
-
viewports.push(viewport);
|
|
1996
|
-
|
|
1997
|
-
const offsetPosition = { ...position };
|
|
1998
|
-
for (const [i, [prop, dir, start, end]] of Object.entries(dirs)) {
|
|
1999
|
-
if (flip !== true && !includes(flip, dir)) {
|
|
2000
|
-
continue;
|
|
2001
|
-
}
|
|
1952
|
+
const { boundary, viewportOffset = 0, placement } = options;
|
|
2002
1953
|
|
|
2003
|
-
|
|
2004
|
-
|
|
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);
|
|
2005
1957
|
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
if (viewportOffset) {
|
|
2009
|
-
viewport[start] += viewportOffset;
|
|
2010
|
-
viewport[end] -= viewportOffset;
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
if (boundary && !willFlip && position[prop] <= offset(boundary)[prop]) {
|
|
2014
|
-
viewport = getIntersectionArea(viewport, offset(boundary));
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
|
-
const isInStartBoundary = position[start] >= viewport[start];
|
|
2018
|
-
const isInEndBoundary = position[end] <= viewport[end];
|
|
2019
|
-
|
|
2020
|
-
if (isInStartBoundary && isInEndBoundary) {
|
|
1958
|
+
if (isWithin(position, viewport, i)) {
|
|
2021
1959
|
continue;
|
|
2022
1960
|
}
|
|
2023
1961
|
|
|
2024
|
-
let offsetBy;
|
|
1962
|
+
let offsetBy = 0;
|
|
2025
1963
|
|
|
2026
1964
|
// Flip
|
|
2027
|
-
if (
|
|
1965
|
+
if (placement[i] === 'flip') {
|
|
1966
|
+
const attach = options.attach.target[i];
|
|
2028
1967
|
if (
|
|
2029
|
-
|
|
2030
|
-
|
|
1968
|
+
attach === end && position[end] <= viewport[end] ||
|
|
1969
|
+
attach === start && position[start] >= viewport[start])
|
|
2031
1970
|
{
|
|
2032
1971
|
continue;
|
|
2033
1972
|
}
|
|
2034
1973
|
|
|
2035
|
-
offsetBy =
|
|
2036
|
-
(elAttach[i] === start ?
|
|
2037
|
-
-position[prop] :
|
|
2038
|
-
elAttach[i] === end ?
|
|
2039
|
-
position[prop] :
|
|
2040
|
-
0) + (
|
|
2041
|
-
targetAttach[i] === start ?
|
|
2042
|
-
targetDim[prop] :
|
|
2043
|
-
targetAttach[i] === end ?
|
|
2044
|
-
-targetDim[prop] :
|
|
2045
|
-
0) -
|
|
2046
|
-
elOffset[i] * 2;
|
|
2047
|
-
|
|
2048
|
-
if (
|
|
2049
|
-
!isInScrollArea(
|
|
2050
|
-
{
|
|
2051
|
-
...position,
|
|
2052
|
-
[start]: position[start] + offsetBy,
|
|
2053
|
-
[end]: position[end] + offsetBy },
|
|
1974
|
+
offsetBy = flip(element, target, options, i)[start] - position[start];
|
|
2054
1975
|
|
|
2055
|
-
|
|
2056
|
-
i))
|
|
1976
|
+
const scrollArea = getScrollArea(target[i], viewportOffset, i);
|
|
2057
1977
|
|
|
2058
|
-
{
|
|
2059
|
-
if (
|
|
1978
|
+
if (!isWithin(applyOffset(position, offsetBy, i), scrollArea, i)) {
|
|
1979
|
+
if (isWithin(position, scrollArea, i)) {
|
|
2060
1980
|
continue;
|
|
2061
1981
|
}
|
|
2062
1982
|
|
|
@@ -2064,27 +1984,19 @@
|
|
|
2064
1984
|
return false;
|
|
2065
1985
|
}
|
|
2066
1986
|
|
|
2067
|
-
|
|
2068
|
-
const newPos = attachToWithFlip(element, target, {
|
|
2069
|
-
...options,
|
|
2070
|
-
attach: {
|
|
2071
|
-
element: elAttach.map(flipDir).reverse(),
|
|
2072
|
-
target: targetAttach.map(flipDir).reverse() },
|
|
2073
|
-
|
|
2074
|
-
offset: elOffset.reverse(),
|
|
2075
|
-
flip: flip === true ? flip : [...flip, dirs[1 - i][1]],
|
|
2076
|
-
recursion: true });
|
|
1987
|
+
const newPos = flipAxis(element, target, options);
|
|
2077
1988
|
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
return newPos;
|
|
2081
|
-
}
|
|
1989
|
+
if (newPos && isWithin(newPos, scrollArea, 1 - i)) {
|
|
1990
|
+
return newPos;
|
|
2082
1991
|
}
|
|
1992
|
+
|
|
2083
1993
|
continue;
|
|
2084
1994
|
}
|
|
2085
1995
|
|
|
2086
|
-
//
|
|
2087
|
-
} else {
|
|
1996
|
+
// Shift
|
|
1997
|
+
} else if (placement[i] === 'shift') {
|
|
1998
|
+
const targetDim = offset(target[i]);
|
|
1999
|
+
const { offset: elOffset } = options;
|
|
2088
2000
|
offsetBy =
|
|
2089
2001
|
clamp(
|
|
2090
2002
|
clamp(position[start], viewport[start], viewport[end] - position[prop]),
|
|
@@ -2093,13 +2005,78 @@
|
|
|
2093
2005
|
position[start];
|
|
2094
2006
|
}
|
|
2095
2007
|
|
|
2096
|
-
offsetPosition
|
|
2097
|
-
offsetPosition[end] += offsetBy;
|
|
2008
|
+
offsetPosition = applyOffset(offsetPosition, offsetBy, i);
|
|
2098
2009
|
}
|
|
2099
2010
|
|
|
2100
2011
|
return offsetPosition;
|
|
2101
2012
|
}
|
|
2102
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
|
+
|
|
2103
2080
|
function getIntersectionArea() {
|
|
2104
2081
|
let area = {};for (var _len = arguments.length, rects = new Array(_len), _key = 0; _key < _len; _key++) {rects[_key] = arguments[_key];}
|
|
2105
2082
|
for (const rect of rects) {
|
|
@@ -2111,21 +2088,44 @@
|
|
|
2111
2088
|
return area;
|
|
2112
2089
|
}
|
|
2113
2090
|
|
|
2114
|
-
function
|
|
2115
|
-
const
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
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 });
|
|
2119
2116
|
|
|
2120
|
-
return position[start] >= viewport[start] && position[end] <= viewport[end];
|
|
2121
2117
|
}
|
|
2122
2118
|
|
|
2123
|
-
function
|
|
2124
|
-
const
|
|
2125
|
-
|
|
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;
|
|
2126
2126
|
}
|
|
2127
2127
|
|
|
2128
|
-
function
|
|
2128
|
+
function flipAttachAxis(prop) {
|
|
2129
2129
|
for (let i = 0; i < dirs.length; i++) {
|
|
2130
2130
|
const index = dirs[i].indexOf(prop);
|
|
2131
2131
|
if (~index) {
|
|
@@ -2134,13 +2134,17 @@
|
|
|
2134
2134
|
}
|
|
2135
2135
|
}
|
|
2136
2136
|
|
|
2137
|
+
function flipOffset(offset, i) {
|
|
2138
|
+
offset = [...offset];
|
|
2139
|
+
offset[i] *= -1;
|
|
2140
|
+
return offset;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2137
2143
|
var util = /*#__PURE__*/Object.freeze({
|
|
2138
2144
|
__proto__: null,
|
|
2139
2145
|
ajax: ajax,
|
|
2140
2146
|
getImage: getImage,
|
|
2141
|
-
transition: transition,
|
|
2142
2147
|
Transition: Transition,
|
|
2143
|
-
animate: animate$1,
|
|
2144
2148
|
Animation: Animation,
|
|
2145
2149
|
attr: attr,
|
|
2146
2150
|
hasAttr: hasAttr,
|
|
@@ -2445,7 +2449,11 @@
|
|
|
2445
2449
|
}
|
|
2446
2450
|
|
|
2447
2451
|
if (write && result !== false) {
|
|
2448
|
-
fastdom.write(() =>
|
|
2452
|
+
fastdom.write(() => {
|
|
2453
|
+
if (this._connected) {
|
|
2454
|
+
write.call(this, this._data, types);
|
|
2455
|
+
}
|
|
2456
|
+
});
|
|
2449
2457
|
}
|
|
2450
2458
|
}
|
|
2451
2459
|
}
|
|
@@ -2594,7 +2602,7 @@
|
|
|
2594
2602
|
|
|
2595
2603
|
value = props[key] === Boolean && value === '' ? true : coerce$1(props[key], value);
|
|
2596
2604
|
|
|
2597
|
-
if (prop === 'target' &&
|
|
2605
|
+
if (prop === 'target' && startsWith(value, '_')) {
|
|
2598
2606
|
continue;
|
|
2599
2607
|
}
|
|
2600
2608
|
|
|
@@ -2605,7 +2613,7 @@
|
|
|
2605
2613
|
|
|
2606
2614
|
for (const key in options) {
|
|
2607
2615
|
const prop = camelize(key);
|
|
2608
|
-
if (props[prop]
|
|
2616
|
+
if (!isUndefined(props[prop])) {
|
|
2609
2617
|
data$1[prop] = coerce$1(props[prop], options[key]);
|
|
2610
2618
|
}
|
|
2611
2619
|
}
|
|
@@ -2934,7 +2942,7 @@
|
|
|
2934
2942
|
UIkit.data = '__uikit__';
|
|
2935
2943
|
UIkit.prefix = 'uk-';
|
|
2936
2944
|
UIkit.options = {};
|
|
2937
|
-
UIkit.version = '3.
|
|
2945
|
+
UIkit.version = '3.15.1-dev.f849bb0c8';
|
|
2938
2946
|
|
|
2939
2947
|
globalAPI(UIkit);
|
|
2940
2948
|
hooksAPI(UIkit);
|
|
@@ -3039,27 +3047,7 @@
|
|
|
3039
3047
|
origin: false,
|
|
3040
3048
|
transition: 'ease',
|
|
3041
3049
|
clsEnter: 'uk-togglabe-enter',
|
|
3042
|
-
clsLeave: 'uk-togglabe-leave',
|
|
3043
|
-
|
|
3044
|
-
initProps: {
|
|
3045
|
-
overflow: '',
|
|
3046
|
-
maxHeight: '',
|
|
3047
|
-
paddingTop: '',
|
|
3048
|
-
paddingBottom: '',
|
|
3049
|
-
marginTop: '',
|
|
3050
|
-
marginBottom: '',
|
|
3051
|
-
boxShadow: '' },
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
hideProps: {
|
|
3055
|
-
overflow: 'hidden',
|
|
3056
|
-
maxHeight: 0,
|
|
3057
|
-
paddingTop: 0,
|
|
3058
|
-
paddingBottom: 0,
|
|
3059
|
-
marginTop: 0,
|
|
3060
|
-
marginBottom: 0,
|
|
3061
|
-
boxShadow: 'none' } },
|
|
3062
|
-
|
|
3050
|
+
clsLeave: 'uk-togglabe-leave' },
|
|
3063
3051
|
|
|
3064
3052
|
|
|
3065
3053
|
computed: {
|
|
@@ -3068,7 +3056,7 @@
|
|
|
3068
3056
|
},
|
|
3069
3057
|
|
|
3070
3058
|
hasTransition(_ref2) {let { animation } = _ref2;
|
|
3071
|
-
return startsWith(animation[0],
|
|
3059
|
+
return ['slide', 'reveal'].some((transition) => startsWith(animation[0], transition));
|
|
3072
3060
|
} },
|
|
3073
3061
|
|
|
3074
3062
|
|
|
@@ -3161,122 +3149,107 @@
|
|
|
3161
3149
|
};
|
|
3162
3150
|
}
|
|
3163
3151
|
|
|
3164
|
-
function toggleTransition(cmp) {
|
|
3165
|
-
|
|
3166
|
-
case 'slide-left':
|
|
3167
|
-
return slideHorizontal(cmp);
|
|
3168
|
-
case 'slide-right':
|
|
3169
|
-
return slideHorizontal(cmp, true);}
|
|
3170
|
-
|
|
3171
|
-
return slide(cmp);
|
|
3172
|
-
}
|
|
3173
|
-
|
|
3174
|
-
function slide(_ref4)
|
|
3175
|
-
|
|
3152
|
+
function toggleTransition(cmp) {var _cmp$animation$;
|
|
3153
|
+
const [mode = 'reveal', startProp = 'top'] = ((_cmp$animation$ = cmp.animation[0]) == null ? void 0 : _cmp$animation$.split('-')) || [];
|
|
3176
3154
|
|
|
3155
|
+
const dirs = [
|
|
3156
|
+
['left', 'right'],
|
|
3157
|
+
['top', 'bottom']];
|
|
3177
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;
|
|
3178
3165
|
|
|
3166
|
+
return async (el, show) => {
|
|
3167
|
+
let { duration, velocity, transition, _toggle } = cmp;
|
|
3179
3168
|
|
|
3169
|
+
let currentDim = dimensions(el)[dimProp];
|
|
3180
3170
|
|
|
3181
|
-
|
|
3182
|
-
{let { isToggled, duration, velocity, initProps, hideProps, transition, _toggle } = _ref4;
|
|
3183
|
-
return (el, show) => {
|
|
3184
3171
|
const inProgress = Transition.inProgress(el);
|
|
3185
|
-
|
|
3186
|
-
!inProgress && el.hasChildNodes() ?
|
|
3187
|
-
toFloat(css(el.firstElementChild, 'marginTop')) +
|
|
3188
|
-
toFloat(css(el.lastElementChild, 'marginBottom')) :
|
|
3189
|
-
0;
|
|
3190
|
-
const currentHeight = isVisible(el) ? toFloat(css(el, 'height')) + inner : 0;
|
|
3172
|
+
await Transition.cancel(el);
|
|
3191
3173
|
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
Transition.cancel(el);
|
|
3195
|
-
|
|
3196
|
-
if (!isToggled(el)) {
|
|
3174
|
+
if (show) {
|
|
3197
3175
|
_toggle(el, true);
|
|
3198
3176
|
}
|
|
3199
3177
|
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
el
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
css(scrollElement, 'overflowX', 'hidden');
|
|
3237
|
-
|
|
3238
|
-
if (!isToggled(el)) {
|
|
3239
|
-
_toggle(el, true);
|
|
3240
|
-
}
|
|
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]) });
|
|
3241
3214
|
|
|
3242
|
-
const width = toFloat(css(el, 'width'));
|
|
3243
|
-
duration = velocity * width + duration;
|
|
3244
3215
|
|
|
3245
|
-
const percent = visible ? (width + marginLeft * (right ? -1 : 1)) / width * 100 : 0;
|
|
3246
3216
|
|
|
3247
3217
|
css(el, {
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
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 });
|
|
3253
3227
|
|
|
3254
|
-
return (
|
|
3255
|
-
show ?
|
|
3256
|
-
Transition.start(
|
|
3257
|
-
el,
|
|
3258
|
-
{
|
|
3259
|
-
clipPath: "polygon(0 0,100% 0,100% 100%,0 100%)",
|
|
3260
|
-
marginLeft: 0 },
|
|
3261
3228
|
|
|
3262
|
-
|
|
3263
|
-
|
|
3229
|
+
const percent = currentDim / endDim;
|
|
3230
|
+
duration = (velocity * endDim + duration) * (show ? 1 - percent : percent);
|
|
3231
|
+
const endProps = { [dimProp]: show ? endDim : 0 };
|
|
3264
3232
|
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3233
|
+
if (end) {
|
|
3234
|
+
css(el, marginProp, endDim - currentDim + currentMargin);
|
|
3235
|
+
endProps[marginProp] = show ? currentMargin : endDim + currentMargin;
|
|
3236
|
+
}
|
|
3269
3237
|
|
|
3238
|
+
if (!end ^ mode === 'reveal') {
|
|
3239
|
+
css(wrapper, marginProp, -endDim + currentDim);
|
|
3240
|
+
Transition.start(wrapper, { [marginProp]: show ? 0 : -endDim }, duration, transition);
|
|
3241
|
+
}
|
|
3270
3242
|
|
|
3271
|
-
|
|
3243
|
+
try {
|
|
3244
|
+
await Transition.start(el, endProps, duration, transition);
|
|
3245
|
+
} finally {
|
|
3246
|
+
css(el, prevProps);
|
|
3247
|
+
unwrap(wrapper.firstChild);
|
|
3272
3248
|
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
css(scrollElement, 'overflowX', '');
|
|
3278
|
-
css(el, { clipPath: '', marginLeft: '' });
|
|
3279
|
-
});
|
|
3249
|
+
if (!show) {
|
|
3250
|
+
_toggle(el, false);
|
|
3251
|
+
}
|
|
3252
|
+
}
|
|
3280
3253
|
};
|
|
3281
3254
|
}
|
|
3282
3255
|
|
|
@@ -3301,6 +3274,7 @@
|
|
|
3301
3274
|
mixins: [Class, Lazyload, Togglable],
|
|
3302
3275
|
|
|
3303
3276
|
props: {
|
|
3277
|
+
animation: Boolean,
|
|
3304
3278
|
targets: String,
|
|
3305
3279
|
active: null,
|
|
3306
3280
|
collapsible: Boolean,
|
|
@@ -3313,7 +3287,7 @@
|
|
|
3313
3287
|
data: {
|
|
3314
3288
|
targets: '> *',
|
|
3315
3289
|
active: false,
|
|
3316
|
-
animation:
|
|
3290
|
+
animation: true,
|
|
3317
3291
|
collapsible: true,
|
|
3318
3292
|
multiple: false,
|
|
3319
3293
|
clsOpen: 'uk-open',
|
|
@@ -3359,7 +3333,7 @@
|
|
|
3359
3333
|
hide(
|
|
3360
3334
|
el,
|
|
3361
3335
|
!hasClass(
|
|
3362
|
-
this.items.find((item) =>
|
|
3336
|
+
this.items.find((item) => within(el, item)),
|
|
3363
3337
|
this.clsOpen));
|
|
3364
3338
|
|
|
3365
3339
|
|
|
@@ -3411,23 +3385,15 @@
|
|
|
3411
3385
|
toggleClass(el, this.clsOpen, show);
|
|
3412
3386
|
attr($(this.$props.toggle, el), 'aria-expanded', show);
|
|
3413
3387
|
|
|
3414
|
-
const content = $(
|
|
3388
|
+
const content = $(this.content, el);
|
|
3415
3389
|
|
|
3416
|
-
if (animate === false || !this.
|
|
3390
|
+
if (animate === false || !this.animation) {
|
|
3391
|
+
content.hidden = !show;
|
|
3417
3392
|
hide(content, !show);
|
|
3418
3393
|
return;
|
|
3419
3394
|
}
|
|
3420
3395
|
|
|
3421
|
-
|
|
3422
|
-
el._wrapper = wrapAll(content, "<div" + (show ? ' hidden' : '') + ">");
|
|
3423
|
-
}
|
|
3424
|
-
|
|
3425
|
-
hide(content, false);
|
|
3426
|
-
await slide(this)(el._wrapper, show);
|
|
3427
|
-
hide(content, !show);
|
|
3428
|
-
|
|
3429
|
-
delete el._wrapper;
|
|
3430
|
-
unwrap(content);
|
|
3396
|
+
await toggleTransition(this)(content, show);
|
|
3431
3397
|
|
|
3432
3398
|
if (show) {
|
|
3433
3399
|
const toggle = $(this.$props.toggle, el);
|
|
@@ -3453,18 +3419,17 @@
|
|
|
3453
3419
|
args: 'animation',
|
|
3454
3420
|
|
|
3455
3421
|
props: {
|
|
3422
|
+
animation: Boolean,
|
|
3456
3423
|
close: String },
|
|
3457
3424
|
|
|
3458
3425
|
|
|
3459
3426
|
data: {
|
|
3460
|
-
animation:
|
|
3427
|
+
animation: true,
|
|
3461
3428
|
selClose: '.uk-alert-close',
|
|
3462
|
-
duration: 150,
|
|
3463
|
-
hideProps: { opacity: 0, ...Togglable.data.hideProps } },
|
|
3429
|
+
duration: 150 },
|
|
3464
3430
|
|
|
3465
3431
|
|
|
3466
|
-
events:
|
|
3467
|
-
{
|
|
3432
|
+
events: {
|
|
3468
3433
|
name: 'click',
|
|
3469
3434
|
|
|
3470
3435
|
delegate() {
|
|
@@ -3474,16 +3439,39 @@
|
|
|
3474
3439
|
handler(e) {
|
|
3475
3440
|
e.preventDefault();
|
|
3476
3441
|
this.close();
|
|
3477
|
-
} }
|
|
3478
|
-
|
|
3442
|
+
} },
|
|
3479
3443
|
|
|
3480
3444
|
|
|
3481
3445
|
methods: {
|
|
3482
3446
|
async close() {
|
|
3483
|
-
await this.toggleElement(this.$el);
|
|
3447
|
+
await this.toggleElement(this.$el, false, animate$1(this));
|
|
3484
3448
|
this.$destroy(true);
|
|
3485
3449
|
} } };
|
|
3486
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
|
+
|
|
3487
3475
|
var Video = {
|
|
3488
3476
|
args: 'autoplay',
|
|
3489
3477
|
|
|
@@ -3632,13 +3620,17 @@
|
|
|
3632
3620
|
props: {
|
|
3633
3621
|
pos: String,
|
|
3634
3622
|
offset: null,
|
|
3635
|
-
flip: Boolean
|
|
3623
|
+
flip: Boolean,
|
|
3624
|
+
shift: Boolean,
|
|
3625
|
+
inset: Boolean },
|
|
3636
3626
|
|
|
3637
3627
|
|
|
3638
3628
|
data: {
|
|
3639
3629
|
pos: "bottom-" + (isRtl ? 'right' : 'left'),
|
|
3630
|
+
offset: false,
|
|
3640
3631
|
flip: true,
|
|
3641
|
-
|
|
3632
|
+
shift: true,
|
|
3633
|
+
inset: false },
|
|
3642
3634
|
|
|
3643
3635
|
|
|
3644
3636
|
connected() {
|
|
@@ -3650,17 +3642,19 @@
|
|
|
3650
3642
|
methods: {
|
|
3651
3643
|
positionAt(element, target, boundary) {
|
|
3652
3644
|
let offset = [this.getPositionOffset(element), this.getShiftOffset(element)];
|
|
3645
|
+
const placement = [this.flip && 'flip', this.shift && 'shift'];
|
|
3653
3646
|
|
|
3654
3647
|
const attach = {
|
|
3655
|
-
element: [flipPosition(this.dir), this.align],
|
|
3648
|
+
element: [this.inset ? this.dir : flipPosition(this.dir), this.align],
|
|
3656
3649
|
target: [this.dir, this.align] };
|
|
3657
3650
|
|
|
3658
3651
|
|
|
3659
3652
|
if (this.axis === 'y') {
|
|
3660
3653
|
for (const prop in attach) {
|
|
3661
|
-
attach[prop]
|
|
3654
|
+
attach[prop].reverse();
|
|
3662
3655
|
}
|
|
3663
|
-
offset
|
|
3656
|
+
offset.reverse();
|
|
3657
|
+
placement.reverse();
|
|
3664
3658
|
}
|
|
3665
3659
|
|
|
3666
3660
|
const [scrollElement] = scrollParents(element, /auto|scroll/);
|
|
@@ -3670,21 +3664,13 @@
|
|
|
3670
3664
|
const elDim = dimensions(element);
|
|
3671
3665
|
css(element, { top: -elDim.height, left: -elDim.width });
|
|
3672
3666
|
|
|
3673
|
-
|
|
3674
|
-
element,
|
|
3675
|
-
target,
|
|
3676
|
-
{
|
|
3667
|
+
positionAt(element, target, {
|
|
3677
3668
|
attach,
|
|
3678
3669
|
offset,
|
|
3679
3670
|
boundary,
|
|
3680
|
-
|
|
3681
|
-
viewportOffset: this.getViewportOffset(element) }
|
|
3682
|
-
|
|
3683
|
-
|
|
3671
|
+
placement,
|
|
3672
|
+
viewportOffset: this.getViewportOffset(element) });
|
|
3684
3673
|
|
|
3685
|
-
trigger(element, 'beforeposition', args);
|
|
3686
|
-
|
|
3687
|
-
positionAt(...args);
|
|
3688
3674
|
|
|
3689
3675
|
// Restore scroll position
|
|
3690
3676
|
scrollElement.scrollTop = scrollTop;
|
|
@@ -3697,12 +3683,14 @@
|
|
|
3697
3683
|
this.offset === false ? css(element, '--uk-position-offset') : this.offset,
|
|
3698
3684
|
this.axis === 'x' ? 'width' : 'height',
|
|
3699
3685
|
element) * (
|
|
3700
|
-
|
|
3686
|
+
|
|
3687
|
+
includes(['left', 'top'], this.dir) ? -1 : 1) * (
|
|
3688
|
+
this.inset ? -1 : 1));
|
|
3701
3689
|
|
|
3702
3690
|
},
|
|
3703
3691
|
|
|
3704
3692
|
getShiftOffset(element) {
|
|
3705
|
-
return
|
|
3693
|
+
return this.align === 'center' ?
|
|
3706
3694
|
0 :
|
|
3707
3695
|
toPx(
|
|
3708
3696
|
css(element, '--uk-position-shift-offset'),
|
|
@@ -3715,6 +3703,15 @@
|
|
|
3715
3703
|
return toPx(css(element, '--uk-position-viewport-offset'));
|
|
3716
3704
|
} } };
|
|
3717
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
|
+
|
|
3718
3715
|
const active$1 = [];
|
|
3719
3716
|
|
|
3720
3717
|
var Modal = {
|
|
@@ -3824,8 +3821,8 @@
|
|
|
3824
3821
|
|
|
3825
3822
|
|
|
3826
3823
|
if (this.overlay) {
|
|
3827
|
-
once(this.$el, '
|
|
3828
|
-
once(this.$el, '
|
|
3824
|
+
once(this.$el, 'hidden', preventOverscroll(this.$el), { self: true });
|
|
3825
|
+
once(this.$el, 'hidden', preventBackgroundScroll(), { self: true });
|
|
3829
3826
|
}
|
|
3830
3827
|
|
|
3831
3828
|
if (this.stack) {
|
|
@@ -3907,10 +3904,6 @@
|
|
|
3907
3904
|
active$1.splice(active$1.indexOf(this), 1);
|
|
3908
3905
|
}
|
|
3909
3906
|
|
|
3910
|
-
if (!active$1.length) {
|
|
3911
|
-
css(document.body, 'overflowY', '');
|
|
3912
|
-
}
|
|
3913
|
-
|
|
3914
3907
|
css(this.$el, 'zIndex', '');
|
|
3915
3908
|
|
|
3916
3909
|
if (!active$1.some((modal) => modal.clsPage === this.clsPage)) {
|
|
@@ -4027,16 +4020,22 @@
|
|
|
4027
4020
|
return () => events.forEach((fn) => fn());
|
|
4028
4021
|
}
|
|
4029
4022
|
|
|
4023
|
+
let prevented;
|
|
4030
4024
|
function preventBackgroundScroll() {
|
|
4031
|
-
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
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 });
|
|
4035
4035
|
|
|
4036
|
-
css(documentElement, 'overflowY', 'hidden');
|
|
4037
4036
|
return () => {
|
|
4038
|
-
|
|
4039
|
-
css(
|
|
4037
|
+
prevented = false;
|
|
4038
|
+
css(scrollingElement, { overflowY: '', touchAction: '', paddingRight: '' });
|
|
4040
4039
|
};
|
|
4041
4040
|
}
|
|
4042
4041
|
|
|
@@ -4053,7 +4052,7 @@
|
|
|
4053
4052
|
let active;
|
|
4054
4053
|
|
|
4055
4054
|
var drop = {
|
|
4056
|
-
mixins: [Container, Lazyload, Position, Togglable],
|
|
4055
|
+
mixins: [Container, Lazyload, Position, Style, Togglable],
|
|
4057
4056
|
|
|
4058
4057
|
args: 'pos',
|
|
4059
4058
|
|
|
@@ -4061,10 +4060,13 @@
|
|
|
4061
4060
|
mode: 'list',
|
|
4062
4061
|
toggle: Boolean,
|
|
4063
4062
|
boundary: Boolean,
|
|
4064
|
-
|
|
4063
|
+
target: Boolean,
|
|
4064
|
+
targetX: Boolean,
|
|
4065
|
+
targetY: Boolean,
|
|
4066
|
+
stretch: Boolean,
|
|
4065
4067
|
delayShow: Number,
|
|
4066
4068
|
delayHide: Number,
|
|
4067
|
-
|
|
4069
|
+
autoUpdate: Boolean,
|
|
4068
4070
|
clsDrop: String,
|
|
4069
4071
|
animateOut: Boolean,
|
|
4070
4072
|
bgScroll: Boolean },
|
|
@@ -4073,17 +4075,32 @@
|
|
|
4073
4075
|
data: {
|
|
4074
4076
|
mode: ['click', 'hover'],
|
|
4075
4077
|
toggle: '- *',
|
|
4076
|
-
boundary:
|
|
4077
|
-
|
|
4078
|
+
boundary: false,
|
|
4079
|
+
target: false,
|
|
4080
|
+
targetX: false,
|
|
4081
|
+
targetY: false,
|
|
4082
|
+
stretch: false,
|
|
4078
4083
|
delayShow: 0,
|
|
4079
4084
|
delayHide: 800,
|
|
4080
|
-
|
|
4085
|
+
autoUpdate: true,
|
|
4081
4086
|
clsDrop: false,
|
|
4087
|
+
animateOut: false,
|
|
4088
|
+
bgScroll: true,
|
|
4082
4089
|
animation: ['uk-animation-fade'],
|
|
4083
4090
|
cls: 'uk-open',
|
|
4084
|
-
container: false,
|
|
4085
|
-
|
|
4086
|
-
|
|
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
|
+
} },
|
|
4087
4104
|
|
|
4088
4105
|
|
|
4089
4106
|
created() {
|
|
@@ -4097,18 +4114,19 @@
|
|
|
4097
4114
|
connected() {
|
|
4098
4115
|
addClass(this.$el, this.clsDrop);
|
|
4099
4116
|
|
|
4100
|
-
if (this.toggle && !this.
|
|
4101
|
-
this.
|
|
4117
|
+
if (this.toggle && !this.targetEl) {
|
|
4118
|
+
this.targetEl = this.$create('toggle', query(this.toggle, this.$el), {
|
|
4102
4119
|
target: this.$el,
|
|
4103
4120
|
mode: this.mode }).
|
|
4104
4121
|
$el;
|
|
4105
|
-
attr(this.
|
|
4106
|
-
this.lazyload(this.
|
|
4122
|
+
attr(this.targetEl, 'aria-haspopup', true);
|
|
4123
|
+
this.lazyload(this.targetEl);
|
|
4107
4124
|
}
|
|
4108
4125
|
},
|
|
4109
4126
|
|
|
4110
4127
|
disconnected() {
|
|
4111
4128
|
if (this.isActive()) {
|
|
4129
|
+
this.hide(false);
|
|
4112
4130
|
active = null;
|
|
4113
4131
|
}
|
|
4114
4132
|
},
|
|
@@ -4134,7 +4152,7 @@
|
|
|
4134
4152
|
return 'a[href^="#"]';
|
|
4135
4153
|
},
|
|
4136
4154
|
|
|
4137
|
-
handler(
|
|
4155
|
+
handler(_ref2) {let { defaultPrevented, current: { hash } } = _ref2;
|
|
4138
4156
|
if (!defaultPrevented && hash && !within(hash, this.$el)) {
|
|
4139
4157
|
this.hide(false);
|
|
4140
4158
|
}
|
|
@@ -4242,21 +4260,22 @@
|
|
|
4242
4260
|
|
|
4243
4261
|
this.tracker.init();
|
|
4244
4262
|
|
|
4245
|
-
|
|
4263
|
+
const update = () => this.$emit();
|
|
4264
|
+
const handlers = [
|
|
4246
4265
|
on(
|
|
4247
4266
|
document,
|
|
4248
4267
|
pointerDown,
|
|
4249
|
-
(
|
|
4268
|
+
(_ref3) => {let { target } = _ref3;return (
|
|
4250
4269
|
!within(target, this.$el) &&
|
|
4251
4270
|
once(
|
|
4252
4271
|
document,
|
|
4253
4272
|
pointerUp + " " + pointerCancel + " scroll",
|
|
4254
|
-
(
|
|
4273
|
+
(_ref4) => {let { defaultPrevented, type, target: newTarget } = _ref4;
|
|
4255
4274
|
if (
|
|
4256
4275
|
!defaultPrevented &&
|
|
4257
4276
|
type === pointerUp &&
|
|
4258
4277
|
target === newTarget &&
|
|
4259
|
-
!(this.
|
|
4278
|
+
!(this.targetEl && within(target, this.targetEl)))
|
|
4260
4279
|
{
|
|
4261
4280
|
this.hide(false);
|
|
4262
4281
|
}
|
|
@@ -4271,29 +4290,28 @@
|
|
|
4271
4290
|
}
|
|
4272
4291
|
}),
|
|
4273
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
|
+
|
|
4274
4307
|
...(this.bgScroll ?
|
|
4275
4308
|
[] :
|
|
4276
|
-
[preventOverscroll(this.$el), preventBackgroundScroll()])
|
|
4309
|
+
[preventOverscroll(this.$el), preventBackgroundScroll()])];
|
|
4310
|
+
|
|
4311
|
+
|
|
4312
|
+
once(this.$el, 'hide', () => handlers.forEach((handler) => handler()), {
|
|
4313
|
+
self: true });
|
|
4277
4314
|
|
|
4278
|
-
...(this.display === 'static' && this.align !== 'stretch' ?
|
|
4279
|
-
[] :
|
|
4280
|
-
(() => {
|
|
4281
|
-
const handler = () => this.$emit();
|
|
4282
|
-
return [
|
|
4283
|
-
on(window, 'resize', handler),
|
|
4284
|
-
on(document, 'scroll', handler, true),
|
|
4285
|
-
(() => {
|
|
4286
|
-
const observer = observeResize(
|
|
4287
|
-
scrollParents(this.$el),
|
|
4288
|
-
handler);
|
|
4289
|
-
|
|
4290
|
-
return () => observer.disconnect();
|
|
4291
|
-
})()];
|
|
4292
|
-
|
|
4293
|
-
})())])
|
|
4294
|
-
{
|
|
4295
|
-
once(this.$el, 'hide', handler, { self: true });
|
|
4296
|
-
}
|
|
4297
4315
|
} },
|
|
4298
4316
|
|
|
4299
4317
|
|
|
@@ -4310,7 +4328,7 @@
|
|
|
4310
4328
|
{
|
|
4311
4329
|
name: 'hide',
|
|
4312
4330
|
|
|
4313
|
-
handler(
|
|
4331
|
+
handler(_ref5) {let { target } = _ref5;
|
|
4314
4332
|
if (this.$el !== target) {
|
|
4315
4333
|
active =
|
|
4316
4334
|
active === null && within(target, this.$el) && this.isToggled() ?
|
|
@@ -4334,12 +4352,12 @@
|
|
|
4334
4352
|
|
|
4335
4353
|
|
|
4336
4354
|
methods: {
|
|
4337
|
-
show(target, delay) {if (target === void 0) {target = this.
|
|
4338
|
-
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) {
|
|
4339
4357
|
this.hide(false, false);
|
|
4340
4358
|
}
|
|
4341
4359
|
|
|
4342
|
-
this.
|
|
4360
|
+
this.targetEl = target;
|
|
4343
4361
|
|
|
4344
4362
|
this.clearTimers();
|
|
4345
4363
|
|
|
@@ -4402,60 +4420,69 @@
|
|
|
4402
4420
|
|
|
4403
4421
|
position() {
|
|
4404
4422
|
removeClass(this.$el, this.clsDrop + "-stack");
|
|
4405
|
-
|
|
4406
|
-
toggleClass(this.$el, this.clsDrop + "-stretch", this.align === 'stretch');
|
|
4423
|
+
attr(this.$el, 'style', this._style);
|
|
4407
4424
|
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
const [scrollParent] = scrollParents(
|
|
4411
|
-
boundary && this.boundaryAlign ? boundary : this.$el);
|
|
4425
|
+
// Ensure none positioned element does not generate scrollbars
|
|
4426
|
+
this.$el.hidden = true;
|
|
4412
4427
|
|
|
4413
|
-
const
|
|
4414
|
-
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]));
|
|
4415
4431
|
const viewportOffset = this.getViewportOffset(this.$el);
|
|
4416
4432
|
|
|
4417
|
-
|
|
4418
|
-
|
|
4433
|
+
const dirs = [
|
|
4434
|
+
[0, ['x', 'width', 'left', 'right']],
|
|
4435
|
+
[1, ['y', 'height', 'top', 'bottom']]];
|
|
4419
4436
|
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
const elOffset = Math.abs(this.getPositionOffset(this.$el)) + viewportOffset;
|
|
4437
|
-
|
|
4438
|
-
css(this.$el, {
|
|
4439
|
-
width:
|
|
4440
|
-
this.axis === 'y' ?
|
|
4441
|
-
viewport.width :
|
|
4442
|
-
(this.dir === 'left' ?
|
|
4443
|
-
targetDim.left - viewport.left :
|
|
4444
|
-
viewport.right - targetDim.right) - elOffset,
|
|
4445
|
-
height:
|
|
4446
|
-
this.axis === 'x' ?
|
|
4447
|
-
viewport.height :
|
|
4448
|
-
(this.dir === 'top' ?
|
|
4449
|
-
targetDim.top - viewport.top :
|
|
4450
|
-
viewport.bottom - targetDim.bottom) - elOffset });
|
|
4451
|
-
|
|
4452
|
-
} 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) {
|
|
4453
4453
|
addClass(this.$el, this.clsDrop + "-stack");
|
|
4454
4454
|
}
|
|
4455
4455
|
|
|
4456
4456
|
css(this.$el, 'maxWidth', maxWidth);
|
|
4457
4457
|
|
|
4458
|
-
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
|
+
}
|
|
4459
4486
|
} } };
|
|
4460
4487
|
|
|
4461
4488
|
|
|
@@ -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,
|
|
@@ -5861,7 +5893,7 @@
|
|
|
5861
5893
|
},
|
|
5862
5894
|
|
|
5863
5895
|
dropbarAnchor(_ref2, $el) {let { dropbarAnchor } = _ref2;
|
|
5864
|
-
return query(dropbarAnchor, $el);
|
|
5896
|
+
return query(dropbarAnchor, $el) || $el;
|
|
5865
5897
|
},
|
|
5866
5898
|
|
|
5867
5899
|
pos(_ref3) {let { align } = _ref3;
|
|
@@ -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);
|
|
@@ -6082,8 +6114,8 @@
|
|
|
6082
6114
|
return;
|
|
6083
6115
|
}
|
|
6084
6116
|
|
|
6085
|
-
if (
|
|
6086
|
-
after(this.dropbarAnchor
|
|
6117
|
+
if (this.dropbar.previousElementSibling !== this.dropbarAnchor) {
|
|
6118
|
+
after(this.dropbarAnchor, this.dropbar);
|
|
6087
6119
|
}
|
|
6088
6120
|
|
|
6089
6121
|
addClass(target, this.clsDrop + "-dropbar");
|
|
@@ -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);
|
|
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);
|
|
6137
6152
|
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
options.offset[1] = dropbarOffset.top - offset(target).bottom;
|
|
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
|
|